query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
c0b71bc70edb9e5fda75b7033c2ff69d
Delete Files and Folder
[ { "docid": "a422a5169232f312c0339ed08f0353b9", "score": "0.0", "text": "function recursiveRemoveDirectory($directory){\n\narray_map('unlink', glob(\"$directory/*.*\"));\n\nif(rmdir($directory)) {\nreturn true;\n}\n\nreturn false;\n}", "title": "" } ]
[ { "docid": "63ffa97318bc33fa16a16864c096d56c", "score": "0.8211272", "text": "public function deleteWithFiles();", "title": "" }, { "docid": "8366c33e40d37a500df159d66f2b0d22", "score": "0.7559635", "text": "private function DeleteFiles()\n {\n $this->OutputMessage (\"Deleting module files.\");\n \n $root = $_SERVER['DOCUMENT_ROOT'];\n \n echo '<br />Remove_Files ==> '.ArrayToStr($this->Remove_Files);\n \n foreach ($this->Remove_Files AS $filename) \n {\n # remove the file\n $destination = \"{$root}/{$filename}\";\n $delete_result = unlink($destination);\n \n if (!$delete_result) {\n $this->OutputMessage (\"Unable to delete file: {$destination}\", 'error');\n } else {\n $this->OutputMessage (\"File deleted: {$destination}\");\n }\n \n # remove the directory if it is empty\n \n \n } \n }", "title": "" }, { "docid": "4f681fd15439dd072af0a1ec73487c34", "score": "0.7347729", "text": "function delete_files () {\n\t\tunlink('app/controllers/'.$this->name['class'].'Controller.php');\n\t\tunlink('app/models/'.$this->name['class'].'.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_create.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_datatable.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_index.php');\n\t\tunlink('app/views/'.$this->name['variable'].'_update.php');\n\t}", "title": "" }, { "docid": "0e9ec6bbf78701a0beaf673dd30794cd", "score": "0.7197176", "text": "public function delete_all() {\n if (!$dirpath = $this->dirpath) {\n return;\n }\n\n if (is_dir($dirpath) && is_writable($dirpath)) {\n $fileleft = false;\n $it = new RecursiveDirectoryIterator($dirpath, RecursiveDirectoryIterator::SKIP_DOTS);\n $files = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);\n foreach ($files as $file) {\n if ($file->getFilename() === '.' || $file->getFilename() === '..') {\n continue;\n }\n $rpath = $file->getRealPath();\n if (is_writable($rpath)) {\n if ($file->isDir()) {\n rmdir($rpath);\n } else {\n unlink($rpath);\n }\n } else {\n $fileleft = true;\n }\n }\n if (!$fileleft) {\n rmdir($dirpath);\n }\n }\n }", "title": "" }, { "docid": "cc036ebd29fabc91b18091e909353ccc", "score": "0.7167794", "text": "function clean_up_files(){\n\n\tglobal $dir_path, $file_array, $folder_array;\n\t\n\twhile($file = array_pop($file_array)){\n\n\t\t\tunlink($file);\n\n\t}\n\t\n\twhile($folder = array_pop($folder_array)){\n\n\t\t\trmdir($folder);\n\t\n\t}\n\n}", "title": "" }, { "docid": "989843fa3021035cbd711826bd3576d3", "score": "0.7120851", "text": "public function deleteFile();", "title": "" }, { "docid": "91752ac94cc4b8c83c264c03616e360a", "score": "0.7106804", "text": "public function delete() {\n // delete dir recursively\n if ($this->exists_in_filesystem()) {\n recursive_rmdir($this->get_path());\n }\n\n // delete rows\n $subdirs_by_id = $this->get_subdirs(true, true, true);\n $subdir_ids = array_keys($subdirs_by_id);\n $this->db->query_in('\n DELETE FROM `DIRS`\n WHERE `id` IN (%s)\n ', $subdir_ids);\n }", "title": "" }, { "docid": "56bcd14990ae9ea42674bd55ef5da358", "score": "0.70828295", "text": "private function removeFiles()\n {\n foreach ($this->filesToDelete as $fileToDel) {\n if (is_file($fileToDel)) {\n unlink($fileToDel);\n }\n }\n $this->filesToDelete = array();\n }", "title": "" }, { "docid": "7ed47aeb81ebc6c400da7496768fb5a8", "score": "0.70786774", "text": "function delete_files($path) {\n echo(\"upload/$path\");\n if(is_dir(\"upload/$path\")){\n chmod(\"upload/$path\",0777);\n $files = glob( \"upload/$path\".'*'); //GLOB_MARK adds a slash to directories returned\n \n foreach( $files as $file )\n {\n chmod($file,0777);\n unlink( $file ); \n\n \n }\n rmdir( \"upload/$path\" );\n } elseif(is_file(\"upload/$path\")) {\n unlink( \"upload/$path\" ); \n }\n}", "title": "" }, { "docid": "a5769eab932783e0c8f098bad568da7f", "score": "0.707132", "text": "public function delete_folder()\n {\n\t\tif($this->uri->segment(3)) {\n\t\t\t$folder = $this->uri->segment(3);\n\t\t\t$base_path = $this->company_lib->get_uploads_folder($this->company['id']);\n\t\t\t$dir_path = $base_path.\"/\".$folder;\n\t\t\t\n\t\t\t$dir = opendir($dir_path);\n\t\t\twhile(false !== ( $file = readdir($dir)) ) {\n\t\t\t\tif (( $file != '.' ) && ( $file != '..' )) {\n\t\t\t\t\t$full = $dir_path . '/' . $file;\n\t\t\t\t\t\n\t\t\t\t\tunlink($full);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\tif(is_dir($dir_path)) {\n\t\t\t\tif(rmdir($dir_path)) {\n\t\t\t\t\t$this->flasher->set_success('Folder has been deleted successfully', 'documents/folder_listing', TRUE);\n\t\t\t\t\t//redirect('documents/folder_listing');\n\t\t\t\t} else {\n\t\t\t\t\t$this->flasher->set_danger('Folder has not been deleted successfully', 'documents/folder_listing', TRUE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n }", "title": "" }, { "docid": "d8049db51c5bfff6fead3944a0c52b6c", "score": "0.70092493", "text": "public function deleteDirectory($path)\r {\r }", "title": "" }, { "docid": "3d031e562ebdf04f7ff7d07c64828bfa", "score": "0.69575304", "text": "private function deleteAllImgFiles()\n {\n $images = $this->getImages();\n\n foreach ($images as $image) {\n $this->deleteImage($image->id);\n }\n\n $dirPath = implode(DIRECTORY_SEPARATOR, [\n $this->directory,\n $this->getGalleryId(),\n ]);\n\n @rmdir($dirPath);\n }", "title": "" }, { "docid": "a3fe444de897ec21e6eff039450b6065", "score": "0.69554025", "text": "function deletePaperTree() {\n\t\tparent::rmtree($this->filesDir);\n\t}", "title": "" }, { "docid": "3544fe7223b261daef7b39c470ce3cce", "score": "0.6950247", "text": "public function deleteFiles()\n {\n foreach (array_keys(Lang::allLocales()) as $lang) {\n File::delete($this->languages[$lang]->image_path);\n }\n }", "title": "" }, { "docid": "4cc80c9f336b40bcf4adc555cda4695f", "score": "0.6899384", "text": "public function deleteUnusedFiles() {\n\t\t$absolutePath = PATH_site . $this->uploadFolder;\n\t\t$filesInUploadFolder = t3lib_div::getFilesInDir($absolutePath);\n\t\t$this->addToStatistics(\n\t\t\t'Files in upload folder', count($filesInUploadFolder)\n\t\t);\n\n\t\t$imageFileNamesInDatabase = tx_oelib_db::selectColumnForMultiple(\n\t\t\t'image', REALTY_TABLE_IMAGES,\n\t\t\t'1=1' . tx_oelib_db::enableFields(REALTY_TABLE_IMAGES, 1) .\n\t\t\t\t$this->additionalWhereClause\n\t\t);\n\t\t$this->addToStatistics(\n\t\t\t'Files with corresponding image record',\n\t\t\tcount($imageFileNamesInDatabase)\n\t\t);\n\n\t\t$documentFileNamesInDatabase = tx_oelib_db::selectColumnForMultiple(\n\t\t\t'filename', 'tx_realty_documents',\n\t\t\t'1=1' . tx_oelib_db::enableFields('tx_realty_documents', 1) .\n\t\t\t\t$this->additionalWhereClause\n\t\t);\n\t\t$this->addToStatistics(\n\t\t\t'Files with corresponding document record',\n\t\t\tcount($documentFileNamesInDatabase)\n\t\t);\n\n\t\t$filesToDelete = array_diff(\n\t\t\t$filesInUploadFolder,\n\t\t\t$imageFileNamesInDatabase, $documentFileNamesInDatabase\n\t\t);\n\t\t$this->addToStatistics('Files deleted', count($filesToDelete));\n\t\tforeach ($filesToDelete as $image) {\n\t\t\tunlink($absolutePath . $image);\n\t\t}\n\n\t\t$filesOnlyInDatabase = array_diff(\n\t\t\tarray_merge($imageFileNamesInDatabase, $documentFileNamesInDatabase),\n\t\t\t$filesInUploadFolder\n\t\t);\n\t\t$numberOfFilesOnlyInDatabase = count($filesOnlyInDatabase);\n\t\t$this->addToStatistics(\n\t\t\t'Image and documents records without image file',\n\t\t\t$numberOfFilesOnlyInDatabase . (($numberOfFilesOnlyInDatabase > 0)\n\t\t\t\t? ', file names: ' . LF . TAB .\n\t\t\t\t\timplode(LF . TAB, $filesOnlyInDatabase)\n\t\t\t\t: '')\n\t\t);\n\t}", "title": "" }, { "docid": "69fcc175aed549e0c8dfec1f9a9a8256", "score": "0.68858796", "text": "public static function delAll()\n {\n $config = new Config();\n $c = $config->get();\n\n LocalFileStore::deleteDirectories($c['cachedir'], false);\n }", "title": "" }, { "docid": "12578a425ba67c5fbbd2688103b942f9", "score": "0.68473107", "text": "public function deleteFiles() {\n /**\n * @var $owner ActiveRecord\n */\n $owner = $this->owner;\n\n $fileName = $owner->getAttribute($this->imgAttribute);\n if (! empty($fileName)) {\n $size = $this->sizeAttribute ? $owner->getAttribute($this->sizeAttribute) : $this->cropSize;\n if ($this->sizeSteps && $size > 0) {\n $minSize = $this->cropSize >> ($this->sizeSteps - 1);\n while ($size >= $minSize) {\n $path = $this->getImgBaseDir() . DIRECTORY_SEPARATOR . $size . DIRECTORY_SEPARATOR . $fileName;\n if (file_exists($path)) unlink($path);\n\n $size >>= 1;\n }\n }\n else {\n $path = $this->getImgBaseDir() . DIRECTORY_SEPARATOR . $fileName;\n if (file_exists($path)) unlink($path);\n }\n // Delete orignal if exists\n $path = $this->getImgBaseDir() . DIRECTORY_SEPARATOR . 'original' . DIRECTORY_SEPARATOR . $fileName;\n if (file_exists($path)) unlink($path);\n\n $owner->setAttribute($this->imgAttribute, null);\n }\n }", "title": "" }, { "docid": "7558b33ad4d41f707e1795a743406a8e", "score": "0.6822647", "text": "public function clearFiles()\n {\n $path = Yii::getAlias(self::TMP_DIR);\n if (is_dir($path)) {\n FileHelper::removeDirectory($path);\n }\n }", "title": "" }, { "docid": "656c4b308a7b9e389819f474ef808db9", "score": "0.6742", "text": "public function files_batch_delete()\r\n {\t\r\n\t\t$this->folder_id = $this->post['folder_id'];\r\n\t\t$this->media_ids = array_filter(explode(',',urldecode($this->post['media_ids'])));\t\t\r\n\t\t$this->per_page = $this->post['per_page'];\r\n\t\t$this->page_num = $this->post['page_num'];\r\n\t\t\r\n\t\tforeach ($this->media_ids as $media_id)\r\n\t\t{\r\n\t\t\t$medium = \\Model_Medium::find($media_id);\r\n\r\n\t\t\t$file_search = $medium->dirname.'/'.$medium->filename.'*';\r\n\t\t\t$files = new GlobIterator($file_search);\t\t\t\r\n\r\n\t\t\tif ($medium->delete())\r\n\t\t\t{\r\n\t\t\t\tforeach ($files as $file => $empty_value)\r\n\t\t\t\t{\r\n\t\t\t\t\t$new_array[] = unlink($file);\r\n\t\t\t\t}\r\n\t\t\t\t$this->output_response[] = \"Media successfully deleted.\";\r\n\t\t\t}\r\n\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->output_response[] = \"Could not delete media.\";\r\n\t\t\t}\r\n\t\t}\t\t\r\n\t\t$this->set_folder_data();\r\n\t\t$this->set_media_data();\r\n\t\t$this->set_response();\r\n\t}", "title": "" }, { "docid": "764da679918e495bacc32d862f951653", "score": "0.6706599", "text": "function delete_folder($folder){\r\n $it = new RecursiveDirectoryIterator($folder, RecursiveDirectoryIterator::SKIP_DOTS);\r\n $files = new RecursiveIteratorIterator($it,RecursiveIteratorIterator::CHILD_FIRST);\r\n foreach($files as $file) {\r\n if ($file->isDir()){\r\n rmdir($file->getRealPath());\r\n } else {\r\n unlink($file->getRealPath());\r\n }\r\n }\r\n return rmdir($folder);\r\n}", "title": "" }, { "docid": "5f57289701c9b075d8806ec2bd90772a", "score": "0.66965187", "text": "public function delete(string $existingFilePath, string $foldersPath): void;", "title": "" }, { "docid": "ab68414d930d56801bd20dea4462508a", "score": "0.6688938", "text": "public static function clear()\n {\n $iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator(static::$directory),\n RecursiveIteratorIterator::SELF_FIRST\n );\n\n foreach ($iterator as $file) {\n if (! $file->isDir()) {\n unlink($file->getRealPath());\n }\n }\n }", "title": "" }, { "docid": "531094253667f238f0e10040c0fa59f3", "score": "0.668825", "text": "public function deleteFolderAction($id) {\r\n\t\r\n\t$em = $this -> getDoctrine() -> getManager();\r\n\t$folder = $em \r\n\t\t\t-> getRepository('AcsilServerAppBundle:Folder') \r\n\t\t\t-> findOneBy(array('id' => $id));\r\n\r\n\t$folderId = $folder->getParentFolder();\r\n$file_list = $folder->listDirectory($folder->getAbsolutePath());\r\n foreach ($file_list as $file) {\r\n\t $tmp = basename($file);\r\n\t if ($tmp[0] == 'f')\r\n\t {\r\n\t $doc = $em \r\n\t\t\t-> getRepository('AcsilServerAppBundle:Document') \r\n\t\t\t-> findOneBy(array('path' => $tmp));\r\n\t\t\t\t\tif (!$doc) {\r\n\t\t\tthrow $this -> createNotFoundException('No document found for path ' . $tmp);\r\n\t\t}\r\n\t\t$aclProvider = $this -> get('security.acl.provider');\r\n\t\t$objectIdentity = ObjectIdentity::fromDomainObject($doc);\r\n\t\t$aclProvider -> deleteAcl($objectIdentity);\r\n\t\t$parentId = $doc->getFolder();\r\n\t\tif ($parentId != 0)\r\n\t\t{\r\n\t\t$folder = $em -> getRepository('AcsilServerAppBundle:Folder') -> findOneById($parentId);\r\n\t\t$folder->setSize($folder->getSize() - 1);\r\n\t\t$em -> persist($folder);\r\n\t\t}\r\n\t\t$em -> remove($doc);\r\n\t\tunset($file_list[array_search($file,$file_list)]);\r\n\t\t\r\n\t\t}\r\n\t\t}\r\n\t\t$em -> flush();\t\r\n\t\t$cpt = 1;\r\n\t\twhile ($cpt != 0)\r\n\t\t{\r\n\t\t$cpt = 0;\r\n\t\t foreach ($file_list as $file) {\r\n\t $tmp = basename($file);\r\n\t\t\t if ($tmp[0] == 'd')\r\n\t {\r\n\t $folder = $em \r\n\t\t\t-> getRepository('AcsilServerAppBundle:Folder') \r\n\t\t\t-> findOneBy(array('path' => $tmp));\r\n\t\t\t\t\tif (!$folder) {\r\n\t\t\tthrow $this -> createNotFoundException('No folder found for path ' . $tmp);\r\n\t\t}\r\n\t\tif ($folder->getFSize() == 0 && $folder->getSize() == 0)\r\n{\r\n\t\t$aclProvider = $this -> get('security.acl.provider');\r\n\t\t$objectIdentity = ObjectIdentity::fromDomainObject($folder);\r\n\t\t$aclProvider -> deleteAcl($objectIdentity);\r\n\t\t$parentId = $folder->getParentFolder();\r\n\t\tif ($parentId != 0)\r\n\t\t{\r\n\t\t$parentFolder = $em -> getRepository('AcsilServerAppBundle:Folder') -> findOneById($parentId);\r\n\t\t$parentFolder->setFSize($parentFolder->getFSize() - 1);\r\n\t\t$em -> persist($parentFolder);\r\n\t\t}\r\n\t\t$em -> remove($folder);\r\n\t\tunset($file_list[array_search($file,$file_list)]);\r\n\t\t}\r\n\t\t\telse\r\n\t\t{\r\n\t\t$cpt = 1;\r\n\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\tunset($file_list[array_search($file,$file_list)]);\r\n\t\t}\r\n\t\t}\r\n\t\t}\r\n\t\t$folder = $em \r\n\t\t\t-> getRepository('AcsilServerAppBundle:Folder') \r\n\t\t\t-> findOneBy(array('id' => $id));\r\n\t\t$em -> remove($folder);\r\n\t\t$em -> flush();\t\t\r\n\r\n\t\treturn $this -> redirect($this -> generateUrl('_managefile', array(\r\n 'folderId' => $folderId,\r\n )));\r\n\t}", "title": "" }, { "docid": "04db938ac46359c4e85ba771d56b123e", "score": "0.66879606", "text": "public function testDeleteFiles() {\n\t\t// MAKE SURE THIS FUNCTION IS CALLED LAST\n\t\tDataDownloader::deleteFiles($this->filePath, $this->fileName, $this->fileExtension);\n\n\t\t// See what files are there\n\t\t$files = glob(\"$this->filePath$this->fileName*$this->fileExtension\");\n\n\t\t// See if they're GONE\n\t\t$this->assertEmpty($files);\n\t}", "title": "" }, { "docid": "f32d1b81b6780a2bb705d5d47039d539", "score": "0.6687215", "text": "public function clear(){\n\t\t$files = glob($this->dirname.'/*');\n\t\tforeach( $files as $file ) {\n\t\t\tunlink($file);\n\t\t}\n\t}", "title": "" }, { "docid": "ed8c8dd8e29a65f1634a69aa6c92f10a", "score": "0.6683005", "text": "function remove($files);", "title": "" }, { "docid": "fb6452abc05178102957d2ca911c5631", "score": "0.66646725", "text": "public function cleanupFolderSystem()\n {\n if ($this->filesystem->isDirectory(DIR_APPLICATION . '/' . DIRNAME_CLASSES . '/' . DIRNAME_ENTITIES)) {\n $this->filesystem->deleteDirectory(DIR_APPLICATION . '/' . DIRNAME_CLASSES . '/' . DIRNAME_ENTITIES);\n }\n if ($this->filesystem->isDirectory(DIR_APPLICATION . '/' . REL_DIR_METADATA_XML)) {\n $this->filesystem->deleteDirectory(DIR_APPLICATION . '/' . REL_DIR_METADATA_XML);\n }\n if ($this->filesystem->isDirectory(DIR_APPLICATION . '/' . REL_DIR_METADATA_YAML)) {\n $this->filesystem->deleteDirectory(DIR_APPLICATION . '/' . REL_DIR_METADATA_YAML);\n }\n }", "title": "" }, { "docid": "34b2d86c0a3059047e5185399b45b56e", "score": "0.6664612", "text": "function delete($path) {\n\t\tif (is_dir($path)) {\n\t\t\tforeach (array_diff(scandir($path), [\".\", \"..\"]) as $object) {\n\t\t\t\tdelete($path . \"/\" . $object);\n\t\t\t}\n\t\t\trmdir($path);\n\t\t}\n\t\telse\n\t\t\tunlink($path);\n\t}", "title": "" }, { "docid": "a8fcb45badd8ea400af381f7e99d276d", "score": "0.66630846", "text": "function delete(){\n\n ob_start();\n try{\n AJXP_Controller::findActionAndApply(\"delete\", array(\n \"dir\" => dirname($this->path),\n \"file_0\" => $this->path\n ), array());\n }catch(Exception $e){\n\n }\n ob_get_flush();\n $this->putResourceData(array());\n\n }", "title": "" }, { "docid": "a3cdacfb9806dcb2e5270d41cafeac66", "score": "0.66221154", "text": "public function testDelete()\n {\n $this->portrait->delete();\n foreach ($this->portrait->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->portrait->get_alt_file());\n\n $this->totalcms->delete();\n foreach ($this->totalcms->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->totalcms->get_alt_file());\n\n $this->landscape->delete();\n foreach ($this->landscape->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->landscape->get_alt_file());\n\n $this->big->delete();\n foreach ($this->big->get_images() as $image) {\n $this->assertFileNotExists($image);\n }\n $this->assertFileNotExists($this->big->get_alt_file());\n }", "title": "" }, { "docid": "ee728395de3defb95b6c51002ac2f671", "score": "0.66122454", "text": "protected function deleteFiles()\n {\n $request = $this->getRequest();\n\n if ($request->isPost()) {\n if (null !== ($fileNames = $request->getPost('files', null))) {\n // process requested path\n $userPath = $this->getUserPath();\n\n // process files names\n $deleteResult = false;\n $deletedCount = 0;\n\n foreach ($fileNames as $file) {\n // check the permission and increase permission's actions track\n if (true !== ($result = $this->aclCheckPermission(null, true, false))) {\n $this->flashMessenger()\n ->setNamespace('error')\n ->addMessage($this->getTranslator()->translate('Access Denied'));\n\n break;\n }\n\n // delete the file or directory with nested files and dirs\n if (true !== ($deleteResult = $this->getModel()->deleteUserFile($file, $userPath))) {\n $this->flashMessenger()\n ->setNamespace('error')\n ->addMessage($this->getTranslator()\n ->translate('Cannot delete some files or dirs. Check their permissions or existence'));\n\n break;\n }\n\n $deletedCount++;\n }\n\n if (true === $deleteResult) {\n $message = $deletedCount > 1\n ? 'Selected files and dirs have been deleted'\n : 'The selected file or dir has been deleted';\n\n $this->flashMessenger()\n ->setNamespace('success')\n ->addMessage($this->getTranslator()->translate($message));\n }\n }\n }\n\n // redirect back\n return $request->isXmlHttpRequest()\n ? $this->getResponse()\n : $this->redirectTo(null, null, [], true);\n }", "title": "" }, { "docid": "40e7dbd15e212c44b86701ac7e7b6df9", "score": "0.6592319", "text": "public function actionCleanup()\n {\n $fileList = StorageImporter::getOrphanedFileList();\n\n if ($fileList === false) {\n return $this->outputError(\"Could not find the storage folder to clean up.\");\n }\n \n if (count($fileList) > 0) {\n $this->output(print_r($fileList, true));\n }\n\n if (count($fileList) !== 0) {\n $success = true;\n if ($this->confirm(\"Do you want to delete \" . count($fileList) . \" files which are not referenced in the database any more?\")) {\n foreach ($fileList as $file) {\n if (is_file($file) && @unlink($file)) {\n $this->outputSuccess($file . \" successful deleted.\");\n } elseif (is_file($file)) {\n $this->outputError($file . \" could not be deleted!\");\n $success = false;\n } else {\n $this->outputError($file . \" could not be found!\");\n $success = false;\n }\n }\n }\n if ($success) {\n return $this->outputSuccess(count($fileList) . \" files successful deleted.\");\n }\n return $this->outputError(\"Cleanup could not be completed. Please look into error above.\");\n }\n return $this->outputSuccess(\"No orphaned files found.\");\n }", "title": "" }, { "docid": "fe4c3cbc732b2342713588658c7b8047", "score": "0.65843415", "text": "public function destroy(Request $request) {\n $cmd = htmlspecialchars(strtolower(trim($request->input('cmd'))));\n $id = htmlspecialchars(intval(trim($request->input('idFolder'))));\n $carpeta = htmlspecialchars(trim($request->input('nameFolder')));\n\n $files = DB::table(table('pagina'))\n ->select('all_files')\n ->first();\n $files = objectToArray($files);\n\n try {\n $affected = DB::table(table('pagina'))->where('id', '=', $id)->delete();\n if ($affected) {\n delete_files(FOLDER_PAGES . $carpeta); // SIRVE PARA ELIMIANR LA CARPETA CON SUS ARCHIVOS\n\n if (@$files['all_files']) {\n @$files = explode(\" \", @$files['all_files']);\n\n for ($fd = 0; $fd < count(@$files); $fd++) {\n @unlink(FOLDER_FILES_BLOG . @$files[@$fd]);\n }\n }\n $json = json('ok', strings('success_delete'), '');\n } else {\n $json = json('ok', strings('error_delete'), '');\n }\n } catch (Throwable $t) {\n $json = json('ok', strings('error_delete'), '');\n }\n //}\n\n return jsonPrint($json, $cmd);\n }", "title": "" }, { "docid": "9cdc7f4f99458aae2f6d94978d246e2b", "score": "0.6574141", "text": "private static function delDir($path) { \n $files = array_diff(scandir($path), array('.','..'));\n foreach ($files as $file) {\n (is_dir(\"$path/$file\")) ? delTree(\"$path/$file\") : unlink(\"$path/$file\"); \n }\n rmdir($path); \n }", "title": "" }, { "docid": "3b437b4e00395e1eabace2d9a47b5bbb", "score": "0.6571702", "text": "public function Controller_DeleteFiles($Sender) {\n unlink(PATH_UPLOADS.DS.'GeoLiteCity-Blocks.csv');\n unlink(PATH_UPLOADS.DS.'GeoLiteCity-Location.csv');\n unlink(PATH_UPLOADS.DS.'GeoLiteCity-latest.zip');\n \n $Sender->InformMessage(T('Files deleted'));\n $this->Controller_Index($Sender);\n }", "title": "" }, { "docid": "4fcf4471806b037becb0c95963932499", "score": "0.6559792", "text": "function deletefolder(){\r\n\t\t$id=$_GET['id'];\t\t\r\n\t\t//delete all files in folder as well\r\n\t\t$this->db->where('folder',$id);\r\n\t\t$exec=$this->db->get('file')->result();\r\n\t\tforeach($exec as $row){\r\n\t\t\t$this->deletefilefunc($row->id_file,$row->file);\r\n\t\t}\r\n\t\t$this->db->where('id_folder',$id);\r\n\t\t$exec=$this->db->delete('folder');\r\n\t\t($exec)?$status='success':$status='fail';\r\n\t\t$result=array('status'=>$status);\r\n\t\theader(\"Content-Type:application/json\");\r\n\t\techo json_encode($result);\r\n\t}", "title": "" }, { "docid": "9da3ffc53b27be3738bb53bea9a5a925", "score": "0.6557404", "text": "public function cleanfilesAction()\n {\n // It is assumed that their metadata is stored in a removefiles table\n // in the DB\n \n $removeFiles = Ml_Model_RemoveFiles::getInstance();\n \n $removedNum = $removeFiles->gc();\n \n echo \"Cleaned \" . $removedNum . \" files from storage.\\n\";\n }", "title": "" }, { "docid": "5a7973804e37c0a71b3cddd60328e95e", "score": "0.6540957", "text": "private function deleteTempfiles() {\n foreach ($this->temp_files as $temp_file) {\n @unlink($temp_file);\n }\n\n // Better safe than sorry - shouldn't try deleting '.' or '/', or '..'.\n if (strlen($this->temp_dir) > 2) {\n @rmdir($this->temp_dir . 'xl' . DIRECTORY_SEPARATOR . 'worksheets');\n @rmdir($this->temp_dir . 'xl');\n @rmdir($this->temp_dir);\n }\n }", "title": "" }, { "docid": "ef358617a95d68fbf5a9dbfc38880fb5", "score": "0.65348333", "text": "abstract function delete($path);", "title": "" }, { "docid": "897661733fd0ed9ada6c9a588b5c9fdc", "score": "0.6527794", "text": "function clear_dir($dir, $delete = false) {\r\n\t$dossier = $dir;\r\n\t$dir = opendir ( $dossier );\r\n\twhile ( $file = readdir ( $dir ) ) {\r\n\t\tif (! in_array ( $file, array (\r\n\t\t\t\t\".\",\r\n\t\t\t\t\"..\" \r\n\t\t) )) {\r\n\t\t\tif (is_dir ( \"$dossier/$file\" )) {\r\n\t\t\t\tclear_dir ( \"$dossier/$file\", true );\r\n\t\t\t} else {\r\n\t\t\t\tunlink ( \"$dossier/$file\" );\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\tclosedir ( $dir );\r\n\tif ($delete == true) {\r\n\t\trmdir ( \"$dossier/$file\" );\r\n\t}\r\n}", "title": "" }, { "docid": "d7355295ad8679b94ba68f1a32d12675", "score": "0.65079874", "text": "public function testFoldersDelete()\n {\n }", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.6501948", "text": "abstract public function delete($path);", "title": "" }, { "docid": "cb80681e5c1009fcac2f2bfcdf74447e", "score": "0.65005815", "text": "public static function _deleteTempFiles(){\r\n foreach(self::$tmp_files as $file)\r\n @unlink($file);\r\n }", "title": "" }, { "docid": "0f705704d3ec14c4046efe36a516fbda", "score": "0.6495398", "text": "public function deleteAllFolder($info_files, $info_folders){\n $id=$_SESSION['id'];\n /*\n * for de files\n */\n for ($i=0; $i<count($info_files); $i++){\n /**\n * Servei per agafar el size del fitxer\n *per despres fer un altre servei que\n * sumi aquest size a la capacitat que\n * te el usuari per emmagatzemar info\n */\n\n $servei_get_file_size = $this->container->get('file_size_user_use_case');\n $filesize=$servei_get_file_size($info_files[$i]['id']);\n\n $servei_capacity = $this->container->get('capacity_user_use_case');\n $capacity = $servei_capacity();\n\n $sum_capacity = $capacity + $filesize;\n $servei_actualitzar_capacitity = $this->container->get('actualitzar_capacity_user_use_case');\n $servei_actualitzar_capacitity($sum_capacity);\n /*\n * delete the files\n */\n $servei = $this->container->get('delete_file_user_use_case');\n $servei($info_files[$i]['id']);\n }\n /*\n * for de folders\n */\n for ($i=0;$i<count($info_folders);$i++){\n /*\n * mirem els fitxer que hi han, si es que hi han\n */\n $folder_id=$info_folders[$i]['id'];\n $servei = $this->container->get('check_file_user_use_case');\n $files = $servei($folder_id,$id);\n /*\n * mirem els folder que hi ha dins, si es que hi han\n */\n $servei2 = $this->container->get('check_folder_user_use_case');\n $folders = $servei2($folder_id,$id);\n if(count($files)>0 || count($folders)>0){\n $this->deleteAllFolder($files, $folders);\n }\n $servei3 = $this->container->get('delete_folder_user_use_case');\n $servei3($folder_id);\n /*\n * mira si esta compartit i ho elimina de share\n */\n $servei4= $this->container->get('delete_share_user_use_case');\n $servei4($folder_id);\n\n }\n\n }", "title": "" }, { "docid": "592dca349618122f35fd5344cad1a3e3", "score": "0.64888185", "text": "public function remove($files);", "title": "" }, { "docid": "4a1838bef7519b17bfabf12d86fda5bc", "score": "0.64822716", "text": "private function delete_cache_files() {\n\t\tforeach ( $this->cache_dirs as $dir ) {\n\t\t\t$this->delete( $this->cache_path . $dir );\n\t\t}\n\t}", "title": "" }, { "docid": "d0bc1f38e3facc6e4326302c1793a853", "score": "0.6479517", "text": "public function delete(){\n\n File::delete([\n $this->image_path,\n $this->thumbnail_path\n ]);\n\n parent::delete();\n }", "title": "" }, { "docid": "4dab10110cc1edeba54f048c7e753c59", "score": "0.64753574", "text": "private function deleteFolder($id) {\n\t\t\n\t\tif (\\Yii::$app->params[\"outputBaseDir\"] != \"\" && $id != \"\") {\n\t\t\t$path = \\Yii::$app->params[\"outputBaseDir\"] . \"/\" . $id;\n\t\t\ttry {\n\t\t\t\tarray_map('unlink', glob($path . \"/*\"));\n\t\t\t\trmdir($path);\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\t\\Yii::error(\"Could not delete folder: \" . $e);\n\t\t\t}\n\t\t} else {\n\t\t\t\\Yii::error(\"Something very bad happened while deleting a file!\");\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "0a23ebd9ce6b97623eab6ba510a2540b", "score": "0.6471218", "text": "protected function removeCreatedFiles()\n {\n $files = [ 'codeception.yml', $this->envFileName ];\n $dirs = [ 'tests' ];\n foreach ($files as $file) {\n if (file_exists(getcwd() . '/' . $file)) {\n unlink(getcwd() . '/' . $file);\n }\n }\n foreach ($dirs as $dir) {\n if (file_exists(getcwd() . '/' . $dir)) {\n rrmdir(getcwd() . '/' . $dir);\n }\n }\n }", "title": "" }, { "docid": "fba997c2bacb96bd237ca90cbf9dc1fa", "score": "0.64606506", "text": "function eliminar_archivos($carpeta,$id)\n{\n\t$dir = '../file_sitio/'.$carpeta.'/'.$id.'/';\n\tif(is_dir($dir)){\n\t\t$directorio=opendir($dir); \n\t\twhile ($archivo = readdir($directorio))\n\t\t{\n\t\t\tif($archivo != '.' and $archivo != '..')\n\t\t\t{\n\t\t\t\t@unlink($dir.$archivo);\n\t\t\t}\n\t\t}\n\t\tclosedir($directorio); \n\t\t@rmdir($dir);\n\t}\n}", "title": "" }, { "docid": "2c9bd979bff0dd8dadfecd2039caedaf", "score": "0.6453985", "text": "public function testDeleteDirectory()\n {\n mkdir(self::$temp . DS . 'foo');\n file_put_contents(self::$temp . DS . 'foo' . DS . 'file.txt', 'Hello World');\n\n Storage::rmdir(self::$temp . DS . 'foo');\n\n $this->assertTrue(!is_dir(self::$temp . DS . 'foo'));\n $this->assertTrue(!is_file(self::$temp . DS . 'foo' . DS . 'file.txt'));\n }", "title": "" }, { "docid": "a9cfe67f9e33070282cb80c4a5a8a59a", "score": "0.64530206", "text": "function recurse_delete($dir){\n\t\tif (is_dir($dir)) {\n\t\t\t$objects = scandir($dir);\n\t\t\tforeach ($objects as $object) {\n\t\t\t\tif ($object != \".\" && $object != \"..\") {\n\t\t\t\t\tif (filetype($dir.\"/\".$object) == \"dir\"){\n\t\t\t\t\t\t$this->recurse_delete($dir.\"/\".$object);\n\t\t\t\t\t}else{\n\t\t\t\t\t\t@chmod($dir.\"/\".$object, 0777);\n\t\t\t\t\t\tunlink($dir.\"/\".$object);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treset($objects);\n\t\t\trmdir($dir);\n\t\t}\n\t}", "title": "" }, { "docid": "b1fc4bf304f4598ebb71bf15976e7fe4", "score": "0.6450998", "text": "public function clearTmpFiles()\n {\n $dirItr = new \\RecursiveDirectoryIterator(dirname(__DIR__) . '/public/tmp');\n foreach (new \\RecursiveIteratorIterator($dirItr, \\RecursiveIteratorIterator::LEAVES_ONLY) as $file) {\n if ($file->isFile() && $file->getFilename()[0] !== \".\") {\n @unlink($file->getPathname());\n }\n }\n }", "title": "" }, { "docid": "18451e2b404cc7ad97ba6e98c73e10c2", "score": "0.6446436", "text": "static public function delete($file) {\n\n if (is_dir($file)) {\n $dir = scandir($file);\n foreach ($dir as $archivos_carpeta) {\n if ($archivos_carpeta != \".\" && $archivos_carpeta != \"..\") {\n if (is_dir($file . '/' . $archivos_carpeta)) {\n self::delete($file . '/' . $archivos_carpeta);\n } else {\n if (file_exists($file . '/' . $archivos_carpeta))\n @unlink($file . '/' . $archivos_carpeta);\n }\n }\n }\n if (file_exists($file))\n @rmdir($file);\n }else {\n if (file_exists($file))\n @unlink($file);\n }\n }", "title": "" }, { "docid": "e329cabe842f671edf7df525c6b33164", "score": "0.64417636", "text": "public function delete(){\n\t\tEDatabase::q(\"DELETE FROM ocs_content WHERE id=\".$this->id.\" LIMIT 1\");\n\t\tEDatabase::q(\"DELETE FROM ocs_comment WHERE content=\".$this->id);\n\t\tEFileSystem::rmdir(\"content/\".$this->id);\n\t}", "title": "" }, { "docid": "3bd3ab2f2ce8fc6d61f62f60c19bb632", "score": "0.6441084", "text": "function deleteFolder() {\n\t\tif(!empty($this->id)) {\n\t\t\tglobal $dbi;\n\t\t\t\n\t\t\t/* Delete files in folder */\n\t\t\t$result = $dbi->query(\"SELECT id FROM \".fileTableName.\" WHERE folderId=\".$this->id);\n\t\t\tfor($i=0;(list($id)=$result->fetchrow_array());$i++) {\n\t\t\t\t$file = new File($id);\n\t\t\t\t$file->deleteFile();\t\n\t\t\t}\n\t\t\t\n\t\t\t/* Delete subfolders */\n\t\t\t$result = $dbi->query(\"SELECT id FROM \".folderTableName.\" WHERE parentId=\".$this->id);\n\t\t\tfor($i=0;(list($id)=$result->fetchrow_array());$i++) {\n\t\t\t\t$folder = new Folder($id);\n\t\t\t\t$folder->deleteFolder();\t\n\t\t\t}\n\n\t\t\t/* Delete logged information in database */\n\t\t\t$dbi->query(\"DELETE FROM \".logTableName.\" WHERE type='folder' AND typeId=\".$this->id);\n\n\t\t\t/* Delete this folder */\n\t\t\t$dbi->query(\"DELETE FROM \".folderTableName.\" WHERE id=\".$this->id);\n\n\t\t\t/* Folder was deleted */\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\t/* Folder was not deleted */\n\t\treturn false;\n\t}", "title": "" }, { "docid": "6633698916692181c267e327ea427da6", "score": "0.64367765", "text": "public function rm( $path );", "title": "" }, { "docid": "d1e90621e0603864ccd057f3fe117abd", "score": "0.6435071", "text": "public function destroy($id)\n {\n // array_map('unlink, $files');\n $item = Catalogo::find($id);\n\n // delete from the system the 'catalogos' pictures\n $array_photos_catalogo = [];\n // add to array the files able to delete\n if($item->photos) {\n foreach ($item->photos as $photo => $p) {\n array_push($array_photos_catalogo, '.' . $p->url);\n }\n }\n // loop thru the array of files and check one by one and delete it if true\n foreach ($array_photos_catalogo as $k => $v) {\n if(file_exists($v)) {\n // array_map('unlink', $v);\n unlink($v);\n } \n }\n\n // delete from the system the 'marcas' pictures, a dependency of catalogos\n $array_photos_marca = [];\n // add to array the files able to delete\n if($item->marcas) {\n foreach ($item->marcas as $marca => $m) {\n foreach ($m->photos as $p) {\n array_push($array_photos_marca, '.' . $p->url);\n }\n }\n }\n // loop thru the array of files and check one by one and delete it if true\n foreach ($array_photos_marca as $k => $v) {\n if(file_exists($v)) {\n // array_map('unlink', $v);\n unlink($v);\n } \n }\n\n $item = Catalogo::find($id);\n if ($item) {\n if($item->photos) {\n foreach($item->photos as $photo) {\n Photo::find($photo->id)->delete();\n }\n }\n foreach($item->marcas as $marca) {\n if($marca) {\n if($marca->photos) {\n foreach ($marca->photos as $photo) {\n Photo::find($photo->id)->delete();\n }\n }\n Marca::find($marca->id)->delete();\n }\n }\n $item->delete();\n return redirect('/admin/catalogos');\n }\n\n }", "title": "" }, { "docid": "92d82cf20d29eaa9292f3737ad9eb2ef", "score": "0.64343095", "text": "function fusion_slider_delete_dir( $dir_path ) {\n\tif ( ! is_dir( $dir_path ) ) {\n\t\t$message = sprintf( esc_html__( '%s must be a directory', 'Avada' ), $dir_path );\n\t\tthrow new InvalidArgumentException( $message );\n\t}\n\tif ( '/' != substr( $dir_path, strlen( $dir_path ) - 1, 1 ) ) {\n\t\t$dir_path .= '/';\n\t}\n\t$files = fusion_get_import_files( $dir_path, '*' );\n\n\tforeach ( $files as $file ) {\n\t\tif ( is_dir( $file ) ) {\n\t\t\t$this->deleteDir( $file );\n\t\t} else {\n\t\t\t// @codingStandardsIgnoreLine\n\t\t\t@unlink( $file );\n\t\t}\n\t}\n\t// @codingStandardsIgnoreLine\n\t@rmdir( $dir_path );\n}", "title": "" }, { "docid": "d2daec9a7d4a7a79dca8613301f5a696", "score": "0.642352", "text": "public function removefolders(Request $request){\n // return $request['removedir']; \n $dir = $request['removedir']; \n // $dir = 'I:\\\\temp\\\\A'; \n // return $dir; \n // echo 'dddddddddddddddd';\n function folderKiller($dir,$lev=1,$force=0){\n\n if(!file_exists($dir)){ \n // echo $dir.'目录不存在<br>'; //先判断是否存在 \n return '目录不存在'; \n } \n if(!is_dir($dir)){ //再判断是否为文件夹,写两个if(!)比写ifelse 嵌套看起来简洁多了 \n // echo '不是文件夹'; \n return '不是文件夹'; \n } \n $fh=opendir($dir); //来到这里说明已经验证过存在并且是文件夹 \n while(($dirfile = readdir($fh))!==false){ \n $files = $dir . '/' . $dirfile; //以后的判断都是这个而不是$dirfile \n if($dirfile == '.' || $dirfile == '..'){ \n continue; //如果是.和..则略过 \n } \n if(is_file($files)){ //判断是否为文件,是则删除文件\n unlink($files); //unlink删除文件\n echo '删除 ' . str_repeat('-',$lev) . $files . '文件 成功<br>'; \n } \n if(is_dir($files)){ //判断是否为文件夹,是则调用递归 \n folderKiller($files,$lev+1); \n } \n } \n closedir($fh);//删除前 先关闭资源 \n if(@rmdir($dir)){\n echo '删除 ' . str_repeat('--',$lev) . $dir . '目录 成功<br>';\n }\n if($force=1){\n folderKiller($dir); \n } \n };\n folderKiller($dir);\n\n\n }", "title": "" }, { "docid": "f7f381ee521b54b9fe3d919d0a66f05c", "score": "0.64211935", "text": "function deleteFile($id){\n\t\t$file = $this->general_db_model->getById( 'groupfiles', 'id', $id);\n\n\t\tunlink(GROUP_FILES_DIR.'/'.$file->filename) ;\n\t\t\n\t\t$this->general_db_model->delete('groupfiles', 'id = '.$id);\t\t\t\t\n\n\t}", "title": "" }, { "docid": "cee886d6083fbe2f496c300771a5c7a9", "score": "0.64158636", "text": "function delete_file($path = null)\n{\n if (file_exists($path) === true) {\n if (is_dir($path)) {\n echo delet_folder($path);\n } else {\n if (unlink($path)) {\n echo 'File Deleted';\n } else {\n echo 'Opss somethis is wrong!';\n }\n }\n } else {\n echo 'File Not Exists';\n }\n}", "title": "" }, { "docid": "0c56f7863792791890f9f1612e266909", "score": "0.64079946", "text": "private function cleanDirectories()\r\n {\r\n $info = $this->getModuleInfo();\r\n $basePath = base_path() . '/workbench/' . $info['packageName'] . '/';\r\n\r\n $this->files->deleteDirectory($basePath . 'src/controllers');\r\n }", "title": "" }, { "docid": "2b3b1d0a19b24cd4044cf5b23e6be5fe", "score": "0.64071673", "text": "private function __deleteCache() {\n\t\t$iterator = new RecursiveDirectoryIterator(CACHE);\n\t\tforeach (new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file) {\n\t\t\t$path_info = pathinfo($file);\n\t\t\tif ($path_info['dirname']==TMP.\"cache\" && $path_info['basename']!='.svn') {\n\t\t\t\tif (!is_dir($file->getPathname())) {\n\t\t\t\t\tunlink($file->getPathname());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "87ba0023df80d238fe6b4e801a7f9236", "score": "0.64059955", "text": "public function remove($files)\n {\n if (!is_array($files))\n {\n $files = array($files);\n }\n\n $files = array_reverse($files);\n foreach ($files as $file)\n {\n if (is_dir($file) && !is_link($file))\n {\n $this->logSection('dir-', $file);\n\n rmdir($file);\n }\n else\n {\n $this->logSection(is_link($file) ? 'link-' : 'file-', $file);\n\n unlink($file);\n }\n }\n }", "title": "" }, { "docid": "b22a2308d3745c9c50ada5a439bfdd12", "score": "0.63998806", "text": "public function delete()\n {\n return $this->json()->getFilesystem()->deleteDirectory($this->getPath(), true);\n }", "title": "" }, { "docid": "7dba2b2880f0d19a1707afab5d841b19", "score": "0.6399379", "text": "public static function delete($path)\n\t{\n\t\tif (defined('PHP_WINDOWS_VERSION_BUILD')) {\n\t\t\texec('attrib -R ' . escapeshellarg($path) . ' /D');\n\t\t\texec('attrib -R ' . escapeshellarg(\"$path/*\") . ' /D /S');\n\t\t}\n\n\t\tif (is_dir($path)) {\n\t\t\tforeach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $item) {\n\t\t\t\tif ($item->isDir()) {\n\t\t\t\t\trmdir($item);\n\t\t\t\t} else {\n\t\t\t\t\tunlink($item);\n\t\t\t\t}\n\t\t\t}\n\t\t\trmdir($path);\n\n\t\t} elseif (is_file($path)) {\n\t\t\tunlink($path);\n\t\t}\n\t}", "title": "" }, { "docid": "1198f4735319df3ca1e90e98a5a6ff48", "score": "0.6391377", "text": "public static function uninstall()\n {\n $scanFiles = scandir(self::getUploadDir());\n\n foreach ($scanFiles as $scanFile) {\n wp_delete_file($scanFile);\n }\n\n rmdir(self::getUploadDir());\n }", "title": "" }, { "docid": "7a84754f092e131b283f50a37dc78e8d", "score": "0.6386376", "text": "private function __deleteCache()\n {\n $iterator = new RecursiveDirectoryIterator(CACHE);\n foreach(new RecursiveIteratorIterator($iterator, RecursiveIteratorIterator::CHILD_FIRST) as $file)\n {\n $path_info = pathinfo($file);\n \n if($path_info['dirname'] == ROOT . DS . \"tmp\" . DS . \"cache\")\n {\n \t$file_name = $path_info['filename'];\n \t$file_arr = str_split($file_name, 25);\n \t\n if($file_arr[0] == \"UserMgmt_rules_for_group_\")\n {\n \tunlink($file->getPathName());\n }\n }\n }\n }", "title": "" }, { "docid": "a10e195abf50698541b8f5bbfc9e859b", "score": "0.6380328", "text": "final public function deleteTempFiles(): void\n {\n $this->unlinkTempFile($this->tempJUnit);\n $this->unlinkTempFile($this->tempTeamcity);\n $this->unlinkTempFile($this->coverageFileName);\n }", "title": "" }, { "docid": "61fe4d007f7c09cd4c5398da0008a1ab", "score": "0.63779736", "text": "public function __destruct()\n {\n if (!is_string($this->tempDirectory) || !is_dir($this->tempDirectory)) {\n return;\n }\n\n $files = new \\RecursiveIteratorIterator(new \\RecursiveDirectoryIterator($this->tempDirectory, \\FilesystemIterator::SKIP_DOTS), \\RecursiveIteratorIterator::CHILD_FIRST);\n\n foreach ($files as $file) {\n $function = $file->isDir() ? 'rmdir' : 'unlink';\n $function($file->getRealPath());\n }\n\n rmdir($this->tempDirectory);\n }", "title": "" }, { "docid": "fab23c84e4ecb027879283288570b36a", "score": "0.6374879", "text": "public function deleteDirectory($directory)\n {\n // TODO: Implement deleteDirectory() method.\n}", "title": "" }, { "docid": "7a7362e194cdb6c5ebd556eb829cf3d2", "score": "0.6374262", "text": "Protected Function clearDirectories() {\n\t\tForEach($this->importConfiguration->getClearDirectories() As $directory) {\n\t\t\t$directory = PATH_site.$directory;\n\t\t\tIf(strpos($directory, '..') !== FALSE) Throw New Exception (\"Directory $directory contains ..!\");\n\t\t\tIf(substr($directory, -1) != '/') $directory .= '/';\n\n\t\t\t$files = glob($directory.'*');\n\t\t\tForEach($files As $file) $this->recursiveDelete($file);\n\t\t} $this->pushLog(\"Cleared \".count($this->importConfiguration->getClearDirectories()).\" directories.\");\n\t}", "title": "" }, { "docid": "007d83b88fb42e2a34c688a082778355", "score": "0.63596624", "text": "public function destroy(Files $files)\n {\n //\n }", "title": "" }, { "docid": "9cf8788133fd9415103b44e7303e60a5", "score": "0.63543785", "text": "public function ___deleteAll() {\n\t\t$query = $this->database->prepare(\"DELETE FROM \" . self::entriesTable . \" WHERE forms_id=:forms_id\"); \n\t\t$query->bindValue(':forms_id', $this->forms_id, PDO::PARAM_INT); \n\t\t$result = $query->execute();\n\t\twireRmdir($this->getFilesPath(), true); \n\t\treturn $result ? true : false;\n\t}", "title": "" }, { "docid": "62c839fbaf9eaa1d5fe02ea9401935cc", "score": "0.63502085", "text": "public function delete($id)\n {\n $result = with(new Folders)->folderTreeIds($id);\n\n $files = Files::whereIn('folder_id', $result)->get();\n\n if (! empty($files)) {\n foreach ($files as $file) {\n $file->deleteFile();\n }\n }\n\n Folders::destroy($result);\n\n if ($this->request->isAjax()) {\n return $this->json(array('status' => 'success'));\n }\n\n Flash::success(t('media::media.success.folderDel'));\n\n return Redirect::module();\n }", "title": "" }, { "docid": "30e2896ee6e79b4d176bf279319aef20", "score": "0.63483477", "text": "public function actionDelete($id)\n\t{\n\t $dir = Yii::app()->basePath . '/../images/album/fabric/' .$id;\n function recursiveRemoveDirectory($dir)\n {\n foreach(glob(\"{$dir}/*\") as $file)\n {\n if(is_dir($file)) { \n recursiveRemoveDirectory($file);\n } else {\n unlink($file);\n }\n }\n rmdir($dir);\n }\n recursiveRemoveDirectory($dir);\n\t\t$this->loadModel($id)->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}", "title": "" }, { "docid": "76fd250f8c2c47cf1a1428c1f925941e", "score": "0.6344244", "text": "public function delete() {\n $tool = new Tool();\n $tool->deleteFilesDirectory(self::$_MAP_DIRECTORY);\n }", "title": "" }, { "docid": "00decca2d8992869300d9dfcc96977af", "score": "0.6343177", "text": "public function testFoldersRemoveDocumentsInFolder()\n {\n }", "title": "" }, { "docid": "3311dcb8edf830c794cad1fc0feaac01", "score": "0.6342671", "text": "private function removeUploadsDirectory()\n {\n $target = __DIR__.'/../../../../../web/uploads/';\n if (is_dir($target)) {\n $files = glob($target.'*');\n foreach ($files as $file) {\n if (is_file($file)) {\n unlink($file);\n }\n }\n rmdir($target);\n }\n }", "title": "" }, { "docid": "112f64f7a38bfab94de2c296c0cf6054", "score": "0.6339443", "text": "private function deleteEmptyFolders()\n\t{\n\t\t$mediaConfig = $this->getServiceLocator()->get('config')['media'];\n\t\t$saveDir = rtrim($mediaConfig['save_path']);\n\t\t$now = time();\n\n\t\t$iterator = new \\DirectoryIterator($saveDir);\n\n\t\tforeach ($iterator as $fileInfo)\n\t\t{\n\t\t\tif ($fileInfo->isDot()) continue;\n\n\t\t\tif ($fileInfo->isDir() && \\Media\\Model\\DirectoryHelper::isEmpty($fileInfo->getPathname()))\n\t\t\t{\n\t\t\t\tif ($fileInfo->getMTime() + $mediaConfig['time_to_live'] < $now)\n\t\t\t\t{\n\t\t\t\t\t\\Media\\Model\\DirectoryHelper::deleteDirectory($fileInfo->getPathname());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "36db48b7317b737142751c3e54973fc3", "score": "0.6327263", "text": "private function delete( $file ) {\n\t\tif ( ! is_dir( $file ) ) {\n\t\t\t@unlink( $file ); //phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\t$iterator = new RecursiveIteratorIterator(\n\t\t\t\tnew RecursiveDirectoryIterator( $file, FilesystemIterator::SKIP_DOTS ),\n\t\t\t\tRecursiveIteratorIterator::CHILD_FIRST\n\t\t\t);\n\t\t} catch ( UnexpectedValueException $e ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $iterator as $item ) {\n\t\t\tif ( $item->isDir() ) {\n\t\t\t\t@rmdir( $item ); //phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged\n\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t@unlink( $item ); //phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged\n\t\t}\n\n\t\t@rmdir( $file ); //phpcs:ignore WordPress.PHP.NoSilencedErrors.Discouraged\n\t}", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.6322021", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.6322021", "text": "public function delete($path);", "title": "" }, { "docid": "04f83c0f10995bbd8db2a655984ca7a5", "score": "0.6320593", "text": "function delete_folder($folder)\r\n{\r\n\t$handle = opendir($folder);\r\n\r\n\twhile ($file = readdir($handle))\r\n\t{\r\n\t\tif (!(((strlen($file) == 1) && (($file == '.'))) || ((strlen($file) == 2) && (($file == '..')))))\r\n\t\t{\r\n\t\t\tif (is_file($folder.'/'.$file))\r\n\t\t\t{\r\n\t\t\t\tunlink($folder.'/'.$file);\r\n\t\t\t}\r\n\t\t\telseif (is_dir($folder.'/'.$file))\r\n\t\t\t{\r\n\t\t\t\tdelete_folder($folder.'/'.$file);\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\tclosedir($handle);\r\n\r\n\trmdir($folder);\r\n}", "title": "" }, { "docid": "15be818a674ec4efdb3097c3590f4fd5", "score": "0.63195163", "text": "function vikinger_media_group_media_delete($group_id) {\r\n $result = WP_Filesystem();\r\n\r\n if ($result) {\r\n global $wp_filesystem;\r\n\r\n $group_uploads_path = vikinger_get_group_uploads_path($group_id);\r\n\r\n // recursively remove files / directories\r\n $wp_filesystem->delete($group_uploads_path, true);\r\n }\r\n}", "title": "" }, { "docid": "e32e10179252ed5941299118a2f2edea", "score": "0.6316748", "text": "protected function afterDelete()\n {\n $storagePath = Yii::getPathOfAlias('root.frontend.assets.gallery');\n $templateFiles = $storagePath.'/'.$this->template_uid;\n if (file_exists($templateFiles) && is_dir($templateFiles)) {\n FileSystemHelper::deleteDirectoryContents($templateFiles, true, 1);\n }\n\n parent::afterDelete();\n }", "title": "" }, { "docid": "b169ecdb91eaf17b52a0fa1d434f5ded", "score": "0.63144016", "text": "public function deleteOrfans(){\n \n\t\t// get all filenames from db\n\t\t$filesdb = $this->db->col_value(\"file\", DBTABLE_MEDIA);\n \n // set counter of unlinked files\n\t\t$c=0; \n \n // iterate through all the files in the upload dir defined by args (or default)\n\t\t$iterator = new DirectoryIterator($this->mediapath);\n\t\tforeach ($iterator as $fileinfo) {\n\t\t\t\n // if item is a file and its name is not in the array extracted from media table in DB unlink it\n\t\t\tif ($fileinfo->isFile() and !in_array($fileinfo->getFilename(), $filesdb)) {\n\t\t\t\t$c++; // count deleted files\n\t\t\t\tunlink( $this->mediapath.$fileinfo->getFilename() );\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $c;\n\t\t\n\t}", "title": "" }, { "docid": "917d810bf84962e4fe2869a21b2daf47", "score": "0.63101345", "text": "public function removeTempDirectoryAction()\n {\n \t$id=Auth_UserAdapter::getIdentity()->getId();\n \t$dir=REL_IMAGE_PATH.'/albums/temp/user_'.$id.'/';\n \t$result=Helper_common::deleteDir($dir);\n \t$resultArr=array(\"msg\"=>$result);\n \tdie;\n }", "title": "" }, { "docid": "8e93048b5e1bad3d72afa73819d993eb", "score": "0.63002807", "text": "function delete_doc( $dir ) {\n\t\n\t$files = scandir( $dir );\n\t$lastFile = $files[ count( $files ) - 1 ];\n\t\n\tif ( $lastFile === 'subfile.txt' ) {\n\t\tdelete_tree( $dir );\n\t\t\n\t\ttry {\n\t\t\t$dbLogin = db_login();\n\t $db = new PDO( $dbLogin[ 'dsn' ], $dbLogin[ 'user' ], $dbLogin[ 'pass' ] );\n\t\t\t$db->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );\n\t\t\t$sql = \"DELETE FROM projects WHERE directory = :directory_to_delete\";\n\t\t\t$query = $db->prepare( $sql );\n\t\t\t$query->execute( array( ':directory_to_delete'=>$dir ) );\n\t\t} catch ( PDOException $e ) {\n\t\t\tdie( 'Could not connect to the database:<br/>' . $e );\n\t\t}\n\t}\n\t\n\tdie();\n}", "title": "" }, { "docid": "e9ee98b43d240d92aef0f0011a308735", "score": "0.6298093", "text": "public function deleteDirectory($id) {\n $path = 'uploads' . DIRECTORY_SEPARATOR . $id . DIRECTORY_SEPARATOR;\n if(is_dir($path)) {\n //FileHelper::removeDirectory($path,['recursive'=>TRUE]);\n $this->rmdir_recursive($path);\n }\n }", "title": "" }, { "docid": "dcd2e99a7db7db9fa720b0f51bcecb2c", "score": "0.62946343", "text": "function delete_folder_loop($path){\n\n\t/**\n\t* @global $folder_id_array, $folder_array, $file_array, $dir_path - several arrays and strings\n\t*/\n\n\tglobal $folder_id_array, $folder_array, $file_array, $dir_path;\n\n\t$d = opendir($path);\n\t\n\tarray_push($folder_id_array, $d);\n\n\twhile($f = readdir($d)){\n\t\n\t\tif(($f!=\".\")&&($f!=\"..\")){\n\n\t\t\tif(is_dir($path . \"/\" . $f)){\t\t\n\n\t\t\t\tarray_push($folder_array, $path . \"/\" . $f);\t\n\t\t\t\t\n\t\t\t\tdelete_folder_loop($path . \"/\" . $f);\n\n\t\t\t\n\t\t\t}else{\n\t\n\t\t\t\t$string = $path . \"/\" . $f;\n\n\t\t\t\tarray_push($file_array, $string);\n\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t}\n\t\n\t$x = array_pop($folder_id_array);\n\t\n\tclosedir($x);\n\t\n}", "title": "" }, { "docid": "e4ed15b66703f816531ded3bddd08555", "score": "0.6289072", "text": "function delete_img_emty()\n{\n\t// get link\n \t$path_file = FCPATH . 'api/users/avatar/';\n \t// get name images in folder\n \t$files1 = array_slice(scandir('api/users/avatar'),2);\n \t// get link images in database\n \t$datas = $this->Users_Model->get_img_all();\n \t$img_name = [];\n\n \tforeach ($datas as $data) {\n \t\t// get name images in database\n \t\t$img_name[] = str_replace('users/avatar/',\"\", $data->avatar);\n \t}\n\n \tfor($i = 0; $i < count($files1); $i++)\n \t{\n \t\t// check \n \t\tif(!in_array($files1[$i], $img_name))\n \t\t{\n \t\t\t$file = $path_file.$files1[$i];\n \t\t\tif(file_exists($file)) {\n \t\t\t\t// remove images in folder\n\t \t\t\tunlink($file);\n\t \t\t}\n \t\t}\n \t}\n\n}", "title": "" }, { "docid": "faa62c1ea253fdd475175941a936797e", "score": "0.6283536", "text": "static protected function _deleteInternal ($path) {\n Assert::isString($path);\n\n if (file_exists($path) == FALSE) {\n return;\n }\n\n // xxx is_link... File::isLink()\n if (File::exists($path) == TRUE || is_link($path) == TRUE) {\n $lastError = error_get_last();\n\n @unlink($path);\n\n if ($lastError !== error_get_last()) {\n throw new Unauthorised_Access_Exception(\"Access to path '\" . $path . \"' is denied\"); // Handles open_basedir restrictions\n }\n\n return;\n }\n\n $directoryEntries = Dir::getFileSystemEntries($path);\n foreach ($directoryEntries as $directoryEntry) {\n Dir::_deleteInternal($directoryEntry);\n }\n\n $lastError = error_get_last();\n\n @rmdir($path);\n\n if ($lastError !== error_get_last()) {\n throw new Unauthorised_Access_Exception(\"Access to path '\" . $path . \"' is denied\"); // Handles open_basedir restrictions\n }\n\n if (Dir::exists($path) == TRUE) {\n throw new File_System_Exception(\"The directory '\" . $path . \"' cannot be deleted\");\n }\n }", "title": "" }, { "docid": "e6c0c2a5abf9557fecfdbd841b70ec28", "score": "0.6281973", "text": "protected function cleanTempDir()\n {\n foreach ($this->filesToIgnore as $fileToIgnore) {\n $this->fileSystem->unlink($this->rubedoRootDir . '/' . $fileToIgnore);\n }\n\n foreach ($this->dirsToIgnore as $dirToIgnore) {\n $this->fileSystem->removeDirectoryPhp($this->rubedoRootDir . '/' . $dirToIgnore);\n }\n }", "title": "" }, { "docid": "bcea460f56b118ea9e3eab7bc2ddc7fc", "score": "0.628176", "text": "function do_cleanup() {\n \t$curent= date(\"U\");\n \t$yesterday= $curent-86400;\n \t$skindir = WPXLSTOPDFW_PLUGIN_DIR.'/files/';\n \t\n\t\t\t$inside = scandir($skindir);\n \tforeach($inside as $in) {\n \t\tif (is_dir($skindir.$in) && $in != '.' && $in != '..') {\n \t\t\t$modtime = filemtime($skindir.$in);\n \t\t\tif ($modtime < $yesterday) {\n \t\t\t\t$this->rmdirRecurse($skindir.$in);\n \t\t\t}\n \t\t}\n \t}\n }", "title": "" }, { "docid": "e20f3f73508fc1390405c9cc60b0b019", "score": "0.6280525", "text": "function delete()\n {\n OssClient::getClient()->deleteObject(OssClient::$bucket, $this->directoryPath);\n }", "title": "" }, { "docid": "261fec3a9505c2eb9de6ea177ffb81d0", "score": "0.62743515", "text": "function deleteAll($dir) {\n foreach(glob($dir . '/*') as $file) {\n if(is_dir($file))\n deleteAll($file);\n else\n unlink($file);\n }\n rmdir($dir);\n}", "title": "" }, { "docid": "5eddb1403f2eec30d9e74ac09818a07d", "score": "0.6268078", "text": "function delTree($dir) { \r\n $files = array_diff(scandir($dir), array('.','..')); \r\n foreach ($files as $file) { \r\n (is_dir(\"$dir/$file\")) ? delTree(\"$dir/$file\") : unlink(\"$dir/$file\"); \r\n } \r\n return rmdir($dir); \r\n }", "title": "" }, { "docid": "8f883a5e44e45a4f633b550542a46d74", "score": "0.62647676", "text": "private function clean_files_dir()\n\t{\n\t $dir_name = $this->files_dir();\n\t // Create recursive dir iterator which skips dot folders\n\t $it = new RecursiveDirectoryIterator($dir_name, FilesystemIterator::SKIP_DOTS);\n\n\t // Maximum depth is 1 level deeper than the base folder\n\t //$it->setMaxDepth(1);\n\n\t $oldest = time() - GC_TIME;\n\t // Loop and reap\n\t while($it->valid()) {\n\t\tif ($it->isFile() && filemtime($it->key()) < $oldest) {unlink($it->key());}\n\t\t$it->next();\n\t }\n\t}", "title": "" }, { "docid": "ff85bdb5af64edf4d3395ab9a2a8c469", "score": "0.6258245", "text": "function delete_template($path){\n\n\tglobal $dir_path, $new_path, $temp_dir_path, $temp_new_path;\n\n\t$dir_path = $path;\n\t\n\t/*\n\t* find the files to delete\n\t*/\n\n\tdelete_folder_loop($dir_path);\n\t\n\t/*\n\t* remove the files\n\t*/\n\n\tclean_up_files();\n\n\t/*\n\t* delete the directory for this template\n\t*/\n\n\trmdir($path);\n\n}", "title": "" } ]
29bf3cf80579775e0be27369578d622f
Paginate given data source into a simple paginator.
[ { "docid": "d2d6043085e23edecbf6cd586f2e9579", "score": "0.6133646", "text": "public function simplePaginate(object $source, $params): object\n {\n $this->fill($params);\n\n $paginator = $source->simplePaginate($this->perPage, $this->extractSourceColumns($source), $this->getPageFullKeyword(), $this->page);\n\n if ($this->appends) {\n $paginator->appends($params);\n }\n\n return $paginator;\n }", "title": "" } ]
[ { "docid": "3ccc3e2dcd09e2a49eab65599ddd4823", "score": "0.69030225", "text": "public function paginate();", "title": "" }, { "docid": "2597449af7f6d5fd633759f6116b8ac8", "score": "0.65476143", "text": "public function getPaginatorAdapter();", "title": "" }, { "docid": "bda5c9fdc68b81aaba9ab8dabc16957a", "score": "0.6498963", "text": "public static function getPaginator(){}", "title": "" }, { "docid": "c7f9efafeb7f5a2008b31abf94d97e16", "score": "0.6395457", "text": "public function paginate($target, $page, $limit);", "title": "" }, { "docid": "16c0cce1f2b2921756e9c8acdf4fd336", "score": "0.63753283", "text": "public function getPaginate();", "title": "" }, { "docid": "1dc58f0790b9b54d2d29f0e22abbc853", "score": "0.6346478", "text": "function paginate($dbh, $sql, $spec = array(), $page_no = 1, $order_by = '', $pager_total = null) {\n if ( $dbh instanceof Zend_Db_Adapter_Pdo_Abstract ) { $dbh = $dbh->getConnection(); }\n\n /// Default Specs\n $default_spec = array( 'per_page' => 30,\n 'show_nearby_pages' => 0,\n 'first_and_last_in_page_list' => true,\n 'auto_fix_out_of_range' => true,\n 'pdo_fetch_mode' => PDO::FETCH_BOTH,\n 'bad_params' => array('_pjax'),\n 'bad_params' => array('_pjax'),\n );\n $spec = array_merge( $default_spec, $spec );\n\n $pager = array();\n\n /// Run the query with COUNT(*)\n if ( ! is_null($pager_total) && is_numeric($pager_total) ) {\n $pager['total'] = $pager_total;\n }\n else {\n $total_sql = \"SELECT COUNT(*) FROM ( $sql ) s\";\n $sth = $dbh->query($total_sql);\n if ( $sth === false ) { return trigger_error(\"paginate() error: Bad SQL Query: [$sql]\", E_USER_ERROR); }\n list( $pager['total'] ) = $sth->fetch(PDO::FETCH_NUM);\n if ( ! is_numeric( $pager['total'] ) ) { return trigger_error(\"paginate() error: Bad SQL Query, non-numeric total ( \". $pager['total'] .\" ): [$total_sql]\", E_USER_ERROR); }\n }\n\n\t/// Page num calc\n\t$pager['last_page'] = $pager['total'] == 0 ? 1 : ( (int) (($pager['total'] - 1) / $spec['per_page']) ) + 1;\n\tif ( $spec['auto_fix_out_of_range'] ) {\n\t if ( ! is_numeric( $page_no ) || $page_no < 1 ) { $page_no = 1; }\n\t else if ( $page_no > $pager['last_page'] ) { $page_no = $pager['last_page']; }\n\t}\n\t$limit_start = ($page_no - 1) * $spec['per_page'];\n\t\n\t/// Run the actual query...\n\t$data_sql = \"SELECT * FROM ( $sql ) s \". $order_by .\" LIMIT $limit_start, \". (int) $spec['per_page'];\n\t$sth = $dbh->query($data_sql);\n\tif ( $sth === false ) { return trigger_error(\"paginate() error: Bad SQL Query: [$sql]\"); }\n\t$data = $sth->fetchAll($spec['pdo_fetch_mode']);\n\tif ( ! is_array( $data ) ) { return trigger_error(\"paginate() error: Bad SQL Query (error getting data): [$data_sql]\", E_USER_ERROR); }\n\n\treturn PaginateHelper::__prepareResultsArray($data, $pager, $spec, $page_no);\n}", "title": "" }, { "docid": "49529d4bcb41bab7b49822a61874acbd", "score": "0.633124", "text": "public static function setPaginator($paginator){}", "title": "" }, { "docid": "646340db53dc1f07e0a63ae55bac1fec", "score": "0.63143456", "text": "public static function setupPaginationContext(){}", "title": "" }, { "docid": "a4b016a1ccfcee993c17338f9a843255", "score": "0.62956965", "text": "protected function pager() {\n $current_page = $this->page;\n $per_page = $this->per_page;\n\n if (!$current_page) return;\n if (!$per_page) return;\n\n $first_record = $current_page * $per_page;\n $next = $current_page + 1;\n $prev = $current_page - 1;\n $total = $this->query->countQuery()->execute()->fetchField();\n\n $last = $total % $per_page;\n\n $url = (isset($_SERVER['HTTPS']) ? \"https:\" : \"http:\") . '//' . $_SERVER[\"HTTP_HOST\"].strtok($_SERVER[\"REQUEST_URI\"],'?');\n\n drupal_add_http_header('X-Total-Count', $total, TRUE);\n\n if ($next < $last) {\n drupal_add_http_header('LINK', \"<{$url}?page={$next}&per_page={$per_page}>; rel=\\\"next\\\"\", TRUE);\n }\n\n drupal_add_http_header('LINK', \"<{$url}?page={$last}&per_page={$per_page}>; rel=\\\"last\\\"\", TRUE);\n drupal_add_http_header('LINK', \"<{$url}?page=1&per_page={$per_page}>; rel=\\\"first\\\"\", TRUE);\n\n if ($prev > 0) {\n drupal_add_http_header('LINK', \"<{$url}?page={$prev}&per_page={$per_page}>; rel=\\\"prev\\\"\", TRUE);\n }\n\n if ($per_page > $total) {\n $this->query->range(0, $total);\n }\n else {\n $this->query->range($first_record, $per_page);\n }\n }", "title": "" }, { "docid": "18dab07bd810bb816818dd9e6bf6fece", "score": "0.6232976", "text": "public function paginate($number);", "title": "" }, { "docid": "40df14df9412e4585599e1e8815a6aa1", "score": "0.6207805", "text": "protected function pagerQuery() {}", "title": "" }, { "docid": "ce13a5e1ba5af534a6f1000c5ceea7c8", "score": "0.6204141", "text": "public function paginator($table, array $where = array(), $nRecords = 20, array $order = array()) { }", "title": "" }, { "docid": "ab06613ea0b8cae48582fce192e94885", "score": "0.61674505", "text": "public function paginate($paginate = 10);", "title": "" }, { "docid": "e01e10e929ebf53056b2e06559a9fe2a", "score": "0.6147879", "text": "public function my(int $perPage): LengthAwarePaginator;", "title": "" }, { "docid": "e2f0e186498b925dca3610f15027052f", "score": "0.6123986", "text": "public function paginateFilters();", "title": "" }, { "docid": "6634d002de5ab2bf6e62b3e759d52085", "score": "0.6110875", "text": "public function _paginate(array $data, $page, $limit)\n {\n $page = (int) $page;\n $limit = (int) $limit;\n //instanciate adapter and paginator \n $adapter = new \\Zend\\Paginator\\Adapter\\ArrayAdapter($data);\n $paginator = new \\Zend\\Paginator\\Paginator($adapter);\n //set pagination values\n $paginator->setCurrentPageNumber($page);\n $paginator->setItemCountPerPage($limit);\n \n return $paginator;\n }", "title": "" }, { "docid": "6730d52d5c3cc816eb7ebc9b1089f518", "score": "0.60823", "text": "public function paginate(Builder $request, int $limit = 10, int $offset = 0): PaginatedResults;", "title": "" }, { "docid": "e1bbd889dcb196d7ac9f984c70690834", "score": "0.60755956", "text": "public function makePagination($params)\n {\n \n }", "title": "" }, { "docid": "05028f2395d4ed6e4943086f93580f13", "score": "0.6072713", "text": "public function paginate(object $source, $params): object\n {\n $this->fill($params);\n\n $paginator = $source->paginate($this->perPage, $this->extractSourceColumns($source), $this->getPageFullKeyword(), $this->page);\n\n if ($this->appends) {\n $paginator->appends($params);\n }\n\n return $paginator;\n }", "title": "" }, { "docid": "a0f5ab7d234975bd42b7e7a7426bbb5d", "score": "0.6060873", "text": "final protected function paging()\n\t{\n\t\t$this->model = $this->model\n\t\t\t\t\t\t\t->take($this->request->input('limit', 100))\n\t\t\t\t\t\t\t->offset($this->request->input('offset', 0));\n\t}", "title": "" }, { "docid": "9d0fa1333112140b565b2f9eddf0f9be", "score": "0.6050827", "text": "function paginate() {\r\n\t\t$all_rs = @mysql_query($this->sql);\r\n\t\t$this->total_rows = mysql_num_rows($all_rs);\r\n\t\t@mysql_close($all_rs);\r\n\t\t\r\n\t\t$this->max_pages = ceil($this->total_rows/$this->rows_per_page);\r\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\r\n\t\tif($this->page > $this->max_pages || $this->page <= 0) {\r\n\t\t\t$this->page = 1;\r\n\t\t}\r\n\t\t\r\n\t\t//Calculate Offset\r\n\t\t$this->offset = $this->rows_per_page * ($this->page-1);\r\n\t\t\r\n\t\t//Fetch the required result set\r\n\t\t$rs = @mysql_query($this->sql.\" LIMIT {$this->offset}, {$this->rows_per_page}\");\r\n\t\tif(!$rs) {\r\n\t\t\tif($this->debug) echo \"Pagination query failed. Check your query.<br />\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn $rs;\r\n\t}", "title": "" }, { "docid": "9e56edf82e7d470d46ce428d8518b133", "score": "0.6026071", "text": "function Pager_Wrapper_SPDO($query, $pager_options = array())\n{ \n $db = SPDO::getSPDO();\n\n if (!array_key_exists('totalItems', $pager_options)) { // comptage du nombre d'items\n // count via fonction php sur le fetch du resultat sql\n $req = $db->prepare($query, array(PDO::ATTR_CURSOR, PDO::CURSOR_SCROLL));\n $req->execute();\n $res = $req->fetchall();\n $req->closeCursor();\n $totalItems = (int) count($res);\n $pager_options['totalItems'] = $totalItems;\n }\n\n require_once 'incl/Pear/Pager-2.4.9/Pager.php';\n $pager = Pager::factory($pager_options);\n\n $page = array();\n $page['totalItems'] = $pager_options['totalItems'];\n $page['links'] = $pager->links;\n $page['page_numbers'] = array(\n 'current' => $pager->getCurrentPageID(),\n 'total' => $pager->numPages()\n );\n\n list($page['from'], $page['to']) = $pager->getOffsetByPageId();\n\n $i = $page['from']-1;\n $res2 = array();\n while ($i < $page['from']-1+ min($pager_options['perPage'], $page['totalItems'])){\n if(isset($res[$i]) && !is_null($res[$i])){array_push($res2, $res[$i]);}\n $i++;\n }\n $page['data'] = $res2;\n return $page;\n}", "title": "" }, { "docid": "3b4a3516fe3d47ad3c8f694f9b682b84", "score": "0.60162544", "text": "public function paginate() {\r\n\r\n $this->set_page_vars();\r\n $this->set_querystring();\r\n\r\n $prev_page = $this->current_page - 1;\r\n $next_page = $this->current_page + 1;\r\n\r\n // Page %s of %s\r\n $this->return = '<span class=\"paginate\">' . sprintf(OSF_PAGINATOR_PAGE_OF, $this->current_page, $this->num_pages) . '</span> - ';\r\n\r\n\r\n if ($this->items_total > $this->items_per_page) {\r\n\r\n $this->return .= ($this->current_page != 1 && $this->items_total >= $this->items_per_page) ? '<a class=\"paginate\" rel=\"nofollow\" href=\"' . FaqFuncs::format_url($this->parent_page, $this->querystring.'pg='.$prev_page, 'SSL') . '\">'.OSF_PAGINATOR_PREVIOUS.'</a> ' : '<span class=\"inactive\">'.OSF_PAGINATOR_PREVIOUS.'</span> ';\r\n\r\n $this->start_range = intval($this->current_page - floor($this->mid_range / 2));\r\n $this->end_range = intval($this->current_page + floor($this->mid_range / 2));\r\n\r\n if ($this->start_range <= 0) {\r\n $this->end_range += abs($this->start_range) + 1;\r\n $this->start_range = 1;\r\n }\r\n if ($this->end_range > $this->num_pages) {\r\n $this->start_range -= $this->end_range - $this->num_pages;\r\n $this->end_range = $this->num_pages;\r\n }\r\n $this->range = range($this->start_range, $this->end_range);\r\n\r\n for ($i = 1; $i <= $this->num_pages; $i++) {\r\n if ($this->range[0] > 2 && $i == $this->range[0])\r\n $this->return .= \" ... \";\r\n // loop through all pages. if first, last, or in range, display them\r\n if ($i == 1 || $i == $this->num_pages || in_array($i, $this->range)) {\r\n $this->return .= ( ($i == $this->current_page) && ($_GET['i'] != OSF_PAGINATOR_ALL) ) ? '<a class=\"current\" rel=\"nofollow\" title=\"'.OSF_PAGINATOR_CURRENT.'\" href=\"#\">'.$i.'</a> ' : '<a class=\"paginate\" title=\"'.sprintf(OSF_PAGINATOR_GOTO, $i, $this->num_pages).'\" href=\"'.FaqFuncs::format_url($this->parent_page, $this->querystring.'pg='.$i, 'SSL').'\">'.$i.'</a> ';\r\n }\r\n if ($this->range[$this->mid_range - 1] < $this->num_pages - 1 && $i == $this->range[$this->mid_range - 1])\r\n $this->return .= \" ... \";\r\n }\r\n $this->return .= (($this->current_page != $this->num_pages && $this->items_total >= $this->items_per_page) && ($_GET['i'] != OSF_PAGINATOR_ALL)) ? '<a class=\"paginate\" rel=\"nofollow\" href=\"'.FaqFuncs::format_url($this->parent_page, $this->querystring.'pg='.$next_page, 'SSL').'\">'.OSF_PAGINATOR_NEXT.'</a>' : '<span class=\"inactive\">'.OSF_PAGINATOR_NEXT.'</span>';\r\n $this->return .= ($_GET['i'] == OSF_PAGINATOR_ALL) ? '<a class=\"current\" rel=\"nofollow\" title=\"'.OSF_PAGINATOR_CURRENT.'\" href=\"#\" style=\"margin-left:10px\">'.OSF_PAGINATOR_ALL.'</a> ' : '<a class=\"paginate\" rel=\"nofollow\" style=\"margin-left:10px\" href=\"'.FaqFuncs::format_url($this->parent_page, $this->querystring.'pg=1&ipp='.OSF_PAGINATOR_ALL, 'SSL').'\">'.OSF_PAGINATOR_ALL.'</a> ';\r\n }\r\n $this->low = ($this->current_page - 1) * $this->items_per_page;\r\n $this->high = ($_GET['i'] == OSF_PAGINATOR_ALL) ? $this->items_total : $this->items_per_page;\r\n $this->limit = ($_GET['i'] == OSF_PAGINATOR_ALL) ? '' : ' LIMIT '.$this->low.','.$this->high;\r\n }", "title": "" }, { "docid": "dd5f469b663eb5af239ea37fd6163c71", "score": "0.59959126", "text": "public function findAllWithPagination(): LengthAwarePaginator;", "title": "" }, { "docid": "a7fdd546cba00ab5374a687508d7b83c", "score": "0.5984592", "text": "function print_paginator($current_page, $num_rows, $request_args, $rows_per_page = 50, $window = 5, $skippager='0') {\n\t$num_pages = ceil($num_rows / $rows_per_page);\n\t$request_args = '?'.$request_args;\n\n\tif ($num_pages == 1) return;\n\tif ($num_rows) {\n\t\techo '<div><a href=\"'.$_SERVER['PHP_SELF'].'#skippager'.$skippager.'\" class=\"hide_focus\">'._AT('skip_pager').'</a></div>';\n\t\techo '<div class=\"paging\">';\n\t echo '<ul>';\n\t\t\n\t\t$i=max($current_page-$window - max($window-$num_pages+$current_page,0), 1);\n\n\t if ($current_page > 1)\n\t\t\techo '<li><a href=\"'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.($current_page-1).'\">'._AT('prev').'</a>&nbsp;&nbsp;&nbsp;</li>';\n \n\t\tif ($i > 1) {\n\t\t\techo '<li><a href=\"'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p=1\">1</a></li>';\n\t\t\tif ($i > 2) {\n\t\t echo '<li>&hellip;</li>';\n\t\t\t}\n\t\t}\n\n\t\tfor ($i; $i<= min($current_page+$window -min($current_page-$window,0),$num_pages); $i++) {\n\t\t\tif ($current_page == $i) {\n\t\t\t\techo '<li><a href=\"'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.$i.'\" class=\"current\"><em>'.$current_page.'</em></a></li>';\n\t\t\t} else {\n\t\t\t\techo '<li><a href=\"'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.$i.'\">'.$i.'</a></li>';\n\t\t\t}\n\t\t}\n if ($i <= $num_pages) {\n\t\t\tif ($i < $num_pages) {\n\t\t echo '<li>&hellip;</li>';\n\t }\n\t\t\techo '<li><a href=\"'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.$num_pages.'\">'.$num_pages.'</a></li>';\n\t\t}\n\t\t\n\t\tif ($current_page < $num_pages)\n\t\t\techo '<li>&nbsp;&nbsp;&nbsp;<a href=\"'.$_SERVER['PHP_SELF'].$request_args.htmlspecialchars(SEP).'p='.($current_page+1).'\">'._AT('next').'</a></li>';\n\t\t\n\t\techo '</ul>';\n\t\techo '</div><a name=\"skippager'.$skippager.'\"></a>';\n\t}\n}", "title": "" }, { "docid": "77892fa2cb5b0dedb743c8b99836cadf", "score": "0.59525895", "text": "public function paginate($params) {\n\t\t$page_length = gv($params, 'page_length', config('config.page_length'));\n\n\t\treturn $this->getData($params)->paginate($page_length);\n\t}", "title": "" }, { "docid": "77892fa2cb5b0dedb743c8b99836cadf", "score": "0.59525895", "text": "public function paginate($params) {\n\t\t$page_length = gv($params, 'page_length', config('config.page_length'));\n\n\t\treturn $this->getData($params)->paginate($page_length);\n\t}", "title": "" }, { "docid": "37e6df2ca7823fc7ae6bc9bfa3665774", "score": "0.59296834", "text": "public function paginateAll($page, $perpage);", "title": "" }, { "docid": "e0dd8ca0cfe5b56e2999f75e1209bc44", "score": "0.59169257", "text": "private function paginate() {\n\n\t\t// check if we have set a request for the items per page\n if ((isset($_REQUEST['ipp'])) and ($_REQUEST['ipp'] == 'ALL')) {\n $this->num_pages = ceil($this->items_total/intval($this->default_ipp));\n $this->items_per_page = intval($this->default_ipp);\n } else {\n if(!is_numeric($this->items_per_page) OR $this->items_per_page <= 0) $this->items_per_page = intval($this->default_ipp);\n $this->num_pages = ceil($this->items_total/$this->items_per_page);\n\n }\n\n\t\t// check the requested page number (make sure it's numeric and greater than 0\n\t\t// if not, ok zero will be fine for now, we are viewing last page (or first, depending on your order)\n\t\tif ((isset($_REQUEST['coms_page'])) and ($_REQUEST['coms_page'] > 0))\n\t\t\t$this->current_page = (int)$_REQUEST['coms_page']; // must be numeric > 0\n\t\telse\n\t\t\t$this->current_page = 0;\n\n\t\t// check your order, and set current page according\n\t\tif($this->current_page < 1 OR !is_numeric($this->current_page))\n\t\t\tif ($this->display_order == \"ASC\")\n\t\t\t\t$this->current_page = $this->num_pages;\n\t\t\telse\n\t\t\t\t$this->current_page = 1;\n\n // make sure current page is not bigger than the total number of pages\n\t\tif($this->current_page > $this->num_pages) $this->current_page = $this->num_pages;\n\n\t\t// set previous page\n\t\t$prev_page = $this->current_page-1;\n\t\t// set next page\n $next_page = $this->current_page+1;\n\n\t\t// if number of pages is bigger than ten (10) we need to prepare the output having in mind a mid range factor.\n\t\t// you know, that thing like [1] ... [9] [10] [11 SELECTED] [12] [13] ... [+999]\n if($this->num_pages > 10) {\n\t\t\t$new_params[\"coms_page\"] = $prev_page;\n\t\t\t$new_params[\"ipp\"] \t= $this->items_per_page;\n\t\t\t$URL = $this->addUrlParams($new_params);\n $this->return = ($this->current_page != 1 And $this->items_total >= 10) ? \"<a class=\\\"paginate\\\" href=\\\"$URL\\\">« \".$this->__L(\"PREPAGE\").\"</a> \":\"<span class=\\\"inactive\\\" href=\\\"#\\\">« \".$this->__L(\"PREPAGE\").\"</span> \";\n\n $this->start_range = $this->current_page - floor($this->mid_range/2);\n $this->end_range = $this->current_page + floor($this->mid_range/2);\n\n if($this->start_range <= 0) {\n $this->end_range += abs($this->start_range)+1;\n $this->start_range = 1;\n }\n\n if($this->end_range > $this->num_pages) {\n $this->start_range -= $this->end_range-$this->num_pages;\n $this->end_range = $this->num_pages;\n }\n\n $this->range = range($this->start_range,$this->end_range);\n\n for($i=1;$i<=$this->num_pages;$i++) {\n if($this->range[0] > 2 And $i == $this->range[0]) $this->return .= \" <span>...</span> \";\n\n\t\t\t\t// loop through all pages. if first, last, or in range, display\n if($i==1 Or $i==$this->num_pages Or in_array($i,$this->range)) {\n\t\t\t\t\t$new_params[\"coms_page\"] = $i;\n\t\t\t\t\t$new_params[\"ipp\"] \t= $this->items_per_page;\n\t\t\t\t\t$URL = $this->addUrlParams($new_params);\n $this->return .= ($i == $this->current_page And @$_REQUEST['coms_page'] != 'ALL') ? \"<a title=\\\"\".$this->__L(\"GOTOPAGE\").\" $i \".$this->__L(\"OF\").\" $this->num_pages\\\" class=\\\"current\\\" href=\\\"#\\\">$i</a> \":\"<a class=\\\"paginate\\\" title=\\\"\".$this->__L(\"GOTOPAGE\").\" $i \".$this->__L(\"OF\").\" $this->num_pages\\\" href=\\\"$URL\\\">$i</a> \";\n }\n if($this->range[$this->mid_range-1] < $this->num_pages-1 And $i == $this->range[$this->mid_range-1]) $this->return .= \" <span>...</span> \";\n }\n\n\t\t\t$new_params[\"coms_page\"] = $next_page;\n\t\t\t$new_params[\"ipp\"] \t= $this->items_per_page;\n\t\t\t$URL = $this->addUrlParams($new_params);\n\t\t\t$this->return .= (($this->current_page != $this->num_pages And $this->items_total >= 10) And ($_REQUEST['coms_page'] != 'ALL')) ? \"<a class=\\\"paginate\\\" href=\\\"$URL\\\">\".$this->__L(\"NEXTPAGE\").\" »</a>\\n\":\"<span class=\\\"inactive\\\" href=\\\"#\\\">» \".$this->__L(\"NEXTPAGE\").\"</span>\\n\";\n\n\t\t\t$new_params[\"coms_page\"] = \"1\";\n\t\t\t$new_params[\"ipp\"] \t= \"ALL\";\n\t\t\t$URL = $this->addUrlParams($new_params);\n $this->return .= (@$_REQUEST['coms_page'] == 'ALL') ? \"<a class=\\\"current\\\" style=\\\"margin-left:10px\\\" href=\\\"#\\\">\".$this->__L(\"ALLPAGES\").\"</a> \\n\":\"<a class=\\\"paginate\\\" style=\\\"margin-left:10px\\\" href=\\\"$URL\\\">\".$this->__L(\"ALLPAGES\").\"</a> \\n\";\n\n\t\t// we have less than 10 pages, set normal output\n } else {\n for($i=1;$i<=$this->num_pages;$i++) {\n\t\t\t\t$new_params[\"coms_page\"] = $i;\n\t\t\t\t$new_params[\"ipp\"] \t= $this->items_per_page;\n\t\t\t\t$URL = $this->addUrlParams($new_params);\n\t\t\t\tif (isset($_REQUEST[\"ipp\"]))\n\t\t\t\t\t$this->return .= (($i == $this->current_page) AND ($_REQUEST['ipp'] != 'ALL')) ? \"<a class=\\\"current\\\" href=\\\"#\\\">$i</a> \":\"<a class=\\\"paginate\\\" href=\\\"$URL\\\">$i</a> \";\n\t\t\t\telse\n\t\t\t\t\t$this->return .= ($i == $this->current_page) ? \"<a class=\\\"current\\\" href=\\\"#\\\">$i</a> \":\"<a class=\\\"paginate\\\" href=\\\"$URL\\\">$i</a> \";\n }\n\n\t\t\t$new_params[\"coms_page\"] = \"1\";\n\t\t\t$new_params[\"ipp\"] \t= \"ALL\";\n\t\t\t$URL = $this->addUrlParams($new_params);\n\t\t\t$this->return .= ((isset($_REQUEST['ipp'])) and ($_REQUEST['ipp'] == 'ALL')) ? \"<a class=\\\"current paginate allpages\\\" href=\\\"$URL\\\">\".$this->__L(\"ALLPAGES\").\"</a> \":\"<a class=\\\"paginate allpages\\\" href=\\\"$URL\\\">\".$this->__L(\"ALLPAGES\").\"</a> \";\n }\n $this->low \t\t= ($this->current_page-1) * $this->items_per_page;\n $this->high \t= ((isset($_REQUEST['ipp'])) and ($_REQUEST['ipp'] == 'ALL')) ? $this->items_total:($this->current_page * $this->items_per_page)-1;\n $this->limit \t= ((isset($_REQUEST['ipp'])) and ($_REQUEST['ipp'] == 'ALL')) ? \"\":\" LIMIT $this->low,$this->items_per_page\";\n }", "title": "" }, { "docid": "4d888a2285be5c0cff061d3b8a03dd81", "score": "0.59158325", "text": "protected function applyPagination() {\n if (!$this->pageRows) {\n return;\n }\n\n $this->countRows = $this->countTotalRows();\n\n $this->pages = ceil($this->countRows / $this->pageRows);\n\n if ($this->page > $this->pages) {\n $this->page = 1;\n }\n\n $offset = ($this->page - 1) * $this->pageRows;\n\n $this->query->setLimit($this->pageRows, $offset);\n }", "title": "" }, { "docid": "dd540e44983fc18898ce9f86e78d46cf", "score": "0.5894372", "text": "function paginate($criteria = [], array $paging = []);", "title": "" }, { "docid": "e69138a4d5e1f5f57cf24aee9b41f860", "score": "0.5890243", "text": "public function cursorPaginate(object $source, $params): object\n {\n $this->fill($params);\n\n $paginator = $source->cursorPaginate($this->perPage, $this->extractSourceColumns($source), $this->getCursorFullKeyword(), $this->cursor);\n\n if ($this->appends) {\n $paginator->appends($params);\n }\n\n return $paginator;\n }", "title": "" }, { "docid": "7a9842230c0c8153a06505d4ba3938cd", "score": "0.58854055", "text": "function getPageRows()\n {\n $this->getRowCount();\n $this->preferred_rows=($this->preferred_rows)?$this->preferred_rows:$this->no_of_rows;\n $this->no_of_pages=ceil($this->no_of_rows / $this->preferred_rows);\n\n\t\t$this->page_no = ($this->page_no > $this->no_of_pages)?$this->no_of_pages:(($this->page_no==\"\" || $this->page_no<1)?1:$this->page_no);\n $this->data=array_slice($this->data,($this->page_no-1)*$this->preferred_rows,$this->preferred_rows);\n }", "title": "" }, { "docid": "8f2c3e8e94f2a1bb74c4cd841dd28d40", "score": "0.5880577", "text": "private function paginateAndPrepareFields(Collection $data, int $paginate)\n {\n $path = $this->request->path();\n if ($paginate < 1) $paginate = 10;\n $page = (int)$this->request->get('page', 1);\n if ($page < 1) $page = 1;\n\n $count = $data->count();\n $result = (new LengthAwarePaginator($data, $count, $paginate, $page))->toArray();\n $result['data'] = array_slice($result['data'], ($paginate * ($page - 1)), $paginate);\n\n // prepare result fields\n foreach ($result['data'] as $key => $item) {\n if ($item['type'] == 'dialog') {\n $item = $this->prepareDialogFields($item);\n if (empty($item)) {\n unset($result['data'][$key]);\n } else {\n $result['data'][$key] = $item;\n }\n continue;\n }\n if ($item['type'] == 'group') {\n $result['data'][$key] = $this->prepareGroupFields($item);\n }\n };\n\n // paginate urls\n $result['path'] = $this->request->url();\n $searchUrlParam = $this->request->has('search') ? '&search=' . $this->request->get('search') : '';\n if (!empty($result['next_page_url'])) {\n $result['next_page_url'] = url($path\n . substr($result['next_page_url'], 1)\n . $searchUrlParam);\n }\n if (!empty($result['prev_page_url'])) {\n $result['prev_page_url'] = url($path\n . substr($result['prev_page_url'], 1)\n . $searchUrlParam);\n }\n\n return $result;\n }", "title": "" }, { "docid": "9d1e4708f2d9b6c085539c5aa2cbd7d7", "score": "0.58770305", "text": "public function getPages(Paginator $paginator, $pageRange = null);", "title": "" }, { "docid": "d809eaf24c7f55b86f69adbf41ced62f", "score": "0.58739555", "text": "public function ajax_pager()\n {\n global $g_comp_database_system;\n\n $l_row = isys_report_dao::instance($g_comp_database_system)\n ->get_report($_GET['report_id']);\n\n $l_query = stripslashes($l_row[\"isys_report__query\"]);\n\n // First we modify the SQL to find out, with how many rows we are dealing...\n $l_preloadable_rows = isys_glob_get_pagelimit() * ((int)isys_usersettings::get('gui.lists.preload-pages', 30));\n $l_offset = $l_preloadable_rows * $_POST['offset_block'];\n\n if (strpos($l_query, 'LIMIT')) {\n return [];\n }\n\n $l_query = rtrim($l_query, ';') . ' LIMIT ' . $l_offset . ', ' . $l_preloadable_rows . ';';\n\n return isys_module_report::get_instance()\n ->process_show_report($l_query, null, true);\n }", "title": "" }, { "docid": "1adce6b9e860553d5f9f7a21b55239ca", "score": "0.58504194", "text": "public function select_paged($model, $start, $size) \r\n\t{\r\n\t\t$query = $this->create_query_select($model) . \" LIMIT \" . $start . \",\" . $size;\r\n\t\treturn $this->db->fetch_array($query);\r\n\t}", "title": "" }, { "docid": "90b6d27101ec2071a7775c74ddff8bab", "score": "0.5849352", "text": "private function configurePagination()\n {\n Paginator::defaultView('pagination::default');\n }", "title": "" }, { "docid": "93c0ce50f966c834d79987fb9d4835ae", "score": "0.58492", "text": "public function findAllPaging($start, Query $query);", "title": "" }, { "docid": "98cd80f2df1372a6cca6609f73f49d80", "score": "0.5841818", "text": "function paginate($total = 1) {\t\t\n\t\t// pagination\n\t\tif($total>$this->max_records){\n\t\t// Build the recordset paging links\n\t\t$num_pages = ceil($total / $this->max_records);\n\t\t$nav = '';\n\t\t\n\t\t// Can we have a link to the previous page?\n\t\tif($this->page > 1)\n\t\t$nav .= '<a href=\"'.$_SERVER['PHP_SELF'].'?page=' . ($this->page-1) . '\">&lt;&lt; Prev</a> |';\n\t\t\n\t\tfor($i = 1; $i < $num_pages+1; $i++)\n\t\t{\n\t\tif($this->page == $i)\n\t\t{\n\t\t // Bold the page and dont make it a link\n\t\t $nav .= ' <strong>'.$i.'</strong> |';\n\t\t}\n\t\telse\n\t\t{\n\t\t // Link the page\n\t\t $nav .= ' <a href=\"'.$_SERVER['PHP_SELF'].'?page='.$i.'\">'.$i.'</a> |';\n\t\t}\n\t\t}\n\t\t\n\t\t// Can we have a link to the next page?\n\t\tif($this->page < $num_pages)\n\t\t$nav .= ' <a href=\"'.$_SERVER['PHP_SELF'].'?page=' . ($this->page+1) . '\">Next &gt;&gt;</a>';\n\t\t\n\t\t// Strip the trailing pipe if there is one\n\t\t$nav = ereg_replace('@|$@', \"\", $nav);\n\t\techo $nav;\n\t\t}\n\t}", "title": "" }, { "docid": "54ab33fdb094103416279fb52e75c6a0", "score": "0.580184", "text": "public function paginate()\n {\n if ($this->getGrid()->gridNeedsSimplePagination()) {\n\n return $this->simplePaginate();\n }\n $pageSize = $this->getGrid()->getGridPaginationPageSize();\n\n return $this->getQuery()->paginate($pageSize);\n }", "title": "" }, { "docid": "17505979f287f1bf13adf3c6ecddef1d", "score": "0.58007634", "text": "public function paginate(): QueryPagerResultIterator\n {\n return new QueryPagerResultIterator($this->select);\n }", "title": "" }, { "docid": "45c54bb5ef38e1f65894c51d38b0fae0", "score": "0.5785959", "text": "public function paginate($params)\n {\n $page_length = gv($params, 'page_length', config('config.page_length'));\n\n return $this->getData($params)->paginate($page_length);\n }", "title": "" }, { "docid": "45c54bb5ef38e1f65894c51d38b0fae0", "score": "0.5785959", "text": "public function paginate($params)\n {\n $page_length = gv($params, 'page_length', config('config.page_length'));\n\n return $this->getData($params)->paginate($page_length);\n }", "title": "" }, { "docid": "45c54bb5ef38e1f65894c51d38b0fae0", "score": "0.5785959", "text": "public function paginate($params)\n {\n $page_length = gv($params, 'page_length', config('config.page_length'));\n\n return $this->getData($params)->paginate($page_length);\n }", "title": "" }, { "docid": "45c54bb5ef38e1f65894c51d38b0fae0", "score": "0.5785959", "text": "public function paginate($params)\n {\n $page_length = gv($params, 'page_length', config('config.page_length'));\n\n return $this->getData($params)->paginate($page_length);\n }", "title": "" }, { "docid": "45c54bb5ef38e1f65894c51d38b0fae0", "score": "0.5785959", "text": "public function paginate($params)\n {\n $page_length = gv($params, 'page_length', config('config.page_length'));\n\n return $this->getData($params)->paginate($page_length);\n }", "title": "" }, { "docid": "45c54bb5ef38e1f65894c51d38b0fae0", "score": "0.5785959", "text": "public function paginate($params)\n {\n $page_length = gv($params, 'page_length', config('config.page_length'));\n\n return $this->getData($params)->paginate($page_length);\n }", "title": "" }, { "docid": "8595b387c5b4ffa6161a3944435e0fca", "score": "0.5776152", "text": "protected function pagerDataSet() {\t\n\t\t\t\t\t\n\t\t$this->query($this->pagerQuery());\n\t\t\n\t\tif ($this->ifresult()) \n\t\t\t$this->isData = true;\t\t\n\t}", "title": "" }, { "docid": "63d9a2c6008adff6e173cbc267ff3f45", "score": "0.5723485", "text": "public function getPaged($page, $numPerPage);", "title": "" }, { "docid": "d1998d14be404d1934c88d6a984dfa0f", "score": "0.57187796", "text": "public function getPaginate(){ }", "title": "" }, { "docid": "e4f9916c9425ab00bae88a597efc8624", "score": "0.57169116", "text": "function paginglink($query,$records_per_page, $param,$dsn)\n {\n // La page courante\n $self = $_SERVER['PHP_SELF'];\n \n $pdo = new PDO($dsn[0], $dsn[1], $dsn[2]); // instancie la connexion\n\n \n $result = $pdo->query($query);\n //$result->execute();\n \n $total_no_of_records = $result->rowCount();\n \n if($total_no_of_records > 0)\n {\n ?><ul class=\"pagination\"><?php\n \n // Nb total de pages = ceil(total des lignes / nb lignes par page)\n $total_no_of_pages=ceil($total_no_of_records/$records_per_page);\n \n // Page courante par défaut\n $current_page=1;\n \n // Page courante lue dans $_GET[\"page_no\"]\n if(isset($_GET[\"page_no\"]))\n {\n $current_page=$_GET[\"page_no\"];\n }\n \n // Si on n'est pas à la 1ère page\n if($current_page!=1){\n // On peut revenir, définir $previous\n $previous =$current_page-1;\n \n // Afficher les liens : Premier et Précédent\n echo \"<li><a href='\".$self.\"?$param\" . \"page_no=1'>Premier</a></li>\";\n echo \"<li><a href='\".$self.\"?$param\" . \"page_no=\".$previous.\"'>Précédent</a></li>\";\n }\n \n // Boucler pour avoir les liens intermédiaires\n for($i=1;$i<=$total_no_of_pages;$i++){\n if($i==$current_page){\n echo \"<li><a href='\".$self.\"?$param\" . \"page_no=\".$i.\"' style='color:red;'>\".$i.\"</a></li>\";\n }\n else{\n echo \"<li><a href='\".$self.\"?$param\" . \"page_no=\".$i.\"'>\".$i.\"</a></li>\";\n }\n }\n \n // Si on n'est pas à la dernière page, créer les liens Suivant et Dernier\n if($current_page!=$total_no_of_pages){\n $next=$current_page+1;\n echo \"<li><a href='\".$self.\"?$param\" . \"page_no=\".$next.\"'>Suivant</a></li>\";\n echo \"<li><a href='\".$self.\"?$param\" . \"page_no=\".$total_no_of_pages.\"'>Dernier</a></li>\";\n }\n ?></ul><?php\n }\n }", "title": "" }, { "docid": "83bc3199ea3ed8ec7c60d91f51798bb5", "score": "0.57116914", "text": "public function paginator(): ?PaginatorInterface;", "title": "" }, { "docid": "7bfce5dd7d56274e44221815c5f49580", "score": "0.5700983", "text": "public function readPaging($from_record_num, $records_per_page){\n \n // select query\n $query = \"SELECT\n firstname, lastname, middlename, email, department, faculty, level, number, code, category, election, gender, created, id, status\n FROM\n \" . $this->table_name . \" \n ORDER BY created DESC\n LIMIT ?, ?\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind variable values\n $stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n $stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n \n // execute query\n $stmt->execute();\n \n // return values from database\n return $stmt;\n}", "title": "" }, { "docid": "dc42fc9e289c6a8b2a51a388833cb727", "score": "0.56907386", "text": "public function executeGetDataPaging($request) {\n $aColumns = array(\n 'u.id_usuario',\n 'codigo_estudiante',\n 'CONCAT(u.primer_apellido,\" \",u.segundo_apellido,\" \",u.primer_nombre,\" \",u.segundo_nombre)',\n 't.nombre',\n 'u.documento',\n 'u.telefono1',\n 'u.correo',\n 'pen.nombre',\n 'estado');\n\n //*Se seleeciona la tabla y los campos que se van a mostrar en este datatables\n $q = Doctrine_Query::create()\n ->select('\n e.codigo_estudiante,\n CONCAT(u.primer_apellido,\" \",u.segundo_apellido,\" \",u.primer_nombre,\" \",u.segundo_nombre) AS nombre,\n t.nombre AS tipo_doc,\n u.documento as doc,\n u.telefono1 as tel,\n u.correo as mail,\n pen.nombre AS pensum,\n u.id_usuario AS id_usuario,\n es.nombre as estado')\n ->from('Estudiante e')\n ->innerJoin('e.Matricula m')\n ->leftJoin('e.Usuario u')\n ->leftJoin('u.TipoDocumento t')\n ->leftJoin('e.EstadoEstudiante es')\n ->leftJoin('e.Pensum pen');\n\n if ($request->getParameter('periodo')) {\n $q->where('m.id_periodo = ?', $request->getParameter('periodo'));\n $bWhere = true;\n }\n\n if ($request->getParameter('pensum')) {\n $q->leftJoin('m.PeriodoAcademico per')->where('per.codigo_pensum = ?', $request->getParameter('pensum'));\n $bWhere = true;\n }\n\n //Se obtienen los datos necesarios para ejecutar el LIMIT:\n //SELECT ... LIMIT $limit OFFSET $offset\n $offset = $request->getParameter('iDisplayStart');\n $limit = $request->getParameter('iDisplayLength');\n\n //Se establece el limite, siempre que existan los datos necesarios para datatable:\n if ($request->getParameter('iDisplayStart') != null && $request->getParameter('iDisplayLength') != '-1') {\n $q->limit($limit)->offset($offset);\n }\n\n //Se ordenan los datos de acuerdo a la información suministrada por datatables:\n if ($request->getParameter('iSortCol_0') != null) {\n for ($i = 0; $i < intval($request->getParameter('iSortingCols')); $i++) {\n if ($request->getParameter('bSortable_' . intval($request->getParameter('iSortCol_' . $i))) == \"true\") {\n $q->orderBy($aColumns[intval($request->getParameter('iSortCol_' . $i))] . \"\t\" . strtoupper($request->getParameter('sSortDir_' . $i)));\n }\n }\n }\n\n //Se obtiene la palabra objetivo para realizar la busqueda:\n $sSearch = $request->getParameter('sSearch');\n //Se usa para saber si se usó un where, de forma que se use en [ Busqueda individual en columnas ]\n $bWhere = false;\n if ($sSearch != null && $sSearch != \"\") {\n $bWhere = true;\n for ($i = 0; $i < count($aColumns); $i++) {\n\n if ($i == 0) {\n $q->where($aColumns[$i] . \" LIKE '%\" . $sSearch . \"%'\");\n } else {\n $q->orWhere($aColumns[$i] . \" LIKE '%\" . $sSearch . \"%'\");\n }\n }\n }\n\n //Se realiza la busqueda individual en columnas, en los casos donde aplique, según la configuración de datatables\n for ($i = 0; $i < count($aColumns); $i++) {\n if ($request->getParameter('bSearchable_' . $i) != null && $request->getParameter('bSearchable_' . $i) == \"true\" && $request->getParameter('sSearch_' . $i) != '') {\n if (!$bWhere) {\n $q->where($aColumns[$i] . \" LIKE '%\" . $request->getParameter('sSearch_' . $i) . \"%' \");\n } else {\n $q->andWhere($aColumns[$i] . \" LIKE '%\" . $request->getParameter('sSearch_' . $i) . \"%' \");\n }\n }\n }\n\n //Construccion de la paginación:\n //Se calcula la página actual en la que se encuentra el datatables, a partir de un simple calculo matemático\n $paginaActual = (intval($offset / $limit)) + 1;\n $pager = new Doctrine_Pager($q, $paginaActual, $limit);\n\n //Obtención de los resultados de la consulta dada:\n $rows = $pager->execute();\n\n //Obtención del número de filas encontradas, si no se usara el LIMIT, pero usando los filtros de busqueda\n $iFilteredTotal = $pager->getNumResults();\n\n //Construcción llenado de la matriz de datos:\n $data = array();\n\n //*Llenado de la matriz de datos:\n for ($i = 0; $i < count($rows); $i++) {\n $nombre = \"\";\n $codigo = \"\";\n $tipoDoc = \"\";\n $documento = \"\";\n $telefono = \"\";\n $correo = \"\";\n $pensum = \"\";\n $idUsuario = \"\";\n $estado = \"\";\n\n //*Se evalúa si el dato a insertar existe\n if (isset($rows[$i]['codigo_estudiante']))\n $codigo = $rows[$i]['codigo_estudiante'];\n\n if (isset($rows[$i]['nombre']))\n $nombre = $rows[$i]['nombre'];\n\n if (isset($rows[$i]['tipo_doc']))\n $tipoDoc = $rows[$i]['tipo_doc'];\n\n if (isset($rows[$i]['doc']))\n $documento = $rows[$i]['doc'];\n\n if (isset($rows[$i]['tel']))\n $telefono = $rows[$i]['tel'];\n\n if (isset($rows[$i]['mail']))\n $correo = $rows[$i]['mail'];\n\n if (isset($rows[$i]['pensum']))\n $pensum = $rows[$i]['pensum'];\n\n if (isset($rows[$i]['id_usuario']))\n $idUsuario = $rows[$i]['id_usuario'];\n\n if (isset($rows[$i]['estado']))\n $estado = $rows[$i]['estado'];\n\n //*Se agregan los datos en la matriz\n $data[$i] = array('Codigo' => $codigo, 'Nombre' => $nombre, 'TipoDoc' => $tipoDoc, 'Documento' => $documento, 'Telefono' => $telefono, 'Correo' => $correo, 'Pensum' => $pensum, 'IdUsuario' => $idUsuario, 'Estado' => $estado);\n }\n\n //*Calculo del total de registros en la BD si no se usaran los filtros de busqueda\n $q = Doctrine_Query::create()\n ->select('COUNT(codigo_estudiante) AS total')\n ->from('Estudiante e');\n\n $totales = $q->fetchArray();\n $iTotal = $totales[0]['total'];\n\n //Construcción del mensaje en JSON\n $output = array(\n \"sEcho\" => intval($request->getParameter('sEcho')),\n \"iTotalRecords\" => $iTotal,\n \"iTotalDisplayRecords\" => '' . $iFilteredTotal,\n \"aaData\" => $data\n );\n\n //Envío del mensaje JSON\n return $this->renderText(json_encode($output));\n }", "title": "" }, { "docid": "70c3567411d6ecaf23b5e19841228f93", "score": "0.5688217", "text": "public function makePaginator(){\r\n $paginator = $this->fridgeItems;\r\n // set the current page to what has been passed in query string, or to 1 if none set\r\n $paginator->setCurrentPageNumber((int) $this->params()->fromQuery('page', 1));\r\n // set the number of items per page to 10\r\n $paginator->setItemCountPerPage(10);\r\n \r\n return $paginator;\r\n\r\n }", "title": "" }, { "docid": "0da5dfda1392b26b86bc5e8ddbcefb5c", "score": "0.56867135", "text": "private function instantiatePaginator($data)\n {\n $request = $this->requestStack->getCurrentRequest();\n $router = $this->router;\n\n $adapter = $this->instantiateAdapter($data);\n $pagerfanta = new Pagerfanta($adapter);\n $pagerfanta->setMaxPerPage($request->query->getInt('size') ?: 10);\n $pagerfanta->setCurrentPage($request->query->getInt('page') ?: 1);\n\n $paginator = new PagerfantaPaginatorAdapter($pagerfanta, function($page) use ($request, $router) {\n $route = $request->attributes->get('_route');\n $params = $request->attributes->get('_route_params');\n $newParams = array_merge($params, $request->query->all());\n $newParams['page'] = $page;\n return $router->generate($route, $newParams, 0);\n });\n\n return $paginator;\n }", "title": "" }, { "docid": "df0adc64c26f612d65b2603141820a6e", "score": "0.56830955", "text": "public function paginate(string $criteria, array $params = []) {\n\t $dql = self::dqlFilter($criteria);\n\t \n\t $resources = $this->entityManager\n \t ->createQuery($dql)\n \t ->setParameters($params)\n \t ->getResult();\n\t \n if (count($resources) == 1) {\n return $this->applySerializerContext($resources[0], $this->query->get('options'), $this->query->get('fields'));\n }\n \n\t\t// Limit Results\n\t\tif (! $this->query->get('limit')) {\n\t\t\t$limit = $this->defaultLimit;\n\t\t}else{\n\t\t\tif ($this->query->get('limit') <= count($resources)) {\n\t\t\t\t$limit = $this->query->get('limit');\n\t\t\t}else{\n\t\t\t\t$limit = count($resources);\n\t\t\t}\n\t\t}\n\n\t\t// Total pages\n\t\t$totalPages = round(count($resources) / $limit);\n\t\t\n\t\t// Current page\n\t\t$currentPage = $this->query->get('page');\n\t\t$currentPage = $currentPage && ($currentPage > 0 || $currentPage < $totalPages ) ? $currentPage : $this->defaultPage;\n\t\t$currentPage = $currentPage > $totalPages ? $totalPages : $currentPage;\n\t\t$currentPage = $currentPage == 0 ? 1 : $currentPage;\n\t\t\n\t\t// Offset\n\t\t$offset = ($currentPage - 1) * $limit;\n\t\t\n\t\t// Paginate\n\t\t$resources = $this->entityManager\n\t\t\t\t\t ->createQuery($dql)\n\t\t\t\t\t\t ->setFirstResult($offset)\n\t\t\t\t\t\t ->setMaxResults($limit)\n\t\t\t\t\t\t ->setParameters($params)\n\t\t\t\t\t\t ->getResult();\n \n\t\treturn [\n\t\t 'items' => $this->applySerializerContext($resources, $this->query->get('options'), $this->query->get('fields')), \n\t\t\t'currentPage' => $currentPage, \n\t\t\t'lastPage' => $totalPages,\n\t\t\t'limit'\t=> $limit\n\t\t];\n\t}", "title": "" }, { "docid": "2bc2ea7a8d7908b5fa5ac80b4cdd76d5", "score": "0.56677854", "text": "public function getPagination(): array;", "title": "" }, { "docid": "d217d3d03829e1203a81a478ea93e07c", "score": "0.5667038", "text": "function get_records($start_limit=0,$query,$limit=0)\n {\n\t\t\t\n //it willcontain the records and other values\n $paging_array =array();\n\n\n //number of records to be shown on page\n $perpagerecords =!empty($limit)?$limit:PER_PAGE_RECORD;\n //start limit from total records\n $limit_start =$start_limit;\n //end limit from total records\n $limit_end =$perpagerecords;\n //current page number\n $cur_page =$start_limit;\n\n //get toatal number of records.pass extra query if user perform search\n\n $total_records =$this->get_total_records($query);\n\n //get all row records as an array.pass start limit,end limit,and extra query if search is perform\n $data_res =$this->findAll($query,$limit_start,$limit_end);\n $records_start_from =$start_limit+1;\n $records_start_to =($records_start_from+$perpagerecords)-1;\n if($records_start_to<=$total_records)\n {\n $records_start_to =$records_start_to;\n }\n else\n {\n $records_start_to =$total_records;\n }\n $paging_array['records'] =$data_res;\n $paging_array['total_records'] =$total_records;\n $paging_array['perpagerecords'] =$perpagerecords;\n $paging_array['cur_page'] =$cur_page;\n $paging_array['num_links'] = 9;\n\n $paging_array['records_start_from'] =$records_start_from;\n $paging_array['records_start_to'] =$records_start_to;\n\n return $paging_array;\n }", "title": "" }, { "docid": "dc9b7f887a85ec756e74d6de2058c993", "score": "0.5659945", "text": "public static function customPaginate($items,$perPage)\n{\n //Get current page form url e.g. &page=6\n $currentPage = LengthAwarePaginator::resolveCurrentPage();\n\n //Create a new Laravel collection from the array data\n $collection = new Collection($items);\n\n //Define how many items we want to be visible in each page\n $perPage = $perPage;\n\n //Slice the collection to get the items to display in current page\n $currentPageSearchResults = $collection->slice($currentPage * $perPage, $perPage)->all();\n\n //Create our paginator and pass it to the view\n $paginatedSearchResults = new LengthAwarePaginator($currentPageSearchResults, count($collection), $perPage);\n\n return $paginatedSearchResults;\n}", "title": "" }, { "docid": "11d1f9ca1f774f660aa1b4e92cc3c7ed", "score": "0.565975", "text": "function RSPaging($total_rows){\n\t\t$paging_first = '最前';\n\t\t$paging_previous = '前一页';\n\t\t$paging_next = '下一页';\n\t\t$paging_last = '最后';\n\t\t$temp_link = $this->sort_link.\"&col=\".@$_GET[\"col\"];\n\t\t\n\t\tif (empty($_GET[\"seq\"])){\n\t\t\t$temp_link.= \"&seq=DESC\";\n\t\t}else{\n\t\t\t$temp_link.= \"&seq=\".$_GET[\"seq\"];\n\t\t}\n\t\t$temp_link.= \"&page=\";\n\t\t$current_page = $_SESSION['search_criteria']['page'];\n\t\t// $current_page = 1;\n\t\t// if (!empty($_GET[\"page\"])){\n\t\t\t// $current_page = @$_GET[\"page\"];\n\t\t// }\n\t\t// echo \"<BR>===\".$this->total_rows . \" VS \". $this->record_per_page.\"===<BR>\";\n\t\t//calculate total page \n\t\t$total_page = ceil($total_rows / $this->record_per_page);\n\t\tif ($total_page == 0){\n\t\t\t//set to 1 because last page should not be 0\n\t\t\t$total_page = 1;\n\t\t}\n\n\t\t// echo \"<BR>===\".$current_page.\"====<BR>\";\n\t\t\n\t\t//link for 1st page\t\t\n\t\t$first_page = $temp_link.\"1\";\n\t\t\n\t\t//link for previous page\t\n\t\t$pre_page = $current_page - 1;\t\t\t\n\t\tif ($pre_page < 1){\n\t\t\t//this is the first page, so set the link same as link for 1st page\n\t\t\t$pre_page = 1;\n\t\t}\n\t\t\t\t\n\t\t//link for next page\t\n\t\t$next_page = $current_page + 1;\t\t\t\n\t\tif ($next_page > $total_page){\n\t\t\t//this is the last page, so set the link same as link for last page\t\t\t\n\t\t\t$next_page = $total_page;\n\t\t}\n\t\t\n\t\t//link for last page\t\t\n\t\t$last_page = $temp_link.$total_page;\n\t\t\n\t\techo \"\t\t<table width='100%' border='0' cellspacing='0' cellpadding='0'>\";\n\t\techo \" \t\t\t<tr bgcolor='#FFFFFF'> \";\t\n\t\techo \" \t\t\t\t<td align='center' width='15%'><a href='\".$first_page.\"'>\".$paging_first.\"</a></td>\";\n\t\techo \" \t\t\t\t<td align='center' width='15%'><a href='\".$temp_link.$pre_page.\"'>\".$paging_previous.\"</td>\";\n\t\techo \" \t\t\t\t<td align='center' width='40%'>第 \".$current_page.\" 页,共 \".$total_page.\" 页</td>\";\n\t\techo \" \t\t\t\t<td align='center' width='15%'><a href='\".$temp_link.$next_page.\"'>\".$paging_next.\"</td>\";\n\t\techo \" \t\t\t\t<td align='center' width='15%'><a href='\".$last_page.\"'>\".$paging_last.\"</td>\";\n\t\techo \" \t\t\t</tr>\";\t\n\t\techo \"\t\t</table>\";\t\n\t\t// echo \"PAGE: <input type='text' name='page' value='\".$current_page.\"'>\";\n\t\t// echo \"<script type=\\\"text/javascript\\\">\";\n\t\t// echo \" function onPage(input){\";\n\t\t// echo \"alert(input);\";\n\t\t// echo \" document.form1.page.value = input;\";\n\t\t// echo \" document.form1.action = '';\";\n\t\t// echo \" document.form1.method = 'POST';\";\n\t\t// echo \" document.form1.submit();\";\n\t\t// echo \" \";\n\t\t// echo \" }\";\n\t\t// echo \"< /script>\";\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "0acf4783fd1dec31b5b8d7ddb9ed3164", "score": "0.56501836", "text": "function get_paged_list($limit = null, $offset = 0) {\n $this->db->order_by('nombre','asc');\n return $this->db->get($this->tbl, $limit, $offset);\n }", "title": "" }, { "docid": "e8989ea50a90b6e81cab22c482a803a4", "score": "0.56405926", "text": "public function readPaging($from_record_num, $records_per_page){\n \n // select query\n $query = \"SELECT\n *\n FROM $this->table_name LIMIT ?, ?\";\n \n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind variable values\n $stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n $stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n \n // execute query\n $stmt->execute();\n \n // return values from database\n return $stmt;\n }", "title": "" }, { "docid": "ecf84c15f38a7af5fa6482ca725736c1", "score": "0.56312954", "text": "public function pagination (){\n $db = new ClassDB();\n $_pagination = array();\n $_arrayData = array();\n $_arraySection = array();\n $_resultRows = array();\n \n $consulta = $db->prepare($this->getSqlNumRows());\n $consulta->execute();\n \n if($this->getVar('sqlCount')) {\n $_numRows = $consulta->fetchColumn();\n \n }else {\n $_numRows = $consulta->rowCount();\n }\n \n \n @$_totalPag = ceil($_numRows/$this->getLimitRow());\n $this->_pageCurrent = ($this->getPageCurrent() > $_totalPag) ? $_totalPag : $this->getPageCurrent();\n \n /*\n *Inicio proxima pagina\n */\n $_initRow = abs(($this->getPageCurrent() - 1)) * $this->getLimitRow();\n \n $consulta = $db->prepare($this->getSqlRows());\n $consulta->bindParam(':limitFirst', $_initRow, PDO::PARAM_INT);\n $consulta->bindParam(':limitLast', $this->getLimitRow(), PDO::PARAM_INT);\n $consulta->execute();\n $_resultRows = $consulta->fetchALL(PDO::FETCH_ASSOC);\n // $_resultRows = $this->orderMultiDimensionalArray($_resultRows, 'name');\n\n \n /*\n Paginador\n */\n\n $_pagination['current'] = $this->getPageCurrent();\n $_pagination['total'] = $_totalPag;\n \n if($this->getPageCurrent() > 1){\n $_pagination['first'] = 1;\n $_pagination['back'] = (($this->getPageCurrent() - 1) == 1 ) ? '' : ($this->getPageCurrent() - 1);\n } else {\n $_pagination['first'] = '';\n $_pagination['back'] = '';\n }\n \n if($this->getPageCurrent() < $_totalPag){\n $_pagination['last'] = $_totalPag;\n $_pagination['next'] = (($this->getPageCurrent() + 1) == $_totalPag) ? '' : ($this->getPageCurrent() + 1);\n } else {\n $_pagination['ultimo'] = '';\n $_pagination['next'] = '';\n }\n \n $_arrayData['data'] = $_resultRows;\n $_arrayData['pagination'] = $_pagination;\n \n /*\n *Datos de paginacion\n *Se obtiene la seccion en la que se mostrara la pagina\n */\n @$_sectionCurrent = ceil($this->getPageCurrent()/$this->getRankPagination());\n \n /*\n *Se obtine la pagina inicial de la seccion\n */\n $_pagInit = ($this->getRankPagination() * ($_sectionCurrent - 1))+1 ;\n $_pagInit = ($_pagInit <= 0 ) ? 1 : $_pagInit;\n \n /*\n *Se obtine la ultima pagina de la seccion\n */\n \n $_pageLast = $_sectionCurrent * $this->getRankPagination();\n $_pageLast = ($this->getPageCurrent() == $_totalPag) ? $_totalPag : $_pageLast;\n $_pageLast = ($_pagInit == 1 && $this->getRankPagination() > $_totalPag) ? $_totalPag : $_pageLast;\n $_pageLast = ($_pageLast >= $_totalPag) ? $_totalPag : $_pageLast;\n \n for($_varAux = $_pagInit; $_varAux < ($_pageLast+1) ; $_varAux++){\n $_arraySection[] = $_varAux;\n }\n \n $_arrayData['rank'] = $_arraySection;\n \n return $_arrayData;\n }", "title": "" }, { "docid": "5b77acd1e2a7090005393aced1563834", "score": "0.5630844", "text": "public function paginate($perPage = 10, array $select = array('*'));", "title": "" }, { "docid": "d6bb87e09f28c7b833e16133205affbe", "score": "0.5626625", "text": "public function setPaging()\n {\n $this->paging = new \\cookbook\\model\\helper\\Paging($this->qs);\n\n // current page\n if ($this->qs->isPresent('p')) {\n $this->paging->setCurrentPage($this->qs->getValue('p'));\n }\n // limit items per page\n if ($this->qs->isPresent('l')) {\n $this->paging->setLimit($this->qs->getValue('l'));\n }\n }", "title": "" }, { "docid": "9820ea7059cb352355758c2440fd902c", "score": "0.56086105", "text": "public function createPagination(){\n $paginator = Zend_Paginator::factory($this->getNumber());\n $paginator->setCurrentPageNumber($this->getPage())\n ->setItemCountPerPage($this->getRows())\n ->setPageRange(10);\n return $paginator;\n }", "title": "" }, { "docid": "f1dff28b28a12925308a7605b6ee96b2", "score": "0.5606801", "text": "public static function getPerPage(){}", "title": "" }, { "docid": "647dc14e1d7f678eae619f84e35caaba", "score": "0.56004596", "text": "public function getpaginated($limit = NULL,$offset = NULL)\n {\n $table = $this->table;\n return $this->db->get($table,$limit,$offset)->result();\n }", "title": "" }, { "docid": "9ed0317fd4c813a494949a2429b95e35", "score": "0.55998355", "text": "public function paginate()\n {\n return DB::table('employees')\n ->select('*', DB::raw('LEFT(full_name, 1) as first_letter'), DB::raw('DATE_FORMAT(created_at, \"%h:%i %p, %b. %d, %Y\") as created_at'))\n ->whereNull('deleted_at')\n ->orderBy('updated_at', 'desc')\n ->paginate(25);\n }", "title": "" }, { "docid": "7810d28b7f1f8440a6b2b5aac2e9d954", "score": "0.55955976", "text": "public static function make($source)\n {\n $r = new static;\n\n if ($source instanceof AbstractPaginator) {\n $r->currentPage = static::getValue($source, 'currentPage');\n $r->lastPage = static::getValue($source, 'lastPage');\n $r->perPage = static::getValue($source, 'perPage');\n $r->from = static::getValue($source, 'firstItem');\n $r->to = static::getValue($source, 'lastItem');\n $r->total = static::getValue($source, 'total');\n $r->targetPage = static::getValue($source, 'targetPage');\n } else {\n if ($source instanceof \\Illuminate\\Database\\Eloquent\\Collection) {\n $r->currentPage = static::getValue($source, 'currentPage', 1);\n $r->lastPage = static::getValue($source, 'lastPage', $r->currentPage);\n $r->perPage = static::getValue($source, 'perPage', 0);\n $r->from = static::getValue($source, 'from', 1);\n $r->to = static::getValue($source, 'to', $source->count());\n $r->total = static::getValue($source, 'total', $source->count());\n $r->targetPage = static::getValue($source, 'targetPage');\n } else {\n if (is_array($source)) {\n $qItems = empty($source['items']) ? 0 : count($source['items']);\n $prefix = static::getPrefix($source);\n $r->currentPage = Arr::get($source, $prefix . 'currentPage', 1);\n $r->lastPage = Arr::get($source, $prefix . 'lastPage', $r->currentPage);\n $r->perPage = Arr::get($source, $prefix . 'perPage', 0);\n $r->from = Arr::get($source, $prefix . 'from', ($qItems > 0) ? 1 : 0);\n $r->to = Arr::get($source, $prefix . 'to', $qItems);\n $r->total = Arr::get($source, $prefix . 'total', $qItems);\n $r->targetPage = Arr::get($source, $prefix . 'targetPage');\n }\n }\n }\n\n return $r;\n }", "title": "" }, { "docid": "4183e5fd1f0dc6f55399f03d57c19d6a", "score": "0.55877346", "text": "function getPaginate($nbPerPage)\n {\n\n }", "title": "" }, { "docid": "0be135fe379ea9636f9b60e48ad039d0", "score": "0.5571797", "text": "public function testPaginator(): void\n {\n $data = [];\n for ($i = 0; $i < \\random_int(10, 20); $i++) {\n $data[] = Generator::getRandomString(\"item{$i}\");\n }\n\n /** @noinspection PhpParamsInspection */\n $this->doPaginatorSupportTests(\n new \\Illuminate\\Pagination\\Paginator(collect($data), (int)(\\count($data) / 2)));\n }", "title": "" }, { "docid": "5cf26774a3c6d1c7868141ae0463f25d", "score": "0.55700165", "text": "public function paginate($per_page) {\n\t\t// die($this->select()->model->toSql());\n\n\t\treturn $this->select()->model->paginate($per_page);\n\t}", "title": "" }, { "docid": "ed822a9ba4b464dafdcb6e3e2c89c34f", "score": "0.5557894", "text": "public function getPagination($className = 'CActiveDataProvider') {\n /* x2modend */ \n if($this->_pagination===null) {\n $this->_pagination = $this->getSmartPagination ();\n } \n return $this->_pagination;\n\t}", "title": "" }, { "docid": "07fffb81b32c55aa0007973538e9b6eb", "score": "0.5556486", "text": "function get_rows_pagination($limit, $start, $filter_data = null, $sort_data = null)\n\t{\n\t\t$this->db->limit($limit, $start);\n\t\t$this->db->select('name, occupation' . ', ' \n\t\t\t. 'id as Vegetable_fans_model_id');\n\t\t$this->db->from('vegetable_fans');\n\n\t\tif ($filter_data) {\n\t\t\tforeach($filter_data as $key => $val) {\n\t\t\t\tif ($val)\n\t\t\t\t\t$this->db->like($key, $val);\n\t\t\t}\n\t\t}\n\t\tif ($sort_data) {\n\t\t\t$this->db->order_by($sort_data['col'], $sort_data['order']);\n\t\t}\n\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows() > 0)\n return $query->result_array();\n else \n return false;\n\t}", "title": "" }, { "docid": "c72eb3e0a6313679880561428964aacf", "score": "0.55559194", "text": "public function paginate(array $criteria = [], array $orderBy = [], $currentPage = 1, $pageSize = 10);", "title": "" }, { "docid": "702bab0e300ffa7f050fa452c0e97cf4", "score": "0.55489916", "text": "protected function initPaginator() {\n Zend_Paginator::setDefaultScrollingStyle('Sliding');\n Zend_View_Helper_PaginationControl::setDefaultViewPartial(array(\n 'pagination/search.tpl',\n 'sitemobile'\n ));\n }", "title": "" }, { "docid": "96dc5ac344e3add1c49af54aed50dad0", "score": "0.55424696", "text": "public function get_pagination($data) {\n $model = static::model();\n return new pagination($model::get_count($this->where()),$data['page'] > 1 ? (int) $data['page'] : 1,$this->instances_per_page);\n }", "title": "" }, { "docid": "d82755354d827b49319eafee4cd528d7", "score": "0.5541796", "text": "function paginate() {\r\n\t\t$all_rs = $this->conn->query($this->sql );\r\n\t\tif (! $all_rs) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"<p class='alert alert-danger lead'>An error occurred loading the rankings.</p>\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t$this->total_rows = $all_rs->num_rows;\r\n\t\t@mysql_close($all_rs );\r\n\t\t\r\n\t\t//Return FALSE if no rows found\r\n\t\tif ($this->total_rows == 0) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"Query returned zero rows.\";\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\t\t\r\n\t\t//Max number of pages\r\n\t\t$this->max_pages = ceil($this->total_rows / $this->rows_per_page );\r\n\t\tif ($this->links_per_page > $this->max_pages) {\r\n\t\t\t$this->links_per_page = $this->max_pages;\r\n\t\t}\r\n\t\t\r\n\t\t//Check the page value just in case someone is trying to input an aribitrary value\r\n\t\tif ($this->page > $this->max_pages || $this->page <= 0) {\r\n\t\t\t$this->page = 1;\r\n\t\t}\r\n\t\t\r\n\t\t//Calculate Offset\r\n\t\t$this->offset = $this->rows_per_page * ($this->page - 1);\r\n\t\t\r\n\t\t//Fetch the required result set\r\n\t\t$rs = $this->conn->query($this->sql . \" LIMIT {$this->offset}, {$this->rows_per_page}\" );\r\n\t\tif (! $rs) {\r\n\t\t\tif ($this->debug)\r\n\t\t\t\techo \"<p class='alert alert-danger lead'>An error occurred while loading the rankings.</p>\";\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn $rs;\r\n\t}", "title": "" }, { "docid": "cdd6dd9e70af5b0a3c26c681828a96d8", "score": "0.55388147", "text": "private function users_pagination($dest, $per_page, $uri_segment) {\n $records = $this->members->record_count();\n $config = array(\n 'base_url' => base_url() . $dest,\n 'total_rows' => $records,\n 'per_page' => $per_page,\n 'uri_segment' => $uri_segment,\n );\n $this->pagination->initialize($config);\n // \n $page = ($this->uri->segment($uri_segment)) ? $this->uri->segment($uri_segment) : 0;\n // Query to database\n //$users = $this->users->get_some('username', $config['per_page'], $page);\n //$members = $this->members->get_some('name, email, group_id', $config['per_page'], $page);\n $members = $this->members->get_some($config['per_page'], $page);\n $data = array(\n //'users' => $users,\n 'members' => $members,\n 'links' => $this->pagination->create_links()\n );\n return $data;\n }", "title": "" }, { "docid": "8c6f1d4a08050346fe63654d4dc2217a", "score": "0.55182594", "text": "function get_paged_list($limit = 10, $offset = 0){\n $this->db->order_by('id','desc');\n return $this->db->get($this->tbl_person, $limit, $offset);\n }", "title": "" }, { "docid": "18772fe69d0dc3bacc3587e6e2c53c7e", "score": "0.55116355", "text": "function pagination($rows = 0,$sql='',$action='',$search='',$skipValue=array(),$div_name='',$rows_on_page='',$sqlcount=''){\n $test = new MyPagina(\"\",$action,$div_name,$search,$skipValue,$rows_on_page);\n // remove slashes from sql statement\n $test->sql = stripslashes($sql);\n $test->sqlcount=stripslashes($sqlcount); \n //echo $test->sql;\n $result = $test->get_page_result(); \n $num_rows = $test->get_page_num_rows();\n $nav_links =$test->navigation(\" | \", \"small_white_txt\"); \n $nav_info = $test->page_info(\"to\"); \n $simple_nav_links = $test->back_forward_link(true); \n $total_recs = $test->get_total_rows();\n $links['result'] = $result;\n $links['nav']=$nav_links ;\n $links['simple_nav']=$simple_nav_links ;\n $links['page_info']= $test->page_info() ;\n $links['no_of_page']= $test->get_num_pages();\n\n\n return $links;\n }", "title": "" }, { "docid": "ca83e68dd299f00a5ec64bb0a822f4da", "score": "0.5506059", "text": "public function getItemsPerPage();", "title": "" }, { "docid": "5fe3b032740d16e85df2a7efd7069254", "score": "0.54986584", "text": "public function getUsersDefaultPaging();", "title": "" }, { "docid": "3e1afecc7d8b7b01a610ed5fb120b02f", "score": "0.5492129", "text": "public function apply($src)\n {\n /** @var PaginateOperation $operation */\n $operation = $this->operation;\n return $src->limit($operation->getPageSize())\n ->offset($this->getOffset($operation));\n }", "title": "" }, { "docid": "5950f6ed72cc49567ee912d260bd4688", "score": "0.5489992", "text": "public function findAllPaginated($perPage=10);", "title": "" }, { "docid": "1556c521ef71aaea3d297af1268bd359", "score": "0.548986", "text": "public function readPaging($from_record_num, $records_per_page){\n\n // select query\n $query = \"SELECT\n c.name as category_name, p.id, p.name, p.description, p.price, p.category_id, p.created\n FROM\n \" . $this->table_name . \" p\n LEFT JOIN\n categories c\n ON p.category_id = c.id\n ORDER BY p.created DESC\n LIMIT ?, ?\";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n\n // bind variable values\n $stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n $stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n\n // execute query\n $stmt->execute();\n\n // return values from database\n return $stmt;\n}", "title": "" }, { "docid": "e6be458f9e785e16d17e1133b95dd18c", "score": "0.54864717", "text": "public function paginate($number) {\n\t\treturn $this->model->paginate($number);\n\t}", "title": "" }, { "docid": "79c66feaffc587dd412f918b24c5df37", "score": "0.54814065", "text": "public function run()\n {\n return $this->repository->paginate();\n }", "title": "" }, { "docid": "6546158e425431019650f0fa327cc23c", "score": "0.5480075", "text": "function display_result($source,$page_start=1,$page_rows=0)\n{\n\t// Check that sql-statement is present\n\t$this->get_session();\n\tif($this->sql=='') return false;\n\n\t// Setup page selecters\n\tif($page_rows==0) $page_rows=$this->page_rows;\n\n\t// Execute\n\t$count=0;\n\t$this->row_count=0;\n\t$this->db->open_set($this->sql,($page_start-1)*$page_rows,$page_rows,1);\n\n\t// Get entire rowcount\n\t$this->db->open('SELECT FOUND_ROWS() AS RowCount',2);\n\t$this->row_count=$this->db->field('RowCount',2);\n\t$this->db->close(2);\n\n\t// If any records was found...\n\tif($this->db->move_next(1) && $this->row_count>=1){\n\t\t// Save query\n\t\t$this->save_query($this->row_count);\n\n\t\t// Read templates\n\t\t$tpl=$this->page->read_template('search/search_result');\n\t\t$tpl_header=$this->page->read_template('search/search_result_header');\n\t\t$tpl_footer=$this->page->read_template('search/search_result_footer');\n\t\t$tpl_listitem=$this->page->read_template('search/search_result_listitem');\n\n\t\t// Calculate result vars\n\t\t$result_rows=$this->row_count;\n\t\t$result_page_start=$page_start;\n\t\t$result_page_count=(floor($result_rows/$this->page_rows))+(($result_rows % $this->page_rows)>0?1:0);\n\t\t$result_row_start=($result_rows>$this->page_rows)?(($this->page_rows*($result_page_start-1))+1):1;\n\t\t$result_row_end=($result_rows<=$this->page_rows)?$result_rows:$result_row_start+($this->page_rows-1);\n\n\t\t// Get rows\n\t\t$list='';\n\t\tdo{\n\t\t\t// Number\n\t\t\t$item_number=$result_row_start+$count;\n\n\t\t\t// Parent text\n\t\t\t$item_parenttext='';\n\t\t\t$last_mid=0;\n\t\t\tif($this->db->field('parenttext',1)!=''){\n\t\t\t\t$pt_list=explode('|',$this->db->field('parenttext',1));\n\t\t\t\tfor($i=0;$i<count($pt_list);$i++){\n\t\t\t\t\t$pt_item=explode('#',$pt_list[$i]);\n\t\t\t\t\tif($item_parenttext!='') $item_parenttext.=' / ';\n\t\t\t\t\t$item_parenttext.=$pt_item[1];\n\t\t\t\t\t$last_mid=$pt_item[0];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$item_parenttext.=' / '.$this->db->field('title',1);\n\t\t\tif(substr($item_parenttext,0,3)==' / ') $item_parenttext=substr($item_parenttext,3);\n\n\t\t\t// MID\n\t\t\t$mid=$this->db->field('mid',1);\n\t\t\tif($mid==0)\n\t\t\t\t$mid=$last_mid.'-'.$this->db->field('title',1).'#'.$this->db->field('title',1);\n\t\t\t\n\t\t\t// Text\n\t\t\t$text=strip_tags($this->db->field('subtitle',1));\n\t\t\tif($text==''){\n\t\t\t\t$text=substr($this->db->field('textdata',1),0,$this->max_subtitle_len*2);\n\t\t\t\t$text=str_trunc(strip_tags($text),$this->max_subtitle_len);\n\t\t\t}else\n\t\t\t\t$text=str_trunc($text,$this->max_subtitle_len);\n\n\t\t\t// Make item\n\t\t\t$list.=$tpl_listitem;\n\t\t\t$list=str_replace('[RESULT[ROW_NUMBER]]',$item_number,$list);\n\t\t\t$list=str_replace('[RESULT[PARENTTEXT]]',$item_parenttext,$list);\n\t\t\t$list=str_replace('[RESULT[MID]]',$mid,$list);\n\t\t\t$list=str_replace('[RESULT[TEXT]]',$text,$list);\n\n\t\t\t// Increaase counter\n\t\t\t$count++;\n\t\t}while($this->db->move_next(1));\n\n\t}else{\n\t\t// Save query\n\t\t$this->save_query(0);\n\t}\n\t$this->db->close(1);\n\n\t// Did we find any matching rows?\n\tif($this->row_count==0)\n\t\treturn $this->display_form('[STR[SEARCH_NO_RESULT]]');\n\n\t// Navigation\n\t$first='';\n\tif($result_page_start>1){\n\t\t$first=$this->tn->make_link(\n\t\t\t'search[EXT]?c=nav&amp;id=1',\n\t\t\t'lfx','[STR[DISPLAY_FIRST_PAGE]]','1');\n\t}\n\t$prev='';\n\tif($result_page_start>1){\n\t\t$prev=$this->tn->make_link(\n\t\t\t'search[EXT]?c=nav&amp;id='.($result_page_start-1),\n\t\t\t'lf','[STR[DISPLAY_PREVIOUS_PAGE]]','2');\n\t}\n\t$next='';\n\tif($result_page_start<$result_page_count){\n\t\t$next=$this->tn->make_link(\n\t\t\t'search[EXT]?c=nav&amp;id='.($result_page_start+1),\n\t\t\t'rg','[STR[DISPLAY_NEXT_PAGE]]','3');\n\t}\n\t$last='';\n\tif($result_page_start<$result_page_count){\n\t\t$last=$this->tn->make_link(\n\t\t\t'search[EXT]?c=nav&amp;id='.$result_page_count,\n\t\t\t'rgx','[STR[DISPLAY_LAST_PAGE]]','4');\n\t}\n\n\t// Insert static header\n\t$tpl_header=str_replace('[RESULT[DISPLAY_SEARCH]]',$this->remove_backslash($this->display_search),$tpl_header);\n\n\t// Insert single itemt into template\n\t$tpl_header=str_replace('[RESULT[ROW_START]]',$result_row_start,$tpl_header);\n\t$tpl_header=str_replace('[RESULT[ROW_END]]',$result_row_end,$tpl_header);\n\t$tpl_header=str_replace('[RESULT[ROWS]]',$result_rows,$tpl_header);\n\n\t// Insert entire info string into template\n\t$tpl_header=str_replace(\n\t\t'[RESULT[INFO]]',\n\t\tsprintf(constant('STR_SEARCH_RESULT_INFO'),\n\t\t\t$result_row_start,\n\t\t\t$result_row_end,\n\t\t\t$result_rows),\n\t\t$tpl_header);\n\n\t// Insert navigation in header and footer\n\t$this->insert_navigation($tpl_header,$first,$prev,$next,$last,$result_page_start,$result_page_count);\n\t$this->insert_navigation($tpl_footer,$first,$prev,$next,$last,$result_page_start,$result_page_count);\n\n\t// Calculate colspan\n\t$colspan=4;\n\tif($first!='') $colspan++;\n\tif($prev!='') $colspan++;\n\tif($next!='') $colspan++;\n\tif($last!='') $colspan++;\n\t$tpl_header=str_replace('[RESULT[COLSPAN]]',$colspan,$tpl_header);\n\n\t// Insert into result page\n\t$tpl=str_replace('[RESULT[HEADER]]',$tpl_header,$tpl);\n\t$tpl=str_replace('[RESULT[LIST]]',$list,$tpl);\n\t$tpl=str_replace('[RESULT[FOOTER]]',$tpl_footer,$tpl);\n\n\t// Apply template\n\t$this->page->title='[STR[SEARCH_RESULT]]';\n\t$this->page->content.=$tpl;\n\n\t// Save to session\n\t$this->save_session();\n}", "title": "" }, { "docid": "77f35fd4d4a9014b3f33b6f85c0d5e0d", "score": "0.5474766", "text": "public function query(array $data){\n $per_page = null;\n if(isset($data['per_page']) && (int) $data['per_page']){\n $per_page = $data['per_page'];\n }\n\n return $this->repository->paginate($per_page);\n }", "title": "" }, { "docid": "aacd05c9eb5e8ab2f6499b7c29fbecfa", "score": "0.5472516", "text": "function Paging($query1,$recordperpage,$pagenum,$pagelink){\n\t$result = MysqlSelectQuery($query1) or die (\"Invalid Query:\".mysqli_error());\n\t$row = SqlArrays($result);\n\t$total_record = $row ['numrows'];\n\t$maxpage = ceil($total_record / $recordperpage);\n\n\t//$nav =\"\";\n\t$current = \"\";\n\t$current = $pagenum;\n\t$index_limit = 10;\n\t$start=max($current-intval($index_limit/2), 1);\n $end=$start+$index_limit-1;\t \n\techo '<br /><br /><div class=\"paging\">';\n\n if($current==1) {\n echo '<span class=\"prn\">&lt; Previous</span>&nbsp;';\n } else {\n $i = $current-1;\n echo '<a href=\"'.$pagelink.'&page='.$i.'\" class=\"prn\" rel=\"nofollow\" title=\"go to page'.$i.'\">&lt; Previous</a>&nbsp;';\n echo '<span class=\"prn\">...</span>&nbsp;';\n }\n\t\t\n\t if($start > 1) {\n $i = 1;\n echo '<a href=\"'.$pagelink.'&page='.$i.'\" title=\"go to page '.$i.'\">'.$i.'</a>&nbsp;';\n }\n\n for ($i = $start; $i <= $end && $i <= $maxpage; $i++){\n if($i==$current) {\n echo '<span>'.$i.'</span>&nbsp;';\n } else {\n echo '<a href=\"'.$pagelink.'&page='.$i.'\" title=\"go to page '.$i.'\">'.$i.'</a>&nbsp;';\n }\n }\n\t\t if($maxpage > $end){\n $i = $maxpage;\n echo '<a href=\"'.$pagelink.'&page='.$i.'\" title=\"go to page '.$i.'\">'.$i.'</a>&nbsp;';\n }\n\n if($current < $maxpage) {\n $i = $current+1;\n echo '<span class=\"prn\">...</span>&nbsp;';\n echo '<a href=\"'.$pagelink.'&page='.$i.'\" class=\"prn\" rel=\"nofollow\" title=\"go to page '.$i.'\">Next &gt;</a>&nbsp;';\n } else {\n echo '<span class=\"prn\">Next &gt;</span>&nbsp;';\n }\n \n //if nothing passed to method or zero, then dont print result, else print the total count below:\n if ($maxpage != 0){\n //prints the total result count just below the paging\n\t\t\techo '<p id=\"total_count\">(Viewing Page '.$pagenum.' of '.$maxpage.') | (Total '.$total_record.' Result (s))</p></div>';\n }\n}", "title": "" }, { "docid": "b8ddd82ec1a2655b1670d0ab4b019c1e", "score": "0.5470672", "text": "public function select_paged($model, $start, $size)\r\n\t{\r\n\t\treturn $this->dao->select_paged($model, $start, $size);\r\n\t}", "title": "" }, { "docid": "d583d22eac1b0d9736bedc658587eefc", "score": "0.54608977", "text": "private function myPagination() {\n include 'config/server.php';\n\n $limit = $this->limit;\n $query = 'SELECT COUNT(*) FROM usertable ';\n\n $stmt = $pdo->query( $query );\n $total_results = $stmt->fetchColumn();\n\n $total_pages = ceil( $total_results/$limit );\n\n $pagLink = \"<nav><ul class='pagination'>\";\n\n for ( $page = 1; $page <= $total_pages; $page++ ) {\n\n $pagLink .= \"<li class='page-item'><a class = 'page-link' href='exportData.php?page=\".$page.\"'>\" .$page. '</a></li>';\n\n }\n ;\n\n echo $pagLink . '</ul></nav>';\n\n }", "title": "" }, { "docid": "bcf20b24b48b12234cacfe222bfb9ff1", "score": "0.5458428", "text": "public function readPaging($from_record_num, $records_per_page){\n \n // select query\n $query = \"SELECT r.recipe_id, r.name as recipe_name, c.name as category, r.prep_time, r.vegetarian, d.difficulty_descr as difficulty, r.healthy,\n i.image_name_path as image_path, r.description as recipe_description\n FROM (((recipes r\n JOIN categories c ON r.category_id=c.category_id)\n JOIN recipeimages i ON r.image_id=i.image_id)\n JOIN difficulties d ON r.difficulty_id=d.difficulty_id)\n LIMIT ?, ?\";\n\n // prepare query statement\n $stmt = $this->conn->prepare( $query );\n \n // bind variable values\n $stmt->bindParam(1, $from_record_num, PDO::PARAM_INT);\n $stmt->bindParam(2, $records_per_page, PDO::PARAM_INT);\n \n // execute query\n //$stmt->execute();\n if($stmt->execute()){\n return $stmt;\n }\n else{\n return false;\n }\n\n }", "title": "" }, { "docid": "a709c57e902cd738ce0d972e2bd8e260", "score": "0.54538584", "text": "public function getAllWithPaginate(int $userId, array $data, array $select = ['*']);", "title": "" }, { "docid": "f955b867cddfe45a5261cf2375f58b0f", "score": "0.5452993", "text": "public function paginates(){\n $current_page = (get_query_var('page') == 0)?1:get_query_var('page');\n $data_list_member = array();\n $event_count = '';\n $list_member_response = $this->lists();\n if (!empty($list_member_response->data)) {\n $data_list_member = $list_member_response->data;\n }\n if (!empty($list_member_response->count)) {\n $event_count = $list_member_response->count;\n }\n $pagination = pagination($event_count,$current_page);\n return $pagination;\n }", "title": "" }, { "docid": "6cc98b6b512a2981193fdfe6f49605ed", "score": "0.54509085", "text": "function get_page_data($hl, $offset, $limit) {\r\n $hl ['CarSearchResult'] ['CarResults'] = array_slice ( $hl ['CarSearchResult'] ['CarResults'], $offset, $limit );\r\n return $hl;\r\n }", "title": "" } ]
22251b38dacbda0100b0a8ad6635d0c1
CONST UniqId = 'ncp012gb';
[ { "docid": "d72ce31df5ec75ecb891a38a09e2129b", "score": "0.0", "text": "public function index() {\n\t}", "title": "" } ]
[ { "docid": "40481c8280a88ce1c139a5a3c0bd9e74", "score": "0.7467809", "text": "function id_unik() {\n\treturn base_convert(uniqid(),16,35).\".\".base_convert(rand(100,999),10,35);\n}", "title": "" }, { "docid": "7fe76764ac2b89d7c19e3fc54ac1662b", "score": "0.7165599", "text": "static public function createid(){\n $id = uniqid().uniqid();\n return $id;\n}", "title": "" }, { "docid": "190714cc3ad7dbc8b446ab0ac037c0c3", "score": "0.71196055", "text": "private function generate_uniqid(){\r\n\t\t\t$unique = uniqid( '', true );\r\n\t\t\t$id = explode( \".\", $unique );\r\n\t\t\treturn $id[0].$id[1];\r\n\t\t}", "title": "" }, { "docid": "245ee96b65f46c017c1bccc6370058cd", "score": "0.70002407", "text": "public function generate_multi_id() {\n\t\treturn uniqid( 'zapier_', true );\n\t}", "title": "" }, { "docid": "ee4aa67899a5657a32a29cf9629ae7bf", "score": "0.69792116", "text": "function memcacheUniqueKey( &$k ) {\n\n\tif( strpos( $k, MEMCACHE_UNIQUE_SEED ) === false ) {\n\t $k = MEMCACHE_UNIQUE_SEED . $k;\n\t}\n\n\treturn $k;\n\n }", "title": "" }, { "docid": "39a3801d0a812bb614b91a3ca73e9eb1", "score": "0.6957146", "text": "function _makeUnique_id() {\n $this->unique_id = ( isset( $_SERVER['SERVER_NAME'] )) ? gethostbyname( $_SERVER['SERVER_NAME'] ) : 'localhost';\n }", "title": "" }, { "docid": "19663b65e80264749cac4850090fe6c8", "score": "0.6818536", "text": "function glfr_unique_id( $prefix = '' ) {\n\tstatic $id_counter = 0;\n\tif ( function_exists( 'wp_unique_id' ) ) {\n\t\treturn wp_unique_id( $prefix );\n\t}\n\treturn $prefix . (string) ++$id_counter;\n}", "title": "" }, { "docid": "e5def8ee8fb14f1c81fbdd1ab74ba1ce", "score": "0.6817617", "text": "public static function getUniqId() {\n\t\treturn md5(uniqid(mt_rand(), true));\n\t}", "title": "" }, { "docid": "83f1ab7a896bef818724cef6287edf43", "score": "0.67795634", "text": "public function generateID(){\n return uniqid();\n }", "title": "" }, { "docid": "3969e1d5c49c2d0f5beec203b9278fdd", "score": "0.6765338", "text": "function generate_id()\n{\n return '_'.string_to_hex(generate_random_bytes(21));\n}", "title": "" }, { "docid": "2778e7a527ae01822a16bd3a4a599132", "score": "0.6763792", "text": "function qf_short_uid($add_entr = '')\r\n{\r\n static $etropy = '';\r\n $out = str_pad(dechex(crc32(uniqid($add_entr.$etropy))), 8, '0', STR_PAD_LEFT);\r\n $etropy = $out;\r\n return $out;\r\n}", "title": "" }, { "docid": "975c47f40d63036f09d0554180885c07", "score": "0.6735412", "text": "public function generate_multi_id() {\n\t\treturn uniqid( '', true );\n\t}", "title": "" }, { "docid": "ff5ec2e253580ab84eff3e9ecf97a1f0", "score": "0.6725768", "text": "private function getCodigoUnicoCotizacionPriv(){ \n $codigo = uniqid('inter_cotpriv_');\n return $codigo;\n }", "title": "" }, { "docid": "353bd56f7329eec502a0480769ff20aa", "score": "0.6714453", "text": "function uniqueId() {\n\n return md5(uniqid(time()));\n\n }", "title": "" }, { "docid": "932d1a63b074733d993d23dc316b3000", "score": "0.6637497", "text": "public static function getUniqueId()\n {\n\n return md5(++self::$unique);\n\n }", "title": "" }, { "docid": "59be6b09bec780e85e4cc8373b81a18f", "score": "0.6624855", "text": "static function salt(){\n return uniqid();\n\t}", "title": "" }, { "docid": "44d2fa0f1c5a96392e4446890e5410b2", "score": "0.6617966", "text": "function wptu_get_unique() {\n static $unique = 0;\n $unique++;\n\n return $unique;\n}", "title": "" }, { "docid": "b4909b53035c140213ff1bf3f8e2f5e6", "score": "0.6589779", "text": "private function generateNewId(){\n return 'G' . (1000 + 10 * ($this->size() + 1));\n }", "title": "" }, { "docid": "b22615c6ba1f57717bd1fbf4ee8deb47", "score": "0.65817565", "text": "protected function get_unique_varname()\n {\n return \"\\$v\" . $this->_engine->unique_base . $this->_engine->unique_id++;\n }", "title": "" }, { "docid": "8aeb2be391c93ce1da0fcc9a6f7d1454", "score": "0.6552711", "text": "public function createDistinctId()\n {\n $did = $this->distinctId();\n\n \tif (! $this->distinctId = $this->distinctId()) {\n \t\t$this->distinctId = random_int(1000000000, 9999999999);\n \t\tCookie::queue(Cookie::forever($this->cookieName, $this->distinctId));\n \t}\n\n \treturn $this->distinctId;\n }", "title": "" }, { "docid": "40d8006f3f008bd208ce4a112e8cc7cd", "score": "0.655118", "text": "public function getUniqId()\n {\n return $this->_getData('uniq_id');\n }", "title": "" }, { "docid": "a9b2316e405d46190f8cfcd3c4cf03ec", "score": "0.65297884", "text": "function make_stop_dup_id() {\n return 0;\n}", "title": "" }, { "docid": "5d21bb51f04ef922c23b18c717d35b92", "score": "0.6492128", "text": "public function getUniqueId(): string;", "title": "" }, { "docid": "490f0503fe7c99b6e88c322a13f23054", "score": "0.64810187", "text": "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 }", "title": "" }, { "docid": "cf837fd1fa9d1a63b8762b2a3dbbb76a", "score": "0.64699084", "text": "private function getCodigoUnicoClienteVenta(){\n $codigo = uniqid('inter_cliente_');\n return $codigo;\n }", "title": "" }, { "docid": "c93f4949065b94e0ff88028f9600d1ba", "score": "0.64571625", "text": "private static function makeUid() : Pc\n {\n static $FMT = '%s%s-%s-%s-%s-%s%s%s';\n $bytes = StringFactory::getRandChars( 32 ); // i.e. 16\n $bytes[6] = chr(ord( $bytes[6] ) & 0x0f | 0x40 ); // set version to 0100\n $bytes[8] = chr(ord( $bytes[8] ) & 0x3f | 0x80 ); // set bits 6-7 to 10\n $uid = vsprintf( $FMT, str_split( bin2hex( $bytes ), 4 ));\n return Pc::factory( $uid );\n }", "title": "" }, { "docid": "202092466290565218608d40518dfc58", "score": "0.64310485", "text": "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 }", "title": "" }, { "docid": "202092466290565218608d40518dfc58", "score": "0.64310485", "text": "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 }", "title": "" }, { "docid": "407af41ada383ad453580bc0f2447e74", "score": "0.6427335", "text": "static function __getUniqueId()\n\t{\n\t\t$adb = \\PearDatabase::getInstance();\n\t\treturn $adb->getUniqueID(self::TABLENAME);\n\t}", "title": "" }, { "docid": "50d57ac6a15355341df21298e4841c9c", "score": "0.6415531", "text": "public function getUniqId() {\n return $this->uniqId;\n }", "title": "" }, { "docid": "16b282175fc4dc9e2659341c8f3d8ad0", "score": "0.6399988", "text": "function generate()\n {\n return uniqid();\n }", "title": "" }, { "docid": "b971d696b2c94b7a2eaf4b9b630419cb", "score": "0.639552", "text": "public static function unique() {\n\t\treturn\tself::generate(uniqid().self::salt(8));\n\t}", "title": "" }, { "docid": "70edac9e6ac199eaf6baba624fedaac8", "score": "0.63938427", "text": "function generate_unique_orderID($user_id=null)\n{\n $orderID = \"OR{$user_id}_\". time();\n \n return $orderID;\n}", "title": "" }, { "docid": "5402e690e1ebc6aa16ad24a46ae1a0e9", "score": "0.6392784", "text": "function getUniqueID() {\n\tif(!isset($_SERVER[\"Shib-Session-ID\"])) {\n\t\treturn uniqid('', true); // Identifiant unique généré par php\n\t} else {\n\t\treturn $_SERVER[\"uniqueID\"];\n \t}\n }", "title": "" }, { "docid": "4e09940a9fa06d546dee7baa98139879", "score": "0.63873786", "text": "public function uniqueId(): string\n {\n return sprintf('%s_%s_%s', 'flexmind', $this->driverName, $this->dateTime->format('Y_m_d'));\n }", "title": "" }, { "docid": "fa47e30140693049af54725e2da12a44", "score": "0.6380615", "text": "private static function uniqueId(): string\n {\n $characters = str_split(self::Alphabet);\n\n $str = '';\n for ($x = 0; $x < 30; $x++) {\n $str .= $characters[array_rand($characters)];\n }\n\n return $str;\n }", "title": "" }, { "docid": "4531e725f6f129b83129fae9a0297591", "score": "0.63769346", "text": "protected static function getUid(): string\n {\n return md5(uniqid(rand(), true), 0);\n }", "title": "" }, { "docid": "eee908f765f7ab4ef3b9cc9706ed2c4e", "score": "0.6376547", "text": "function getUniqueId($param = \"lastUniqueId\"){\n if(empty($GLOBALS[$param])){\n $GLOBALS[$param] = 0;\n }\n return $GLOBALS[$param] = $GLOBALS[$param] + 1;\n}", "title": "" }, { "docid": "3db58c9e81bc2a62bb803bfe02da5432", "score": "0.63669217", "text": "public static function uniqueId()\n {\n return time().rand(0,999);\n }", "title": "" }, { "docid": "e4e873f0d50e6dd0ac1a741ea795e48f", "score": "0.6349554", "text": "function mod_moodlecst_create_slidepairkey(){\n\tglobal $CFG;\n\t$prefix = $CFG->wwwroot . '@';\n\treturn uniqid($prefix, true); \n}", "title": "" }, { "docid": "93d7209b5376a13927ee8f83babe1608", "score": "0.6339958", "text": "public function getUniqueID() {\n $u = uniqid();\n\n $now = \\DateTime::createFromFormat('U.u', number_format(microtime(true), 6, '.', ''));\n $formatedNow = $now->format(\"YmdHisuv\");\n\n $unique = md5(uniqid($formatedNow . $u, TRUE));\n return $unique;\n }", "title": "" }, { "docid": "b7029a87dc2997cf8312eb0646c5c78c", "score": "0.63398653", "text": "public function generateId(){\n\t\t$this->id = \"mylist_\".substr(md5(rand(1000, 9999)),0,20);\n\t}", "title": "" }, { "docid": "97b2809924c8ad3815cdcbbd18c06097", "score": "0.63287526", "text": "public function getGUniqId() {\n return $this->gUniqId;\n }", "title": "" }, { "docid": "551ed1d627ebd1e7f6fe3859f0a8e7f5", "score": "0.6313493", "text": "public static function getUuid(){\n\n return uniqid();\n }", "title": "" }, { "docid": "737c677bb5ec130af0a31d1b8bd8e296", "score": "0.6306663", "text": "function generateUID()\n {\n return date('YmdHis') . '.'\n . substr(str_pad(base_convert(microtime(), 10, 36), 16, uniqid(mt_rand()), STR_PAD_LEFT), -16)\n . '@' . $GLOBALS['conf']['server']['name'];\n }", "title": "" }, { "docid": "e2cf3dbc70ea7d245f9c944e36dca9c6", "score": "0.6293295", "text": "public function generateUniqueKey()\n {\n $unique_key = md5(time()+rand(100000,999999));\n while ($this->getCount(array(\"user_unique_key\"=>$unique_key))!=0){\n $unique_key = md5(time()+rand(100000,999999));\n }\n return $unique_key;\n }", "title": "" }, { "docid": "38ed360752b83d9f80abbe995ce7788c", "score": "0.6289108", "text": "function nova_get_unique() {\n static $unique = 0;\n $unique++;\n\n return $unique;\n}", "title": "" }, { "docid": "3b8cc85c23456544ed47fb8defe7c0a5", "score": "0.62843627", "text": "public function get_uniqid() {\n $oid = $this->claim('oid');\n return (!empty($oid)) ? $oid : parent::get_uniqid();\n }", "title": "" }, { "docid": "f573c81cfb51e15e001168adf5cc5470", "score": "0.62756443", "text": "function setGUID () {\n\tfunction guid(){\n\t\tif (function_exists('com_create_guid')){\n\t\t\treturn com_create_guid();\n\t\t}else{\n\t\t\tmt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.\n\t\t\t$charid = strtoupper(md5(uniqid(rand(), true)));\n\t\t\t$hyphen = chr(45);// \"-\"\n\t\t\t$uuid = chr(123)// \"{\"\n\t\t\t\t\t.substr($charid, 0, 8).$hyphen\n\t\t\t\t\t.substr($charid, 8, 4).$hyphen\n\t\t\t\t\t.substr($charid,12, 4).$hyphen\n\t\t\t\t\t.substr($charid,16, 4).$hyphen\n\t\t\t\t\t.substr($charid,20,12)\n\t\t\t\t\t.chr(125);// \"}\"\n\t\t\treturn $uuid;\n\t\t}\n\t}\n\t$guID = strtolower(guid());\n\treturn $guID;\n\t}", "title": "" }, { "docid": "004f56da706c9db221919633a4a9a61d", "score": "0.6251899", "text": "protected function generateUniqueId() {\n\t\t// There seems to be an error in the gaforflash code, so we take the formula\n\t\t// from http://xahlee.org/js/google_analytics_tracker_2010-07-01_expanded.js line 711\n\t\t// instead (\"&\" instead of \"*\")\n\t\treturn ((Util::generate32bitRandom() ^ $this->generateHash()) & 0x7fffffff);\n\t}", "title": "" }, { "docid": "95e2144ff11e2cf092af1b926d63e928", "score": "0.62472844", "text": "function enc_id(){\r\n\t\tglobal $mycon;\r\n\t\t$encypt1=uniqid(rand(0, date(\"his\")).rand(10, 500), true);\r\n\t\t$usid1=str_replace(\".\", \"\", $encypt1);\r\n\t\t$check_id = substr($usid1, 0, 7);\r\n\t\t$query = \"select encid from encountertb where encid='$check_id'\";\r\n\t\t$checkid = $mycon->query($query);\r\n\t\tif($checkid->num_rows > 0)\r\n\t\t{\r\n\t\t\tenc_id();\r\n\t\t}\r\n\t\telse\r\n\t\t\treturn $check_id;\r\n\t}", "title": "" }, { "docid": "4744a4c67de669565e2e2628ec553e6f", "score": "0.62448967", "text": "function generateID(){\n\t\t$temp_id ='';\n\t\t$characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789';\n\t\tfor ($i = 0; $i < 11; $i++) {\n\t\t\t$temp_id .= $characters[rand(0, strlen($characters) - 1)];\n\t\t}\n\t\treturn $temp_id;\n\t}", "title": "" }, { "docid": "8f530317a18f8b4e4b5819324b8628c8", "score": "0.62321144", "text": "function genId() {\n static $ids = array();\n do {\n $time = time();\n $rand = rand(0, 1000000);\n $id = \"og_\" . $time . \"_\" . $rand;\n } while (array_var($ids, $id, false));\n $ids[$id] = true;\n return $id;\n}", "title": "" }, { "docid": "5a16924d43481c73a62780d5c53bf744", "score": "0.62212116", "text": "function hacklib_id($x)\n{\n return $x;\n}", "title": "" }, { "docid": "ec017fe7082263d3106c97415aafda81", "score": "0.62118596", "text": "protected function getUniqueUsername()\n {\n return uniqid('peacher_', true);\n }", "title": "" }, { "docid": "1022fa6465bd0d51eb0abb14d58123f7", "score": "0.62110907", "text": "public function FindUid() {\n list($usec, $sec) = explode(\" \", microtime());\n $suffix = strtoupper(substr(dechex($sec), 3) . dechex(round($usec * 15)));\n return $this->getInstitution() . '-' . $suffix;\n }", "title": "" }, { "docid": "fc0a62392d1047254b4d1be03e135808", "score": "0.6200515", "text": "public static function uniqueKey()\n {\n $self = new self();\n return $self->uniqueKey;\n }", "title": "" }, { "docid": "bf4f6be8b9dc6257c31f53231686e2c2", "score": "0.61971647", "text": "static public function com_create_guid()\n\t{\n\t\tmt_srand((double)microtime()*10000);\n\t\t$charid = strtoupper(md5(uniqid(rand(), true)));\n\t\treturn substr($charid, 0, 8).'-'.substr($charid, 8, 4).'-'.substr($charid,12, 4).'-'.substr($charid,16, 4).'-'.substr($charid,20,12);\n\t}", "title": "" }, { "docid": "d2744fe679270cc0cf4955ac15b4325c", "score": "0.61970824", "text": "protected function generateUniqueId()\n\t{\n\t\treturn md5(JFactory::getConfig()->get('secret') . time());\n\t}", "title": "" }, { "docid": "a83f3cbcd9953e3597448a9a13184603", "score": "0.61931646", "text": "function generateId() {\r\n//\t\treturn \"sorter_\".$this->columnName; \r\n\t\treturn md5(\"sorter_\".$this->columnName); \r\n\t}", "title": "" }, { "docid": "2c360dfe3ac88a9dfa13d93ba8915938", "score": "0.6191008", "text": "function COM_makesid()\n{\n $sid = date( 'YmdHis' );\n srand(( double ) microtime() * 1000000 );\n $sid .= rand( 0, 999 );\n\n return $sid;\n}", "title": "" }, { "docid": "065ae0150979a0ecf4ba2fc4e6b85ce1", "score": "0.6181694", "text": "public function uniqidFilter($string='')\n\t{\n\t\treturn uniqid($string, true);\n\t}", "title": "" }, { "docid": "f5bc453cca51f03f2c514204bb2fa6e7", "score": "0.6181499", "text": "public static function generateUID(){\n\t\treturn rand(0,99999);\n\t}", "title": "" }, { "docid": "df1bf24318eb9f48d9ed12be072795ab", "score": "0.6176717", "text": "public function getUniqueKey();", "title": "" }, { "docid": "44d3b5015b4ecf2fc22a6e704433b74b", "score": "0.6172547", "text": "public function __construct(){\n $this->id = hash('sha256', mt_rand());\n }", "title": "" }, { "docid": "e4d1f64fe4b0fc3968837c35c1752eb9", "score": "0.61555845", "text": "private function generatePublicId(): string\n {\n return (string) mt_rand(10000000, 99999999);\n }", "title": "" }, { "docid": "803bb3c40f774c2705fa2d68f35430f9", "score": "0.615169", "text": "private function createId()\n {\n return sha1(time() . rand(2298, time()) . md5(microtime() . $this->name . rand(4868, time())) . $this->name);\n }", "title": "" }, { "docid": "3bfe0d631f6cf8d7ce92c06703b53ad5", "score": "0.6144164", "text": "protected function createPostUniqueId(){\n return hash('sha1',$this->getChatId().time().rand(1000,9999)); \n }", "title": "" }, { "docid": "8193373a03ca6f29c416ee7b14303d07", "score": "0.6141828", "text": "function saml_id() {\r\n $chars = \"abcdefghijklmnop\";\r\n $cid = \"\";\r\n \r\n for ($i = 0; $i < 40; $i++ ) {\r\n $cid .= $chars[rand(0,strlen($chars)-1)];\r\n }\r\n \r\n return $cid;\r\n}", "title": "" }, { "docid": "e47309fdbf2105eca5393edeb7b5a161", "score": "0.61408776", "text": "public function getUniqId(): ?string {\n return $this->uniqId;\n }", "title": "" }, { "docid": "e47309fdbf2105eca5393edeb7b5a161", "score": "0.61408776", "text": "public function getUniqId(): ?string {\n return $this->uniqId;\n }", "title": "" }, { "docid": "d64e22e3120a18706e249370a9d8ec32", "score": "0.61369205", "text": "public static function unique()\n {\n return self::sha256(uniqid(), self::salt());\n }", "title": "" }, { "docid": "1266e0e7108f34f151ab630aee5cba1f", "score": "0.613686", "text": "function guid(){\n mt_srand((double)microtime()*10000);//optional for php 4.2.0 and up.\n $charid = strtoupper(md5(uniqid(rand(), true)));\n $hyphen = chr(45);// \"-\"\n $uuid = \n\t\t substr($charid, 0, 8).$hyphen\n .substr($charid, 8, 4).$hyphen\n .substr($charid,12, 4).$hyphen\n .substr($charid,16, 4).$hyphen\n .substr($charid,20,12)\n ;\n return $uuid;\n}", "title": "" }, { "docid": "1088287436da9779d10d8476149027db", "score": "0.61299455", "text": "public static function generateId()\n {\n static $inc = 0;\n\n $ts = pack('N', time());\n $m = substr(md5(gethostname()), 0, 3);\n $pid = pack('n', 1);\n $trail = substr(pack('N', $inc++), 1, 3);\n\n $bin = sprintf('%s%s%s%s', $ts, $m, $pid, $trail);\n $id = '';\n for ($i = 0; $i < 12; $i++) {\n $id .= sprintf('%02X', ord($bin[$i]));\n }\n\n return strtolower($id);\n }", "title": "" }, { "docid": "82db949f5b1fcf202894d15c489be154", "score": "0.61291224", "text": "function new_private_id()\n\t{\n\t\t# and number 0 to avoid confusion.\n\t\t$characters =\tarray('A','B','C','D','E','F','G','H','J','K','M','N','P','Q','R','S','T','U','V',\n\t\t\t\t\t\t 'W','X','Y','Z','2','3','4','5','6','7','8','9');\n\t\t\n\t\t$priv_id = \"\";\n\t\tfor($i = 0; $i < 9; $i++)\n\t\t{\n\t\t\t$priv_id .= $characters[array_rand($characters)];\n\t\t}\n\n\t\treturn $priv_id;\n\t}", "title": "" }, { "docid": "29dcd4facf2448c058062d7508aa7d08", "score": "0.61252207", "text": "public function randomHash() {\n\t\treturn substr(md5(uniqid()), 3, 12) . uniqid();\n\t}", "title": "" }, { "docid": "d8d9493b7b924ef41e6bd65701c511bf", "score": "0.6122212", "text": "protected function getUniqueId() {\n $id = uniqid();\n return $id; // Placeholder return for now\n }", "title": "" }, { "docid": "0b60a925ca4dc063ef3f22ab20d526ac", "score": "0.6119609", "text": "function _create_uid($s_value = '') {\n return md5(microtime() . md5($s_value) . md5(date('siH') . md5(date('Yis')) . md5(mt_rand(0, 5698) . rand(5987, 9658))));\n }", "title": "" }, { "docid": "e7ed71bb4699409938e2c16ed5e0d565", "score": "0.61087275", "text": "public static function randomId() {\n\t\treturn 'rand-' . mt_rand( 1000, 9999 );\n\t}", "title": "" }, { "docid": "7fdb88f64154133a9b2f126ed4564f03", "score": "0.61081797", "text": "function msgid() {\n\t$guid = date(\"Ymd.\");\n\tfor ($i = 0; $i < 16; $i++) {\n\t\t$guid .= rand(0,9);\n\t}\n\treturn $guid;\n}", "title": "" }, { "docid": "96f8c63a0bb1702d58ea31b5ff74af8a", "score": "0.6105088", "text": "function get_random_id($connect){\n $q='C'.rand(108000,199999);\n $id=checkDB($q,$connect); \n return $id;\n}", "title": "" }, { "docid": "1fce6c83a528d417952679404bda3716", "score": "0.6101743", "text": "private function cache_id() {\n if ($this->_identifier) {\n return $this->_name . '_' . $this->_identifier . '_' . md5(get_class($this) . implode('', $this->_args));\n } else {\n return $this->_name . '_' . md5(get_class($this) . implode('', $this->_args));\n }\n }", "title": "" }, { "docid": "ccf48b6f1b3e61e6f94b5503dd7f98bc", "score": "0.60981935", "text": "public static function generateId($preFixId) {\n //$milliseconds = round(((float)$usec + (float)$sec) * 1000);\n\n // $milliseconds = round(microtime(true) * 1000);\n // return $preFixId.$milliseconds;\n return uniqid($preFixId);\n }", "title": "" }, { "docid": "66e1512b1d482137a0815f42263b0641", "score": "0.6090327", "text": "private function generateRequestId()\n {\n return uniqid('req-id-', true);\n }", "title": "" }, { "docid": "13cb92c4e28ac84e02e4ea81eaed2000", "score": "0.6088007", "text": "public function getUniqueRefNo() {\n //Generate Unique Reference No:\n $config = [\n 'table' => 'orders',\n 'field' => 'order_no',\n 'length' => 17,\n 'prefix' => 'vsf/'.date('y/m').'/smp-',\n 'reset_on_prefix_change' => true\n ];\n $id = IdGenerator::generate($config);\n return Str::upper($id);\n }", "title": "" }, { "docid": "e321d620f5732d8e0b0d1a53e7e6a637", "score": "0.60857725", "text": "function wp_generate_uuid4() {}", "title": "" }, { "docid": "a6b0c4e944917ff4b2e7b07eea50fc88", "score": "0.60775375", "text": "public static function generateUnique()\r\n\t{\r\n \t return self::make(uniqid());\r\n\t}", "title": "" }, { "docid": "88011b62c23a3ad4471c1318c699b7d5", "score": "0.6071506", "text": "public static function generateUniqueID() {\n return substr(number_format(hexdec(uniqid(mt_rand(), true)), 0, '', ''), 0, 17);\n }", "title": "" }, { "docid": "eff2dfa21cceb1bccad940b8a0af7369", "score": "0.60706264", "text": "function get_id($len) {\n $charSet = \"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789\";\n\n $retStr = \"\";\n $charSetSize = strlen( $charSet );\n for( $i = 0; $i < $len; $i++ ) {\n $retStr .= $charSet[ rand( 0, $charSetSize - 1 ) ];\n }\n\n return $retStr;\n}", "title": "" }, { "docid": "467fc6bc1b785f8675a6565c250fcb0e", "score": "0.60656273", "text": "protected function generateId() {\n return 'rrr-' . rand();\n }", "title": "" }, { "docid": "76f018c52db5b4da26964d3bf25b8e5d", "score": "0.60560274", "text": "static function get_random_uid() {\n\t\t\treturn self::get_guid();\n\t\t}", "title": "" }, { "docid": "4b01b54222fac5026c87590fdc193a8a", "score": "0.6055283", "text": "public function getUniqueId(): string\n\t{\n\t\treturn hash('sha256', $this->getRoute() . round(microtime(true) * 1000));\n\t}", "title": "" }, { "docid": "6dc56206b1d62d7ee5164be5f550eea9", "score": "0.6053581", "text": "protected function getRandomId()\n {\n return Str::random(32);\n }", "title": "" }, { "docid": "3fd67fc1631499f3cc4da7c3ed2b0e99", "score": "0.60396886", "text": "private static function generate_uniq_licence_key(){\n\t\t\n\t\t$key = LicenceKey::generate_licence_key();\n\t\t\n\t\tif ( LicenceKey::model()->findByAttributes(array(\"l_key_value\" => $key) ) == NULL){\n\t\t\treturn $key;\n\t\t}\n\t\telse {\n\t\t\treturn LicenceKey::generate_uniq_licence_key();\n\t\t}\n\t}", "title": "" }, { "docid": "747a4981b431e556a9fa2efffd719d8a", "score": "0.6034272", "text": "public function getUid(): string;", "title": "" }, { "docid": "1f7d5f34ad19a6f4c99b38966946b520", "score": "0.60325414", "text": "public function make_id($element) {/*{{{*/\n if (isset($element['id'])) {\n return self::hsc($element['id']);\n }\n if (isset($element['name'])) {\n return self::hsc($element['name']);\n }\n return substr(md5(mt_rand()), 0, 4);\n }", "title": "" }, { "docid": "ffec7bb1056b4ec90ce5822bc4ea06ea", "score": "0.6026555", "text": "protected function generateId(): string\n\t{\n\t\treturn hash('sha256', random_bytes(16));\n\t}", "title": "" }, { "docid": "5447b65538badd14957cf637190e7294", "score": "0.60255516", "text": "public function getUniqueId();", "title": "" }, { "docid": "dfffe923b9e142022103cdd9d899cbac", "score": "0.601867", "text": "public function __construct() {\n\t\t$this->uuid = uniqid();\n\t}", "title": "" }, { "docid": "316d36c32af26d2d2f3b031cfa4e6669", "score": "0.6015765", "text": "static function generateUUID()\n {\n $parts = [\n abs(crc32(uniqid() . cfg()->secret)),\n abs(crc32(microtime() . cfg()->secret))\n ];\n\n return substr(join(\"\", $parts), 0, 16);\n }", "title": "" }, { "docid": "f1d009142546fe17f3ff70b4bc4acd30", "score": "0.6013447", "text": "function generateNewUniqueKey(){\r\n\t\t$characters = '0123456789abcdefghijklmnopqrstuvwxyz{[}]~#@:;?/.,';\r\n\t\t$string = ''; \r\n\t\tfor ($p = 0; $p < $this->keyLength; $p++) {\r\n\t\t $string .= $characters[mt_rand(0, strlen($characters))];\r\n\t\t}\r\n\t\treturn $string;\r\n\t}", "title": "" } ]
b15bfbbc63e9b794ab1a0ec1c5913314
///////////////////////////////////////////// PROTECTED UPDATE METHODS for ManyToManyReferences (if any) ///////////////////////////////////////////// ///////////////////////////////////////////// PUBLIC FASELICENCIA OBJECT MANIPULATORS ///////////////////////////////////////////// This will save this object's FaseLicencia instance, updating only the fields which have had a control created for it.
[ { "docid": "3b09df4a5f37b0f32b9b2ee27f0b0116", "score": "0.8300216", "text": "public function SaveFaseLicencia() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstLICENCIAIdLICENCIAObject) $this->objFaseLicencia->LICENCIAIdLICENCIA = $this->lstLICENCIAIdLICENCIAObject->SelectedValue;\n\t\t\t\tif ($this->calFASEFechaInicio) $this->objFaseLicencia->FASEFechaInicio = $this->calFASEFechaInicio->DateTime;\n\t\t\t\tif ($this->calFASEFechaFin) $this->objFaseLicencia->FASEFechaFin = $this->calFASEFechaFin->DateTime;\n\t\t\t\tif ($this->lstFASEIdFASEObject) $this->objFaseLicencia->FASEIdFASE = $this->lstFASEIdFASEObject->SelectedValue;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the FaseLicencia object\n\t\t\t\t$this->objFaseLicencia->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" } ]
[ { "docid": "fb5d6d059fec8b89abb6fbf25ed8139f", "score": "0.5974181", "text": "public function SavePacote() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtNome) $this->objPacote->Nome = $this->txtNome->Text;\n\t\t\t\tif ($this->chkStatus) $this->objPacote->Status = $this->chkStatus->Checked;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Pacote object\n\t\t\t\t$this->objPacote->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8eef0af7d0810ece280ac09abae1c2ca", "score": "0.5819484", "text": "public function getFkLicitacaoEditais()\n {\n return $this->fkLicitacaoEditais;\n }", "title": "" }, { "docid": "b7f4f0970276e8132262886c6af49c7f", "score": "0.58050764", "text": "public function setPrincipal(){\n $listaDomiciliosDelCliente = Domicilio::where('codCliente','=',$this->codCliente)->get();\n //quitamos el esPrincipal de todos los domicilios de ese cliente\n foreach ($listaDomiciliosDelCliente as $itemDom) {\n $itemDom->esPrincipal='0';\n $itemDom->save();\n }\n\n $this->esPrincipal='1';\n $this->save();\n }", "title": "" }, { "docid": "cba68584c961d826f494086de8558ce6", "score": "0.5757737", "text": "public function SaveResponsable() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstEMPLEADOIdEMPLEADOObject) $this->objResponsable->EMPLEADOIdEMPLEADO = $this->lstEMPLEADOIdEMPLEADOObject->SelectedValue;\n\t\t\t\tif ($this->lstLICENCIAIdLICENCIAObject) $this->objResponsable->LICENCIAIdLICENCIA = $this->lstLICENCIAIdLICENCIAObject->SelectedValue;\n\t\t\t\tif ($this->calFechaInicio) $this->objResponsable->FechaInicio = $this->calFechaInicio->DateTime;\n\t\t\t\tif ($this->calFechaFin) $this->objResponsable->FechaFin = $this->calFechaFin->DateTime;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Responsable object\n\t\t\t\t$this->objResponsable->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e5b2ed75a81cb576375a7da158fa68de", "score": "0.57562065", "text": "public function DeleteFaseLicencia() {\n\t\t\t$this->objFaseLicencia->Delete();\n\t\t}", "title": "" }, { "docid": "23818ac45630444d4810704f04e9f92b", "score": "0.5732152", "text": "public static function ModificarProveedor(){\n // Existe? \n $provedorExistente = self::ObtenerProveedorPorID($_POST['id']);\n \n if(is_null($provedorExistente)){\n echo \"No existe el proveedor\";\n die;\n }\n // Backup de foto\n self::BackUpFoto($provedorExistente->id, $provedorExistente->foto);\n\n // Guardar Proveedor\n $proveedorNuevo = new self();\n $proveedorNuevo->id = $_POST[\"id\"];\n $proveedorNuevo->nombre = $_POST[\"nombre\"];\n $proveedorNuevo->email = $_POST[\"email\"];\n $proveedorNuevo->foto = self::CargarFoto();\n $proveedorNuevo->GuardarProveedor();\n echo \"Modificado Correctamente\";\n }", "title": "" }, { "docid": "c3c6a9868c379cdd881efea2468638dc", "score": "0.57046926", "text": "function updateFieldsChoices()\n {\n $code_ent = $this->attributesAccess['supannEntiteAffectation']->getValue();\n $label_ent = $this->attributesAccess['supannEntiteAffectation']->getDisplayValues();\n $this->attributesAccess['supannEntiteAffectationPrincipale']->setChoices(\n $code_ent, $label_ent\n );\n $code_etab = $this->attributesAccess['supannEtablissement']->getValue();\n $label_etab = $this->attributesAccess['supannEtablissement']->getDisplayValues();\n $this->attributesAccess['supannEtuInscription']->attribute->attributes[0]->setChoices($code_etab, $label_etab); // supannEtablissement\n $this->attributesAccess['supannEtuInscription']->attribute->attributes[6]->setChoices($code_ent, $label_ent); // supannEntiteAffectation\n $this->attributesAccess['supannRoleEntite']->attribute->attributes[2]->setChoices($code_ent, $label_ent); // supannEntiteAffectation\n $code_tent = $this->attributesAccess['supannTypeEntiteAffectation']->getValue();\n $label_tent = $this->attributesAccess['supannTypeEntiteAffectation']->getDisplayValues();\n $this->attributesAccess['supannRoleEntite']->attribute->attributes[1]->setChoices($code_tent, $label_tent); // supannTypeEntiteAffectation\n\n $this->attributesAccess['eduPersonPrimaryAffiliation']->setChoices(\n $this->attributesAccess['eduPersonAffiliation']->getValue(),\n $this->attributesAccess['eduPersonAffiliation']->getDisplayValues()\n );\n }", "title": "" }, { "docid": "c6823c22b162e30851cec61abea2c7aa", "score": "0.566175", "text": "public function actualizar()\n\t{\n\t\t$registros_afectados = 0;\n\t\t//Defino el arreglo de los valores a actualizar\n\t\t$sql_update=array();\n\t\t//Descripcion para la auditoria\n\t\t$descripcion=array();\n\t\t$descripcion_antigua=\"\";//Descripcion antigua\n\t\t$descripcion_nueva=\"\";//Descripcion nueva\n\t\t\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_id) and !is_null($this -> prd_id))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> prd_id_tipo) and !empty($this -> prd_id_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> prd_id_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"prd_id = \".$this -> prd_id;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"prd_id = '\".$this -> prd_id.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_nombre) and !is_null($this -> prd_nombre))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> prd_nombre_tipo) and !empty($this -> prd_nombre_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> prd_nombre_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"prd_nombre = \".$this -> prd_nombre;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"prd_nombre = '\".$this -> prd_nombre.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_descripcion) and !is_null($this -> prd_descripcion))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> prd_descripcion_tipo) and !empty($this -> prd_descripcion_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> prd_descripcion_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"prd_descripcion = \".$this -> prd_descripcion;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"prd_descripcion = '\".$this -> prd_descripcion.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_texto) and !is_null($this -> prd_texto))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> prd_texto_tipo) and !empty($this -> prd_texto_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> prd_texto_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"prd_texto = \".$this -> prd_texto;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"prd_texto = '\".$this -> prd_texto.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_imagen) and !is_null($this -> prd_imagen))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> prd_imagen_tipo) and !empty($this -> prd_imagen_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> prd_imagen_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"prd_imagen = \".$this -> prd_imagen;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"prd_imagen = '\".$this -> prd_imagen.\"'\";\n\t\t\t\t\n\t\t}\n\n\t\t//Si el campo ha sido asignado y es diferente a null entonces lo agrego al SQL \n\t\tif(isset($this -> prd_activo) and !is_null($this -> prd_activo))\n\t\t{\n\t\t\t//Lo agrego a los campos a actualizar\n\t\t\tif(isset($this -> prd_activo_tipo) and !empty($this -> prd_activo_tipo))\n\t\t\t{\n\t\t\t\t//Si el tipo del campo ha sido definido evaluo su tipo\n\t\t\t\tswitch($this -> prd_activo_tipo)\n\t\t\t\t{\n\t\t\t\t\t//Si es de tipo SQL lo agrego tal cual viene porque es una instruccion SQL\n\t\t\t\t\tcase \"sql\":\n\t\t\t\t\t\t$sql_update[]=\"prd_activo = \".$this -> prd_activo;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Sino ha sido definido le agrego comillas para que el update sea efectivo\n\t\t\telse\n\t\t\t\t$sql_update[]=\"prd_activo = '\".$this -> prd_activo.\"'\";\n\t\t\t\t\n\t\t}\n\n\n\n\t\t//Si el arreglo tiene posiciones\n\t\tif(sizeof($sql_update))\n\t\t{\n\t\t\t//Si se encuentra habilitado el log entonces registro la auditoria\n\t\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla)\n\t\t\t{\n\t\t\t\t//Consulto la informacion actual antes de la actualizacion\n\t\t\t\t$producto = $this -> consultarId($this -> getPrdId());\n\t\t\t\t\t$descripcion[]=\"prd_id = \".$producto -> getPrdId();\n\t\t\t\t\t$descripcion[]=\"prd_nombre = \".$producto -> getPrdNombre();\n\t\t\t\t\t$descripcion[]=\"prd_descripcion = \".$producto -> getPrdDescripcion();\n\t\t\t\t\t$descripcion[]=\"prd_texto = \".$producto -> getPrdTexto();\n\t\t\t\t\t$descripcion[]=\"prd_imagen = \".$producto -> getPrdImagen();\n\t\t\t\t\t$descripcion[]=\"prd_activo = \".$producto -> getPrdActivo();\n\t\t\t\t$descripcion_antigua = implode(\", \", $descripcion);\n\t\t\t}\n\t\t\t\n\t\t\t//Armo el SQL para actualizar\n\t\t\t$sql=\"UPDATE producto SET \".implode($sql_update, \", \").\" WHERE prd_id = \".$this -> getPrdId();\n\t\n\t\t\t//Si la ejecucion es exitosa entonces devuelvo el numero de registros afectados\n\t\t\tif($this -> getConexion() -> Execute($sql))\n\t\t\t{\n\t\t\t\t$registros_afectados=$this -> getConexion() -> Affected_Rows();\n\t\t\t\t\n\t\t\t\t//Si se actualizaron registros de la tabla\n\t\t\t\tif(isset($this -> auditoria_tabla) and $this -> auditoria_tabla and $registros_afectados)\n\t\t\t\t{\n\t\t\t\t\t//Consulto la informacion que se registro luego de la actualizacion\n\t\t\t\t\t$descripcion=array();\n\t\t\t\t\t$producto = $this -> consultarId($this -> getPrdId());\n\t\t\t\t\t\t$descripcion[]=\"prd_id = \".$producto -> getPrdId();\n\t\t\t\t\t$descripcion[]=\"prd_nombre = \".$producto -> getPrdNombre();\n\t\t\t\t\t$descripcion[]=\"prd_descripcion = \".$producto -> getPrdDescripcion();\n\t\t\t\t\t$descripcion[]=\"prd_texto = \".$producto -> getPrdTexto();\n\t\t\t\t\t$descripcion[]=\"prd_imagen = \".$producto -> getPrdImagen();\n\t\t\t\t\t$descripcion[]=\"prd_activo = \".$producto -> getPrdActivo();\n\t\t\t\t\t$descripcion_nueva = implode(\", \", $descripcion);\n\t\t\t\t\t/**\n\t\t\t\t\t * instanciacion de la clase auditoria_tabla para la creacion de un nuevo registro\n\t\t\t\t\t */\n\t\t\t\t\t$objAuditoriaTabla = new AuditoriaTabla();\n\t\t\t\t\t$objAuditoriaTabla->crearBD(\"sisgot_adodb\");\n\t\t\t\t\t$objAuditoriaTabla->setAutTabla(\"producto\");\n\t\t\t\t\t$objAuditoriaTabla->setAutTablaId($this -> getPrdId());\n\t\t\t\t\t$objAuditoriaTabla->setAutUsuId($objAuditoriaTabla -> obtenerUsuarioActual());\n\t\t\t\t\t$objAuditoriaTabla->setAutFecha(\"NOW()\", \"sql\");\n\t\t\t\t\t$objAuditoriaTabla->setAutDescripcionAntigua($descripcion_antigua);\n\t\t\t\t\t$objAuditoriaTabla->setAutDescripcionNueva($descripcion_nueva);\n\t\t\t\t\t$objAuditoriaTabla->setAutTransaccion(\"ACTUALIZAR\");\n\t\t\t\t\t$aut_id=$objAuditoriaTabla->insertar();\n\t\t\t\t\t\n\t\t\t\t\tif(!$aut_id)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"<b>Error al almacenar informacion en la tabla de auditoria_tabla</b><br/>\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//return $registros_afectados;\n\t\t\t}\n\t\t\t//Sino imprimo el mensaje de error\n\t\t\telse\n\t\t\t{\n\t\t\t\techo $this -> getConexion() -> ErrorMsg().\" <strong>SQL: \".$sql.\"<br/>En la linea \".__LINE__.\"<br/></strong>\";\n\t\t\t\t$registros_afectados = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $registros_afectados;\n\t}", "title": "" }, { "docid": "284de0573cdd7279934ec297ad44d6a6", "score": "0.56264156", "text": "function CActualizar_unidadproductiva()\n{\n $enunidadproductiva = new Clase_unidadproductiva();\n\t/*\n $enunidadproductiva->setUnidadProductivaId(validar($_POST[\"UnidadProductivaId_\"]));\n $enunidadproductiva->setUnidadProductivaArea(validar($_POST[\"UnidadProductivaArea_\"]));\n $enunidadproductiva->setUnidadProductivaComentario(validar($_POST[\"UnidadProductivaComentario_\"]));\n $enunidadproductiva->setProductorId(validar($_POST[\"ProductorId_\"]));\n\t*/\n\t\n\t$fechaIngreso=fechaFormatoBD($_POST[\"ProductorFechaIngreso_\"]);\n\t$fechaNacimiento=fechaFormatoBD($_POST[\"ProductorFechaNac_\"]);\n\t$enproductor->setProductorId(validar($_POST[\"ProductorId_\"]));\n\t$enproductor->setProductorNombre(validar($_POST[\"ProductorNombre_\"]));\n\t$enproductor->setProductorApellidoPat(validar($_POST[\"ProductorApellidoPat_\"]));\n\t$enproductor->setProductorApellidoMat(validar($_POST[\"ProductorApellidoMat_\"]));\n\t$enproductor->setProductorFechaIngreso(validar($fechaIngreso));\n\t$enproductor->setProductorFechaNac(validar($fechaNacimiento));\n\t$enproductor->setProductorEstadoCivil(validar($_POST[\"ProductorEstadoCivil_\"]));\n\t$enproductor->setProductorProfesion(validar($_POST[\"ProductorProfesion_\"]));\n\t$enproductor->setProductorDni(validar($_POST[\"ProductorDni_\"]));\n\t$enproductor->setProductorSexo(validar($_POST[\"ProductorSexo_\"]));\n\t$enproductor->setProductorDireccion(validar($_POST[\"ProductorDireccion_\"]));\n\t$enproductor->setProductorEmail(validar($_POST[\"ProductorEmail_\"]));\n\t$enproductor->setProductorFoto(validar($ruta));\n\t$enproductor->setEducacionId(validar($_POST[\"EducacionId_\"]));\n\t$enproductor->setDistritoId(validar($_POST[\"DistritoId_\"]));\n\t\n\t$rpta = $enunidadproductiva->Actualizar_unidadproductiva();\n\t\n\t// Start Actualizar Telefonos\n $entelefono = new Clase_telefono();\n $entelefono->setTelefonoId(validar($_POST[\"TelefonoId_\"]));\n $entelefono->setTelefonoFijo(validar($_POST[\"TelefonoFijo_\"]));\n $entelefono->setTelefonoMovil(validar($_POST[\"TelefonoMovil_\"]));\n $entelefono->setProductorId($ID);\n $rptaTelefono = $entelefono->Actualizar_telefono();\n\t\t\n\t// Star Actualizar unidad Productiva\n $enunidadproductiva = new Clase_unidadproductiva();\n $enunidadproductiva->setUnidadProductivaId(validar($_POST[\"UnidadProductivaId_\"]));\n $enunidadproductiva->setUnidadProductivaArea(validar($_POST[\"UnidadProductivaArea_\"]));\n $enunidadproductiva->setUnidadProductivaComentario(validar($_POST[\"UnidadProductivaComentario_\"]));\n $enunidadproductiva->setProductorId($ID);\n $rptaUP = $enunidadproductiva->Actualizar_unidadproductiva();\n\t\n \n\t\n return $rpta;\n}", "title": "" }, { "docid": "4d7e8eb02607510a3af666215767798e", "score": "0.555883", "text": "public static function ctrEditarResidente()\n {\n if (isset($_POST[\"editTipo\"]) && $_POST[\"editTipo\"] == \"Residencias Profesionales\") {\n\n $tabla1 = \"proyecto\";\n $tabla2 = \"residentes\";\n $tipo = 1;\n $NoRevicion = 0;\n\n // Revicioness\n if($_POST[\"customCheck1\"]){\n $NoRevicion = 1;\n }\n if ($_POST[\"customCheck2\"]) {\n $NoRevicion = 2;\n }\n if ($_POST[\"customCheck3\"]) {\n $NoRevicion = 3;\n }\n\n if ($_POST[\"editRevisor1\"] == null) {\n $_POST[\"editRevisor1\"] = 0;\n }\n if ($_POST[\"editRevisor2\"] == null) {\n $_POST[\"editRevisor2\"] = 0;\n }\n if ($_POST[\"editSuplente\"] == null) {\n $_POST[\"editSuplente\"] = 0;\n }\n\n\n\n $na = 0;\n $datosProyecto = array(\n \"idP\" => $_POST[\"idProyectoEdit\"],\n \"nombreProyecto\" => $_POST[\"editNombreProyecto\"],\n \"nombreEmpresa\" => $_POST[\"editNombreEmpresa\"],\n \"asesorExt\" => $_POST[\"editAsesorExt\"],\n \"asesorInt\" => $_POST[\"editAsesorInt\"],\n \"revisor1\" => $_POST[\"editRevisor1\"],\n \"revisor2\" => $_POST[\"editRevisor2\"],\n \"revisor3\" => $na,\n \"suplente\" => $_POST['editSuplente']\n );\n\n $respuestaProyecto = ModeloResidentes::mdlEditResidenteProyecto($tabla1, $datosProyecto);\n\n\n if ($respuestaProyecto == \"ok\") {\n\n //NOTE CAMBIO LOS ATRIBUTOS ENVIADOS AL METODO\n $revisarProyecto = ModeloResidentes::mdlRevisarPro($tabla1, $_POST[\"editNombreProyecto\"]);\n\n if ($_POST[\"editCarrera\"] == \"ISC\") {\n $var1 = \"Ingeniería en Sistemas Computacionales\";\n } elseif ($_POST[\"editCarrera\"] == \"II\") {\n $var1 = \"Ingeniería Informática\";\n }\n\n $datosResidente = array(\n \"idRe\" => $_POST[\"idResidenteEdit\"],\n \"noControl\" => $_POST[\"editNoControlEdit\"],\n \"carrera\" => $var1,\n \"periodo\" => $_POST[\"editPeriodo\"],\n \"anio\" => $_POST[\"editPeriodoAnio\"],\n \"nombre\" => $_POST[\"editNombre\"],\n \"apellidoP\" => $_POST[\"editApellidoP\"],\n \"apellidoM\" => $_POST[\"editApellidoM\"],\n \"sexo\" => $_POST[\"editSexo\"],\n \"telefono\" => $_POST[\"editTelefono\"],\n \"revisionOK\" => $NoRevicion,\n \"tipo_registro\" => $tipo,\n \"proyecto_id\" => $revisarProyecto[\"id\"]\n );\n\n $resResidente = ModeloResidentes::mdlEditResidenteDatos($tabla2, $datosResidente);\n\n if ($resResidente == \"ok\") {\n echo \"<script>\n Swal.fire({\n position: 'top',\n type: 'success',\n title: '¡Exito!',\n text: '¡Se actualizo correctamente!',\n showConfirmButton: false,\n timer: 1000\n }).then((result)=>{\n window.location = 'Residentes';\n });\n </script>\";\n } else {\n echo '<script>\n Swal.fire({\n type: \"error\",\n title: \"Error!\",\n text: \"¡No se pudo actualizar!\",\t\t\t\t\t\t \n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\t\t\t\t \n }).then((result)=>{\n if(result.value){\n window.location = \"Residentes\";\n }\n });\n </script>';\n }\n } else {\n //BORRAR PROYECTO SINO SE PUEDE REGISTRAR\n //NOTE CAMBIO LOS ATRIBUTOS ENVIADOS AL METODO\n $revisarProyecto = ModeloResidentes::mdlRevisarPro($tabla1, $_POST[\"editNombreProyecto\"]);\n $tablaE = \"proyecto\";\n $revisarProyecto = ModeloResidentes::mdlEliminarPro($tablaE, $revisarProyecto[\"id\"]);\n //TERMINA\n var_dump($respuestaProyecto);\n echo '<script>\n\t\t\t\tSwal.fire({\n\t\t\t\t\t type: \"error\",\n title: \"¡Error!\",\n text: \"Revisa los datos del Proyecto.\",\t\t\t\t\t \n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\"\t\t\t\t \n\t\t\t\t}).then((result)=>{\n\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t//window.location = \"Residentes\";\n\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t </script>';\n }\n } else {\n if (isset($_POST[\"editTipo\"]) && $_POST[\"editTipo\"] == \"Tesis Profesional\") {\n $tabla1 = \"proyecto\";\n $tabla2 = \"residentes\";\n $tipo = 2;\n $NoRevicion = 0;\n if ($_POST[\"CheckTesis\"]) {\n $NoRevicion = 3;\n }else{\n $NoRevicion = 0;\n }\n\n if ($_POST[\"editRevisor1\"] == null) {\n $_POST[\"editRevisor1\"] = 0;\n }\n if ($_POST[\"editRevisor2\"] == null) {\n $_POST[\"editRevisor2\"] = 0;\n }\n if ($_POST[\"editRevisor3\"] == null) {\n $_POST[\"editRevisor3\"] = 0;\n }\n\n\n $na = 0;\n $datosProyecto = array(\n \"idP\" => $_POST[\"idProyectoEdit\"],\n \"nombreProyecto\" => $_POST[\"editNombreProyecto\"],\n \"nombreEmpresa\" => $_POST[\"editNombreEmpresa\"],\n \"asesorExt\" => $na,\n \"asesorInt\" => $_POST[\"editAsesorInt\"],\n \"revisor1\" => $_POST[\"editRevisor1\"],\n \"revisor2\" => $_POST[\"editRevisor2\"],\n \"revisor3\" => $_POST[\"editRevisor3\"],\n \"suplente\" => $na\n );\n\n $respuestaProyecto = ModeloResidentes::mdlEditResidenteProyecto($tabla1, $datosProyecto);\n\n\n if ($respuestaProyecto == \"ok\") {\n\n //NOTE CAMBIO LOS ATRIBUTOS ENVIADOS AL METODO\n $revisarProyecto = ModeloResidentes::mdlRevisarPro($tabla1, $_POST[\"editNombreProyecto\"]);\n\n if ($_POST[\"editCarrera\"] == \"ISC\") {\n $var1 = \"Ingeniería en Sistemas Computacionales\";\n } elseif ($_POST[\"editCarrera\"] == \"II\") {\n $var1 = \"Ingeniería Informática\";\n }\n\n $datosResidente = array(\n \"idRe\" => $_POST[\"idResidenteEdit\"],\n \"noControl\" => $_POST[\"editNoControlEdit\"],\n \"carrera\" => $var1,\n \"periodo\" => $_POST[\"editPeriodo\"],\n \"anio\" => $_POST[\"editPeriodoAnio\"],\n \"nombre\" => $_POST[\"editNombre\"],\n \"apellidoP\" => $_POST[\"editApellidoP\"],\n \"apellidoM\" => $_POST[\"editApellidoM\"],\n \"sexo\" => $_POST[\"editSexo\"],\n \"telefono\" => $_POST[\"editTelefono\"],\n \"revisionOK\" => $NoRevicion,\n \"tipo_registro\" => $tipo,\n \"proyecto_id\" => $revisarProyecto[\"id\"]\n );\n\n $resResidente = ModeloResidentes::mdlEditResidenteDatos($tabla2, $datosResidente);\n\n if ($resResidente == \"ok\") {\n echo \"<script>\n Swal.fire({\n position: 'top',\n type: 'success',\n title: '¡Exito!',\n text: '¡Se actualizo correctamente!',\n showConfirmButton: false,\n timer: 1000\n }).then((result)=>{\n window.location = 'Residentes';\n });\n </script>\";\n } else {\n echo '<script>\n Swal.fire({\n type: \"error\",\n title: \"Error!\",\n text: \"¡No se pudo actualizar!\",\n showConfirmButton: true,\n confirmButtonText: \"Cerrar\"\t\t\t\t \n }).then((result)=>{\n if(result.value){\n window.location = \"Residentes\";\n }\n });\n </script>';\n }\n } else {\n //BORRAR PROYECTO SINO SE PUEDE REGISTRAR\n //NOTE CAMBIO LOS ATRIBUTOS ENVIADOS AL METODO\n $revisarProyecto = ModeloResidentes::mdlRevisarPro($tabla1, $_POST[\"editNombreProyecto\"]);\n $tablaE = \"proyecto\";\n $revisarProyecto = ModeloResidentes::mdlEliminarPro($tablaE, $revisarProyecto[\"id\"]);\n //TERMINA\n var_dump($respuestaProyecto);\n echo '<script>\n\t\t\t\tSwal.fire({\n\t\t\t\t\t type: \"error\",\n title: \"¡Error!\",\n text: \"Revisa los datos del Proyecto.\",\t\t\t\t\t \n\t\t\t\t\tshowConfirmButton: true,\n\t\t\t\t\tconfirmButtonText: \"Cerrar\"\t\t\t\t \n\t\t\t\t}).then((result)=>{\n\t\t\t\t\tif(result.value){\n\t\t\t\t\t\t//window.location = \"Residentes\";\n\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t </script>';\n }\n }\n }\n }", "title": "" }, { "docid": "9ef5f4f9e44c290a7f57d390096897fb", "score": "0.55401236", "text": "private function obj($new = true)\n {\n //$arrayInt = array('raza', 'cliente');\n //$rta = $this->validarArrays($arrayTexto,$arrayInt);\n /*if($rta){\n Session::set('error','Falto digitar o seleccionar <b>'.$rta.'</b>');\n $this->redireccionar($this->_presentRequest->getUrl());\n exit; \n }*/\n\n $this->_model->getInstance()->setFecha(new \\DateTime($this->getFecha($this->getTexto('fecha'))));\n $this->_model->getInstance()->setObservaciones($this->getTexto('observacion'));\n $this->_model->getInstance()->setTipo($this->getInt('tipo'));\n if($this->getInt('tipo') == 2){\n $this->_model->getInstance()->setFrecuencia($this->_frecuencia->get(1)); \n }else{\n $this->_model->getInstance()->setFrecuencia($this->_frecuencia->get($this->getInt('frecuencia')));\n }\n $this->_model->getInstance()->setFrecuencia($this->_frecuencia->get($this->getInt('frecuencia')));\n $this->_model->getInstance()->setRevisor($this->getTexto('revisor'));\n $this->_model->getInstance()->setConductor($this->getTexto('conductor'));\n $this->_model->getInstance()->setVehiculo($this->_vehiculo->get($this->getInt('vehiculo')));\n \n if($this->getInt('tipo') == 2){\n $this->_model->getInstance()->setFalla($this->getTexto('falla'));\n $this->_model->getInstance()->setReparacion($this->getTexto('reparacion'));\n $this->_model->save();\n }else{\n $temp = $this->_itemfrecuencia->findBy(array('frecuencia' => $this->getInt(\"frecuencia\")));\n $this->_model->save();\n foreach ($temp as $key => $value) {\n $this->_itemmantenimientoprev = $this->loadModel('itemmantenimientoprev');\n $this->_itemmantenimientoprev->getInstance()->setMantenimiento($this->_model->getInstance()); \n $this->_itemmantenimientoprev->getInstance()->setItemFrecuencia($this->_itemfrecuencia->get($value->getId())); \n $valor = \"radio\".$value->getId();\n // echo $valor;\n $this->_itemmantenimientoprev->getInstance()->setEstado($this->getPostParam($valor));\n //exit;\n //var_dump($this->_itemmantenimientoprev->getInstance());\n //exit;\n $this->_itemmantenimientoprev->save();\n }\n }\n\n if($new){\n Session::set('mensaje','Registro Creado con Exito.');\n }else{\n $this->_model->update(); \n Session::set('mensaje','Registro Actualizado con Exito.');\n }\n\n $this->redireccionar($this->_presentRequest->getControlador().'/');\n }", "title": "" }, { "docid": "4cc72a272e7b52c89dd38ed3aaf98554", "score": "0.5534671", "text": "public function testUpdateIdMantenedorCascade(){\n $mantenedor = new \\ExpertsAR\\Mantenedor();\n $mantenedor->setNome(\"Luis\")->setSenha(\"senha\")->setUsuario(\"luisac\");\n $mantenedor->setEmail(\"root@luisaurelio\");\n DAO::insert($mantenedor);\n \n $mantenedor = new \\ExpertsAR\\Mantenedor();\n $mantenedor->setNome(\"Rodrigo\")->setSenha(\"senha\")->setUsuario(\"rodrigo\");\n $mantenedor->setEmail(\"root@luisaurelio\");\n DAO::insert($mantenedor);\n \n $licao1 = new \\ExpertsAR\\Licao();\n $licao1->setNome(\"Projecao\")->setSlug(\"projecao\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(1);\n $licao2 = new \\ExpertsAR\\Licao();\n $licao2->setNome(\"Selecao\")->setSlug(\"selecao\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(2);\n $licao3 = new \\ExpertsAR\\Licao();\n $licao3->setNome(\"Funcoes\")->setSlug(\"funcoes\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(1);\n $licao4 = new \\ExpertsAR\\Licao();\n $licao4->setNome(\"Mais Funcoes\")->setSlug(\"mais-funcoes\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(1);\n $licao5 = new \\ExpertsAR\\Licao();\n $licao5->setNome(\"Alberto\")->setSlug(\"alberto\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(2);\n \n DAO::insert($licao1);\n DAO::insert($licao2);\n DAO::insert($licao3);\n DAO::insert($licao4);\n DAO::insert($licao5);\n \n $usuario = new \\ExpertsAR\\Mantenedor(50);\n $usuario->setNome(\"Ezequiel\");\n DAO::updateById($usuario, 1);\n \n $this->assertEquals(NULL, DAO::selectById(\"\\ExpertsAR\\Mantenedor\", \"Mantenedores\", 1));\n \n $cond = new Condicao(new Identificador(\"idMantenedorCriou\"), \"=\", 1); \n $this->assertEquals(NULL, DAO::select(\"\\ExpertsAR\\Licao\", \"Licoes\", $cond));\n \n $cond = new Condicao(new Identificador(\"idMantenedorCriou\"), \"=\", 1);\n \n $cond = new Condicao(new Identificador(\"idMantenedorCriou\"), \"=\", 50);\n $result = DAO::select(\"\\ExpertsAR\\Licao\", \"Licoes\", $cond);\n $this->assertEquals(3, $result->count());\n \n $result = DAO::selectAll(\"\\ExpertsAR\\Licao\", \"Licoes\");\n $this->assertEquals(5, $result->count()); \n }", "title": "" }, { "docid": "6c3d8fdf9c83ec4be567653db091f9c0", "score": "0.5526402", "text": "public function atualizarDadosEscolaridade($oLinha) {\n\n $oDaoRechumano = new cl_rechumano();\n if (isset($oLinha->escolaridade) && !empty($oLinha->escolaridade)) {\n $oDaoRechumano->ed20_i_escolaridade = $oLinha->escolaridade;\n }\n\n $oDaoRechumano->ed20_i_codigo = $this->iCodigoDocente;\n $oDaoRechumano->alterar($oDaoRechumano->ed20_i_codigo);\n\n if ($oDaoRechumano->erro_status == '0') {\n throw new Exception(\"Erro na alteração dos dados de endereço do Recurso Humano. Erro da classe: \".$oDaoRechumano->erro_msg);\n }\n $oDaoCursoFormacao = new cl_cursoformacao();\n $oDaoFormacao = new cl_formacao();\n $oDaoFormacao->excluir(null,\"ed27_i_rechumano = {$this->iCodigoDocente}\");\n $aFormacao = array();\n for ($i = 1; $i <= 3; $i++) {\n\n if ( isset($oLinha->{\"situacao_curso_superior_$i\"}) && isset($oLinha->{\"formacao_complementacao_pedagogica_$i\"})\n && isset($oLinha->{\"codigo_curso_superior_$i\"}) && isset($oLinha->{\"ano_inicio_curso_superior_$i\"})\n && isset($oLinha->{\"ano_conclusao_curso_superior_$i\"}) && isset($oLinha->{\"tipo_instituicao_curso_superior_$i\"})\n && isset($oLinha->{\"instituicao_curso_superior_$i\"})) {\n\n $aFormacao[] = array(trim($oLinha->{\"situacao_curso_superior_$i\"}),\n trim($oLinha->{\"formacao_complementacao_pedagogica_$i\"}),\n trim($oLinha->{\"codigo_curso_superior_$i\"}),\n trim($oLinha->{\"ano_inicio_curso_superior_$i\"}),\n trim($oLinha->{\"ano_conclusao_curso_superior_$i\"}),\n trim($oLinha->{\"tipo_instituicao_curso_superior_$i\"}),\n trim($oLinha->{\"instituicao_curso_superior_$i\"})\n );\n }\n }\n\n /**\n * Inclui os cursos do Recurso Humano (Aba Formação)\n */\n foreach ($aFormacao as $iFormacao => $aFormacaoDecente) {\n\n if ( empty($aFormacaoDecente[2]) ) {\n continue;\n }\n\n $sWhereCursoFormacao = \"ed94_c_codigocenso = '\".$aFormacaoDecente[2].\"'\";\n $sSqlCursoFormacao = $oDaoCursoFormacao->sql_query(\"\", \"*\", \"\", $sWhereCursoFormacao);\n $rsCursoFormacao = $oDaoCursoFormacao->sql_record($sSqlCursoFormacao);\n\n if ($oDaoCursoFormacao->numrows > 0) {\n\n if ($aFormacaoDecente[0] != null) {\n\n $oDaoFormacao->ed27_i_rechumano = $this->iCodigoDocente;\n $oDaoFormacao->ed27_i_cursoformacao = db_utils::fieldsmemory($rsCursoFormacao, 0)->ed94_i_codigo;\n $oDaoFormacao->ed27_c_situacao = 'CON';\n $oDaoFormacao->ed27_i_licenciatura = (isset($aFormacaoDecente[0]) ? $aFormacaoDecente[0] : '');\n $oDaoFormacao->ed27_i_anoconclusao = (isset($aFormacaoDecente[4]) ? $aFormacaoDecente[4] : '');\n $oDaoFormacao->ed27_i_censosuperior = (isset($aFormacaoDecente[5]) ? $aFormacaoDecente[5] : '');\n $oDaoFormacao->ed27_i_censoinstsuperior = (isset($aFormacaoDecente[6]) ? $aFormacaoDecente[6] : '');\n $oDaoFormacao->incluir(null);\n if ($oDaoFormacao->erro_status == '0') {\n\n throw new Exception(\"Erro na alteração dos dados da Formação do professor. Erro da classe: \".\n $oDaoFormacao->erro_msg\n );\n\n }\n }\n }\n }\n }", "title": "" }, { "docid": "ae5e90e73517c54ad9f088875d7197c1", "score": "0.5493213", "text": "public function SaveFichasVideos() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstIdFichaObject) $this->objFichasVideos->IdFicha = $this->lstIdFichaObject->SelectedValue;\n\t\t\t\tif ($this->lstIdVideoObject) $this->objFichasVideos->IdVideo = $this->lstIdVideoObject->SelectedValue;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the FichasVideos object\n\t\t\t\t$this->objFichasVideos->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "bb6fb6f0f8dd3e66a538a01868b8794e", "score": "0.5491528", "text": "public function set_credite()\n\t{\n // phpcs:enable\n\t\tglobal $user,$conf;\n\n\t\t$error = 0;\n\n\t\tif ($this->db->begin())\n\t\t{\n\t\t\t$sql = \" UPDATE \".MAIN_DB_PREFIX.\"prelevement_bons\";\n\t\t\t$sql.= \" SET statut = 1\";\n\t\t\t$sql.= \" WHERE rowid = \".$this->id;\n\t\t\t$sql.= \" AND entity = \".$conf->entity;\n\n\t\t\t$result=$this->db->query($sql);\n\t\t\tif (! $result)\n\t\t\t{\n\t\t\t\tdol_syslog(get_class($this).\"::set_credite Erreur 1\");\n\t\t\t\t$error++;\n\t\t\t}\n\n\t\t\tif (! $error)\n\t\t\t{\n\t\t\t\t$facs = array();\n\t\t\t\t$facs = $this->getListInvoices();\n\n\t\t\t\t$num=count($facs);\n\t\t\t\tfor ($i = 0; $i < $num; $i++)\n\t\t\t\t{\n\t\t\t\t\t/* Tag invoice as payed */\n\t\t\t\t\tdol_syslog(get_class($this).\"::set_credite set_paid fac \".$facs[$i]);\n\t\t\t\t\t$fac = new Facture($this->db);\n\t\t\t\t\t$fac->fetch($facs[$i]);\n\t\t\t\t\t$result = $fac->set_paid($user);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (! $error)\n\t\t\t{\n\t\t\t\t$sql = \" UPDATE \".MAIN_DB_PREFIX.\"prelevement_lignes\";\n\t\t\t\t$sql.= \" SET statut = 2\";\n\t\t\t\t$sql.= \" WHERE fk_prelevement_bons = \".$this->id;\n\n\t\t\t\tif (! $this->db->query($sql))\n\t\t\t\t{\n\t\t\t\t\tdol_syslog(get_class($this).\"::set_credite Erreur 1\");\n\t\t\t\t\t$error++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t/*\n * End of procedure\n */\n\t\t\tif (! $error)\n\t\t\t{\n\t\t\t\t$this->db->commit();\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->db->rollback();\n\t\t\t\tdol_syslog(get_class($this).\"::set_credite ROLLBACK \");\n\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdol_syslog(get_class($this).\"::set_credite Ouverture transaction SQL impossible \");\n\t\t\treturn -2;\n\t\t}\n\t}", "title": "" }, { "docid": "dec072a65a41047f4a5851dba706e04a", "score": "0.5448328", "text": "public function edit(Licenca $licenca)\n {\n //\n }", "title": "" }, { "docid": "dea6bda42452bdacd5fc7b8632c88fd0", "score": "0.54085934", "text": "public function getFkEconomicoLicenca()\n {\n return $this->fkEconomicoLicenca;\n }", "title": "" }, { "docid": "57e63f26cde4212176bff69c172f80d5", "score": "0.5404325", "text": "public function SaveUnidades() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtNombre) $this->objUnidades->Nombre = $this->txtNombre->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Unidades object\n\t\t\t\t$this->objUnidades->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t\t$this->lstAnalisises_Update();\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8972d298d142e245197ac645d0d27342", "score": "0.5400136", "text": "public function setFields() {\n\n //instancia campos do formulário\n $this->blocoCampos = new TSetfields();\n\n if(count($this->obBloco->campos) > 0){\n foreach($this->obBloco->campos as $seq=>$dadosCampo){\n\n //instancia objetos campos\n $setCampo = new TSetCampo();\n $setCampo->setOutControl($dadosCampo->outcontrol);\n $setCampo->setNome($dadosCampo->colunadb);\n $setCampo->setId($dadosCampo->campo);\n $setCampo->setLabel($dadosCampo->label);\n \n $tipoCampo = $setCampo->getTipoCampo($dadosCampo->tpcaseq);\n $setCampo->setTipoDado($tipoCampo->tipodado);\n \n \n\t //Seta descrição do campo FK com pesquisa\n\t if($dadosCampo->ativapesquisa != 0){\n\t \t$setCampo->descPesq = $this->headerForm[TConstantes::HEAD_DADOSFORM][$dadosCampo->campo.'Label'];\n\t }\n \n $setCampo->setCampo($seq, $tipoCampo->tpcadesc, $dadosCampo->seletorJQ);\n $setCampo->setPropriedade('alteravel', $dadosCampo->alteravel);\n $setCampo->setValue($dadosCampo->valorpadrao);\n \n if($dadosCampo->manter == true){\n \t$setCampo->setPropriedade('manter', 'true');\n }else{\n \tif($dadosCampo->tipo != 'TButton'){\n \t\t$setCampo->setPropriedade('view', 'true');\n \t}\n }\n \n // atribui atributo para gravação do objeto [se abilitado]\n if($this->headerForm[TConstantes::FIELD_STATUS] == 'edit'){\n \t\n \tif($dadosCampo->alteravel == '0'){\n \t\t\n \t\t$dadosCampo->ativapesquisa = null;\n \t\t$setCampo->setPropriedade('manter', 'false');\n \t\n \t\n\t\t if($dadosCampo->tipo === 'TRadio' or $dadosCampo->tipo === 'TRadioGroup'){\n\t\t \t$setCampo->setPropriedade('onClick', 'this.blur(); return false;');\n\t\t }else{\n\t\t \t$setCampo->setPropriedade('readonly', '');\n\t\t \t$setCampo->setPropriedade('onfocus', 'this.blur(); return false;');\n\t\t } \n \t}\n }\n\n\n //Aplica mascara nos campos\n if(!empty($dadosCampo->mascara) and $dadosCampo->mascara != \"\" and $dadosCampo->tipo != 'TButton') {\n $setCampo->setPropriedade('onkeypress',\"livemask(this,\".$dadosCampo->mascara.\",this)\");\n $setCampo->setPropriedade('onkeyup',\"livemask(this,\".$dadosCampo->mascara.\",this)\");\n }\n\n //atribui uma propriedade seqao botão para ações associadas\n if($dadosCampo->tipo == 'TButton') {\n $setCampo->setPropriedade(TConstantes::SEQUENCIAL,$this->seq);\n }\n if($dadosCampo->tipo == 'TFrameFile' or $dadosCampo->tipo == 'TVoiceFrameFile' or $dadosCampo->tipo == 'TCsvFrameFile') {\n $setCampo->setPropriedade(TConstantes::SEQUENCIAL,$this->seq);\n $setCampo->setPropriedade('form',$this->formseq);\n }\n\n //atribui PROPRIEDADE DOS CAMPOS\n if(is_array($dadosCampo->props)) {\n foreach($dadosCampo->props as $nProp=>$ObProps) {\n //--- Adiciona propriedades aos campos usando a classe TSetFields\n $setCampo->setPropriedade($ObProps->metodo, $ObProps->valor);\n }\n }\n\n // Injeta campo no conteiner TSetFields\n $obCampo = $setCampo->getCampo();\n $this->blocoCampos->addCampo($dadosCampo->label, $obCampo, $dadosCampo->ativapesquisa);\n\n //borbulha mensagem [help] para o metodo responsavel\n if($dadosCampo->help) {\n $this->blocoCampos->setHelp($seq, $dadosCampo->help);\n }\n\n //configura trigger onload no campo\n if($dadosCampo->trigger) {\n $this->blocoCampos->addTrigger($seq, $dadosCampo->trigger);\n }\n\n }//foreach principal\n }\n\n //compila objtos anexos\n if($this->obAnexo) {\n foreach($this->obAnexo as $obAn) {\n $this->blocoCampos->addObjeto($obAn);\n }\n }\n\n $panel = new TElement('div');\n $panel->id = 'contFields'.$this->blocseq;\n $panel->add($this->blocoCampos->getConteiner());\n\n //============================================================================================\n // compila campo tipo TBloco (listagem aninhada)\n //============================================================================================\n if($this->obBloco->blocos) {\n foreach($this->obBloco->blocos as $bl) {\n\n $panelLista = new TElement('div');\n $panelLista->id = TConstantes::CONTEINER_LISTA.$bl->campo;\n $panelLista->style = 'border:1px solid #999999; padding:4px;';\n\n $nbloco = new TCompLista($bl->campo, TConstantes::CONTEINER_LISTA.$bl->campo);\n $lb = $nbloco->get();\n\n //$listDados = $listObj->getListDados();\n $panelLista->add($lb->getLista());\n\n $panel->add($panelLista);\n }\n }\n\n $this->obKDbo->close();\n\n return $panel; \n }", "title": "" }, { "docid": "fde5bf2e25380753507f255a25c89f06", "score": "0.5384919", "text": "function modificarBoletosObservados(){\r\n $this->procedimiento='obingresos.ft_boletos_observados_ime';\r\n $this->transaccion='OBING_BOBS_MOD';\r\n $this->tipo_procedimiento='IME';\r\n\r\n //Define los parametros para la funcion\r\n $this->setParametro('id_boletos_observados','id_boletos_observados','int4');\r\n $this->setParametro('estado_reg','estado_reg','varchar');\r\n $this->setParametro('pnr','pnr','varchar');\r\n $this->setParametro('nro_autorizacion','nro_autorizacion','varchar');\r\n $this->setParametro('moneda','moneda','varchar');\r\n $this->setParametro('importe_total','importe_total','numeric');\r\n $this->setParametro('fecha_emision','fecha_emision','date');\r\n $this->setParametro('estado_p','estado_p','varchar');\r\n $this->setParametro('forma_pago','forma_pago','varchar');\r\n $this->setParametro('medio_pago','medio_pago','varchar');\r\n $this->setParametro('instancia_pago','instancia_pago','varchar');\r\n $this->setParametro('office_id_emisor','office_id_emisor','varchar');\r\n $this->setParametro('pnr_prov','pnr_prov','varchar');\r\n $this->setParametro('nro_autorizacion_prov','nro_autorizacion_prov','varchar');\r\n $this->setParametro('office_id_emisor_prov','office_id_emisor_prov','varchar');\r\n $this->setParametro('importe_prov','importe_prov','numeric');\r\n $this->setParametro('moneda_prov','moneda_prov','varchar');\r\n $this->setParametro('estado_prov','estado_prov','varchar');\r\n $this->setParametro('fecha_autorizacion_prov','fecha_autorizacion_prov','date');\r\n $this->setParametro('tipo_error','tipo_error','varchar');\r\n $this->setParametro('tipo_validacion','tipo_validacion','varchar');\r\n $this->setParametro('prov_informacion','prov_informacion','varchar');\r\n //$this->setParametro('id_instancia_pago','id_instancia_pago','int4');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "title": "" }, { "docid": "33a04734d8e11b8688fffadac49132d8", "score": "0.5377461", "text": "public function atualizar() {\n\n if (!$this->access_rule->has_permission(5))\n $this->access_rule->no_access();\n \n \n if( !isset($_POST[\"idDisciplina\"]) )\n {\n $array = array(\n \"sucesso\" => false,\n \"Mensagem\" => \"<strong>Impossivel: </strong>Existem campos em branco \",\n \"tipo\" => \"nFailure\"\n );\n \n print_r(json_encode($array));\n return false;\n }\n \n \n $this->load->model('salasprofessoresdisciplinas');\n \n $salasProfessoresDisciplinas = new salasProfessoresDisciplinas();\n\n $salasProfessoresDisciplinas->set(\"idPessoa\", $_POST[\"idPessoa\"]);\n $salasProfessoresDisciplinas->set(\"idSala\", $_POST[\"idSala\"]);\n $salasProfessoresDisciplinas->set(\"idDisciplina\", $_POST[\"idDisciplina\"]);\n $salasProfessoresDisciplinas->set(\"idSalaProfessorDisciplina\", $_POST[\"id\"]);\n\n $salasProfessoresDisciplinas->atualizar($salasProfessoresDisciplinas);\n\n $array = array(\n \"sucesso\" => true,\n \"Mensagem\" => \"<strong>Sucesso: </strong>Registro Atualizado com sucesso!!! \",\n \"tipo\" => \"nSuccess\",\n \"redirecionar\" => true,\n \"url\" => \"salaProfessorDisciplina/obterSalaProfessorDisciplina\"\n );\n\n print_r(json_encode($array));\n }", "title": "" }, { "docid": "2601740021027d3b7fd1ac90d70cf992", "score": "0.53706604", "text": "static public function ctrEditarPoliticaProcedimiento(){\n\t\tif(isset($_POST[\"accionPoliticaProcedimiento\"]) && $_POST[\"accionPoliticaProcedimiento\"] == \"editar\"){\n\t\t\t$fecha = date('Y-m-d');\n\t\t\t$hora = date('H:i:s');\n\t\t\t$fechaActual = $fecha.' '.$hora;\t\t\t\n\t\t\t$tabla1 = 'vtaca_politica_procedimiento';\n\t\t\t$tabla2 = \"vtade_politica_procedimiento\";\n\t\t\t$codPoliticaProcedimiento = $_POST[\"codigoPoliticaProcedimiento\"];\n\t\t\t$datos = array(\"cod_politica\" => $codPoliticaProcedimiento,\n\t\t\t\t\t\t \"dsc_politica\" => ms_escape_string(trim($_POST[\"nombrePoliticaProcedimiento\"])),\n\t\t\t\t\t\t \"cod_usr_modifica\" => $_SESSION[\"cod_trabajador\"],\n\t\t\t\t\t\t \"fch_modifica\" => $fechaActual);\n\t\t\t$rutaGlobal = realpath(dirname(__FILE__));\n\t\t\t$rutaGlobal = rutaGlobal($rutaGlobal);\n\t\t\t$arrayArchivo = [];\n\t\t\t$arrayNombreArchivo = [];\n\t\t\t$numLineaArchivo = [];\n\t\t\t$arrayUsrRegistro = [];\n\t\t\t$arrayFchRegistro = [];\n\t\t\t$item = \"dsc_politica\";\n\t\t\t$valor = ms_escape_string(trim($_POST[\"nombrePoliticaProcedimiento\"]));\n\t\t\t$entrada = \"validarNombreRepetido\";\n\t\t\t$nombre = ModeloPoliticaProcedimiento::mdlMostrarPoliticaProcedimiento($tabla1,$item,$valor,$entrada);\n\t\t\t$item2 = \"cod_politica\";\n\t\t\t$valor2 = $codPoliticaProcedimiento;\n\t\t\t$entrada2 = \"capturarNombrePolitica\";\n\t\t\t$nombre2 = ModeloPoliticaProcedimiento::mdlMostrarPoliticaProcedimiento($tabla1,$item2,$valor2,$entrada2);\n\t\t\tif($nombre['contador'] == 0 || trim($_POST[\"nombrePoliticaProcedimiento\"]) == $nombre2[\"dsc_politica\"]){\n\t\t\t\tif($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"][0] != ''){\t\t\t\t\n\t\t\t\t\t$item = \"cod_politica\";\n\t\t\t\t\t$valor = $codPoliticaProcedimiento;\n\t\t\t\t\t$entrada = \"maximoNumLineaXPoliticaProcedimiento\";\n\t\t\t\t\t$maximoNumLineaPoliticaProcedimiento = ModeloPoliticaProcedimiento::mdlMostrarPoliticaProcedimientoDetalle($tabla2,$item,$valor,$entrada);\n\t\t\t\t\tfor ($i=0; $i < count($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"]) ; $i++) {\n\t\t\t\t\t\t$fileArchivo = $_FILES[\"archivoPoliticaProcedimiento\"];\n\t\t\t\t\t\t$nombreRutaArchivo = $codPoliticaProcedimiento.\"-\".($i+1+(int)$maximoNumLineaPoliticaProcedimiento[\"maximo\"]).\"-\".ms_escape_string(trim($fileArchivo[\"name\"][$i]));\n\t\t\t\t\t\tarray_push($arrayArchivo,$nombreRutaArchivo);\n\t\t\t\t\t\tarray_push($arrayNombreArchivo,ms_escape_string(trim($fileArchivo[\"name\"][$i])));\n\t\t\t\t\t\tarray_push($numLineaArchivo, $i+1+(int)$maximoNumLineaPoliticaProcedimiento[\"maximo\"]);\n\t\t\t\t\t\tarray_push($arrayUsrRegistro,$_SESSION[\"cod_trabajador\"]);\n\t\t\t\t\t\tarray_push($arrayFchRegistro,$fechaActual);\n\t\t\t\t\t}//for\t\n\t\t\t\t}\n\t\t\t\t$respuesta = ModeloPoliticaProcedimiento::mdlEditarPoliticaProcedimiento($tabla1,$tabla2,$datos,$numLineaArchivo,$arrayArchivo,$arrayNombreArchivo,$arrayUsrRegistro,$arrayFchRegistro,$codPoliticaProcedimiento);\n\t\t\t\tif($respuesta == \"ok\"){\n\t\t\t\t\tif($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"][0] != ''){\n\t\t\t\t\t\tfor ($i=0; $i < count($_FILES[\"archivoPoliticaProcedimiento\"][\"tmp_name\"]) ; $i++) {\n\t\t\t\t\t\t\t$nombreRutaArchivo = $codPoliticaProcedimiento.\"-\".($i+1+(int)$maximoNumLineaPoliticaProcedimiento[\"maximo\"]).\"-\".trim(utf8_decode($fileArchivo[\"name\"][$i]));\n\t\t\t\t\t\t\t$ruta = $rutaGlobal.\"/archivos/politica-procedimiento/\".$nombreRutaArchivo;\n\t\t\t\t\t\t\tmove_uploaded_file($fileArchivo[\"tmp_name\"][$i], $ruta);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$respuesta = \"nombreRepetido\";\n\t\t\t}\n\t\t\treturn $respuesta;\n\t\t}//if\n\t}", "title": "" }, { "docid": "6cba3942611572b9589b3a3dbe9a1657", "score": "0.53549033", "text": "public function actualizar_cliente_controlador(){\n //PARA AGREGAR INTERES\n // $cursointeres=$_POST['idespecialidad'];\n //$codigodeusuario=$_POST['codigousuario'];\n \n $idcliente=mainModel::limpiar_cadena($_POST['idcliente']);\n $nombre=mainModel::limpiar_cadena($_POST['nombre']);\n $apellidos=mainModel::limpiar_cadena($_POST['apellidos']);\n $correo=mainModel::limpiar_cadena($_POST['correo']);\n $telefono=mainModel::limpiar_cadena($_POST['telefono']);\n $profesion=mainModel::limpiar_cadena($_POST['profesion']);\n $grado=mainModel::limpiar_cadena($_POST['grado']);\n $pais=mainModel::limpiar_cadena($_POST['pais']);\n $departamento=mainModel::limpiar_cadena($_POST['departamento']);\n $distrito=mainModel::limpiar_cadena($_POST['distrito']);\n $direccion=mainModel::limpiar_cadena($_POST['direccion']);\n \n $dni=mainModel::limpiar_cadena($_POST['dni']);\n $fecha=mainModel::limpiar_cadena($_POST['fechanacimiento']);\n $alumno=mainModel::limpiar_cadena($_POST['alumno']);\n $detalle=mainModel::limpiar_cadena($_POST['detalle']);\n \n $datosClienteA=[\n \"Idcliente\"=>$idcliente,\n \"Nombre\"=>$nombre,\n \"Apellidos\"=>$apellidos,\n \"Correo\"=>$correo,\n \"Telefono\"=>$telefono,\n \"Profesion\"=>$profesion,\n \"Grado\"=>$grado,\n \"Pais\"=>$pais,\n \"Departamento\"=>$departamento,\n \"Distrito\"=>$distrito,\n \"Direccion\"=>$direccion,\n \n \"Dni\"=>$dni,\n \"Fecha\"=>$fecha,\n \"Detalle\"=>$detalle,\n \"Alumno\"=>$alumno\n \n ];\n $actualizarCliente=clienteModelo::actualizar_cliente_modelo($datosClienteA);\n \n \n \n $direccion=SERVERURL.\"sesionestados\";\n header('location:'.$direccion);\n \n \n \n \n }", "title": "" }, { "docid": "e9442ac205aa2ae80aa3332d66490e1b", "score": "0.5326359", "text": "function modificarProcesoCaja(){\n\t\t$this->procedimiento='tes.ft_proceso_caja_ime';\n\t\t$this->transaccion='TES_REN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_proceso_caja','id_proceso_caja','int4');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('id_comprobante_diario','id_comprobante_diario','int4');\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('motivo','motivo','text');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_fin','fecha_fin','date');\n\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('monto','monto','numeric');\n\t\t$this->setParametro('id_comprobante_pago','id_comprobante_pago','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('fecha_inicio','fecha_inicio','date');\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}", "title": "" }, { "docid": "25353ceee9f1d15bdb6ca86e8e3c6e0f", "score": "0.5322902", "text": "public function getFkImobiliarioLicenca()\n {\n return $this->fkImobiliarioLicenca;\n }", "title": "" }, { "docid": "25353ceee9f1d15bdb6ca86e8e3c6e0f", "score": "0.5322902", "text": "public function getFkImobiliarioLicenca()\n {\n return $this->fkImobiliarioLicenca;\n }", "title": "" }, { "docid": "26d86c6dd8281605c1fbb99ea48b25b3", "score": "0.52972746", "text": "public function testUpdateIdPerguntaCascade(){\n $mantenedor = new \\ExpertsAR\\Mantenedor();\n $mantenedor->setNome(\"Luis\")->setSenha(\"senha\")->setUsuario(\"luisac\");\n $mantenedor->setEmail(\"root@luisaurelio\");\n DAO::insert($mantenedor);\n \n $mantenedor = new \\ExpertsAR\\Mantenedor();\n $mantenedor->setNome(\"Rodrigo\")->setSenha(\"senha\")->setUsuario(\"rodrigo\");\n $mantenedor->setEmail(\"root@luisaurelio\");\n DAO::insert($mantenedor);\n \n $licao1 = new \\ExpertsAR\\Licao();\n $licao1->setNome(\"Projecao\")->setSlug(\"projecao\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(1);\n $licao2 = new \\ExpertsAR\\Licao();\n $licao2->setNome(\"Selecao\")->setSlug(\"selecao\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(2);\n $licao3 = new \\ExpertsAR\\Licao();\n $licao3->setNome(\"Funcoes\")->setSlug(\"funcoes\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(1);\n $licao4 = new \\ExpertsAR\\Licao();\n $licao4->setNome(\"Mais Funcoes\")->setSlug(\"mais-funcoes\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(1);\n $licao5 = new \\ExpertsAR\\Licao();\n $licao5->setNome(\"Alberto\")->setSlug(\"alberto\")->setTextoLicao(\"umtexto\")\n ->setIdMantenedorCriou(2);\n \n $pergunta = new \\ExpertsAR\\Pergunta();\n $pergunta->setEnunciado(\"Teste\")->setResposta(\"r\")->setIdLicao(5);\n \n DAO::insert($licao1);\n DAO::insert($licao2);\n DAO::insert($licao3);\n DAO::insert($licao4);\n DAO::insert($licao5);\n DAO::insert($pergunta);\n \n $licao = new \\ExpertsAR\\Licao(50);\n DAO::updateById($licao, 5);\n \n $this->assertEquals(NULL, DAO::selectById(\"\\ExpertsAR\\Licao\", \"Licoes\", 5));\n \n $cond = new Condicao(new Identificador(\"idLicao\"), \"=\", 5); \n $this->assertEquals(NULL, DAO::select(\"\\ExpertsAR\\Pergunta\", \"Perguntas\", $cond));\n \n \n $cond = new Condicao(new Identificador(\"idLicao\"), \"=\", 50); \n $result = DAO::select(\"\\ExpertsAR\\Pergunta\", \"Perguntas\", $cond);\n $this->assertEquals(1, $result->count());\n \n }", "title": "" }, { "docid": "271be39903b70c768dce84f5fc42a8f1", "score": "0.52899957", "text": "public function getFkLicitacaoConvenios()\n {\n return $this->fkLicitacaoConvenios;\n }", "title": "" }, { "docid": "f0cec0d370979b541a46ce0aaa4f6d93", "score": "0.5284505", "text": "public function save()\n {\n // Format url\n $this->Url = str_replace(' ', '-', utf8_translit($this->Url));\n\n parent::save();\n\n $relationEntity = CMS::MATERIAL_FIELD_RELATION_ENTITY;\n foreach (static::$fieldIDs as $fieldID => $fieldName) {\n $type = static::$fieldValueColumns[$fieldID];\n\n // If material field relation exists use it or create new\n $materialField = null;\n if (!$this->query\n ->entity($relationEntity)\n ->where(Field::F_PRIMARY, $fieldID)\n ->where(Material::F_PRIMARY, $this->id)\n ->first($materialField)\n ) {\n /** @var Field $materialfield */\n $materialField = new $relationEntity();\n $materialField->Active = 1;\n $materialField->MaterialID = $this->id;\n $materialField->FieldID = $fieldID;\n }\n\n // Set locale only if this field is localized\n if (array_key_exists($fieldID, static::$localizedFieldIDs)) {\n $materialField->locale = $this->locale;\n }\n\n $materialField->$type = $this->$fieldName;\n $materialField->save();\n }\n $this->attachTo(static::$navigationIDs);\n }", "title": "" }, { "docid": "66c6db52323cfd30ab75e575b43c9cce", "score": "0.5270512", "text": "function modificarSolicitud()\n {\n $this->procedimiento = 'mat.ft_solicitud_ime';\n $this->transaccion = 'MAT_SOL_MOD';\n $this->tipo_procedimiento = 'IME';\n\n //Define los parametros para la funcion\n $this->setParametro('id_solicitud', 'id_solicitud', 'int4');\n $this->setParametro('id_funcionario_sol', 'id_funcionario_sol', 'int4');\n $this->setParametro('id_proveedor', 'id_proveedor', 'int4');\n $this->setParametro('id_proceso_wf', 'id_proceso_wf', 'int4');\n $this->setParametro('id_estado_wf', 'id_estado_wf', 'int4');\n $this->setParametro('nro_po', 'nro_po', 'varchar');\n $this->setParametro('tipo_solicitud', 'tipo_solicitud', 'varchar');\n $this->setParametro('fecha_entrega_miami', 'fecha_entrega_miami', 'date');\n $this->setParametro('origen_pedido', 'origen_pedido', 'varchar');\n $this->setParametro('fecha_requerida', 'fecha_requerida', 'date');\n $this->setParametro('observacion_nota', 'observacion_nota', 'text');\n $this->setParametro('fecha_solicitud', 'fecha_solicitud', 'date');\n $this->setParametro('estado_reg', 'estado_reg', 'varchar');\n $this->setParametro('observaciones_sol', 'observaciones_sol', 'varchar');\n $this->setParametro('fecha_tentativa_llegada', 'fecha_tentativa_llegada', 'date');\n //$this->setParametro('fecha_despacho_miami','fecha_despacho_miami','date');\n $this->setParametro('fecha_cotizacion', 'fecha_cotizacion', 'date');\n $this->setParametro('justificacion', 'justificacion', 'varchar');\n $this->setParametro('fecha_arribado_bolivia', 'fecha_arribado_bolivia', 'date');\n $this->setParametro('fecha_desaduanizacion', 'fecha_desaduanizacion', 'date');\n $this->setParametro('fecha_entrega_almacen', 'fecha_entrega_almacen', 'date');\n $this->setParametro('cotizacion', 'cotizacion', 'numeric');\n $this->setParametro('tipo_falla', 'tipo_falla', 'varchar');\n $this->setParametro('nro_tramite', 'nro_tramite', 'varchar');\n $this->setParametro('id_matricula', 'id_matricula', 'int4');\n $this->setParametro('nro_solicitud', 'nro_solicitud', 'varchar');\n $this->setParametro('motivo_solicitud', 'motivo_solicitud', 'varchar');\n $this->setParametro('fecha_en_almacen', 'fecha_en_almacen', 'date');\n $this->setParametro('estado', 'estado', 'varchar');\n\n $this->setParametro('tipo_reporte', 'tipo_reporte', 'varchar');\n $this->setParametro('mel', 'mel', 'varchar');\n $this->setParametro('nro_no_rutina', 'nro_no_rutina', 'varchar');\n $this->setParametro('fecha_po', 'fecha_po', 'date');\n $this->setParametro('tipo_evaluacion', 'tipo_evaluacion', 'varchar');\n $this->setParametro('taller_asignado', 'taller_asignado', 'varchar');\n\n $this->setParametro('condicion', 'condicion', 'varchar');\n $this->setParametro('lugar_entrega', 'lugar_entrega', 'varchar');\n $this->setParametro('mensaje_correo', 'mensaje_correo', 'varchar');\n\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "title": "" }, { "docid": "c5943c994a02ab6ed58521c5defc1b43", "score": "0.5255446", "text": "public function actualizar_libros_controlador(){\n\n\t\t$cuenta=mainModel::decryption($_POST[\"codigo\"]);\n\t\t$ref= mainModel::limpiar_cadena($_POST['referencia-up']);\n\t\t$titulo=mainModel::limpiar_cadena($_POST[\"titulo-up\"]);\n\t\t$autor=mainModel::limpiar_cadena($_POST[\"autor-up\"]);\n\t\t$pais=mainModel::limpiar_cadena($_POST[\"pais-up\"]);\n\t\t$editorial=mainModel::limpiar_cadena($_POST[\"editorial-up\"]);\n\t\t$edicion=mainModel::limpiar_cadena($_POST[\"edicion-up\"]);\n\t\t$year=mainModel::limpiar_cadena($_POST[\"year-up\"]);\n\t\t$precio=mainModel::limpiar_cadena($_POST[\"precio-up\"]);\n\t\t$paginas=mainModel::limpiar_cadena($_POST[\"paginas-up\"]);\n\t\t$ubicacion=mainModel::limpiar_cadena($_POST[\"ubicacion-up\"]);\n\t\t$resumen=mainModel::limpiar_cadena($_POST[\"resumen-up\"]);\n\n\n\t\t$consulta1=mainModel::ejecutar_consulta_simple (\"SELECT * FROM libro WHERE id='$cuenta'\");\n\t\t\t\t\n\t\t\t\t$datosLibros=$consulta1->fetch();\n\n\t\t\t\tif($ref!=$datosLibros['LibroCodigo']){\n\t\t\t\t$const1=mainModel::ejecutar_consulta_simple(\"SELECT LibroCodigo FROM libro WHERE LibroCodigo='$ref'\");\n\t\t\t\tif($const1->rowCount()>=1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"La referencia del libro que acaba de actualizar ya se encuenta registrada.\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t\treturn mainModel::sweet_alert($alerta);\n\t\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t$datosLibrosAct=[\n\t\t\t\t\t\t\"Referencia\"=>$ref,\n\t\t\t\t\t\t\"Titulo\"=>$titulo,\n\t\t\t\t\t\t\"Autor\"=>$autor,\n\t\t\t\t\t\t\"Pais\"=>$pais,\n\t\t\t\t\t\t\"Year\"=>$year,\n\t\t\t\t\t\t\"Editorial\"=>$editorial,\n\t\t\t\t\t\t\"Edicion\"=>$edicion,\n\t\t\t\t\t\t\"Precio\"=>$precio,\n\t\t\t\t\t\t\"Paginas\"=>$paginas,\n\t\t\t\t\t\t\"Ubicacion\"=>$ubicacion,\n\t\t\t\t\t\t\"Resumen\"=>$resumen,\n\t\t\t\t\t\t\"Id\"=>$cuenta\n\t\t\t\t\t\t];\n\n\t\t\tif(librosModelo::actualizar_libros_modelo($datosLibrosAct)){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Datos actualizados\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Los datos fueron actualizados de manera satisfactoria.\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t\t];\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\"Texto\"=>\"Los datos no han podido ser actualizar los datos, por favor intente nuevamente.\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\treturn mainModel::sweet_alert($alerta);\n\t}", "title": "" }, { "docid": "003fc233edf4a8567b73f960ec3e8043", "score": "0.5240612", "text": "public static function ctrEditarPreRegistro()\n {\n // {\n if (isset($_POST[\"editarNoControlPR\"])) {\n if ($_POST[\"editarAsesorPRE\"] != \"NA\" || $_POST[\"CheckPreRegistroEdit\"] == \"on\") {\n // if ($_POST[\"editarAsesorPRE\"] != \"NA\") {\n $tabla = \"preregistros\";\n $item = 'id';\n $valor = $_POST['idPreRegistroEdit'];\n $DocenteAnterior = ControladorPreRegistro::ctrMostrarInfoPreRegistro($item, $valor);\n \n \n if ($_POST[\"CheckPreRegistroEdit\"] == \"on\") {\n $aux = 1;\n }else{\n $aux = 0;\n }\n $datos = array(\n \"id\" => $_POST[\"idPreRegistroEdit\"],\n \"noControl\" => $_POST[\"editarNoControlPR\"],\n \"carrera\" => $_POST[\"editarCarreraPR\"],\n \"telefono\" => $_POST[\"editarTelefonoPR\"],\n \"nombre\" => $_POST[\"editarNombrePR\"],\n \"apellidoP\" => $_POST[\"editarApellidoPPR\"],\n \"apellidoM\" => $_POST[\"editarApellidoMPR\"],\n \"asesorPre\" => $_POST[\"editarAsesorPRE\"],\n \"aux\" => $aux\n );\n $respuesta = ModeloPreRegistro::mdlEditarPreRegistro($tabla, $datos);\n if ($respuesta == \"ok\") {\n $tablaDocente = \"asesor\";\n // NOTE corregir resta a asesor\n if ($_POST[\"CheckPreRegistroEdit\"] != \"on\") {\n $res1 = ModeloResidentes::mdlSumarResidente($tablaDocente, $_POST[\"editarAsesorPRE\"]);\n $res1 = ModeloResidentes::mdlRestarResidente($tablaDocente, $DocenteAnterior['asesorPre']);\n }\n echo \"<script>\n Swal.fire({\n position: 'top',\n type: 'success',\n title: '¡Actualizado Correctamente!',\n showConfirmButton: false,\n timer: 1100\n }).then((result)=>{\n window.location = 'Pre-Registro';\n });\n </script>\";\n }\n }else{\n echo '<script>\n\t\t\t\t Swal.fire({\n\t\t\t\t\t\ttype: \"error\",\n title: \"¡Error!\",\n text: \"¡No puedes registrar sin asesores! Si no quieres cambiar el asesor, primero marca el check.\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t }).then((result)=>{\n\t\t\t\t\t if(result.value){\n\t\t\t\t\t\t window.location = \"Pre-Registro\";\n\t\t\t\t\t }\n\t\t\t\t\t });\n\t\t\t\t </script>';\n }\n }\n // }\n }", "title": "" }, { "docid": "165258ec324e6138bb8d2af2edb4d8df", "score": "0.523818", "text": "public function modificar_metas($curso_id, $asignatura_id, $logro_id)\n {\n\n $registro = Meta::find($logro_id);\n\n // Se obtiene el modelo según la variable modelo_id de la url\n $modelo = Modelo::find($this->modelo_id);\n\n $lista_campos = ModeloController::get_campos_modelo($modelo, '', 'create');\n\n // Se Personalizan los campos\n for ($i = 0; $i < count($lista_campos); $i++) {\n\n switch ($lista_campos[$i]['name']) {\n case 'curso_id':\n $curso = Curso::find($curso_id);\n $lista_campos[$i]['opciones'] = [$curso_id => $curso->descripcion];\n break;\n case 'asignatura_id':\n $asignatura = Asignatura::find($asignatura_id);\n $lista_campos[$i]['opciones'] = [$asignatura_id => $asignatura->descripcion];\n break;\n case 'escala_valoracion_id':\n $lista_campos[$i]['value'] = $registro->escala_valoracion_id;\n break;\n case 'descripcion':\n $lista_campos[$i]['value'] = $registro->descripcion;\n break;\n case 'periodo_id':\n $lista_campos[$i]['value'] = $registro->periodo_id;\n break;\n case 'estado':\n $lista_campos[$i]['value'] = $registro->estado;\n break;\n case 'guardar_y_nuevo_logro':\n $lista_campos[$i]['value'] = '';\n break;\n\n default:\n # code...\n break;\n }\n }\n\n // Crear un nuevo campo\n $lista_campos[$i]['tipo'] = 'hidden';\n $lista_campos[$i]['name'] = 'logro_id';\n $lista_campos[$i]['descripcion'] = '';\n $lista_campos[$i]['opciones'] = '';\n $lista_campos[$i]['value'] = $logro_id;\n $lista_campos[$i]['atributos'] = [];\n $lista_campos[$i]['requerido'] = true;\n\n $form_create = [\n 'url' => $modelo->url_form_create,\n 'campos' => $lista_campos\n ];\n\n $url_action = $modelo->url_form_create;\n\n $miga_pan = [\n ['url' => 'academico_docente?id=' . Input::get('id'), 'etiqueta' => 'Académico docente'],\n ['url' => 'NO', 'etiqueta' => 'Ingresar propósitos']\n ];\n\n //return view('academico_docente.ingresar_metas',compact('form_create','miga_pan'));\n return view('layouts.create', compact('form_create', 'miga_pan', 'registro', 'url_action'));\n }", "title": "" }, { "docid": "51d2aabf8a3cfb0bc79916f6e4b7784b", "score": "0.52224284", "text": "static function Editar\n (\n $id_producto, \n $clasificaciones = null, \n $codigo_de_barras = null, \n $codigo_producto = null, \n $compra_en_mostrador = null, \n $control_de_existencia = null, \n $costo_estandar = null, \n $costo_extra_almacen = null, \n $descripcion_producto = null, \n $empresas = null, \n $foto_del_producto = null, \n $garantia = null, \n $id_unidad = null, \n $id_unidad_compra = null, \n $impuestos = null, \n $metodo_costeo = null, \n $nombre_producto = null, \n $peso_producto = null, \n $precio = null, \n $visible_en_vc = null\n )\n {\n Logger::log(\"== Editando producto \" . $id_producto . \" ==\");\n \n \n \n //se validan los parametros recibidos\n $validar = self::validarParametrosProducto($id_producto, $compra_en_mostrador, $metodo_costeo, null, $codigo_producto, $nombre_producto, $garantia, $costo_estandar, $control_de_existencia, $descripcion_producto, $foto_del_producto, $costo_extra_almacen, $codigo_de_barras, $peso_producto, $id_unidad, $precio);\n \n if (is_string($validar)) {\n Logger::error($validar);\n throw new Exception($validar);\n } //is_string($validar)\n \n $producto = ProductoDAO::getByPK($id_producto);\n \n //Los parametros que no sean nulos seran tomados como una actualizacion\n \n if (!is_null($compra_en_mostrador)) {\n $producto->setCompraEnMostrador($compra_en_mostrador);\n } //!is_null($compra_en_mostrador)\n \n if (!is_null($descripcion_producto)) {\n $producto->setDescripcion($descripcion_producto);\n } //!is_null($descripcion_producto)\n \n if (!is_null($metodo_costeo)) {\n $producto->setMetodoCosteo($metodo_costeo);\n } //!is_null($metodo_costeo)\n \n if (!is_null($codigo_producto)) {\n $producto->setCodigoProducto(trim($codigo_producto));\n } //!is_null($codigo_producto)\n \n if (!is_null($nombre_producto)) {\n $producto->setNombreProducto(trim($nombre_producto));\n } //!is_null($nombre_producto)\n \n if (!is_null($garantia)) {\n $producto->setGarantia($garantia);\n } //!is_null($garantia)\n \n if (!is_null($costo_estandar)) {\n\t\t\t$costo_estandar = ($metodo_costeo == \"costo\")? $costo_estandar : null;//sólo en caso de que se haya seleccionado metodo_costeo == 'costo' tomar en cuenta este valor ver API\n $producto->setCostoEstandar($costo_estandar);\n } //!is_null($costo_estandar)\n \n if (!is_null($control_de_existencia)) {\n $producto->setControlDeExistencia($control_de_existencia);\n } //!is_null($control_de_existencia)\n \n if (!is_null($foto_del_producto)) {\n $producto->setFotoDelProducto($foto_del_producto);\n } //!is_null($foto_del_producto)\n \n if (!is_null($costo_extra_almacen)) {\n $producto->setCostoExtraAlmacen($costo_extra_almacen);\n } //!is_null($costo_extra_almacen)\n \n if (!is_null($codigo_de_barras)) {\n $producto->setCodigoDeBarras(trim($codigo_de_barras));\n } //!is_null($codigo_de_barras)\n \n if (!is_null($peso_producto)) {\n $producto->setPesoProducto($peso_producto);\n } //!is_null($peso_producto)\n \n if (!is_null($id_unidad)) {\n $producto->setIdUnidad($id_unidad);\n } //!is_null($id_unidad)\n\n\t\tif (!is_null($id_unidad_compra)) {\n $producto->setIdUnidadCompra($id_unidad_compra);\n } //!is_null($id_unidad_compra)\n \n if (!is_null($precio)) {\n $producto->setPrecio($precio);\n } //!is_null($precio)\n\n if (!is_null($visible_en_vc)) {\n $producto->setVisibleEnVc($visible_en_vc);\n }\n \n if ($metodo_costeo == \"precio\" && is_null($producto->getPrecio())) {\n Logger::error(\"Se intenta registrar un producto con metodo de costeo precio sin especificar un precio\");\n throw new Exception(\"Se intenta registrar un producto con metodo de costeo precio sin especificar un precio\", 901);\n } //$metodo_costeo == \"precio\" && is_null($producto->getPrecio())\n \n else if ($metodo_costeo == \"costo\" && is_null($producto->getCostoEstandar())) {\n Logger::error(\"Se intenta registrar un producto con metodo de costeo costo sin especificar un costo estandar\");\n throw new Exception(\"Se intenta registrar un producto con metodo de costeo costo sin especificar un costo estandar\", 901);\n } //$metodo_costeo == \"costo\" && is_null($producto->getCostoEstandar())\n \n DAO::transBegin();\n try {\n ProductoDAO::save($producto);\n //Si se reciben empresas, clasificaciones y/o impuestos se modifican en sus respectivas tablas\n //\n //Primero se guardan o actualizan los registros pasados en la lista, despues se recorren los registros\n //actuales y si alguno no se encuentra en la lista se elimina.\n if (!is_null($empresas)) {\n $empresas = object_to_array($empresas);\n \n if (!is_array($empresas)) {\n throw new Exception(\"Las empresas fueron enviadas incorrectamente\", 901);\n } //!is_array($empresas)\n \n $producto_empresa = new ProductoEmpresa(array(\n \"id_producto\" => $id_producto\n ));\n foreach ($empresas as $empresa) {\n $validar = self::validarParametrosProductoEmpresa($empresa);\n if (is_string($validar))\n throw new Exception($validar, 901);\n \n $producto_empresa->setIdEmpresa($empresa);\n ProductoEmpresaDAO::save($producto_empresa);\n } //$empresas as $empresa\n $productos_empresa = ProductoEmpresaDAO::search(new ProductoEmpresa(array(\n \"id_producto\" => $id_producto\n )));\n foreach ($productos_empresa as $p_e) {\n $encontrado = false;\n foreach ($empresas as $empresa) {\n if ($empresa == $p_e->getIdEmpresa()) {\n $encontrado = true;\n } //$empresa == $p_e->getIdEmpresa()\n } //$empresas as $empresa\n if (!$encontrado)\n ProductoEmpresaDAO::delete($p_e);\n } //$productos_empresa as $p_e\n } //!is_null($empresas)\n \n /* Fin if de empresas */\n if (!is_null($clasificaciones)) {\n $clasificaciones = object_to_array($clasificaciones);\n \n if (!is_array($clasificaciones)) {\n throw new Exception(\"Las clasificaciones fueron recibidas incorrectamente\", 901);\n } //!is_array($clasificaciones)\n \n $producto_clasificacion = new ProductoClasificacion(array(\n \"id_producto\" => $id_producto\n ));\n foreach ($clasificaciones as $clasificacion) {\n $c = ClasificacionProductoDAO::getByPK($clasificacion);\n if (is_null($c))\n throw new Exception(\"La clasificacion de producto con id \" . $clasificacion . \" no existe\", 901);\n \n if (!$c->getActiva())\n throw new Exception(\"La clasificaicon de producto con id \" . $clasificacion . \" no esta activa\", 901);\n \n $producto_clasificacion->setIdClasificacionProducto($clasificacion);\n ProductoClasificacionDAO::save($producto_clasificacion);\n } //$clasificaciones as $clasificacion\n $productos_clasificacion = ProductoClasificacionDAO::search(new ProductoClasificacion(array(\n \"id_producto\" => $id_producto\n )));\n foreach ($productos_clasificacion as $p_c) {\n $encontrado = false;\n foreach ($clasificaciones as $clasificacion) {\n if ($clasificacion == $p_c->getIdClasificacionProducto()) {\n $encontrado = true;\n } //$clasificacion == $p_c->getIdClasificacionProducto()\n } //$clasificaciones as $clasificacion\n if (!$encontrado)\n ProductoClasificacionDAO::delete($p_c);\n } //$productos_clasificacion as $p_c\n } //!is_null($clasificaciones)\n \n /* Fin if de clasificaciones */\n if (!is_null($impuestos)) {\n $impuestos = object_to_array($impuestos);\n \n if (!is_array($impuestos)) {\n throw new Exception(\"Los impuestos fueron recibidos incorrectamente\", 901);\n } //!is_array($impuestos)\n \n $impuesto_producto = new ImpuestoProducto(array(\n \"id_producto\" => $producto->getIdProducto()\n ));\n foreach ($impuestos as $impuesto) {\n if (is_null(ImpuestoDAO::getByPK($impuesto)))\n throw new Exception(\"El impuesto con id \" . $impuesto . \" no existe\", 901);\n $impuesto_producto->setIdImpuesto($impuesto);\n ImpuestoProductoDAO::save($impuesto_producto);\n } //$impuestos as $impuesto\n $impuestos_producto = ImpuestoProductoDAO::search(new ImpuestoProducto(array(\n \"id_producto\" => $id_producto\n )));\n foreach ($impuestos_producto as $i_p) {\n $encontrado = false;\n foreach ($impuestos as $impuesto) {\n if ($impuesto == $i_p->getIdImpuesto()) {\n $encontrado = true;\n } //$impuesto == $i_p->getIdImpuesto()\n } //$impuestos as $impuesto\n if (!$encontrado)\n ImpuestoProductoDAO::delete($i_p);\n } //$impuestos_producto as $i_p\n } //!is_null($impuestos)\n \n /* Fin if de impuestos */\n }\n catch (Exception $e) {\n DAO::transRollback();\n Logger::error(\"El producto no pudo ser editado: \" . $e);\n if ($e->getCode() == 901)\n throw new Exception(\"El producto no pudo ser editado: \" . $e->getMessage(), 901);\n throw new Exception(\"El producto no pudo ser editado\", 901);\n }\n DAO::transEnd();\n Logger::log(\"Producto editado exitosamente\");\n \n }", "title": "" }, { "docid": "c3c6a4b42b2b29b78936ef123d91cef7", "score": "0.52217466", "text": "public function ocuparLicencia($idLicenciaVincular){\n\t\t\n\t\t$query = \"UPDATE tb_licencias SET estado = 'EnUso' WHERE idLicencia = '$idLicenciaVincular' \";\n\t\t\n\t\t$conexion = parent::conexionAdmin();\n\t\t\n\t\t$res = $conexion->query($query);\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "6a99ea4c9f6c6e6426838a74e9361d29", "score": "0.5195367", "text": "public function update(Request $request, Compra $compra){\n\n // Verificamos que todos los detalles de la compra\n // hallan registrado sus ingresos a las tiendas.\n foreach ($compra->detalles as $detalle) {\n if (count($detalle->ingresos) == 0) {\n // Si el detalle no tiene registrado ingresos a las tiendas, no se guarda la compra.\n return redirect('compra/'.$compra->id.'/edit')->with('error', 'DEBE INGRESAR TODOS LOS PRODUCTOS A LAS TIENDAS.');\n }\n }\n // Si ya estan registrados todos los ingresos a las tiendas, guardamos la compra\n // y mostamos la lista de compras.\n\n // Primero guardamos al proveedor.\n\n //Verificamos si la empresa ya existe;\n if ($empresa = \\App\\Empresa::find($request->ruc)) {\n // Si la empresa exite, actualizamos sus datos.\n $empresa->nombre = mb_strtoupper($request->razonSocial);\n $empresa->direccion = mb_strtoupper($request->direccion);\n $empresa->save();\n }else {\n // Si no existe, lo guardamos en la base de datos.\n $empresa = new \\App\\Empresa;\n $empresa->ruc = $request->ruc;\n $empresa->nombre = mb_strtoupper($request->razonSocial);\n $empresa->direccion = mb_strtoupper($request->direccion);\n $empresa->save();\n }\n\n // Verificamos si la empresa es un proveedor.\n if ($proveedor = \\App\\Proveedor::where('empresa_ruc', $request->ruc)->first()) {\n // Si el proveedor existe, actualizamos sus datos.\n $proveedor->telefono = mb_strtoupper($request->telefono);\n $proveedor->representante = mb_strtoupper($request->representante);\n $proveedor->save();\n }else {\n // Si no existe, guardamos sus datos.\n $proveedor = new \\App\\Proveedor;\n $proveedor->empresa_ruc = $request->ruc;\n $proveedor->telefono = mb_strtoupper($request->telefono);\n $proveedor->representante = mb_strtoupper($request->representante);\n $proveedor->save();\n }\n\n // Actualizamos los datos de la compra y cambiamos su estado a 0.\n // Primero verificamos si tienes detalles de compra.\n if (count($compra->detalles) > 0) {\n // Si existen detalles, actualizamos los datos de la compra.\n $compra->usuario_id = Auth::user()->id;\n $compra->proveedor_id = $proveedor->id;\n $compra->numero = $request->numero;\n $compra->estado = 0;\n $compra->save();\n\n return redirect('compra')->with('correcto', 'LA COMPRA FUE MODIFICADA CON EXITO CON EXITO.');\n }else{\n // si no tiene detalles de compra, eliminamos la compra.\n $compra->delete();\n return redirect('compra')->with('info', 'LA COMPRA FUE ELIMINADO POR NO CONTAR CON DETALLES.');\n }\n }", "title": "" }, { "docid": "c0b17fbe4a7242219549a12a3b8adca3", "score": "0.51897407", "text": "public function getFkLicitacaoConvenioAditivos()\n {\n return $this->fkLicitacaoConvenioAditivos;\n }", "title": "" }, { "docid": "6feeef1da735c86d5674a826ffb49274", "score": "0.51789606", "text": "public function save() {\n\t\t$caract = array('\\'','\"','&','$','=','?');\n\t\t$this->fields['reference'] = str_replace($caract,'-',$this->fields['reference']);\n\n\t\t//Mysql n'aime pas les , dans les float\n\t\t$this->fields['poids'] = isset($this->fields['poids']) ? str_replace(',','.',$this->fields['poids']) : '';\n\t\t$this->fields['putarif_0'] = isset($this->fields['putarif_0']) ? str_replace(',','.',$this->fields['putarif_0']) : '';\n\t\t$this->fields['puttc'] = isset($this->fields['puttc']) ? str_replace(',','.',$this->fields['puttc']) : '';\n\n\t\t// Unité de vente par défaut\n\t\tif (empty($this->fields['uvente'])) {\n\t\t\t$this->fields['uvente'] = 1;\n\t\t}\n\n\t\treturn parent::save(self::MY_GLOBALOBJECT_CODE);#on peut sauvegarder\n\t}", "title": "" }, { "docid": "5d265c67aec52cbd4e1227e22b81fff2", "score": "0.51755875", "text": "public function modificarOrden($idf, $pares, $lug, $fecd, $hord, $caud, $lud, $panv, $hov, $ubv, $fev, $igv, $prpv, $tempv, $horv, $ate, $mode, $ure, $modee, $cae, $creme, $eme, $otre, $adoe, $luge, $care, $trase, $sube, $ime, $cere, $ote, $obe, $tote, $nomf, $domfin, $ciu, $fechf, $edf, $apf, $nuf, $colf, $ecf, $escf, $apmf, $naf, $ocf, $dhf, $sef, $nev, $apav, $apmae, $fede, $abono) {\n $res=$tote-$abono;\n $datos = array(\n \n// 'FechaOrden' => $fec,\n// 'Solicitantes_idSolicitantes' => $soli,\n// 'Sucursal_idSucursal' => $suc,\n// 'PersonaAtendio' => $pers,\n 'Parentesco' =>$pares,\n 'LugarDifuncion' => $lug,\n 'Fecha' => $fecd,\n 'Hora' => $hord,\n 'Causa' => $caud,\n 'LugarVelacion' => $lud,\n 'Panteon' => $panv,\n 'HoraMisa' => $hov,\n 'Ubicacion' => $ubv,\n 'FechaMisa' => $fev,\n 'Iglesia' => $igv,\n 'Perpetuidad' => $prpv,\n 'Temporal' => $tempv,\n 'HoraSepelio' => $horv,\n 'Ataud' => $ate,\n 'ModeloAtaud' => $mode,\n 'Urna' => $ure,\n 'ModeloUrna' => $modee,\n 'Capillas' => $cae,\n 'Cremacion' => $creme,\n 'Embalsamado' => $eme,\n 'OtrosGastos' => $otre,\n 'Adomicilio' => $adoe,\n 'LugarCremacion' => $luge,\n 'Carroza' => $care,\n 'Traslado' => $trase,\n 'SubTotal' => $sube,\n 'Impuestos' => $ime,\n 'CertificadoMedico' => $cere,\n 'Otros' => $ote,\n 'Observaciones' => $obe,\n 'Total' => $tote,\n 'NombreFinado' => $nomf,\n 'ApellidoFinPa' => $apf,\n 'ApellidoFinMa' => $apmf,\n 'DomicilioFinado' => $domfin,\n 'NumeroFinado' => $nuf,\n 'Nacionalidad' => $naf,\n 'CiudadFinado' => $ciu,\n 'ColoniaFinado' => $colf,\n 'Ocupacion' => $ocf,\n 'FechaNacimiento' => $fechf,\n 'EstadoCivil' => $ecf,\n 'DerechoHabiente' => $dhf,\n 'Edad' => $edf,\n 'Escolaridad' => $escf,\n 'Sexo' => $sef,\n 'NombreFinExhumar' => $nev,\n 'ApellidoPaterno' => $apav,\n 'ApellidoMaterno' => $apmae,\n 'FechaDifuncionExhumar' => $fede,\n 'Restante' => $res\n );\n\n $this->db->where('Folio', $idf);\n $this->db->update('orden', $datos);\n \n }", "title": "" }, { "docid": "4ffd5e321a646676dc203aea20138c71", "score": "0.51636034", "text": "function saveChanges(){\n $nid = $this ->getNid();\n \n entity_save('plz', $this ->entity);\n $this -> manager -> rebuildAusgabenAccess($nid);\n }", "title": "" }, { "docid": "2b22fb9ab71719e08c5e97c3fb3a7612", "score": "0.51511174", "text": "public function licencias()\n \t\t{\n \t\t\treturn $this->hasMany(Licencia::class);\n \t\t}", "title": "" }, { "docid": "c9ca0810d683923a60a951d1c08f08b1", "score": "0.5142195", "text": "public function UpdateGrado() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtGradoId) $this->objGrado->GradoId = $this->txtGradoId->Text;\n\n\t\t\t\tif ($this->txtGrado) $this->objGrado->Grado = $this->txtGrado->Text;\n\n\t\t\t\tif ($this->txtCreateby) $this->objGrado->Createby = $this->txtCreateby->Text;\n\n\t\t\t\tif ($this->calCreated) $this->objGrado->Created = $this->calCreated->DateTime;\n\n\t\t\t\tif ($this->txtUpdateby) $this->objGrado->Updateby = $this->txtUpdateby->Text;\n\n\t\t\t\tif ($this->calUpdated) $this->objGrado->Updated = $this->calUpdated->DateTime;\n\n\t\t\t\tif ($this->txtActive) $this->objGrado->Active = $this->txtActive->Text;\n\n\t\t\t\tif ($this->lstNivel) $this->objGrado->NivelId = $this->lstNivel->SelectedValue;\n\n\n\t\t\t\t// Update any UniqueReverseReferences for controls that have been created for it\n\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "3cf6ef375bec3dad60361b159482d6ee", "score": "0.513185", "text": "public function editar($arg)\n {\n require_once DIRMODULOS . 'Consultorios/Forms/CargaConsultorios.php';\n require_once LibQ . 'LibQ_BarraHerramientas.php';\n $consultorioBuscado = $this->_modelo->buscarSalon($arg);\n if (is_object($consultorioBuscado)) {\n $this->_varForm['id'] = $consultorioBuscado->id;\n $this->_varForm['consultorio'] = $consultorioBuscado->consultorio;\n $this->_varForm['division'] = $consultorioBuscado->division;\n $this->_varForm['turno'] = $consultorioBuscado->turno;\n $this->_varForm['docente'] = $consultorioBuscado->docente;\n } else {\n $this->_varForm['id'] = '0';\n $this->_varForm['consultorio'] = '';\n $this->_varForm['division'] = '';\n $this->_varForm['turno'] = '';\n $this->_varForm['docente'] = '';\n }\n $listaDocentes = $this->_obtenerListaDocentes();\n $listaTurnos = $this->_listarTurnos();\n $this->_form = new Form_CargaConsultorios($listaDocentes,$listaTurnos, $this->_varForm);\n $this->_vista->form = $this->_form->mostrar();\n if ($_POST) {\n if ($this->_form->isValid($_POST)) {\n $values = $this->_form->getValidValues($_POST);\n print_r($values);\n $this->_modelo->actualizar($values, $arg);\n $messages[] = DATOSGUARDADOS;\n $this->_vista->mensajes = Mensajes::presentarMensaje($messages, 'info');\n }\n }\n $bh = new LibQ_BarraHerramientas($this->_vista);\n $bh->addBoton('Nuevo', $this->_paramBotonNuevoSalon); \n $bh->addBoton('Guardar', $this->_paramBotonGuardar);\n// $bh->addBoton('Eliminar', 'consultorios', $this->_varForm['id']);\n $bh->addBoton('Lista', $this->_paramBotonLista);\n $this->_vista->LibQ_BarraHerramientas = $bh->render();\n $foto = '<div id=mostrarFoto><img src=\"' . IMG . 'fotos/id' . $this->_varForm['id'] . '.png\" class=\"mostrarFoto\"/></div>';\n $this->_vista->foto = $foto;\n $this->_layout->content = $this->_vista->render('AgregarConsultoriosVista.php');\n // render final layout\n echo $this->_layout->render();\n }", "title": "" }, { "docid": "132d1304d9c8818f180bc8b6643d1cd9", "score": "0.5130477", "text": "function editar_registro2(){\n $this->accion=\"Editar Registro de Cliente\";\n if (isset($_POST['envio']) && $_POST['envio']==\"Actualizar\"){\n $id=$_GET['id'];\n $this->asignar_valores();\n $this->nacimiento=$this->convertir_fecha($this->nacimiento);\n $sql=\"UPDATE registro SET categoria_reg='$this->categoria', nombre_reg='$this->nombre', apellido_reg='$this->apellido', sexo_reg='$this->sexo', nacimiento_reg='$this->nacimiento', lugar_reg='$this->lugar', tipo_reg='$this->tipo', cedula_reg='$this->cedula', correo_reg='$this->correo', correo2_reg='$this->correo2', telefono_reg='$this->telefono', celular_reg='$this->celular', direccion_reg='$this->direccion', pais_reg='$this->pais', estado_reg='$this->estado', municipio_reg='$this->municipio', website_reg='$this->website' , publicidad_reg='$this->publicidad', medio_reg='$this->medio', catalogo_reg='$this->catalogo' WHERE id_reg='$id'\";\n $consulta=mysql_query($sql) or die(mysql_error());\n $this->mensaje=2;\n //header(\"location:/perfil.php\");\n\n }else{\n $this->mostrar_registro();\n }\n }", "title": "" }, { "docid": "5c51db18b0322a24f58a0fa57c63de4e", "score": "0.5128864", "text": "public function edit($id)\n {\n $owner = Auth::user()->owner;\n //asegurar que este propietario es dueño de esta propiedad\n $property = $owner->properties()->findOrFail($id);\n\n $countries = Country::all(); // Only Spain by now, 1 record\n\n // @TODO @DCA 2020-09-01 refactorizado el IF para un simple TRUE, FALSE sobre la misma variable.\n // $edit_active = false;\n // if (\n // $property->historical->last()->status->id == 2\n // || $property->historical->last()->status->id == 6\n // ) {\n // $edit_active = true;\n // }\n\n //variable que le pasamos a la vista para activar o desactivar la edicion\n //si la propiedad esta activa o en proceso de propietario,\n //podemos editarla\n $edit_active = in_array($property->historical->last()->status->id, [2, 6]);\n\n $agency_commissions_value = ($property->price * $property->agency_commissions*0.01);\n if($property->owner->type=='agente' && $agency_commissions_value<2000)\n $agency_commissions_value = 2000;\n elseif($property->owner->type!='agente' && $agency_commissions_value<3000)\n $agency_commissions_value = 3000;\n\n $iva = $agency_commissions_value*0.21;\n $calculated_commission = $property->price - $agency_commissions_value - $iva;\n\n $property->agency_commissions_value = number_format($agency_commissions_value, 2, \",\", \".\") ;\n $property->iva = number_format($iva, 2, \",\", \".\") ;\n $property->calculated_commission = number_format($calculated_commission, 2, \",\", \".\");\n //$property->price = number_format($property->price, 2, \",\", \".\");\n // $property->agency_commissions = number_format($property->agency_commissions, 2, \",\", \".\");\n\n\n $minimum_commission=0;\n if(Auth::user()->type=='owner' && Auth::user()->owner->type=='agente'){\n $minimum_commission = Config::minimum_commission_agente();\n }\n else{\n $minimum_commission = Config::minimum_commission();\n }\n\n if ($property != null) {\n return view(\n 'properties.edit_property',\n [\n 'edit_active' => $edit_active,\n 'minimum_commission' => $minimum_commission,\n 'property_subtype' => $property->propertyable,\n 'property' => $property,\n 'countries' => $countries,\n 'owner' => $owner,\n 'count_re_favs' => $this->countRealEstateFavsNumber($id),\n 'countOpenCards' => $this->countOpenCards($id),\n\n ]\n );\n } else {\n return redirect('/owner')->withErrors('Esta propiedad no se corresponde con este propietario');\n }\n }", "title": "" }, { "docid": "0674215b1deb976eb197420290de33d7", "score": "0.5122173", "text": "public function save(){\n\t\tif ($this->changed && !$this->deleted){\n\t\t\t$prop = \"\";\n\t\t\tforeach ($this->fields as $field){\n\t\t\t\t/** @var DBItemField $field */\n\t\t\t\t$field->saveDependencies($this);\n\t\t\t}\n\t\t\tforeach ($this->newValues as $name => $value){\n\t\t\t\t$field = $this->getField($name);\n\t\t\t\tif ($field && $field->saveDependencies($this)){\n\t\t\t\t\t$field->appendDBNameAndValueForUpdate($value, $prop);\n\t\t\t\t\t$this->makeRealNewValueOld($field);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (strlen($prop) !== 0){\n\t\t\t\t$this->db->query(\"UPDATE \" . $this->table . \" SET \" . $prop . \" WHERE `id` = \" . $this->DBid);\n\t\t\t}\n\t\t\t$this->changed = false;\n\t\t}\n\t}", "title": "" }, { "docid": "66cd7ccea7a78e5c67255676040523b3", "score": "0.5121608", "text": "public function updateLicnostPitanje($data){\n $users= $this->doctrine->em->find ( \"Pitanje\", $data['id'] );\n $user= $this->doctrine->em->find ( \"LicnostPitanje\", $users->getIdpit() );\n $user->setLicnost($data['licnost']);\n $user->setPodatak1($data['podatak1']);\n $user->setPodatak2($data['podatak2']);\n $user->setPodatak3($data['podatak3']);\n $user->setPodatak4($data['podatak4']);\n $user->setPodatak5($data['podatak5']);\n $user->setPodatak6($data['podatak6']);\n $user->setSlika($data['slika']);\n $users->setIdniv($data['idniv']);\n $users->setIdobl($data['idobl']);\n $users->setIdkor($data['idkor']);\n $this->doctrine->em->flush();\n }", "title": "" }, { "docid": "4fdafd5876325bf94cdcc2322013db66", "score": "0.51204145", "text": "public function asiento($idref,$codocu,$codop,$catval,$fecha,$docref,$glosa,$monto)\n {\n $modelodere= $this->_modelodeter;\n $reg=new $this->_modelolibro;\n // var_dump( $reg);die();\n $reg->setAttributes(\n array(\n 'codcuenta'=> $modelodere::getCuenta($catval,$codop,'D'),\n 'fechacont'=> $fecha,\n 'glosa'=> $glosa,\n 'debe'=> $monto,\n 'docref'=> $docref,\n 'idref'=>$idref,\n 'codocu'=>$codocu\n )\n );\n $reg->save();\n unset($reg);\n $reg=new $this->_modelolibro;\n $reg->setAttributes(\n array(\n 'codcuenta'=> $modelodere::getCuenta($catval,$codop,'H'),\n 'fechacont'=> $fecha,\n 'glosa'=> $glosa,\n 'haber'=> $monto,\n 'docref'=> $docref,\n 'idref'=>$idref,\n 'codocu'=>$codocu\n )\n );\n $reg->save();\n unset($reg);\n }", "title": "" }, { "docid": "4743aa77a38d7aef44acb6264fdc6f47", "score": "0.5109793", "text": "function modificarSolicitudEfectivo(){\n\t\t$this->procedimiento='tes.ft_solicitud_efectivo_ime';\n\t\t$this->transaccion='TES_SOLEFE_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_solicitud_efectivo','id_solicitud_efectivo','int4');\n\t\t$this->setParametro('id_caja','id_caja','int4');\n\t\t$this->setParametro('id_estado_wf','id_estado_wf','int4');\n\t\t$this->setParametro('monto','monto','numeric');\n\t\t$this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\t\t$this->setParametro('nro_tramite','nro_tramite','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('motivo','motivo','text');\n\t\t$this->setParametro('id_funcionario','id_funcionario','int4');\n\t\t$this->setParametro('fecha','fecha','date');\n\n\t\t$this->setParametro('tipo_solicitud','tipo_solicitud','varchar');\n\t\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}", "title": "" }, { "docid": "84a396bf9232d49bfce2a0d634ab2a7f", "score": "0.51036406", "text": "function evt__procesar()\r\n\t{\r\n\t\t$this->get_entidad()->persistidor()->retrasar_constraints();\r\n\t\tparent::evt__procesar();\r\n\t\tunset($this->s__ap_php_db);\r\n\t\tunset($this->s__ap_php_archivo);\r\n\t}", "title": "" }, { "docid": "b78af76187bbaa4b05ade60922e1f049", "score": "0.50994205", "text": "function save()\n {\n plugin::save();\n\n $ldap = $this->config->get_ldap_link();\n\n FAI::prepare_to_save_FAI_object($this->dn,$this->attrs);\n\n if($this->initially_was_account){\n new log(\"modify\",\"fai/\".get_class($this),$this->dn,$this->attributes);\n }else{\n new log(\"create\",\"fai/\".get_class($this),$this->dn,$this->attributes);\n }\n\n /* Prepare FAIscriptEntry to write it to ldap\n * First sort array.\n * Because we must delete old entries first.\n * After deletion, we perform add and modify \n */\n $Objects = array();\n\n /* We do not need to save untouched objects */\n foreach($this->SubObjects as $name => $obj){\n if($obj['status'] == \"FreshLoaded\"){\n unset($this->SubObjects[$name]);\n }\n }\n\n foreach($this->SubObjects as $name => $obj){\n if($obj['status'] == \"delete\"){\n $Objects[$name] = $obj; \n }\n }\n foreach($this->SubObjects as $name => $obj){\n if($obj['status'] != \"delete\"){\n $Objects[$name] = $obj; \n }\n }\n\n foreach($Objects as $name => $obj){\n\n foreach($this->sub64coded as $codeIt){\n $obj[$codeIt]=base64_encode($obj[$codeIt]);\n }\n\n $tmp = array();\n $attributes = array_merge($this->sub_Load_Later,$this->subAttributes);\n foreach($attributes as $attrs){\n if(!isset($obj[$attrs])) continue; \n if($obj[$attrs] == \"\"){\n $obj[$attrs] = array();\n }\n $tmp[$attrs] = $obj[$attrs];\n } \n\n $tmp['objectClass'] = $this->subClasses;\n\n $sub_dn = \"cn=\".$obj['cn'].\",\".$this->dn;\n\n if($obj['status']==\"new\"){\n $ldap->cat($sub_dn,array(\"objectClass\"));\n if($ldap->count()){\n $obj['status']=\"edited\";\n }\n }\n\n if(empty($tmp['FAIpriority'])){\n $tmp['FAIpriority'] =\"0\";\n }\n\n /* Tag object */\n $ui= get_userinfo();\n $this->tag_attrs($tmp, $sub_dn, $ui->gosaUnitTag);\n\n if($obj['status'] == \"delete\"){\n FAI::prepare_to_save_FAI_object($sub_dn,array(),true);\n $this->handle_post_events(\"remove\");\n }elseif($obj['status'] == \"edited\"){\n FAI::prepare_to_save_FAI_object($sub_dn,$tmp);\n $this->handle_post_events(\"modify\");\n }elseif($obj['status']==\"new\"){\n FAI::prepare_to_save_FAI_object($sub_dn,$tmp);\n $this->handle_post_events(\"add\");\n }\n }\n }", "title": "" }, { "docid": "77ac5a60ac906c4c53518f6365ed789e", "score": "0.50966704", "text": "public function Refresh($blnReload = false) {\n\t\t\tif ($blnReload)\n\t\t\t\t$this->objFaseLicencia->Reload();\n\n\t\t\tif ($this->lstLICENCIAIdLICENCIAObject) {\n\t\t\t\t\t$this->lstLICENCIAIdLICENCIAObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstLICENCIAIdLICENCIAObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objLICENCIAIdLICENCIAObjectArray = Licencia::LoadAll();\n\t\t\t\tif ($objLICENCIAIdLICENCIAObjectArray) foreach ($objLICENCIAIdLICENCIAObjectArray as $objLICENCIAIdLICENCIAObject) {\n\t\t\t\t\t$objListItem = new QListItem($objLICENCIAIdLICENCIAObject->__toString(), $objLICENCIAIdLICENCIAObject->IdLICENCIA);\n\t\t\t\t\tif (($this->objFaseLicencia->LICENCIAIdLICENCIAObject) && ($this->objFaseLicencia->LICENCIAIdLICENCIAObject->IdLICENCIA == $objLICENCIAIdLICENCIAObject->IdLICENCIA))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstLICENCIAIdLICENCIAObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblLICENCIAIdLICENCIA) $this->lblLICENCIAIdLICENCIA->Text = ($this->objFaseLicencia->LICENCIAIdLICENCIAObject) ? $this->objFaseLicencia->LICENCIAIdLICENCIAObject->__toString() : null;\n\n\t\t\tif ($this->calFASEFechaInicio) $this->calFASEFechaInicio->DateTime = $this->objFaseLicencia->FASEFechaInicio;\n\t\t\tif ($this->lblFASEFechaInicio) $this->lblFASEFechaInicio->Text = sprintf($this->objFaseLicencia->FASEFechaInicio) ? $this->objFaseLicencia->FASEFechaInicio->qFormat($this->strFASEFechaInicioDateTimeFormat) : null;\n\n\t\t\tif ($this->calFASEFechaFin) $this->calFASEFechaFin->DateTime = $this->objFaseLicencia->FASEFechaFin;\n\t\t\tif ($this->lblFASEFechaFin) $this->lblFASEFechaFin->Text = sprintf($this->objFaseLicencia->FASEFechaFin) ? $this->objFaseLicencia->FASEFechaFin->qFormat($this->strFASEFechaFinDateTimeFormat) : null;\n\n\t\t\tif ($this->lstFASEIdFASEObject) {\n\t\t\t\t\t$this->lstFASEIdFASEObject->RemoveAllItems();\n\t\t\t\tif (!$this->blnEditMode)\n\t\t\t\t\t$this->lstFASEIdFASEObject->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\t\t$objFASEIdFASEObjectArray = Fase::LoadAll();\n\t\t\t\tif ($objFASEIdFASEObjectArray) foreach ($objFASEIdFASEObjectArray as $objFASEIdFASEObject) {\n\t\t\t\t\t$objListItem = new QListItem($objFASEIdFASEObject->__toString(), $objFASEIdFASEObject->IdFASE);\n\t\t\t\t\tif (($this->objFaseLicencia->FASEIdFASEObject) && ($this->objFaseLicencia->FASEIdFASEObject->IdFASE == $objFASEIdFASEObject->IdFASE))\n\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t$this->lstFASEIdFASEObject->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblFASEIdFASE) $this->lblFASEIdFASE->Text = ($this->objFaseLicencia->FASEIdFASEObject) ? $this->objFaseLicencia->FASEIdFASEObject->__toString() : null;\n\n\t\t}", "title": "" }, { "docid": "0277008853783a7c3982341ac69b06e1", "score": "0.5094907", "text": "function modificarInformacionSecundaria(){\n\t\t$this->procedimiento='adq.ft_informacion_secundaria_ime';\n\t\t$this->transaccion='ADQ_INFSEC_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_informacion_sec','id_informacion_sec','int4');\n\t\t$this->setParametro('id_solicitud','id_solicitud','int4');\n\t\t$this->setParametro('validez_oferta','validez_oferta','text');\n\t\t$this->setParametro('resultados','resultados','text');\n\t\t$this->setParametro('antecedentes','antecedentes','text');\n\t\t$this->setParametro('garantias','garantias','text');\n\t\t$this->setParametro('nro_cite','nro_cite','varchar');\n\t\t$this->setParametro('necesidad_contra','necesidad_contra','text');\n\t\t$this->setParametro('multas','multas','text');\n\t\t$this->setParametro('concluciones','concluciones','text');\n\t\t$this->setParametro('recomendaciones','recomendaciones','text');\n\t\t$this->setParametro('beneficios_contra','beneficios_contra','text');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('forma_pago','forma_pago','text');\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}", "title": "" }, { "docid": "30d0a2b885ce952f947d43da5b287037", "score": "0.5094135", "text": "private function setFieldsForProduct()\n\t{\n\t\t\n\t\t\n\t\t\n\t\tforeach( $this->parent->getProduct()->bdcFields as $type => $tab )\n\t\t{\n\t\t\tforeach( $tab as $attr )\n\t\t\t{\n\t\t\t\tif ( ! preg_match(\"#Message:#\", $attr)){\n\t\t\t\t\t\n\t\t\t\t\t$this->bdcFields[ $attr ][] = $type;\n\t\n\t\t\t\t\tif( !($Elt = $this->elements->itemAt( $attr )) )\n\t\t\t\t\t\tthrow new \\EsoterException( 105, \\Yii::t('error', '105') );\n\t\n\t\t\t\t\tif( in_array( 'require', $Elt->attributes ) && $Elt->attributes['require'] )\n\t\t\t\t\t\t$this->model->addRequired( $Elt->name );\n\t\n\t\t\t\t\tif( $Elt->name == 'birthday' )\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$Elt->attributes['class']\t\t= 'DatePicker';\n\t\t\t\t\t\t\t$Elt->attributes['datePicker']\t= ( json_encode( array( 'lang' => \\Yii::app()->params['lang'], 'format' => \\Yii::app()->params['formatDate'] ) ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$porteur = \\Yii::app()->params['porteur'];\n\t\t\t\t\t\t\tif( strpos( $porteur, 'aasha' ) !== false || strpos( $porteur, 'alisha' ) !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$Elt->attributes['format']\t\t= 'angls'; \n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$lemsgs = explode('Message:', $attr);\n\t\t\t\t\tif(isset($lemsgs[1]))\n\t\t\t\t\t\t$this->message = $lemsgs[1];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t $PP\t\t = $this->elements->itemAt('paymentType');\n\t\t$Invoice = new \\Business\\Invoice();\n\t\t\n\t\tforeach( $this->PaymentType as $PaymentType )\n\t\t{\n\t\t$nbInvoiceAsynch = $Invoice->checkCanPayByAsynch( $this->parent->getUser()->email, $this->parent->getProduct()->ref );\n\t\t\n\t\t\tif($PaymentType->type==2 && $nbInvoiceAsynch > 0){\n\t\t\t \n\t\t\t $PP->msg_pp = Yii::t( 'BDC', 'paymentType_Asynch');\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$PP->items[ $PaymentType->id ] = Yii::t( 'BDC', 'paymentType_'.$PaymentType->type );\n\t\t\t\t$PP->msg_pp = '';\n\t\t\t\t// Si c'est le 1er, alors ce sera celui par defaut :\n\t\t\t\tif( count($PP->items) == 1 )\n\t\t\t\t\t$this->model->paymentType = $PaymentType->id;\n\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c156a66919dec32ab91ceba40888f7c3", "score": "0.50940806", "text": "public function getFkEconomicoAtributoLicencaDiversaValores()\n {\n return $this->fkEconomicoAtributoLicencaDiversaValores;\n }", "title": "" }, { "docid": "f0fd75415bbb91679b7361f3734cee8d", "score": "0.50922585", "text": "function update_actividadMasiva($idmasivo,$id_actividad,$id_especializacion,$id_tema,$t_tema,$t_area_en,$FRevision,$FPInicio,$FPFinal,$FRInicio,$FRFinal,$inicio,$final,$coment,$idreponsable,$competencias){\n parent::conectar();\n $FRevision_S=$this->set_standarDate($FRevision);\n $FPInicio_S=$this->set_standarDate($FPInicio);\n $FPFinal_S=$this->set_standarDate($FPFinal);\n if($FRInicio!=0){\n $FRInicio_S=$this->set_standarDate($FPInicio_S);\n }else{\n $FRInicio_S='';\n }\n\n if($FRFinal!=0){\n $FRFinal_S=$this->set_standarDate($FRFinal);\n }else{\n $FRFinal_S='';\n }\n $color=$this->get_color($inicio,$final,$FRevision,$FPInicio_S,$FPFinal_S,$FRInicio_S,$FRFinal_S);\n $iniciado=0;\n $finalizado=0;\n\n if($inicio=='true'){\n $iniciado=1;\n } \n if($final=='true'){\n $finalizado=1;\n }\n $sql=\"CALL updateactividadmasiva($id_actividad,$id_especializacion,$id_tema,'$t_tema','$t_area_en','$FRevision_S','$FPInicio_S','$FPFinal_S','$FRInicio_S','$FRFinal_S',$iniciado,$finalizado,'$coment','$color',$idreponsable,$idmasivo)\";\n \n if(!$this->obj_con->Execute($sql)){\n return false;\n }else{\n $this->get_arrayCompetenciasSeleccionadas($competencias,$idmasivo);\n $this->registrar_competencias_masivos($competencias,$idmasivo);\n $this->registrar_actividadxempleado($competencias,1,$idmasivo,$id_actividad,$id_especializacion,$id_tema,$t_tema,$t_area_en,$FRevision_S,$FPInicio_S,$FPFinal_S,$FRInicio_S,$FRFinal_S,$iniciado,$finalizado,$coment,$color,$idreponsable);/*opcion 1*/\n $this->registrar_actividadxempleado($competencias,2,$idmasivo,$id_actividad,$id_especializacion,$id_tema,$t_tema,$t_area_en,$FRevision_S,$FPInicio_S,$FPFinal_S,$FRInicio_S,$FRFinal_S,$iniciado,$finalizado,$coment,$color,$idreponsable);/*opcion 2*/\n $this->registrar_actividadxempleado($competencias,3,$idmasivo,$id_actividad,$id_especializacion,$id_tema,$t_tema,$t_area_en,$FRevision_S,$FPInicio_S,$FPFinal_S,$FRInicio_S,$FRFinal_S,$iniciado,$finalizado,$coment,$color,$idreponsable);/*opcion 3*/\n return true;\n }\n \n \n \n }", "title": "" }, { "docid": "bcd409bb9cc5d7b6fa80c5d8c76a4413", "score": "0.50903535", "text": "function save_encuesta($info)\n {\n $IdUsuario = $info->IdUsuario;\n $Encuesta = $info->Encuesta;\n $arrayAks[0] = $info->Pregunta1;\n $arrayAks[1] = $info->Pregunta2;\n $arrayAks[2] = $info->Pregunta3;\n $arrayAks[3] = $info->Pregunta4;\n $arrayAks[4] = $info->Pregunta5;\n $arrayAks[5] = $info->Pregunta6;\n $arrayAks[6] = $info->Pregunta7;\n $arrayAks[7] = $info->Pregunta8;\n $arrayAks[8] = $info->Pregunta9;\n $arrayAks[9] = $info->Pregunta10;\n\n $arrayObligado[0] = $info->chkIdPregunta1;\n $arrayObligado[1] = $info->chkIdPregunta2;\n $arrayObligado[2] = $info->chkIdPregunta3;\n $arrayObligado[3] = $info->chkIdPregunta4;\n $arrayObligado[4] = $info->chkIdPregunta5;\n $arrayObligado[5] = $info->chkIdPregunta6;\n $arrayObligado[6] = $info->chkIdPregunta7;\n $arrayObligado[7] = $info->chkIdPregunta8;\n $arrayObligado[8] = $info->chkIdPregunta9;\n $arrayObligado[9] = $info->chkIdPregunta10;\n\n $Area = $info->IdArea;\n $d = date(d);\n $m = date(m);\n $y = date(Y);\n $Fecha = \"$d/$m/$y\";\n $Sql = \"INSERT INTO [SAP].[dbo].[AAEncuesta] VALUES ('$IdUsuario','$Encuesta','$Area','$Fecha')\";\n $obj = new poolConnecion();\n $con=$obj->ConexionSQLSAP();\n $RSet=$obj->QuerySQLSAP($Sql,$con);\n $obj->CerrarSQLSAP($RSet,$con);\n /* get the id of surveys */\n $objLastId = new poolConnecion();\n $SqlID=\"SELECT [Id] FROM [SAP].[dbo].[AAEncuesta] order by [Id] asc\";\n $con=$objLastId->ConexionSQLSAP();\n $RSet=$objLastId->QuerySQLSAP($SqlID,$con);\n while($fila=sqlsrv_fetch_array($RSet,SQLSRV_FETCH_ASSOC))\n {\n $IdEncuesta = $fila[Id];\n }\n $objLastId->CerrarSQLSAP($RSet,$con);\n /* save the ask in the table AAPreguntas */\n foreach ($arrayAks as $key => $value) {\n if (!empty($value)) {\n\n $obligado = \"No\";\n if ($arrayObligado[$key] == 'true') {\n $obligado = \"Si\";\n }\n else{\n $obligado = \"No\";\n }\n $SqlAsk = \"INSERT INTO [SAP].[dbo].[AAPreguntas] VALUES ('$IdEncuesta','$value','$obligado')\";\n $obj = new poolConnecion();\n $con=$obj->ConexionSQLSAP();\n $RSet=$obj->QuerySQLSAP($SqlAsk,$con);\n $obj->CerrarSQLSAP($RSet,$con);\n }\n }\n return $SqlAsk;\n }", "title": "" }, { "docid": "d97faeea7c3a563f3610cfa021e4f29c", "score": "0.5085794", "text": "public function getFkLicitacaoContratos()\n {\n return $this->fkLicitacaoContratos;\n }", "title": "" }, { "docid": "02cc7459ecad738e9abec3e40a8b52c1", "score": "0.50743884", "text": "function edit_prov($idproveedor)\n { \n // check if the formulariot exists before trying to edit it\n $data['formulariot'] = $this->Formulariot_model->get_formulariot_prov($idproveedor);\n\t\t$data['provincias'] = $this->Formulariot_model->get_all_provincias();\n\n if(isset($data['formulariot']['idformularioT']))\n {\n\t\t\t$pcias='';\n if(isset($_POST) && count($_POST) > 0) \n { \n\n\t\t\t\tforeach ($this->input->post('provinciasalcanzadascmb') as $seleccion){\n\t\t\t\t\t$pcias = $pcias.$seleccion.' , ';\n\t\t\t\t}\n\t\t\t\tif(isset($_POST['completado'])){\n\t\t\t\t\t$completado=1;\n\t\t\t\t} else {\n\t\t\t\t\t$completado=0;\n\t\t\t\t}\n\t\t\t\tif(isset($_POST['aprobado'])){\n\t\t\t\t\t$aprobado=1;\n\t\t\t\t} else {\n\t\t\t\t\t$aprobado=0;\n\t\t\t\t}\n \t$params = array(\n\t\t\t\t\t'actividadpcipal' => $this->input->post('actividadpcipal'),\n\t\t\t\t\t'obras1tipo' => $this->input->post('obras1tipo'),\n\t\t\t\t\t'obras2tipo' => $this->input->post('obras2tipo'),\n\t\t\t\t\t'obras3tipo' => $this->input->post('obras3tipo'),\n\t\t\t\t\t'idproveedor' => $this->input->post('idproveedor'),\n\t\t\t\t\t'lugarservicios' => $this->input->post('lugarservicios'),\n\t\t\t\t\t'provinciasalcanzadas' => $pcias,\n\t\t\t\t\t'reptecnico' => $this->input->post('reptecnico'),\n\t\t\t\t\t'profesion' => $this->input->post('profesion'),\n\t\t\t\t\t'cantidadpersonal' => $this->input->post('cantidadpersonal'),\n\t\t\t\t\t'cantpersonaladmin' => $this->input->post('cantpersonaladmin'),\n\t\t\t\t\t'cantpersonalprof' => $this->input->post('cantpersonalprof'),\n\t\t\t\t\t'cantpersonalobra' => $this->input->post('cantpersonalobra'),\n\t\t\t\t\t'certificaciones' => $this->input->post('certificaciones'),\n\t\t\t\t\t'obras1' => $this->input->post('obras1'),\n\t\t\t\t\t'obras1empresa' => $this->input->post('obras1empresa'),\n\t\t\t\t\t'obras1contacto' => $this->input->post('obras1contacto'),\n\t\t\t\t\t'obras1telefono' => $this->input->post('obras1telefono'),\n\t\t\t\t\t'obras2' => $this->input->post('obras2'),\n\t\t\t\t\t'obras2empresa' => $this->input->post('obras2empresa'),\n\t\t\t\t\t'obras2contacto' => $this->input->post('obras2contacto'),\n\t\t\t\t\t'obras2telefono' => $this->input->post('obras2telefono'),\n\t\t\t\t\t'obras3' => $this->input->post('obras3'),\n\t\t\t\t\t'obras3empresa' => $this->input->post('obras3empresa'),\n\t\t\t\t\t'obras3contacto' => $this->input->post('obras3contacto'),\n\t\t\t\t\t'obras3telefono' => $this->input->post('obras3telefono'),\n\t\t\t\t\t'ordenylimpiezaobra' => $this->input->post('ordenylimpiezaobra'),\n\t\t\t\t\t'calidamaterialesequipos' => $this->input->post('calidamaterialesequipos'),\n\t\t\t\t\t'cumplimientonormashys' => $this->input->post('cumplimientonormashys'),\n\t\t\t\t\t'cumplimientoplazos' => $this->input->post('cumplimientoplazos'),\n\t\t\t\t\t'atencionprofdurante' => $this->input->post('atencionprofdurante'),\n\t\t\t\t\t'monto1' => $this->input->post('monto1'),\n\t\t\t\t\t'monto2' => $this->input->post('monto2'),\n\t\t\t\t\t'monto3' => $this->input->post('monto3'),\n\t\t\t\t\t'flotavehiculosutilitarios' => $this->input->post('flotavehiculosutilitarios'),\n\t\t\t\t\t'flotavehiculoscarga' => $this->input->post('flotavehiculoscarga'),\n\t\t\t\t\t'flotavehiculostripulados' => $this->input->post('flotavehiculostripulados'),\n\t\t\t\t\t'aprobado' => 0,\n\t\t\t\t\t'completo' => $completado,\n\t\t\t\t\t'provinciasalcanzadas' => $this->input->post('provinciasalcanzadas'),\n\t\t\t\t\t'fortalezas' => $this->input->post('fortalezas'),\n\t\t\t\t\t'certificadosdocumento' => $this->input->post('certificadosdocumento'),\n );\n $this->Formulariot_model->update_formulariot($idformularioT,$params); \n redirect('proveedores', 'refresh');\n }\n else\n {\n\t\t\t\t$data['titulacion']=\"Formulario Técnico\";\n\t\t\t\t$data['mensaje']=\"\";\n\t\t\t\t$data['volver']=\"si\";\n\t\t\t\t$data['aprove']=\"si\";\n $data['_view'] = 'formulariot/edit';\n\t\t\t\t$this->load->view('template/header',$data);\n\t\t\t\t$this->load->view('layouts/main');\n\t\t\t\t//$this->load->view('template/footer');\n }\n }\n\t\telse\n\t\t\n show_error('Error en el Formulario');\n\t}", "title": "" }, { "docid": "b0781f5b963242df667cde9a1ba2cdab", "score": "0.50708485", "text": "function modificarClasificacion(){\n\t\t$this->procedimiento='kaf.ft_clasificacion_ime';\n\t\t$this->transaccion='SKA_CLAF_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_clasificacion','id_clasificacion','int4');\n\t\t$this->setParametro('id_clasificacion_fk','id_clasificacion_fk','varchar');\n\t\t$this->setParametro('id_cat_metodo_dep','id_cat_metodo_dep','int4');\n\t\t$this->setParametro('id_concepto_ingas','id_concepto_ingas','int4');\n\t\t$this->setParametro('codigo','codigo','varchar');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('vida_util','vida_util','int4');\n\t\t$this->setParametro('correlativo_act','correlativo_act','integer');\n\t\t$this->setParametro('monto_residual','monto_residual','numeric');\n\t\t$this->setParametro('tipo','tipo','varchar');\n\t\t$this->setParametro('final','final','varchar');\n\t\t$this->setParametro('icono','icono','varchar');\n\t\t$this->setParametro('descripcion','descripcion','varchar');\t\t\n\t\t$this->setParametro('tipo_activo','tipo_activo','varchar');\n\t\t$this->setParametro('depreciable','depreciable','varchar');\n\t\t$this->setParametro('contabilizar','contabilizar','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}", "title": "" }, { "docid": "fbe7e66d05bf874c45c68a32061e44be", "score": "0.50696725", "text": "public function EditaDica($parametros)\n {\n try\n { \n //Pesquisa o id\n $tabela = $this->getTable($this->table_alias)->find($parametros['cod_id1']);\n\n //Verifica se o registro foi localizado\n if($tabela)\n {\n $tabela->cod_idioma = $parametros['cod_idioma'];\n $tabela->dat_date = $parametros['dat_data'];\n $tabela->txt_titulo = $parametros['txt_titulo'];\n $tabela->txt_texto = $parametros['txt_texto'];\n $tabela->img_original = $parametros['nome_img1'];\n $tabela->img_cropada = $parametros['nome_img_cropada1'];\n $tabela->save();\n\n ################ GERANDO PERMALINK ###################\n //Instancia o Helper\n $Helper = HelperFactory::getInstance();\n\n //Instancia o registro inserido anteriormente\n $registro = $this->getTable()->find($parametros['cod_id1']);\n\n //Gera o permalink\n $parametros['txt_permalink'] = $Helper->createPermalink($parametros['txt_titulo'], $registro->cod_id);\n\n //Atribui o permalink gerado\n $registro->txt_permalink = $parametros['txt_permalink'];\n\n //Salva o registro no banco de dados\n $registro->save();\n #######################################################\n //Salva no log de alterações\n TableFactory::getInstance('LogsAlteracoes')->logAlteracoes($this->getTable()->getTableName(), $parametros['cod_id1'], 'A');\n\n //Retorna true em caso de sucesso\n return true;\n }\n else \n {\n return false;\n }\n \n }\n catch (Doctrine_Exception $e)\n {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "4b88c4c278e60337807dbe2b92e4c5c8", "score": "0.50667584", "text": "public function modificarProveedor()\n\t{\n\t\t$query=\"UPDATE proveedor SET empresa='$this->empresa',\n\t\tnombre='$this->nombre',\n\t\tcelular='$this->celular',\n\t\ttelefono='$this->telefono',\n\t\temail='$this->email',\n\t\testatus='$this->estatus'\n\t\tWHERE idproveedor=$this->idproveedor\";\n\n\t\t$resp=$this->db->consulta($query);\n\t}", "title": "" }, { "docid": "88202c251a48861ebaf5b0d2d00e464d", "score": "0.5059593", "text": "public function update($aberturaFechamentoCaixa){\n\t\t$campos = \"\";\n \n \n\t\t if(!empty($aberturaFechamentoCaixa->dataAbertura)) $campos .=' data_abertura = ?,';\n\t\t if(!empty($aberturaFechamentoCaixa->dataFechamento)) $campos .=' data_fechamento = ?,';\n\t\t if(!empty($aberturaFechamentoCaixa->usuarioAbertura)) $campos .=' usuario_abertura = ?,';\n\t\t if(!empty($aberturaFechamentoCaixa->usuarioFechamento)) $campos .=' usuario_fechamento = ?,';\n\t\t if(!empty($aberturaFechamentoCaixa->saldo)) $campos .=' saldo = ?,';\n\t\t if(!empty($aberturaFechamentoCaixa->caixaId)) $campos .=' caixa_id = ?,';\n\n \n $campos = substr($campos,0,-1);\n \n $sql = 'UPDATE abertura_fechamento_caixa SET '.$campos.' WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t if(!empty($aberturaFechamentoCaixa->dataAbertura)) \t\t$sqlQuery->set($aberturaFechamentoCaixa->dataAbertura);\n\t\t if(!empty($aberturaFechamentoCaixa->dataFechamento)) \t\t$sqlQuery->set($aberturaFechamentoCaixa->dataFechamento);\n\t\t if(!empty($aberturaFechamentoCaixa->usuarioAbertura)) \t\t$sqlQuery->setNumber($aberturaFechamentoCaixa->usuarioAbertura);\n\t\t if(!empty($aberturaFechamentoCaixa->usuarioFechamento)) \t\t$sqlQuery->setNumber($aberturaFechamentoCaixa->usuarioFechamento);\n\t\t if(!empty($aberturaFechamentoCaixa->saldo)) \t\t$sqlQuery->set($aberturaFechamentoCaixa->saldo);\n\t\t if(!empty($aberturaFechamentoCaixa->caixaId)) \t\t$sqlQuery->setNumber($aberturaFechamentoCaixa->caixaId);\n\n\t\t$sqlQuery->setNumber($aberturaFechamentoCaixa->id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "1cc0de0a1d5b006408f8c570bfc697e4", "score": "0.5051595", "text": "public function SaveRegistroAsientoContable($aux_registro,$idtransaccion,$fecharegistro)\n\t{\n\t\t$aux_primeracuentacomanda=1;\n\t\t$aux_controlhabercomanda=\"\";\n\t\t$aux_tipocuentacontablecomanda=\"\";\n\t\tforeach ($aux_registro as $cuenta) {\n\t\t\tif( ((float) $cuenta->Debe )!=0 || ((float) $cuenta->Haber )!=0 ){ //validacion de que el debe y el haber esten llenos (esta validacion es para las demas asientos contables porque en el plan de cuentas ya esta validado a nivel del cliente )\n\t\t\t\tif($aux_primeracuentacomanda==1){\n\t\t\t\t\t//Se guarda la primera cuenta o asiento que va a comandar para aplicar la regla contable a las demas cuentas\n\t\t\t\t\t$cuentacomada = array(\n\t\t\t\t\t\t'idtransaccion' => $idtransaccion ,\n\t\t\t\t\t\t'idplancuenta'=> $cuenta->idplancuenta,\n\t\t\t\t\t\t'fecha'=> $fecharegistro,\n\t\t\t\t\t\t'descripcion'=> $cuenta->Descipcion,\n\t\t\t\t\t\t'debe'=> $cuenta->Debe,\n\t\t\t\t\t\t'haber'=> $cuenta->Haber,\n\t\t\t\t\t\t'debe_c'=> $cuenta->Debe,\n\t\t\t\t\t\t'haber_c'=> $cuenta->Haber,\n\t\t\t\t\t\t'estadoanulado'=>true\n\t\t\t\t\t\t );\n\t\t\t\t\t$cuentacomandasave=Cont_RegistroContable::create($cuentacomada);\n\t\t\t\t\tif($cuenta->controlhaber==\"-\"){\n\t\t\t\t\t\tif($cuenta->Debe>0 & $cuenta->Haber==0){\n\t\t\t\t\t\t\t$aux_controlhabercomanda=\"+\"; //la cuenta que comanda esta aumentando\n\t\t\t\t\t\t}elseif ($cuenta->Debe==0 & $cuenta->Haber>0) {\n\t\t\t\t\t\t\t$aux_controlhabercomanda=\"-\"; //la cuenta que comanda esta disminuye\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif ($cuenta->controlhaber==\"+\") {\n\t\t\t\t\t\tif($cuenta->Debe>0 & $cuenta->Haber==0){\n\t\t\t\t\t\t\t$aux_controlhabercomanda=\"-\"; //la cuenta que comanda esta disminuye\n\t\t\t\t\t\t}elseif ($cuenta->Debe==0 & $cuenta->Haber>0) {\n\t\t\t\t\t\t\t$aux_controlhabercomanda=\"+\"; //la cuenta que comanda esta aumenta\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$aux_tipocuentacontablecomanda=$cuenta->tipocuenta;\n\t\t\t\t}else{\n\t\t\t\t\t$aux_cuentacontrolhaber=\"\";\n\t\t\t\t\tif($cuenta->controlhaber==\"-\"){\n\t\t\t\t\t\tif($cuenta->Debe>0 & $cuenta->Haber==0){\n\t\t\t\t\t\t\t$aux_cuentacontrolhaber=\"+\"; //la cuenta que comanda esta aumentando\n\t\t\t\t\t\t}elseif ($cuenta->Debe==0 & $cuenta->Haber>0) {\n\t\t\t\t\t\t\t$aux_cuentacontrolhaber=\"-\"; //la cuenta que comanda esta disminuye\n\t\t\t\t\t\t}\n\t\t\t\t\t}elseif ($cuenta->controlhaber==\"+\") {\n\t\t\t\t\t\tif($cuenta->Debe>0 & $cuenta->Haber==0){\n\t\t\t\t\t\t\t$aux_cuentacontrolhaber=\"-\"; //la cuenta que comanda esta disminuye\n\t\t\t\t\t\t}elseif ($cuenta->Debe==0 & $cuenta->Haber>0) {\n\t\t\t\t\t\t\t$aux_cuentacontrolhaber=\"+\"; //la cuenta que comanda esta aumenta\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif($aux_cuentacontrolhaber==$aux_controlhabercomanda && $aux_tipocuentacontablecomanda==$cuenta->tipocuenta){ // la cuenta o asiento tiene el mismo comportamiento que la que comanda\n\t\t\t\t\t\t$cuentacontable = array(\n\t\t\t\t\t\t\t'idtransaccion' => $idtransaccion ,\n\t\t\t\t\t\t\t'idplancuenta'=> $cuenta->idplancuenta,\n\t\t\t\t\t\t\t'fecha'=> $fecharegistro,\n\t\t\t\t\t\t\t'descripcion'=> $cuenta->Descipcion,\n\t\t\t\t\t\t\t'debe'=> $cuenta->Debe,\n\t\t\t\t\t\t\t'haber'=> $cuenta->Haber,\n\t\t\t\t\t\t\t'debe_c'=> $cuenta->Debe,\n\t\t\t\t\t\t\t'haber_c'=> $cuenta->Haber,\n\t\t\t\t\t\t\t'estadoanulado'=>true\n\t\t\t\t\t\t\t );\n\t\t\t\t\t\t$cuentacontablesave=Cont_RegistroContable::create($cuentacontable);\n\t\t\t\t\t}else{ //la cuenta se le aplicara la regla contable\n\t\t\t\t\t\t$this->ReglaContable($aux_tipocuentacontablecomanda,$aux_controlhabercomanda,$cuenta,$idtransaccion,$fecharegistro);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$aux_primeracuentacomanda++;\n\t\t\t}\n\t\t}\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "480b715ba20b09c340ad5be63881bb92", "score": "0.50497687", "text": "function UpdatePoblacion()\n{\n try {\n /**\n * Creamo la instancia la objeto de AcuiferoPob\n */\n $Acu = new AcuiferoPob;\n /**\n * Colocamos los datos del GET por medio de los metodos SET del objeto.\n */\n $Acu->setAcuiferoId(filter_input(INPUT_GET, \"Acuifero_ID\"));\n $Acu->setNumHabitantes(filter_input(INPUT_GET, \"Num_Habitantes\"));\n $Acu->setNumHabitantesRural(filter_input(INPUT_GET, \"Num_Habitantes_Rural\"));\n $Acu->setRumHabitantesUrbana(filter_input(INPUT_GET, \"Num_Habitantes_Urbana\"));\n /**\n * Se manda a llamar a la funcion update del objeto.\n */\n echo $Acu->update();\n } catch (Exception $exc) {\n echo $exc->getTraceAsString();\n return false;\n }\n}", "title": "" }, { "docid": "d223447a2c70f24af5d3b1204c11d9f5", "score": "0.50408435", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set CODIGO=\\\"$this->CODIGO\\\",NOMBRE=\\\"$this->NOMBRE\\\",DESCRIPCION=\\\"$this->DESCRIPCION\\\",PRECIO=\\\"$this->PRECIO\\\",EN_EXISTENCIA=\\\"$this->EN_EXISTENCIA\\\",INVENTARIO_MIN=\\\"$this->INVENTARIO_MIN\\\",ES_PUBLICO=\\\"$this->ES_PUBLICO\\\",ES_DESTACADO=\\\"$this->ES_DESTACADO\\\",GENERO_ID=\\\"$this->GENERO_ID\\\",CATEGORIA_ID=\\\"$this->CATEGORIA_ID\\\" where ID_PRODUCTO=$this->ID_PRODUCTO\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "8785180c538cf389934ed6faaad49796", "score": "0.5038514", "text": "public function actualizar($id_proveedor, $nombre, $correo, $direccion, $pais, $pagina_web, $telefono_1, $telefono_2, $iso, $iso2, $id_session)\n {\n DB::beginTransaction();\n\n $query_proveedor = new static;\n $query_proveedor = DB::update('UPDATE ldci.tb_proveedor\n SET nombre=?, correo=?, direccion=?, id_pais=?, pagina_web=?,\n telefono_1=?, telefono_2=?, iso=?, iso_2=?,\n usuario_modificacion=?, fecha_modificacion=now()\n WHERE id_proveedor=? ', [$nombre, $correo, $direccion, $pais, $pagina_web, $telefono_1, $telefono_2, $iso, $iso2, $id_session, $id_proveedor]);\n\n if (!$query_proveedor) {\n DB::rollBack();\n return collect([\n 'mensaje' => 'Hubo un error al actualizar los datos del proveedor ',\n 'error' => true,\n ]);\n } else {\n DB::commit();\n return collect([\n 'mensaje' => 'proveedor actualizado con exito',\n 'error' => false,\n ]);\n }\n }", "title": "" }, { "docid": "e0647adb8b52a8b2f480bbc2032eec2c", "score": "0.503509", "text": "public function update() {\n\t\tif ($this->getId() == 0 || $this->getId() == null) {\n\t\t\t/* un identifiant 0 ou null implique un nouvel objet => INSERT */\n\t\t\t$this->save();\n\t\t} else {\n\t\t\t$requete = 'UPDATE unite_joueur SET ';\n\t\t\t$requete .= 'membre = '.$this->getMembre().',';\n\t\t\t$requete .= 'nom = \\''.$this->getNom().'\\',';\n\t\t\t$requete .= 'description = \\''.$this->getDescription().'\\',';\n\t\t\t$requete .= 'def_av = '.$this->getDef_av().',';\n\t\t\t$requete .= 'def_ar = '.$this->getDef_ar().',';\n\t\t\t$requete .= 'def_g = '.$this->getDef_g().',';\n\t\t\t$requete .= 'def_d = '.$this->getDef_d().',';\n\t\t\t$requete .= 'mouvement = '.$this->getMouvement().',';\n\t\t\t$requete .= 'experience = '.$this->getExperience().',';\n\t\t\t$requete .= 'equipementarmegauche = '.$this->getEquipementarmegauche().',';\n\t\t\t$requete .= 'equipementarmedroite = '.$this->getEquipementarmedroite().',';\n\t\t\t$requete .= 'equipementarmure = '.$this->getEquipementarmure().',';\n\t\t\t$requete .= 'equipementcoiffe = '.$this->getEquipementcoiffe().',';\n\t\t\t$requete .= 'equipementetendart = '.$this->getEquipementetendart().',';\n\t\t\t$requete .= 'toucher = '.$this->getToucher().',';\n\t\t\t$requete .= 'initiative = '.$this->getInitiative().',';\n\t\t\t$requete .= 'sauvegarde = '.$this->getSauvegarde().',';\n\t\t\t$requete .= 'endurance = '.$this->getEndurance().',';\n\t\t\t$requete .= 'cac = '.$this->getCac().',';\n\t\t\t$requete .= 'fo = '.$this->getFo().',';\n\t\t\t$requete .= 'attaque = '.$this->getAttaque().',';\n\t\t\t$requete .= 'intell = '.$this->getIntell().',';\n\t\t\t$requete .= 'ty = '.$this->getTy().',';\n\t\t\t$requete .= 'capacite = '.$this->getCapacite().',';\n\t\t\t$requete .= 'pilote = '.$this->getPilote().',';\n\t\t\t$requete .= 'co_pilote = '.$this->getCo_pilote().',';\n\t\t\t$requete .= 'cout = '.$this->getCout().',';\n\t\t\t$laDate = $this->getDate_creation();\n\t\t\tif (strlen($laDate) > 0) {\n\t\t\t\t$requete .= 'date_creation = \\''.$laDate.'\\',';\n\t\t\t} else {\n\t\t\t\t$requete .= 'date_creation = NOW(),';\n\t\t\t}\n\t\t\t$requete .= 'tile = '.$this->getTile().',';\n\t\t\t$requete .= 'camp = '.$this->getCamp().',';\n\t\t\t$requete .= 'chemin = \\''.$this->getChemin().'\\',';\n\t\t\t$requete .= 'dimension = '.$this->getDimension().',';\n\t\t\t$requete .= 'aattaquecetour = '.$this->getAattaquecetour().',';\n\t\t\t$requete .= 'sestdeplacecetour = '.$this->getSestdeplacecetour().',';\n\t\t\t$requete .= 'achargecetour = '.$this->getAchargecetour().',';\n\t\t\t$requete .= 'pdv = '.$this->getPdv().',';\n\t\t\t$requete .= 'ingame = '.$this->getIngame().',';\n\t\t\t$requete = substr($requete,0,strlen($requete)-1);\n\t\t\t$requete .= ' WHERE id = '.$this->getId();\n\t\t\treturn $requete;\n\t\t}\n\t}", "title": "" }, { "docid": "d34cc8d0d7879162ad2308bef39dafb9", "score": "0.5033801", "text": "private function insertarLicencia()\r\n\t\t{\r\n\t\t\t$tipo = self::determinarTipoLicencia();\r\n\t\t\tif ( !$tipo ) {\r\n\t\t\t\t$tipo = 'NO ESPECIFICADA';\r\n\t\t\t}\r\n\t\t\t$this->setTipoLicencia($tipo);\r\n\t\t\t$this->setObservacion('PRUEBA');\r\n\t\t\t$this->setLicencia(self::getLicenciaGenerada());\r\n\t\t\treturn $result = $this->guardar();\r\n\t\t}", "title": "" }, { "docid": "6bec58a8f8655df038c3a205a014d16e", "score": "0.50336826", "text": "public function getFkLicitacaoRescisaoConvenios()\n {\n return $this->fkLicitacaoRescisaoConvenios;\n }", "title": "" }, { "docid": "fdd9337cee035608e98ee618ab7f0853", "score": "0.50335634", "text": "public function SaveArticle() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstArticleRevision) $this->objArticle->ArticleRevisionId = $this->lstArticleRevision->SelectedValue;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the Article object\n\t\t\t\t$this->objArticle->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "8dff0b89096e219f7eb009b27cbb6224", "score": "0.5031456", "text": "public function save()\n\t{\n\t\tparent::save();\n\t\tif (true || $this->getUpdateRoles())\n\t\t\t$this->saveRelation('roles');\n\n return;\n\t\t//if ($this->getUpdateOrderStates())\n\t\t//\t$this->saveRelation('orderstates');\n\n if ($this->getUpdateRelatedDefs())\n\t\t\t$this->saveRelationSymetric('relateddefs');\n\t}", "title": "" }, { "docid": "d6bc3abd570e6b7ce75a567e79d9fcbf", "score": "0.5029801", "text": "public function isAllowedToUpdate()\n {\n if ($this->purchaseInvoices->count()) {\n throw new IsReferencedException('Cannot edit form because referenced by purchase receive', $this->purchaseInvoices);\n }\n }", "title": "" }, { "docid": "2713beb187eb975f71086ed751010f26", "score": "0.50227946", "text": "public function atualizar() {\n $pessoa = $this->populaPessoa(\"atualizar\");\n $tipo = $_POST[\"tipo\"];\n if($tipo==\"F\")\n $pessoaDAO = new PessoaFisicaDAO();\n elseif($tipo==\"J\")\n $pessoaDAO = new PessoaJuridicaDAO();\n try {\n $pessoa->valida(\"atualizar\");\n $pessoaDAO->atualizar($pessoa);\n\n }catch(FormException $erro ) {\n $erros = $erro->getErrors();\n $telefoneControl = new TelefoneControl();\n\n if(!$pessoa->contato && !$pessoa->empresa) $include = new IncludeView('pessoa.form.php','atualizar','pessoa');\n elseif($pessoa->contato) $include = new IncludeView('contato.form.php','atualizar','pessoa');\n elseif($pessoa->empresa) $include = new IncludeView('empresa.form.php','atualizar','pessoa');\n\n $includes = array($include);\n\n $telefoneDAO = new TelefoneDAO();\n $tiposTelefone = $telefoneDAO->listarTipos();\n\n require_once(\"../paginas/content.php\");\n return;\n }\n $this->redir('pessoa', 'detalhe', array('valor'=>$pessoa->id));\n }", "title": "" }, { "docid": "0843fa7b1684968648dc778dff6a0053", "score": "0.5021991", "text": "public function getFkLicitacaoContratoAditivos()\n {\n return $this->fkLicitacaoContratoAditivos;\n }", "title": "" }, { "docid": "a9389e7a140762e480f2408f9212536d", "score": "0.50142765", "text": "public function UpdatePCOPRCLicenseByUserID($data) {\n // We need to separate the data array into two table.\n // License data.. \n $license_data = [\n 'account_fk' => $data['account_fk'],\n 'license_no' => $data['license_no'],\n 'date_issued' => $data['date_issued'],\n 'validity' => $data['validity'],\n 'date_created' => $data['date_created']\n ];\n // Attachment data...\n $attachment_data = [\n 'used_to' => $data['used_to'],\n 'file_name' => $data['file_name'],\n 'user_fk' => $data['user_fk'],\n 'date_created' => $data['date_created']\n ];\n\n // License data for update...\n $update_license_data = [\n 'license_no' => $data['license_no'],\n 'date_issued' => $data['date_issued'],\n 'validity' => $data['validity'],\n 'date_modified' => $data['date_modified']\n ];\n\n // This is for new or add new license.\n if (isset($data['add_license_data']) && $data['add_license_data'] == true) {\n // Remove the license data so can record the attachment data only.\n unset($data['account_fk']);\n unset($data['license_no']);\n unset($data['date_issued']);\n unset($data['validity']);\n // Insert attachment data...\n $is_attachment = $this->db->insert('attachment', $attachment_data);\n if ($is_attachment) {\n $attachment_fk = $this->db->insert_id();\n // Add attachmen_fk element into the array...\n $license = [\n 'account_fk' => $license_data['account_fk'],\n 'attachment_fk' => $attachment_fk,\n 'license_no' => $license_data['license_no'],\n 'date_issued' => $license_data['date_issued'],\n 'validity' => $license_data['validity'],\n 'date_created' => $license_data['date_created']\n ];\n $is_recorded = $this->db->insert('license', $license);\n if ($is_recorded) {\n return true;\n }\n return false;\n } else {\n return false;\n }\n }\n\n // Attachment and license table...\n if (isset($data['update_attachment_data']) && $data['update_attachment_data'] == true) {\n // Select the attachment data first if the data is in the table...\n $this->db->select('a.id');\n $this->db->from('attachment a');\n $this->db->where('a.id', $data['attachment_id']);\n $query = $this->db->get();\n $res = $query->row_array();\n // Update the attachment\n if (isset($res['id'])) {\n // update attachment file name.\n $is_update_att = $this->db->update('attachment', ['file_name' => $data['file_name']], ['id' => $res['id']]);\n if ($is_update_att) {\n // Update the license data...\n $is_update_work_ex = $this->db->update('license', $update_license_data, ['id' => $data['license_id']]);\n if ($is_update_work_ex) {\n return true;\n }\n return false;\n } else {\n return false;\n }\n }\n }\n\n // License data\n if (isset($data['update_license_data']) && $data['update_license_data'] == true) {\n // Update the license table. Data only\n $is_update_license = $this->db->update('license', $update_license_data, ['id' => $data['license_id']]);\n if ($is_update_license) {\n return true;\n }\n return false;\n }\n }", "title": "" }, { "docid": "94e0c68d16fe2b29f76b936e642e2a9d", "score": "0.5009287", "text": "function ReescribirDatos()\n{\n\tglobal $nom_paciente;\n\tglobal $paciente_id;\n\tglobal $estado_id;\n\tglobal $fecha;\n\tglobal $hora;\n\tglobal $valorOp;\n\tglobal $opPrioridad;\n\tglobal $test_peticion;\n\tglobal $observaciones;\n\tglobal $op_seccion_id;\n\tglobal $opPrevision;\n\tglobal $opMedico;\n\t\n\t$nom_paciente->SetValue(CCGetRequestParam('nom_paciente',ccsPost));\n\t$paciente_id->SetValue(CCGetRequestParam('paciente_id',ccsPost));\n\t$estado_id->SetValue(CCGetRequestParam('estado_id',ccsPost));\n\t$fecha->SetValue(CCGetRequestParam('fecha',ccsPost));\n\t$hora->SetValue(CCGetRequestParam('hora',ccsPost));\n\t$observaciones->SetValue(CCGetRequestParam('observaciones',ccsPost));\n\n\t//CrearListBox(&$obj_label, $sel_id=\"\", $tabla, $campo_id, $campo_txt, $condicion=\"\", $def_id=\"\", $def_txt=\"Elija un valor\")\n\t$procedencia_id=CCGetRequestParam('procedencia_id',ccsPost);\n\tCrearListBox($valorOp, $procedencia_id, 'procedencias', 'procedencia_id', 'nom_procedencia');\n\n\t$prioridad_id=CCGetRequestParam('prioridad_id',ccsPost);\n\tCrearListBox($opPrioridad, $prioridad_id, 'prioridades', 'prioridad_id', 'nom_prioridad', \"activo='V'\");\n\n\t$seccion_id=CCGetParam('seccion_id','');\n\t//Llena las secciones\n\tCrearListBox($op_seccion_id, $seccion_id, \"secciones\", \"seccion_id\", \"nom_seccion\", \"activo='V'\",\"0\",\"Todas las secciones\");\n\n\t$prevision_id=CCGetRequestParam('prevision_id',ccsPost);\n\tCrearListBox($opPrevision, $prevision_id, 'previsiones', 'prevision_id', 'nom_prevision', \"activo='V'\");\n\n\t$medico_id=CCGetRequestParam('medico_id',ccsPost);\n\tCrearListBox($opMedico, $medico_id, 'medicos', 'medico_id', 'nom_medico', \"activo='V'\");\n\n\t//echo \"<pre>\".print_r($_POST) .\"</pre>\";\n\n}", "title": "" }, { "docid": "960340469b0ca04881c8ff47a336ca6d", "score": "0.5007998", "text": "function updateAsistente() {\n //Baja los datos del asistente de la peticion.\n $id = $_POST['id-asistente'];\n $nombre = $_POST['nombre-edit'];\n $institucion = $_POST['institucion'];\n $tipo = $_POST['tipo-asistente'];\n \n //Verifica la completitud\n if (!empty($id) && !empty($nombre) && !empty($institucion) && !empty($tipo)) {\n //Persistimos los cambios.\n $asistente = array(\n 'id' => $id,\n 'nombre' => $nombre,\n 'institucion' => $institucion,\n 'tipo' => $tipo\n );\n \n $responseDB = $this->model->update_asistente($asistente);\n \n if (!$responseDB) {\n echo 'error';\n } else {\n echo 'true';\n }\n } else {\n echo 'error-null';\n }\n }", "title": "" }, { "docid": "984e8d3d7dbb531b3352c3dc4bdb2309", "score": "0.49950504", "text": "public function actualizar_repLegalCliente(){\n\n $formulario = $this->input->post();\n $id_cliente = (isset($formulario['id_cliente'])) ? $formulario['id_cliente'] : '';\n $id_repLegal = (isset($formulario['id_repLegal'])) ? $formulario['id_repLegal'] : '';\n $id_datos_personales = (isset($formulario['id_datos_personales'])) ? $formulario['id_datos_personales'] : '';\n $imagen_editar = (isset($formulario['imagen_editar'])) ? $formulario['imagen_editar'] : '';\n $nombre_representante = (isset($formulario['nombre_representante'])) ? $formulario['nombre_representante'] : '';\n $apellido_paterno_rep = (isset($formulario['apellido_paterno_rep'])) ? $formulario['apellido_paterno_rep'] : '';\n $apellido_materno_rep = (isset($formulario['apellido_materno_rep'])) ? $formulario['apellido_materno_rep'] : '';\n $rfc_representante = (isset($formulario['rfc_representante'])) ? $formulario['rfc_representante'] : '';\n $curp_rep_legal = (isset($formulario['curp_rep_legal'])) ? $formulario['curp_rep_legal'] : '';\n $correo_rep_legal = (isset($formulario['correo_rep_legal'])) ? $formulario['correo_rep_legal'] : '';\n $telf_rep_legal = (isset($formulario['telf_rep_legal'])) ? $formulario['telf_rep_legal'] : '';\n $imagen = (isset($formulario['rfc_img_rep_e'])) ? $formulario['rfc_img_rep_e'] : '';\n \n /*-- Cuando proviene de otro formulario el set-validation no funciona por lo que es necesario validar de forma manual--*/\n /*--Verifico que rfc no sea vacio --*/\n if($rfc_representante==\"\"){\n echo \"El campo rfc del rep. legal es obligatorio\"; die('');\n }\n /*-- Verifico tlf no sea vacio --*/\n if($telf_rep_legal==\"\"){\n echo \"El campo teléfono del rep. legal es obligatorio\"; die('');\n }\n /*-- Verificacion en php del formato de email cuando proviene de otro formulario */\n if (!filter_var($correo_rep_legal, FILTER_VALIDATE_EMAIL)) {\n echo \"El campo Correo Electrónico del rep. legal debe contar con un correo válido P. EJ. [email protected]\"; die('');\n }\n /*------------------------------------------------------------------------------------------------*/\n if(!empty($imagen))\n {\n if(file_exists(sys_get_temp_dir().'/'.$imagen))\n {\n rename(sys_get_temp_dir().'/'.$imagen,\n 'assets/cpanel/ClientePagador/images/'.$imagen\n );\n //unlink(sys_get_temp_dir().'/'.$imagen); \n }\n }else{\n echo \"Debe seleccionar la imagen de la copia escaneada del RFC del representante legal\";die('');\n } \n\n $datosPersonales = array(\n 'nombre_datos_personales' => trim(mb_strtoupper($nombre_representante, 'UTF-8')),\n 'apellido_p_datos_personales' => trim(mb_strtoupper($apellido_paterno_rep, 'UTF-8')),\n 'apellido_m_datos_personales' => trim(mb_strtoupper($apellido_materno_rep, 'UTF-8')),\n 'rfc_datos_personales' => trim(mb_strtoupper($rfc_representante, 'UTF-8')),\n 'curp_datos_personales' => trim(mb_strtoupper($curp_rep_legal, 'UTF-8')));\n\n $datosRepLegal = array(\n \n 'correo_rep_legal' => trim($correo_rep_legal),\n 'telf_rep_legal' => trim($telf_rep_legal),\n 'rfc_img' => $imagen\n );\n $datos = array('datosPersonales' => $datosPersonales,\n 'datosRepLegal' => $datosRepLegal);\n \n $this->reglas_validacion('update','repLegal');\n $this->mensajes_reglas();\n if($this->form_validation->run() == true){\n $this->ClientePagador_model->editarRepLegal($id_repLegal,$id_datos_personales, $datos);\n echo json_encode(\"<span>El registro se ha editado exitosamente!</span>\");\n }\n else{\n validation_errors();\n }\n }", "title": "" }, { "docid": "0045414f7d3bca38f4f1a0b28d4c6e16", "score": "0.49884126", "text": "function updateLigneMoisCFHF(){\n \n $dao=new Dao();\n $sql = \"UPDATE lignefraishorsforfait SET mois='$this->mois' WHERE libelleFrais='$this->libelleFrais' AND id='$this->id'\";\n $resu=$dao->executeRequete($sql);\n}", "title": "" }, { "docid": "ff7df1ca812a81273cfaab54791c7199", "score": "0.49831337", "text": "function Atualizar()\n\t\t{\n\t\t\t$sql = \"update cliente set\n\t\t\t\t\tnome = ?,email = ?,senha = ?,telefone = ?,celular = ?\n\t\t\t\t\twhere codcli = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array(\n\t\t\t$this->nome,$this->email,$this->senha,$this->telefone,$this->celular,\n\t\t\t$this->codcli));\n\t\t}", "title": "" }, { "docid": "516230270f5f76334b00d80dcda75d27", "score": "0.4981935", "text": "public function save() {\n if ($this->data['id']) {\n \\field_update_field((array) $this);\n } else {\n $this->data = \\field_create_field((array) $this);\n }\n return $this;\n }", "title": "" }, { "docid": "f9d38d281b43aad31f2645ec03ed7d4b", "score": "0.49752164", "text": "public function getFkLicitacaoPublicacaoRescisaoConvenios()\n {\n return $this->fkLicitacaoPublicacaoRescisaoConvenios;\n }", "title": "" }, { "docid": "ef7c36d3206a731f306166f354b88e17", "score": "0.49733198", "text": "function evt__form_sql__modificacion($datos)\n\t{\n\t\t$datos['proyecto'] = $this->proyecto;\n\t\t$datos['fuente_datos'] = $this->fuente;\n\t\t$this->dep('datos')->set($datos);\n\t}", "title": "" }, { "docid": "3f3283fcef0537d79bd41ddbe7810e98", "score": "0.49726138", "text": "public function liberarLicencia($idLicenciaLiberar){\n\t\t\n\t\t$query = \"UPDATE tb_licencias SET estado = 'Disponible' WHERE idLicencia = '$idLicenciaLiberar' \";\n\t\t\n\t\t$conexion = parent::conexionAdmin();\n\t\t\n\t\t$res = $conexion->query($query);\n\t\t\n\t}", "title": "" }, { "docid": "0695045c0ebb32fe8eefe10a52d23a4a", "score": "0.49690822", "text": "public function editarIncicendia($id){\n\t\t$objeto = new modelo();\n\t\t$data[\"id\"] = $id;\n\t\t$data[\"titulo\"] = \"Modificar Incidencia\";\n\t\t$data[\"objeto\"] = $objeto->getIncidencia($id); //llamando método que muestra un producto en el formulario\n\t\trequire_once \"vista/admin/modificarIncidencia.php\";\n\n\t}", "title": "" }, { "docid": "ca30d3284bdf49f70279899f8865210c", "score": "0.49688482", "text": "static public function ctrEditarCompra(){\n\n\t\tif(isset($_POST[\"editarCompra\"])){\n\n\t\t\t/*=============================================\n\t\t\tFORMATEAR TABLA DE PRODUCTOS Y LA DE CLIENTES\n\t\t\t=============================================*/\n\t\t\t$tabla = \"compras\";\n\n\t\t\t$item = \"codigo\";\n\t\t\t$valor = $_POST[\"editarCompra\"];//por a qui traeremos el codigo de la venta correspondiente\n\n\t\t\t$traerCompras = ModeloCompras::mdlMostrarCompras($tabla, $item, $valor);\n\n\t\t\t/*=============================================\n\t\t\tREVISAR SI VIENE PRODUCTOS EDITADOS\n\t\t\t=============================================*/\n\n\t\t\tif($_POST[\"listaProductosCompra\"] == \"\"){\n\t\t\t\t//\n\t\t\t\t$listaProductos = $traerCompras[\"compras\"];\n\t\t\t\t$cambioProducto = false;\n\n\t\t\t\t//var_dump($cambioProducto);\n\t\t\t}else{\n\n\t\t\t\t$listaProductos = $_POST[\"listaProductosCompra\"];\n\t\t\t\t\n\t\t\t\t$cambioProducto = true;\n\t\t\t\t//var_dump($cambioProducto);\n\t\t\t}\n\n\t\t\t/*=============================================\n\t\t\tGUARDAR CAMBIOS DE LA COMPRA\n\t\t\t=============================================*/\t\n\n\n\t\t\t$datos = array(\"id_usuario\"=>$_POST[\"idComprador\"],\n\t\t\t\t\t\t \"id_proveedor\"=>$_POST[\"seleccionarProveedor\"],\n\t\t\t\t\t\t \"codigo\"=>$_POST[\"editarCompra\"],\n\t\t\t\t\t\t \"compras\"=>$_POST[\"listaProductosCompra\"],\n\t\t\t\t\t\t \"total\"=>$_POST[\"totalVenta\"]);\n\n\t\t\t//var_dump($datos);\n\t\t\t$respuesta = ModeloCompras::mdlEditarCompras($tabla, $datos);\n\t\t\t//var_dump($respuesta);\n\n\t\t\tif($respuesta == \"ok\"){\n\n\t\t\t\techo'<script>\n\n\t\t\t\tlocalStorage.removeItem(\"rango\");\n\n\t\t\t\tswal({\n\t\t\t\t\t type: \"success\",\n\t\t\t\t\t title: \"La compra se ha sido guardada correctamente\",\n\t\t\t\t\t showConfirmButton: true,\n\t\t\t\t\t confirmButtonText: \"Cerrar\"\n\t\t\t\t\t }).then((result) => {\n\t\t\t\t\t\t\t\tif (result.value) {\n\n\t\t\t\t\t\t\t\twindow.location = \"administrar-Compras\";\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t})\n\n\t\t\t\t</script>';\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "d8a1a42663f3f9d9c9f8410b4eaf0f9e", "score": "0.4963073", "text": "public static function CargarProveedor(){\n $proveedorNuevo = new self();\n $proveedorNuevo->id = $_POST[\"id\"];\n $proveedorNuevo->nombre = $_POST[\"nombre\"];\n $proveedorNuevo->email = $_POST[\"email\"];\n $proveedorNuevo->foto = self::CargarFoto();\n $proveedorNuevo->GuardarProveedor();\n }", "title": "" }, { "docid": "b29f9643bf7960ae9eb07e945b256626", "score": "0.49604926", "text": "public function getFkLicitacaoContrato()\n {\n return $this->fkLicitacaoContrato;\n }", "title": "" }, { "docid": "6a54daf1013e400e147e8994a25be59e", "score": "0.49555105", "text": "function modificarPrueba(){\n\t\t$this->procedimiento='cobra.f_tcb_prueba_ime';\n\t\t$this->transaccion='CB_PRUEBA_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_prueba','id_prueba','int4');\n\t\t$this->setParametro('empleado','empleado','bool');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha','fecha','date');\n\t\t$this->setParametro('nombre','nombre','varchar');\n\t\t$this->setParametro('sueldo','sueldo','numeric');\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}", "title": "" }, { "docid": "00553399e9edafac64aa67acc31cb25d", "score": "0.4950737", "text": "public function save(){\n\n $this->validate();\n\n if ($this->shipping_price_id) {\n $shipping_price = ShippingCompanyPrice::find($this->shipping_price_id);\n } else {\n $shipping_price = new ShippingCompanyPrice();\n }\n $shipping_price->shipping_company_id = $this->shipping_company_id;\n $shipping_price->location_id = $this->location_id;\n $shipping_price->amount = $this->amount;\n $shipping_price->save();\n $this->clear();\n }", "title": "" }, { "docid": "841e66d4249ee78d1688480688fc579f", "score": "0.49424016", "text": "function updateContratoPortal(){\n $this->objFunc=$this->create('MODAgencia');\n $this->res=$this->objFunc->updateContratoPortal($this->objParam);\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "title": "" }, { "docid": "9157fc591a96103909c2aa059f805e9f", "score": "0.4935162", "text": "public function editform($Naprawa){\n \n //d($Naprawa);\n \n $model = $this->getModel('Producent'); \n $producenci = $model->getAllForSelect(); \n $this->set('producenci', $producenci);\n \n $model = $this->getModel('TypMyjki'); \n $myjki = $model->getAllForSelect(); \n $this->set('myjki', $myjki);\n \n $model = $this->getModel('Osprzet'); \n $osprzet = $model->getAllForSelect(); \n $this->set('osprzet', $osprzet);\n \n $model = $this->getModel('Status'); \n $status = $model->getAllForSelect(); \n $this->set('status', $status);\n \n $model = $this->getModel('Opcja'); \n $opcje = $model->getAllForSelect(); \n $this->set('opcje', $opcje);\n\t\t\t\n\t\t\t$this->set('IDNaprawa', $Naprawa['IDNaprawa']); \n $this->set('IDKlient', $Naprawa['IDKlient']);\n $this->set('IDProducent', $Naprawa['IDProducent']);\n $this->set('NazMyjki', $Naprawa['NazMyjki']);\n $this->set('IDTypMyjki', $Naprawa['IDTypMyjki']);\n $this->set('IDOsprzet', $Naprawa['IDOsprzet']);\n $this->set('CzyWycena', $Naprawa['CzyWycena']);\n $this->set('Symptomy', $Naprawa['Symptomy']);\n $this->set('Diagnoza', $Naprawa['Diagnoza']);\n $this->set('OpisNaprawy', $Naprawa['OpisNaprawy']);\n $this->set('Czesci', $Naprawa['Czesci']);\n $this->set('DataDostarczenia', $Naprawa['DataDostarczenia']);\n\t\t\t$this->set('DataOdbioru', $Naprawa['DataOdbioru']);\n\t\t\t$this->set('IDStatus', $Naprawa['IDStatus']);\n\t\t\t$this->set('KwotaNaprawy', $Naprawa['KwotaNaprawy']);\n\t\t\t$this->set('Kartka', $Naprawa['Kartka']);\n\t\t\t$this->set('Kontakt', $Naprawa['Kontakt']);\n $this->set('klienci', $this->getModel('Klient')->getAllForSelect()); \n\n\t\t\tif(isset($data['error']))\n $this->set('error', $data['error']);\n $this->set('customScript', array('Naprawa'));\n\t\t\t$this->render('NaprawaEditForm'); \n }", "title": "" }, { "docid": "2e3a3d6b034f260ba7d2948374f4741c", "score": "0.49304253", "text": "public function addFkLicitacaoRescisaoConvenios(\\Urbem\\CoreBundle\\Entity\\Licitacao\\RescisaoConvenio $fkLicitacaoRescisaoConvenio)\n {\n if (false === $this->fkLicitacaoRescisaoConvenios->contains($fkLicitacaoRescisaoConvenio)) {\n $fkLicitacaoRescisaoConvenio->setFkSwCgm($this);\n $this->fkLicitacaoRescisaoConvenios->add($fkLicitacaoRescisaoConvenio);\n }\n \n return $this;\n }", "title": "" }, { "docid": "c732dc0eb262e0830b343d1c3b5d7e85", "score": "0.49289235", "text": "public function update(Request $request, $id)\n {\n $fechaInicio = date(\"Y-m-d\", strtotime($request->fechaInicio));\n $fechaFin = date(\"Y-m-d\", strtotime($request->fechaFin));\n $solicitud = Solicitud::find($id);\n $solicitud->fechaInicio = $fechaInicio;\n $solicitud->fechaFin = $fechaFin;\n $solicitud->horaInicio = $request->horaInicio;\n $solicitud->horaFin = $request->horaFin;\n $solicitud->actividadAcademica = $request->actividadAcademica;\n $solicitud->asistentesEstimados = $request->asistentesEstimados;\n $solicitud->area_id = $request->area_id;\n $solicitud->espacio_id = $request->espacio_id;\n // si guarda el registro en solicitudes añade las relaciones de los elementos solicitados\n if ($solicitud->save()) {\n // Relaciones\n if ($request->cantidad) {\n $manyToMany = array();\n for ($i = 0; $i < count($request->cantidad); $i++) {\n //----resta el elemento seleccionado de las existencias\n $elemento = Elemento::find($request->elemento_id[$i]);\n\n $el = DB::table('elemento_solicitud')->select('cantidad')->where('elemento_id', $request->elemento_id[$i])->first();\n if ($el != null) {\n if ($el->cantidad != $request->cantidad[$i]) {\n $elemento->existencias = $elemento->existencias + $el->cantidad;\n $elemento->existencias = $elemento->existencias - $request->cantidad[$i];\n $elemento->save();\n }\n } else {\n $elemento->existencias = $elemento->existencias - $request->cantidad[$i];\n $elemento->save();\n }\n //----Fin\n $manyToMany[$request->elemento_id[$i]] = ['cantidad' => $request->cantidad[$i]];\n }\n $solicitud->elementosSolicitud()->sync($manyToMany);\n }\n // Registro exitoso\n $this->notificacion($solicitud->id);\n $this->registroExitoso();\n return redirect()->route('solicitud.show', $solicitud->id);\n } else {\n $this->registroError();\n return back();\n }\n }", "title": "" }, { "docid": "7931de7317b30ca76057601b3cb97dfe", "score": "0.49252182", "text": "function guardarCambios() {\n \t\t// Si el id_compra es NULL lo toma como una nueva orden de compra y guarda los datos de la orden de compra en la base de datos.\n \t\tif($this->id_compra == NULL) {\n \t\t\t$consulta = sprintf(\"insert into orden_compra(id_produccion,id_proveedor,orden_compra,numero_pedido,fecha_pedido,fecha_requerida,fecha_factura,estado,tasas,fecha_creado,direccion_entrega,direccion_facturacion,activo) value (%s,%s,%s,%s,%s,current_timestamp,current_timestamp,%s,%s,current_timestamp,%s,%s,1)\",\n\t \t\t$this->makeValue($this->id_produccion, \"int\"),\n\t \t\t$this->makeValue($this->id_proveedor, \"int\"),\n\t\t\t $this->makeValue($this->orden_compra, \"text\"),\n\t\t\t $this->makeValue($this->numero_pedido, \"text\"),\n\t\t\t $this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t $this->makeValue($this->estado, \"text\"),\n\t\t\t $this->makeValue($this->tasas, \"float\"),\n\t\t\t $this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t $this->makeValue($this->direccion_facturacion, \"text\"));\n\t\t $this->setConsulta($consulta);\n\t\t if($this->ejecutarSoloConsulta()) {\n\t\t \t\treturn 1;\n\t\t } \n\t\t else {\n\t\t \treturn 2;\n\t\t }\n\t\t}\n\t\t// Modificación de la Orden de Compra / Modificación de varias órdenes de compra desde el listado.\n\t\telse {\n\t\t\t$consulta = \"\";\n\t\t\tswitch($this->estado_anterior) {\n\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=current_timestamp, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStock();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStock();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStock();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t/* El usuario no puede cambiar desde este estado\n\t\t\t\tcase \"PARCIALMENTE RECIBIDO\"\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t*/\n\t\t\t\t/* El usuario no puede cambiar desde este estado\n\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\t*/\n\t\t\t\tcase \"STOCK\":\n\t\t\t\t\tswitch($this->estado) {\n\t\t\t\t\t\tcase \"GENERADA\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStockFuera();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO INICIADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStockFuera();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PEDIDO CERRADO\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\t\t$this->ordenCompraStockFuera();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"PARCIALMENTE RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"RECIBIDO\":\n\t\t\t\t\t\t\t// El usuario no puede cambiar a este estado\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\tcase \"STOCK\":\n\t\t\t\t\t\t\t$consulta = sprintf(\"update orden_compra set fecha_pedido=%s, direccion_entrega=%s, direccion_facturacion=%s, fecha_factura=current_timestamp, estado=%s, tasas=%s where id_orden_compra=%s\",\n\t\t\t\t\t\t\t\t$this->makeValue($this->fecha_pedido, \"date\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_entrega, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->direccion_facturacion, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->estado, \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->tasas, \"float\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"));\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif ($consulta != \"\"){\n\t\t\t\t$this->setConsulta($consulta);\n\t\t\t\tif($this->ejecutarSoloConsulta()) {\n\t\t\t\t\t// Insertamos las facturas en la BBDD\n\t\t\t\t\t$i=0;\n\t\t\t\t\t$fallo = false;\n\t\t\t\t\twhile ($i<count($this->nombre_factura) and (!$fallo)) {\n\t\t\t\t\t\tif (!empty($this->nombre_factura[$i])) {\n\t\t\t\t\t\t\t$consulta_archivos = sprintf(\"insert into orden_compra_facturas (id_orden, id_proveedor, nombre_factura, neto, fecha_entrega, activo) value (%s,%s,%s,%s,current_timestamp,1)\",\n \t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->id_proveedor, \"int\"),\n \t\t\t\t\t\t\t$this->makeValue($this->nombre_factura[$i], \"text\"),\n\t\t\t\t\t\t\t\t$this->makeValue($this->neto_factura[$i],\"float\"));\n\t\t\t\t\t\t\t$this->setConsulta($consulta_archivos);\n\t\t\t\t\t\t\tif (!$this->ejecutarSoloConsulta()) $fallo = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$i++;\n\t\t\t\t\t}\n\t\t\t\t\tif (!$fallo) {\n\t\t\t\t\t// Insertamos los archivos adjuntos\n\t\t\t\t\t\t$i=0;\n\t\t\t\t\t\t$fallo = false;\n\t\t\t\t\t\twhile ($i<count($this->nombre_archivo_adjunto) and (!$fallo)) {\n\t\t\t\t\t\t\tif (!empty($this->nombre_archivo_adjunto[$i])) {\n\t\t\t\t\t\t\t\t$consulta_archivos = sprintf(\"insert into orden_compra_adjuntos (id_orden, id_proveedor, nombre_adjunto, fecha_creado, activo) value (%s,%s,%s,current_timestamp,1)\",\n \t\t\t\t\t\t\t\t$this->makeValue($this->id_compra, \"int\"),\n\t\t\t\t\t\t\t\t\t$this->makeValue($this->id_proveedor, \"int\"),\n \t\t\t\t\t\t\t\t$this->makeValue($this->nombre_archivo_adjunto[$i], \"text\"));\n\t\t\t\t\t\t\t\t$this->setConsulta($consulta_archivos);\n\t\t\t\t\t\t\t\tif (!$this->ejecutarSoloConsulta()) $fallo = true;\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\tif (!$fallo) {\n\t\t\t\t\t\t\t// MODIFICACION ORDEN DE COMPRA OK\n\t\t\t\t\t\t\treturn 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\treturn 17;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// Fallo al guardar las facturas en la BBDD\n\t\t\t\t\t\treturn 13;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn 3;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn 1;\n\t\t}\n\t}", "title": "" }, { "docid": "bf7a964bfe9d47a24fbfda3c967c6419", "score": "0.49251813", "text": "public function ModiEncafact(){\n $upd = \"nit_enca_cl = '\".$this->_nit_enca_cl.\"'\";\n $upd .= \",nom_enca_cl = '\".$this->_nom_enca_cl.\"'\";\n $upd .= \",fecha_enca_fact = '\".$this->_fecha_enca_fact.\"'\";\n $upd .= \",nom_enca_vendedor = '\".$this->_nom_enca_vendedor.\"'\";\n $upd .= \",subtota_enca = '\".$this->_subtota_enca.\"'\";\n $upd .= \",total_enca = '\".$this->_total_enca.\"'\";\n $query = \"UPDATE encabezadofactura SET \".$upd.\" WHERE num_enca_fact='\".$this->_num_enca_fact.\"'\";\n $this->_db->Query($query);\n if($this->_db->FilasAfectadas()>0){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "63b64cdc3b94edc5bf0b6f2ddf1a1879", "score": "0.49229997", "text": "public function addFkLicitacaoPublicacaoRescisaoConvenios(\\Urbem\\CoreBundle\\Entity\\Licitacao\\PublicacaoRescisaoConvenio $fkLicitacaoPublicacaoRescisaoConvenio)\n {\n if (false === $this->fkLicitacaoPublicacaoRescisaoConvenios->contains($fkLicitacaoPublicacaoRescisaoConvenio)) {\n $fkLicitacaoPublicacaoRescisaoConvenio->setFkSwCgm($this);\n $this->fkLicitacaoPublicacaoRescisaoConvenios->add($fkLicitacaoPublicacaoRescisaoConvenio);\n }\n \n return $this;\n }", "title": "" }, { "docid": "73de497f5bb4a976558fea2fe896bd11", "score": "0.49223745", "text": "public function getFkLicitacaoMembroAdicionais()\n {\n return $this->fkLicitacaoMembroAdicionais;\n }", "title": "" }, { "docid": "38158697ffe509b143c69cceda2f996d", "score": "0.49091285", "text": "public function save(){\n //creo el usuario\n $ret=User::createUser([\n 'username' => $this->user_login,\n 'password' => $this->password,\n 'email' => $this->user_email,\n 'first_name' => $this->first_name,\n 'last_name' => $this->last_name,\n ]);\n\n\n //campos ACF\n $user=User::slug($this->user_login)->first();\n $user->setACFields([\n 'soci_email' => $this->user_email,\n 'localitat' => $this->localitat,\n 'adreca' => $this->adreca,\n 'data_naixement' => $this->data_naixement,\n 'telefon' => $this->telefon,\n 'disciplines' => $this->disciplines_id\n ]);\n\n // die();\n // dd($user);\n }", "title": "" } ]
bc845cb37bed7f829e2638e356d1a358
Method to set the value of field snsbind_updatetime
[ { "docid": "11f02603316ef2ceffd76971a1f383ac", "score": "0.75159365", "text": "public function setSnsbindUpdatetime($snsbind_updatetime)\n {\n $this->snsbind_updatetime = $snsbind_updatetime;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "37e66ebf21a223e046925373235da54f", "score": "0.743825", "text": "public function getSnsbindUpdatetime()\n {\n return $this->snsbind_updatetime;\n }", "title": "" }, { "docid": "51ce1ec197a3afaed444dcfb512634a9", "score": "0.60285175", "text": "protected function setUpdatedTime($updated_time) {\r\n $this->updated_time = strtotime($updated_time);\r\n }", "title": "" }, { "docid": "70593c8e5f79feb71cb70ffe6a42acde", "score": "0.5821943", "text": "public function setSendTimeAttribute ($value)\n {\n $this->attributes['send_time'] = Carbon::parse($value)->format('Y-m-d');\n }", "title": "" }, { "docid": "41b81826a94114b2fb83ef04f4aca06f", "score": "0.56083614", "text": "public function setUpdated()\n {\n $this->setUpdateTime(new \\DateTime(\"now\"));\n }", "title": "" }, { "docid": "fe76d29e81ca985866ba723723e6b30c", "score": "0.55441415", "text": "public function setUpdateAt() {\n $this->update_at = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "18e8b50674c1891076e595d9fe045655", "score": "0.55163854", "text": "private function setLastUpdatedTimestamp()\n {\n $generalInfo = $this->networkData->json('general');\n $this->lastUpdatedAt = Carbon::create($generalInfo['update_timestamp']);\n $this->info('Network data obtained.');\n }", "title": "" }, { "docid": "605ed42658d87594ae9e9eae038f41ea", "score": "0.54686594", "text": "public function setLastUpdate(): void\n {\n parent::setLastUpdate(date('c', strtotime($this->item->getUpdatedAt())));\n }", "title": "" }, { "docid": "dba12d75df9d085411b00e1e7e915690", "score": "0.54542494", "text": "public function setUpdated($value)\n {\n $this->_updated_at = $value;\n }", "title": "" }, { "docid": "ff6c53fc6be57aae46351fe7b141f418", "score": "0.5432613", "text": "function setLastUpdate($symbol)\n {\n $symbol = strtoupper($symbol);\n $time = time();\n $query = \"INSERT OR REPLACE INTO TABLE_STATS ('symbol','last_update') VALUES ('{$symbol}',{$time})\";\n return $this->_db->exec($query);\n }", "title": "" }, { "docid": "4e76ed1b4064177a35fc006e29f06f2e", "score": "0.5427614", "text": "protected function _update()\n {\n \t$this->date_updated = date('Y-m-d H:i:s');\n \tparent::_update();\n }", "title": "" }, { "docid": "b6e1b87af8b93082543234f61319b8f6", "score": "0.5426845", "text": "public function setServertime($value)\n {\n return $this->set(self::SERVERTIME, $value);\n }", "title": "" }, { "docid": "f244b3c4894ac5b68f113176ebf0a2ca", "score": "0.5413799", "text": "public function saveReminderEmailsLastSentTime(){\n $currentTime = time();\n $this->sql = $this->conn->prepare(\"UPDATE variables v SET v.Value = :currentTime WHERE v.name = 'ReminderEmailsLastSent'\");\n\t\t$this->sql->bindParam(':currentTime', $currentTime);\n\t\treturn $this->sql->execute();\n }", "title": "" }, { "docid": "443597925b6ee088f72227f0748815c7", "score": "0.53917706", "text": "function update_last_check_in_time(){\n $now = time();\n $this->db->update(\"users\",[\n \"last_check_in_time\" => $now\n ],[\n \"uid\" => $this->uid\n ]);\n }", "title": "" }, { "docid": "87a4a610fdbcb51a5e5250c8bf283d6f", "score": "0.5343173", "text": "public function setUpdate_time($update_time) {\n\t\t$this->update_time = $update_time;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2a5422edf7388c2b8cfaef7f2782c772", "score": "0.5318106", "text": "public function getUpdate_time() {\n\t\treturn $this->update_time;\n\t}", "title": "" }, { "docid": "1f313a7bb594a6199a50fa2f2a09ad14", "score": "0.53132147", "text": "public function setUpdatedAtValue()\n {\n $this->updated = new \\DateTime;\n }", "title": "" }, { "docid": "417e1dea3ae3c65bb60ba820ede0dd44", "score": "0.5291251", "text": "public function updateTimestamp()\n {\n $this->updated_at = date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "c38f296201f042d1197199ddc313a39c", "score": "0.5278153", "text": "public function setUpdateTs($update_ts)\n {\n $this->update_ts = $update_ts;\n\n return $this;\n }", "title": "" }, { "docid": "c38f296201f042d1197199ddc313a39c", "score": "0.5278153", "text": "public function setUpdateTs($update_ts)\n {\n $this->update_ts = $update_ts;\n\n return $this;\n }", "title": "" }, { "docid": "b64f926366cff6c12e8cf014a64ac51e", "score": "0.5270701", "text": "protected function setUpdated(){\n if($this->_id > 0){\n $this->db->exec(\n [\"UPDATE \" . $this->table . \" SET updated=NOW() WHERE id=:id\"],\n [\n [':id' => $this->_id]\n ]\n );\n }\n }", "title": "" }, { "docid": "68c764133ff65063437604cd0c40549b", "score": "0.5266091", "text": "function setUpdated($value) {\n\t\treturn $this->setColumnValue('updated', $value, Model::COLUMN_TYPE_INTEGER_TIMESTAMP);\n\t}", "title": "" }, { "docid": "68c764133ff65063437604cd0c40549b", "score": "0.5266091", "text": "function setUpdated($value) {\n\t\treturn $this->setColumnValue('updated', $value, Model::COLUMN_TYPE_INTEGER_TIMESTAMP);\n\t}", "title": "" }, { "docid": "68c764133ff65063437604cd0c40549b", "score": "0.5266091", "text": "function setUpdated($value) {\n\t\treturn $this->setColumnValue('updated', $value, Model::COLUMN_TYPE_INTEGER_TIMESTAMP);\n\t}", "title": "" }, { "docid": "5fb2f59b51aa119fb1d2e22a295ad781", "score": "0.5265049", "text": "public function setLastUpdate($lastUpdate);", "title": "" }, { "docid": "34808c2956de63f78e51015dc339002b", "score": "0.5256573", "text": "private function uset($name,$value,$updateTime,$relativeExpiry='60 seconds'){\n\t\t$updateTime = i()->Time($updateTime);\n\t\t$updateTimeUnix = $updateTime->unix();\n\t\tif($relativeExpiry){\n\t\t\t$expiryTimeUnix = $updateTime->relative('+'.$relativeExpiry)->unix();\n\t\t\t$expiry = $expiryTimeUnix - $updateTimeUnix;\n\t\t}\n\t\t$this->cacher->set($name,$value,$expiry);\n\t\t$this->cacher->set($name.'-update',$updateTimeUnix,$expiry);\n\t}", "title": "" }, { "docid": "84eb2e65dc7614ecab9b0d6064af7984", "score": "0.52506715", "text": "function setBidLastSessionTime($config_server_ip,$config_server_port,$login_name,$login_pwd,$connect=true) {\n try {\n //login und $steam def. in \"./includes/login.php\"\n $steam = new steam_connector($config_server_ip,\n\t\t \t\t$config_server_port,\n\t\t\t\t$login_name,\n\t\t\t\t$login_pwd);\n\n if ($steam->get_login_status()) {\n $steamUser = $steam->get_login_user();\n $bidLastSessionTime = $steamUser->get_attribute(\"bid:last_session_time\");\n if (!$bidLastSessionTime || !$connect) {\n\t$bidLastSessionTime = array();\n\t$bidLastSessionTime[0] = $bidLastSessionTime[1] = time();\n } else {\n\t$bidLastSessionTime[0] = $bidLastSessionTime[1];\n\t$bidLastSessionTime[1] = time();\n }\n $steamUser->set_attribute(\"bid:last_session_time\", $bidLastSessionTime);\n $steam->disconnect();\n }\n }\n catch (Exception $e) {}\n}", "title": "" }, { "docid": "ae74da1b0fce2a09118bc999c3f135f5", "score": "0.5207041", "text": "public function setUpdateTime($update_time)\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$this->$column = $update_time;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ae74da1b0fce2a09118bc999c3f135f5", "score": "0.5207041", "text": "public function setUpdateTime($update_time)\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$this->$column = $update_time;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "18b1819b73d549c506be5a3932965959", "score": "0.51301974", "text": "public function getUpdateDateTime()\n {\n return $this->_getValue('Update');\n }", "title": "" }, { "docid": "06a614e8eb50722f39348e3759030f24", "score": "0.5123445", "text": "public function setLastUpdateDateTime($val)\n {\n $this->_propDict[\"lastUpdateDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d96a7c3aa7ca7fb2a7bbecc0d2abeb5e", "score": "0.5119901", "text": "public function useServerTime()\n {\n $request = $this->httpRequest(\"v3/time\");\n if (isset($request['serverTime'])) {\n $this->info['timeOffset'] = $request['serverTime'] - (microtime(true) * 1000);\n }\n }", "title": "" }, { "docid": "04cf52be4cea44029a7e73db001385f4", "score": "0.51161367", "text": "public function getSnsbindExpiresin()\n {\n return $this->snsbind_expiresin;\n }", "title": "" }, { "docid": "bd200c9c23715e5545e2aa82e875f0a7", "score": "0.5106884", "text": "public function getUpdateTs()\n {\n return $this->update_ts;\n }", "title": "" }, { "docid": "bd200c9c23715e5545e2aa82e875f0a7", "score": "0.5106884", "text": "public function getUpdateTs()\n {\n return $this->update_ts;\n }", "title": "" }, { "docid": "9e5c4fcda83e2d8fa0f6f681f47d5ba1", "score": "0.5095758", "text": "protected function updatedTimestamp()\n {\n $this->setUpdatedAt(new \\DateTime());\n }", "title": "" }, { "docid": "2f77e89c9334f7bc26dc469d92d469be", "score": "0.5084251", "text": "public function set_user_last_login() {\n $this->user_last_login = time();\n $this->update();\n// $query = sql::result(\"UPDATE `user` SET `user_last_login` = \".time().\" WHERE `userID` ='$this->userID' \");\n }", "title": "" }, { "docid": "4b2869fc3192a61b119c2d3f08234c10", "score": "0.50798804", "text": "public function saveLastUpdated($now)\n {\n $stmt = $this->pdo->prepare(\"UPDATE ping SET last_updated = :last_updated WHERE id = 1\");\n $stmt->bindParam(':last_updated', $now, \\PDO::PARAM_STR);\n\n $stmt->execute();\n }", "title": "" }, { "docid": "acb5044a093776fc14dd304588c26749", "score": "0.50687814", "text": "public function updateUserSendCarTime($uid)\n {\n $time = time();\n $sql = \"UPDATE parking_user SET send_car_time=$time WHERE uid=:uid\";\n $this->_wdb->query($sql, array('uid' => $uid));\n }", "title": "" }, { "docid": "008eb51bf260d2db377091e14e4384ec", "score": "0.5052831", "text": "public function setUpdateTime($update_time) {\n\t\t$this->update_time = $update_time;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2a1d7b37197996f10ec0c1616d8fee05", "score": "0.50508726", "text": "public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "2a1d7b37197996f10ec0c1616d8fee05", "score": "0.50508726", "text": "public function getUpdateTime()\n\t{\n\t\t$column = self::COL_UPDATE_TIME;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (string)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "title": "" }, { "docid": "14063107852edb6413a41c1c85930951", "score": "0.5043658", "text": "public function beforeUpdate()\n {\n $this->last_update = date('Y-m-d H:i:s');\n }", "title": "" }, { "docid": "8f0c5c3ceb2eaa1a534ba893893d1285", "score": "0.50402266", "text": "public function setSysLastChanged() {}", "title": "" }, { "docid": "4af061417f81221ce8bb5c8ffc7f4d8e", "score": "0.50354975", "text": "public function getTime() {\n return $this->bnetUpdate;\n }", "title": "" }, { "docid": "772e40557883d1a4317d503b93b42b76", "score": "0.5027588", "text": "public function set_session_updated() {\n $_SESSION['updated'] = time();\n }", "title": "" }, { "docid": "d5c2dc5ca663657739b2211f7a058550", "score": "0.5021027", "text": "protected function setLastUpdateDate(){\n\t\tif ( !isset($this->metadata['last_updated']) ){\n\t\t\t$this->metadata['last_updated'] = gmdate('Y-m-d H:i:s', filemtime($this->filename));\n\t\t}\n\t}", "title": "" }, { "docid": "e1b49b8a07c91856e7983cfc58d4c8a3", "score": "0.49915355", "text": "function setTimestamp($paramIndex, $value)\r\n {\r\n if ($value === null) {\r\n $this->setNull($paramIndex);\r\n } else {\r\n if (is_numeric($value)) $value = date('Y-m-d H:i:s', $value);\r\n elseif (is_object($value)) $value = date('Y-m-d H:i:s', $value->getTime());\r\n $this->boundInVars[$paramIndex] = $value;\r\n }\r\n }", "title": "" }, { "docid": "5c7e49efb0a3acc57d6725b4606148b0", "score": "0.4986924", "text": "public function setUpdatedAtValue()\n {\n $this->updatedAt = new \\DateTime();\n }", "title": "" }, { "docid": "459be05a708b4999e9c096e2f7fc5f1b", "score": "0.49826717", "text": "public function setStartTimeAttribute($value)\n {\n $this->attributes['start_time'] = Carbon::parse($value)->format('H:i');\n }", "title": "" }, { "docid": "c1c987bf81e9effb64f21b97da823502", "score": "0.4970181", "text": "public function set_track_time() {\n // We've tracked, so record the time\n $track_times = get_option( 'wisdom_last_track_time', array() );\n // Set different times according to plugin, in case we are tracking multiple plugins\n $track_times[$this->plugin_name] = time();\n update_option( 'wisdom_last_track_time', $track_times );\n }", "title": "" }, { "docid": "cf040be5c79af2599af2b81bc041f22a", "score": "0.49675375", "text": "public function setEndTimeAttribute($value)\n {\n $this->attributes['end_time'] = Carbon::parse($value)->format('H:i');\n }", "title": "" }, { "docid": "e21cd18f2dac25b7c59d5a30abacb892", "score": "0.4965294", "text": "public function setTimeToAttribute($value)\n {\n if ($value) {\n $this->attributes['time_to'] = Carbon::parse($value)->format('H:i:s');\n } else {\n $this->attributes['time_to'] = null;\n }\n }", "title": "" }, { "docid": "5427f10480b8c416f04c44384f5bf05a", "score": "0.4958612", "text": "public function updateLeveltime()\r\n\t{\r\n\t\tglobal $SERVER,$DB,$USER,$PSWD,$conn;\t\t\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//prepare\r\n\t\t $stmt=$conn->prepare(\"UPDATE users SET leveltime=CURRENT_TIMESTAMP WHERE id= :uid\");\r\n\t\t //bind\r\n\t\t\t$stmt->bindParam(':uid',$this->userId);\r\n\t\t\t//set and execute\r\n\t\t\t$stmt->execute();\r\n\t\t}\r\n\t\tcatch(PDOException $e)\r\n\t\t{\r\n\t\t header(\"Location: index.php?msg=\".urlencode(\"timestamp not updated\"));\r\n\t \texit();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "2b86ce8d8f9084842106766abb0670a2", "score": "0.49554634", "text": "public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }", "title": "" }, { "docid": "2b86ce8d8f9084842106766abb0670a2", "score": "0.49554634", "text": "public function setLastUpdatedDateTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastUpdatedDateTime', $value);\n }", "title": "" }, { "docid": "01b9d3f32ae2afb376bc3e54c56821b5", "score": "0.49526316", "text": "public function setUpdated();", "title": "" }, { "docid": "64bed5834aae8d5191ba0126a60aeefb", "score": "0.4952296", "text": "public function prepareUpdate()\r\n {\r\n $minutes = $this->seconds / 60;\r\n $hours = floor($minutes / 60);\r\n $minutes -= $hours * 60;\r\n $this->time = ($hours < 10 ? '0' : '') . $hours . ':' . ($minutes < 10 ? '0' : '') . $minutes;\r\n $this->date = Yii::$app->formatter->asDate($this->created_at);\r\n }", "title": "" }, { "docid": "b77f1217669960cd1a58787bb67d34a1", "score": "0.4951552", "text": "function wc_set_user_last_update_time($user_id)\n {\n }", "title": "" }, { "docid": "3a69fd439521c091994a2db01a26053e", "score": "0.49471414", "text": "public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat($this->dateFormat, $date);\n if ($myDate > Carbon::now()) {\n $this->attributes['last_update'] = Carbon::parse($date);\n } else {\n $this->attributes['last_update'] = Carbon::createFromFormat($this->dateFormat, $date);\n }\n }", "title": "" }, { "docid": "8af5d41a03d604a7a80182848f3c73f2", "score": "0.49470022", "text": "public function setStartTimeAttribute($value)\n {\n $this->attributes['start_time'] = Carbon::parse($value)->toTimeString();\n\n }", "title": "" }, { "docid": "bf5233e2856eb237dd393bd287824252", "score": "0.494581", "text": "public function setUpdated($updated)\n {\n $this->{self::FLD_UPDATED} = $updated;\n }", "title": "" }, { "docid": "a2a1a0c21ac4212cd14d9c8afd8353e1", "score": "0.49455214", "text": "private function setUpdateParam() {\n if (!empty($this->submission->sid)) {\n $submitted = array($this->submission->sid => new stdClass());\n webform_civicrm_webform_submission_load($submitted);\n if (isset($submitted[$this->submission->sid]->civicrm)) {\n $this->update = 'sid';\n }\n }\n }", "title": "" }, { "docid": "124e901d4b72f283cdb986f865d826ca", "score": "0.493736", "text": "public function setLastLogin()\n {\n $dba = DB::getAdaptor();\n $this->lastlogin = date('Y-m-d H:i:s');\n $dba->update('users',array('lastlogin'=>$this->lastlogin),array('id'=>$this->id));\n }", "title": "" }, { "docid": "d0d5d759722007ceb81f6517dee867df", "score": "0.49323282", "text": "public function onPreUpdate()\n {\n $this->updated = new \\DateTime(\"now\");\n }", "title": "" }, { "docid": "aae803e53e7752ccd52665f92b273969", "score": "0.49321437", "text": "public function setUpdate($update) {\n $this->update = $update;\n }", "title": "" }, { "docid": "442a5d44b9d16b82b3b93728418e0f2a", "score": "0.49297124", "text": "public function set_module_time($p_module_time){\n\t\t$this->v_module_time = new MongoDate(strtotime($p_module_time));\n\t}", "title": "" }, { "docid": "6c3cb84ba87b149dc85dde3670711556", "score": "0.49287266", "text": "public function setUsrcsendtime($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->usrcsendtime !== $v) {\n $this->usrcsendtime = $v;\n $this->modifiedColumns[DplusUserTableMap::COL_USRCSENDTIME] = true;\n }\n\n return $this;\n }", "title": "" }, { "docid": "19c4946b4e0a599411a3bac83e6fcf4c", "score": "0.4926921", "text": "function setListRingTime($exten,$follow_me_listring_time) {\n\t\t$this->FreePBX->astman->database_put('AMPUSER', \"$exten/followme/grptime\", $follow_me_listring_time);\n\t}", "title": "" }, { "docid": "64054a04ac1ddccf8ad6a8eb61990e96", "score": "0.48974076", "text": "public function setLastUpdateDateTime($val)\n {\n $this->_propDict[\"lastUpdateDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "64054a04ac1ddccf8ad6a8eb61990e96", "score": "0.48974076", "text": "public function setLastUpdateDateTime($val)\n {\n $this->_propDict[\"lastUpdateDateTime\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "f6f1345c76647828990ff72d1fed4335", "score": "0.48963916", "text": "public function setLastUpdateAttribute($date)\n {\n $myDate = Carbon::createFromFormat('Y-m-d', $date);\n if($myDate > Carbon::now()){\n $this->attributes['last_update'] = Carbon::parse($date);\n }else{\n $this->attributes['last_update'] = Carbon::createFromFormat('Y-m-d', $date); \n } \n }", "title": "" }, { "docid": "e453d1ca22e274d855711e2deffcd03f", "score": "0.48960206", "text": "public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }", "title": "" }, { "docid": "e250d189439b4cab9c09ae9e99feea54", "score": "0.48911566", "text": "public function setServiceTimeAttribute() {\n \t$services = [\n\t\t\t'Traditional Haircut' => 20,\n\t\t\t'Specialty Haircut' => 25,\n\t\t\t'Beard Edge-up' => 10,\n\t\t\t'Full Shave' => 15,\n\t\t\t'Haircut and Beard Edge-up' => 30,\n\t\t\t'Haircut and Full Shave' => 35\n\t\t];\n\n \t$this->attributes['service_time'] = (int)$services[$this->attributes['service']];\n\t }", "title": "" }, { "docid": "4f0424db73ca76860cc617ebcc62311b", "score": "0.48859373", "text": "public function setUpdated_at($updated_at)\n {\n $this->updated_at = $updated_at;\n }", "title": "" }, { "docid": "c8950da34eee44c81e8352c00781c9ef", "score": "0.48858586", "text": "public function setUpdate($update);", "title": "" }, { "docid": "9907cf5164535209b60d680bb27313a0", "score": "0.48851576", "text": "public function setTime()\n {\n }", "title": "" }, { "docid": "6cb2e265d3366de5f44759413d86c80b", "score": "0.4877191", "text": "private function setBindValue(array $bind_value)\n\t{\n\t\tforeach ($bind_value as $key => $value)\n\t\t{\n\t\t\t$pdo_param = PDO::PARAM_STR;\n\n\t\t\tif (is_null($value))\n\t\t\t{\n\t\t\t\t$pdo_param = PDO::PARAM_NULL;\n\t\t\t}\n\n\t\t\tif (is_integer($value))\n\t\t\t{\n\t\t\t\t$pdo_param = PDO::PARAM_INT;\n\t\t\t}\n\n\t\t\t$this->sql_object->bindValue($key, $value, $pdo_param);\n\t\t}\n\t}", "title": "" }, { "docid": "c889a0df26b29edcdeb55613b125e70b", "score": "0.4876955", "text": "function getUpdateTime(){\n\t\t$status =& $this->getStatus();\n\t\treturn $status['Update_time'];\n\t}", "title": "" }, { "docid": "c5f1649bebd236f0e3961fa45a461919", "score": "0.48690918", "text": "public function setLastLogin($v)\n\t{\n\t\t// we treat '' as NULL for temporal objects because DateTime('') == DateTime('now')\n\t\t// -- which is unexpected, to say the least.\n\t\tif ($v === null || $v === '') {\n\t\t\t$dt = null;\n\t\t} elseif ($v instanceof DateTime) {\n\t\t\t$dt = $v;\n\t\t} else {\n\t\t\t// some string/numeric value passed; we normalize that so that we can\n\t\t\t// validate it.\n\t\t\ttry {\n\t\t\t\tif (is_numeric($v)) { // if it's a unix timestamp\n\t\t\t\t\t$dt = new DateTime('@'.$v, new DateTimeZone('UTC'));\n\t\t\t\t\t// We have to explicitly specify and then change the time zone because of a\n\t\t\t\t\t// DateTime bug: http://bugs.php.net/bug.php?id=43003\n\t\t\t\t\t$dt->setTimeZone(new DateTimeZone(date_default_timezone_get()));\n\t\t\t\t} else {\n\t\t\t\t\t$dt = new DateTime($v);\n\t\t\t\t}\n\t\t\t} catch (Exception $x) {\n\t\t\t\tthrow new PropelException('Error parsing date/time value: ' . var_export($v, true), $x);\n\t\t\t}\n\t\t}\n\n\t\tif ( $this->last_login !== null || $dt !== null ) {\n\t\t\t// (nested ifs are a little easier to read in this case)\n\n\t\t\t$currNorm = ($this->last_login !== null && $tmpDt = new DateTime($this->last_login)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n\t\t\t$newNorm = ($dt !== null) ? $dt->format('Y-m-d H:i:s') : null;\n\n\t\t\tif ( ($currNorm !== $newNorm) // normalized values don't match \n\t\t\t\t\t)\n\t\t\t{\n\t\t\t\t$this->last_login = ($dt ? $dt->format('Y-m-d H:i:s') : null);\n\t\t\t\t$this->modifiedColumns[] = sfGuardUserPeer::LAST_LOGIN;\n\t\t\t}\n\t\t} // if either are not null\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "cd252cc036a5284f70963add24349265", "score": "0.4860671", "text": "public function setFbUpdatedAtAttribute( $timestamp )\n {\n $this->attributes['fb_updated_at'] = $timestamp ? Carbon::parse($timestamp)->toDateTimeString() : '0000-00-00 00:00:00';\n }", "title": "" }, { "docid": "19525b6347f41fb67f153281376e4e97", "score": "0.48506415", "text": "function setSettingTime($a_sSettingTime)\n {\n if (!is_null($this->_sSettingTime) && $this->_sSettingTime !== (string) $a_sSettingTime) {\n $this->_markModified();\n }\n $this->_sSettingTime = (string) $a_sSettingTime;\n }", "title": "" }, { "docid": "053204143ecb27398c53ad55c6a8e905", "score": "0.48463383", "text": "public function updateLastLoginTime($uid)\n {\n $date = time();\n $sql = \"UPDATE parking_user SET last_login_time=$date WHERE uid=:uid\";\n\n $this->_wdb->query($sql,array('uid'=>$uid));\n }", "title": "" }, { "docid": "c04e6e0559983446dbc3fdd0c210769e", "score": "0.48252672", "text": "public function setLastRefreshTime(?DateTime $value): void {\n $this->getBackingStore()->set('lastRefreshTime', $value);\n }", "title": "" }, { "docid": "8d6ffc53fe18d82f6086ad52e83f3e97", "score": "0.48247498", "text": "public function getUpdateDatetime()\n {\n if (! isset($this->updateDatetime)) {\n $dt = new \\DateTime(null, new \\DateTimeZone('UTC'));\n $this->updateDatetime = $dt->format('Y-m-d H:i:s');\n }\n return $this->updateDatetime;\n }", "title": "" }, { "docid": "070bfa93a61b9a4a0dc4524f41036a85", "score": "0.4819864", "text": "public function setUpdateTime($updateTime) {\n $this->_updateTime = (int)$updateTime;\n $this->_params['updateTime'] = (int)$updateTime;\n return $this;\n }", "title": "" }, { "docid": "fa9ce9cfb16a81260481dc31244a267b", "score": "0.48153487", "text": "function updateMailLastSendTime( $counter ) \n {\n $newsletter = $this->newsletter();\n $now = nvNewsletterTools::currentDatetime();\n \n $newsletter->setAttribute( 'send_last_access_time', $now );\n $newsletter->setAttribute( 'sent_mail_count', $counter );\n $newsletter->store();\n }", "title": "" }, { "docid": "e674804e639506faca1b086fb4499d68", "score": "0.48151356", "text": "public function setUpdatedAtAttribute($value)\n {\n $this->attributes['updated_at'] = $value;\n }", "title": "" }, { "docid": "89bdeff1cad2a555f593ae50e0cba01d", "score": "0.48140448", "text": "public function setLastUpdate($v)\n {\n $dt = PropelDateTime::newInstance($v, null, 'DateTime');\n if ($this->last_update !== null || $dt !== null) {\n $currentDateAsString = ($this->last_update !== null && $tmpDt = new DateTime($this->last_update)) ? $tmpDt->format('Y-m-d H:i:s') : null;\n $newDateAsString = $dt ? $dt->format('Y-m-d H:i:s') : null;\n if ($currentDateAsString !== $newDateAsString) {\n $this->last_update = $newDateAsString;\n $this->modifiedColumns[] = AktPdPeer::LAST_UPDATE;\n }\n } // if either are not null\n\n\n return $this;\n }", "title": "" }, { "docid": "a0bb09bdd88b21f284962be3cd13df42", "score": "0.48109514", "text": "public function get_update_at()\n {\n return $this->_update_at;\n }", "title": "" }, { "docid": "c909e91c71e4449624455002b5d54e8f", "score": "0.48051152", "text": "public function setUpdatedAfter(?string $updatedAfter): void\n {\n $this->updatedAfter = $updatedAfter;\n }", "title": "" }, { "docid": "adf4fda94cfad2b6215e651e2423ffa8", "score": "0.4804172", "text": "public function setSnsbindExpiresin($snsbind_expiresin)\n {\n $this->snsbind_expiresin = $snsbind_expiresin;\n\n return $this;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" }, { "docid": "4fbe63f413c682c82db8afc8579c3692", "score": "0.47997797", "text": "public function getUpdateTime()\n {\n return $this->update_time;\n }", "title": "" } ]
c607d680851a3c188f3b5cf58c203b82
Constructs the test case.
[ { "docid": "46c6873e5deab8c7f5a9ac9815237b99", "score": "0.0", "text": "public function __construct ()\r {\r // TODO Auto-generated constructor\r }", "title": "" } ]
[ { "docid": "304e129bd0972a705622288ed3b3c8a8", "score": "0.7088254", "text": "public function test_create_test_case()\n {\n //Having\n $this->visit('/test_cases')\n ->see('Test Case')\n ->type(2,'tests_number')\n ->press('Submit');\n\n //When\n $this->seeInDatabase('test_cases', [\n \"tests_number\" => 2\n ]);\n\n //Then\n $this->seeInElement('h3', 'Cube initialization');\n }", "title": "" }, { "docid": "25ae4698549cd94d94203e8008550376", "score": "0.68590117", "text": "public function __construct()\r\n\t{\r\n\t\t$this->setName ( 'testsSuite' );\r\n\t\t\r\n\t\t$this->addTestSuite ( 'Xerxes_MetalibRecordTest' );\r\n\t\t\r\n\t\t$this->addTestSuite ( 'Xerxes_Record_DocumentTest' );\r\n\t\t\r\n\t\t// load language file\r\n\t\t\r\n\t\t$objLanguage = Xerxes_Framework_Languages::getInstance();\r\n\t\t$objLanguage->init();\r\n\t}", "title": "" }, { "docid": "080c788a09ff0c8df050d8fa03b27b93", "score": "0.6749498", "text": "public function __construct()\n\t{\n\t\t$this->setName('DiamondTestSuit');\n\t\t$this->addTestSuite(ArrayParserTest::class);\n\t\t$this->addTestSuite(BitwiseTest::class);\n\t\t$this->addTestSuite(BoolParserTest::class);\n\t\t$this->addTestSuite(DiamondTest::class);\n\t\t$this->addTestSuite(FloatParserTest::class);\n\t\t$this->addTestSuite(IntParserTest::class);\n\t\t$this->addTestSuite(NumberParserTest::class);\n\t\t$this->addTestSuite(SSLBase64EncryptionTest::class);\n\t\t$this->addTestSuite(StringParserTest::class);\n\t}", "title": "" }, { "docid": "185e07ae2e4a704d149271e6621f9218", "score": "0.67419976", "text": "public /*.void.*/ function __construct() {\n\t\t$context\t\t= cast('array[string]string', self::getTestContext());\n\t\t$this->resultsNodeName\t= $context[self::TAGNAME_RESULTSNODENAME];\n\t\t$this->suite\t\t= $context[self::TAGNAME_SUITE];\n\t\t$this->testIndex\t= (int) $context[self::TAGNAME_INDEX];\n\t\t$this->document\t\t= self::getDOMDocument($this->suite);\t\t// Get the test suite information\n\t\t$this->testList\t\t= self::getTestList($this->document);\t\t// Get list of tests\n\n\t\tif ($this->count() === 0)\tself::terminate(self::STATUS_FATALERROR, 'There are no tests defined in this test suite');\n\t\tif ($this->testIndex > -1)\t$this->getTestFromList();\n\t}", "title": "" }, { "docid": "6d724c205dc2626e3d4bb8f38c3e562e", "score": "0.67399204", "text": "function __construct() {\n $this->testSuccess = true;\n $this->dataValidateOnlyFirstIteration = false;\n $this->testFiles = [];\n\n // Set default values to test varaibles, so later we can descide which tests to run.\n $this->headers = [];\n $this->parameters = [];\n $this->expectedResponseStatus = \"ZincPHP_\" . md5( \"expectedResponseStatus\" );\n $this->expectEmptyResponse = \"ZincPHP_\" . md5( \"expectEmptyResponse\" );\n $this->expectedDataValue = \"ZincPHP_\" . md5( \"expectedDataValue\" );\n $this->responseDataValidator = \"ZincPHP_\" . md5( \"responseDataValidator\" );\n\n }", "title": "" }, { "docid": "e40be0f3ba8223f93c81c2bbf944fcc6", "score": "0.67397803", "text": "public function testConstruct()\n {\n $this->assertTrue(true);\n }", "title": "" }, { "docid": "0abcdfc3e2924a02de478255d5f707e6", "score": "0.67238384", "text": "public function __construct() {\n $this->addTest(\\Kata\\Core\\Test::build(\"t1.1\", FALSE, array(array(), 3)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t1.2\", FALSE, array(array(1), 3)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t1.3\", 0, array(array(1), 1)));\n\n $this->addTest(\\Kata\\Core\\Test::build(\"t2.1\", 0, array(array(1, 3, 5), 1)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t2.2\", 1, array(array(1, 3, 5), 3)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t2.3\", 2, array(array(1, 3, 5), 5)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t2.4\", FALSE, array(array(1, 3, 5), 0)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t2.5\", FALSE, array(array(1, 3, 5), 2)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t2.6\", FALSE, array(array(1, 3, 5), 4)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t2.7\", FALSE, array(array(1, 3, 5), 6)));\n\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.1\", 0, array(array(1, 3, 5, 7), 1)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.2\", 1, array(array(1, 3, 5, 7), 3)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.3\", 2, array(array(1, 3, 5, 7), 5)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.4\", 3, array(array(1, 3, 5, 7), 7)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.5\", FALSE, array(array(1, 3, 5, 7), 0)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.6\", FALSE, array(array(1, 3, 5, 7), 2)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.7\", FALSE, array(array(1, 3, 5, 7), 4)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.8\", FALSE, array(array(1, 3, 5, 7), 6)));\n $this->addTest(\\Kata\\Core\\Test::build(\"t3.9\", FALSE, array(array(1, 3, 5, 7), 8)));\n }", "title": "" }, { "docid": "8ee7073282775dc8e2b470e6a3d89d88", "score": "0.6709584", "text": "public function testConstruct()\n {\n new CorrectHorseBatteryStaple();\n }", "title": "" }, { "docid": "419a82cce6371387a618a0819e6cbc89", "score": "0.66562843", "text": "public function generateTests();", "title": "" }, { "docid": "0235d34dd1c4390488d1c24b8ff71c3d", "score": "0.6636905", "text": "public function __construct() {\r\n\t\t$this->setName ( 'Issues Test Suite' );\r\n\t\t$this->addTestSuite ( 'WURFL_Issues_IssuesTest' );\r\n\t}", "title": "" }, { "docid": "0c97fd9922dafc91d964bdb1ed2b4bd2", "score": "0.66267806", "text": "public function setUp() {\n $this->invocations= create('new util.collections.HashTable<string, lang.types.ArrayList>()');\n $this->suite= new TestSuite();\n $this->suite->addListener($this);\n }", "title": "" }, { "docid": "317927b01e81b574a61dba11a6cbe5d4", "score": "0.65775603", "text": "public function __construct()\n\t{\n\t\t$this->setName( 'AllTestsSuite' );\n\t\t$this->addTestSuite( 'ControllerTest' );\n\t\t$this->addTestSuite( 'ModelTest' );\n\t\t$this->addTestSuite( 'MediatorTest' );\n\t\t$this->addTestSuite( 'ProxyTest' );\n\t\t$this->addTestSuite( 'NotificationTest' );\n\t\t$this->addTestSuite( 'ObserverTest' );\n\t\t$this->addTestSuite( 'FacadeTest' );\n\t\t$this->addTestSuite( 'SimpleCommandTest' );\n\t\t$this->addTestSuite( 'MacroCommandTest' );\n\t\t$this->addTestSuite( 'ViewTest' );\n\t}", "title": "" }, { "docid": "b479295443bcc39f63fad9aa6ec6418d", "score": "0.6543705", "text": "public function testConstruct() {\n $this->assertEquals('Ex', Factory::bookShort(2));\n $id = Factory::bookId('Col');\n $this->assertEquals('Col', Factory::bookShort($id));\n }", "title": "" }, { "docid": "d57c67e4d2b896b0ddd31decda9967f4", "score": "0.64878535", "text": "protected function setUp()\n {\n parent::setUp();\n \n $this->configuration = new \\RPI\\Utilities\\ContentBuild\\Lib\\Configuration(\n $this->logger,\n __DIR__.\"/BuildTest/ui.build.xml\"\n );\n\n $this->processor = new \\RPI\\Utilities\\ContentBuild\\Lib\\Processor(\n $this->logger,\n $this->configuration->project,\n false\n );\n\n $this->resolver = new \\RPI\\Utilities\\ContentBuild\\Lib\\UriResolver(\n $this->logger,\n $this->processor,\n $this->configuration->project\n );\n \n $this->object = new \\RPI\\Utilities\\ContentBuild\\Lib\\Build(\n $this->logger,\n $this->configuration->project,\n $this->processor,\n $this->resolver,\n array(\n )\n );\n }", "title": "" }, { "docid": "10bd2208a19e38c429e9c8c796588c38", "score": "0.6464463", "text": "public function run()\n {\n $dataTable = [\n [\n \"pid\" => 16,\n \"rank\" => 1,\n \"input_file_name\" => \"helloworld.in\",\n \"output_file_name\" => \"helloworld.out\",\n \"md5sum_input\" => \"b026324c6904b2a9cb4b88d6d61c81d1\",\n \"md5sum_output\" => \"59ca0efa9f5633cb0371bbc0355478d8\",\n ],\n ];\n\n foreach($dataTable as $data)\n {\n Testcase::create($data);\n }\n }", "title": "" }, { "docid": "06a56543cb54d009629fec394bac594e", "score": "0.64224774", "text": "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "title": "" }, { "docid": "06a56543cb54d009629fec394bac594e", "score": "0.64224774", "text": "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "title": "" }, { "docid": "06a56543cb54d009629fec394bac594e", "score": "0.64224774", "text": "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "title": "" }, { "docid": "06a56543cb54d009629fec394bac594e", "score": "0.64224774", "text": "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n \t\tPHPUnit_TextUI_TestRunner::run( $suite);\n \t}", "title": "" }, { "docid": "024f074620f68982189709bb7c2b2c69", "score": "0.64159954", "text": "function __construct()\n {\n $pdo = new PDO('mysql:host=' . HOST . ';dbname=' .\n DB_NAME, USERNAME, PASSWORD);\n\n $connection = new PHPUnit_Extensions_Database_DB_DefaultDatabaseConnection($pdo, 'test');\n $tester = new PHPUnit_Extensions_Database_DefaultTester($connection);\n\n $tester->setSetUpOperation(PHPUnit_Extensions_Database_Operation_Factory::CLEAN_INSERT());\n $tester->setTearDownOperation(PHPUnit_Extensions_Database_Operation_Factory::NONE());\n $tester->setDataSet(new PHPUnit_Extensions_Database_DataSet_FlatXMLDataSet\n (dirname(__FILE__).'/../models/files/users.xml'));\n\n $this->tester = $tester;\n }", "title": "" }, { "docid": "2220d9f4ede30efb7114a7a06643d23e", "score": "0.64136344", "text": "public function __construct() {\n\t\t$this->setName ( 'DeepzoomSuite' );\n\t\t$this->addTestSuite ( 'Oz_Deepzoom_DescriptorTest' );\n\t\n\t}", "title": "" }, { "docid": "327879126dc5d49405e05ec99e21b35b", "score": "0.6396112", "text": "public function testCreateRendition()\n {\n }", "title": "" }, { "docid": "3a2c492fb200c8fc2c7dd0d1a0ed4727", "score": "0.639569", "text": "static function main() {\n $suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n PHPUnit_TextUI_TestRunner::run( $suite);\n }", "title": "" }, { "docid": "3a2c492fb200c8fc2c7dd0d1a0ed4727", "score": "0.639569", "text": "static function main() {\n $suite = new PHPUnit_Framework_TestSuite( __CLASS__);\n PHPUnit_TextUI_TestRunner::run( $suite);\n }", "title": "" }, { "docid": "f35ba6acddde3b9ea4c4de2409bebe13", "score": "0.63775176", "text": "public function testUnitClassCreateUnit()\r\n {\r\n\r\n }", "title": "" }, { "docid": "997c61002a2e70bb909cf4d650400f3d", "score": "0.6360921", "text": "public function testCreateEstoqueSala()\n {\n\n }", "title": "" }, { "docid": "8db0db0d1fc756774b0ab1e219fe2e69", "score": "0.6354942", "text": "static function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "title": "" }, { "docid": "c96ac7dffec00d35f264e2657017547e", "score": "0.6339625", "text": "public function __construct() {\r\n\t\t$this->setName( 'Curly Streams' );\r\n\t\t\r\n\t\t$this->addTestSuite('Curly_Stream_Memory_SeekableTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Memory_InputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Memory_OutputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_MemoryTest');\r\n\t\t$this->addTestSuite('Curly_Stream_File_InputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_File_OutputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_FileTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Buffered_InputWithMemoryTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Buffered_OutputWithFileTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Append_InputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Capsule_InputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Binary_InputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Binary_OutputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Xml_OutputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Wrapper_RegistryTest');\r\n\t\t$this->addTestSuite('Curly_Stream_WrapperTest');\r\n\t\t$this->addTestSuite('Curly_Stream_FactoryTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Infinite_InputTest');\r\n\t\t$this->addTestSuite('Curly_Stream_Empty_InputTest');\r\n\t\t//$this->addTestSuite('Curly_Stream_Base64_InputTest');\r\n\t}", "title": "" }, { "docid": "59dc98c97cf320da218c62e2ed1d4873", "score": "0.6331106", "text": "public function run()\n {\n // Create Testing data here ..\n }", "title": "" }, { "docid": "52c828759498e8d4c7667a58f08889a6", "score": "0.6283991", "text": "public function run()\n {\n factory(TipoTestAntigeno::class)->create([\n 'nombre' => 'POSITIVO',\n ]);\n factory(TipoTestAntigeno::class)->create([\n 'nombre' => 'NEGATIVO',\n ]);\n factory(TipoTestAntigeno::class)->create([\n 'nombre' => 'NO REALIZADO',\n ]);\n }", "title": "" }, { "docid": "489b054ab36526c8c678b7c10d4b2f42", "score": "0.6275494", "text": "function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "title": "" }, { "docid": "489b054ab36526c8c678b7c10d4b2f42", "score": "0.6275494", "text": "function main() {\n\t\t$suite = new PHPUnit_Framework_TestSuite(__CLASS__);\n\t\t$result = PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "title": "" }, { "docid": "8c259b49efe72fda0b84cd678812b80c", "score": "0.6203585", "text": "public function __construct()\n {\n $this->classesToTest = [\n new \\PHPKoans\\Chapters\\ChapterArrayBasic(),\n new \\PHPKoans\\Chapters\\ChapterArrayFunction1(),\n new \\PHPKoans\\Chapters\\ChapterArrayFunction2(),\n new \\PHPKoans\\Chapters\\ChapterArrayFunction3(),\n ];\n }", "title": "" }, { "docid": "0fbbcc8837bd7893e4022269e640474c", "score": "0.62000364", "text": "public function testConstructor()\n\t{\n\t\tnew PageInfoProcess( self::$server . \"/index.html\" );\n\t\t$this->addToAssertionCount(1);\n\t}", "title": "" }, { "docid": "c814786c78f66665c6ecb751c825e33d", "score": "0.61939657", "text": "protected function setUp(): void\n {\n $this->tranche = new Tranche(50000, 0.3);\n\n $tranches = array( $this->tranche );\n\n $this->loan = new Loan(new DateTime('01/10/2015'), new DateTime('11/11/2015'), $tranches);\n\n $this->investor = new Investor(500);\n\n $this->veryRichInvestor = new Investor(50000000000);\n\n $this->investmentValidator = new InvestmentValidator();\n\n $this->investments = new Investments($this->investmentValidator);\n }", "title": "" }, { "docid": "1be5ba35f2dee7ce91ba571e5c123298", "score": "0.61793995", "text": "protected function setUp() {\r\n\t\t\t// Get ID of some task\r\n\t\t$where\t\t= 'deleted = 0 AND `type` = ' . TASK_TYPE_TASK;\r\n\t\t$idTestTask\t= Todoyu::db()->getFieldValue('id', 'ext_project_task', $where, '', '', '0,1', 'id');\r\n\r\n\t\t$this->array\t= array(\r\n\t\t\t'id'\t=> $idTestTask\r\n\t\t);\r\n\r\n\t\t\t// Construct\r\n\t\t$this->object = new TodoyuProjectTask($idTestTask);\r\n\t}", "title": "" }, { "docid": "0c608e2149c92a4748ebf1b87603fbef", "score": "0.6175601", "text": "public function setUp(){}", "title": "" }, { "docid": "3ce7b627bcd572e2d9f893d73993e86a", "score": "0.6169924", "text": "protected function setUp()\n {\n\t\t$this->wildcardStringMatchType = new phpkit_type_URNInetType(\"urn:inet:middlebury.edu:search:wildcard\");\n \n \t$this->mcugId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MCUG');\n $this->miisId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:catalog/MIIS');\n\n\t \t$this->manager = $this->sharedFixture['CourseManager'];\n $this->session = $this->manager->getTopicSearchSessionForCatalog($this->mcugId);\n $this->object = $this->session->getTopicSearch();\n \n $this->termId = new phpkit_id_URNInetId('urn:inet:middlebury.edu:term/200820');\n\n\t\t$this->termType = new phpkit_type_URNInetType('urn:inet:middlebury.edu:record:terms');\n\n $this->subjectType = new phpkit_type_URNInetType(\"urn:inet:middlebury.edu:genera:topic/subject\");\n $this->departmentType = new phpkit_type_URNInetType(\"urn:inet:middlebury.edu:genera:topic/department\");\n $this->divisionType = new phpkit_type_URNInetType(\"urn:inet:middlebury.edu:genera:topic/division\");\n $this->requirementType = new phpkit_type_URNInetType(\"urn:inet:middlebury.edu:genera:topic/requirement\");\n }", "title": "" }, { "docid": "d36fd13269de9a20fdc793873dfe3b37", "score": "0.61513525", "text": "public function testConstructor()\n {\n // no params\n $result = new ExperimentNote();\n $this->assertEquals('Sizzle\\Bacon\\Database\\ExperimentNote', get_class($result));\n }", "title": "" }, { "docid": "b73f90074a4b74fea6ee6cdf4c09aed1", "score": "0.61475223", "text": "public static function main()\n {\n require_once 'PHPUnit/TextUI/TestRunner.php';\n\n $suite = new PHPUnit_Framework_TestSuite('Tinebase_Record_AbstractTest');\n $result = PHPUnit_TextUI_TestRunner::run($suite);\n }", "title": "" }, { "docid": "73f4aa4719455fa7b4f5617e1d293c64", "score": "0.6139939", "text": "public final function setUp(): void {\n\t\t// run the default setUp() method first\n\t\tparent::setUp();\n\t\t$password = \"abc123\";\n\t\t$this->VALID_PROFILE_HASH = password_hash($password, PASSWORD_ARGON2I, [\"time_cost\" => 384]);\n\t\t$this->VALID_ACTIVATION = bin2hex(random_bytes(16));\n\n\t\t// create and insert a Profile to own the test REVIEW\n\t\t$this->profile = new Profile(generateUuidV4(), $this->VALID_ACTIVATION, \"@handle\", \"[email protected]\", $this->VALID_PROFILE_HASH, \"https://morganfillman.space/g/300/300\");\n\t\t$this->profile->insert($this->getPDO());\n\n\t\t// create and insert a RecArea to own the test Review\n\t\t$this->recArea = new RecArea(generateUuidV4(), \"Random rec area test description\", \"Take a left, a right, then test.\", \"https://morganfillman.space/g/300/300\", 35.084386, -106.650422, \"https://morganfillman.space/g/300/300\", \"Test Location 1\");\n\t\t$this->recArea->insert($this->getPDO());\n\n\t\t// calculate the date (just use the time the unit test was setup...)\n\t\t$this->VALID_REVIEWDATETIME = new \\DateTime();\n\n\t\t//format the sunrise date to use for testing\n\t\t$this->VALID_SUNRISEDATE = new \\DateTime();\n\t\t$this->VALID_SUNRISEDATE->sub(new \\DateInterval(\"P10D\"));\n\n\t\t//format the sunset date to use for testing\n\t\t$this->VALID_SUNSETDATE = new\\DateTime();\n\t\t$this->VALID_SUNSETDATE->add(new \\DateInterval(\"P10D\"));\n\t}", "title": "" }, { "docid": "a0fc072e3c34857a01ec1f3af6ba272a", "score": "0.61370564", "text": "public function testConstruct()\n {\n $this->assertAttributeEquals($this->ioMock, 'io', $this->testObj);\n $this->assertAttributeEquals($this->loggerMock, 'logger',\n $this->testObj);\n $this->assertAttributeEquals($this->userMock, 'users', $this->testObj);\n $this->assertAttributeNotEmpty('accountAdmin', $this->testObj);\n $this->assertAttributeNotEmpty('accountMain', $this->testObj);\n }", "title": "" }, { "docid": "a2a83758323577ef59770170a7947ac3", "score": "0.6136313", "text": "function TextTestResult() {\n $this->TestResult(); // call superclass constructor\n }", "title": "" }, { "docid": "570e59f6d5a34f181a46b7b3de85259e", "score": "0.61325294", "text": "public function setUp()\n {\n // We are assuming that every test that inherits from this\n // will be testing a class that is the name of the test but with\n // Test_ removed\n $className = get_class($this);\n $className = substr($className, 5);\n $this->object = new $className();\n\n // Create a new registry of variables\n $registry = new Saros\\Core\\Registry();\n\n $this->init();\n }", "title": "" }, { "docid": "76e8bed6a41478f8fffae59f2b34f12d", "score": "0.6131667", "text": "protected function setUp()\n\t {\n\t\t$xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\";\n\t\t$xml .= \"<test><element attribute=\\\"attr\\\">value</element><anotherelement></anotherelement><lastelement>element</lastelement></test>\";\n\t\t$this->object = new DOMrunner($xml);\n\t }", "title": "" }, { "docid": "e294e924100e455a44fe641132566bf1", "score": "0.6126729", "text": "protected abstract function setUp();", "title": "" }, { "docid": "e294e924100e455a44fe641132566bf1", "score": "0.6126729", "text": "protected abstract function setUp();", "title": "" }, { "docid": "57b6c593492ab34a9dbfb6453d360fc5", "score": "0.6125977", "text": "public function testCase1()\n {\n\n }", "title": "" }, { "docid": "8b0d39e7e19c0526d6c55f7953b3408e", "score": "0.61231875", "text": "protected function setUp()\n {\n parent::setUp();\n $this->memory = new Memory(1.0, 5.0);\n $this->statistics = new Statistics(20, 0);\n $this->internedString = new InternedStrings(\n 2.0,\n 8.0,\n 6.0,\n 1100\n );\n $this->scripts = new ScriptCollection(array($this->createScript()));\n $config = array('config' => 'value');\n $this->cacheData = new StaticCacheData(\n true,\n $this->memory,\n $this->statistics,\n $this->internedString,\n $this->scripts,\n $config\n );\n }", "title": "" }, { "docid": "a96c812c2b4806d474354486be29b9fe", "score": "0.6106434", "text": "public function testConstruct()\n {\n $this->assertAttributeEquals($this->userMock, 'userAccount',\n $this->testObj);\n $this->assertAttributeEquals($this->filterMock, 'filter',\n $this->testObj);\n $this->assertAttributeEquals($this->modelMock, 'articleModel',\n $this->testObj);\n }", "title": "" }, { "docid": "fd1f6a92504cc23b1a434a3fd7f7c352", "score": "0.6102881", "text": "public function setUp() {\n $this->suite= new TestSuite();\n }", "title": "" }, { "docid": "0cbf9c171a7304b394009b27f0fb964b", "score": "0.6099038", "text": "public function testConstruct() {\n\t\t$this->subject = new Security(['context' => $this->context, 'classes' => [\n\t\t\t'password' => __CLASS__,\n\t\t\t'requestToken' => __CLASS__\n\t\t]]);\n\t\t$this->assertPattern('/value=\"WORKING\"/', $this->subject->requestToken());\n\t}", "title": "" }, { "docid": "7b1943fa90f89659d3be9199de7fbf60", "score": "0.60973185", "text": "public function __construct($test)\n {\n $this->test = $test;\n }", "title": "" }, { "docid": "3bb6515cfac4f2552ef00bc976b96f26", "score": "0.6092091", "text": "protected function generateTest()\n {\n $destination = implode(DIRECTORY_SEPARATOR, array(\"test\", \"Model\", \"Validator\", $this->classname . \"Test.php\"));\n $namespace = Strata::getNamespace() . \"\\\\Test\\\\Model\\\\Validator\";\n\n $writer = $this->getWriter();\n $writer->setClassname($this->classname . \"Test\");\n $writer->setNamespace($namespace);\n $writer->setDestination($destination);\n $writer->setUses(\"\\nuse Strata\\Test\\Test as StrataTest;\\n\");\n $writer->setExtends(\"StrataTest\");\n $writer->create(true);\n }", "title": "" }, { "docid": "a9d509bd780c74297509d51d2fb3221e", "score": "0.6074336", "text": "public static function main()\n {\n\t\t$suite = new PHPUnit_Framework_TestSuite('Tine 2.0 fileobject backend tests');\n PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "title": "" }, { "docid": "d20e5184aa968ebbabe0ae6b5f87d2bb", "score": "0.607028", "text": "public static function main()\n {\n\t\t$suite = new PHPUnit_Framework_TestSuite('Tine 2.0 Phone Json Tests');\n PHPUnit_TextUI_TestRunner::run($suite);\n\t}", "title": "" }, { "docid": "7c3d2c2c0211c5182b7bc03df3630c10", "score": "0.60695636", "text": "protected abstract function getTestCase() : TestCase;", "title": "" }, { "docid": "a9d296be840fe16e0410d1d367873f6c", "score": "0.6069242", "text": "public function testConstructor()\n {\n $subject = $this->constructInstance('some string');\n\n $this->assertEquals('some string', $subject->this()->value);\n }", "title": "" }, { "docid": "fa8937633814ece4c49d5d603086194f", "score": "0.60497326", "text": "public static function suite() {\n $suite = new PHPUnit_Framework_TestSuite(\"URI_Template tests\");\n\n // Add more when they come up\n $suite->addTestSuite(\"URI_TemplateTest\");\n\n return $suite;\n }", "title": "" }, { "docid": "fcad80be1c18b3b61b639961d86b6312", "score": "0.60313666", "text": "public function setUp() {\n\n\t\tparent::setUp();\n\t\t$this->cookies = LLMS_Tests_Cookies::instance();\n\t\t$this->factory = new LLMS_Unit_Test_Factory();\n\n\t}", "title": "" }, { "docid": "51387d28e47ed8d75309d711dc6a5f5e", "score": "0.60107917", "text": "public function __construct( $args )\n {\n parent::__construct( 'test', $args );\n }", "title": "" }, { "docid": "b346bba1fb8a055a653c0e314751aaf3", "score": "0.60105515", "text": "public function setUp()\n {\n $this->builder = new Builder('keltie-cochrane');\n }", "title": "" }, { "docid": "4da8cfb3ba7632e9e8a5f934691f8cbb", "score": "0.60006666", "text": "public function setUp()\r\n {\r\n parent::setUp();\r\n \r\n // Dummy properties.\r\n $this->_namespace = 'example_namespace';\r\n $this->_package_name = 'example_package';\r\n $this->_package_version = '1.0.0';\r\n \r\n // Dummy site ID value.\r\n $this->_site_id = 10;\r\n $this->EE->config->setReturnValue('item', $this->_site_id, array('site_id'));\r\n\r\n // Session cache.\r\n $this->EE->session->cache = array();\r\n \r\n // The test subject.\r\n $this->_subject = new Crumbly_model($this->_package_name, $this->_package_version, $this->_namespace);\r\n }", "title": "" }, { "docid": "83b681d4b140b0a1a82b3a9ba7fc9f14", "score": "0.599977", "text": "public function test__construct()\n {\n $obj = Solar::factory('Solar_Example');\n $this->assertInstance($obj, 'Solar_Example');\n }", "title": "" }, { "docid": "b81fc844c5ea28c754e5ef6447c85fa3", "score": "0.59963614", "text": "public function testCase3()\n {\n\n }", "title": "" }, { "docid": "4cbb4bd6686c340039b81ea889b5e316", "score": "0.5993451", "text": "public function setUp()\n {\n\n $this->subject = new StateMachine(\n GameStatus::graph(),\n true,\n Game::class\n );\n\n $this->gameLogicLive = new GameLiveLogic();\n $this->gameLogicFinishing = new GameFinishingLogic();\n $this->gameLogicFinished = new GameFinishedLogic();\n\n $this->subject[GameStatus::LIVE()] = $this->gameLogicLive;\n $this->subject[GameStatus::FINISHING()] = $this->gameLogicFinishing;\n $this->subject[GameStatus::FINISHED()] = $this->gameLogicFinished;\n }", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.5987679", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.5987679", "text": "protected function setUp() {}", "title": "" }, { "docid": "e8a26c46c060842a2ef06064c53437a5", "score": "0.5987679", "text": "protected function setUp() {}", "title": "" }, { "docid": "f38d2e1dbf000cb21e8c4236a168a650", "score": "0.5985938", "text": "protected function setUp()\n {\n $this->object = new HiDef_RandomString();\n }", "title": "" }, { "docid": "14bff5f66f744d15014c36795acc9076", "score": "0.5981444", "text": "protected function setUp()\n {\n $this->object = new Build;\n }", "title": "" }, { "docid": "1b1658dc14f73e9d9e29adb1bb8a37e2", "score": "0.598092", "text": "function TestSuite($classname=false) {\n // \"test\" and add them to the test suite.\n\n // PHP3: We are just _barely_ able to do this with PHP's limited\n // introspection... Note that PHP seems to store method names in\n // lower case, and we have to avoid the constructor function for\n // the TestCase class superclass. Names of subclasses of TestCase\n // must not start with \"Test\" since such a class will have a\n // constructor method name also starting with \"test\" and we can't\n // distinquish such a construtor from the real test method names.\n // So don't name any TestCase subclasses as \"Test...\"!\n\n // PHP4: Never mind all that. We can now ignore constructor\n // methods, so a test class may be named \"Test...\".\n\n if (empty($classname))\n return;\n $this->fClassname = $classname;\n\n if (floor(phpversion()) >= 4) {\n // PHP4 introspection, submitted by Dylan Kuhn\n\n $names = get_class_methods($classname);\n while (list($key, $method) = each($names)) {\n if (preg_match('/^test/', $method)) {\n $test = new $classname($method);\n if (strcasecmp($method, $classname) == 0 || is_subclass_of($test, $method)) {\n // Ignore the given method name since it is a constructor:\n // it's the name of our test class or it is the name of a\n // superclass of our test class. (This code smells funny.\n // Anyone got a better way?)\n\n //print \"skipping $method<br>\";\n }\n else {\n $this->addTest($test);\n }\n }\n }\n }\n else { // PHP3\n $dummy = new $classname(\"dummy\");\n $names = (array) $dummy;\n while (list($key, $value) = each($names)) {\n $type = gettype($value);\n if ($type == \"user function\" && preg_match('/^test/', $key)\n && $key != \"testcase\") { \n $this->addTest(new $classname($key));\n }\n }\n }\n }", "title": "" }, { "docid": "63ac5855c06523909defdc089bdada65", "score": "0.59791976", "text": "protected function setUp(): void\n\t{\n\t\t$this->image_testcases = array(\n\t\t\tarray(\n\t\t\t\t'url' => 'https://images.pexels.com/photos/753626/pexels-photo-753626.jpeg',\n\t\t\t\t'width' => 2000,\n \t\t\t\t'height' => 1335,\n\t\t\t\t'format' => IMAGETYPE_JPEG\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'url' => 'http://weblogs.us/images/weblogs.us.png',\n\t\t\t\t'width' => 432,\n\t\t\t\t'height' => 78,\n\t\t\t\t'format' => IMAGETYPE_PNG\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'url' => 'http://www.google.com/intl/en_ALL/images/logo.gif',\n\t\t\t\t'width' => 276,\n\t\t\t\t'height' => 110,\n\t\t\t\t'format' => IMAGETYPE_GIF\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'url' => 'https://raw.githubusercontent.com/recurser/exif-orientation-examples/master/Landscape_5.jpg',\n\t\t\t\t'width' => 1200,\n\t\t\t\t'height' => 1800,\n\t\t\t\t'format' => IMAGETYPE_PNG\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "0ac0f6279518d94b9c0763ca713d2081", "score": "0.5974673", "text": "public function setUp(): void{\n new \\Ph\\Test\\Config;\t\t\n\t\t$this->DB = new DB;\n\t\t$this->Create();\n }", "title": "" }, { "docid": "6bb27cdcb3a95bd985f6cff2c654260e", "score": "0.5972244", "text": "public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite('Tine 2.0 Admin Json Tests');\n PHPUnit_TextUI_TestRunner::run($suite);\n }", "title": "" }, { "docid": "5b6deaa2106829637ef57bfe79a2bbae", "score": "0.597032", "text": "public function setUp() {\n\t\t$this->factory = new TaskFactory();\n\t}", "title": "" }, { "docid": "5f8039474c925689da00ac859c35a055", "score": "0.5970118", "text": "public function setUp( )\n {\n }", "title": "" }, { "docid": "d23d0d84a48b1a41685ff4da03d76603", "score": "0.5968939", "text": "protected function setUp()\n {\n parent::setUp();\n \n // TODO Auto-generated ClassCreatorTest::setUp()\n \n $this->classCreator = new ClassCreator(/* parameters */);\n }", "title": "" }, { "docid": "7cc500047bb99af84c010681aa1a7340", "score": "0.5968422", "text": "protected function setUp()\r\n {\r\n $this->config = include dirname(dirname(dirname(__DIR__))) . '/config/autoload/file.config.php';\r\n $this->fileName = realpath(__DIR__ . '/../TestAsset/data/sample.php');\r\n \r\n $specConfig = new SpecConfig($this->config['test_flower_file']['spec_options']);\r\n $this->object = $specConfig->createSpec();\r\n $specConfig->configure($this->object);\r\n \r\n \r\n //$this->pathStackPath = realpath($this->config['test_flower_file']['spec_options']['resolve_spec_options']['path_stack']['flower']);\r\n }", "title": "" }, { "docid": "f93658bdd2b65d3ee7f4d363fb2aa767", "score": "0.5963106", "text": "public static function main() {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "title": "" }, { "docid": "f93658bdd2b65d3ee7f4d363fb2aa767", "score": "0.5963106", "text": "public static function main() {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "title": "" }, { "docid": "f93658bdd2b65d3ee7f4d363fb2aa767", "score": "0.5963106", "text": "public static function main() {\n PHPUnit_TextUI_TestRunner::run(new PHPUnit_Framework_TestSuite(__CLASS__));\n }", "title": "" }, { "docid": "873e5d10866cbe616ff9e99d6bbe1011", "score": "0.5954726", "text": "public function testGetTemplate0()\n {\n }", "title": "" }, { "docid": "873e5d10866cbe616ff9e99d6bbe1011", "score": "0.5954726", "text": "public function testGetTemplate0()\n {\n }", "title": "" }, { "docid": "5c01b1c174a1a6a3f0d528188e6241f6", "score": "0.59544325", "text": "protected function setUp()\n {\n $this->object = new RandomToFile;\n }", "title": "" }, { "docid": "930652baa3ff85717273d396482f8e51", "score": "0.59493554", "text": "function TaskLibTestCase( $TestCaseTitle )\n { \n $this->UnitTestCase( $TestCaseTitle );\n // construction of the name of the table in DB\n $this->tblTasks = get_module_course_tbl( array(\"cltask_tasks\")\n , claro_get_current_course_id());\n }", "title": "" }, { "docid": "11771e2055da816cfb74124906c9fa86", "score": "0.5947873", "text": "protected function setUp()\n {\n $this->object = new test1;\n }", "title": "" }, { "docid": "6f0cb37f1bb3fbcab8e0a61def38dbc5", "score": "0.5945882", "text": "public static function doTest()\n {\n $test = new static();\n $test->doTests();\n }", "title": "" }, { "docid": "b5d8dc29a6b23cbcc7c7795b6c0e3963", "score": "0.5943004", "text": "public function testInitialize()\n { $this->assertEquals(1, 1);\n }", "title": "" }, { "docid": "e8c0a4b85352195e7cfe0c8e757bbfed", "score": "0.59393936", "text": "public function testCreate6()\n {\n }", "title": "" }, { "docid": "6f77f1591e7f77edb78a836170e851a9", "score": "0.5937298", "text": "public static function main()\n {\n TestRunner::run(self::suite());\n\n }", "title": "" }, { "docid": "3f6ccfe1592be20f2ad88f68b2cf01c2", "score": "0.59347117", "text": "public static function main()\n {\n $suite = new PHPUnit_Framework_TestSuite(\"Zend_Cloud_StorageService_FactoryTest\");\n $result = PHPUnit_TextUI_TestRunner::run($suite);\n }", "title": "" }, { "docid": "f1a1aa4bf52ca39299a632fe32fb3769", "score": "0.5932861", "text": "public function test__construct() {\n\n $obj = new TauxRetraiteEtab();\n\n $this->assertNull($obj->getAPartirDe());\n $this->assertNull($obj->getCodeEtablissement());\n $this->assertNull($obj->getTauxRetTr2Pp());\n $this->assertNull($obj->getTauxRetTr2Ps());\n $this->assertNull($obj->getTauxRetTrApp());\n $this->assertNull($obj->getTauxRetTrAps());\n $this->assertNull($obj->getTauxRetTrBpp());\n $this->assertNull($obj->getTauxRetTrBps());\n $this->assertNull($obj->getTauxRetTrCpp());\n $this->assertNull($obj->getTauxRetTrCps());\n $this->assertNull($obj->getTauxRetTrDpp());\n $this->assertNull($obj->getTauxRetTrDps());\n }", "title": "" }, { "docid": "69f4b63d65ca4caf2da5fd897b594c9b", "score": "0.592644", "text": "abstract protected function setUpTest(): void;", "title": "" }, { "docid": "8485e1e167ed8c49db1924cd4c805848", "score": "0.5926081", "text": "public function testCrceTariffActivatePlan()\n {\n\n }", "title": "" }, { "docid": "e35c72324c19806e405e30cf59026200", "score": "0.59187025", "text": "public function run()\n {\n //\n TestFactory::times(100)->create();\n }", "title": "" }, { "docid": "d81b2ea12cedb8608afac7868bd7395e", "score": "0.59156114", "text": "public function test__construct() {\n $this->assertArrayHasKey(\"_METHOD\", $GLOBALS);\n $this->assertEquals(\"POST\", $GLOBALS[\"_METHOD\"]);\n $this->assertArrayHasKey(\"_PATH\", $GLOBALS);\n $this->assertEquals(\"/path/to/resource\", $GLOBALS[\"_PATH\"]);\n $this->assertArrayHasKey(\"_URI\", $GLOBALS);\n $this->assertEquals(array(\"path\", \"to\", \"resource\"), $GLOBALS[\"_URI\"]);\n }", "title": "" }, { "docid": "a6b1358c40ec57455e886660dfa378f3", "score": "0.59066033", "text": "public function setUp(): void\r\n {\r\n $this->terminal = new Terminal;\r\n\r\n $this->terminal->setPricing(self::PRODUCT_ZA, 2);\r\n $this->terminal->setPricing(self::PRODUCT_ZA, 7, 4);\r\n $this->terminal->setPricing(self::PRODUCT_YB, 12);\r\n $this->terminal->setPricing(self::PRODUCT_FC, 1.25);\r\n $this->terminal->setPricing(self::PRODUCT_FC, 6, 6);\r\n $this->terminal->setPricing(self::PRODUCT_GD, 0.15);\r\n }", "title": "" }, { "docid": "9bb6f54680fe6fec8101752990392074", "score": "0.590618", "text": "public function setUp() {\n\trequire_once(\"../public_html/Router.php\");\n\t$this->route = new EbayCodePracticeRouterClass();\n\n\t// create a view object\n\trequire_once(\"../public_html/Control.php\");\n\t$this->control = new EbayCodePracticeControlClass();\n\n }", "title": "" }, { "docid": "c19a994ad52f19c833357f0cbd7bebd0", "score": "0.5904934", "text": "function initialize() {\n\n // added\n define('TEST_CAKE_CORE_INCLUDE_PATH', CAKE_CORE_INCLUDE_PATH);\n\n $this->manager = new CliTestManager();\n vendor('simpletest'.DS.'reporter');\n $this->testToRun = array();\n $this->plugins = $this->_findPlugins(); \n }", "title": "" }, { "docid": "8888ceb19d47b3030d0d0bf097923027", "score": "0.590464", "text": "public function run()\n {\n // create test\n $test = new Test;\n $test->type = \"project\";\n $test->active = true;\n $test->name = \"Example Test\";\t// Name your test\n \n $test->repetitions = 0;\n\t\t$test->repetitions_interval = 0;\n\t\t$test->time_limit = 5000;\n\t\t$test->continueable = false;\n\t\t$test->reporting = true;\n\t\t$test->caching = true;\n \n $test->save();\n\n // create items\n $test->import(storage_path('app/comproso/data-example.csv'), ';');\n }", "title": "" } ]
89769d99fd00345849517725cc8af9ec
Returns a description of the failure reason.
[ { "docid": "4647a3086f9d2c58d805c3fade46c519", "score": "0.0", "text": "abstract public function getDescription();", "title": "" } ]
[ { "docid": "bde9a37ab0e2f1271bef8fd1593a8892", "score": "0.86231095", "text": "public function getFailReason()\n {\n return $this->get(self::_FAIL_REASON);\n }", "title": "" }, { "docid": "ea7ec16502abebc22c9540eed0ab73e2", "score": "0.8568691", "text": "public function getFailureReason();", "title": "" }, { "docid": "02a96dbb2a964d4fed7ff91b3b833828", "score": "0.85615635", "text": "public function getFailureReason()\n {\n return $this->failure_reason;\n }", "title": "" }, { "docid": "74b2992e122c730b390412f8ba010572", "score": "0.7744822", "text": "public function getFailedReasonMessage(){\n $failedReasonMessages = self::getFailedReasonMessages();\n if(isset($failedReasonMessages[$this->failedReason])){\n return $failedReasonMessages[$this->failedReason];\n }else {\n return $this->failedReason;\n }\n }", "title": "" }, { "docid": "8da9f99a7e653ac15d412bf260c31eeb", "score": "0.7490193", "text": "public function reason()\n {\n return $this->response->getReasonPhrase();\n }", "title": "" }, { "docid": "5b15e391637d2dc035910205780d227a", "score": "0.7433705", "text": "public function getReason(): string\r\n {\r\n return $this->reason;\r\n }", "title": "" }, { "docid": "47e5fbdfad24154746340f40744868fc", "score": "0.7310486", "text": "public function getReason()\n\t{\n\t\treturn $this->reason;\n\t}", "title": "" }, { "docid": "f20aec044b70e19449aeaccb37cb1be3", "score": "0.7308516", "text": "public function getReason()\n {\n return $this->reason;\n }", "title": "" }, { "docid": "f20aec044b70e19449aeaccb37cb1be3", "score": "0.7308516", "text": "public function getReason()\n {\n return $this->reason;\n }", "title": "" }, { "docid": "f20aec044b70e19449aeaccb37cb1be3", "score": "0.7308516", "text": "public function getReason()\n {\n return $this->reason;\n }", "title": "" }, { "docid": "f20aec044b70e19449aeaccb37cb1be3", "score": "0.7308516", "text": "public function getReason()\n {\n return $this->reason;\n }", "title": "" }, { "docid": "f20aec044b70e19449aeaccb37cb1be3", "score": "0.7308516", "text": "public function getReason()\n {\n return $this->reason;\n }", "title": "" }, { "docid": "2644f7754fa256fa172a41301d9f1905", "score": "0.73077554", "text": "public function getReason()\n {\n return $this->reason;\n }", "title": "" }, { "docid": "e347ab42bc9c43b4104ad815e291243f", "score": "0.7278011", "text": "public function getReason();", "title": "" }, { "docid": "e347ab42bc9c43b4104ad815e291243f", "score": "0.7278011", "text": "public function getReason();", "title": "" }, { "docid": "2449dc5de19901ecdb025b4cd60162cf", "score": "0.7269165", "text": "public function getFailureMessage()\n {\n\t\tif(null !== $this->_failed_index)\n\t\t\treturn $this->_items[$this->_failed_index]->getFailureMessage();\n\t\treturn '';\n }", "title": "" }, { "docid": "f811d5a6b6a852e0b2637f53c905a089", "score": "0.7250506", "text": "public function getReason()\r\n {\r\n return $this->message;\r\n }", "title": "" }, { "docid": "57200fb181bd7886345e689683622759", "score": "0.724942", "text": "protected function getFailureDescription()\n {\n return sprintf(\n 'the element [%s] has the selected value [%s]',\n $this->selector, $this->value\n );\n }", "title": "" }, { "docid": "57200fb181bd7886345e689683622759", "score": "0.724942", "text": "protected function getFailureDescription()\n {\n return sprintf(\n 'the element [%s] has the selected value [%s]',\n $this->selector, $this->value\n );\n }", "title": "" }, { "docid": "cc82e93e62b9a6f9045920a719fe18f8", "score": "0.72493225", "text": "public function setFailureReason($var)\n {\n GPBUtil::checkString($var, True);\n $this->failure_reason = $var;\n\n return $this;\n }", "title": "" }, { "docid": "09febc58b3deac28b94ce8e06f2d5e98", "score": "0.72347397", "text": "public function getRefundFailureReason()\n {\n return $this->refundFailureReason;\n }", "title": "" }, { "docid": "4ee21dd4e6b7b24b5d576fa493fe7e97", "score": "0.7182205", "text": "public function getItemReasonForFailure()\n {\n return $this->itemReasonForFailure;\n }", "title": "" }, { "docid": "d0257d2e331fe0408dc9d42c1ac4570d", "score": "0.7179354", "text": "function getReason()\n\t{\n\t\treturn $this->reason;\n\t}", "title": "" }, { "docid": "638525f050dfec75d3500fa8288363d5", "score": "0.7093454", "text": "public function getReason()\n {\n }", "title": "" }, { "docid": "638525f050dfec75d3500fa8288363d5", "score": "0.7093454", "text": "public function getReason()\n {\n }", "title": "" }, { "docid": "4d30d7e0d28299cfd5ae4cbbae458423", "score": "0.7027223", "text": "protected function getReverseFailureDescription()\n {\n return sprintf(\n 'the element [%s] does not have the selected value [%s]',\n $this->selector, $this->value\n );\n }", "title": "" }, { "docid": "4d30d7e0d28299cfd5ae4cbbae458423", "score": "0.7027223", "text": "protected function getReverseFailureDescription()\n {\n return sprintf(\n 'the element [%s] does not have the selected value [%s]',\n $this->selector, $this->value\n );\n }", "title": "" }, { "docid": "c6a92014ceaa4e4047100de49a999379", "score": "0.70063597", "text": "public function getReasonPhrase(): string\n {\n return $this->message->getReasonPhrase();\n }", "title": "" }, { "docid": "ccd1806099fe7b5fed52abb27e30ba6e", "score": "0.69624984", "text": "public function reasonPhrase(): string\n {\n return $this->reasonPhrase;\n }", "title": "" }, { "docid": "74c3162e51d24600fd54fe3101a56358", "score": "0.6952184", "text": "public function getErrorDesc()\n {\n return $this->errorDesc;\n }", "title": "" }, { "docid": "a230ff375a67e8ea4501ee209705785d", "score": "0.6942681", "text": "public function getReasonPhrase()\n {\n return $this->reasonPhrase;\n }", "title": "" }, { "docid": "84020ab7adc5659d0bd4cc15b15be513", "score": "0.6936709", "text": "public function getReasonPhrase(): string\r\n {\r\n // TODO: Implement getReasonPhrase() method.\r\n return $this->reasonPhrase;\r\n }", "title": "" }, { "docid": "818b745c62fbbdb219df6e49ab6beefb", "score": "0.6898186", "text": "protected function failureShort()\n\t{\n\t\treturn $this->getEventName();\n\t}", "title": "" }, { "docid": "791e3237de534a56b54189b1bf69e2b0", "score": "0.6871953", "text": "public function get_reason_phrase(): string {\n if ($this->reason === '') {\n return !empty($this->statusCode) ? static::$status_codes[$this->statusCode] : '';\n }\n\n return $this->reason;\n }", "title": "" }, { "docid": "3c5b8e209071829da06bf8b7fad3a60e", "score": "0.6866989", "text": "public function getLoginFailedReason() {\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "e175f235c6e064d1bd5fd09f358e1c75", "score": "0.6865902", "text": "public function getReasonPhrase();", "title": "" }, { "docid": "8c9f6b8c38e5d1cf96f0834a1323bcdf", "score": "0.68579906", "text": "public function displayReason() {\n switch ($this->reason) { //Reasons should only hold an int 0-4\n case 0:\n return \"Invalid\";\n case 1:\n return \"Recommend\";\n case 2:\n return \"Criticism\";\n case 3:\n return \"Question\";\n case 4:\n return \"Other\";\n }\n }", "title": "" }, { "docid": "96c74241e526db134124db79530bae1f", "score": "0.684519", "text": "public function getMessage()\n {\n return isset($this->data->failure_msg) ? $this->data->failure_msg : '';\n }", "title": "" }, { "docid": "c267bfa497561895ab565d94b288eefa", "score": "0.68256634", "text": "public function getErrorDescription(): string\n {\n return $this->errorDescription;\n }", "title": "" }, { "docid": "9d1c84412023c533527228dd4fe6dc6b", "score": "0.68231064", "text": "public function getRequestReasonDesc()\n\t{\n\t\treturn $this->request_reason_desc;\n\t}", "title": "" }, { "docid": "cb02f31d40dee9c27bb94a9d5d822f50", "score": "0.6820194", "text": "public function getReasonPhrase() {}", "title": "" }, { "docid": "e17510122339855ca5d9d53198bd6365", "score": "0.6816725", "text": "public function getReasonPhrase()\n {\n }", "title": "" }, { "docid": "559414a2579b4ffadf14076d3bc10ea0", "score": "0.6774958", "text": "public function testCreateUnsuccessfulReason()\n {\n }", "title": "" }, { "docid": "81e04ec0d5b55e7789966c7686f863cf", "score": "0.6746193", "text": "public function getReasonPhrase()\n {\n // TODO: Implement getReasonPhrase() method.\n }", "title": "" }, { "docid": "9102319067c9423e210fa0cc35a19a8c", "score": "0.67227364", "text": "protected function failureShort()\n\t{\n\t\treturn 'SUPPRESSION_LIST_FAIL';\n\t}", "title": "" }, { "docid": "18c6031d46b6cf784f44def822fcf05d", "score": "0.6710178", "text": "public function getFailedMessage()\n {\n if (array_key_exists(\"failedMessage\", $this->_propDict)) {\n return $this->_propDict[\"failedMessage\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "82ac2fdaa09bce4363e06a5bcb1b762e", "score": "0.66931355", "text": "public function testRetrieveUnsuccessfulReason()\n {\n }", "title": "" }, { "docid": "70d11eeff58c7c8b6c0fdd37dd18d803", "score": "0.66786736", "text": "public function getErrorDescription() {\n\t\treturn $this->error_description;\n\t}", "title": "" }, { "docid": "69e9af192279873d48843ad6efa2d775", "score": "0.6672103", "text": "public function getRejectReason() {\n\t\tif(isset($this->reviewInfo->rejectReason)) {\n\t\t\treturn $this->reviewInfo->rejectReason;\n\t\t} else {\n\t\t\treturn \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "a729e628886ad8ee8f22aa0727e70a69", "score": "0.6666108", "text": "public function getXsiTypeName() {\n return \"BetaError.Reason\";\n }", "title": "" }, { "docid": "73c8adf4afe52257ea24aeb4583ceab9", "score": "0.6622755", "text": "public function getErrorDescription()\n {\n return $this->errorDescription;\n }", "title": "" }, { "docid": "f5574747764e4988a9c47efc9b6f655b", "score": "0.65868866", "text": "public function getDescription()\n {\n $message = 'Value must be a valid string';\n\n if ($this->length) {\n $message .= ' and no longer than ' . $this->length . ' chars';\n }\n return $message;\n }", "title": "" }, { "docid": "815215182f4ed3ceb7c75c2cfde25c3e", "score": "0.65708864", "text": "public function getReasonPhrase(): string;", "title": "" }, { "docid": "4b8279917fe19673c9de5161e6839acb", "score": "0.6562591", "text": "public function failError()\n {\n if (\n ($packet = $this->getPacket()) and\n $packet['status'] !== Job::STATUS_FAILED and\n ($e = json_decode($packet['exception'], true))\n ) {\n return empty($e['error']) ? var_export($e, true) : $e['error'];\n }\n\n return 'Unknown exception';\n }", "title": "" }, { "docid": "04d40f2d931e3e9fc93983a539ee2138", "score": "0.6555483", "text": "public function message()\n {\n return $this->validationFailures;\n }", "title": "" }, { "docid": "41985a58606f6443d300e4e4ba897654", "score": "0.65448076", "text": "public function getReasonCode()\n {\n return $this->reason_code;\n }", "title": "" }, { "docid": "41985a58606f6443d300e4e4ba897654", "score": "0.65448076", "text": "public function getReasonCode()\n {\n return $this->reason_code;\n }", "title": "" }, { "docid": "92d085654e8ba964c0d1c3fa06d65994", "score": "0.65396947", "text": "public function getReasonPhrase() : string\n {\n return $this->reasonPhrase ?? Response::CODE_LIST[$this->getStatusCode()];\n }", "title": "" }, { "docid": "5faf4865a21fb00042b87c6dc285c051", "score": "0.653045", "text": "public function reason()\n {\n }", "title": "" }, { "docid": "0019a3b4cf9feba46982eae65ae200e4", "score": "0.6524486", "text": "public function getReasonPhrase(): string\n {\n return StatusCode::MESSAGES_MAP[$this->status];\n }", "title": "" }, { "docid": "217632a5b075c1cc53a2841557e24c67", "score": "0.65103537", "text": "public function setFailReason($value)\n {\n return $this->set(self::_FAIL_REASON, $value);\n }", "title": "" }, { "docid": "6cc579ff86e2e8ee1f0d0b049b27df89", "score": "0.65075815", "text": "public function getReasonCode();", "title": "" }, { "docid": "54c0492bd724772992e680b15f331e1f", "score": "0.6503981", "text": "function toString() {\n return sprintf(\n \"TestCase %s->%s() failed: %s\\n\",\n\n get_class($this->_failedTest),\n $this->_failedTest->getName(),\n $this->_thrownException\n );\n }", "title": "" }, { "docid": "95c7f59a82d559e9c7732f24c587267e", "score": "0.64702713", "text": "protected function reason()\n {\n }", "title": "" }, { "docid": "9ca386890efc5956f204fc3c4f95a553", "score": "0.6464617", "text": "function getErrorReason() {\n\t\t$days = $this->getService()->getDuration();\n\n\t\treturn sprintf( __( \"Your current login duration is the default %d days.\", \"defender-security\" ), $days );\n\t}", "title": "" }, { "docid": "9d8a5fd8a8a588af195ac65e42361b60", "score": "0.6457268", "text": "public function errorMessage() {\r\n\t\tif ($this->hasError()) {\r\n\t\t\treturn \"Query:\\n{$this->sql}\\nAnswer:\\n{$this->errorString}\";\r\n\t\t}\r\n\r\n\t\treturn 'No error occurred.';\r\n\t}", "title": "" }, { "docid": "bc507a7e74463f474f6fd19ca0b98816", "score": "0.6452571", "text": "public function getReasonCode()\n {\n return $this->reasonCode;\n }", "title": "" }, { "docid": "cdb22a5e9d2d9b803fb5725111174d37", "score": "0.6446909", "text": "protected function customFailureDescription($other, $description, $not)\n {\n return sprintf(\n 'Failed asserting that string value %s.',\n $this->toString()\n );\n }", "title": "" }, { "docid": "ef7809dc9c7f09f4517e135ca1f384b8", "score": "0.63718367", "text": "public function getXsiTypeName() {\n return \"InternalApiError.Reason\";\n }", "title": "" }, { "docid": "ab15d27b90a026984fefe4990cb80393", "score": "0.6362027", "text": "public function message()\n {\n return $this->getError();\n }", "title": "" }, { "docid": "468dac52120b3b2bcb47c880348550e8", "score": "0.6361298", "text": "function getSuccessReason() {\n\t\t$days = $this->getService()->getDuration();\n\n\t\treturn sprintf( __( \"You've adjusted the default login duration to %d days.\", \"defender-security\" ), $days );\n\t}", "title": "" }, { "docid": "2727ed44be4bb6bd05f75ce1c26fea36", "score": "0.6349693", "text": "public function failPaymentMsg(){\n return $this->viewFailPaymentMsg();\n }", "title": "" }, { "docid": "d7a24d3b3b8bc25ded57cc831922452e", "score": "0.63379925", "text": "public function get_reason_description( $reason ) {\n\t\tswitch ( $reason ) {\n\t\t\tcase 'user_type':\n\t\t\t\treturn esc_html__( 'Your user requires two-factor in order to log in.', 'it-l10n-ithemes-security-pro' );\n\t\t\tcase 'vulnerable_users':\n\t\t\t\treturn esc_html__( 'The site requires any user with a weak password to use two-factor in order to log in.', 'it-l10n-ithemes-security-pro' );\n\t\t\tcase 'vulnerable_site':\n\t\t\t\treturn esc_html__( 'This site requires two-factor in order to log in.', 'it-l10n-ithemes-security-pro' );\n\t\t\tdefault:\n\t\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "259208e6331367c00b56cfa1683d132e", "score": "0.6311955", "text": "public function getXsiTypeName() {\n return \"DatabaseError.Reason\";\n }", "title": "" }, { "docid": "51e8e10ac7a84ff72da4e534d953387e", "score": "0.630731", "text": "public static function getFailedReasonMessages(){\n return array(\n 'INVALID_OR_MISSING_ACTION' => 'Wrong action or no action is provided',\n 'LOGIN_INVALID' => 'Email address and/or password were not provided',\n 'INVALID_REC_PAYMENT_ID' => 'Invalid recurring payment ID is submitted by the merchant',\n 'MISSING_EMAIL' => 'Provide registered email address of merchant account',\n 'MISSING_PASSWORD' => 'Provide correct API/MQI password',\n 'MISSING_AMOUNT' => 'Provide amount you wish to send',\n 'MISSING_CURRENCY' => 'Provide currency you wish to send',\n 'MISSING_BNF_EMAIL' => 'Provide email address of the beneficiary',\n 'MISSING_SUBJECT' => 'Provide subject of the payment',\n 'MISSING_NOTE' => 'Provide notes for the payment',\n \n 'CANNOT_LOGIN' => 'Email address and/or API/MQI password are incorrect',\n 'PAYMENT_DENIED' => 'Check in your account profile that the API is enabled and you are posting your requests from the IP address specified',\n \n \n 'INVALID_BNF_EMAIL' => 'Check the format of the beneficiary email address',\n 'INVALID_SUBJECT' => 'Check parameter length submitted',\n 'INVALID_NOTE' => 'Check parameter length submitted',\n 'INVALID_FRN_TRN_ID' => 'Check parameter length submitted',\n 'INVALID_AMOUNT' => 'Check amount format',\n 'INVALID_CURRENCY' => 'Check currency code',\n 'EXECUTION_PENDING' => 'If you resend a transfer request with the same session identifier before the \"transfer\" request was processed, this error will be returned ',\n 'ALREADY_EXECUTED' => 'If you have requested that the value for frn_trn_id must be unique for each transfer, this error will be returned when you try to submit the same value for more than one transfer ',\n 'BALANCE_NOT_ENOUGH' => 'Sending amount exceeds account balance',\n 'SINGLE_TRN_LIMIT_VIOLATED' => 'Maximum amount per transaction = EUR 10,000',\n 'DISALLOWED_RECIPIENT' => 'You are not permitted to send money to the recipient. E.g. Gaming merchants are not permitted to send or receive payments to/from US based customers',\n 'CHECK_FOR_VERIFIED_EMAIL' => 'Your account email address needs to be verified',\n 'LL_NO_PAYMENT' => 'Your account is locked for security reasons. Please contact us',\n \n //LOCK API LEVEL errors\n 'LOCK_LEVEL_1' => 'Lock Level 1',\n 'LOCK_LEVEL_2' => 'Lock Level 2',\n 'LOCK_LEVEL_3' => 'Lock Level 3',\n 'LOCK_LEVEL_4' => 'Lock Level 4',\n 'LOCK_LEVEL_5' => 'Lock Level 5',\n 'LOCK_LEVEL_6' => 'Lock Level 6',\n 'LOCK_LEVEL_7' => 'Lock Level 7',\n 'LOCK_LEVEL_8' => 'Lock Level 8',\n 'LOCK_LEVEL_9' => 'Lock Level 9',\n \n //OUR internal errors\n 'RESPONSE_TIMEOUT' => 'Timeout from Skrill server',\n 'MISSING_SESSION_ID' => 'Session Id not exist',\n );\n }", "title": "" }, { "docid": "3fb7942e13710c533dd86a8163cdd9e6", "score": "0.63050765", "text": "protected function failureDescription($other) {\n $thisVal = $this->normalize($this->value);\n $otherVal = $this->normalize($other);\n\n $len = min(strlen($thisVal),strlen($otherVal));\n\n for($i=0; $i<$len; ++$i) {\n if($thisVal[$i] !== $otherVal[$i]) {\n break;\n }\n }\n\n $start = max($i-25,0);\n $offset = min($i,25);\n $t = substr($thisVal,$start,50);\n $o = substr($otherVal,$start,50);\n\n return \"two strings are equal, ignoring whitespace and case\\n\"\n . \"- $t\\n\"\n . ' '.str_repeat(' ',$offset). \"^\\n\"\n . \"+ $o\";\n }", "title": "" }, { "docid": "c85fb2f4ea78cd8e06a7fd9a6b5d5010", "score": "0.62901855", "text": "public function getXsiTypeName() {\n return \"ReportDefinitionError.Reason\";\n }", "title": "" }, { "docid": "e77c0caa012c7b5baf79c675b2ddf5bf", "score": "0.62889993", "text": "public function getNonComplianceReason()\n {\n return $this->non_compliance_reason;\n }", "title": "" }, { "docid": "59dfd1524286b2dae46ff146fa630619", "score": "0.62736046", "text": "public function getErrMsg() {\n return $this->get(self::ERR_MSG);\n }", "title": "" }, { "docid": "656a5138ce7a5e4871d3bc299ece16b6", "score": "0.6270984", "text": "public function message()\n {\n return 'Incorrect bid amount';\n }", "title": "" }, { "docid": "6992504aa0f4abfc0e096b08499556c2", "score": "0.62685955", "text": "public function message(): string\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "5bb85db54861fab1c817966cc8428e4a", "score": "0.62680876", "text": "public function message()\n {\n return 'Cannot find this employee.';\n }", "title": "" }, { "docid": "4022d8e63a0548298fe6f284ae5d6b87", "score": "0.62530816", "text": "public function getErrMsg()\n {\n return $this->get(self::ERRMSG);\n }", "title": "" }, { "docid": "44e72ef86fda548de0bfb0acd2ecb664", "score": "0.62504727", "text": "public function message()\n {\n return $this->errorMsg;\n }", "title": "" }, { "docid": "05798078f840b9b38b3cba209e949d8f", "score": "0.62491107", "text": "public function getBattleCheckFail()\n {\n return $this->get(self::_BATTLE_CHECK_FAIL);\n }", "title": "" }, { "docid": "9018f24c430618482f69c86cdcb618df", "score": "0.62255806", "text": "protected function delete_comment_failure_message(){\r\n\t\treturn 'Comment could not be deleted.';\r\n\t}", "title": "" }, { "docid": "f464afc631a9b2d9f264a93b706720b1", "score": "0.62231934", "text": "public function getDescription()\n {\n return $this->message;\n }", "title": "" }, { "docid": "98b0a934b4e56add39505af2ccf848c7", "score": "0.6223159", "text": "function getReason(array $options = array()) {\n\n // Default options.\n $options += array(\n 'link' => TRUE,\n 'truncate' => TRUE,\n );\n\n $safe = FALSE;\n // Check transaction description first to allow custom overrides.\n if (empty($options['skip_description']) && $description = $this->getDescription()) {\n $reason = $description;\n }\n else {\n $info = $this->getOperationInfo();\n // Check if there is a valid description callback defined for this\n // operation.\n if (!empty($info['description callback']) && function_exists($info['description callback'])) {\n $reason = $info['description callback']($this, $this->getEntity());\n $safe = TRUE;\n }\n // Try static description key.\n elseif (!empty($info['description'])) {\n $reason = $info['description'];\n $safe = TRUE;\n }\n }\n // Fallback to the operation name if there is no source.\n if (empty($reason)) {\n $reason = $this->getOperation();\n }\n\n // Truncate description.\n $attributes = array();\n $stripped_reason = strip_tags($reason);\n if ($options['truncate'] && drupal_strlen($stripped_reason) > variable_get('userpoints_truncate', 30) + 3) {\n // The title attribute will be check_plain()'d again drupal_attributes(),\n // avoid double escaping.\n $attributes['title'] = html_entity_decode($stripped_reason, ENT_QUOTES);\n $reason = truncate_utf8($stripped_reason, variable_get('userpoints_truncate', 30), FALSE, TRUE);\n }\n\n // Link to the referenced entity, if available.\n if ($this->getEntity() && $options['link']) {\n $uri = entity_uri($this->getEntityType(), $this->getEntity());\n if ($uri) {\n $reason = l($reason, $uri['path'], $uri['options'] + array('html' => $safe, 'attributes' => $attributes));\n }\n }\n if ((!$this->getEntity() || empty($uri)) && !$safe) {\n // Escape possible user provided reason.\n $reason = check_plain($reason);\n }\n return $reason;\n }", "title": "" }, { "docid": "5bc927cf5df79791e64fa72525c12416", "score": "0.6222349", "text": "public function getStateReason()\n {\n return $this->state_reason;\n }", "title": "" }, { "docid": "a328022d1c36f04d6beaa74947d624b7", "score": "0.62141234", "text": "public function getErrMsg() {\n $errMsg = 'Error on line ' . $this->getLine() . ' in ' . $this->getFile()\n . '<br><b>Message: ' . $this->getMessage()\n . '</b><br>Exception Type: NoFormsFoundException';\n return $errMsg;\n }", "title": "" }, { "docid": "1ec79b99eed90acf8608b36d8dd653e3", "score": "0.6201535", "text": "public function message()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "1ec79b99eed90acf8608b36d8dd653e3", "score": "0.6201535", "text": "public function message()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "91dfb816fb9500c4fb3aec85431175ad", "score": "0.6188552", "text": "function getSuccessReason() {\n\t\treturn __( \"You don't have a user account sporting the admin username, great.\", \"defender-security\" );\n\t}", "title": "" }, { "docid": "9addd7975006ced4cf73bc90ec73a207", "score": "0.6180595", "text": "public function testUpdateUnsuccessfulReason()\n {\n }", "title": "" }, { "docid": "f58e93a1f67ed97a9e7d53f6c5dfa148", "score": "0.616483", "text": "public function getXsiTypeName() {\n return \"RejectedError.Reason\";\n }", "title": "" }, { "docid": "468d81e95f6bc9df617a9572fee353a8", "score": "0.6164106", "text": "public function message()\n {\n return 'The :attribute value does not exist.';\n }", "title": "" }, { "docid": "14bbdc7d77abad7c325050e0b127d611", "score": "0.61605847", "text": "public function getXsiTypeName() {\n return \"RequestError.Reason\";\n }", "title": "" }, { "docid": "b824eba2eaa6f184d93d042dd4121548", "score": "0.61550343", "text": "public function message()\n {\n return 'The attribute :attribute does not exists';\n }", "title": "" }, { "docid": "38c48064c0655ed487a908daa89b8bdc", "score": "0.61550295", "text": "public function getMessage()\n {\n return $this->_error;\n }", "title": "" }, { "docid": "9587332ab3753eced9073ba3091e08b9", "score": "0.6143255", "text": "public function getXsiTypeName() {\n return \"AuthorizationError.Reason\";\n }", "title": "" }, { "docid": "ade1e2f0bb0a12d5f6e606c96e9c9f66", "score": "0.61373496", "text": "protected function report_comment_failure_message(){\r\n\t\treturn 'Sorry, the comment could not be reported.';\r\n\t}", "title": "" } ]
1b16a5c0ff6aa27b5042d58b2f0a9712
formulando e executando a query atualizando os dados no banco
[ { "docid": "1c795f090d5215fac9d7c3dfc4e6f6b8", "score": "0.0", "text": "public function alterarDados($obj){\n $query=\"UPDATE usuarios SET nome = '\".$obj->getNome().\"', email = '\".$obj->getEmail().\"' \".($obj->getSenha()!=\"\"?\", senha = '\".$obj->getSenha().\"' \":\"\").($obj->getFoto()!=\"\"?\", foto = '\".$obj->getFoto().\"' \":\"\").\" WHERE email = '\".$_SESSION[\"usuario\"].\"'\";\n $vet = $this->execute($query);\n $vet[\"msg\"]=\"Dados alterados com sucesso!\";\n return $vet;\n }", "title": "" } ]
[ { "docid": "06de0cf6c12a8e961fccc5606a0406b4", "score": "0.7088835", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set Codigo='$this->codigo',Operacion='$this->Operacion',Pieza='$this->Pieza',Maquina='$this->Maquina',Trayecto='$this->Trayecto',Condicion_Tela='$this->Tela',Geo_Pieza='$this->GeoPieza',Corte_Pieza='$this->Corte',Insumo='$this->Insumo',Tipo_Tela='$this->Tipotela',Referencia='$this->Referencia',Descripcion='$this->Descripcion' where id = $this->id\";\n\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "736a1560dbdddb4b3d03b4e62392e001", "score": "0.69188637", "text": "public function SQLupdate(){\n\t\t$arr = $this->_model->_getAtributos();\n\t\t// Pega o nome da Tabela do Banco de Dados\n\t\t$tbl = $this->_getEntidade();\n\t\t$cp = $this->_getCampoChavePrimaria();\n\t\t$sql = \"UPDATE $tbl SET \";\n\t\tforeach($arr as $atb){\n\t\t\t$sql .= \"$atb = :$atb, \";\n\t\t}\n\t\t// Retiro a última virgula do SQL\n\t\t$sql = $this->retiraUltVirgula($sql) . \" \";\n\t\t// Acrescento a cláusula WHERE\n\t\t$sql.= \"WHERE $cp = :$cp;\";\n\t\treturn $sql;\n }", "title": "" }, { "docid": "7648086911594e24d282aee7f51f16af", "score": "0.68425614", "text": "public function atualizar() {\n $query = '\n UPDATE tb_evento \n SET \n id_usuario = :id_usuario,\n nome = :nome,\n email = :email,\n descricao = :descricao,\n tipo = :tipo,\n area = :area,\n preco_evento = :preco_evento,\n qntd_part = :qntd_part,\n data_inicio = :data_inicio,\n data_fim = :data_fim,\n endereco = :endereco,\n bairro = :bairro,\n estado = :estado,\n cidade = :cidade,\n cep = :cep,\n num_usuario_cads = :num_usuario_cads\n WHERE id = :id\n ';\n\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':id', $_GET['id']);\n // $stmt->bindValue(':id', 24);\n $stmt->bindValue(':id_usuario', $this->evento->__get('id_usuario'));\n $stmt->bindValue(':nome', $this->evento->__get('nome'));\n $stmt->bindValue(':email', $this->evento->__get('email'));\n $stmt->bindValue(':descricao', $this->evento->__get('descricao'));\n $stmt->bindValue(':tipo', $this->evento->__get('tipo'));\n $stmt->bindValue(':area', $this->evento->__get('area'));\n $stmt->bindValue(':preco_evento', $this->evento->__get('preco_evento'));\n $stmt->bindValue(':qntd_part', $this->evento->__get('qntd_part'));\n $stmt->bindValue(':data_inicio', $this->evento->__get('data_inicio'));\n $stmt->bindValue(':data_fim', $this->evento->__get('data_fim'));\n $stmt->bindValue(':endereco', $this->evento->__get('endereco'));\n $stmt->bindValue(':bairro', $this->evento->__get('bairro'));\n $stmt->bindValue(':estado', $this->evento->__get('estado'));\n $stmt->bindValue(':cidade', $this->evento->__get('cidade'));\n $stmt->bindValue(':cep', $this->evento->__get('cep'));\n $stmt->bindValue(':num_usuario_cads', $this->evento->__get('num_usuario_cads'));\n\n return $stmt->execute();\n }", "title": "" }, { "docid": "03f785e3ab8cfde31acd80ecfe5d8da3", "score": "0.6788837", "text": "public function update() {\r\n $this->sql = \"UPDATE $this->table SET $this->camposBanco WHERE $this->campoTable = '$this->valueId'\";\r\n if (self::execSql($this->sql)) {\r\n $this->status = \"Alterado com Sucesso!\";\r\n }\r\n }", "title": "" }, { "docid": "bdb5084e275a979f35d9bc7c43fb7ec1", "score": "0.6753163", "text": "private function dbRealizarAlta()\r\n {\r\n if (!$this->formularioEnviado()) {\r\n return;\r\n }\r\n\r\n if (isset($_POST)) {\r\n $_POST = @$this->limpiarParaSql($_POST);\r\n }\r\n\r\n // foreach ($this->campos as $campo)\r\n foreach ($this->campo as &$campo) {\r\n if ($campo->existeDato(\"joinTable\")) {\r\n // $tablas[] = $campo->getJoinTable();\r\n\r\n $tablas[] = $this->tabla;\r\n } else {\r\n $tablas[] = $this->tabla;\r\n }\r\n }\r\n\r\n $tablas = array_unique($tablas);\r\n /*\r\n * FIXME Verificar para que funcione correctamente, hoy no lo hace\r\n */\r\n foreach ($tablas as $tabla) {\r\n\r\n $camposSql = \"\";\r\n $valoresSql = \"\";\r\n $sql = \"\";\r\n\r\n $sql = \" INSERT INTO \" . $tabla . $this->dbLink . \" \\n\";\r\n\r\n // foreach ($this->campos as $campo)\r\n foreach ($this->campo as &$campo) {\r\n /*\r\n * FIXME Cuando es un JOIN deberia verificar si existe en la otra tabla y no lo hace genera mal las consultas\r\n */\r\n if (!$campo->existeDato(\"joinTable\") or $campo->getJoinTable() == \"\") {\r\n $campo->setJoinTable($this->tabla);\r\n }\r\n\r\n // if ($campo->existeDato (\"joinTable\") and $campo->getJoinTable () != $tabla and $campo->getTipo () != 'extra' and $campo->getTipo () != 'dbCombo')\r\n // if ($campo->existeDato (\"joinTable\") and $campo->getJoinTable () != $tabla and $campo->getTipo () != 'extra' and ($campo instanceof Campos_dbCombo))\r\n // {\r\n\r\n if (!is_array($this->campoId)) {\r\n if ($campo->getCampo() === $this->campoId) {\r\n $hayID = true;\r\n } elseif ($campo->getCampo() != \"\" and isset($this->campoId) and is_array($campo->getCampo()) and (in_array($campo->getCampo(), $this->campoId))) {\r\n $hayID = true;\r\n }\r\n }\r\n\r\n if ($campo->isNoNuevo() == true) {\r\n continue;\r\n }\r\n\r\n if ($campo->getTipo() == '') {\r\n continue;\r\n }\r\n\r\n if (($campo instanceof Campos_upload) and $campo->isCargarEnBase() != true) {\r\n $campo->realizarCarga();\r\n\r\n continue;\r\n } elseif ($campo instanceof Campos_upload) {\r\n $valor = $campo->realizarCarga();\r\n } else {\r\n $campo->setValor($_POST[$campo->getCampo()]);\r\n $valor = $campo->getValor();\r\n }\r\n\r\n // chequeo de campos requeridos\r\n if ($campo->isRequerido() and trim($valor) == \"\") {\r\n // genera el query string de variables previamente existentes\r\n $get = $_GET;\r\n unset($get['abmsg']);\r\n unset($get['abm_alta']);\r\n $qsamb = http_build_query($get);\r\n if ($qsamb != \"\") {\r\n $qsamb = \"&\" . $qsamb;\r\n }\r\n\r\n $this->redirect(\"$_SERVER[PHP_SELF]?abm_nuevo=1$qsamb&abmsg=\" . urlencode(sprintf($this->textoCampoRequerido, $campo->getTitulo())));\r\n }\r\n\r\n if ($camposSql != \"\") {\r\n $camposSql .= \", \\n\";\r\n }\r\n\r\n if ($valoresSql != \"\") {\r\n $valoresSql .= \", \\n\";\r\n }\r\n\r\n if ($campo->getCustomFuncionValor() != \"\") {\r\n $valor = call_user_func_array($campo->getCustomFuncionValor(), array(\r\n $valor\r\n ));\r\n }\r\n\r\n $camposSql .= $campo->getCampo();\r\n\r\n if (trim($valor) == '') {\r\n $valoresSql .= \" NULL\";\r\n } else {\r\n // Se agrega la comparativa para que en caso de sel bases de oracle haga la conversion del formato de fecha\r\n // if ($campo->getTipo() == 'fecha' and $this->db->dbtype == 'oracle')\r\n // if ($campo->getTipo () == 'fecha')\r\n if ($campo instanceof Campos_fecha) {\r\n // $valoresSql .= \"TO_DATE('\" . $valor . \"', 'RRRR-MM-DD')\";\r\n $valoresSql .= $this->db->toDate($valor, 'RRRR-MM-DD');\r\n } else {\r\n $valoresSql .= \" '\" . $valor . \"' \";\r\n }\r\n }\r\n // }\r\n // else\r\n // {\r\n // if (!is_array ($this->campoId))\r\n // {\r\n // if ($campo->getCampo () === $this->campoId)\r\n // {\r\n // $hayID = true;\r\n // }\r\n // elseif ($campo->getCampo () != \"\" and isset ($this->campoId) and is_array ($campo->getCampo ()) and (in_array ($campo->getCampo (), $this->campoId)))\r\n // {\r\n // $hayID = true;\r\n // }\r\n // }\r\n\r\n // if ($campo->isNoNuevo () == true)\r\n // {\r\n // continue;\r\n // }\r\n\r\n // if ($campo->getTipo () == '')\r\n // {\r\n // continue;\r\n // }\r\n\r\n // if (($campo instanceof Campos_upload) and $campo->isCargarEnBase () != true)\r\n // {\r\n // $campo->realizarCarga ();\r\n\r\n // continue;\r\n // }\r\n // elseif ($campo instanceof Campos_upload)\r\n // {\r\n // $valor = $campo->realizarCarga ();\r\n // }\r\n // else\r\n // {\r\n // $valor = $_POST[$campo->getCampo ()];\r\n // }\r\n\r\n // // chequeo de campos requeridos\r\n // if ($campo->isRequerido () == true and trim ($valor) == \"\")\r\n // {\r\n // // genera el query string de variables previamente existentes\r\n // $get = $_GET;\r\n // unset ($get['abmsg']);\r\n // unset ($get['abm_alta']);\r\n // $qsamb = http_build_query ($get);\r\n // if ($qsamb != \"\")\r\n // {\r\n // $qsamb = \"&\" . $qsamb;\r\n // }\r\n\r\n // $this->redirect (\"$_SERVER[PHP_SELF]?abm_nuevo=1$qsamb&abmsg=\" . urlencode (sprintf ($this->textoCampoRequerido, $campo->getTitulo ())));\r\n // }\r\n\r\n // if ($camposSql != \"\")\r\n // {\r\n // $camposSql .= \", \\n\";\r\n // }\r\n\r\n // if ($valoresSql != \"\")\r\n // {\r\n // $valoresSql .= \", \\n\";\r\n // }\r\n\r\n // if ($campo->getCustomFuncionValor () != \"\")\r\n // {\r\n // $valor = call_user_func_array ($campo->getCustomFuncionValor (), array (\r\n // $valor\r\n // ));\r\n // }\r\n\r\n // $camposSql .= $campo->getCampo ();\r\n\r\n // if (trim ($valor) == '')\r\n // {\r\n // $valoresSql .= \" NULL\";\r\n // }\r\n // else\r\n // {\r\n // // Se agrega la comparativa para que en caso de sel bases de oracle haga la conversion del formato de fecha\r\n // // if ($campo->getTipo() == 'fecha' and $this->db->dbtype == 'oracle')\r\n // // if ($campo->getTipo () == 'fecha')\r\n // if ($campo instanceof Campos_fecha)\r\n // {\r\n // // $valoresSql .= \"TO_DATE('\" . $valor . \"', 'RRRR-MM-DD')\";\r\n // $valoresSql .= $this->db->toDate ($valor, 'RRRR-MM-DD');\r\n // }\r\n // else\r\n // {\r\n // $valoresSql .= \" '\" . $valor . \"' \";\r\n // }\r\n // }\r\n // }\r\n }\r\n\r\n if (!is_array($this->campoId) and strpos($camposSql, $this->campoId) == false) {\r\n if ($camposSql != \"\") {\r\n $camposSql .= \", \\n\";\r\n }\r\n\r\n if ($valoresSql != \"\") {\r\n $valoresSql .= \", \\n\";\r\n }\r\n\r\n if ($hayID == false) {\r\n $camposSql .= $this->campoId;\r\n\r\n $idVal = $this->db->insert_id($this->campoId, $this->tabla . insert_id);\r\n $idVal = $idVal + 1;\r\n $valoresSql .= \" '\" . $idVal . \"' \";\r\n }\r\n }\r\n\r\n $camposSql = trim($camposSql, \", \\n\");\r\n $valoresSql = trim($valoresSql, \", \\n\");\r\n\r\n $sql .= \" (\" . $camposSql . \")\";\r\n\r\n $sql .= $this->adicionalesInsert;\r\n\r\n $sql .= \" VALUES \\n (\" . $valoresSql . \")\";\r\n\r\n if ($camposSql != \"\") {\r\n // print_r ($sql);\r\n // echo \"<Br /><Br />\";\r\n // exit ();\r\n $this->db->query($sql);\r\n\r\n if (isset($this->callbackFuncInsert)) {\r\n // call_user_func_array($this->callbackFuncInsert, array(\r\n // $id,\r\n // $this->tabla\r\n // ));\r\n // XXX lo remplazo para ver si funciona de la misma manera.\r\n call_user_func_array($this->callbackFuncInsert, array(\r\n $this->campoId,\r\n $this->tabla\r\n ));\r\n }\r\n }\r\n }\r\n return $this->db->errorNro();\r\n }", "title": "" }, { "docid": "6a95cadf4d3c57aabeb4c7c67dec608d", "score": "0.6701884", "text": "private function updateData(){\n \tglobal $database;\n\t\t $query = \"UPDATE \".static::$tablename; \n\t\t $query .= \" SET \";\n\t\t \tforeach (static::$tablefields as $fieldname => $fieldvalue) {\n\t\t \t $setfields[] = \" {$fieldname} = '\".$database->escapeString(\"{$fieldvalue}\").\"'\";\n\t\t \t}\n\t\t $query .= implode(\", \",$setfields);\n\t\t $query .= static::where(static::$id).\" LIMIT 1\";\n $database->query($query);\n\t $database->getInsertedId();\n }", "title": "" }, { "docid": "d74bcd5cd104d60a20a0e87e51ddfdbc", "score": "0.6592816", "text": "protected function Commit() {\n ConexaoDB::getInstancia()->commit();\n }", "title": "" }, { "docid": "1ae5f58f368e9b7d971292e01a8dabfe", "score": "0.65863055", "text": "public function actualizar(){\n \n $modelo = new Conexion(); //creo un instacia a la clase conexion \n $conexion= $modelo->conectar(); //utiliando su metodo conectar\n \n //-----------------\n $update = $this->update; //creo esta variable para ir guardando de cada uno de las propiedades\n $set = $this->set;\n //-----incluyo la propiedad de condicion \n $condicion= $this->condicion;\n \n //ahora lo verifico si condicion tiene algun valor\n \n if ($condicion!='') {\n \n $condicion = \" WHERE \" . $condicion;\n }\n \n \n //aca lo hago el sql\n \n $sql = \"UPDATE $update SET $set $condicion\";\n \n //ahora lo preparo el la consulta\n $consulta = $conexion->prepare($sql);\n //compruebo si existio algun error\n \n if (!$consulta) {\n \n $this->mensaje = \" Ocurrio un ERROR al actualizar el Registro\";\n } else {\n //de lo contrario ejecuto la consulta\n $consulta->execute();\n $this->mensaje =\"Se Actualizaron los Registros con Exito..\";\n }\n \n }", "title": "" }, { "docid": "a421629d8bf2059e62371a31e54188c6", "score": "0.65382683", "text": "public function atualizar(){\n $pdo = new \\PDO(DSN, USER, PASSWD);\n //cria sql\n $sql = \"UPDATE StatusCelular SET \ttipoOferta = ?\n WHERE discipuloId = ?\n \";\n\n //prepara sql\n $stm = $pdo->prepare($sql);\n //trocar valores\n $stm->bindParam(1, $this->tipoOferta );\n $stm->bindParam(2, $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 }", "title": "" }, { "docid": "dc54cdf342eb8f11767ec22b283a46bf", "score": "0.6494606", "text": "public function actualizarCodigo(){\n $clavexxxemp = substr(uniqid(), -5);\n $cedula = $_SESSION[ci];\n //instanciamos la clase ConexionMysql\n $modelo = new Conexion();\n // Obtenemos el parametro para la conexion\n $conexion = $modelo->obtenerConexionMy();\n // ahora preparamos la consulta en una variable\n $sql = \"UPDATE usuarios SET Codigo='$clavexxxemp' WHERE Cedula='$cedula'\";\n $preparar = $conexion->prepare($sql);\n if(!$preparar){\n echo \"Error: No tiene datos\";\n }else{\n $preparar->execute();\n echo \"Almacenado exitosamente\";\n }\n\n }", "title": "" }, { "docid": "89e65f2c9b1e7ffc0ceb0fb08adbfdc6", "score": "0.6483335", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set documento=\\\"$this->documento\\\",nombre=\\\"$this->nombre\\\",telefono=\\\"$this->telefono\\\",email=\\\"$this->email\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "2937570f06eed6ad2f3cc1ac94597bce", "score": "0.64494133", "text": "public function actualizar_egresado($dato,$tabla){\r\n$consulta=conexion::conectar()->prepare(\"UPDATE $tabla SET correo=:correo, estado=:estado WHERE cedu=:cedu\");\r\n$consulta->bindParam(\":cedu\",$dato[\"cedu\"], PDO::PARAM_INT);\r\n\t$consulta->bindParam(\":correo\",$dato[\"correo\"],PDO::PARAM_STR);\r\n$consulta->bindParam(\":estado\",$dato[\"estado\"],PDO::PARAM_STR);\r\n\r\nif (\t$consulta->execute()) {\r\n\t\t\treturn \"correcto\";\r\n\t\t}else{\r\n return \"ERROR\";\r\n\r\n\t\t}\r\n $consulta->close();\r\n\r\n\t}", "title": "" }, { "docid": "32171551fa881b35fce3def1fbcedd58", "score": "0.64452684", "text": "static public function mdlEditarDocgrado($tabla,$datos){\n $stmt=Conexion::conectar()->prepare(\"UPDATE $tabla SET observacion = :observacion WHERE id =:id \");\n $stmt->bindParam(\":id\",$datos[\"id\"],PDO::PARAM_INT);\n $stmt->bindParam(\":observacion\",$datos[\"observacion\"],PDO::PARAM_STR);\n if($stmt->execute()){\n return \"ok\";\n }else{\n return \"eror\";\n }\n $stmt->close();\n $stmt=null;\n\n}", "title": "" }, { "docid": "4c4464ad2f31f2874293aa3dad2c8174", "score": "0.64394116", "text": "public function _update() {\n\t\t\n\t\t$this->toArray();\n\t\t\n\t\t$where = $this->dbAdapter->quoteInto('id = ?', $this->id);\n\t\t$result = $this->dbAdapter->update($this->getTableName(), $this->data, $where);\n\t\t//check result throw Exception\n\t}", "title": "" }, { "docid": "fe60e43ff936e227b557007bc6729bbb", "score": "0.6431706", "text": "function Atualizar()\n\t\t{\n\t\t\t$sql = \"update galeria set\n\t\t\t\t\tnomeimg = ?,imgaleria = ?,dataimg = ?\n\t\t\t\t\twhere codgaleria = ?\";\n\n\t\t\t//executando o comando sql e passando os valores\n\t\t\t$this->con->prepare($sql)->execute(array(\n\t\t\t$this->nomeimg,$this->imgaleria,$this->dataimg,\n\t\t\t$this->codgaleria));\n\t\t}", "title": "" }, { "docid": "9312258b0c7cf6e5639faa4371978f76", "score": "0.64201874", "text": "function triggerUpdate() {\n global $table;\n $query = \"UPDATE $table SET \";\n \n $query .= \"id='\".$this->_id.\"',\";\n $query .= \"nombres='\".$this->_nombres.\"',\";\n $query .= \"apellidos='\".$this->_apellidos.\"',\";\n $query .= \"rut='\".$this->_rut.\"',\";\n $query .= \"direccion='\".$this->_direccion.\"',\";\n $query .= \"comuna='\".$this->_comuna.\"',\";\n $query .= \"ciudad='\".$this->_ciudad.\"',\";\n $query .= \"region='\".$this->_region.\"',\";\n $query .= \"telefono='\".$this->_telefono.\"',\";\n $query .= \"contrasena='\".$this->_contrasena.\"',\";\n $query .= \"md52confirm='\".$this->_md52confirm.\"',\";\n $query .= \"fecha_incorporacion='\".$this->_fecha_incorporacion.\"',\";\n $query .= \"fecha_inicio_plan_actual='\".$this->_fecha_inicio_plan_actual.\"',\";\n $query .= \"fecha_fin_servicio='\".$this->_fecha_fin_servicio.\"',\";\n $query .= \"tipo_plan='\".$this->_tipo_plan.\"',\";\n $query .= \"planes_anteriores='\".$this->_planes_anteriores.\"',\";\n $query .= \"contratos='\".$this->_contratos.\"',\";\n $query .= \"tipo_usuario='\".$this->_tipo_usuario.\"',\";\n $query .= \"correo_validado='\".$this->_correo_validado.\"',\";\n $query .= \"mailchimp_suscrito='\".$this->_mailchimp_suscrito.\"',\";\n $query .= \"boleta_enviada='\".$this->_boleta_enviada.\"',\";\n $query .= \"nnttuu='\".$this->_nnttuu.\"',\";\n $query .= \"comentarios='\".$this->_comentarios.\"',\";\n $query .= \"vp='\".$this->_vp.\"' \";\n \n $query .= \"WHERE correo = '\".$this->_correo.\"'\";\n\t\t\terror_log(\"\\n\".date(\"Y-m-d H:i:s\").\" UsuarioDAO: query \".$query, 3, \"debug.log\");\n\t\t\n if(mysql_query($query)){\n // Exitoso\n\t\t\terror_log(\"\\n\".date(\"Y-m-d H:i:s\").\" UsuarioDAO: query ejecutada: \".$query, 3, \"transactions.log\");\n return;\n } else{\n\t\t\terror_log(\"\\n\".date(\"Y-m-d H:i:s\").\" UsuarioDAO: query \".$query, 3, \"error.log\");\n\t\t}\n }", "title": "" }, { "docid": "ef793417cbfa99a331171fe10cb1e278", "score": "0.63685584", "text": "function update() {\n //cria instrucao SQL update\n $sql = \"UPDATE produtos set \"\n . \" descricao = '{$this->descricao}',\"\n . \" estoque = '{$this->estoque}',\"\n . \" = '{$this->precoCusto}' \"\n . \" WHERE id = '{$this->id}'\";\n \n \n }", "title": "" }, { "docid": "2e15d8d7a1acc81a73f8186f669481de", "score": "0.6358901", "text": "public function executeUpdate($sql);", "title": "" }, { "docid": "362c1869a28e8b406ac36d45aead7f47", "score": "0.6352913", "text": "public function update(){\n\t\t\t$db = new Database();\n\t\t\t$data = $db->select(\n\t\t\t\t\"UPDATE tb_cashmovement\n\t\t\t\t\tSET id=:id, txdescription=:txdescription,typepayid=:typepayid, nuday=:nuday, monthid=:monthid,\n\t\t\t\t\t\tnuyear=:nuyear, price=:price, createdat=:createdat, updatedat=:updatedat\",\n\t\t\t\t[\n\t\t\t\t\t\":id\"=>$this->getid(),\n\t\t\t\t\t\":txdescription\"=>$this->gettxdescription(),\n\t\t\t\t\t\":typepayid\"=>$this->gettypepayid(),\n\t\t\t\t\t\":nuday\"=>$this->getnuday(),\n\t\t\t\t\t\":monthid\"=>$this->getmonthid(),\n\t\t\t\t\t\":nuyear\"=>$this->getnuyear(),\n\t\t\t\t\t\":price\"=>$this->getprice(),\n\t\t\t\t\t\":createdat\"=>$this->getcreatedat(),\n\t\t\t\t\t\":updatedat\"=>$this->getupdatedat()\n\t\t\t\t]\n\t\t\t);\n\n\t\t\t$this->setData($data);\n\t\t\t$this->setSuccess(\"Alterado com Sucesso!\");\n\t\t}", "title": "" }, { "docid": "ca3409960f3d2845a46153bbfb20e6dd", "score": "0.63411194", "text": "public function actualizar(){\n $vehiculo_table = Config::get()->db_vehiculo_table;\n $consulta = \"UPDATE $vehiculo_table\n\t\t\t\t\t\t\t SET matricula='$this->matricula',\n\t\t\t\t\t\t\t \t\tmodelo='$this->modelo',\n\t\t\t\t\t\t\t \t\tcolor='$this->color',\n\t\t\t\t\t\t\t \t\tprecio_venta='$this->precio_venta',\n precio_compra='$this->precio_compra',\n kms=$this->kms,\n\t\t\t\t\t\t\t \t\tcaballos=$this->caballos,\n fecha_venta='$this->fecha_venta',\n\t\t\t\t\t\t\t \t\testado=$this->estado,\n\t\t\t\t\t\t\t \t\tany_matriculacion=$this->any_matriculacion,\n detalles='$this->detalles',\n\t\t\t\t\t\t\t \t\timagen='$this->imagen'\t\t\t\t\t \t\t\n\t\t\t\t\t\t\t WHERE id='$this->id';\";\n return Database::get()->query($consulta);\n }", "title": "" }, { "docid": "b51fd222e67a7e5c4a946e94dc539c50", "score": "0.63402694", "text": "public function transac_commint(){\n\n\t$this->conexion->commit();\n\n}", "title": "" }, { "docid": "eb11415a64c12d30c849d22aaa187d28", "score": "0.6304496", "text": "public function commitRowUpdate();", "title": "" }, { "docid": "3b51215f9d4e54c8d75a375abbe18787", "score": "0.6297384", "text": "public function execute() : TableUpdate\n {\n }", "title": "" }, { "docid": "70f403a6cd7a4be2601915afbe02015c", "score": "0.6277184", "text": "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 }", "title": "" }, { "docid": "08414eaf599f13ec99f12e55c4b69448", "score": "0.6267744", "text": "function update($arrData) {\n $sql = \"update tarifa set descr = :descr where id = :id\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id\", $arrData[0]);\n $query->bindParam(\":descr\", $arrData[1]);\n $query->execute();\n $cnn = NULL;\n // Traigo los destinos de la tabla tarifa_destino para una tarifa especifica\n $sql = \"select trds.id_destino from tarifa_destino trds join tarifa trf \n on trds.id_tarifa = trf.id and trds.id_tarifa = :id\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id\", $arrData[0]);\n $query->execute();\n $res = $query->fetchAll(PDO::FETCH_ASSOC);\n $cnn = NULL;\n if ($res) {// SI TRAE DESTINOS........\n foreach ($res as $clave => $valor) {\n foreach ($valor as $cla => $val) {\n $valorsDeBD[] = $val;\n }\n }\n $arrQuit = $this->Quit($valorsDeBD, $arrData[3]); //Trae valores que se deberian quitar\n $arrAdd = $this->Add($valorsDeBD, $arrData[3]); //Trae valores que se deberian agregar\n //Quito destinos a tarifas\n foreach ($arrQuit as $cla => $val) {\n $sql = \"delete from tarifa_destino where id_destino = :id_dest and id_tarifa = :id\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id\", $arrData[0]);\n $query->bindParam(\":id_dest\", $val);\n $query->execute();\n $cnn = NULL;\n }\n //Agrego destinos a tarifas\n foreach ($arrAdd as $cla => $val) {\n foreach ($arrData[2] as $clave => $valor) {\n if ($val == $clave) {\n $sql = \"replace into tarifa_destino(id_destino,id_tarifa,precio) \"//o replace\n . \"values(:id_dest,:id_tar,:precio)\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id_tar\", $arrData[0]);\n $query->bindParam(\":id_dest\", $clave);\n $query->bindParam(\":precio\", $valor);\n $query->execute();\n $cnn = NULL;\n }\n }\n }\n } else {// SI NO TRAE DESTINOS......\n foreach ($arrData[2] as $cla => $val) {\n $sql = \"insert into tarifa_destino(id_destino,id_tarifa,precio,precio_minimo,tiempo_precio_minimo) \"\n . \"values(:id_dest,:id_tar,:precio,:min_price,:time_min_price)\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id_tar\", $arrData[0]);\n $query->bindParam(\":id_dest\", $cla);\n $query->bindParam(\":precio\", $val);\n $query->execute();\n $cnn = NULL;\n }\n }\n foreach ($arrData[2] as $cla => $val) {\n $sql = \"update tarifa_destino set precio = :price \"\n . \"where id_destino = :id_dest and id_tarifa = :id_tar\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id_tar\", $arrData[0]);\n $query->bindParam(\":id_dest\", $cla);\n $query->bindParam(\":price\", $val);\n $query->execute();\n $cnn = NULL;\n }\n foreach ($arrData[4] as $cla => $val) {\n $sql = \"update tarifa_destino set precio_minimo = :min_price \"\n . \"where id_destino = :id_dest and id_tarifa = :id_tar\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id_tar\", $arrData[0]);\n $query->bindParam(\":id_dest\", $cla);\n $query->bindParam(\":min_price\", $val);\n $query->execute();\n $cnn = NULL;\n }\n foreach ($arrData[5] as $cla => $val) {\n $sql = \"update tarifa_destino set tiempo_precio_minimo = :time_min_price \"\n . \"where id_destino = :id_dest and id_tarifa = :id_tar\";\n $cnn = new PDO($this->argPdo, MySQL_USER, MySQL_PASS);\n $query = $cnn->prepare($sql);\n $query->bindParam(\":id_tar\", $arrData[0]);\n $query->bindParam(\":id_dest\", $cla);\n $query->bindParam(\":time_min_price\", $val);\n $query->execute();\n $cnn = NULL;\n }\n // return $sql;\n $cnn = NULL;\n }", "title": "" }, { "docid": "e5fe8a02292a7e3e8f86c2f4a34b9bd1", "score": "0.62626415", "text": "function alterarEmpresa (){\n\t\t$sql = \"UPDATE empresa SET \";\n\n\t\t//recupera os valores preenchidos no formulário\n\t\t$id_empresa = $_POST[\"id_empresa\"];\n\t\t$nome_empresa = $_POST[\"nome_empresa\"];\n\t\t$endereco_empresa = $_POST[\"endereco_empresa\"];\n\t\t$bairro_empresa = $_POST[\"bairro_empresa\"];\n\t\t$cidade_empresa = $_POST[\"cidade_empresa\"];\n\t\t$cep_empresa = $_POST[\"cep_empresa\"];\n\t\t$uf_empresa = $_POST[\"uf_empresa\"];\n\t\t$tel_fixo_empresa = $_POST[\"tel_fixo_empresa\"];\n\t\t$tel_celular_empresa = $_POST[\"tel_celular_empresa\"];\n\t\t$email_empresa = $_POST[\"email_empresa\"];\n\t\t$site_empresa = $_POST[\"site_empresa\"];\n\t\t$cnpj_empresa = $_POST[\"cnpj_empresa\"];\n\t\t$data_fundacao_empresa = $_POST[\"data_fundacao_empresa\"];\n\n\t\t//compões os campos/valores para alterar os dados da empresa\n\t\t$sql = $sql . \"nome_empresa='$nome_empresa'\";\n\t\t$sql = $sql . \",endereco_empresa='$endereco_empresa'\";\n\t\t$sql = $sql . \",bairro_empresa='$bairro_empresa'\";\n\t\t$sql = $sql . \",cidade_empresa='$cidade_empresa'\";\n\t\t$sql = $sql . \",cep_empresa='$cep_empresa'\";\n\t\t$sql = $sql . \",uf_empresa='$uf_empresa'\";\n\t\t$sql = $sql . \",tel_fixo_empresa='$tel_fixo_empresa'\";\n\t\t$sql = $sql . \",tel_celular_empresa='$tel_celular_empresa'\";\n\t\t$sql = $sql . \",email_empresa='$email_empresa'\";\n\t\t$sql = $sql . \",site_empresa='$site_empresa'\";\n\t\t$sql = $sql . \",cnpj_empresa='$cnpj_empresa'\";\n\t\t$sql = $sql . \",data_fundacao_empresa='$data_fundacao_empresa'\";\n\n\t\t//filtra a condição para atualização pelo ID\n\t\t$sql = $sql . \"WHERE id_empresa=$id_empresa\";\n\n\t\t$conexao = conectar();\n\n\t\tif (executar($conexao, $sql)){\n\t\t\techo \"Atualização realizada com sucesso!\";\n\t\t}\n\t\telse {\n\t\t\techo \"Erro ao realizar o cadastro do Turista!\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "0e51ee3eea232c66739b92632ebb029e", "score": "0.62612027", "text": "function update_empresas($id,$nombre, $nit,$financiero,$comercial,$status,$pago)\n{\n\t$con = con();\n\t$query=$con->query(\"UPDATE snor_empresas SET empresa='$nombre',nit='$nit',financiero='$financiero',comercial='$comercial',estatus='$status',pago='$pago' where id_empresa='$id'\");\n\t\n\tif( !$query)\n\t{\techo \"QueryError: \";\n\t\tdie($con->error);\n\t}\n\n}", "title": "" }, { "docid": "f27b8d59b36cc7fa7438551d9661facc", "score": "0.6256825", "text": "static public function mdlActualizarDatos($tabla, $datos){\n\t\t \n\n\n\t\t$stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET nombres = :nombre, apellido_p = :app, apellido_m = :apm, identificacion = :identificacion, num_identificacion = :num_ine, genero = :sexo, nacimiento = :fecha, rfc = :rfc, calle = :calle, num_ext = :exterior, num_int = :interior, colonia = :colonia, ciudad_municipio = :ciudad, id_estado = :estado, codigo_postal = :postal, tel_1 = :tel1, tel_2 = :tel2, correo = :correo, tipo_socio = :tipo,banco = :banco, cuenta_ban = :cuenta, clave_inte = :inter WHERE id = :id\");\n\n\n\t\t$stmt->bindParam(\":id\", $datos[\"id\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":nombre\", $datos[\"nombre\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":app\", $datos[\"app\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":apm\", $datos[\"apm\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":identificacion\",$datos[\"ine\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":num_ine\",$datos[\"num_ine\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":sexo\", $datos[\"sexo\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":fecha\", $datos[\"fecha\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":rfc\", $datos[\"rfc\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":calle\", $datos[\"calle\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":exterior\", $datos[\"exterior\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":interior\", $datos[\"interior\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":colonia\", $datos[\"colonia\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":ciudad\", $datos[\"ciudad\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":estado\", $datos[\"estado\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":postal\", $datos[\"postal\"], PDO::PARAM_INT);\n\t\t$stmt->bindParam(\":tel1\", $datos[\"tel1\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":tel2\", $datos[\"tel2\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":correo\", $datos[\"correo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":tipo\", $datos[\"tipo\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":banco\", $datos[\"banco\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":cuenta\", $datos[\"cuenta\"], PDO::PARAM_STR);\n\t\t$stmt->bindParam(\":inter\", $datos[\"inter\"], PDO::PARAM_STR);\n\n\t\t\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}", "title": "" }, { "docid": "91fae61dd8515d3be751825ad1fbab33", "score": "0.6256142", "text": "public function save(){\n\t\t$conexion = new Database();\n\t\t\n if ($this->codigo){\n $sql = 'UPDATE CAU_PARTES SET USUARIO_ID = ? SERVICIO_ID = ? TELEFONO = ? FECHA = ? AVERIA = ? UBICACION = ? WHERE PARTE_ID = ?';\n $query = $conexion->prepare( $sql );\n\t\t\t$query->bindParam( 1, $this->usuario_id );\n\t\t\t$query->bindParam( 2, $this->servicio_id );\n\t\t\t$query->bindParam( 3, $this->telefono );\n\t\t\t$query->bindParam( 4, $this->fecha );\n $query->bindParam( 5, $this->averia );\n $query->bindParam( 6, $this->ubicacion );\n\t\t\t$query->bindParam( 7, $this->codigo );\n\t\t\t\n\t\t\t$query->execute( );\n }\n else{\n\t\t\t$sql = 'INSERT INTO CAU_PARTES (USUARIO_ID,SERVICIO_ID, TELEFONO, FECHA, AVERIA, UBICACION ) VALUES ( ?,?,?,?,?,?)';\n \n\t\t\t$query = $conexion->prepare( $sql );\n\t\t\t$a = $this->usuario_id ;\n\t\t\t$query->bindParam( 1, $this->usuario_id );\n\t\t\t$query->bindParam( 2, $this->servicio_id );\n\t\t\t$query->bindParam( 3, $this->telefono );\n\t\t\t$query->bindParam( 4, $this->fecha );\n\t\t\t$query->bindParam( 5, $this->averia );\n\t\t\t$query->bindParam( 6, $this->ubicacion );\n\t\t\t$query->execute( );\n //$this->parte_id = $query->lastInsertId();\n }\n }", "title": "" }, { "docid": "24557b71c564990110857554cea26ed5", "score": "0.62289655", "text": "function batalajukan($conn,$r_tahun,$r_sem,$r_nip) {\n $ok = $conn->Execute(\"delete from se_pengajuan where periode='$r_tahun' and periodes='$r_sem' and nip='$r_nip'\");\n $conn->Execute(\"update se_kegiatan set isskip='N',idrekomendasi1=null, idrekomendasi2=null where periode='$r_tahun' and periodes='$r_sem' and nip='$r_nip' and isskip='Y'\");\n if($ok) {\n $conn->Execute(\"update se_historis_pengajuan set status='D',openkey=1 where periode='$r_tahun' and periodes='$r_sem' and nip='$r_nip'\");\n }\n}", "title": "" }, { "docid": "858b7426d0d1fa7242abb7c92821a39c", "score": "0.6193676", "text": "function laborado(){\n $myssql=new myssql;\n $myssql->table=\"cartera\";\n $myssql->params['prospecto']=2;\n $myssql->where['id']=$this->post['id'];\n $myssql->FilterParams();\n $myssql->update();\n $this->response_json(\"Cliente laborado con éxito\");\n }", "title": "" }, { "docid": "ac03747bfd0632be196250f69b8a366d", "score": "0.6167501", "text": "function actualizarDeuda($acceso,$id_contrato){\n\t\t\t\t\t$acceso->objeto->ejecutarSql(\"select sum(cant_serv * costo_cobro) as deuda from contrato_servicio_deuda where id_contrato='$id_contrato' and status_con_ser='DEUDA'\");\n\t\t\t\t\tif($fila=row($acceso)){\n\t\t\t\t\t\t$deuda = trim($fila['deuda']);\n\t\t\t\t\t\t//echo \"<br>Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\";\n\t\t\t\t\t\t$acceso->objeto->ejecutarSql(\"Update contrato Set deuda='$deuda' Where id_contrato='$id_contrato'\");\n\t\t\t\t\t}\n}", "title": "" }, { "docid": "f9eb33f0db0a2d0160b180047049a697", "score": "0.61532295", "text": "public function execQuery();", "title": "" }, { "docid": "46cbe68528d6b254663bfb7de0a2fc4a", "score": "0.61500996", "text": "function ModificarFichaTecnica()\n\t{\n\t\t/*Creamos una query sencilla*/ \n\t\t$sql=\"update FichaTecnica \n\t\t\t\tset tipoFichaTecnica = '$this->tipoFichaTecnica',\n\t\t\t\t referenciaBaseFichaTecnica = '$this->referenciaBaseFichaTecnica',\n\t\t\t\t\tnombreLargoFichaTecnica = '$this->nombreLargoFichaTecnica',\n\t\t\t\t\tnombreCortoFichaTecnica = '$this->nombreCortoFichaTecnica',\n\t\t\t\t\tcodigoAlternoFichaTecnica = '$this->codigoAlternoFichaTecnica',\n\t\t\t\t\tnumeroMoldeFichaTecnica = '$this->numeroMoldeFichaTecnica',\n\t\t\t\t\tareaMoldeFichaTecnica = '$this->areaMoldeFichaTecnica',\n\t\t\t\t\tdisenadorFichaTecnica = '$this->disenadorFichaTecnica',\n\t\t\t\t\tSegLogin_idUsuarioCrea = '$this->SegLogin_idUsuarioCrea',\n\t\t\t\t\tfechaCreacionFichaTecnica = '$this->fechaCreacionFichaTecnica',\n\t\t\t\t\tSegLogin_idUsuarioAprueba = '$this->SegLogin_idUsuarioAprueba',\n\t\t\t\t\tfechaAprobacionFichaTecnica = '$this->fechaAprobacionFichaTecnica',\t\t\t\t\t\t\n\t\t\t\t\tSegLogin_idUsuarioModifica = '$this->SegLogin_idUsuarioModifica',\n\t\t\t\t\tfechaModificacionFichaTecnica = '$this->fechaModificacionFichaTecnica',\t\t\t \t\t\t\n\t\t\t\t\testadoFichaTecnica = '$this->estadoFichaTecnica',\n\t\t\t\t\tconceptoTelaFichaTecnica = '$this->conceptoTelaFichaTecnica',\n\t\t\t\t\tcantidadContenidaFichaTecnica = '$this->cantidadContenidaFichaTecnica',\n\t\t\t\t\tTercero_idCliente = '$this->Tercero_idCliente',\n\t\t\t\t\tMarca_idMarca = '$this->Marca_idMarca',\n\t\t\t\t\treferenciaClienteFichaTecnica = '$this->referenciaClienteFichaTecnica',\n\t\t\t\t\tTipoNegocio_idTipoNegocio = '$this->TipoNegocio_idTipoNegocio',\n\t\t\t\t\tTipoProducto_idTipoProducto = '$this->TipoProducto_idTipoProducto',\n\t\t\t\t\tTemporada_idTemporada = '$this->Temporada_idTemporada',\n\t\t\t\t\tEstadoConservacion_idEstadoConservacion = '$this->EstadoConservacion_idEstadoConservacion',\n\t\t\t\t\tCategoria_idCategoria = '$this->Categoria_idCategoria',\n\t\t\t\t\tCaracteristicasHilaza_idCaracteristicasHilaza = '$this->CaracteristicasHilaza_idCaracteristicasHilaza',\n\t\t\t\t\tUnidadMedida_idCompra = '$this->UnidadMedida_idCompra',\n\t\t\t\t\tUnidadMedida_idVenta = '$this->UnidadMedida_idVenta',\n\t\t\t\t\tPais_idPais = '$this->Pais_idPais',\n\t\t\t\t\tDescripcionBase_idDescripcionBase = '$this->DescripcionBase_idDescripcionBase',\n\t\t\t\t\tConstruccionHilo_idContruccionHilo = '$this->ConstruccionHilo_idContruccionHilo',\n\t\t\t\t\tClienteObjetivo_idClienteObjetivo = '$this->ClienteObjetivo_idClienteObjetivo',\n EsquemaProducto_idEsquemaProducto = '$this->EsquemaProducto_idEsquemaProducto',\n\t\t\t\t\tClima_idClima = '$this->Clima_idClima', \n\t\t\t\t\tDifusion_idDifusion = '$this->Difusion_idDifusion', \n\t\t\t\t\tEstrategia_idEstrategia = '$this->Estrategia_idEstrategia',\n\t\t\t\t\tSeccion_idSeccion = '$this->Seccion_idSeccion', \n\t\t\t\t\tEvento_idEvento = '$this->Evento_idEvento', \n CalibreHilo_idCalibreHilo = '$this->CalibreHilo_idCalibreHilo',\n\t\t\t\t\tPosicionArancelaria_idPosicionArancelaria = '$this->PosicionArancelaria_idPosicionArancelaria',\n\t\t\t\t\tobservacionesFichaTecnica = '$this->observacionesFichaTecnica',\n\t\t\t\t\tobservacionCotizacionFichaTecnica = '$this->observacionCotizacionFichaTecnica',\n\t\t\t\t\tobservacionConstruccionFichaTecnica = '$this->observacionConstruccionFichaTecnica',\n\t\t\t\t\tComposicion_idComposicion = '$this->Composicion_idComposicion',\n\t\t\t\t\timagenMedida1FichaTecnica = '$this->imagenMedida1FichaTecnica',\n\t\t\t\t\timagenMedida2FichaTecnica = '$this->imagenMedida2FichaTecnica',\n\t\t\t\t\tprecioFichaTecnica = '$this->precioFichaTecnica',\n\t\t\t\t\tcostoFichaTecnica = '$this->costoFichaTecnica',\n\t\t\t\t\tivaIncluidoFichaTecnica = '$this->ivaIncluidoFichaTecnica',\n\t\t\t\t\tacumulaPuntosFichaTecnica = '$this->acumulaPuntosFichaTecnica',\n\t\t\t\t\tredimePuntosFichaTecnica = '$this->redimePuntosFichaTecnica',\n\t\t\t\t\tSegmentoOperacion_idSegmentoOperacion = '$this->SegmentoOperacion_idSegmentoOperacion',\n stockMaximoFichaTecnica = '$this->stockMaximoFichaTecnica',\n stockMinimoFichaTecnica = '$this->stockMinimoFichaTecnica',\n pesoBrutoFichaTecnica = '$this->pesoBrutoFichaTecnica',\n pesoNetoFichaTecnica = '$this->pesoNetoFichaTecnica',\n altoFichaTecnica = '$this->altoFichaTecnica',\n anchoFichaTecnica = '$this->anchoFichaTecnica',\n profundidadFichaTecnica = '$this->profundidadFichaTecnica',\n diasReposicionFichaTecnica = '$this->diasReposicionFichaTecnica',\n puntoPedidoFichaTecnica = '$this->puntoPedidoFichaTecnica',\n cantidadSeguridadFichaTecnica = '$this->cantidadSeguridadFichaTecnica',\n Composicion_idComposicionFichaTecnica = '$this->Composicion_idComposicionFichaTecnica',\n anchoCrudoFichaTecnica = '$this->anchoCrudoFichaTecnica',\n rendimientoCrudoFichaTecnica = '$this->rendimientoCrudoFichaTecnica',\n pesoCrudoFichaTecnica = '$this->pesoCrudoFichaTecnica',\n anchoAcabadoRamaFichaTecnica = '$this->anchoAcabadoRamaFichaTecnica',\n encogimientoAnchoFichaTecnica = '$this->encogimientoAnchoFichaTecnica',\n rendimientoSalidaRamaFichaTecnica = '$this->rendimientoSalidaRamaFichaTecnica',\n encogimientoLargoFichaTecnica = '$this->encogimientoLargoFichaTecnica',\n pesoTerminadoRamaFichaTecnica = '$this->pesoTerminadoRamaFichaTecnica',\n porcentajeViroFichaTecnica = '$this->porcentajeViroFichaTecnica',\n rendimientoReposoFichaTecnica = '$this->rendimientoReposoFichaTecnica',\n porcentajeViroFichaTecnica = '$this->porcentajeViroFichaTecnica',\n perdidaTintoreriaFichaTecnica = '$this->perdidaTintoreriaFichaTecnica',\n pesoReposoFichaTecnica = '$this->pesoReposoFichaTecnica',\n perdidaTotalProcesoFichaTecnica = '$this->perdidaTotalProcesoFichaTecnica',\n anchoClienteFichaTecnica = '$this->anchoClienteFichaTecnica',\n toleranciaPermitidaAnchoFichaTecnica = '$this->toleranciaPermitidaAnchoFichaTecnica',\n elongacionAnchoFichaTecnica = '$this->elongacionAnchoFichaTecnica',\n toleranciaPermitidaRendimientoFichaTecnica = '$this->toleranciaPermitidaRendimientoFichaTecnica',\n elongacionLargoFichaTecnica = '$this->elongacionLargoFichaTecnica',\n pillingFichaTecnica = '$this->pillingFichaTecnica',\n rpmMinutoFichaTecnica = '$this->rpmMinutoFichaTecnica',\n minutoDisFichaTecnica = '$this->minutoDisFichaTecnica',\n vueltasDiasFichaTecnica = '$this->vueltasDiasFichaTecnica',\n vueltasRollosFichaTecnica = '$this->vueltasRollosFichaTecnica',\n numeroRollosFichaTecnica = '$this->numeroRollosFichaTecnica',\n kilosRolloFichaTecnica = '$this->kilosRolloFichaTecnica',\n produccionHorasCienFichaTecnica = '$this->produccionHorasCienFichaTecnica',\n produccionHorasOchentaFichaTecnica = '$this->produccionHorasOchentaFichaTecnica',\n kilosTurnoDoceHorasFichaTecnica = '$this->kilosTurnoDoceHorasFichaTecnica',\n rollosTurnoDoceHorasFichaTecnica = '$this->rollosTurnoDoceHorasFichaTecnica',\n kilosTurnoOchoHorasFichaTecnica = '$this->kilosTurnoOchoHorasFichaTecnica',\n rollosTurnoOchoHorasFichaTecnica = '$this->rollosTurnoOchoHorasFichaTecnica', \n toleranciaTintoreriaPermitidaAnchoFichaTecnica = '$this->toleranciaTintoreriaPermitidaAnchoFichaTecnica',\n toleranciaTintoreriaPermitidaRendimientoFichaTecnica = '$this->toleranciaTintoreriaPermitidaRendimientoFichaTecnica',\n TemporadaInspiracion_idTemporadaInspiracion = '$this->TemporadaInspiracion_idTemporadaInspiracion',\n totalAlimentadoresFichaTecnica = '$this->totalAlimentadoresFichaTecnica',\n consumoTotalMuestraFichaTecnica = '$this->consumoTotalMuestraFichaTecnica',\n sumaConsumoFichaTecnica = '$this->sumaConsumoFichaTecnica',\n productoTerminadoFichaTecnica = '$this->productoTerminadoFichaTecnica',\n materiaPrimaFichaTecnica = '$this->materiaPrimaFichaTecnica'\n\t\t\t\t where idFichaTecnica = $this->idFichaTecnica\"; \n\t\t \n\t\t/*Ejecutamos la query*/ \n\t\t//echo '<br>'.$sql;\n\t\t$bd = Db::getInstance();\n\t\t$query = $bd->ejecutar($sql); \n \n //GRABAMOS las notas de las fichas aprobadas\t\n $this->EliminarFichaTecnicaNotas(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n $total=count($this->idFichaTecnicaNotas);\n // echo 'total maquinas '.$total.\"<br>\";\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaNotas($this->idFichaTecnica, $i);\n \n\t\t}\n \n //GRABAMOS maquinas\t\n $this->EliminarFichaTecnicaMaquinas(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n $total=count($this->idFichaTecnicaMaquinas);\n // echo 'total maquinas '.$total.\"<br>\";\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaMaquinas($this->idFichaTecnica, $i);\n \n\t\t}\n \n //\tGRABAMOS tintoreria\t\n $this->EliminarFichaTecnicaTintoreria(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t$total=count($this->idFichaTecnicaTintoreria);\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaTintoreria($this->idFichaTecnica, $i);\n\t\t} \n \n //GRABAMOS Hilaza\t\t\n\t\t$this->EliminarFichaTecnicaHilaza(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n $total=count($this->idFichaTecnicaHilaza);\n // print_r($this->idFichaTecnicaHilaza);\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaHilaza($this->idFichaTecnica, $i);\n// echo \"posuicion \". $i;\n// echo \"posuicion \". $total;\n\t\t} \n \n \n //\tGRABAMOS variante: Color tela\n $this->EliminarFichaTecnicaColorTela(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\"); \t\t\n\t\t$total=count($this->idFichaTecnicaColorTela);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaColorTela($this->idFichaTecnica, $i);\n\t\t}\n \n\t\t//\tGRABAMOS variante: Pinta\n $this->EliminarFichaTecnicaPinta(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\"); \t\t\n\t\t$total=count($this->idFichaTecnicaPinta);\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaPinta($this->idFichaTecnica, $i);\n\t\t}\n \n \n\t\t/*\n\t\t//\tGRABAMOS LOS Datos Tecnicos\t\n\t\t$this->EliminarFichaTecnicaDatosTecnicos(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\t\t\t\n\t\t$total=count($this->idFichaTecnicaDatosTecnicos);\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaDatosTecnicos($this->idFichaTecnica, $i);\n\t\t}*/\n\t\t\n\t\t// ELIMINAMOS LOS COLORES PARA LUEGO INSERTARLOS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaColor(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t/*\n\t\t\tGRABAMOS LOS COLORES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaColor);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaColor($this->idFichaTecnica, $i);\n\t\t}\n\n\n\t\t// ELIMINAMOS LAS TALLAS PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaTalla(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\n\t\t/*\n\t\t\tGRABAMOS LAS TALLAS\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaTalla);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaTalla($this->idFichaTecnica, $i);\n\t\t}\n\n\t\t// ELIMINAMOS LAS TALLAS COMPLEMENTOS PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaTallaComplemento(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n $this->AdicionarFichaTecnicaTallaComplemento();\n\n\t\t// ELIMINAMOS LAS IMAGENES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaImagen(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LAS IMAGENES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaImagen);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t//echo('ingresa a modificar ficha imagen');\n\t\t\t$this->AdicionarFichaTecnicaImagen($this->idFichaTecnica, $i);\n\t\t}\n\n\t\t\n\t\t// ELIMINAMOS LAS PIEZAS PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaPieza(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LAS PIEZAS\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaPieza);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaPieza($this->idFichaTecnica, $i);\n\t\t}\n\n\t\t// ELIMINAMOS LOS DETALLES DE CONSTRUCCION PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaConstruccion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS DETALLES DE CONSTRUCCION\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaConstruccion);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaConstruccion($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n\t\t\n\t\t// ELIMINAMOS LOS COMPONENTES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaComponente(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS COMPONENTES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaComponente);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaComponente($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n\t\t\n\t\t// ELIMINAMOS LOS MATERIALES DE EMPAQUE PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t//$this->EliminarFichaTecnicaEmpaque(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS MATERIALES DE EMPAQUE \n\t\t*/\n\t\t/*$total=count($this->idFichaTecnicaEmpaque);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaEmpaque($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n\t\t// ELIMINAMOS LOS MATERIALES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t */\n\t\t$this->EliminarFichaTecnicaMaterial(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS MATERIALES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaMaterial);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaMaterial($this->idFichaTecnica, $i);\n\t\t}\n\n $this->EliminarFichaTecnicaMaterialAdicional(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t//GRABAMOS LOS MATERIALES ADICIONALES\n\t\t$total=count($this->idFichaTecnicaMaterialAdicional);\n for($i=0; $i < $total; $i++)\n\t\t{\n $this->AdicionarFichaTecnicaMaterialAdicional($this->idFichaTecnica, $i);\n\t\t}\n //$this->AdicionarFichaTecnicaMaterialAdicional();\n \n\t\t// ELIMINAMOS LAS COMBINACIONES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaCombinacion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LAS COMBINACIONES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaCombinacion);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaCombinacion($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n //Validamos el parametro de produccion, si esta seleccionado grabamos\n if($this->PestanaMedidasParametrosProduccion == 1)\n {\n \n // ELIMINAMOS LAS ESPECIFICACIONES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n $this->EliminarFichaTecnicaEspecificacion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\t\t\n // GRABAMOS LAS ESPECIFICACIONES \n $total=count($this->idFichaTecnicaEspecificacion);\n for($i=0; $i < $total; $i++)\n {\n $this->AdicionarFichaTecnicaEspecificacion($this->idFichaTecnica, $i);\n }\n\t\t \n // ELIMINAMOS LAS MEDIDAS PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n $this->EliminarFichaTecnicaMedida(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\t\n // ELIMINAMOS LAS MEDIDAS POR TALLA PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n $this->EliminarFichaTecnicaMedidaTalla(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\t\n \n //GRABAMOS LAS MEDIDAS\n $total = count($this->idFichaTecnicaMedida);\t\t\n for($i=0; $i < $total; $i++)\n {\n $this->AdicionarFichaTecnicaMedida($this->idFichaTecnica, $i);\n } \n }\n \n\t\n\n\t\t\n\t\t// ELIMINAMOS LOS ARCHIVOS ADJUNTOS PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaAdjunto(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS ARCHIVOS ADJUNTOS \n\t\t*/\n\t\t$total=count($this->idFichaTecnicaAdjunto);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaAdjunto($this->idFichaTecnica, $i);\n\t\t}\n\n\t\t// ELIMINAMOS LOS CENTROS DE PRODUCCION PARA LUEGO INSERTARLOS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaCentroProduccion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS CENTROS DE PRODUCCION\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaCentroProduccion);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaCentroProduccion($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n\t\t//Comienza a modificar el producto\n\t\t\n//\t\trequire_once 'codigobarras.class.php';\t\t\n//\t\t$codigobarras = new CodigoBarras();\n//\t\trequire_once 'esquemaproducto.class.php';\t\t\n//\t\t$esquemaproducto = new EsquemaProducto();\t\t\n//\t\trequire_once('../clases/producto.class.php');\n//\t\t$producto = new Producto();\n//\n//\t\t//print_r($prod);\n//\t\t$datoficha = $this->ConsultarVistaFichaTecnicaGeneral(\"idFichaTecnica = $this->idFichaTecnica\");\n//\n//\t\t$datoesquema = $esquemaproducto->ConsultarVistaEsquemaProducto(\"idEsquemaProducto = \".$datoficha[0][\"EsquemaProducto_idEsquemaProducto\"]);\t\t\n//\t\t\n//\t\t// el proceso debe crear un array de colores y un array de tallas para el producto, dependiendo de las condiciones del esquema\n//\t\t// luego para cada uno de esos colores y tallas, genera un producto diferente\n//\t\t$colores = array();\n//\t\t$codigoColor = array();\n//\t\t$tallas = array();\n//\t\t$codigoTalla = array();\n//\t\t$tallasComplemento = array();\n//\t\t$codigoTallaComplemento = array();\n//\t\t\n//\t\t// si el esquema genera colores independientes\n//\t\tif($datoesquema[0][\"generaColorEsquemaProducto\"] == 1)\n//\t\t{\t\t\t\n//\t\t\t// consultamos los colores de la ficha tecnica\n//\t\t\t$datocolor = $this->ConsultarVistaFichaTecnicaColores(\"idFichaTecnica = $this->idFichaTecnica\");\n//\t\t\t$totalcolores = count($datocolor);\n//\t\t\t\n//\t\t\t// si no tiene colores, solo creamos un color de id cero\n//\t\t\tif($totalcolores == 0)\n//\t\t\t{\n//\t\t\t\t$colores[] = 0;\n//\t\t\t\t$codigoColor[] = '';\n//\t\t\t}\t\n//\t\t\telse // si tiene colores \n//\t\t\t{\n//\t\t\t\t// recorremos un ciclo para cada uno de los colores de la ficha tecnica\n//\t\t\t\tfor($col = 0 ; $col < $totalcolores; $col++)\n//\t\t\t\t{\n//\t\t\t\t\t$colores[] = $datocolor[$col]['Color_idColor'];\n//\t\t\t\t\t$codigoColor[] = $datocolor[$col]['codigoAlternoColor'];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\telse\t// si no genera colores independientes\n//\t\t{\n//\t\t\t$colores[] = $datoesquema[0][\"Color_idColor\"];\n//\t\t\t$codigoColor[] = $datoesquema[0]['codigoAlternoColor'];\n//\t\t}\n//\t\t\t\n//\t\t\n//\t\t// hacemos le mismo proceso para las tallas...\n//\t\t// si el esquema genera tallas independientes\n//\t\tif($datoesquema[0][\"generaTallaEsquemaProducto\"] == 1)\n//\t\t{\t\n//\t\t\t\n//\t\t\t$datotalla = $this->ConsultarVistaFichaTecnicaTallas(\"idFichaTecnica = $this->idFichaTecnica\");\n//\t\t\t$totaltallas = count($datotalla);\n//\n//\t\t\tif($totaltallas == 0)\n//\t\t\t{\n//\t\t\t\t$tallas[] = 0;\n//\t\t\t\t$codigoTalla[] = '';\n//\t\t\t}\t\n//\t\t\telse // si tiene tallas \n//\t\t\t{\n//\t\t\t\t// recorremos un ciclo para cada una de las tallas de la ficha tecnica\n//\t\t\t\tfor($tal = 0 ; $tal < $totaltallas; $tal++)\n//\t\t\t\t{\n//\t\t\t\t\t$tallas[] = $datotalla[$tal]['Talla_idTalla'];\n//\t\t\t\t\t$codigoTalla[] = $datotalla[$tal]['codigoAlternoTalla'];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\telse\t// si no genera tallas independientes\n//\t\t{\n//\t\t\t$tallas[] = $datoesquema[0][\"Talla_idTalla\"];\n//\t\t\t$codigoTalla[] = $datoesquema[0][\"codigoAlternoTalla\"];\n//\t\t}\n//\t\t\n//\t\t\n//\t\tif($datoesquema[0][\"generaTallaComplementoEsquemaProducto\"] == 1)\n//\t\t{\n//\t\t\t\n//\t\t\t$datoTallaComplemento = $this->ConsultarVistaFichaTecnicaTallaComplemento(\"idFichaTecnica = $this->idFichaTecnica\");\n//\t\t\t$totalTallasComplemento = count($datoTallaComplemento);\n//\n//\t\t\tif($totalTallasComplemento == 0)\n//\t\t\t{\n//\t\t\t\t$tallasComplemento[] = 0;\n//\t\t\t\t$codigoTallaComplemento[] = '';\n//\t\t\t}\t\n//\t\t\telse \n//\t\t\t{\n//\t\t\t\t// recorremos un ciclo para cada una de las tallas de la ficha tecnica\n//\t\t\t\tfor($tal = 0 ; $tal < $totalTallasComplemento; $tal++)\n//\t\t\t\t{\n//\t\t\t\t\t$tallasComplemento[] = $datoTallaComplemento[$tal]['TallaComplemento_idTallaComplemento'];\n//\t\t\t\t\t$codigoTallaComplemento[] = $datoTallaComplemento[$tal]['codigoAlternoTallaComplemento'];\n//\t\t\t\t}\n//\t\t\t}\n//\t\t}\n//\t\telse\n//\t\t{\n//\t\t\t$tallasComplemento[] = $datoesquema[0]['TallaComplemento_idTallaComplemento'];\n//\t\t\t$codigoTallaComplemento[] = $datoesquema[0]['codigoAlternoTallaComplemento'];\n//\t\t}\n//\t\t\t\n//\t\t// recorremos todos los colores ypor cada color todas las tallas\n//\t\t// verificando si el producto ya existe para actualizarlo o si no para crearlo\n//\t\t$totalcol = count($colores);\n//\t\tfor($col = 0 ; $col < $totalcol; $col++)\n//\t\t{\n//\t\t\t$totaltal = count($tallas);\n//\t\t\tfor($tal = 0 ; $tal < $totaltal; $tal++)\n//\t\t\t{\n//\t\t\t\t$totaltalcomple = count($tallasComplemento);\n//\t\t\t\tfor ($talcom = 0 ; $talcom < $totaltalcomple; $talcom++)\n//\t\t\t\t{\n//\t\t\t\t// buscamos si ya existe un producto asociado a la ficha tecnica con el mismo color y talla\n//\t\t\t\t$prod = $producto->ConsultarVistaProducto(\"FichaTecnica_idFichaTecnica = \".$this->idFichaTecnica. \n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" and Color_idColor = \".$colores[$col].\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" and Talla_idTalla = \".$tallas[$tal].\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\" and TallaComplemento_idTallaComplemento = \".$tallasComplemento[$talcom],\n//\t\t\t\t\t\t\t\t\t\t\t\t\t\"\");\n//\n//\t\t\t\t// llenamos los campos con los datos del formulario de ficha\n//\n//\t\t\t\t$producto->idProducto = 0;\n//\t\t\t\t$producto->codigoAlternoProducto = trim($datoficha[0][\"referenciaBaseFichaTecnica\"]); \n//\t\t\t\t$producto->referenciaProducto = trim($datoficha[0][\"referenciaBaseFichaTecnica\"]) . \n//\t\t\t\t\t\t\t\t\t\t\t\ttrim($codigoColor[$col]) . \n//\t\t\t\t\t\t\t\t\t\t\t\ttrim($codigoTalla[$tal]) .\n//\t\t\t\t\t\t\t\t\t\t\t\ttrim($codigoTallaComplemento[$talcom]);\n//\n//\t\t\t\t$producto->nombreLargoProducto = $datoficha[0][\"nombreLargoFichaTecnica\"];\n//\t\t\t\t$producto->nombreCortoProducto = $datoficha[0][\"nombreCortoFichaTecnica\"];\n//\t\t\t\t$producto->precioProducto = $datoficha[0][\"precioFichaTecnica\"];\n//\t\t\t\t$producto->ivaIncluidoProducto = $datoficha[0][\"ivaIncluidoFichaTecnica\"];\n//\t\t\t\t$producto->acumulaPuntosProducto = $datoficha[0][\"acumulaPuntosFichaTecnica\"];\n//\t\t\t\t$producto->redimePuntosProducto = $datoficha[0][\"redimePuntosFichaTecnica\"];\n//\t\t\t\t$producto->fechaCreacionProducto = date(\"Y-m-d\");\n//\t\t\t\t$producto->estadoProducto = 'ACTIVO';\n//\t\t\t\t$producto->clasificacionProducto = '*01*';\n//\t\t\t\t$producto->Color_idColor = $colores[$col];\n//\t\t\t\t$producto->Talla_idTalla = $tallas[$tal];\n//\t\t\t\t$producto->TallaComplemento_idTallaComplemento = $tallasComplemento[$talcom];\n//\t\t\t\t$producto->FichaTecnica_idFichaTecnica = $this->idFichaTecnica;\n//\t\t\t\t$producto->cantidadContenidaProducto = 0;\n//\t\t\t\t$producto->Tercero_idCliente = $datoficha[0][\"Tercero_idCliente\"];\n//\t\t\t\t$producto->Marca_idMarca = $datoficha[0][\"Marca_idMarca\"];\n//\t\t\t\t$producto->Pais_idPaisOrigen = $datoficha[0][\"Pais_idPais\"];\n//\t\t\t\t$producto->EstadoConservacion_idEstadoConservacion = $datoficha[0][\"EstadoConservacion_idEstadoConservacion\"];\n//\t\t\t\t$producto->TipoProducto_idTipoProducto = $datoficha[0][\"TipoProducto_idTipoProducto\"];\n//\t\t\t\t$producto->TipoNegocio_idTipoNegocio = $datoficha[0][\"TipoNegocio_idTipoNegocio\"];\n//\t\t\t\t$producto->Temporada_idTemporada = $datoficha[0][\"Temporada_idTemporada\"];\n//\t\t\t\t$producto->Composicion_idComposicion = $datoficha[0][\"Composicion_idComposicion\"];\n//\t\t\t\t$producto->Categoria_idCategoria = $datoficha[0][\"Categoria_idCategoria\"];\n//\t\t\t\t$producto->UnidadMedida_idCompra = $datoficha[0][\"UnidadMedida_idCompra\"];\n//\t\t\t\t$producto->UnidadMedida_idVenta = $datoficha[0][\"UnidadMedida_idVenta\"];\n//\t\t\t\t$producto->Clima_idClima = $datoficha[0][\"Clima_idClima\"];\n//\t\t\t\t$producto->Difusion_idDifusion = $datoficha[0][\"Difusion_idDifusion\"];\n//\t\t\t\t$producto->Estrategia_idEstrategia = $datoficha[0][\"Estrategia_idEstrategia\"];\n//\t\t\t\t$producto->Evento_idEvento = $datoficha[0][\"Evento_idEvento\"];\n//\t\t\t\t$producto->PosicionArancelaria_idPosicionArancelaria = $datoficha[0][\"PosicionArancelaria_idPosicionArancelaria\"];\n//\t\t\t\t$producto->Seccion_idSeccion = $datoficha[0][\"Seccion_idSeccion\"];\n//\t\t\t\t$producto->ClienteObjetivo_idClienteObjetivo = $datoficha[0][\"ClienteObjetivo_idClienteObjetivo\"];\n//\n//\t\t\t\t// generamos el codigo de barras del producto\n//\t\t\t\t$producto->codigoBarrasProducto = $codigobarras->GenerarCodigoBarras();\n//\t\t\t\t\n//\t\t\t\t\n//\t\t\t\t// si el producto ya existe en el modulo comercial, rescatamos los datos generales que ya tiene grabados por si los han modificado\n//\t\t\t\tif(isset($prod[0][\"idProducto\"]))\n//\t\t\t\t{\n//\t\t\t\t\t\n//\t\t\t\t\t$producto->idProducto = $prod[0][\"idProducto\"];\n//\t\t\t\t\t$producto->referenciaProducto = $prod[0][\"referenciaProducto\"];\n//\t\t\t\t\t//$producto->nombreLargoProducto = $prod[0][\"nombreLargoProducto\"];\n//\t\t\t\t\t//$producto->nombreCortoProducto = $prod[0][\"nombreCortoProducto\"];\n//\t\t\t\t\t$producto->fechaCreacionProducto = $prod[0][\"fechaCreacionProducto\"];\n//\t\t\t\t\t$producto->estadoProducto = $prod[0][\"estadoProducto\"];\n//\t\t\t\t\t$producto->clasificacionProducto = $prod[0][\"clasificacionProducto\"];\n//\t\t\t\t\t$producto->codigoBarrasProducto = ($prod[0][\"codigoBarrasProducto\"] == '' ? $producto->codigoBarrasProducto : $prod[0][\"codigoBarrasProducto\"]);\n//\t\t\t\t\t\n//\t\t\t\t\t/*// los campos que se modifican en el detalle de productos, se deben llenar con el datos correspondiente a su talla y Color\n//\t\t\t\t\t// buscamos la talla y el color en los arrays de la pesta�a de productos para saber el offset de la linea\n//\t\t\t\t\t$colores = $_POST['Producto_idColor'];\n//\t\t\t\t\t$tallas = $_POST['Producto_idTalla'];\n//\t\t\t\t\t$barras = $_POST['codigoBarrasProducto'];\n//\t\t\t\t\t$refclien = $_POST['referenciaClienteProducto'];\n//\t\t\t\t\t$refprov = $_POST['referenciaProveedorProducto'];\n//\t\t\t\t\t$codalter = $_POST[\"codigoAlternoProducto\"];\n//\n//\t\t\t\t\t$totalreg = count($colores);\n//\t\t\t\t\tfor($reg = 0 ; $reg < $totalreg; $reg++)\n//\t\t\t\t\t{\t\t\t\t\t\t\t\n//\t\t\t\t\t\tif($colores[$reg] == $fichatecnica->Color_idColor[$col] and $tallas[$reg] == $fichatecnica->Talla_idTalla[$tal])\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t$producto->codigoBarrasProducto = $barras[$reg];\n//\t\t\t\t\t\t\t$producto->referenciaClienteProducto = $refclien[$reg];\n//\t\t\t\t\t\t\t$producto->referenciaProveedorProducto = $refprov[$reg];\n//\t\t\t\t\t\t\t$producto->codigoAlternoProducto = $codalter[$reg];\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}*/\n//\n//\t\t\t\t\t// Actualizamos la informaci�nn del producto\n//\t\t\t\t\t$producto->ModificarProductoFichaTecnica() ;\n//\t\t\t\t\t//echo 'MODIFICO';\n//\t\t\t\t}\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t}\n\t\treturn $query;\n }", "title": "" }, { "docid": "70bc52681efd8c0d460ab7216c0c40e4", "score": "0.6147908", "text": "function update_empresas_from_versiones()\n{\n\t$con = con();\n\t$query=$con->query(\"UPDATE snor_empresas SET estatus='No actualizado'\");\n\t\n\tif( !$query)\n\t{\techo \"QueryError: \";\n\t\tdie($con->error);\n\t}\n\n}", "title": "" }, { "docid": "3e8a84158e8e56a8aa2b5ab39c992895", "score": "0.6144941", "text": "function update(){\n \n // query \n $query = \"UPDATE `df_detalle_entrega` SET \n `df_guia_entrega`= \".$this->df_guia_entrega.\",\n `df_cod_producto`= '\".$this->df_cod_producto.\"',\n `df_unidad_detent`= '\".$this->df_unidad_detent.\"',\n `df_cant_producto_detent`= \".$this->df_cant_producto_detent.\",\n `df_factura_detent`= \".$this->df_factura_detent.\",\n `df_nom_producto_detent`= '\".$this->df_nom_producto_detent.\"',\n `df_num_factura_detent`= \".$this->df_num_factura_detent.\" \n WHERE `df_id_detent` = \".$this->df_id_detent;\n\n // prepara la sentencia del query\n $stmt = $this->conn->prepare($query);\n \n // execute query\n if($stmt->execute()){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "b8ae65d3405da95302d325ed3fccf36d", "score": "0.61412597", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set name=\\\"$this->name\\\",email1=\\\"$this->email1\\\",address1=\\\"$this->address1\\\",lastname=\\\"$this->lastname\\\",phone1=\\\"$this->phone1\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "69b51dd2e4dfdef81176782a99404618", "score": "0.6140579", "text": "function grabar()\n\t{\n\t\t$sql = $this->to_sql();\n\t\t$this->db->ejecutar($sql);\n\t}", "title": "" }, { "docid": "9a7b707569ba5c377a8cfa1f1489866f", "score": "0.6129634", "text": "function modificarcantidadproductoFabrica($nuevacanta, $fabrica) {\r\n include 'database.php';\r\n $pdo = Database::connect();\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $sql = \"UPDATE `stock_productos` SET `stock`=? WHERE `codFabrica` =?\";\r\n $q = $pdo->prepare($sql);\r\n $q->execute(array($nuevacanta, $fabrica));\r\n Database::disconnect();\r\n}", "title": "" }, { "docid": "b29d11c663e1a57a0cda43fafe0cdc6c", "score": "0.61253613", "text": "public function update($datos){\n \n try{\n $id=-1; \n \n $gbd=$this->instanceDataBase;\n \n $sentencia = $gbd->prepare(\"call usuario_modif(?,?,?,?,?,?,?,?,?,?,@resultado); \");\n $sentencia->bindParam(1, $datos[0], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(2, $datos[1], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(3, $datos[2], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(4, $datos[3], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(5, $datos[4], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(6, $datos[5], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(7, $datos[6], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(8, $datos[7], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(9, $datos[8], PDO::PARAM_STR, 4000); \n $sentencia->bindParam(10, $datos[9], PDO::PARAM_STR, 4000); \n \n // llamar al procedimiento almacenado\n $sentencia->execute();\n \n $query = \"select @resultado as resultado\";\n $result = DataBase::getArrayListQuery($query, array(),$this->instanceDataBase); \n \n if(count($result)>0)\n $id = $result[0]['resultado'];\n \n return $id;\n }\n catch(PDOException $e){\n throw $e;\n } \n }", "title": "" }, { "docid": "f2e615b1d50d78442b51c4d5e111aff8", "score": "0.6124523", "text": "public function update(){\n\t\t$sql = \"update \".self::$tablename.\" set NOMBRE=\\\"$this->NOMBRE\\\" where ID_COMPRA_PRO=$this->ID_COMPRA_PRO\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "bc3453ed04efbfe5c0c53263ae66b124", "score": "0.6123016", "text": "public function actionUpdate(){\n\n\n\n $transaction=Yii::$app->db->beginTransaction();\n try{\n //se accede a los datos Persona del formulario\n $personaForm=Yii::$app->request->post()['Persona'];\n //se accede a los datos TalleRemera del formulario\n $talleRemeraForm=Yii::$app->request->post()['Talleremera'];\n //se accede a los datos TersonaEmergencia del formulario\n $personaEmergenciaForm=Yii::$app->request->post()['Personaemergencia'];\n //se accede al modeo FichaMedica del formulario\n $fichaMedicaForm=Yii::$app->request->post()['Fichamedica'];\n //se busca el modelo Persona de la persona logueada\n $persona=Persona::findOne(['idUsuario' => $_SESSION['__id']]);\n //se accede al modelo PersonaEmrgencia del usuario\n $personaEmergencia=$persona->personaEmergencia;\n //se accede al modelo PersonaDireccion del usuario\n $personaDireccion=$persona->personaDireccion;\n $personaDireccion->idLocalidad=Yii::$app->request->post()['Personadireccion']['idLocalidad'];\n $personaDireccion->direccionUsuario=Yii::$app->request->post()['calle'];\n //se actualiza el modelo\n $personaDireccion->save();\n $personaEmergencia->nombrePersonaEmergencia=$personaEmergenciaForm['nombrePersonaEmergencia'];\n $personaEmergencia->apellidoPersonaEmergencia=$personaEmergenciaForm['apellidoPersonaEmergencia'];\n $personaEmergencia->telefonoPersonaEmergencia=$personaEmergenciaForm['telefonoPersonaEmergencia'];\n $personaEmergencia->idVinculoPersonaEmergencia=$personaEmergenciaForm['idVinculoPersonaEmergencia'];\n //se actualiza el modelo\n $personaEmergencia->save();\n //accedemos al modelo FichaMedica de la persona\n $fichaMedica=$persona->fichaMedica;\n $fichaMedica->obraSocial=$fichaMedicaForm['obraSocial'];\n $fichaMedica->peso=$fichaMedicaForm['peso'];\n $fichaMedica->altura=$fichaMedicaForm['altura'];\n $fichaMedica->frecuenciaCardiaca=$fichaMedicaForm['frecuenciaCardiaca'];\n $fichaMedica->idGrupoSanguineo=$fichaMedicaForm['idGrupoSanguineo'];\n $fichaMedica->evaluacionMedica=$fichaMedicaForm['evaluacionMedica'];\n $fichaMedica->intervencionQuirurgica=$fichaMedicaForm['intervencionQuirurgica'];\n $fichaMedica->suplementos=$fichaMedicaForm['suplementos'];\n $fichaMedica->tomaMedicamentos=$fichaMedicaForm['tomaMedicamentos'];\n $fichaMedica->observaciones=$fichaMedicaForm['observaciones'];\n //se actualiza el modelo\n $fichaMedica->save();\n $persona->nacionalidadPersona=$personaForm['nacionalidadPersona'];\n $persona->nombrePersona=$personaForm['nombrePersona'];\n $persona->apellidoPersona=$personaForm['apellidoPersona'];\n $persona->fechaNacPersona=$personaForm['fechaNacPersona'];\n $persona->telefonoPersona=$personaForm['telefonoPersona'];\n $persona->donador=$personaForm['donador'];\n $persona->idTalleRemera=$talleRemeraForm['idTalleRemera'];\n $persona->sexoPersona=$personaForm['sexoPersona'];\n\n\n //si el usuario introduce el mismo email que el que tenia no se actualiza\n if($persona->mismoUsuarioEmail($personaForm['mailPersona'])==false){\n //de lo contrario, primero verifica que no exista un usuario cone l mismo email\n if($persona->noExisteEmail($personaForm['mailPersona'])){\n $persona->mailPersona=$personaForm['mailPersona'];\n if($persona->save()){\n $usuarioDelaPersona=$persona->usuario;\n $usuarioDelaPersona->mailUsuario=$personaForm['mailPersona'];\n $actualizado=$usuarioDelaPersona->save();\n\n }\n //si el email ya esta introducido no se guardan los datos\n }else{\n $actualizado=false;\n }\n\n //si el usuario no quiere actualizar su email, se guardan los demas registros , sin actualizar el email\n }else{\n $actualizado=$persona->save();\n }\n\n\n if($actualizado){\n $transaction->commit();\n $guardado=1;\n }else{\n $transaction->rollBack();\n $guardado=0;\n }\n\n if ($guardado){ // Si la actualizacion es correcta se redirecciona al index\n $mensaje = \"Se actualizaron correctamente tus datos \";\n return Yii::$app->response->redirect(['site/index','guardado'=>$guardado,'mensaje'=>$mensaje])->send();\n }else{\n $mensaje = \"Ha ocurrido un error,vuelve a intentarlo\";\n return Yii::$app->response->redirect(['site/index','guardado'=>$guardado,'mensaje'=>$mensaje])->send();\n }\n }catch (\\Exception $e){\n $transaction->rollBack();\n throw $e;\n }\n }", "title": "" }, { "docid": "f0f57227a47e2f2ac90aaa1dfb6a3ee9", "score": "0.61223674", "text": "function update($table = null, $id = 0, $data = null) {\n\n $database = open_database();\n\n $items = null;\n\n foreach ($data as $key => $value) {\n $items .= trim($key, \"'\") . \"='$value',\";\n }\n\n // remove a ultima virgula\n $items = rtrim($items, ',');\n\n $sql = \"UPDATE \" . $table;\n $sql .= \" SET $items\";\n $sql .= \" WHERE id=\" . $id . \";\";\n\n try {\n $database->query($sql);\n\n $_SESSION['message'] = 'Registro atualizado com sucesso.';\n $_SESSION['type'] = 'success';\n\n } catch (Exception $e) {\n\n $_SESSION['message'] = 'Nao foi possivel realizar a operacao.';\n $_SESSION['type'] = 'danger';\n }\n\n close_database($database);\n}", "title": "" }, { "docid": "c2434bf95983147cc668590c49ff59e7", "score": "0.6116316", "text": "public function update() {\n $sql = \"update \" . self::$tablename . \" set name=\\\"$this->name\\\",lastname=\\\"$this->lastname\\\",address=\\\"$this->address\\\",phone=\\\"$this->phone\\\",email=\\\"$this->email\\\" where id=$this->id\";\n Executor::doit($sql);\n }", "title": "" }, { "docid": "b71d8aa21281d38842c1dc78c2f2cb23", "score": "0.61062264", "text": "public function update(){\n\t\t\tArticulo::updateBD();\n\t\t\techo(\"<h1> S'ha actualitzat</h1>\");\n\t\t\tcall('articulo', 'index',null);\n\n\t}", "title": "" }, { "docid": "b91092f9b59d388b2765dd38082d71e0", "score": "0.61031437", "text": "function SalvaOperazione($azione) {\r\n // ottiene l'id dell'operazione da modificare (solo in modalità update)\r\n $IdContabilita=$_POST[\"mymodificaoperazione\"];\r\n \r\n // ottiene il tipo di contabilità da modificare\r\n $contabilita=$_POST[\"tipo_contabilita\"];\r\n \r\n // ottiene la data dell'operazione da salvare filtrata per mysql \r\n $data=FiltraData($_POST[\"data_operazione\"],\"PerMysql\");\r\n\r\n // ottiene l'id della voce da salvare\r\n $IdVoce=$_POST[\"voci\"];\r\n \r\n // ottiene l'Id del capitolo in base alla voce da salvare in contabilita \r\n $query=\"SELECT IdCapitolo FROM tblvocicontabilita WHERE IdVoci=\".$IdVoce;\r\n $result =mysqli_query($GLOBALS[\"___mysqli_ston\"], $query);\r\n $row=mysqli_fetch_object($result);\r\n $IdCapitolo=$row->IdCapitolo;\r\n \r\n // ottiene l'operazione da compiere\r\n $operazione=$_POST[\"optOperazione\"];\r\n \r\n // ottiene l'importo da salvare\r\n $importo=$_POST[\"txtImporto\"];\r\n \r\n // toglie la virgola e i punti dal valore dell'importo\r\n $cifra=explode(\".\",$importo);\r\n $importo=implode($cifra);\r\n \r\n $cifra=explode(\",\",$importo);\r\n $importo=implode(\".\",$cifra);\r\n \r\n if ($operazione==\"U\") {\r\n $importo=\"-\".$importo;\r\n }\r\n \r\n // prepara la query da mandare a Mysql\r\n switch ($azione) {\r\n case \"insert\":\r\n $query=\"INSERT INTO tblcontabilita (DataOperazione,Contabilita,IdCapitolo,IdVoce,Operazione,Importo) \r\n VALUES ('$data','$contabilita','$IdCapitolo','$IdVoce','$operazione','$importo')\";\r\n break;\r\n \r\n case \"update\":\r\n $query=\"UPDATE tblcontabilita \r\n SET DataOperazione='$data',\r\n Contabilita='$contabilita',\r\n IdCapitolo='$IdCapitolo',\r\n IdVoce='$IdVoce',\r\n Operazione='$operazione',\r\n Importo='$importo' \r\n WHERE IdContabilita=$IdContabilita\";\r\n break;\r\n }\r\n \r\n \r\n \r\n mysqli_query($GLOBALS[\"___mysqli_ston\"], \"START TRANSACTION\");\r\n \r\n $result=mysqli_query($GLOBALS[\"___mysqli_ston\"], $query) || die($query);\r\n \r\n mysqli_query($GLOBALS[\"___mysqli_ston\"], \"COMMIT\");\r\n \r\n ResetVociCapitoli();\r\n return;\r\n}", "title": "" }, { "docid": "c623cc301357426f6c2161abfc654d41", "score": "0.6098107", "text": "public function update($agencia){\n\t\t$campos = \"\";\n \n \n\t\t if(!empty($agencia->descricao)) $campos .=' descricao = ?,';\n\t\t if(!empty($agencia->cidadeId)) $campos .=' cidade_id = ?,';\n\t\t if(!empty($agencia->estadoId)) $campos .=' estado_id = ?,';\n\t\t if(!empty($agencia->cep)) $campos .=' cep = ?,';\n\t\t if(!empty($agencia->endereco)) $campos .=' endereco = ?,';\n\t\t if(!empty($agencia->bairro)) $campos .=' bairro = ?,';\n\t\t if(!empty($agencia->fone)) $campos .=' fone = ?,';\n\t\t if(!empty($agencia->created)) $campos .=' created = ?,';\n\t\t if(!empty($agencia->status)) $campos .=' status = ?,';\n\t\t if(!empty($agencia->bancoId)) $campos .=' banco_id = ?,';\n\n \n $campos = substr($campos,0,-1);\n \n $sql = 'UPDATE agencias SET '.$campos.' WHERE id = ?';\n\t\t$sqlQuery = new SqlQuery($sql);\n\t\t\n\t\t if(!empty($agencia->descricao)) \t\t$sqlQuery->set($agencia->descricao);\n\t\t if(!empty($agencia->cidadeId)) \t\t$sqlQuery->setNumber($agencia->cidadeId);\n\t\t if(!empty($agencia->estadoId)) \t\t$sqlQuery->setNumber($agencia->estadoId);\n\t\t if(!empty($agencia->cep)) \t\t$sqlQuery->set($agencia->cep);\n\t\t if(!empty($agencia->endereco)) \t\t$sqlQuery->set($agencia->endereco);\n\t\t if(!empty($agencia->bairro)) \t\t$sqlQuery->set($agencia->bairro);\n\t\t if(!empty($agencia->fone)) \t\t$sqlQuery->set($agencia->fone);\n\t\t if(!empty($agencia->created)) \t\t$sqlQuery->set($agencia->created);\n\t\t if(!empty($agencia->status)) \t\t$sqlQuery->setNumber($agencia->status);\n\t\t if(!empty($agencia->bancoId)) \t\t$sqlQuery->setNumber($agencia->bancoId);\n\n\t\t$sqlQuery->setNumber($agencia->id);\n\t\treturn $this->executeUpdate($sqlQuery);\n\t}", "title": "" }, { "docid": "c8875fc352dc462075a512afe7c0524d", "score": "0.6095748", "text": "static public function mdlIngresarCotizacion($tabla,$datos){\n\t\t$datos = arrayMapUtf8Decode($datos);\n\t\t$db = new Conexion();\n\t\t$db->beginTransaction();\n\t\t$sql1 = $db->consulta(\"INSERT INTO $tabla(cod_cotizacion,cod_estado_cotizacion,cod_cliente,cod_moneda,cod_forma_pago,dsc_contacto,dsc_correo,dsc_cargo,dsc_telefono,dsc_orden_compra,dsc_referencia,dsc_lugar_entrega,dsc_tiempo_entrega,dsc_validez_oferta,dsc_garantia,fch_emision,cod_usr_registro,fch_registro,imp_subtotal,imp_igv,imp_total,dsc_observacion,cod_tipo_descuento,imp_descuento,flg_descuento,cod_cotizacion_principal,num_orden_produccion,fchEmision_orden_compra) VALUES ('\".$datos[\"cod_cotizacion\"].\"','\".$datos[\"cod_estado_cotizacion\"].\"','\".$datos[\"cod_cliente\"].\"','\".$datos[\"cod_moneda\"].\"','\".$datos[\"cod_forma_pago\"].\"','\".$datos[\"dsc_contacto\"].\"','\".$datos[\"dsc_correo\"].\"','\".$datos[\"dsc_cargo\"].\"','\".$datos[\"dsc_telefono\"].\"','\".$datos[\"dsc_orden_compra\"].\"','\".$datos[\"dsc_referencia\"].\"','\".$datos[\"dsc_lugar_entrega\"].\"','\".$datos[\"dsc_tiempo_entrega\"].\"','\".$datos[\"dsc_validez_oferta\"].\"','\".$datos[\"dsc_garantia\"].\"','\".$datos[\"fch_emision\"].\"','\".$datos[\"cod_usr_registro\"].\"',CONVERT(datetime,'\".$datos[\"fch_registro\"].\"',21),\".$datos[\"imp_subtotal\"].\",\".$datos[\"imp_igv\"].\",\".$datos[\"imp_total\"].\",'\".$datos[\"dsc_observacion\"].\"','\".$datos[\"cod_tipo_descuento\"].\"',\".$datos[\"imp_descuento\"].\",'\".$datos[\"flg_descuento\"].\"','\".$datos[\"cod_cotizacion_principal\"].\"','\".$datos[\"num_orden_produccion\"].\"',\".$datos[\"fchEmision_orden_compra\"].\")\");\n\t\t$sql2 = $db->consulta(\"SELECT cod_estado_cotizacion FROM vtama_estado_cotizacion WHERE flg_aprobado = 'SI'\");\n\t\t$estadoCot = $db->recorrer($sql2)[\"cod_estado_cotizacion\"];\n\t\tif($datos[\"dsc_orden_compra\"] != ''){\n\t\t\t$sql3 = $db->consulta(\"UPDATE $tabla SET cod_estado_cotizacion = '$estadoCot' WHERE cod_cotizacion = '\".$datos[\"cod_cotizacion\"].\"'\");\n\t\t}\n\t\tif($datos[\"dsc_orden_compra\"] != ''){\n\t\t\tif($sql1 && $sql2 && $sql3){\n\t\t\t\t$db->commit();\n\t\t\t\treturn \"ok\";\n\t\t\t}else{\n\t\t\t\t$db->rollback();\n\t\t\t\treturn \"error\";\n\t\t\t}\n\t\t\t$db->liberar($sql1);\n\t\t\t$db->liberar($sql2);\n\t\t\t$db->liberar($sql3);\n\t\t}else{\n\t\t\tif($sql1){\n\t\t\t\t$db->commit();\n\t\t\t\treturn \"ok\";\n\t\t\t}else{\n\t\t\t\t$db->rollback();\n\t\t\t\treturn \"error\";\n\t\t\t}\n\t\t\t$db->liberar($sql);\n\t\t}\n $db->cerrar();\n\t}", "title": "" }, { "docid": "11fc2a9ad2d45354e59aa6ed1c80d911", "score": "0.60869724", "text": "function modificars($evento,$cantidad,$precio,$vendidas){\n $evento=$this->spaceout($evento);\n\n try{\n$sql = \"UPDATE stock SET \";\n$vector = array($cantidad,$precio,$vendidas); \n$vector2 = array('cantidad','precio','vendidas');\n$max = sizeof($vector);\n for ($i = 1; $i <= $max; $i++) {\n if ($i != $max) {\n $sql .= utf8_decode($vector2[$i - 1]) . \"=\".\"'\";\n $sql .= utf8_decode($vector[$i - 1]) .\"'\".\",\";\n } else {\n $sql .= utf8_decode($vector2[$i - 1]) . \"=\";\n $sql .= \"'\". utf8_decode($vector[$i - 1]) .\"'\". \" WHERE evento='\".$evento.\"';\";\n }\n }\n\n$sentencia2 = $this->db->prepare($sql);\n\n\n$sentencia2->execute();\n\n\nif($sentencia2->rowCount() == 1){\n\n return TRUE;\n\n }\n else {\n\n return FALSE;}\n }catch(PDOException $e){\n echo \"Error:\".$e->getMessage();\n }\n }", "title": "" }, { "docid": "0adc21e1bf0416f246b0453948446d26", "score": "0.6085261", "text": "public function handle()\n {\n\t\tDB::statement('ALTER TABLE asuransis ADD id2 bigint;');\n\t\tDB::statement('ALTER TABLE asuransis MODIFY id INT NOT NULL;');\n\t\tDB::statement('ALTER TABLE asuransis DROP PRIMARY KEY;');\n\t\t$asuransis = Asuransi::orderBy('id', 'desc')->get();\n\t\tforeach ($asuransis as $k => $asu) {\n\t\t\t$asu->id2 = $asu->id/1000000;\n\t\t\t$asu->save();\n\t\t\tDB::statement(\"update antrian_polis set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update periksas set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update pics set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update pembayaran_asuransis set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update pasiens set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update sops set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update tarifs set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update antrian_periksas set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update discount_asuransis set asuransi_id='{$asu->id2}' where asuransi_id='{$asu->id}';\");\n\t\t\tDB::statement(\"update emails set emailable_id='{$asu->id2}' where emailable_id='{$asu->id}' and emailable_type='App\\\\\\Models\\\\\\Asuransi';\");\n\t\t\tDB::statement(\"update telpons set telponable_id='{$asu->id2}' where telponable_id='{$asu->id}' and telponable_type='App\\\\\\Models\\\\\\Asuransi';\");\n\t\t}\n\t\tDB::statement('ALTER TABLE asuransis DROP id;');\n\t\tDB::statement('ALTER TABLE asuransis CHANGE `id2` `id` bigint not null auto_increment primary key;');\n }", "title": "" }, { "docid": "03052cce255e576809f1f4c27d2ac173", "score": "0.6084959", "text": "public function inserir(){\n //criar a conexao com o banco de dados\n $pdo = new PDO(server,usuario,senha);\n\n //verificar see foi enviado valores pelo formulário\n if(isset($_GET[\"valor\"]) && isset($_GET[\"local_de_doacao\"]) && isset($_GET[\"data\"]) && isset($_GET[\"horario\"]) && isset($_GET[\"minutos\"]) && isset($_GET[\"carteira_codigo\"]) && isset($_GET[\"usuario_cpf\"])){\n\n //preencher os atributos com os valores recebidos\n $this->valor = $_GET[\"valor\"];\n $this->local_de_doacao = $_GET[\"local_de_doacao\"];\n $this->data = $_GET[\"data\"];\n $this->horario = $_GET[\"horario\"];\n $this->minutos = $_GET[\"minutos\"];\n $this->carteira_codigo = $_GET[\"carteira_codigo\"];\n $this->usuario_cpf = $_GET[\"usuario_cpf\"];\n //Criar o comando SQL com parametros para insercao\n $smtp = $pdo->prepare(\"insert into doacao(codigo,valor,local_de_doacao,data,horario,minutos,carteira_codigo,usuario_cpf) values(null, :valor, :local_de_doacao, :data, :horario, :minutos, :carteira_codigo, :usuario_cpf) \");\n //Executar o comando banco de dados passando os valores recebidos\n $smtp->execute(array(\n ':valor' => $this->valor,\n ':local_de_doacao' => $this->local_de_doacao,\n ':data' => $this->data,\n ':horario' => $this->horario,\n ':minutos' => $this->minutos,\n ':carteira_codigo' => $this->carteira_codigo,\n ':usuario_cpf' => $this->usuario_cpf\n ));\n $smtpp = $pdo->prepare(\"update carteira set saldo = saldo - :valor where codigo = :carteira_codigo\");\n $smtpp->execute(array(\n ':valor' => $this->valor,\n ':carteira_codigo' => $this->carteira_codigo\n ));\n\n //Testar se retornou algum resultado\n if ($smtp->rowCount() > 0) {\n\n header(\"location:./\");//Retornar para o index.php\n }\n }else{\n header(\"location:./\");//Retornar para o index.php\n }\n }", "title": "" }, { "docid": "bf3f22a784095d546d2d371110e37769", "score": "0.60755396", "text": "function ModificarFichaTecnicaBasica()\n\t{\n\t\t/*Creamos una query sencilla*/ \n\t\t$sql=\"update FichaTecnica \n\t\t\t\tset referenciaBaseFichaTecnica = '$this->referenciaBaseFichaTecnica',\n\t\t\t\t\tnombreLargoFichaTecnica = '$this->nombreLargoFichaTecnica',\n\t\t\t\t\tnombreCortoFichaTecnica = '$this->nombreCortoFichaTecnica',\n\t\t\t\t\tcodigoAlternoFichaTecnica = '$this->codigoAlternoFichaTecnica',\n\t\t\t\t\tnumeroMoldeFichaTecnica = '$this->numeroMoldeFichaTecnica',\n\t\t\t\t\tareaMoldeFichaTecnica = '$this->areaMoldeFichaTecnica',\n\t\t\t\t\tdisenadorFichaTecnica = '$this->disenadorFichaTecnica',\n\t\t\t\t\tSegLogin_idUsuarioCrea = '$this->SegLogin_idUsuarioCrea',\n\t\t\t\t\tfechaCreacionFichaTecnica = '$this->fechaCreacionFichaTecnica',\n\t\t\t\t\tSegLogin_idUsuarioAprueba = '$this->SegLogin_idUsuarioAprueba',\n\t\t\t\t\tfechaAprobacionFichaTecnica = '$this->fechaAprobacionFichaTecnica',\n\t\t\t\t\tSegLogin_idUsuarioModifica = '$this->SegLogin_idUsuarioModifica',\n\t\t\t\t\tfechaModificacionFichaTecnica = '$this->fechaModificacionFichaTecnica',\n\t\t\t\t\testadoFichaTecnica = '$this->estadoFichaTecnica',\n\t\t\t\t\tconceptoTelaFichaTecnica = '$this->conceptoTelaFichaTecnica',\n\t\t\t\t\tTercero_idCliente = '$this->Tercero_idCliente',\n\t\t\t\t\tMarca_idMarca = '$this->Marca_idMarca',\n\t\t\t\t\treferenciaClienteFichaTecnica = '$this->referenciaClienteFichaTecnica',\n\t\t\t\t\tTipoNegocio_idTipoNegocio = '$this->TipoNegocio_idTipoNegocio',\n\t\t\t\t\tTipoProducto_idTipoProducto = '$this->TipoProducto_idTipoProducto',\n\t\t\t\t\tTemporada_idTemporada = '$this->Temporada_idTemporada',\n\t\t\t\t\tEstadoConservacion_idEstadoConservacion = '$this->EstadoConservacion_idEstadoConservacion',\n\t\t\t\t\tCategoria_idCategoria = '$this->Categoria_idCategoria',\n\t\t\t\t\tCaracteristicasHilaza_idCaracteristicasHilaza = '$this->CaracteristicasHilaza_idCaracteristicasHilaza',\n\t\t\t\t\tUnidadMedida_idCompra = '$this->UnidadMedida_idCompra',\n\t\t\t\t\tUnidadMedida_idVenta = '$this->UnidadMedida_idVenta',\n\t\t\t\t\tPais_idPais = '$this->Pais_idPais',\n\t\t\t\t\tDescripcionBase_idDescripcionBase = '$this->DescripcionBase_idDescripcionBase',\n\t\t\t\t\tConstruccionHilo_idContruccionHilo = '$this->ConstruccionHilo_idContruccionHilo',\n\t\t\t\t\tClienteObjetivo_idClienteObjetivo = '$this->ClienteObjetivo_idClienteObjetivo',\n EsquemaProducto_idEsquemaProducto = '$this->EsquemaProducto_idEsquemaProducto',\n\t\t\t\t\tClima_idClima = '$this->Clima_idClima', \n\t\t\t\t\tDifusion_idDifusion = '$this->Difusion_idDifusion', \n\t\t\t\t\tEstrategia_idEstrategia = '$this->Estrategia_idEstrategia', \n\t\t\t\t\tSeccion_idSeccion = '$this->Seccion_idSeccion', \n\t\t\t\t\tEvento_idEvento = '$this->Evento_idEvento',\n\t\t\t\t\tPosicionArancelaria_idPosicionArancelaria = '$this->PosicionArancelaria_idPosicionArancelaria',\n\t\t\t\t\tobservacionesFichaTecnica = '$this->observacionesFichaTecnica',\n\t\t\t\t\tobservacionCotizacionFichaTecnica = '$this->observacionCotizacionFichaTecnica',\n\t\t\t\t\tobservacionConstruccionFichaTecnica = '$this->observacionConstruccionFichaTecnica',\n\t\t\t\t\tComposicion_idComposicion = '$this->Composicion_idComposicion',\n\t\t\t\t\timagenMedida1FichaTecnica = '$this->imagenMedida1FichaTecnica',\n\t\t\t\t\timagenMedida2FichaTecnica = '$this->imagenMedida2FichaTecnica'\n\t\t\t\twhere idFichaTecnica = $this->idFichaTecnica\"; \n\t\t \n\t\t/*Ejecutamos la query*/ \n\t\t//echo $sql;\n\t\t$bd = Db::getInstance();\n\t\t$query = $bd->ejecutar($sql); \n\t\t\n\t\t// ELIMINAMOS LOS COLORES PARA LUEGO INSERTARLOS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaColor(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t$total=count($this->idFichaTecnicaColor);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaColor($this->idFichaTecnica, $i);\n\t\t}\n\n\n\t\t// ELIMINAMOS LAS TALLAS PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaTalla(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t$total=count($this->idFichaTecnicaTalla);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaTalla($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n\t\t// ELIMINAMOS LAS TALLAS COMPLEMENTOS PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaTallaComplemento(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t$this->AdicionarFichaTecnicaTallaComplemento();\n\t\t\n\n\t\t// ELIMINAMOS LAS IMAGENES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaImagen(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LAS IMAGENES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaImagen);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaImagen($this->idFichaTecnica, $i);\n\t\t}\n\n\t\t\n\t\t// ELIMINAMOS LOS DETALLES DE CONSTRUCCION PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaConstruccion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS DETALLES DE CONSTRUCCION\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaConstruccion);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaConstruccion($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n\t\t\n\t\t// ELIMINAMOS LAS ESPECIFICACIONES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaEspecificacion(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t\n\t\t/*\n\t\t\tGRABAMOS LAS ESPECIFICACIONES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaEspecificacion);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaEspecificacion($this->idFichaTecnica, $i);\n\t\t}\n\t\t\t\n\t\t// ELIMINAMOS LOS COMPONENTES PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaComponente(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS COMPONENTES\n\t\t*/\n\t\t$total=count($this->idFichaTecnicaComponente);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaComponente($this->idFichaTecnica, $i);\n\t\t}\n\t\t\n\t\t// ELIMINAMOS LOS MATERIALES DE EMPAQUE PARA LUEGO INSERTARLAS DE NUEVO CON LA INFORMACION DEL FORMULARIO\n\t\t$this->EliminarFichaTecnicaEmpaque(\"FichaTecnica_idFichaTecnica = $this->idFichaTecnica\");\n\t\t/*\n\t\t\tGRABAMOS LOS MATERIALES DE EMPAQUE\n\t\t*/\n\t\t/*$total=count($this->idFichaTecnicaEmpaque);\n\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$this->AdicionarFichaTecnicaEmpaque($this->idFichaTecnica, $i);\n\t\t}*/\n\t\t\n\t\treturn $query;\n }", "title": "" }, { "docid": "d01c2c421550870fac2877d108130019", "score": "0.6069417", "text": "function update(){\n \n // query \n $query = \"UPDATE `df_guia_recepcion` SET \t\n\t\t\t\t\t\t\t`df_repartidor_rec`= \".$this->df_repartidor_rec.\",\n\t\t\t\t\t\t\t`df_valor_recaudado`= \".$this->df_valor_recaudado.\",\n\t\t\t\t\t\t\t`df_valor_efectivo`= \".$this->df_valor_efectivo.\",\n\t\t\t\t\t\t\t`df_valor_cheque`= \".$this->df_valor_cheque.\",\n\t\t\t\t\t\t\t`df_retenciones`= \".$this->df_retenciones.\",\n\t\t\t\t\t\t\t`df_descuento_rec`= \".$this->df_descuento_rec.\",\n\t\t\t\t\t\t\t`df_diferencia_rec`= \".$this->df_diferencia_rec.\",\n\t\t\t\t\t\t\t`df_remision_rec`= \".$this->df_remision_rec.\",\n\t\t\t\t\t\t\t`df_entrega_rec`= \".$this->df_entrega_rec.\",\n\t\t\t\t\t\t\t`df_num_guia`= \".$this->df_num_guia.\",\n\t\t\t\t\t\t\t`df_modificadoBy_rec`= \".$this->df_modificadoBy_rec.\",\n\t\t\t\t\t\t\t`df_edo_factura_rec`= \".$this->df_edo_factura_rec.\"\n\t\t\t\t\t\tWHERE `df_guia_recepcion`= \".$this->df_guia_recepcion;\n\n // prepara la sentencia del query\n $stmt = $this->conn->prepare($query);\n \n // execute query\n if($stmt->execute()){\n return true;\n }else{\n return false;\n } \n \n }", "title": "" }, { "docid": "7f6ffe1454844a5c0777bdb87f750a21", "score": "0.606373", "text": "function profuturo(){\n $myssql=new myssql;\n $myssql->table=\"cartera\";\n $myssql->params['prospecto']=3;\n $myssql->where['id']=$this->post['id'];\n $myssql->FilterParams();\n $myssql->update();\n $this->response_json(\"Cliente ha sido movido a profuturo\");\n }", "title": "" }, { "docid": "151dc4d04c2530b2d98778a4ca422523", "score": "0.6052996", "text": "function ModificarFichaTecnicaCostoEstandar()\n\t{ \n\t\t/*Creamos una query sencilla*/ \n\t\t$sql=\"update FichaTecnica \n\t\t\t\tset samCosteoFichaTecnica = '$this->samCosteoFichaTecnica',\n\t\t\t\t\tcostoMaterialFichaTecnica = $this->costoMaterialFichaTecnica,\n\t\t\t\t\tcostoProcesoFichaTecnica = $this->costoProcesoFichaTecnica,\n\t\t\t\t\tcostoMOFichaTecnica = $this->costoMOFichaTecnica,\n\t\t\t\t\tcostoPrimoFichaTecnica = $this->costoPrimoFichaTecnica,\n\t\t\t\t\tcostoCIFFichaTecnica = $this->costoCIFFichaTecnica,\n\t\t\t\t\tsubtotalFichaTecnica = $this->subtotalFichaTecnica,\n\t\t\t\t\tcostoFijoFichaTecnica = $this->costoFijoFichaTecnica,\n\t\t\t\t\tcostoUnitarioFichaTecnica = $this->costoUnitarioFichaTecnica,\n\t\t\t\t\testadoCostoFichaTecnica = '$this->estadoCostoFichaTecnica',\n\t\t\t\t\tfechaAprobacionCostoFichaTecnica = '$this->fechaAprobacionCostoFichaTecnica',\n\t\t\t\t\ttasaCambioCostoFichaTecnica = '$this->tasaCambioCostoFichaTecnica',\n\t\t\t\t\tobservacionCostosFichaTecnica = '$this->observacionCostosFichaTecnica',\n costoFichaTecnica = '$this->costoUnitarioFichaTecnica'\n\t\t\t\twhere idFichaTecnica = $this->idFichaTecnica\"; \n\t\t \n\t\t/*Ejecutamos la query*/ \n\t\t//echo $sql;\n\t\t$bd = Db::getInstance();\n\t\t$query = $bd->ejecutar($sql); \n \n\t\t/*Creamos un query para asignar el costo estandar en productos*/ \n $query2 =false; \n if($this->estadoCostoFichaTecnica == 'APROBADO')\n { \n /*Creamos un query para asignar el costo estandar en productos*/ \n $sql2= \"update Producto \n set costoEstandarProducto = '$this->costoUnitarioFichaTecnica'\n where FichaTecnica_idFichaTecnica = $this->idFichaTecnica\".\";\"; \n\n /*Ejecutamos la query*/ \n// echo $sql2;\n $bd = Db::getInstance();\n $query2 = $bd->ejecutar($sql2); \n }\n\t\t\n \n\t\t\t\t\n\t\t// actualizamos el costo de los materiales\n\t\t$total = isset($this->idFichaTecnicaMaterial[0]) ? count($this->idFichaTecnicaMaterial) : 0;\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$actualizacion = \"UPDATE FichaTecnicaMaterial\n\t\t\t\t\t\t\t\t SET\tcostoUnitarioAprobadoProductoMaterial = \". $this->costoUnitarioAprobadoProductoMaterial[$i].\"\n\t\t\t\t\t\t\t\t WHERE \tidFichaTecnicaMaterial = \".$this->idFichaTecnicaMaterial[$i] .\"; \";\n \n //echo '<br> actualizar costo '.$actualizacion;\n $bd = Db::getInstance();\n $query1 = $bd->ejecutar($actualizacion); \n\t\t}\n\t\t\n\t\t// actualizamos el costo de los procesos especiales\n\t\t$total = isset($this->idFichaTecnicaProceso[0]) ? count($this->idFichaTecnicaProceso) : 0;\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$actualizacion = \"UPDATE FichaTecnicaProceso\n\t\t\t\t\t\t\t\t SET\tcostoUnitarioAprobadoFichaTecnicaProceso = \". $this->costoUnitarioAprobadoFichaTecnicaProceso[$i].\"\n\t\t\t\t\t\t\t\t WHERE \tidFichaTecnicaProceso = \".$this->idFichaTecnicaProceso[$i] .\"; \";\n $bd = Db::getInstance();\n $query1 = $bd->ejecutar($actualizacion); \n\t\t}\n\t\t\n\t\t// actualizamos el costo de las operaciones de Mano de Obra\n\t\t$total = isset($this->idFichaTecnicaOperacion[0]) ? count($this->idFichaTecnicaOperacion) : 0;\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$actualizacion = \"UPDATE FichaTecnicaOperacion\n\t\t\t\t\t\t\t\t SET\tcostoUnitarioAprobadoFichaTecnicaOperacion = \". $this->costoUnitarioAprobadoFichaTecnicaOperacion[$i].\"\n\t\t\t\t\t\t\t\t WHERE \tidFichaTecnicaOperacion = \".$this->idFichaTecnicaOperacion[$i] .\"; \"; \n \n $bd = Db::getInstance();\n $query1 = $bd->ejecutar($actualizacion); \n\t\t}\n\t\t\n\t\t// actualizamos el costo de los costos indirectos\n\t\t$total = isset($this->idFichaTecnicaCostoIndirecto[0]) ? count($this->idFichaTecnicaCostoIndirecto) : 0;\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$actualizacion = \"UPDATE FichaTecnicaCostoIndirecto\n\t\t\t\t\t\t\t\t SET\tcostoUnitarioAprobadoFichaTecnicaCostoIndirecto = \". $this->costoUnitarioAprobadoFichaTecnicaCostoIndirecto[$i].\"\n\t\t\t\t\t\t\t\t WHERE \tidFichaTecnicaCostoIndirecto = \".$this->idFichaTecnicaCostoIndirecto[$i] .\"; \";\n $bd = Db::getInstance();\n $query1 = $bd->ejecutar($actualizacion); \n\t\t}\n\t\t\n\t\t// actualizamos el costo de los costos adicionales\n\t\t$total = isset($this->idFichaTecnicaCostoAdicional[0]) ? count($this->idFichaTecnicaCostoAdicional) : 0;\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$actualizacion = \"UPDATE FichaTecnicaCostoAdicional\n\t\t\t\t\t\t\t\t SET\tcostoUnitarioAprobadoFichaTecnicaCostoAdicional = \". $this->costoUnitarioAprobadoFichaTecnicaCostoAdicional[$i].\"\n\t\t\t\t\t\t\t\t WHERE \tidFichaTecnicaCostoAdicional = \".$this->idFichaTecnicaCostoAdicional[$i] .\"; \";\n $bd = Db::getInstance();\n $query1 = $bd->ejecutar($actualizacion); \n\t\t}\n\t\t\n\t\t// actualizamos el costo de los precios estimados\n\t\t$total = isset($this->idFichaTecnicaPrecioFicha[0]) ? count($this->idFichaTecnicaPrecioFicha) : 0;\n\t\tfor($i=0; $i < $total; $i++)\n\t\t{\n\t\t\t$actualizacion = \"UPDATE FichaTecnicaPrecioFicha\n\t\t\t\t\t\t\t\t SET\tprecioUnitarioAprobadoFichaTecnicaPrecioFicha = \". $this->precioUnitarioAprobadoFichaTecnicaPrecioFicha[$i].\"\n\t\t\t\t\t\t\t\t WHERE \tidFichaTecnicaPrecioFicha = \".$this->idFichaTecnicaPrecioFicha[$i] .\"; \";\n $bd = Db::getInstance();\n $query1 = $bd->ejecutar($actualizacion); \n\t\t}\n\t\t\n $this->EliminarFichaTecnicaCostoEstandarImagen(\"FichaTecnica_idFichaTecnica = \".$this->idFichaTecnica);\n\t\t$this->AdicionarFichaTecnicaCostoEstandarImagen();\n\t\t\n\t\treturn $query.$query1.$query2;\n }", "title": "" }, { "docid": "f29d0183e77e8b8be2b90f870392ccf3", "score": "0.60513693", "text": "public function devolverModelPro($codigo,$codenew,$precionuevo,$codigoProveedor){\n #-----------------------------------------------------\n$auto=\"AUTO\";\n$cero=0;\n$fecha=date(\"d/m/Y\");\n $stmt =Conexion::conectar()->prepare(\"UPDATE tdevoluciones SET estado= 'DEVUELTA', fecha_fin=:fecha WHERE tdevoluciones.codigo =:codigo\");\n\n\n#Para agregar la nueva bateriasAintercambio\n\n\n $stmt->bindParam(\":codigo\",$codigo,PDO::PARAM_STR);\n $stmt->bindParam(\":fecha\",$fecha,PDO::PARAM_STR);\n\n\n if($stmt->execute()){\n return 1;\n }\n else{ return 0;}\n\n $stmt->close();\n\n\n #-----------------------------------------------------\n }", "title": "" }, { "docid": "cd559ccd5d6a29fb5ea846104be9481c", "score": "0.6046413", "text": "public function alterar(Agendamento $agendamento){\n $sql = $this->pdo->prepare('update tb_anexos set id = :id, data_hora_inicio = :data_hora_inicio, data_hora_fim = :data_hora_fim, valor = :valor, observacao = :observacao, senha = :senha, cod_status = :cod_status, pago = :pago, id_not_email = : id_not_email, id_not_sms = :id_not_sms, id_convenio = :id:convenio, id_exames_agendamento = :id_exames_agendamento, id_secretaria = :id_secretaria, id_paciente = :id_paciente, id_medico = :id_medico ');\n $sql->bindValues(':id', $agendamento->getId());\n $sql->bindValues(':data_hora_inicio', $agendamento->getDataHoraInicio());\n $sql->bindValues(':data_hora_fim', $agendamento->getDataHoraFim());\n $sql->bindValues(':valor', $agendamento->getValor());\n $sql->bindValues(':observacao', $agendamento->getObservacao());\n $sql->bindValues(':senha', $agendamento->getSenha());\n $sql->bindValues(':cod_Status', $agendamento->getCod_Status());\n $sql->bindValues(':pago', $agendamento->getPago());\n $sql->bindValues(':id_secretaria', $agendamento->getId_Secretaria());\n $sql->bindValues(':id_paciente', $agendamento->getId_Paciente());\n $sql->bindValues(':id_medico', $agendamento->getId_Medico());\n \n if ($sql->execute()) {\n // Query succeeded.\n return true;\n } else {\n // Query failed.\n echo $sql->errorCode();\n }\n\n }", "title": "" }, { "docid": "b4e8fca216d7b139839a4d22969e6a25", "score": "0.6044432", "text": "public static function mdlActualizarTransportadora($tabla, $datos)\n {\n\n $stmt = Conexion::getConexionLocal()->prepare(\" UPDATE bandaTransportadora set marcaBandaTransportadora=:marcaBandaTransportadora, anchoBandaTransportadora=:anchoBandaTransportadora, noLonasBandaTransportadora=:noLonasBandaTransportadora, tipoLonaBandaTransportadora=:tipoLonaBandaTransportadora, espesorTotalBandaTransportadora=:espesorTotalBandaTransportadora, espesorCubiertaSuperiorTransportadora=:espesorCubiertaSuperiorTransportadora,\n espesorCojinTransportadora=:espesorCojinTransportadora, espesorCubiertaInferiorTransportadora=:espesorCubiertaInferiorTransportadora, tipoCubiertaTransportadora=:tipoCubiertaTransportadora, tipoEmpalmeTransportadora=:tipoEmpalmeTransportadora, estadoEmpalmeTransportadora=:estadoEmpalmeTransportadora, distanciaEntrePoleasBandaHorizontal=:distanciaEntrePoleasBandaHorizontal,\n inclinacionBandaHorizontal=:inclinacionBandaHorizontal, recorridoUtilTensorBandaHorizontal=:recorridoUtilTensorBandaHorizontal, longitudSinfinBandaHorizontal=:longitudSinfinBandaHorizontal, resistenciaRoturaLonaTransportadora=:resistenciaRoturaLonaTransportadora, localizacionTensorTransportadora=:localizacionTensorTransportadora, bandaReversible=:bandaReversible, bandaDeArrastre=:bandaDeArrastre,\n velocidadBandaHorizontal=:velocidadBandaHorizontal, marcaBandaHorizontalAnterior=:marcaBandaHorizontalAnterior, anchoBandaHorizontalAnterior=:anchoBandaHorizontalAnterior, noLonasBandaHorizontalAnterior=:noLonasBandaHorizontalAnterior, tipoLonaBandaHorizontalAnterior=:tipoLonaBandaHorizontalAnterior, espesorTotalBandaHorizontalAnterior=:espesorTotalBandaHorizontalAnterior,\n espesorCubiertaSuperiorBandaHorizontalAnterior=:espesorCubiertaSuperiorBandaHorizontalAnterior, espesorCubiertaInferiorBandaHorizontalAnterior=:espesorCubiertaInferiorBandaHorizontalAnterior, espesorCojinBandaHorizontalAnterior=:espesorCojinBandaHorizontalAnterior, tipoEmpalmeBandaHorizontalAnterior=:tipoEmpalmeBandaHorizontalAnterior, resistenciaRoturaLonaBandaHorizontalAnterior=:resistenciaRoturaLonaBandaHorizontalAnterior,\n tipoCubiertaBandaHorizontalAnterior=:tipoCubiertaBandaHorizontalAnterior, tonsTransportadasBandaHoizontalAnterior=:tonsTransportadasBandaHoizontalAnterior, causaFallaCambioBandaHorizontal=:causaFallaCambioBandaHorizontal, diametroPoleaColaTransportadora=:diametroPoleaColaTransportadora, anchoPoleaColaTransportadora=:anchoPoleaColaTransportadora, tipoPoleaColaTransportadora=:tipoPoleaColaTransportadora,\n largoEjePoleaColaTransportadora=:largoEjePoleaColaTransportadora, diametroEjePoleaColaHorizontal=:diametroEjePoleaColaHorizontal, icobandasCentradaPoleaColaTransportadora=:icobandasCentradaPoleaColaTransportadora, anguloAmarrePoleaColaTransportadora=:anguloAmarrePoleaColaTransportadora, estadoRvtoPoleaColaTransportadora=:estadoRvtoPoleaColaTransportadora,\n tipoTransicionPoleaColaTransportadora=:tipoTransicionPoleaColaTransportadora, distanciaTransicionPoleaColaTransportadora=:distanciaTransicionPoleaColaTransportadora, longitudTensorTornilloPoleaColaTransportadora=:longitudTensorTornilloPoleaColaTransportadora, longitudRecorridoContrapesaPoleaColaTransportadora=:longitudRecorridoContrapesaPoleaColaTransportadora, guardaPoleaColaTransportadora=:guardaPoleaColaTransportadora,\n hayDesviador=:hayDesviador, elDesviadorBascula=:elDesviadorBascula, presionUniformeALoAnchoDeLaBanda=:presionUniformeALoAnchoDeLaBanda, cauchoVPlow=:cauchoVPlow, anchoVPlow=:anchoVPlow, espesorVPlow=:espesorVPlow, tipoRevestimientoTolvaCarga=:tipoRevestimientoTolvaCarga, estadoRevestimientoTolvaCarga=:estadoRevestimientoTolvaCarga, duracionPromedioRevestimiento=:duracionPromedioRevestimiento,\n deflectores=:deflectores, altureCaida=:altureCaida, longitudImpacto=:longitudImpacto, material=:material, anguloSobreCarga=:anguloSobreCarga, ataqueQuimicoTransportadora=:ataqueQuimicoTransportadora, ataqueTemperaturaTransportadora=:ataqueTemperaturaTransportadora, ataqueAceiteTransportadora=:ataqueAceiteTransportadora, ataqueImpactoTransportadora=:ataqueImpactoTransportadora, capacidadTransportadora=:capacidadTransportadora,\n horasTrabajoPorDiaTransportadora=:horasTrabajoPorDiaTransportadora, diasTrabajPorSemanaTransportadora=:diasTrabajPorSemanaTransportadora, alimentacionCentradaTransportadora=:alimentacionCentradaTransportadora, abrasividadTransportadora=:abrasividadTransportadora, porcentajeFinosTransportadora=:porcentajeFinosTransportadora, maxGranulometriaTransportadora=:maxGranulometriaTransportadora,\n maxPesoTransportadora=:maxPesoTransportadora, densidadTransportadora=:densidadTransportadora, tempMaximaMaterialSobreBandaTransportadora=:tempMaximaMaterialSobreBandaTransportadora, tempPromedioMaterialSobreBandaTransportadora=:tempPromedioMaterialSobreBandaTransportadora, fugaDeMaterialesEnLaColaDelChute=:fugaDeMaterialesEnLaColaDelChute, fugaDeMaterialesPorLosCostados=:fugaDeMaterialesPorLosCostados,\n fugaMateriales=:fugaMateriales, cajaColaDeTolva=:cajaColaDeTolva, fugaDeMaterialParticulaALaSalidaDelChute=:fugaDeMaterialParticulaALaSalidaDelChute, anchoChute=:anchoChute, largoChute=:largoChute, alturaChute=:alturaChute, abrazadera=:abrazadera, cauchoGuardabandas=:cauchoGuardabandas, triSealMultiSeal=:triSealMultiSeal, espesorGuardaBandas=:espesorGuardaBandas, anchoGuardaBandas=:anchoGuardaBandas,\n largoGuardaBandas=:largoGuardaBandas, protectorGuardaBandas=:protectorGuardaBandas, cortinaAntiPolvo1=:cortinaAntiPolvo1, cortinaAntiPolvo2=:cortinaAntiPolvo2, cortinaAntiPolvo3=:cortinaAntiPolvo3, boquillasCanonesDeAire=:boquillasCanonesDeAire, tempAmbienteMaxTransportadora=:tempAmbienteMaxTransportadora, tempAmbienteMinTransportadora=:tempAmbienteMinTransportadora, tieneRodillosImpacto=:tieneRodillosImpacto,\n camaImpacto=:camaImpacto, camaSellado=:camaSellado, basculaPesaje=:basculaPesaje, rodilloCarga=:rodilloCarga, rodilloImpacto=:rodilloImpacto, basculaASGCO=:basculaASGCO, barraImpacto=:barraImpacto, barraDeslizamiento=:barraDeslizamiento, espesorUHMV=:espesorUHMV, anchoBarra=:anchoBarra, largoBarra=:largoBarra, anguloAcanalamientoArtesa1=:anguloAcanalamientoArtesa1, anguloAcanalamientoArtesa2=:anguloAcanalamientoArtesa2,\n anguloAcanalamientoArtesa3=:anguloAcanalamientoArtesa3, anguloAcanalamientoArtesa1AntesPoleaMotriz=:anguloAcanalamientoArtesa1AntesPoleaMotriz, anguloAcanalamientoArtesa2AntesPoleaMotriz=:anguloAcanalamientoArtesa2AntesPoleaMotriz, anguloAcanalamientoArtesa3AntesPoleaMotriz=:anguloAcanalamientoArtesa3AntesPoleaMotriz, integridadSoportesRodilloImpacto=:integridadSoportesRodilloImpacto,\n materialAtrapadoEntreCortinas=:materialAtrapadoEntreCortinas, materialAtrapadoEntreGuardabandas=:materialAtrapadoEntreGuardabandas, materialAtrapadoEnBanda=:materialAtrapadoEnBanda, integridadSoportesCamaImpacto=:integridadSoportesCamaImpacto, inclinacionZonaCargue=:inclinacionZonaCargue, sistemaAlineacionCarga=:sistemaAlineacionCarga, cantidadSistemaAlineacionEnCarga=:cantidadSistemaAlineacionEnCarga,\n sistemasAlineacionCargaFuncionando=:sistemasAlineacionCargaFuncionando, sistemaAlineacionEnRetorno=:sistemaAlineacionEnRetorno, cantidadSistemaAlineacionEnRetorno=:cantidadSistemaAlineacionEnRetorno, sistemasAlineacionRetornoFuncionando=:sistemasAlineacionRetornoFuncionando, sistemaAlineacionRetornoPlano=:sistemaAlineacionRetornoPlano, sistemaAlineacionArtesaCarga=:sistemaAlineacionArtesaCarga,\n sistemaAlineacionRetornoEnV=:sistemaAlineacionRetornoEnV, largoEjeRodilloCentralCarga=:largoEjeRodilloCentralCarga, diametroEjeRodilloCentralCarga=:diametroEjeRodilloCentralCarga, largoTuboRodilloCentralCarga=:largoTuboRodilloCentralCarga, largoEjeRodilloLateralCarga=:largoEjeRodilloLateralCarga, diametroEjeRodilloLateralCarga=:diametroEjeRodilloLateralCarga, diametroRodilloLateralCarga=:diametroRodilloLateralCarga,\n largoTuboRodilloLateralCarga=:largoTuboRodilloLateralCarga, tipoRodilloCarga=:tipoRodilloCarga, distanciaEntreArtesasCarga=:distanciaEntreArtesasCarga, anchoInternoChasisRodilloCarga=:anchoInternoChasisRodilloCarga, anchoExternoChasisRodilloCarga=:anchoExternoChasisRodilloCarga, anguloAcanalamientoArtesaCArga=:anguloAcanalamientoArtesaCArga, detalleRodilloCentralCarga=:detalleRodilloCentralCarga,\n detalleRodilloLateralCarg=:detalleRodilloLateralCarg, diametroPoleaMotrizTransportadora=:diametroPoleaMotrizTransportadora, anchoPoleaMotrizTransportadora=:anchoPoleaMotrizTransportadora, tipoPoleaMotrizTransportadora=:tipoPoleaMotrizTransportadora, largoEjePoleaMotrizTransportadora=:largoEjePoleaMotrizTransportadora, diametroEjeMotrizTransportadora=:diametroEjeMotrizTransportadora,\n icobandasCentraEnPoleaMotrizTransportadora=:icobandasCentraEnPoleaMotrizTransportadora, anguloAmarrePoleaMotrizTransportadora=:anguloAmarrePoleaMotrizTransportadora, estadoRevestimientoPoleaMotrizTransportadora=:estadoRevestimientoPoleaMotrizTransportadora, tipoTransicionPoleaMotrizTransportadora=:tipoTransicionPoleaMotrizTransportadora,\n distanciaTransicionPoleaMotrizTransportadora=:distanciaTransicionPoleaMotrizTransportadora, potenciaMotorTransportadora=:potenciaMotorTransportadora, guardaPoleaMotrizTransportadora=:guardaPoleaMotrizTransportadora, anchoEstructura=:anchoEstructura, anchoTrayectoCarga=:anchoTrayectoCarga, pasarelaRespectoAvanceBanda=:pasarelaRespectoAvanceBanda, materialAlimenticioTransportadora=:materialAlimenticioTransportadora,\n materialAcidoTransportadora=:materialAcidoTransportadora, materialTempEntre80y150Transportadora=:materialTempEntre80y150Transportadora, materialSecoTransportadora=:materialSecoTransportadora, materialHumedoTransportadora=:materialHumedoTransportadora, materialAbrasivoFinoTransportadora=:materialAbrasivoFinoTransportadora, materialPegajosoTransportadora=:materialPegajosoTransportadora,\n materialGrasosoAceitosoTransportadora=:materialGrasosoAceitosoTransportadora, marcaLimpiadorPrimario=:marcaLimpiadorPrimario, referenciaLimpiadorPrimario=:referenciaLimpiadorPrimario, anchoCuchillaLimpiadorPrimario=:anchoCuchillaLimpiadorPrimario, altoCuchillaLimpiadorPrimario=:altoCuchillaLimpiadorPrimario, estadoCuchillaLimpiadorPrimario=:estadoCuchillaLimpiadorPrimario,\n estadoTensorLimpiadorPrimario=:estadoTensorLimpiadorPrimario, estadoTuboLimpiadorPrimario=:estadoTuboLimpiadorPrimario, frecuenciaRevisionCuchilla=:frecuenciaRevisionCuchilla, cuchillaEnContactoConBanda=:cuchillaEnContactoConBanda, marcaLimpiadorSecundario=:marcaLimpiadorSecundario, referenciaLimpiadorSecundario=:referenciaLimpiadorSecundario, anchoCuchillaLimpiadorSecundario=:anchoCuchillaLimpiadorSecundario,\n altoCuchillaLimpiadorSecundario=:altoCuchillaLimpiadorSecundario, estadoCuchillaLimpiadorSecundario=:estadoCuchillaLimpiadorSecundario, estadoTensorLimpiadorSecundario=:estadoTensorLimpiadorSecundario, estadoTuboLimpiadorSecundario=:estadoTuboLimpiadorSecundario, frecuenciaRevisionCuchilla1=:frecuenciaRevisionCuchilla1, cuchillaEnContactoConBanda1=:cuchillaEnContactoConBanda1, sistemaDribbleChute=:sistemaDribbleChute,\n marcaLimpiadorTerciario=:marcaLimpiadorTerciario, referenciaLimpiadorTerciario=:referenciaLimpiadorTerciario, anchoCuchillaLimpiadorTerciario=:anchoCuchillaLimpiadorTerciario, altoCuchillaLimpiadorTerciario=:altoCuchillaLimpiadorTerciario, estadoCuchillaLimpiadorTerciario=:estadoCuchillaLimpiadorTerciario, estadoTensorLimpiadorTerciario=:estadoTensorLimpiadorTerciario, estadoTuboLimpiadorTerciario=:estadoTuboLimpiadorTerciario,\n frecuenciaRevisionCuchilla2=:frecuenciaRevisionCuchilla2, cuchillaEnContactoConBanda2=:cuchillaEnContactoConBanda2, estadoRodilloRetorno=:estadoRodilloRetorno, largoEjeRodilloRetorno=:largoEjeRodilloRetorno, diametroEjeRodilloRetorno=:diametroEjeRodilloRetorno, diametroRodilloRetorno=:diametroRodilloRetorno, largoTuboRodilloRetorno=:largoTuboRodilloRetorno, tipoRodilloRetorno=:tipoRodilloRetorno,\n distanciaEntreRodillosRetorno=:distanciaEntreRodillosRetorno, anchoInternoChasisRetorno=:anchoInternoChasisRetorno, anchoExternoChasisRetorno=:anchoExternoChasisRetorno, detalleRodilloRetorno=:detalleRodilloRetorno, diametroPoleaAmarrePoleaMotriz=:diametroPoleaAmarrePoleaMotriz, anchoPoleaAmarrePoleaMotriz=:anchoPoleaAmarrePoleaMotriz, tipoPoleaAmarrePoleaMotriz=:tipoPoleaAmarrePoleaMotriz,\n largoEjePoleaAmarrePoleaMotriz=:largoEjePoleaAmarrePoleaMotriz, diametroEjePoleaAmarrePoleaMotriz=:diametroEjePoleaAmarrePoleaMotriz, icobandasCentradaPoleaAmarrePoleaMotriz=:icobandasCentradaPoleaAmarrePoleaMotriz, estadoRevestimientoPoleaAmarrePoleaMotriz=:estadoRevestimientoPoleaAmarrePoleaMotriz, dimetroPoleaAmarrePoleaCola=:dimetroPoleaAmarrePoleaCola, anchoPoleaAmarrePoleaCola=:anchoPoleaAmarrePoleaCola,\n largoEjePoleaAmarrePoleaCola=:largoEjePoleaAmarrePoleaCola, tipoPoleaAmarrePoleaCola=:tipoPoleaAmarrePoleaCola, diametroEjePoleaAmarrePoleaCola=:diametroEjePoleaAmarrePoleaCola, icobandasCentradaPoleaAmarrePoleaCola=:icobandasCentradaPoleaAmarrePoleaCola, estadoRevestimientoPoleaAmarrePoleaCola=:estadoRevestimientoPoleaAmarrePoleaCola, diametroPoleaTensora=:diametroPoleaTensora,\n anchoPoleaTensora=:anchoPoleaTensora, tipoPoleaTensora=:tipoPoleaTensora, largoEjePoleaTensora=:largoEjePoleaTensora, diametroEjePoleaTensora=:diametroEjePoleaTensora, icobandasCentradaEnPoleaTensora=:icobandasCentradaEnPoleaTensora, recorridoPoleaTensora=:recorridoPoleaTensora, estadoRevestimientoPoleaTensora=:estadoRevestimientoPoleaTensora, tipoTransicionPoleaTensora=:tipoTransicionPoleaTensora,\n distanciaTransicionPoleaColaTensora=:distanciaTransicionPoleaColaTensora, potenciaMotorPoleaTensora=:potenciaMotorPoleaTensora, guardaPoleaTensora=:guardaPoleaTensora, puertasInspeccion=:puertasInspeccion, guardaRodilloRetornoPlano=:guardaRodilloRetornoPlano, guardaTruTrainer=:guardaTruTrainer, guardaPoleaDeflectora=:guardaPoleaDeflectora, guardaZonaDeTransito=:guardaZonaDeTransito, guardaMotores=:guardaMotores,\n guardaCadenas=:guardaCadenas, guardaCorreas=:guardaCorreas, interruptoresDeSeguridad=:interruptoresDeSeguridad, sirenasDeSeguridad=:sirenasDeSeguridad, guardaRodilloRetornoV=:guardaRodilloRetornoV, diametroRodilloCentralCarga=:diametroRodilloCentralCarga, tipoRodilloImpacto=:tipoRodilloImpacto, integridadSoporteCamaSellado=:integridadSoporteCamaSellado, ataqueAbrasivoTransportadora=:ataqueAbrasivoTransportadora,\n observacionRegistroTransportadora=:observacionRegistroTransportadora where idRegistro=:idRegistro\");\n\n $stmt->bindParam(\":idRegistro\", $datos[\"idRegistro\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaBandaTransportadora\", $datos[\"marcaBandaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoBandaTransportadora\", $datos[\"anchoBandaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":noLonasBandaTransportadora\", $datos[\"noLonasBandaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoLonaBandaTransportadora\", $datos[\"tipoLonaBandaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorTotalBandaTransportadora\", $datos[\"espesorTotalBandaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaSuperiorTransportadora\", $datos[\"espesorCubiertaSuperiorTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCojinTransportadora\", $datos[\"espesorCojinTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaInferiorTransportadora\", $datos[\"espesorCubiertaInferiorTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoCubiertaTransportadora\", $datos[\"tipoCubiertaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoEmpalmeTransportadora\", $datos[\"tipoEmpalmeTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoEmpalmeTransportadora\", $datos[\"estadoEmpalmeTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaEntrePoleasBandaHorizontal\", $datos[\"distanciaEntrePoleasBandaHorizontal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":inclinacionBandaHorizontal\", $datos[\"inclinacionBandaHorizontal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":recorridoUtilTensorBandaHorizontal\", $datos[\"recorridoUtilTensorBandaHorizontal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":longitudSinfinBandaHorizontal\", $datos[\"longitudSinfinBandaHorizontal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":resistenciaRoturaLonaTransportadora\", $datos[\"resistenciaRoturaLonaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":localizacionTensorTransportadora\", $datos[\"localizacionTensorTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":bandaReversible\", $datos[\"bandaReversible\"], PDO::PARAM_STR);\n $stmt->bindParam(\":bandaDeArrastre\", $datos[\"bandaDeArrastre\"], PDO::PARAM_STR);\n $stmt->bindParam(\":velocidadBandaHorizontal\", $datos[\"velocidadBandaHorizontal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaBandaHorizontalAnterior\", $datos[\"marcaBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoBandaHorizontalAnterior\", $datos[\"anchoBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":noLonasBandaHorizontalAnterior\", $datos[\"noLonasBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoLonaBandaHorizontalAnterior\", $datos[\"tipoLonaBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorTotalBandaHorizontalAnterior\", $datos[\"espesorTotalBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaSuperiorBandaHorizontalAnterior\", $datos[\"espesorCubiertaSuperiorBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaInferiorBandaHorizontalAnterior\", $datos[\"espesorCubiertaInferiorBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCojinBandaHorizontalAnterior\", $datos[\"espesorCojinBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoEmpalmeBandaHorizontalAnterior\", $datos[\"tipoEmpalmeBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":resistenciaRoturaLonaBandaHorizontalAnterior\", $datos[\"resistenciaRoturaLonaBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoCubiertaBandaHorizontalAnterior\", $datos[\"tipoCubiertaBandaHorizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tonsTransportadasBandaHoizontalAnterior\", $datos[\"tonsTransportadasBandaHoizontalAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":causaFallaCambioBandaHorizontal\", $datos[\"causaFallaCambioBandaHorizontal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroPoleaColaTransportadora\", $datos[\"diametroPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPoleaColaTransportadora\", $datos[\"anchoPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoPoleaColaTransportadora\", $datos[\"tipoPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjePoleaColaTransportadora\", $datos[\"largoEjePoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjePoleaColaHorizontal\", $datos[\"diametroEjePoleaColaHorizontal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":icobandasCentradaPoleaColaTransportadora\", $datos[\"icobandasCentradaPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAmarrePoleaColaTransportadora\", $datos[\"anguloAmarrePoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRvtoPoleaColaTransportadora\", $datos[\"estadoRvtoPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoTransicionPoleaColaTransportadora\", $datos[\"tipoTransicionPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaTransicionPoleaColaTransportadora\", $datos[\"distanciaTransicionPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":longitudTensorTornilloPoleaColaTransportadora\", $datos[\"longitudTensorTornilloPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":longitudRecorridoContrapesaPoleaColaTransportadora\", $datos[\"longitudRecorridoContrapesaPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaPoleaColaTransportadora\", $datos[\"guardaPoleaColaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":hayDesviador\", $datos[\"hayDesviador\"], PDO::PARAM_STR);\n $stmt->bindParam(\":elDesviadorBascula\", $datos[\"elDesviadorBascula\"], PDO::PARAM_STR);\n $stmt->bindParam(\":presionUniformeALoAnchoDeLaBanda\", $datos[\"presionUniformeALoAnchoDeLaBanda\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cauchoVPlow\", $datos[\"cauchoVPlow\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoVPlow\", $datos[\"anchoVPlow\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorVPlow\", $datos[\"espesorVPlow\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoRevestimientoTolvaCarga\", $datos[\"tipoRevestimientoTolvaCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRevestimientoTolvaCarga\", $datos[\"estadoRevestimientoTolvaCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":duracionPromedioRevestimiento\", $datos[\"duracionPromedioRevestimiento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":deflectores\", $datos[\"deflectores\"], PDO::PARAM_STR);\n $stmt->bindParam(\":altureCaida\", $datos[\"altureCaida\"], PDO::PARAM_STR);\n $stmt->bindParam(\":longitudImpacto\", $datos[\"longitudImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":material\", $datos[\"material\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloSobreCarga\", $datos[\"anguloSobreCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueQuimicoTransportadora\", $datos[\"ataqueQuimicoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueTemperaturaTransportadora\", $datos[\"ataqueTemperaturaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueAceiteTransportadora\", $datos[\"ataqueAceiteTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueImpactoTransportadora\", $datos[\"ataqueImpactoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":capacidadTransportadora\", $datos[\"capacidadTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":horasTrabajoPorDiaTransportadora\", $datos[\"horasTrabajoPorDiaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diasTrabajPorSemanaTransportadora\", $datos[\"diasTrabajPorSemanaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":alimentacionCentradaTransportadora\", $datos[\"alimentacionCentradaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":abrasividadTransportadora\", $datos[\"abrasividadTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":porcentajeFinosTransportadora\", $datos[\"porcentajeFinosTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":maxGranulometriaTransportadora\", $datos[\"maxGranulometriaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":maxPesoTransportadora\", $datos[\"maxPesoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":densidadTransportadora\", $datos[\"densidadTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempMaximaMaterialSobreBandaTransportadora\", $datos[\"tempMaximaMaterialSobreBandaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempPromedioMaterialSobreBandaTransportadora\", $datos[\"tempPromedioMaterialSobreBandaTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fugaDeMaterialesEnLaColaDelChute\", $datos[\"fugaDeMaterialesEnLaColaDelChute\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fugaDeMaterialesPorLosCostados\", $datos[\"fugaDeMaterialesPorLosCostados\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fugaMateriales\", $datos[\"fugaMateriales\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cajaColaDeTolva\", $datos[\"cajaColaDeTolva\"], PDO::PARAM_STR);\n $stmt->bindParam(\":fugaDeMaterialParticulaALaSalidaDelChute\", $datos[\"fugaDeMaterialParticulaALaSalidaDelChute\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoChute\", $datos[\"anchoChute\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoChute\", $datos[\"largoChute\"], PDO::PARAM_STR);\n $stmt->bindParam(\":alturaChute\", $datos[\"alturaChute\"], PDO::PARAM_STR);\n $stmt->bindParam(\":abrazadera\", $datos[\"abrazadera\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cauchoGuardabandas\", $datos[\"cauchoGuardabandas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":triSealMultiSeal\", $datos[\"triSealMultiSeal\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorGuardaBandas\", $datos[\"espesorGuardaBandas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoGuardaBandas\", $datos[\"anchoGuardaBandas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoGuardaBandas\", $datos[\"largoGuardaBandas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":protectorGuardaBandas\", $datos[\"protectorGuardaBandas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cortinaAntiPolvo1\", $datos[\"cortinaAntiPolvo1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cortinaAntiPolvo2\", $datos[\"cortinaAntiPolvo2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cortinaAntiPolvo3\", $datos[\"cortinaAntiPolvo3\"], PDO::PARAM_STR);\n $stmt->bindParam(\":boquillasCanonesDeAire\", $datos[\"boquillasCanonesDeAire\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempAmbienteMaxTransportadora\", $datos[\"tempAmbienteMaxTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempAmbienteMinTransportadora\", $datos[\"tempAmbienteMinTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tieneRodillosImpacto\", $datos[\"tieneRodillosImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":camaImpacto\", $datos[\"camaImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":camaSellado\", $datos[\"camaSellado\"], PDO::PARAM_STR);\n $stmt->bindParam(\":basculaPesaje\", $datos[\"basculaPesaje\"], PDO::PARAM_STR);\n $stmt->bindParam(\":rodilloCarga\", $datos[\"rodilloCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":rodilloImpacto\", $datos[\"rodilloImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":basculaASGCO\", $datos[\"basculaASGCO\"], PDO::PARAM_STR);\n $stmt->bindParam(\":barraImpacto\", $datos[\"barraImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":barraDeslizamiento\", $datos[\"barraDeslizamiento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorUHMV\", $datos[\"espesorUHMV\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoBarra\", $datos[\"anchoBarra\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoBarra\", $datos[\"largoBarra\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAcanalamientoArtesa1\", $datos[\"anguloAcanalamientoArtesa1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAcanalamientoArtesa2\", $datos[\"anguloAcanalamientoArtesa2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAcanalamientoArtesa3\", $datos[\"anguloAcanalamientoArtesa3\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAcanalamientoArtesa1AntesPoleaMotriz\", $datos[\"anguloAcanalamientoArtesa1AntesPoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAcanalamientoArtesa2AntesPoleaMotriz\", $datos[\"anguloAcanalamientoArtesa2AntesPoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAcanalamientoArtesa3AntesPoleaMotriz\", $datos[\"anguloAcanalamientoArtesa3AntesPoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":integridadSoportesRodilloImpacto\", $datos[\"integridadSoportesRodilloImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialAtrapadoEntreCortinas\", $datos[\"materialAtrapadoEntreCortinas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialAtrapadoEntreGuardabandas\", $datos[\"materialAtrapadoEntreGuardabandas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialAtrapadoEnBanda\", $datos[\"materialAtrapadoEnBanda\"], PDO::PARAM_STR);\n $stmt->bindParam(\":integridadSoportesCamaImpacto\", $datos[\"integridadSoportesCamaImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":inclinacionZonaCargue\", $datos[\"inclinacionZonaCargue\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemaAlineacionCarga\", $datos[\"sistemaAlineacionCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cantidadSistemaAlineacionEnCarga\", $datos[\"cantidadSistemaAlineacionEnCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemasAlineacionCargaFuncionando\", $datos[\"sistemasAlineacionCargaFuncionando\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemaAlineacionEnRetorno\", $datos[\"sistemaAlineacionEnRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cantidadSistemaAlineacionEnRetorno\", $datos[\"cantidadSistemaAlineacionEnRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemasAlineacionRetornoFuncionando\", $datos[\"sistemasAlineacionRetornoFuncionando\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemaAlineacionRetornoPlano\", $datos[\"sistemaAlineacionRetornoPlano\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemaAlineacionArtesaCarga\", $datos[\"sistemaAlineacionArtesaCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemaAlineacionRetornoEnV\", $datos[\"sistemaAlineacionRetornoEnV\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjeRodilloCentralCarga\", $datos[\"largoEjeRodilloCentralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjeRodilloCentralCarga\", $datos[\"diametroEjeRodilloCentralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoTuboRodilloCentralCarga\", $datos[\"largoTuboRodilloCentralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjeRodilloLateralCarga\", $datos[\"largoEjeRodilloLateralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjeRodilloLateralCarga\", $datos[\"diametroEjeRodilloLateralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroRodilloLateralCarga\", $datos[\"diametroRodilloLateralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoTuboRodilloLateralCarga\", $datos[\"largoTuboRodilloLateralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoRodilloCarga\", $datos[\"tipoRodilloCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaEntreArtesasCarga\", $datos[\"distanciaEntreArtesasCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoInternoChasisRodilloCarga\", $datos[\"anchoInternoChasisRodilloCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoExternoChasisRodilloCarga\", $datos[\"anchoExternoChasisRodilloCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAcanalamientoArtesaCArga\", $datos[\"anguloAcanalamientoArtesaCArga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":detalleRodilloCentralCarga\", $datos[\"detalleRodilloCentralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":detalleRodilloLateralCarg\", $datos[\"detalleRodilloLateralCarg\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroPoleaMotrizTransportadora\", $datos[\"diametroPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPoleaMotrizTransportadora\", $datos[\"anchoPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoPoleaMotrizTransportadora\", $datos[\"tipoPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjePoleaMotrizTransportadora\", $datos[\"largoEjePoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjeMotrizTransportadora\", $datos[\"diametroEjeMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":icobandasCentraEnPoleaMotrizTransportadora\", $datos[\"icobandasCentraEnPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anguloAmarrePoleaMotrizTransportadora\", $datos[\"anguloAmarrePoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRevestimientoPoleaMotrizTransportadora\", $datos[\"estadoRevestimientoPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoTransicionPoleaMotrizTransportadora\", $datos[\"tipoTransicionPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaTransicionPoleaMotrizTransportadora\", $datos[\"distanciaTransicionPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":potenciaMotorTransportadora\", $datos[\"potenciaMotorTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaPoleaMotrizTransportadora\", $datos[\"guardaPoleaMotrizTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoEstructura\", $datos[\"anchoEstructura\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoTrayectoCarga\", $datos[\"anchoTrayectoCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":pasarelaRespectoAvanceBanda\", $datos[\"pasarelaRespectoAvanceBanda\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialAlimenticioTransportadora\", $datos[\"materialAlimenticioTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialAcidoTransportadora\", $datos[\"materialAcidoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialTempEntre80y150Transportadora\", $datos[\"materialTempEntre80y150Transportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialSecoTransportadora\", $datos[\"materialSecoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialHumedoTransportadora\", $datos[\"materialHumedoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialAbrasivoFinoTransportadora\", $datos[\"materialAbrasivoFinoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialPegajosoTransportadora\", $datos[\"materialPegajosoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialGrasosoAceitosoTransportadora\", $datos[\"materialGrasosoAceitosoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaLimpiadorPrimario\", $datos[\"marcaLimpiadorPrimario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":referenciaLimpiadorPrimario\", $datos[\"referenciaLimpiadorPrimario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoCuchillaLimpiadorPrimario\", $datos[\"anchoCuchillaLimpiadorPrimario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":altoCuchillaLimpiadorPrimario\", $datos[\"altoCuchillaLimpiadorPrimario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoCuchillaLimpiadorPrimario\", $datos[\"estadoCuchillaLimpiadorPrimario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoTensorLimpiadorPrimario\", $datos[\"estadoTensorLimpiadorPrimario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoTuboLimpiadorPrimario\", $datos[\"estadoTuboLimpiadorPrimario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":frecuenciaRevisionCuchilla\", $datos[\"frecuenciaRevisionCuchilla\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cuchillaEnContactoConBanda\", $datos[\"cuchillaEnContactoConBanda\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaLimpiadorSecundario\", $datos[\"marcaLimpiadorSecundario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":referenciaLimpiadorSecundario\", $datos[\"referenciaLimpiadorSecundario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoCuchillaLimpiadorSecundario\", $datos[\"anchoCuchillaLimpiadorSecundario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":altoCuchillaLimpiadorSecundario\", $datos[\"altoCuchillaLimpiadorSecundario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoCuchillaLimpiadorSecundario\", $datos[\"estadoCuchillaLimpiadorSecundario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoTensorLimpiadorSecundario\", $datos[\"estadoTensorLimpiadorSecundario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoTuboLimpiadorSecundario\", $datos[\"estadoTuboLimpiadorSecundario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":frecuenciaRevisionCuchilla1\", $datos[\"frecuenciaRevisionCuchilla1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cuchillaEnContactoConBanda1\", $datos[\"cuchillaEnContactoConBanda1\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sistemaDribbleChute\", $datos[\"sistemaDribbleChute\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaLimpiadorTerciario\", $datos[\"marcaLimpiadorTerciario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":referenciaLimpiadorTerciario\", $datos[\"referenciaLimpiadorTerciario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoCuchillaLimpiadorTerciario\", $datos[\"anchoCuchillaLimpiadorTerciario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":altoCuchillaLimpiadorTerciario\", $datos[\"altoCuchillaLimpiadorTerciario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoCuchillaLimpiadorTerciario\", $datos[\"estadoCuchillaLimpiadorTerciario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoTensorLimpiadorTerciario\", $datos[\"estadoTensorLimpiadorTerciario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoTuboLimpiadorTerciario\", $datos[\"estadoTuboLimpiadorTerciario\"], PDO::PARAM_STR);\n $stmt->bindParam(\":frecuenciaRevisionCuchilla2\", $datos[\"frecuenciaRevisionCuchilla2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cuchillaEnContactoConBanda2\", $datos[\"cuchillaEnContactoConBanda2\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRodilloRetorno\", $datos[\"estadoRodilloRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjeRodilloRetorno\", $datos[\"largoEjeRodilloRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjeRodilloRetorno\", $datos[\"diametroEjeRodilloRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroRodilloRetorno\", $datos[\"diametroRodilloRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoTuboRodilloRetorno\", $datos[\"largoTuboRodilloRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoRodilloRetorno\", $datos[\"tipoRodilloRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaEntreRodillosRetorno\", $datos[\"distanciaEntreRodillosRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoInternoChasisRetorno\", $datos[\"anchoInternoChasisRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoExternoChasisRetorno\", $datos[\"anchoExternoChasisRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":detalleRodilloRetorno\", $datos[\"detalleRodilloRetorno\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroPoleaAmarrePoleaMotriz\", $datos[\"diametroPoleaAmarrePoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPoleaAmarrePoleaMotriz\", $datos[\"anchoPoleaAmarrePoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoPoleaAmarrePoleaMotriz\", $datos[\"tipoPoleaAmarrePoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjePoleaAmarrePoleaMotriz\", $datos[\"largoEjePoleaAmarrePoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjePoleaAmarrePoleaMotriz\", $datos[\"diametroEjePoleaAmarrePoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":icobandasCentradaPoleaAmarrePoleaMotriz\", $datos[\"icobandasCentradaPoleaAmarrePoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRevestimientoPoleaAmarrePoleaMotriz\", $datos[\"estadoRevestimientoPoleaAmarrePoleaMotriz\"], PDO::PARAM_STR);\n $stmt->bindParam(\":dimetroPoleaAmarrePoleaCola\", $datos[\"dimetroPoleaAmarrePoleaCola\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPoleaAmarrePoleaCola\", $datos[\"anchoPoleaAmarrePoleaCola\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjePoleaAmarrePoleaCola\", $datos[\"largoEjePoleaAmarrePoleaCola\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoPoleaAmarrePoleaCola\", $datos[\"tipoPoleaAmarrePoleaCola\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjePoleaAmarrePoleaCola\", $datos[\"diametroEjePoleaAmarrePoleaCola\"], PDO::PARAM_STR);\n $stmt->bindParam(\":icobandasCentradaPoleaAmarrePoleaCola\", $datos[\"icobandasCentradaPoleaAmarrePoleaCola\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRevestimientoPoleaAmarrePoleaCola\", $datos[\"estadoRevestimientoPoleaAmarrePoleaCola\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroPoleaTensora\", $datos[\"diametroPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPoleaTensora\", $datos[\"anchoPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoPoleaTensora\", $datos[\"tipoPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjePoleaTensora\", $datos[\"largoEjePoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjePoleaTensora\", $datos[\"diametroEjePoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":icobandasCentradaEnPoleaTensora\", $datos[\"icobandasCentradaEnPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":recorridoPoleaTensora\", $datos[\"recorridoPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRevestimientoPoleaTensora\", $datos[\"estadoRevestimientoPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoTransicionPoleaTensora\", $datos[\"tipoTransicionPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaTransicionPoleaColaTensora\", $datos[\"distanciaTransicionPoleaColaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":potenciaMotorPoleaTensora\", $datos[\"potenciaMotorPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaPoleaTensora\", $datos[\"guardaPoleaTensora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":puertasInspeccion\", $datos[\"puertasInspeccion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaRodilloRetornoPlano\", $datos[\"guardaRodilloRetornoPlano\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaTruTrainer\", $datos[\"guardaTruTrainer\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaPoleaDeflectora\", $datos[\"guardaPoleaDeflectora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaZonaDeTransito\", $datos[\"guardaZonaDeTransito\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaMotores\", $datos[\"guardaMotores\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaCadenas\", $datos[\"guardaCadenas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaCorreas\", $datos[\"guardaCorreas\"], PDO::PARAM_STR);\n $stmt->bindParam(\":interruptoresDeSeguridad\", $datos[\"interruptoresDeSeguridad\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sirenasDeSeguridad\", $datos[\"sirenasDeSeguridad\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaRodilloRetornoV\", $datos[\"guardaRodilloRetornoV\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroRodilloCentralCarga\", $datos[\"diametroRodilloCentralCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoRodilloImpacto\", $datos[\"tipoRodilloImpacto\"], PDO::PARAM_STR);\n $stmt->bindParam(\":integridadSoporteCamaSellado\", $datos[\"integridadSoporteCamaSellado\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueAbrasivoTransportadora\", $datos[\"ataqueAbrasivoTransportadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":observacionRegistroTransportadora\", $datos[\"observacionRegistroTransportadora\"], PDO::PARAM_STR);\n\n if ($stmt->execute()) {\n return \"ok\";\n } else {\n return \"ERROR AL CREAR REGISTRO BANDA TRANSPORTADORA\";\n }\n\n $stmt->close();\n $stmt = null;\n }", "title": "" }, { "docid": "eddd9a8c70d44d9283b941317d880d41", "score": "0.6043289", "text": "function actualizaEstado(){\n $con = new Conexion();\n $sql = \"UPDATE solicitud SET estado_solicitud = '$this->estadoSol' WHERE id_solicitud = '$this->id;' \";\n $con->sql($sql);\n }", "title": "" }, { "docid": "bda5c7ab3afc7fb324d3eb5a9056b4d1", "score": "0.6026463", "text": "public static function doExecuteQuery() {\n\n\t\techo '<style type=\"text/css\">';\n\t\tHtml::doLoadCSS('styles');\n\t\techo '</style>';\n\n\t\t$query = Util::removeComments(self::getParameter('query'));\n\t\t$delimiter = self::getParameter('delimiter');\n\n\t\tif ($delimiter && strpos($query, $delimiter) !== false) {\n\t\t\t$queries = explode($delimiter, $query);\n\t\t}\n\t\telse {\n\t\t\t$queries = array($query);\n\t\t}\n\n\t\tif (!empty($queries)) {\n\n\t\t\t$db = self::getAdapter();\n\n\t\t\tif ($db === null) {\n\t\t\t die('Id da conexão não foi passado');\n\t\t\t}\n\n\t\t\tforeach ($queries as $sql) {\n\n\t\t\t\t$sql = trim($sql);\n\n\t\t\t\tif ($sql) {\n\n\t\t\t\t\t$aux = new PString(strtoupper(substr($sql, 0, 9)));\n\n\t\t\t\t\tif ($aux->startsWith('SELECT ', 'SHOW ', 'DESCRIBE ', 'DESC ')) {\n\n\t\t\t\t\t\t$fetch = $db->getPDO()->query($sql);\n\n\t\t\t\t\t\tif ($fetch !== false) {\n\n\t\t\t\t\t\t // TODO: implementar paginacao & Database.fetchPages\n\n\t\t\t\t\t\t\t$all = $fetch->fetchAll(PDO::FETCH_OBJ);\n\t\t\t\t\t\t\t$cols = !empty($all) ? array_keys(get_object_vars($all[0])) : [];\n\n\t\t\t\t\t\t\techo '<p>', Html::datagrid($all, $cols, $db), '</p>';\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tself::showError($db);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse if ($aux->startsWith('INSERT ', 'UPDATE ', 'DELETE ')) {\n\n\t\t\t\t\t\tif ($db->allowed()) {\n\n\t\t\t\t\t\t $rows = $db->getPDO()->exec($sql);\n\n\t\t\t\t\t\t if ($rows !== false) {\n printf('<p>%s rows affected.</p>', $rows);\n\t\t\t\t\t\t }\n\t\t\t\t\t\t else {\n\t\t\t\t\t\t self::showError($db);\n\t\t\t\t\t\t }\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo '<p>cannot execute DML commands in reserved schemas.</p>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\n\t\t\t\t\t\tif ($db->allowed()) {\n\n\t\t\t\t\t\t\t$rows = $db->getPDO()->exec($sql);\n\n\t\t\t\t\t\t\tif ($rows !== false) {\n\t\t\t\t\t\t\t echo \"<p>{$rows} rows affected.</p>\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tself::showError($db);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\techo '<p>cannot execute commands in reserved schemas.</p>';\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}\n\n\t}", "title": "" }, { "docid": "43f53c36821ba37d41c9c05662e9e501", "score": "0.6018635", "text": "public function updateTransaction($data){\n $executor = $this->user->getUsername();\n //$order_date = $data['order_date'] . ' ' . date(\"H:m:s\");\n //$order_price = $data['order_price'] + $data['ship_cod'] + $data['ship_lift'];\n $sql = \"update transaction set store_id = '\" . $data['store_id'] . \"',\" ;\n $sql.= \" description = '\" . $this->db->escape($data['description']) . \"',\" ;\n $sql.= \" order_user = '\" . $data['order_user'] . \"',\" ;\n $sql.= \" saled_ym = '\" . $data['saled_ym'] . \"',\" ;\n $sql.= \" order_price = '\" . $data['order_price'] . \"',\" ;\n $sql.= \" balance = '\" . $data['balance'] . \"',\" ;\n $sql.= \" weight_sum = '\" . $data['weight_sum'] . \"',\" ;\n //todo. allow to update order_date\n $sql.= \" order_date = concat('\" . $data['order_date'] .\"',substr(order_date,11,9)),\";\n $sql.= \" executor = '\" . $executor . \"',\";\n $sql.= \" payment = '\" . $data['payment'] . \"',\";\n $sql.= \" ship_method = '\" . $data['ship_method'] . \"',\";\n $sql.= \" cod = '\" . $data['ship_cod'] . \"',\";\n $sql.= \" lift = '\" . $data['ship_lift'] . \"',\";\n $sql.= \" status = '\" . $data['status'] . \"',\" ;\n $sql.= \" ship_appointment = '\" . $data['ship_appointment'] . \"',\";\n $sql.= \" shipto = '\" . $this->db->escape($data['shipto']) . \"',\";\n $sql.= \" discount = '\" . $data['discount'] . \"',\";\n $sql.= \" pc_date = '\" . $data['pc_date'] . \"',\";\n $sql.= \" post_check = '\" . $data['post_check'] . \"',\";\n $sql.= \" cur_check = '\" . $data['cur_check'] . \"',\";\n $sql.= \" cur_cash = '\" . $data['cur_cash'] . \"'\";\n $sql.= \" where txid = '\" . $data['txid'] . \"'\";\n //$this->log->aPrint( $sql ); exit;\n if($this->db->query($sql)){\n\t\t return true;\n\t\t}else{\n if( !$this->db->query($sql) ){\n $aErr = array();\n $aErr['key'] = $txid;\n $aErr['msg'] = $sql;\n $this->sendBesso($aErr);\n echo '<br/>Besso solve soon, sorry for disturbing<br/>';\n return false;\n }\n\t\t}\n }", "title": "" }, { "docid": "5ee48866ad08eeef79b28b0d74c4ceb3", "score": "0.6017392", "text": "private function dbRealizarModificacion($id)\r\n {\r\n if (!$this->formularioEnviado()) {\r\n return false;\r\n }\r\n\r\n if (trim($id) == '') {\r\n throw new Exception('Parametro id vacio en dbRealizarModificacion');\r\n }\r\n\r\n $id = $this->limpiarParaSql($id);\r\n\r\n $_POST = $this->limpiarParaSql($_POST);\r\n\r\n // foreach ($this->campos as $campo)\r\n foreach ($this->campo as &$campo) {\r\n // if ($campo->existeDato (\"joinTable\") and strtolower ($campo->getTipo ()) != strtolower ('dbCombo'))\r\n\r\n if ($campo->existeDato(\"joinTable\") and !($campo instanceof Campos_dbCombo)) {\r\n $tablas[] = $campo->getJoinTable();\r\n } else {\r\n $tablas[] = $this->tabla;\r\n }\r\n }\r\n\r\n $tablas = array_unique($tablas);\r\n\r\n foreach ($tablas as $tabla) {\r\n\r\n $sql = \"\";\r\n $camposSql = \"\";\r\n\r\n $sql = \"UPDATE \" . $tabla . $this->dbLink . \" SET \\n\";\r\n\r\n // por cada campo...\r\n // foreach ($this->campos as $campo)\r\n foreach ($this->campo as &$campo) {\r\n if (!$campo->existeDato(\"joinTable\")) {\r\n $campo->setJoinTable($this->tabla);\r\n }\r\n\r\n // if ($campo->getJoinTable () == $tabla or $campo->getTipo () == 'dbCombo')\r\n if ($campo->getJoinTable() == $tabla or ($campo instanceof Campos_dbCombo)) {\r\n\r\n if ($campo->isNoEditar() == TRUE or $campo->isNoMostrarEditar() == TRUE) {\r\n continue;\r\n }\r\n // if (!isset ($campo->getTipo()) or $campo->getTipo() == '' or $campo->getTipo() == 'upload')\r\n // {\r\n // continue;\r\n // }\r\n\r\n // if (!$campo->getTipo () or ($campo->getTipo () == 'upload' and $campo->isCargarEnBase () != true))\r\n if (!$campo->getTipo() or (($campo instanceof Campos_upload) and $campo->isCargarEnBase() != true)) {\r\n continue;\r\n } elseif (($campo instanceof Campos_upload) and $campo->isCargarEnBase() == true) {\r\n // if (isset ($campo['grabarSinExtencion']) and $campo['grabarSinExtencion'] == TRUE)\r\n if ($campo->isGrabarSinExtencion() == TRUE) {\r\n $partes_nombre = explode('.', $_FILES[$campo->getCampo()]['name']);\r\n $valor = $partes_nombre[0];\r\n } else {\r\n $valor = $_FILES[$campo->getCampo()]['name'];\r\n }\r\n\r\n // Iniciamos el upload del archivo\r\n if ($campo->getNombreArchivo() != \"\") {\r\n $campo->setNombreArchivo(str_replace(\"{{\", \"\\$_REQUEST['\", $campo->getNombreArchivo()));\r\n $campo->setNombreArchivo(str_replace(\"}}\", \"']\", $campo->getNombreArchivo()));\r\n\r\n $nombre = eval($campo->getNombreArchivo());\r\n // FIXME revisar que este data no deberia ir aca, lo comento por si llega a explotar algo.\r\n // $nombre = $data;\r\n if ($nombre == \"\") {\r\n $nombre = $campo->getNombreArchivo();\r\n }\r\n $valor = $nombre;\r\n if (isset($partes_nombre)) {\r\n $nombre = $nombre . \".\" . end($partes_nombre);\r\n }\r\n }\r\n\r\n if (isset($_FILES[$campo->getCampo()]) and $_FILES[$campo->getCampo()]['size'] > 1) {\r\n $nombre_tmp = $_FILES[$campo->getCampo()]['tmp_name'];\r\n $tamano = $_FILES[$campo->getCampo()]['size'];\r\n // FIXME esto va a utilizarse cuando se agregue el control de tipo de archivo\r\n // Debe ser manejado por la clase del tipo de campo.\r\n // $tipo = $_FILES[$campo->getCampo()]['type'];\r\n\r\n if ($campo->getNombreArchivo() == \"\") {\r\n $nombre = $_FILES[$campo->getCampo()]['name'];\r\n }\r\n\r\n if ($campo->getUbicacionArchivo() != \"\") {\r\n $estructura = $campo->getUbicacionArchivo();\r\n } else {\r\n $estructura = \"\";\r\n }\r\n\r\n // FIXME urgente!!\r\n // if (isset ($campo['tipoArchivo']) and $campo['tipoArchivo'] != \"\")\r\n // {\r\n // $tipo_correcto = preg_match ('/^' . $campo['tipoArchivo'] . '$/', $tipo);\r\n // }\r\n\r\n if ($campo->getLimiteArchivo() != \"\") {\r\n $limite = $campo->getLimiteArchivo() * 1024;\r\n } else {\r\n $limite = 50000 * 1024;\r\n }\r\n\r\n if ($tamano <= $limite) {\r\n\r\n if ($_FILES[$campo->getCampo()]['error'] > 0) {\r\n echo 'Error: ' . $_FILES[$campo->getCampo()]['error'] . '<br/>' . var_dump($_FILES) . \" en linea \" . __LINE__;\r\n } else {\r\n\r\n if (file_exists($nombre)) {\r\n echo '<br/>El archivo ya existe: ' . $nombre;\r\n } else {\r\n if (file_exists($estructura)) {\r\n move_uploaded_file($nombre_tmp, $estructura . \"/\" . $nombre) or die(\" Error en move_uploaded_file \" . var_dump(move_uploaded_file) . \" en linea \" . __LINE__);\r\n chmod($estructura . \"/\" . $nombre, 0775);\r\n } else {\r\n mkdir($estructura, 0777, true);\r\n move_uploaded_file($nombre_tmp, $estructura . \"/\" . $nombre) or die(\" Error en move_uploaded_file \" . var_dump(move_uploaded_file) . \" en linea \" . __LINE__);\r\n chmod($estructura . \"/\" . $nombre, 0775);\r\n }\r\n }\r\n }\r\n // $imagen = $nombre;\r\n } else {\r\n echo 'Archivo inv&aacute;lido';\r\n }\r\n }\r\n\r\n // Finalizamos el upload del archivo\r\n } else {\r\n // if ($campo->getCampo () == \"\")\r\n // {\r\n // print_r ($campo);\r\n // }\r\n\r\n $valor = $_POST[$campo->getCampo()];\r\n }\r\n // chequeo de campos requeridos\r\n if ($campo->isRequerido() == true and trim($valor) == \"\") {\r\n // genera el query string de variables previamente existentes\r\n $get = $_GET;\r\n unset($get['abmsg']);\r\n unset($get['abm_modif']);\r\n $qsamb = http_build_query($get);\r\n if ($qsamb != \"\") {\r\n $qsamb = \"&\" . $qsamb;\r\n }\r\n\r\n $this->redirect(\"$_SERVER[PHP_SELF]?abm_editar=$id$qsamb&abmsg=\" . urlencode(sprintf($this->textoCampoRequerido, $campo->getTitulo())));\r\n }\r\n\r\n if ($camposSql != \"\") {\r\n $camposSql .= \", \\n\";\r\n }\r\n\r\n if ($campo->getCustomFuncionValor() != \"\") {\r\n $valor = call_user_func_array($campo->getCustomFuncionValor(), array(\r\n $valor\r\n ));\r\n }\r\n\r\n if ($campo instanceof Campos_dbCombo) {\r\n $valor = $_POST[$campo->nombreJoinLargo()];\r\n }\r\n\r\n if (trim($valor) == '') {\r\n $camposSql .= $campo->getCampo() . \" = NULL\";\r\n } else {\r\n // if ($campo->getTipo () == 'fecha')\r\n if ($campo instanceof Campos_fecha) {\r\n // $camposSql .= $campo->getCampo() . \" = TO_DATE('\" . $valor . \"', 'yyyy-mm-dd')\";\r\n $camposSql .= $campo->getCampo() . \" = \" . $this->db->toDate($valor, $campo->getMascara());\r\n } // elseif ($campo->getTipo () == 'numero' or is_numeric ($valor))\r\n elseif (($campo instanceof Campos_numero) or is_numeric($valor)) {\r\n $camposSql .= $campo->getCampo() . \" = \" . $valor . \"\";\r\n } else {\r\n $camposSql .= $campo->getCampo() . \" = '\" . $valor . \"'\";\r\n }\r\n }\r\n }\r\n }\r\n\r\n $sql .= $camposSql;\r\n\r\n if (is_array($this->campoId)) {\r\n $this->campoId = $this->convertirIdMultiple($this->campoId, $this->tabla);\r\n\r\n $this->campoId = substr($this->campoId, 0, -6);\r\n }\r\n\r\n /*\r\n * FIXME - no tengo idea de donde sale $this->adicionalesUpdate asi que se elimino para que no tire error\r\n * hay que verificar bien si deberia agregarse y hacerlo.\r\n * Si no me equivoco deveria funcionar exactamente ingual que adicionalesSelect\r\n * $sql .= $this->adicionalesUpdate . \" WHERE \" . $this->campoId . \"='\" . $id . \"' \" . $this->adicionalesWhereUpdate;\r\n */\r\n\r\n if (is_numeric($id)) {\r\n $sql .= \" WHERE \" . $this->campoId . \"=\" . $id . \" \" . $this->adicionalesWhereUpdate;\r\n } else {\r\n $sql .= \" WHERE \" . $this->campoId . \"='\" . $id . \"' \" . $this->adicionalesWhereUpdate;\r\n }\r\n\r\n // ////////////////////////////////\r\n if ($camposSql != \"\") {\r\n $stid = $this->db->query($sql);\r\n if ($this->db->affected_rows($stid) == 1) {\r\n $fueAfectado = true;\r\n\r\n // si cambio la id del registro\r\n if ($this->campoIdEsEditable and isset($_POST[$this->campoId]) and $id != $_POST[$this->campoId]) {\r\n $id = $_POST[$this->campoId];\r\n }\r\n }\r\n\r\n // upload\r\n if ($id !== false) {\r\n // foreach ($this->campos as $campo)\r\n foreach ($this->campo as &$campo) {\r\n // if (!$campo->getTipo () == 'upload')\r\n if (!($campo instanceof Campos_upload)) {\r\n continue;\r\n }\r\n\r\n if ($campo->getUploadFunction()) {\r\n // FIXME revisar para que es esto y corregirlo ya que no se usa.\r\n // $r = call_user_func_array($campo->getUploadFunction(), array(\r\n // $id,\r\n // $this->tabla\r\n // ));\r\n // Lo remplazo con lo siguiente ya que me parece que funciona de la misma manera y no necesito registrar el resultado.\r\n call_user_func_array($campo->getUploadFunction(), array(\r\n $id,\r\n $this->tabla\r\n ));\r\n }\r\n }\r\n }\r\n\r\n if (isset($this->callbackFuncUpdate)) {\r\n call_user_func_array($this->callbackFuncUpdate, array(\r\n $id,\r\n $this->tabla,\r\n $fueAfectado\r\n ));\r\n }\r\n }\r\n // ///////////////////\r\n }\r\n return $this->db->errorNro();\r\n }", "title": "" }, { "docid": "32b9c9657232e26293eb13d6c39b72af", "score": "0.60119736", "text": "function updatePrestamo($id, $estado, $fechaFin){\n try {\n $conexion = conectar(\"practicas5\");\n $conexion->query(\"SET NAMES utf8\");\n\n //Preparamos la consulta\n $consulta = \"UPDATE prestamo estado = :estado, fechaFin = :fechaFin WHERE \";\n $consulta .= \"id = :id\";\n\n $stmt = $conexion->prepare($consulta);\n\n $stmt->bindParam(':id', $id);\n $stmt->bindParam(':estado', $estado);\n $stmt->bindParam(':fechaFin', $fechaFin);\n\n $stmt->execute();\n\n $conexion = null;\n } catch (PDOException $e) {\n setlocale(LC_ALL, \"es_ES\");\n file_put_contents(\"bd.log\", $e->getMessage(), FILE_APPEND | LOCK_EX);\n }\n }", "title": "" }, { "docid": "1002ade592d27f6faa82727d35e471ea", "score": "0.60109025", "text": "public function forUpdate($sqlQuery){ }", "title": "" }, { "docid": "7f12ccf836b59d783a51545df8021b79", "score": "0.6008678", "text": "protected function sinple_query() {\n $this->abrir_conexion();\n $this->conn->query($this->query);\n $this->cerrar_conexion();\n }", "title": "" }, { "docid": "c4ca0ddfc4a175e603dcefee85a2d494", "score": "0.60055536", "text": "public function getSQlUpdate(){\r\n\t\t$sql = \"\r\n\t\t\t\tUPDATE remediar.formulario\r\n\t\t\t\t SET nroformulario=\".$this->nroformulario.\", factores_riesgo=\".$this->factores_riesgo.\", hta2=\".$this->hta2.\", \r\n\t\t\t\t hta3=\".$this->hta3.\", colesterol4=\".$this->colesterol4.\", colesterol5=\".$this->colesterol5.\", dmt26=\".$this->dmt26.\", dmt27=\".$this->dmt27.\", ecv8=\".$this->ecv8.\", \r\n\t\t\t\t tabaco9=\".$this->tabaco9.\", puntaje_final=\".$this->puntaje_final.\", apellidoagente='\".$this->apellidoagente.\"', nombreagente='\".$this->nombreagente.\"', \r\n\t\t\t\t centro_inscriptor='\".$this->centro_inscriptor.\"', os='\".$this->os.\"', dni_agente='\".$this->dni_agente.\"', cual_os='\".$this->cual_os.\"'\r\n\t\t\t\t WHERE id_formulario = \".$this->id_formulario.\";\r\n\r\n\t\t\";\r\n\t\treturn($sql);\r\n\t}", "title": "" }, { "docid": "efe559b31d39707ba2acc814553fc90c", "score": "0.60054225", "text": "static public function mdlEditarCotizacion($tabla,$datos,$entrada){\n\t\t$datos = arrayMapUtf8Decode($datos);\n\t\t$db = new Conexion();\n\t\t$db->beginTransaction();\n\t\tif($entrada == 'estadoAprobado'){\n\t\t\t$sql1 = $db->consulta(\"UPDATE $tabla SET num_orden_produccion = '\".$datos[\"num_orden_produccion\"].\"' WHERE cod_cotizacion = '\".$datos[\"cod_cotizacion\"].\"'\");\n\t\t\tif($sql1){\n\t\t\t\t$db->commit();\n\t\t\t\treturn \"ok\";\n\t\t\t}else{\n\t\t\t\t$db->rollback();\n\t\t\t\treturn \"error\";\n\t\t\t}\n\t\t\t$db->liberar($sql1);\n\t\t}else{\n\t\t\t$sql1 = $db->consulta(\"UPDATE $tabla SET cod_estado_cotizacion ='\".$datos[\"cod_estado_cotizacion\"].\"',cod_cliente ='\".$datos[\"cod_cliente\"].\"',cod_moneda ='\".$datos[\"cod_moneda\"].\"',cod_forma_pago ='\".$datos[\"cod_forma_pago\"].\"',dsc_contacto ='\".$datos[\"dsc_contacto\"].\"',dsc_correo ='\".$datos[\"dsc_correo\"].\"',dsc_cargo ='\".$datos[\"dsc_cargo\"].\"',dsc_telefono ='\".$datos[\"dsc_telefono\"].\"',dsc_orden_compra ='\".$datos[\"dsc_orden_compra\"].\"',dsc_referencia ='\".$datos[\"dsc_referencia\"].\"',dsc_lugar_entrega ='\".$datos[\"dsc_lugar_entrega\"].\"',dsc_tiempo_entrega ='\".$datos[\"dsc_tiempo_entrega\"].\"',dsc_validez_oferta ='\".$datos[\"dsc_validez_oferta\"].\"',dsc_garantia ='\".$datos[\"dsc_garantia\"].\"',fch_emision = '\".$datos[\"fch_emision\"].\"',cod_usr_modifica ='\".$datos[\"cod_usr_modifica\"].\"',fch_modifica = CONVERT(datetime,'\".$datos[\"fch_modifica\"].\"',21),imp_subtotal =\".$datos[\"imp_subtotal\"].\",imp_igv =\".$datos[\"imp_igv\"].\",imp_total =\".$datos[\"imp_total\"].\",dsc_observacion ='\".$datos[\"dsc_observacion\"].\"',cod_tipo_descuento='\".$datos[\"cod_tipo_descuento\"].\"',imp_descuento='\".$datos[\"imp_descuento\"].\"',flg_descuento='\".$datos[\"flg_descuento\"].\"',cod_cotizacion='\".$datos[\"cod_cotizacion_nuevo\"].\"',num_orden_produccion='\".$datos[\"num_orden_produccion\"].\"',fchEmision_orden_compra=\".$datos[\"fchEmision_orden_compra\"].\" WHERE cod_cotizacion = '\".$datos[\"cod_cotizacion\"].\"'\");\n\t\t\t$sql1_2 = $db->consulta(\"UPDATE vtade_cotizacion SET cod_cotizacion='\".$datos[\"cod_cotizacion_nuevo\"].\"' WHERE cod_cotizacion = '\".$datos[\"cod_cotizacion\"].\"'\");\n\t\t\t$sql1_3 = $db->consulta(\"UPDATE vtade_cotizacion_adjunto SET cod_cotizacion='\".$datos[\"cod_cotizacion_nuevo\"].\"' WHERE cod_cotizacion = '\".$datos[\"cod_cotizacion\"].\"'\");\n\t\t\t$sql2 = $db->consulta(\"SELECT cod_estado_cotizacion FROM vtama_estado_cotizacion WHERE flg_aprobado = 'SI'\");\n\t\t\t$estadoCot = $db->recorrer($sql2)[\"cod_estado_cotizacion\"];\n\t\t\tif($datos[\"dsc_orden_compra\"] != ''){\n\t\t\t\t$sql3 = $db->consulta(\"UPDATE $tabla SET cod_estado_cotizacion = '$estadoCot' WHERE cod_cotizacion = '\".$datos[\"cod_cotizacion\"].\"'\");\n\t\t\t}\n\t\t\tif($datos[\"dsc_orden_compra\"] != ''){\n\t\t\t\tif($sql1 && $sql1_2 && $sql1_3 && $sql2 && $sql3){\n\t\t\t\t\t$db->commit();\n\t\t\t\t\treturn \"ok\";\n\t\t\t\t}else{\n\t\t\t\t\t$db->rollback();\n\t\t\t\t\treturn \"error\";\n\t\t\t\t}\n\t\t\t\t$db->liberar($sql1);\n\t\t\t\t$db->liberar($sql2);\n\t\t\t\t$db->liberar($sql3);\n\t\t\t}else{\n\t\t\t\tif($sql1 && $sql1_2 && $sql1_3){\n\t\t\t\t\t$db->commit();\n\t\t\t\t\treturn \"ok\";\n\t\t\t\t}else{\n\t\t\t\t\t$db->rollback();\n\t\t\t\t\treturn \"error\";\n\t\t\t\t}\n\t\t\t\t$db->liberar($sql);\n\t\t\t}\n\t\t}\n $db->cerrar();\n\t}", "title": "" }, { "docid": "06e18e1c9da21bc0b8a3a375eb585340", "score": "0.59969205", "text": "public function save() {\n $this->destroy();\n $query = 'insert into Titulacion_Usuario (tit_id,user_id) values (\"'.$this->getTit_id().'\",\"'.$this->getUser_id().'\")';\n $this->driver->exec($query);\n}", "title": "" }, { "docid": "82c7ac705d04628e45f78ce1d980cbbc", "score": "0.59958875", "text": "public function actualizarDato($tabla,$campo,$dato,$condicion){\n //$self->dialogue = new dialogue();\n $sql = \"UPDATE \".$tabla .\" SET \".$campo.\" = \".$dato.\" WHERE \".$condicion.\";\";\n $this->sql = $sql;\n //echo $sql;\n try{\n $result = mysql_query($sql) or die (\"Error en: $sql:\" .mysql_error());\n \n } catch (Exception $ex) {\n $result = 'Excepción capturada: '. $ex->getMessage();\n }\n return $result;\n mysql_free_result($result);\n }", "title": "" }, { "docid": "72553ac5dbcb5cb883459ebfbab0c0d0", "score": "0.59938735", "text": "public function execute()\n {\n $this->pdo_helper->prepareQuery($this->query,(is_countable($this->values)) ? $this->values : null)\n ->execute();\n }", "title": "" }, { "docid": "09537d5540a9ef25632adf48480d1ee7", "score": "0.5977372", "text": "public function saveDataPDO($index=0, $arg=\"\", $pag=0, $limite=0, $tipo=0, $cadena2=\"\")\n {\n $query=\"\";\n $vRet = \"Error\";\n\n $ip=$_SERVER['REMOTE_ADDR'];\n $host=gethostbyaddr($_SERVER['REMOTE_ADDR']);\n\n switch ($index) {\n\n case 0:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $arr = array(\"alu\",\"pro\",\"per\");\n if (!in_array(substr($username, 0, 3), $arr)) {\n $pass = md5($password1);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $query = \"INSERT INTO usuarios(username,password,apellidos,nombres,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcorreoelectronico,idusernivelacceso,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatus_usuario,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tidemp,ip,host,creado_por,creado_el)\n\t\t\t\t\t\t\t\t\t\tVALUES( '$username','$pass','$apellidos','$nombres',\n\t\t\t\t\t\t\t\t\t\t\t\t'$correoelectronico',$idusernivelacceso,\n\t\t\t\t\t\t\t\t\t\t\t\t$status_usuario,\n\t\t\t\t\t\t\t\t\t\t\t $idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n } else {\n $vRet = \"Error: No puede usar ese prefijo en el Nombre de Usuario\";\n }\n break;\n case 1:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n if (isset($idusernivelacceso)) {\n $idnivacc = \" idusernivelacceso = $idusernivelacceso, \";\n } else {\n $idnivacc = \"\";\n }\n //$query = \"UPDATE usuarios SET username = '$username',\n $query = \"UPDATE usuarios SET apellidos = '$apellidos',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnombres = '$nombres',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcorreoelectronico = '$correoelectronico',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\".$idnivacc.\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatus_usuario = $status_usuario,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\tWHERE iduser = $iduser\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM usuarios WHERE iduser = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n case 3:\n parse_str($arg);\n $pass = md5($password1);\n $query = \"UPDATE usuarios SET password = '$pass',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $iduser2,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\tWHERE iduser = $iduser\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 100:\n\n parse_str($arg);\n $tel = trim(utf8_decode($celular));\n $pass = md5($password);\n $query = \"INSERT INTO usuarios(username,password,nombres,celular,idF,latitud,longitud,ip,host,creado_el)\n\t\t\t\t\t\t\t\t\t\t\tVALUES('$username','$pass','$nombre','$tel','$idF','$latitud','$longitud','$ip','$host',NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 101:\n\n parse_str($arg);\n $query = \"UPDATE usuarios SET valid = 1 WHERE username='$username'\";\n $vRet = $this->guardarDatos($query);\n\n break;\n case 200:\n\n parse_str($arg);\n $pass = md5($password);\n $query = \"INSERT INTO usuarios(username,password,ip,host,creado_el)\n\t\t\t\t\t\t\t\t\t\t\tVALUES('$username','$pass','$ip','$host',NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 203:\n\n parse_str($arg);\n\n if (isset($idusernivelacceso)) {\n $idnivacc = \" idusernivelacceso = $idusernivelacceso, \";\n } else {\n $idnivacc = \"\";\n }\n\n $token_validated = $token == $token_source ? 1 : 0;\n $token = intval($token_validated) == 1? $token :\"\";\n\n $query = \"UPDATE usuarios SET\n\t\t\t\t\t\t\t\t\t\t\t\t\t apellidos = '$apellidos',\n\t\t\t\t\t\t\t\t\t\t\t\t\t nombres = '$nombres',\n\t\t\t\t\t\t\t\t\t\t\t\t\t correoelectronico = '$correoelectronico',\n\t\t\t\t\t\t\t\t\t\t\t\t\t \".$idnivacc.\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t teloficina = '$teloficina',\n\t\t\t\t\t\t\t\t\t\t\t\t\t telpersonal = '$telpersonal',\n\t\t\t\t\t\t\t\t\t\t\t\t\t token = '$token',\n\t\t\t\t\t\t\t\t\t\t\t\t\t token_validated = $token_validated,\n\t\t\t\t\t\t\t\t\t\t\t\t\t registrosporpagina = $registrosporpagina,\n\t\t\t\t\t\t\t\t\t\t\t\t\t param1 = '$param1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t ip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t host = '$host'\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE username LIKE ('$username2%')\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n\n case 204:\n\n parse_str($arg);\n $query = \"UPDATE usuarios SET foto = '$foto',\n\t\t\t\t\t\t\t\t\t\t\t\t\t ip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t host = '$host'\n\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE username LIKE ('$username%')\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n\n case 205:\n\n parse_str($arg);\n $pass = md5($password);\n\n $query = \"UPDATE usuarios SET\n\t\t\t\t\t\t\t\t\t\t\t\t\t password = '$pass',\n\t\t\t\t\t\t\t\t\t\t\t\t\t ip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t host = '$host'\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE username LIKE ('$username2%')\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n\n }\n break;\n\n case 1:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n if ( intval($predeterminado) == 1 ){\n $q = \"UPDATE cat_estados SET predeterminado = 0 WHERE idsucursal = $idsucursal AND predeterminado = 1 AND idemp = $idemp\";\n $r = $this->guardarDatos($q);\n }\n $query = \"INSERT INTO cat_estados(clave,estado,status_estado,idsucursal,predeterminado,idemp,ip,host,creado_por,creado_el)\n\t\t\t\t\t\t\t\t\tVALUES( '$clave','$estado',\n\t\t\t\t\t\t\t\t\t\t $status_estado,$idsucursal,$predeterminado,$idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n if ( intval($predeterminado) == 1 ){\n $q = \"UPDATE cat_estados SET predeterminado = 0 WHERE idsucursal = $idsucursal AND predeterminado = 1 AND idemp = $idemp\";\n $r = $this->guardarDatos($q);\n }\n $query = \"UPDATE cat_estados SET clave = '$clave',\n\t\t\t\t\t\t\t\t\t\t\t\t\t \testado = '$estado',\n idsucursal = $idsucursal, \n predeterminado = $predeterminado,\n\t\t\t\t\t\t\t\t\t\t\t\t\t \tstatus_estado = $status_estado,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\tWHERE idestado = $idestado\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_estados WHERE idestado = \".$arg;\n\n $vRet = $this->guardarDatos($query);\n\n break;\n }\n break;\n\n case 2:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n if ( intval($predeterminado) == 1 ){\n $q = \"UPDATE cat_municipios SET predeterminado = 0 WHERE idestado = $idestado AND idsucursal = $idsucursal AND predeterminado = 1 AND idemp = $idemp\";\n $r = $this->guardarDatos($q); \n }\n $query = \"INSERT INTO cat_municipios(idestado,clave,municipio,status_municipio,idsucursal,predeterminado,idemp,ip,host,creado_por,creado_el)\n\t\t\t\t\t\t\t\t\tVALUES( $idestado, '$clave','$municipio',\n\t\t\t\t\t\t\t\t\t\t $status_municipio,$idsucursal,$predeterminado,$idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n if ( intval($predeterminado) == 1 ){\n $q = \"UPDATE cat_municipios SET predeterminado = 0 WHERE idestado = $idestado AND idsucursal = $idsucursal AND predeterminado = 1 AND idemp = $idemp\";\n $r = $this->guardarDatos($q); \n }\n $query = \"UPDATE cat_municipios SET idestado = $idestado,\n idsucursal = $idsucursal,\n predeterminado = $predeterminado,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tclave = '$clave',\n\t\t\t\t\t\t\t\t\t\t\t\t\t \tmunicipio = '$municipio',\n\t\t\t\t\t\t\t\t\t\t\t\t\t \tstatus_municipio = $status_municipio,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\tWHERE idmunicipio = $idmunicipio\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_municipios WHERE idmunicipio = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n }\n break;\n\n case 3: // 3\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $email1 = strtolower($email1);\n $idempresa = 0;\n if ( $isaddempresa == 0 ){\n\n $rfc = \"\";\n $razon_social = \"\";\n \n }else{\n\n $is_email = 1;\n $status_empresa = 1;\n $query = \"INSERT INTO cat_empresas(\n rfc,\n razon_social,\n calle,\n num_ext,\n num_int,\n colonia,\n localidad,\n estado,\n pais,\n cp,\n emails,\n is_email,\n status_empresa,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n '\".strtoupper($rfc).\"',\n '\".strtoupper($razon_social).\"',\n '\".strtoupper($calle).\"',\n '\".strtoupper($num_ext).\"',\n '\".strtoupper($num_int).\"',\n '\".strtoupper($colonia).\"',\n '\".strtoupper($localidad).\"',\n '\".strtoupper($estado).\"',\n '\".strtoupper($pais).\"',\n '\".strtoupper($cp).\"',\n '\".strtolower($email1).\"',\n $is_email,\n $status_empresa,\n $idemp,'$ip','$host',$idusr,NOW() )\";\n\n $idempresa = $this->guardarDatosOrden($query,'idempresa','cat_empresas');\n\n }\n\n $query = \"INSERT INTO cat_personas(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tap_paterno,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tap_materno,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnombre,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\temail1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttel1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcel1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tgenero,\n rfc,\n razon_social,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcalle,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnum_ext,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tnum_int,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolonia,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalidad,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tpais,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcp,\n idsucursal,\n isaddempresa,\n idestado,\n idmunicipio,\n idempresa,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tstatus_persona,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tidemp,ip,host,creado_por,creado_el)\n\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$ap_paterno',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$ap_materno',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$nombre',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$email1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$tel1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$cel1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$genero,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".mb_strtoupper($rfc, 'UTF-8').\"',\n '\".mb_strtoupper($razon_social, 'UTF-8').\"',\n '\".mb_strtoupper($calle, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".mb_strtoupper($num_ext, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".mb_strtoupper($num_int, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".mb_strtoupper($colonia, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".mb_strtoupper($localidad, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".mb_strtoupper($pais, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'\".mb_strtoupper($cp, 'UTF-8').\"',\n $idsucursal,\n $isaddempresa,\n $idestado,\n $idmunicipio,\n $idempresa,\n $status_persona,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$idemp,'$ip','$host',$idusr,NOW())\";\n\n $idpersona = $this->guardarDatosOrden($query,\"idpersona\",\"cat_personas\");\n $vRet = $this->generarUsuario($idpersona);\n $vRet = $this->setAsocia(30, \"$idpersona.$idempresa\", 0, 0, 10, \"u=$user\");\n $vRet = \"OK\";\n break;\n\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $email1 = strtolower($email1);\n if ( $isaddempresa == 0 ){\n $rfc = \"\";\n $razon_social = \"\";\n }else{\n\n $query = \"UPDATE cat_empresas SET\n rfc = '\".strtoupper($rfc).\"',\n razon_social = '\".strtoupper($razon_social).\"',\n calle = '\".strtoupper($calle).\"',\n num_ext = '\".strtoupper($num_ext).\"',\n num_int = '\".strtoupper($num_int).\"',\n colonia = '\".strtoupper($colonia).\"',\n localidad = '\".strtoupper($localidad).\"',\n estado = '\".strtoupper($estado).\"',\n pais = '\".strtoupper($pais).\"',\n cp = '\".strtoupper($cp).\"',\n emails = '\".strtolower($email1).\"',\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idempresa = \".$idempresa;\n $vRet = $this->guardarDatos($query);\n\n }\n\n $query = \"UPDATE cat_personas SET\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tap_paterno = '$ap_paterno',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tap_materno = '$ap_materno',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnombre = '$nombre',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\temail1 = '$email1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttel1 = '$tel1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcel1 = '$cel1',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\trfc = '\".mb_strtoupper($rfc, 'UTF-8').\"',\n razon_social = '\".mb_strtoupper($razon_social, 'UTF-8').\"',\n calle = '\".mb_strtoupper($calle, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnum_ext = '\".mb_strtoupper($num_ext, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tnum_int = '\".mb_strtoupper($num_int, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcolonia = '\".mb_strtoupper($colonia, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlocalidad = '\".mb_strtoupper($localidad, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tpais = '\".mb_strtoupper($pais, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tcp = '\".mb_strtoupper($cp, 'UTF-8').\"',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tgenero = $genero,\n isaddempresa = $isaddempresa,\n idsucursal = $idsucursal,\n idestado = $idestado,\n idmunicipio = $idmunicipio,\n idempresa = $idempresa,\n\t\t\t\t\t\t\t\t\t\t\t\t \t\tstatus_persona = $status_persona,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\tWHERE idpersona = $idpersona\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_personas WHERE idpersona = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n } // 3\n break;\n\n case 4:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $is_email = !isset($is_email)?0:1;\n\n $status_empresa = !isset($status_empresa)?0:1;\n $query = \"INSERT INTO cat_empresas(\n rfc,\n razon_social,\n calle,\n num_ext,\n num_int,\n colonia,\n localidad,\n estado,\n pais,\n cp,\n emails,\n is_email,\n status_empresa,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n '\".strtoupper($rfc).\"',\n '\".strtoupper($razon_social).\"',\n '\".strtoupper($calle).\"',\n '\".strtoupper($num_ext).\"',\n '\".strtoupper($num_int).\"',\n '\".strtoupper($colonia).\"',\n '\".strtoupper($localidad).\"',\n '\".strtoupper($estado).\"',\n '\".strtoupper($pais).\"',\n '\".strtoupper($cp).\"',\n '\".strtolower($emails).\"',\n $is_email,\n $status_empresa,\n $idemp,'$ip','$host',$idusr,NOW() )\";\n $vRet = $this->guardarDatos($query);\n break;\n case 1:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $is_email = !isset($is_email)?0:1;\n $status_empresa = !isset($status_empresa)?0:1;\n\n $query = \"UPDATE cat_empresas SET\n rfc = '\".strtoupper($rfc).\"',\n razon_social = '\".strtoupper($razon_social).\"',\n calle = '\".strtoupper($calle).\"',\n num_ext = '\".strtoupper($num_ext).\"',\n num_int = '\".strtoupper($num_int).\"',\n colonia = '\".strtoupper($colonia).\"',\n localidad = '\".strtoupper($localidad).\"',\n estado = '\".strtoupper($estado).\"',\n pais = '\".strtoupper($pais).\"',\n cp = '\".strtoupper($cp).\"',\n emails = '\".strtolower($emails).\"',\n is_email = $is_email,\n status_empresa = $status_empresa,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idempresa = $idempresa\";\n $vRet = $this->guardarDatos($query);\n break;\n case 2:\n $query = \"DELETE FROM cat_empresas WHERE idempresa = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n }\n break;\n\n case 5: // 5\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $marca = strtoupper($marca);\n $is_cat = !isset($is_cat)?0:1;\n $status_marca = !isset($status_marca)?0:1;\n $query = \"INSERT INTO cat_marcas(marca,imagen,is_cat,status_marca,idemp,ip,host,creado_por,creado_el)\n\t\t\t\t\t\t\t\t\tVALUES( '$marca','$imagen',$is_cat,$status_marca,$idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 1:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $marca = strtoupper($marca);\n $is_cat = !isset($is_cat)?0:1;\n $status_marca = !isset($status_marca)?0:1;\n // imagen = '$imagen',\n $query = \"UPDATE cat_marcas SET marca = '$marca',\n\t\t\t\t\t\t\t\t\t\t\t\t\t \tis_cat = $is_cat,\n status_marca = $status_marca,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\tWHERE idmarca = $idmarca\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_marcas WHERE idmarca = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n case 3:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $query = \"UPDATE cat_marcas SET imagen = '$imagen',\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idmarca = $idmarca\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n\n }\n break; // 5\n\n case 6:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $visualizar = !isset($visualizar)?0:1;\n $query = \"Insert Into cat_colores(color,codigo_color_hex,visualizar,status_color,\n idemp,ip,host,creado_por,creado_el)\n value('$color','$codigo_color_hex',$visualizar,$status_color,\n $idemp,'$ip','$host',$idusr,NOW())\";\n $vRet = $this->guardarDatos($query);\n break;\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $visualizar = !isset($visualizar)?0:1;\n $query = \"update cat_colores set\n color = '$color',\n codigo_color_hex = '$codigo_color_hex',\n status_color = $status_color,\n visualizar = $visualizar,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n Where idcolor = $idcolor\";\n $vRet = $this->guardarDatos($query);\n break;\n case 2:\n $query = \"delete from cat_colores Where idcolor = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n }\n break; // 6\n\n\n case 7:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $status_equipo_categoria = !isset($status_equipo_categoria)?0:1;\n $query = \"INSERT INTO cat_equipos_categorias(equipo_categoria,status_equipo_categoria,idemp,ip,host,creado_por,creado_el)\n VALUES( '$equipo_categoria',$status_equipo_categoria ,$idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $status_equipo_categoria = !isset($status_equipo_categoria)?0:1;\n $query = \"UPDATE cat_equipos_categorias SET \n equipo_categoria = '$equipo_categoria',\n status_equipo_categoria = $status_equipo_categoria,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idequipocategoria = $idequipocategoria\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_equipos_categorias WHERE idequipocategoria = \".$arg;\n\n $vRet = $this->guardarDatos($query);\n\n break;\n }\n break; // 7\n\n case 8:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $status_precio_categoria = !isset($status_precio_categoria)?0:1;\n $query = \"INSERT INTO cat_precios_categorias(clave,precio_categoria,status_precio_categoria,idemp,ip,host,creado_por,creado_el)\n VALUES('$clave', '$precio_categoria',$status_precio_categoria ,$idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $status_precio_categoria = !isset($status_precio_categoria)?0:1;\n $query = \"UPDATE cat_precios_categorias SET \n clave = '$clave',\n precio_categoria = '$precio_categoria',\n status_precio_categoria = $status_precio_categoria,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idpreciocategoria = $idpreciocategoria\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_precios_categorias WHERE idpreciocategoria = \".$arg;\n\n $vRet = $this->guardarDatos($query);\n\n break;\n }\n break; // 8\n\n case 9:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $status_unidad_medida = !isset($status_unidad_medida)?0:1;\n $query = \"INSERT INTO cat_unidades_medidas(clave,unidad_medida,status_unidad_medida,idemp,ip,host,creado_por,creado_el)\n VALUES('$clave', '$unidad_medida',$status_unidad_medida ,$idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $status_unidad_medida = !isset($status_unidad_medida)?0:1;\n $query = \"UPDATE cat_unidades_medidas SET \n clave = '$clave',\n unidad_medida = '$unidad_medida',\n status_unidad_medida = $status_unidad_medida,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idunidadmedida = $idunidadmedida\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_unidades_medidas WHERE idunidadmedida = \".$arg;\n\n $vRet = $this->guardarDatos($query);\n\n break;\n }\n break; // 9\n\n case 10:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $status_precio_unitario = !isset($status_precio_unitario)?0:1;\n $is_iva = !isset($is_iva)?0:1;\n $query = \"INSERT INTO cat_precios(\n codigo,\n concepto,\n idunidadmedida,\n precio_unitario,\n idpreciocategoria,\n tipo,\n is_iva,\n status_precio_unitario,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n '$codigo', \n '$concepto',\n $idunidadmedida,\n $precio_unitario,\n $idpreciocategoria,\n '$tipo',\n $is_iva,\n $status_precio_unitario,\n $idemp,'$ip','$host',$idusr,NOW())\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 1:\n //$ar = $this->unserialice_force($arg);\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $status_precio_unitario = !isset($status_precio_unitario)?0:1;\n $is_iva = !isset($is_iva)?0:1;\n $query = \"UPDATE cat_precios SET \n codigo = '$codigo',\n concepto = '$concepto',\n idunidadmedida = $idunidadmedida,\n precio_unitario = $precio_unitario,\n idpreciocategoria = $idpreciocategoria,\n tipo = '$tipo',\n is_iva = $is_iva,\n status_precio_unitario = $status_precio_unitario,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idprecio = $idprecio\";\n\n $vRet = $this->guardarDatos($query);\n\n break;\n case 2:\n $query = \"DELETE FROM cat_precios WHERE idprecio = \".$arg;\n\n $vRet = $this->guardarDatos($query);\n\n break;\n }\n break; // 10\n\n case 49: //49\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($u);\n $idemp = $this->getIdEmpFromAlias($u);\n $IsConnect = $this->IsExistUserConnect($idusr, $idemp);\n if (intval($IsConnect) <= 0) {\n $query = \"INSERT INTO usuarios_conectados(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tiduser,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tusername,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisconectado,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tultima_conexion,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tidemp,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tip,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thost,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcreado_por,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tcreado_el)\n\t\t\t\t\t\t\t\t\t\t\t\t\tVALUES(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$u',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNOW(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$idemp,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t$idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNOW() )\" ;\n\n $vRet = $this->guardarDatos($query);\n } else {\n $IsConnect = $this->IsConnectUser($idusr, $idemp);\n if (intval($IsConnect) <= 0) {\n $query = \"UPDATE usuarios_conectados SET\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisconectado = 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tultima_conexion = NOW(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\t\t\tWHERE iduser = $idusr AND idemp = $idemp AND isconectado = 0\";\n\n $vRet = $this->guardarDatos($query);\n } else {\n $vRet = \"OK\";\n }\n }\n\n break;\n\n case 1:\n parse_str($arg);\n\n $idusr = $this->getIdUserFromAlias($u);\n $idemp = $this->getIdEmpFromAlias($u);\n $IsConnect = $this->IsConnectUser($idusr, $idemp);\n if (intval($IsConnect) > 0) {\n $query = \"UPDATE usuarios_conectados SET\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tisconectado = 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tultima_conexion = NOW(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tip = '$ip',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\thost = '$host',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_por = $idusr,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tmodi_el = NOW()\n\t\t\t\t\t\t\t\t\tWHERE iduser = $idusr AND idemp = $idemp AND isconectado = 1\";\n\n $vRet = $this->guardarDatos($query);\n } else {\n $vRet = \"OK\";\n }\n\n break;\n } //49\n break;\n\n case 70:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $tipox = !isset($tipox)?0:1;\n $mantto = !isset($mantto)?0:1;\n $garantia = !isset($garantia)?0:1;\n $contrato = !isset($contrato)?0:1;\n $status_master = !isset($status_master)?0:1;\n $query = \"INSERT INTO control_master(\n idempresa,\n idmodulo,\n idcliente,\n idtecnico,\n idrecibio,\n tipo,\n mantto,\n garantia,\n contrato,\n status,\n folmod,\n status_master,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n $idempresa,\n $idmodulo,\n $idcliente,\n $idtecnico,\n $idrecibio,\n $tipox,\n $mantto,\n $garantia,\n $contrato,\n $status,\n '$folmod',\n $status_master,\n $idemp,'$ip','$host',$idusr,NOW() )\";\n $vRet = $this->guardarDatosOrden($query,\"idcontrolmaster\",\"control_master\");\n break;\n case 1:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $tipox = !isset($tipox)?0:1;\n $mantto = !isset($mantto)?0:1;\n $garantia = !isset($garantia)?0:1;\n $contrato = !isset($contrato)?0:1;\n $status_master = !isset($status_master)?0:1;\n\n $query = \"UPDATE control_master SET\n idempresa = $idempresa,\n idmodulo = $idmodulo,\n idcliente = $idcliente,\n idtecnico = $idtecnico,\n idrecibio = $idrecibio,\n garantia = $garantia,\n contrato = $contrato,\n tipo = $tipox,\n mantto = $mantto,\n status = $status,\n folmod = '$folmod',\n status_master = $status_master,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idcontrolmaster = $idcontrolmaster\";\n $vRet = $this->guardarDatos($query);\n break;\n case 2:\n $query = \"DELETE FROM control_master WHERE idcontrolmaster = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n\n case 3:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n //$status_detalle = !isset($status_detalle)?0:1;\n $query = \"INSERT INTO control_detalle(\n idcontrolmaster,\n idequipocategoria,\n equipo,\n idmarca,\n marca,\n modelo,\n serie,\n no_parte,\n version,\n submodelo,\n num_pedido,\n status_detalle,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n $idcontrolmaster,\n $idequipocategoria,\n '$equipo',\n $idmarca,\n '$marca',\n '$modelo',\n '$serie',\n '$no_parte',\n '$version',\n '$submodelo',\n '$num_pedido',\n $status_detalle,\n $idemp,'$ip','$host',$idusr,NOW() )\";\n $vRet = $this->guardarDatos($query);\n break;\n\n case 4:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n //$status_detalle = !isset($status_detalle)?0:1;\n\n $query = \"UPDATE control_detalle SET\n idequipocategoria = $idequipocategoria,\n equipo = '$equipo',\n idmarca = $idmarca,\n marca = '$marca',\n modelo = '$modelo',\n serie = '$serie',\n no_parte = '$no_parte',\n version = '$version',\n submodelo = '$submodelo',\n num_pedido = '$num_pedido',\n status_detalle = $status_detalle,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE iddetalle = $iddetalle\";\n $vRet = $this->guardarDatos($query);\n break;\n \n case 5:\n $query = \"DELETE FROM control_detalle WHERE iddetalle = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n\n case 6:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($u);\n // comment = '$comment',\n \n $query = \"UPDATE control_master SET\n falla = '$falla',\n accesorios = '$accesorios',\n observaciones = '$observaciones',\n trabajo = '$trabajo',\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idcontrolmaster = $idcontrolmaster\";\n $vRet = $this->guardarDatos($query);\n break;\n \n case 7:\n $query = \"DELETE FROM control_importe WHERE idimporte = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n\n case 8:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $is_iva = !isset($is_iva)?0:1;\n $status_importe = !isset($status_importe)?0:1;\n $viaticos = floatval($viaticos);\n\n $query = \"INSERT INTO control_importe(\n idcontrolmaster,\n cantidad,\n idprecio,\n codigo,\n precio_unitario,\n viaticos,\n observaciones,\n is_iva,\n status_importe,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n $idcontrolmaster,\n $cantidad,\n $idprecio,\n '$codigo',\n $precio_unitario,\n $viaticos,\n '$observaciones',\n $is_iva,\n $status_importe,\n $idemp,'$ip','$host',$idusr,NOW() )\";\n $vRet = $this->guardarDatos($query);\n break;\n\n case 9:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $is_iva = !isset($is_iva)?0:1;\n $status_importe = !isset($status_importe)?0:1;\n\n $query = \"UPDATE control_importe SET\n cantidad = $cantidad,\n idprecio = $idprecio,\n codigo = '$codigo',\n precio_unitario = $precio_unitario,\n viaticos = $viaticos,\n observaciones = '$observaciones',\n is_iva = $is_iva,\n status_importe = $status_importe,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idimporte = $idimporte\";\n $vRet = $this->guardarDatos($query);\n break;\n\n case 10:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $query = \"INSERT INTO control_comentarios(\n idcontrolmaster,\n iduser,\n comentario,\n fecha,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n $idcontrolmaster,\n $idusr,\n '$comentario',\n NOW(),\n $idemp,'$ip','$host',$idusr,NOW() )\";\n $vRet = $this->guardarDatos($query);\n break;\n\n case 11:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n\n $query = \"UPDATE control_comentarios SET\n comentario = '$comentario',\n fecha = NOW(),\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idcontrolcomentario = $idcontrolcomentario\";\n $vRet = $this->guardarDatos($query);\n break;\n\n case 12:\n $query = \"DELETE FROM control_comentarios WHERE idcontrolcomentario = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n case 13:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n \n $now = date(\"Y-m-d H:i:s\");\n\n $fsalida = substr($fsalida, 0,2)==\"00\" ? $now : $fsalida;\n\n $query = \"UPDATE control_master SET\n idclienterecibioentrega = $idclienterecibioentrega,\n idtecnicoentrego = $idtecnicoentrego,\n fsalida = '$fsalida',\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idcontrolmaster = $idcontrolmaster\";\n $vRet = $this->guardarDatos($query);\n break;\n case 14:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n \n $query = \"INSERT INTO control_imagenes(\n idcontrolmaster,\n root,\n imagen,\n descripcion,\n idemp,\n ip,\n host,\n creado_por,\n creado_el\n )values(\n $idcontrolmaster,\n '$root',\n '$imagen',\n '$descripcion',\n $idemp,\n '$ip',\n '$host',\n $idusr,\n NOW()\n )\";\n $vRet = $this->guardarDatos($query);\n break;\n } // 70\n break;\n\n case 71:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $query = \"INSERT INTO cotizacion_encab(\n persona,\n empresa,\n fecha,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n '$persona',\n '$empresa',\n '$fecha',\n $idemp,'$ip','$host',$idusr,NOW() )\";\n $vRet = $this->guardarDatos($query);\n break;\n case 1:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n\n $query = \"UPDATE cotizacion_encab SET\n persona = '$persona',\n empresa = '$empresa',\n fecha = '$fecha',\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idcotizacion = $idcotizacion\";\n $vRet = $this->guardarDatos($query);\n break;\n case 2:\n $query = \"DELETE FROM cotizacion_encab WHERE idcotizacion = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n\n } // 71\n break;\n\n case 72:\n switch ($tipo) {\n case 0:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $idemp = $this->getIdEmpFromAlias($user);\n $query = \"INSERT INTO cotizacion_detalles(\n idcotizacion,\n idmoneda,\n tipo_cambio,\n lote,\n cantidad,\n idunidadmedida,\n descripcion,\n precio_unitario,\n idporcentajeutilidad,\n flete,\n idemp,ip,host,creado_por,creado_el)\n VALUES(\n $idcotizacion,\n $idmoneda,\n $tipo_cambio,\n '$lote',\n $cantidad,\n $idunidadmedida,\n '$descripcion',\n $precio_unitario,\n $idporcentajeutilidad,\n $flete,\n $idemp,'$ip','$host',$idusr,NOW() )\";\n $vRet = $this->guardarDatos($query);\n break;\n case 1:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n\n $query = \"UPDATE cotizacion_detalles SET\n idcotizacion = $idcotizacion,\n idmoneda = $idmoneda,\n tipo_cambio = $tipo_cambio,\n lote = '$lote',\n cantidad = $cantidad,\n idunidadmedida = $idunidadmedida,\n descripcion = '$descripcion',\n precio_unitario = $precio_unitario,\n idporcentajeutilidad = $idporcentajeutilidad,\n flete = $flete,\n ip = '$ip',\n host = '$host',\n modi_por = $idusr,\n modi_el = NOW()\n WHERE idcotizaciondetalle = $idcotizaciondetalle\";\n $vRet = $this->guardarDatos($query);\n break;\n case 2:\n $query = \"DELETE FROM cotizacion_detalles WHERE idcotizaciondetalle = \".$arg;\n $vRet = $this->guardarDatos($query);\n break;\n case 3:\n parse_str($arg);\n $idusr = $this->getIdUserFromAlias($user);\n $arrIdCotDets = explode('|', $IdCotDets);\n foreach ($arrIdCotDets as $i => $value) {\n $query = \"UPDATE cotizacion_detalles \n SET idmoneda = $idmoneda,\n tipo_cambio = $tipo_cambio \n WHERE idcotizaciondetalle = $arrIdCotDets[$i]\";\n $vRet = $this->guardarDatos($query);\n }\n break; \n\n } // 72\n break;\n\n\n\n\n\n }\n\n return $vRet;\n }", "title": "" }, { "docid": "0a0b214aaec41a0ca8d215802eeeb809", "score": "0.59755504", "text": "static public function ActivarProductos($tabla, $item1, $estado, $item2,$id_user){\n $stmt= Conexion::conectar()->prepare(\"UPDATE $tabla SET estado= :estado WHERE id_producto = :id_producto\");\n $stmt->bindParam(\":estado\",$estado,PDO::PARAM_STR);\n $stmt->bindParam(\":id_producto\",$id_user,PDO::PARAM_INT);\n\n if($stmt->execute()){\n return \"ok\";\n }else{\n return 'error';\n }\n \n $stmt->close();\n $stmt=null;\n}", "title": "" }, { "docid": "b416548e1955964bab2d9463f28026a0", "score": "0.59749955", "text": "protected function actualizar_cliente_modelo($datos){\r\n\t\t\t$query=mainModel::conectar()->prepare(\"UPDATE cliente SET ClienteDNI=:DNI,ClienteNombre=:Nombre,ClienteApellido=:Apellido,ClienteTelefono=:Telefono,ClienteOcupacion=:Ocupacion,ClienteDireccion=:Direccion WHERE CuentaCodigo=:Codigo\");\r\n\t\t\t$query->bindParam(\":DNI\",$datos['DNI']);\r\n\t\t\t$query->bindParam(\":Nombre\",$datos['Nombre']);\r\n\t\t\t$query->bindParam(\":Apellido\",$datos['Apellido']);\r\n\t\t\t$query->bindParam(\":Telefono\",$datos['Telefono']);\r\n\t\t\t$query->bindParam(\":Ocupacion\",$datos['Ocupacion']);\r\n\t\t\t$query->bindParam(\":Direccion\",$datos['Direccion']);\r\n\t\t\t$query->bindParam(\":Codigo\",$datos['Codigo']);\r\n\t\t\t$query->execute();\r\n\t\t\treturn $query;\r\n\t\t}", "title": "" }, { "docid": "08d7c5025e799fd359c840d34e724198", "score": "0.5974414", "text": "public function updateVictima($idAsistencia, $datos) {\n\n if ($datos[0] == 'RangoEtario') {\n $idRangoEtario = $datos[1];\n\n $sql = \"select * from Victima\twhere idAsistencia=$idAsistencia and idRangoEtario=$idRangoEtario\";\n echo $sql;\n $victima = $this->consulta($sql);\n //print_r($victima);\n if (count($victima) == 0) {\n //INSERT INTO `Victima`(`idVictima`, `idGenero`, `idRangoEtario`, `Cantidad`, `idProcedencia`, `idAsistencia`) VALUES ([value-1],[value-2],[value-3],[value-4],[value-5],[value-6])\n //para prototipo genero Otres y Procedencia Locales\n $sql = \"INSERT INTO `Victima`( `idGenero`, `idRangoEtario`, `Cantidad`, `idProcedencia`, `idAsistencia`) VALUES (3,$idRangoEtario,1,1,$idAsistencia)\";\n } else {\n //UPDATE `Victima` SET `idVictima`=[value-1],`idGenero`=[value-2],`idRangoEtario`=[value-3],`Cantidad`=[value-4],`idProcedencia`=[value-5],`idAsistencia`=[value-6] WHERE 1\n $sql = \"UPDATE `Victima` SET `Cantidad`=`Cantidad`+1 WHERE idVictima=\" . $victima[0]['idVictima'];\n }\n try {\n $this->prepare($sql)->execute();\n } catch (PDOException $e) {\n return $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "2ac190e31f7fd0ac1677d1f73b5baa07", "score": "0.59739757", "text": "function atualizarUsuario(){\n\t\t\t\t$bd = new ConexaoBD;\n\t\t\t\t$bd->conectar();\n\t\t\t\t$bd->query(\"UPDATE usuario SET nomeUsuario='$this->nomeUsuario', email='$this->email', telefone='$this->telefone',cidade='$this->cidade', endereco='$this->endereco' WHERE idUsuario='$this->idUsuario'\");\n\t\t\t\t$bd->fechar();\n\t\t\t\t\n\t\t\t}", "title": "" }, { "docid": "2c44f69644c07de9ee1f607dffd39e9c", "score": "0.59734", "text": "function UpdtCaja($sbMercancia, $sbEstado ,$sbCodigoBarras , $sbIdCajas)\n\t{\n\t\t\n\t\topen_database();\n\t\t$qry = \"UPDATE `cajas` set IdMercancia = $sbMercancia, IdEstado = '$sbEstado' , CodigoBarras = '$sbCodigoBarras' where IdCajas = '$sbIdCajas' ; \";\n\t\t$result = mysql_query($qry) or die (mysql_error());\n\t\tclose_database();\n\t}", "title": "" }, { "docid": "9b27d1867d7afdede88223beeedf76b0", "score": "0.5972712", "text": "function editarEvento($conexion,$id_evento, $dia, $mes, $descripcion){\r\n\t$resultado = $conexion->query(\"UPDATE eventos SET dia = '$dia', mes = '$mes', descripcion = '$descripcion' WHERE id = '$id_evento' \");\r\n\t$resultado->execute();\r\n}", "title": "" }, { "docid": "f81916b038679f3d011271f484dc0504", "score": "0.596274", "text": "function atualizarDadosEntrada($id_entrada){\n $conn = F_conect();\n if(isset($id_entrada)){\n $result = mysqli_query($conn, \"Select * from item_entrada where id_entrada=\".$id_entrada);\n $qtd_total=0;\n $preco_total=0;\n if (mysqli_num_rows($result)) {\n while ($row = $result->fetch_assoc()) {\n $qtd_total=$row['qtd']+$qtd_total;\n $preco_total=$row['preco_compra']+$preco_total;\n\n\n\n }\n }\n $sql = \" UPDATE entrada SET qtd_total='\" . $qtd_total . \"' , valor_total='\" .\n $preco_total .\"' WHERE id= \" . $id_entrada ;\n\n if ($conn->query($sql) === TRUE) {\n\n\n\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n $conn->close();\n }\n}", "title": "" }, { "docid": "be33823bbf030bc153aea6547629ae53", "score": "0.5957985", "text": "public function update(){\n $query = \"UPDATE orders\n SET\n order_ID=:order_ID, shop_ID=:shop_ID, closed_at=:closed_at, created_at=:created_at, updated_at=:updated_at,\n total_price=:total_price, subtotal_price=:subtotal_price, total_weight=:total_weight, total_tax=:total_tax,\n currency=:currency,financial_status=:financial_status, total_discounts=:total_discounts, name=:name,\n fulfillment_status=:fulfillment_status,country=:country,province=:province,total_items=:total_items\n ,total_order_shipping_cost=:total_order_shipping_cost,total_order_handling_cost=:total_order_handling_cost\n where order_ID=:order_ID\n \";\n\n // prepare query\n $stmt = $this->conn->prepare($query);\n\n // sanitize\n $this->order_ID=htmlspecialchars(strip_tags($this->order_ID));\n $this->shop_ID=htmlspecialchars(strip_tags($this->shop_ID));\n $this->created_at=htmlspecialchars(strip_tags($this->created_at));\n $this->updated_at=htmlspecialchars(strip_tags($this->updated_at));\n $this->total_price=htmlspecialchars(strip_tags($this->total_price));\n $this->subtotal_price=htmlspecialchars(strip_tags($this->subtotal_price));\n $this->total_weight=htmlspecialchars(strip_tags($this->total_weight));\n $this->total_tax=htmlspecialchars(strip_tags($this->total_tax));\n $this->currency=htmlspecialchars(strip_tags($this->currency));\n $this->financial_status=htmlspecialchars(strip_tags($this->financial_status));\n $this->total_discounts=htmlspecialchars(strip_tags($this->total_discounts));\n $this->name=htmlspecialchars(strip_tags($this->name));\n $this->fulfillment_status=htmlspecialchars(strip_tags($this->fulfillment_status));\n $this->country=htmlspecialchars(strip_tags($this->country));\n $this->province=htmlspecialchars(strip_tags($this->province));\n $this->total_items=htmlspecialchars(strip_tags($this->total_items));\n $this->total_order_shipping_cost=htmlspecialchars(strip_tags($this->total_order_shipping_cost));\n $this->total_order_handling_cost=htmlspecialchars(strip_tags($this->total_order_handling_cost));\n\n // bind values\n $stmt->bindParam(\":order_ID\", $this->order_ID);\n $stmt->bindParam(\":shop_ID\", $this->shop_ID);\n $stmt->bindParam(\":closed_at\", $this->closed_at);\n $stmt->bindParam(\":created_at\", $this->created_at);\n $stmt->bindParam(\":updated_at\", $this->updated_at);\n $stmt->bindParam(\":total_price\", $this->total_price);\n $stmt->bindParam(\":subtotal_price\", $this->subtotal_price);\n $stmt->bindParam(\":total_weight\", $this->total_weight);\n $stmt->bindParam(\":total_tax\", $this->total_tax);\n $stmt->bindParam(\":currency\", $this->currency);\n $stmt->bindParam(\":financial_status\", $this->financial_status);\n $stmt->bindParam(\":total_discounts\", $this->total_discounts);\n $stmt->bindParam(\":name\", $this->name);\n $stmt->bindParam(\":fulfillment_status\", $this->fulfillment_status);\n $stmt->bindParam(\":country\", $this->country);\n $stmt->bindParam(\":province\", $this->province);\n $stmt->bindParam(\":total_items\", $this->total_items);\n $stmt->bindParam(\":total_order_shipping_cost\", $this->total_order_shipping_cost);\n $stmt->bindParam(\":total_order_handling_cost\", $this->total_order_handling_cost);\n\n\n // execute query\n if($stmt->execute()){\n return true;\n }\n\n echo \"\\nPDO::errorInfo():\\n\";\n print_r($stmt->queryString);\n print_r($stmt->errorInfo());\n\n\n return false;\n\n }", "title": "" }, { "docid": "a373771ba0423535bb62f118d1036b74", "score": "0.5951718", "text": "public function run()\r\n {\r\n //\r\n DB::table('financeiros')->updateOrInsert([\r\n\r\n 'form_payment' => 'boleto',\r\n 'value' => '120',\r\n 'readjustment' => '5',\r\n 'early_warning' => '',\r\n 'termination' => '',\r\n 'client_id' => '1',\r\n 'end_fidelity' => '2016-04-10',\r\n 'contract_start' => '2016-04-10',\r\n 'contract_end' => '',\r\n 'dt_payment' => '2016-04-10',\r\n 'response_finance' => 'Marcelo',\r\n 'tel_finance' => '00000000000',\r\n 'email_finance' => '[email protected]',\r\n 'type_payment' => 'mensal',\r\n\r\n ]);\r\n DB::table('financeiros')->updateOrInsert([\r\n\r\n 'form_payment' => 'boleto',\r\n 'value' => '120',\r\n 'readjustment' => '5',\r\n 'early_warning' => '',\r\n 'termination' => '',\r\n 'client_id' => '2',\r\n 'end_fidelity' => '2016-04-10',\r\n 'contract_start' => '2016-04-10',\r\n 'contract_end' => '',\r\n 'dt_payment' => '2016-04-10',\r\n 'response_finance' => 'Marcelo',\r\n 'tel_finance' => '00000000000',\r\n 'email_finance' => '[email protected]',\r\n 'type_payment' => 'anual',\r\n\r\n ]);\r\n DB::table('financeiros')->updateOrInsert([\r\n\r\n 'form_payment' => 'boleto',\r\n 'value' => '120',\r\n 'readjustment' => '5',\r\n 'early_warning' => '',\r\n 'termination' => '',\r\n 'client_id' => '3',\r\n 'end_fidelity' => '2016-04-10',\r\n 'contract_start' => '2016-04-10',\r\n 'contract_end' => '',\r\n 'dt_payment' => '2016-04-10',\r\n 'response_finance' => 'Marcelo',\r\n 'tel_finance' => '00000000000',\r\n 'email_finance' => '[email protected]',\r\n 'type_payment' => 'isento',\r\n\r\n ]);\r\n DB::table('financeiros')->updateOrInsert([\r\n\r\n 'form_payment' => 'boleto',\r\n 'value' => '120',\r\n 'readjustment' => '5',\r\n 'early_warning' => '',\r\n 'termination' => '',\r\n 'client_id' => '4',\r\n 'end_fidelity' => '2016-04-10',\r\n 'contract_start' => '2016-04-10',\r\n 'contract_end' => '',\r\n 'dt_payment' => '2016-04-10',\r\n 'response_finance' => 'Marcelo',\r\n 'tel_finance' => '00000000000',\r\n 'email_finance' => '[email protected]',\r\n 'type_payment' => 'mensal',\r\n\r\n ]);\r\n DB::table('financeiros')->updateOrInsert([\r\n\r\n 'form_payment' => 'boleto',\r\n 'value' => '120',\r\n 'readjustment' => '5',\r\n 'early_warning' => '',\r\n 'termination' => '',\r\n 'client_id' => '5',\r\n 'end_fidelity' => '2016-04-10',\r\n 'contract_start' => '2016-04-10',\r\n 'contract_end' => '',\r\n 'dt_payment' => '2016-04-10',\r\n 'response_finance' => 'Marcelo',\r\n 'tel_finance' => '00000000000',\r\n 'email_finance' => '[email protected]',\r\n 'type_payment' => 'mensal',\r\n\r\n ]);\r\n DB::table('financeiros')->updateOrInsert([\r\n\r\n 'form_payment' => 'boleto',\r\n 'value' => '120',\r\n 'readjustment' => '5',\r\n 'early_warning' => '',\r\n 'termination' => '',\r\n 'client_id' => '6',\r\n 'end_fidelity' => '2016-04-10',\r\n 'contract_start' => '2016-04-10',\r\n 'contract_end' => '',\r\n 'dt_payment' => '2016-04-10',\r\n 'response_finance' => 'Marcelo',\r\n 'tel_finance' => '00000000000',\r\n 'email_finance' => '[email protected]',\r\n 'type_payment' => 'mensal',\r\n\r\n ]);\r\n DB::table('financeiros')->updateOrInsert([\r\n\r\n 'form_payment' => 'boleto',\r\n 'value' => '120',\r\n 'readjustment' => '5',\r\n 'early_warning' => '',\r\n 'termination' => '',\r\n 'client_id' => '7',\r\n 'end_fidelity' => '2016-04-10',\r\n 'contract_start' => '2016-04-10',\r\n 'contract_end' => '',\r\n 'dt_payment' => '2016-04-10',\r\n 'response_finance' => 'Marcelo',\r\n 'tel_finance' => '00000000000',\r\n 'email_finance' => '[email protected]',\r\n 'type_payment' => 'mensal',\r\n\r\n ]);\r\n }", "title": "" }, { "docid": "e954f74d62aea7890af5d4119ceb5a28", "score": "0.5950435", "text": "public function actualizar_db($tabla, $where, $Objeto = null){\n\n\t\t//si hay objeto($Perfil)guardara db externa al objeto\n\t\tif(is_null($Objeto)){$Objeto = $this;}\n\n\t\t//si hay imagenes\n\t if($_FILES) {\n\t \t$Upimg = new Upimg();\n\t\t\t$fotito = $Upimg->check_if_files($tabla);\n\t\t}\n\n\t\t$Objeto->where('id',$where);\n\n\t\t//quito los all\n\t\t$campos = array();\n\t\tforeach($_POST as $key => $value){\n\t\t\tif($key == 'form_to') {unset($_POST[$key]);\t}\n\t\t\tif($value == '0') {unset($_POST[$key]);\t}\n\t\t}\n\t\t\n\t\tforeach($_POST as $nombre_post => $valor_post) {\n\t\t\tif(is_array($valor_post)) {\n\t\t\t\t$campos[$nombre_post] = implode(',',$valor_post);\n\t\t\t}else{\n\t\t\t\t$campos[$nombre_post] = $valor_post;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($Objeto->update($tabla,$campos)){\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "e7ca0e538f149dadead18ac2fe30287d", "score": "0.5944546", "text": "public function UPDATE($sql,$parametros = null){\n\n // verifica se é uma instrução UPDATE\n if (!preg_match(\"/^UPDATE/i\", $sql)){\n // apresenta o erro\n throw new Exception('Base de dados - não é uma instrução update.');\n\n // não mostra a linha e o erro\n //die(\"Base de dados - não é uma instrução select.\");\n }\n\n\n // liga o DB\n $this->ligar();\n\n \n // comunica\n try {\n // comunicação com DB\n if(!empty($parametros)){\n $executar = $this->ligacao->prepare($sql);\n $executar->execute($parametros);\n \n } else {\n $executar = $this->ligacao->prepare($sql);\n $executar->execute();\n \n }\n\n } catch (PDOException $e) {\n // caso exista erro\n return false;\n }\n // desliga\n // desconecta do bando de dados\n $this->desligar();\n }", "title": "" }, { "docid": "ebaf75208a8a24378aa6da306bd79859", "score": "0.5938118", "text": "function modificarvaloresdeconfiguracion($vlamin, $valmax, $cate, $ganaven, $ganafab, $ganadue, $codrango) {\r\n include 'database.php';\r\n $pdo = Database::connect();\r\n $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\r\n $sql = \"UPDATE `rango_vendedor` SET `valorMinimo`=?,`valorMaximo`=?,`Categoria`=?,`gananciaVen`=?,`gananciaFab`=?,`gananciaDue`=? WHERE `id_rango` = ? \";\r\n $q = $pdo->prepare($sql);\r\n $q->execute(array($vlamin, $valmax, $cate, $ganaven, $ganafab, $ganadue, $codrango));\r\n Database::disconnect();\r\n}", "title": "" }, { "docid": "5596cf1c4599d45f70b343dded50d9d1", "score": "0.5936702", "text": "function funcion0005($cadenaBusqueda,$cadenaReemplazo) {\n\t\t\t$cnx= conectar_postgres();\n\t\t\t$cons = \"UPDATE Central.cesantias SET codigo = replace( codigo,'\". $cadenaBusqueda.\"'\".\",'\". $cadenaReemplazo.\"'\".\"), nit = replace( nit,'\". $cadenaBusqueda.\"'\".\",'\". $cadenaReemplazo.\"'\".\"), nombre = replace( nombre,'\". $cadenaBusqueda.\"'\".\",'\". $cadenaReemplazo.\"'\".\")\";\n\t\t\t\n\t\t\t$res = pg_query($cnx , $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\techo \"<p class='error1'> Error en la normalizacion de la codificacion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "cf89217eccd67a63b226c493f92472d8", "score": "0.59363204", "text": "public function save(){\n $conn = new db();\n $conn = $conn->connexion();\n $req = $conn->prepare(\"INSERT INTO commande (id_article, quantite, prix, date_commande) VALUES (:id_article, :quantite, :prix, now())\");\n $req->bindParam(':id_article', $this->id_article);\n $req->bindParam(':quantite', $this->quantity);\n $req->bindParam(':prix', $this->prix);\n $req->execute();\n }", "title": "" }, { "docid": "79813fbe6a3402849a3d60c228933610", "score": "0.5935473", "text": "public function update()\n\t{\n\t\t$sql = \"update \" . self::$tablename . \" set code=\\\"$this->code\\\",name=\\\"$this->name\\\",ruc=\\\"$this->ruc\\\",phone=\\\"$this->phone\\\",email=\\\"$this->email\\\" where id=$this->id\";\n\t\tExecutor::doit($sql);\n\t}", "title": "" }, { "docid": "f6ecf1459e4562b41a8636f41fa46b5b", "score": "0.59337157", "text": "public static function Insert($exames_dados){\n\n $sql1=\"UPDATE tbl_exame SET status = 0\";\n\n $sql2 = \"INSERT INTO tbl_exame(titulo,texto,procedimento,status,ativo)\n VALUES('\".$exames_dados->titulo.\"','\".$exames_dados->texto_descricao.\"','\".$exames_dados->texto_procedimento.\"','1','1');\";\n\n\n //Instancia o banco e cria uma variavel\n $conex = new Mysql_db();\n\n /*Chama o método para conectar no banco de dados e guarda o retorno da conexao na variavel*/\n $PDO_conex = $conex->Conectar();\n\n //Excutar o script no banco de dados\n if($PDO_conex->query($sql1) && $PDO_conex->query($sql2)){\n \n $auditoria = new Auditoria();\n \n $auditoria::Insert($auditoria);\n \n echo \"<script>location.reload();</script>\";\n\n \t\t\t}else {\n \t\t\t\t//Mensagem de erro\n \t\t\t\techo \"Error inserir no Banco de Dados\";\n echo $sql2;\n \t\t\t}\n //Fechar a conexão com o banco de dados\n $conex->Desconectar();\n }", "title": "" }, { "docid": "af30ee1e8f88cfdaea55cd180c9de5d1", "score": "0.5932543", "text": "static public function mdlEditarCategoria($tabla, $datos){\n\n $stmt = Conexion::conectar()->prepare(\"UPDATE $tabla SET categoria = :categoria WHERE id = :id\");\n\n $stmt -> bindParam(\":categoria\", $datos[\"categoria\"], PDO::PARAM_STR);\n $stmt -> bindParam(\":id\", $datos[\"id\"], PDO::PARAM_INT);\n\n if($stmt->execute()){\n\n return \"ok\";\n\n }else{\n\n return \"error\";\n \n }\n\n $stmt->close();\n $stmt = null;\n\n}", "title": "" }, { "docid": "9a0d20bc9dd7b0b89c48c8d9004b6045", "score": "0.5932113", "text": "public function cambiaJefeVenta($rutJV,$rutSup){\n \n $sql=\"update usuario set rut_padre='$rutJV' where rut='$rutSup'\";\n $cambio=Yii::app()->db->createCommand($sql)->execute(); \n }", "title": "" }, { "docid": "bcd61c137c2179cdfb11dc6c25dc6ffd", "score": "0.5931599", "text": "public function editar(){\n $sql = \"UPDATE carrera SET Carrera = ?, Descripcion = ? WHERE Id_Carrera = ?;\";\n //preparando la consulta\n $query = $this->conexion->prepare($sql);\n //bindeando los parametros de la consulta prepar\n $query->bindParam(1, $this->carrera);\n $query->bindParam(2, $this->descripcion);\n $query->bindParam(3, $this->id_carrera);\n //ejecutando\n $result = $query->execute();\n //retornando true si se ejecuto, false si no\n return $result;\n }", "title": "" }, { "docid": "6075b63912b61ea247e4f1dc7f67f950", "score": "0.5927427", "text": "static public function mdlReservaMesaAdmin($tabla,$datos){\n require_once \"../../php/modelos/conexion.php\";\n $usuarioNombre = $datos['cliente'];\n $mesa = $datos['mesa'];\n $fecha = $datos['fecha'];\n $hora = $datos['hora'];\n\n $stmt = Conexion::conectar() -> prepare(\"SELECT * FROM reserva WHERE fecha_reserva=:fecha and hora_reserva=:hora\n and fk_id_mesa=:mesa\");\n\n $stmt->bindParam(\":fecha\",$fecha,PDO::PARAM_STR);\n $stmt->bindParam(\":hora\",$hora,PDO::PARAM_STR);\n $stmt->bindParam(\":mesa\",$mesa,PDO::PARAM_INT);\n\n if($stmt->execute()){\n $num = $stmt->rowCount();\n if($num > 0){\n echo \"<script>alert('Error, esta mesa ya se encuentra reservada esa fecha y hora!')</script>\";\n echo '<div class=\"alert alert-danger\">Error, esta mesa ya se encuentra reservada esa fecha y hora!</div>';\n }else{\n $stmtClient = Conexion::conectar() -> prepare(\"SELECT * FROM usuarios WHERE nombre_usuario=:usuario\");\n $stmtClient -> bindParam(\":usuario\",$usuarioNombre,PDO::PARAM_STR);\n\n if($stmtClient->execute()){\n $numClient = $stmtClient -> rowCount();\n if($numClient > 0){\n $resClient = $stmtClient -> fetchAll();\n foreach($resClient as $client){\n $r_client = $client['id_usuario'];\n }\n $stmt = Conexion::conectar() -> prepare(\"INSERT INTO reserva(fecha_reserva, hora_reserva, fk_id_usuario,fk_id_mesa)\n VALUES (:fecha,:hora,:id_usuario,:id_mesa)\");\n $stmt->bindParam(\":fecha\",$datos[\"fecha\"],PDO::PARAM_STR);\n $stmt->bindParam(\":hora\",$datos[\"hora\"],PDO::PARAM_STR);\n $stmt->bindParam(\":id_usuario\",$r_client,PDO::PARAM_INT);\n $stmt->bindParam(\":id_mesa\",$datos[\"mesa\"],PDO::PARAM_INT);\n\n if($stmt->execute()){\n\n $sql = Conexion::conectar() -> prepare(\"UPDATE mesas SET estado_mesa='Ocupada' WHERE id_mesa = :id\");\n $sql -> bindParam(\":id\",$mesa,PDO::PARAM_INT);\n\n if($sql -> execute()){\n echo \"<script>alert('Mesa reservada exitosamente!')</script>\";\n return 'ok';\n } \n }else{\n print_r(Conexion::conectar()->errorInfo());\n }\n $stmt->close();\n $stmt=null; \n }else{\n echo \"<script>alert('No existe el usuario!')</script>\";\n echo \"<div class='alert alert-danger'>No existe el usuario!</div>\";\n }\n } \n }\n }else{\n print_r(Conexion::conectar()->errorInfo());\n }\n }", "title": "" }, { "docid": "c6101453778d86479d33705dbce2a41f", "score": "0.59247607", "text": "public function actualizar(){\n $data = array(\n 'nombre' => 'Victor',\n 'apellido' => 'martinez' \n );\n //capitaliza todo el nombre y aoellido\n $data = capitalizar_todo($data);\n \n $this->db->where('id', 1);\n $this->db->update('test', $data);\n\n echo \"se actualizo la data\";\n \n }", "title": "" }, { "docid": "fd24ed37c132e46fc664ca8fa091b669", "score": "0.59185016", "text": "public function save() {\n $data = [];\n foreach (static::$columns as $column) {\n if (isset($this->$column)) {\n $data[$column] = $this->$column;\n }\n }\n if ($this->isDirty) {\n // modify modifydate only if object was modified\n // $data = array_merge($data, [static::$modified => date('Y-m-d H:i:s')]);\n }\n\n $qb = QueryBuilder::table(static::$table)\n ->set($data)\n ->addFilter([\n QueryFilter::Filter(QueryFilter::Equal, static::$primaryKey, $this->getPrimaryKey())\n ]);\n $qb->update();\n if ($qb->getMysqli()->error) {\n return $qb->getMysqli()->error;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "8975c49389d286b655a3289ca32916ea", "score": "0.591844", "text": "public function atualizar(){\r\n return (new Database('contas'))->update(' id = '.$this->id, [\r\n 'agencia' => $this->agencia,\r\n 'conta' => $this->conta,\r\n 'doador' => $this->doador,\r\n ]);\r\n }", "title": "" }, { "docid": "e6d04c71644bb0e4d95b060f77083637", "score": "0.5915526", "text": "function guardar_estado_cobranza($id_cobranza,$id_estado,$id_factoring=0){\r\n global $_ses_user;\r\n //los demas estados ya no son validos\r\n $sql=\"update licitaciones.historial_estados_cobranzas set activo=0 where id_cobranza=$id_cobranza\";\r\n sql($sql) or fin_pagina();\r\n\r\n $usuario=$_ses_user[\"name\"];\r\n $fecha=date(\"Y-m-d H:i:s\");\r\n $campos=\"id_cobranza,id_estado_cobranza,usuario,fecha,activo\";\r\n if ($id_factoring)\r\n $campos.=\" ,id_factoring\";\r\n if ($id_estado<>-1) $values=\"$id_cobranza,$id_estado,'$usuario','$fecha',1\";\r\n else $values=\"$id_cobranza,6,'$usuario','$fecha',1\";\r\n if ($id_factoring)\r\n $values.=\",$id_factoring\";\r\n //inserto el estado valido\r\n $sql=\" insert into licitaciones.historial_estados_cobranzas ($campos) values ($values)\";\r\n sql($sql) or fin_pagina();\r\n\r\n}", "title": "" }, { "docid": "5973f601d70b26ee0509c781aad68c95", "score": "0.59149426", "text": "static public function ventasModel($idCliente, $nroFactura, $total, $idAdmin, $fechaVenta)\n {\n // insertamos el número de factura.\n $sql7 = Conexion::conectar()->prepare(\"INSERT INTO facturas(estado)VALUES(estado = 1)\");\n\n if($sql7->execute()){\n // actualizamos las tablas temporales.\n $sql = Conexion::conectar()->prepare(\"UPDATE temp SET idCliente=:idCliente, nroFactura=:nroFactura\");\n $sql->bindParam(':idCliente', $idCliente);\n $sql->bindParam(':nroFactura', $nroFactura);\n $sql->execute();\n $sql1 = Conexion::conectar()->prepare(\"UPDATE tempmedia SET idCliente=:idCliente, nroFactura=:nroFactura\");\n $sql1->bindParam(':idCliente', $idCliente);\n $sql1->bindParam(':nroFactura', $nroFactura);\n $sql1->execute();\n\n// insertamos lo de las tablas temporales a las de detalles correspondientes.\n $sql2 = Conexion::conectar()->prepare(\"INSERT INTO detalles(kilo,descripcion,cantidad,precio,fecha,nroFactura,idCuarteo,idCliente)\n SELECT tem.kiloMedia,tem.descripcion,tem.cantidad,tem.precioMedia,:fechaVenta,tem.nroFactura,tem.id,tem.idCliente FROM temp tem\");\n $sql2->execute(array(':fechaVenta'=>$fechaVenta));\n\n\n\n $sql3 = Conexion::conectar()->prepare(\"INSERT INTO detalles(kilo,nroTropa, descripcion,cantidad,precio, fecha,nroFactura,idInventario,idCliente)\n SELECT temm.kilo,temm.nroTropa,temm.descripcionMedia,temm.cantidad,temm.precio,:fechaVenta,\n temm.nroFactura,temm.idInventario,temm.idCliente FROM tempmedia temm\");\n $sql3->execute(array(':fechaVenta'=>$fechaVenta));\n\n\n\n // $hoy = date('y-m-d');\n\n $sql57 = Conexion::conectar()->prepare(\"INSERT INTO facturado(nroFactura,fecha, idCliente, totalVenta, idAdmin)\n VALUES(:nroFactura,:fecha,:idCliente,:totalVenta,:idAdmin)\");\n $sql57->bindParam(':nroFactura', $nroFactura);\n $sql57->bindParam(':fecha', $fechaVenta);\n $sql57->bindParam(':idCliente', $idCliente);\n $sql57->bindParam(':totalVenta', $total);\n $sql57->bindParam(':idAdmin', $idAdmin);\n $sql57->execute();\n\n $sql571 = Conexion::conectar()->prepare(\"INSERT INTO cuentacorriente(comprobante,entrada,idCliente, fecha , nroFactura)\n VALUES(:comprobante,:totalVenta,:idCliente,:fecha, :nroFactura)\");\n $fa = \"Factura\". ' '. $nroFactura;\n $sql571->bindParam(':comprobante', $fa);\n $sql571->bindParam(':totalVenta', $total);\n $sql571->bindParam(':idCliente', $idCliente);\n $sql571->bindParam(':fecha', $fechaVenta);\n $sql571->bindParam(':nroFactura', $nroFactura);\n $sql571->execute();\n\n $sql1 = Conexion::conectar()->prepare(\"UPDATE saldos SET saldoActual= saldoActual + $total, saldoFinal= saldoFinal + $total WHERE idCliente=:idCliente \" );\n $sql1->bindParam(':idCliente', $idCliente);\n\n $sql1->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 $sql11 = Conexion::conectar()->prepare(\"UPDATE cuentacorriente\n SET saldo= (SELECT saldoActual FROM saldos WHERE idCliente=$idCliente) WHERE idCliente=:idCliente AND idCuentaCorriente = :id \" );\n $sql11->bindParam(':idCliente', $idCliente);\n $sql11->bindParam(':id', $id);\n\n $sql11->execute();\n\n // borramos las tablas temporales para la siguiente venta.\n $borrar = Conexion::conectar()->prepare(\"DELETE FROM temp\");\n $borrar->execute();\n\n $borrar1 = Conexion::conectar()->prepare(\"DELETE FROM tempmedia\");\n $borrar1->execute();\n\n }\n return 'success';\n\n }", "title": "" }, { "docid": "b64b9cdd0544ce9545950d24059b2c75", "score": "0.5914111", "text": "public function execute(){\n\t\tif($this->executed) return;\n\n\t\t$this->getQuery();\n\t\tparent::execute();\n\n\t}", "title": "" }, { "docid": "b125d4138d053e03764eac11d9ddf0cc", "score": "0.59113634", "text": "public static function mdlActualizarBandaElevadora($tabla, $datos)\n {\n\n $stmt = Conexion::getConexionLocal()->prepare(\"UPDATE bandaElevadora set marcaBandaElevadora=:marcaBandaElevadora, anchoBandaElevadora=:anchoBandaElevadora, distanciaEntrePoleasElevadora=:distanciaEntrePoleasElevadora, noLonaBandaElevadora=:noLonaBandaElevadora, tipoLonaBandaElevadora=:tipoLonaBandaElevadora, espesorTotalBandaElevadora=:espesorTotalBandaElevadora, espesorCojinActualElevadora=:espesorCojinActualElevadora,\n espesorCubiertaSuperiorElevadora=:espesorCubiertaSuperiorElevadora, espesorCubiertaInferiorElevadora=:espesorCubiertaInferiorElevadora, tipoCubiertaElevadora=:tipoCubiertaElevadora, tipoEmpalmeElevadora=:tipoEmpalmeElevadora, estadoEmpalmeElevadora=:estadoEmpalmeElevadora, resistenciaRoturaLonaElevadora=:resistenciaRoturaLonaElevadora, velocidadBandaElevadora=:velocidadBandaElevadora,\n marcaBandaElevadoraAnterior=:marcaBandaElevadoraAnterior, anchoBandaElevadoraAnterior=:anchoBandaElevadoraAnterior, noLonasBandaElevadoraAnterior=:noLonasBandaElevadoraAnterior, tipoLonaBandaElevadoraAnterior=:tipoLonaBandaElevadoraAnterior, espesorTotalBandaElevadoraAnterior=:espesorTotalBandaElevadoraAnterior, espesorCubiertaSuperiorBandaElevadoraAnterior=:espesorCubiertaSuperiorBandaElevadoraAnterior,\n espesorCojinElevadoraAnterior=:espesorCojinElevadoraAnterior, espesorCubiertaInferiorBandaElevadoraAnterior=:espesorCubiertaInferiorBandaElevadoraAnterior, tipoCubiertaElevadoraAnterior=:tipoCubiertaElevadoraAnterior, tipoEmpalmeElevadoraAnterior=:tipoEmpalmeElevadoraAnterior, resistenciaRoturaBandaElevadoraAnterior=:resistenciaRoturaBandaElevadoraAnterior,\n tonsTransportadasBandaElevadoraAnterior=:tonsTransportadasBandaElevadoraAnterior, velocidadBandaElevadoraAnterior=:velocidadBandaElevadoraAnterior, causaFallaCambioBandaElevadoraAnterior=:causaFallaCambioBandaElevadoraAnterior, pesoMaterialEnCadaCangilon=:pesoMaterialEnCadaCangilon, pesoCangilonVacio=:pesoCangilonVacio, longitudCangilon=:longitudCangilon, materialCangilon=:materialCangilon, tipoCangilon=:tipoCangilon,\n proyeccionCangilon=:proyeccionCangilon, profundidadCangilon=:profundidadCangilon, marcaCangilon=:marcaCangilon, referenciaCangilon=:referenciaCangilon, capacidadCangilon=:capacidadCangilon, noFilasCangilones=:noFilasCangilones, separacionCangilones=:separacionCangilones, noAgujeros=:noAgujeros, distanciaBordeBandaEstructura=:distanciaBordeBandaEstructura, distanciaPosteriorBandaEstructura=:distanciaPosteriorBandaEstructura,\n distanciaLaboFrontalCangilonEstructura=:distanciaLaboFrontalCangilonEstructura, distanciaBordesCangilonEstructura=:distanciaBordesCangilonEstructura, tipoVentilacion=:tipoVentilacion, diametroPoleaMotrizElevadora=:diametroPoleaMotrizElevadora, anchoPoleaMotrizElevadora=:anchoPoleaMotrizElevadora, tipoPoleaMotrizElevadora=:tipoPoleaMotrizElevadora, largoEjeMotrizElevadora=:largoEjeMotrizElevadora,\n diametroEjeMotrizElevadora=:diametroEjeMotrizElevadora, bandaCentradaEnPoleaMotrizElevadora=:bandaCentradaEnPoleaMotrizElevadora, estadoRevestimientoPoleaMotrizElevadora=:estadoRevestimientoPoleaMotrizElevadora, potenciaMotorMotrizElevadora=:potenciaMotorMotrizElevadora, rpmSalidaReductorMotrizElevadora=:rpmSalidaReductorMotrizElevadora, guardaReductorPoleaMotrizElevadora=:guardaReductorPoleaMotrizElevadora,\n diametroPoleaColaElevadora=:diametroPoleaColaElevadora, anchoPoleaColaElevadora=:anchoPoleaColaElevadora, tipoPoleaColaElevadora=:tipoPoleaColaElevadora, largoEjePoleaColaElevadora=:largoEjePoleaColaElevadora, diametroEjePoleaColaElevadora=:diametroEjePoleaColaElevadora, bandaCentradaEnPoleaColaElevadora=:bandaCentradaEnPoleaColaElevadora,\n estadoRevestimientoPoleaColaElevadora=:estadoRevestimientoPoleaColaElevadora, longitudTensorTornilloPoleaColaElevadora=:longitudTensorTornilloPoleaColaElevadora, longitudRecorridoContrapesaPoleaColaElevadora=:longitudRecorridoContrapesaPoleaColaElevadora, cargaTrabajoBandaElevadora=:cargaTrabajoBandaElevadora, temperaturaMaterialElevadora=:temperaturaMaterialElevadora,\n empalmeMecanicoElevadora=:empalmeMecanicoElevadora, diametroRoscaElevadora=:diametroRoscaElevadora, largoTornilloElevadora=:largoTornilloElevadora, materialTornilloElevadora=:materialTornilloElevadora, anchoCabezaElevadorPuertaInspeccion=:anchoCabezaElevadorPuertaInspeccion, largoCabezaElevadorPuertaInspeccion=:largoCabezaElevadorPuertaInspeccion, anchoBotaElevadorPuertaInspeccion=:anchoBotaElevadorPuertaInspeccion,\n largoBotaElevadorPuertaInspeccion=:largoBotaElevadorPuertaInspeccion, monitorPeligro=:monitorPeligro, rodamiento=:rodamiento, monitorDesalineacion=:monitorDesalineacion, monitorVelocidad=:monitorVelocidad, sensorInductivo=:sensorInductivo, indicadorNivel=:indicadorNivel, cajaUnion=:cajaUnion, alarmaYPantalla=:alarmaYPantalla, interruptorSeguridad=:interruptorSeguridad, materialElevadora=:materialElevadora,\n ataqueQuimicoElevadora=:ataqueQuimicoElevadora, ataqueTemperaturaElevadora=:ataqueTemperaturaElevadora, ataqueAceitesElevadora=:ataqueAceitesElevadora, ataqueAbrasivoElevadora=:ataqueAbrasivoElevadora, capacidadElevadora=:capacidadElevadora, horasTrabajoDiaElevadora=:horasTrabajoDiaElevadora, diasTrabajoSemanaElevadora=:diasTrabajoSemanaElevadora, abrasividadElevadora=:abrasividadElevadora,\n porcentajeFinosElevadora=:porcentajeFinosElevadora, maxGranulometriaElevadora=:maxGranulometriaElevadora, densidadMaterialElevadora=:densidadMaterialElevadora, tempMaxMaterialSobreBandaElevadora=:tempMaxMaterialSobreBandaElevadora, tempPromedioMaterialSobreBandaElevadora=:tempPromedioMaterialSobreBandaElevadora, variosPuntosDeAlimentacion=:variosPuntosDeAlimentacion, lluviaDeMaterial=:lluviaDeMaterial,\n anchoPiernaElevador=:anchoPiernaElevador, profundidadPiernaElevador=:profundidadPiernaElevador, tempAmbienteMin=:tempAmbienteMin, tempAmbienteMax=:tempAmbienteMax, tipoDescarga=:tipoDescarga, tipoCarga=:tipoCarga, observacionRegistroElevadora=:observacionRegistroElevadora where idRegistro=:idRegistro\");\n\n $stmt->bindParam(':idRegistro', $datos[\"idRegistro\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaBandaElevadora\", $datos[\"marcaBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoBandaElevadora\", $datos[\"anchoBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaEntrePoleasElevadora\", $datos[\"distanciaEntrePoleasElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":noLonaBandaElevadora\", $datos[\"noLonaBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoLonaBandaElevadora\", $datos[\"tipoLonaBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorTotalBandaElevadora\", $datos[\"espesorTotalBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCojinActualElevadora\", $datos[\"espesorCojinActualElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaSuperiorElevadora\", $datos[\"espesorCubiertaSuperiorElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaInferiorElevadora\", $datos[\"espesorCubiertaInferiorElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoCubiertaElevadora\", $datos[\"tipoCubiertaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoEmpalmeElevadora\", $datos[\"tipoEmpalmeElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoEmpalmeElevadora\", $datos[\"estadoEmpalmeElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":resistenciaRoturaLonaElevadora\", $datos[\"resistenciaRoturaLonaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":velocidadBandaElevadora\", $datos[\"velocidadBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaBandaElevadoraAnterior\", $datos[\"marcaBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoBandaElevadoraAnterior\", $datos[\"anchoBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":noLonasBandaElevadoraAnterior\", $datos[\"noLonasBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoLonaBandaElevadoraAnterior\", $datos[\"tipoLonaBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorTotalBandaElevadoraAnterior\", $datos[\"espesorTotalBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaSuperiorBandaElevadoraAnterior\", $datos[\"espesorCubiertaSuperiorBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCojinElevadoraAnterior\", $datos[\"espesorCojinElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":espesorCubiertaInferiorBandaElevadoraAnterior\", $datos[\"espesorCubiertaInferiorBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoCubiertaElevadoraAnterior\", $datos[\"tipoCubiertaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoEmpalmeElevadoraAnterior\", $datos[\"tipoEmpalmeElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":resistenciaRoturaBandaElevadoraAnterior\", $datos[\"resistenciaRoturaBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tonsTransportadasBandaElevadoraAnterior\", $datos[\"tonsTransportadasBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":velocidadBandaElevadoraAnterior\", $datos[\"velocidadBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":causaFallaCambioBandaElevadoraAnterior\", $datos[\"causaFallaCambioBandaElevadoraAnterior\"], PDO::PARAM_STR);\n $stmt->bindParam(\":pesoMaterialEnCadaCangilon\", $datos[\"pesoMaterialEnCadaCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":pesoCangilonVacio\", $datos[\"pesoCangilonVacio\"], PDO::PARAM_STR);\n $stmt->bindParam(\":longitudCangilon\", $datos[\"longitudCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialCangilon\", $datos[\"materialCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoCangilon\", $datos[\"tipoCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":proyeccionCangilon\", $datos[\"proyeccionCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":profundidadCangilon\", $datos[\"profundidadCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":marcaCangilon\", $datos[\"marcaCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":referenciaCangilon\", $datos[\"referenciaCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":capacidadCangilon\", $datos[\"capacidadCangilon\"], PDO::PARAM_STR);\n $stmt->bindParam(\":noFilasCangilones\", $datos[\"noFilasCangilones\"], PDO::PARAM_STR);\n $stmt->bindParam(\":separacionCangilones\", $datos[\"separacionCangilones\"], PDO::PARAM_STR);\n $stmt->bindParam(\":noAgujeros\", $datos[\"noAgujeros\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaBordeBandaEstructura\", $datos[\"distanciaBordeBandaEstructura\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaPosteriorBandaEstructura\", $datos[\"distanciaPosteriorBandaEstructura\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaLaboFrontalCangilonEstructura\", $datos[\"distanciaLaboFrontalCangilonEstructura\"], PDO::PARAM_STR);\n $stmt->bindParam(\":distanciaBordesCangilonEstructura\", $datos[\"distanciaBordesCangilonEstructura\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoVentilacion\", $datos[\"tipoVentilacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroPoleaMotrizElevadora\", $datos[\"diametroPoleaMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPoleaMotrizElevadora\", $datos[\"anchoPoleaMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoPoleaMotrizElevadora\", $datos[\"tipoPoleaMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjeMotrizElevadora\", $datos[\"largoEjeMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjeMotrizElevadora\", $datos[\"diametroEjeMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":bandaCentradaEnPoleaMotrizElevadora\", $datos[\"bandaCentradaEnPoleaMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRevestimientoPoleaMotrizElevadora\", $datos[\"estadoRevestimientoPoleaMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":potenciaMotorMotrizElevadora\", $datos[\"potenciaMotorMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":rpmSalidaReductorMotrizElevadora\", $datos[\"rpmSalidaReductorMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":guardaReductorPoleaMotrizElevadora\", $datos[\"guardaReductorPoleaMotrizElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroPoleaColaElevadora\", $datos[\"diametroPoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPoleaColaElevadora\", $datos[\"anchoPoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoPoleaColaElevadora\", $datos[\"tipoPoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoEjePoleaColaElevadora\", $datos[\"largoEjePoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroEjePoleaColaElevadora\", $datos[\"diametroEjePoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":bandaCentradaEnPoleaColaElevadora\", $datos[\"bandaCentradaEnPoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":estadoRevestimientoPoleaColaElevadora\", $datos[\"estadoRevestimientoPoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":longitudTensorTornilloPoleaColaElevadora\", $datos[\"longitudTensorTornilloPoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":longitudRecorridoContrapesaPoleaColaElevadora\", $datos[\"longitudRecorridoContrapesaPoleaColaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cargaTrabajoBandaElevadora\", $datos[\"cargaTrabajoBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":temperaturaMaterialElevadora\", $datos[\"temperaturaMaterialElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":empalmeMecanicoElevadora\", $datos[\"empalmeMecanicoElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diametroRoscaElevadora\", $datos[\"diametroRoscaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoTornilloElevadora\", $datos[\"largoTornilloElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialTornilloElevadora\", $datos[\"materialTornilloElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoCabezaElevadorPuertaInspeccion\", $datos[\"anchoCabezaElevadorPuertaInspeccion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoCabezaElevadorPuertaInspeccion\", $datos[\"largoCabezaElevadorPuertaInspeccion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoBotaElevadorPuertaInspeccion\", $datos[\"anchoBotaElevadorPuertaInspeccion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":largoBotaElevadorPuertaInspeccion\", $datos[\"largoBotaElevadorPuertaInspeccion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":monitorPeligro\", $datos[\"monitorPeligro\"], PDO::PARAM_STR);\n $stmt->bindParam(\":rodamiento\", $datos[\"rodamiento\"], PDO::PARAM_STR);\n $stmt->bindParam(\":monitorDesalineacion\", $datos[\"monitorDesalineacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":monitorVelocidad\", $datos[\"monitorVelocidad\"], PDO::PARAM_STR);\n $stmt->bindParam(\":sensorInductivo\", $datos[\"sensorInductivo\"], PDO::PARAM_STR);\n $stmt->bindParam(\":indicadorNivel\", $datos[\"indicadorNivel\"], PDO::PARAM_STR);\n $stmt->bindParam(\":cajaUnion\", $datos[\"cajaUnion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":alarmaYPantalla\", $datos[\"alarmaYPantalla\"], PDO::PARAM_STR);\n $stmt->bindParam(\":interruptorSeguridad\", $datos[\"interruptorSeguridad\"], PDO::PARAM_STR);\n $stmt->bindParam(\":materialElevadora\", $datos[\"materialElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueQuimicoElevadora\", $datos[\"ataqueQuimicoElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueTemperaturaElevadora\", $datos[\"ataqueTemperaturaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueAceitesElevadora\", $datos[\"ataqueAceitesElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":ataqueAbrasivoElevadora\", $datos[\"ataqueAbrasivoElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":capacidadElevadora\", $datos[\"capacidadElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":horasTrabajoDiaElevadora\", $datos[\"horasTrabajoDiaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":diasTrabajoSemanaElevadora\", $datos[\"diasTrabajoSemanaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":abrasividadElevadora\", $datos[\"abrasividadElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":porcentajeFinosElevadora\", $datos[\"porcentajeFinosElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":maxGranulometriaElevadora\", $datos[\"maxGranulometriaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":densidadMaterialElevadora\", $datos[\"densidadMaterialElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempMaxMaterialSobreBandaElevadora\", $datos[\"tempMaxMaterialSobreBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempPromedioMaterialSobreBandaElevadora\", $datos[\"tempPromedioMaterialSobreBandaElevadora\"], PDO::PARAM_STR);\n $stmt->bindParam(\":variosPuntosDeAlimentacion\", $datos[\"variosPuntosDeAlimentacion\"], PDO::PARAM_STR);\n $stmt->bindParam(\":lluviaDeMaterial\", $datos[\"lluviaDeMaterial\"], PDO::PARAM_STR);\n $stmt->bindParam(\":anchoPiernaElevador\", $datos[\"anchoPiernaElevador\"], PDO::PARAM_STR);\n $stmt->bindParam(\":profundidadPiernaElevador\", $datos[\"profundidadPiernaElevador\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempAmbienteMin\", $datos[\"tempAmbienteMin\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tempAmbienteMax\", $datos[\"tempAmbienteMax\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoDescarga\", $datos[\"tipoDescarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":tipoCarga\", $datos[\"tipoCarga\"], PDO::PARAM_STR);\n $stmt->bindParam(\":observacionRegistroElevadora\", $datos[\"observacionRegistroElevadora\"], PDO::PARAM_STR);\n\n if ($stmt->execute()) {\n return \"ok\";\n } else {\n return \"ERROR AL CREAR REGISTRO BANDA ELEVADORA\";\n }\n\n $stmt->close();\n $stmt = null;\n // var_dump($datos);\n }", "title": "" }, { "docid": "e546c4226147de251bbde627ba72f68f", "score": "0.59080195", "text": "function updateUser($id,$nom,$prenom,$age,$adresse){\r\n try{\r\n $conn = getDatabaseConnexion();\r\n $requete = \"UPDATE utilisateur SET \r\n nom = '$nom',\r\n prenom = '$prenom',\r\n age = '$age',\r\n adresse = '$adresse'\r\n WHERE id = '$id' \" ;\r\n $stmt = $conn->query($requete);\r\n \r\n}\r\n\r\ncatch(PDOException $e){\r\n echo $sql.\"<p> Erreur : requete non executée </p>\" . $e->getMessage().\"<br>\";\r\n \r\n}\r\n\r\n}", "title": "" }, { "docid": "5d015da2ba7609041eb9bc0d1bd24e0d", "score": "0.5905837", "text": "public function save() {\n $this->destroy();\n $query = 'insert into Notificacion (notificacion_id,fecha,contenido,user_id) values (\"'.$this->getNotificacion_id().'\",\"'.$this->getFecha().'\",\"'.$this->getContenido().'\",\"'.$this->getUser_id().'\")';\n $this->driver->exec($query);\n}", "title": "" }, { "docid": "cdb67ec5bda84e5c3aff762eb8a3080b", "score": "0.5905066", "text": "function projetFini() {\n $req = \"UPDATE projets SET id_avancements = 2 WHERE id_projets =\".$_GET['id_projet'];\n $connection = Connect();\n $result = execQuery($connection, $req)->fetch();\n return $result['0'];\n}", "title": "" } ]
1ffdb442d6001a04b99988b1a9e09452
END OF SESSIONS ERROR MANAGEMENT Create the error handler:
[ { "docid": "8e7b27dc7f870a88c0cba41665da3bff", "score": "0.6221789", "text": "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n global $debug, $contact_email;\n\n // Build the error message:\n $message = \"An error occurred in script '$e_file' on line $e_line: $e_message\";\n\n // Append $e_vars to the $message:\n $message .= print_r($e_vars, 1);\n\n if ($debug) { // Show the error.\n\n echo '<div class=\"error\">' . $message . '</div>';\n debug_print_backtrace();\n\n } else {\n\n // Log the error:\n error_log ($message, 1, $contact_email); // Send email.\n\n // Only print an error message if the error isn't a notice or strict.\n if ( ($e_number != E_NOTICE) && ($e_number < 2048)) {\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div>';\n }\n\n } // End of $debug IF.\n\n}", "title": "" } ]
[ { "docid": "20d9b5561ae731e1000574dffc0776b0", "score": "0.7853633", "text": "function app_error_handler\n(\n $in_errno,\n $in_errstr,\n $in_errfile,\n $in_errline,\n $in_errcontext\n)\n{\n if (isset($_SESSION) \n and (isset($_SESSION['errstr'])\n or isset($_session['exception'])))\n {\n return;\n }\n\n /**\n * first, we will log the error so we know about it.\n */\n\nerror_log(date('c') . \" Unhandled Error ($in_errfile, $in_errline): \" . \"$in_errno, '$in_errstr'\\r\\n\", 3, 'beerfeed.log');\n\n /**\n * if we have session information, send the user to more\n * helpful pastures.\n */\n if (isset($_SESSION))\n {\n $_SESSION['errstr'] = \"$in_errstr ($in_errfile, line $in_errline)\";\n }\n \n header('Location: error.php ');\n \n}", "title": "" }, { "docid": "92c35070d740eb4a39724f8f62a4ef9e", "score": "0.7091956", "text": "public function handleErrors()\n {\n register_shutdown_function(array($this, 'shutdownFunction'));\n set_error_handler(array($this, 'errorHandler'));\n }", "title": "" }, { "docid": "76e9a30b1b4a84f3f24a544cef7b0b88", "score": "0.7008791", "text": "function errorHandler($errno, $errstr, $errfile, $errline)\r\n\t{\r\n\t\t# Set new Page object\r\n\t\t$c = new Error();\r\n\t\t\r\n\t\t# Call setPage() method\r\n\t\treturn $c->errorHandler( $exception );\r\n\t\r\n\t}", "title": "" }, { "docid": "888dba18683687b811987543207729c9", "score": "0.7004375", "text": "abstract protected function registerErrorHandler(): void;", "title": "" }, { "docid": "631fbef73455774b38652e253f9f0f37", "score": "0.69925404", "text": "function error_handler($errno, $errstr, $errfile, $errline, $errcontext = '')\n{\n global $db_connection, $auth, $admin_email, $die_quietly;\n\n switch ($errno) {\n case E_USER_NOTICE:\n case E_WARNING:\n case E_NOTICE:\n case E_CORE_WARNING:\n case E_COMPILE_WARNING:\n break;\n case E_USER_WARNING:\n case E_USER_ERROR:\n case E_ERROR:\n case E_PARSE:\n case E_CORE_ERROR:\n case E_COMPILE_ERROR:\n if ($die_quietly) {\n die();\n }\n \n if (mysqli_error($db_connection)) {\n $ERRNO = mysqli_errno($db_connection);\n $ERROR = mysqli_error($db_connection);\n $errstr .= \"\\nMySQL error: $ERRNO : $ERROR\";\n } else {\n $query = null;\n }\n\n $url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n\n if ($_SERVER['QUERY_STRING']) {\n $url .= '?' . $_SERVER['QUERY_STRING'];\n }\n\n $errorstring = $errstr . \"\\n\";\n\n if ($query) {\n $errorstring .= \"SQL query: $query\\n\";\n }\n\n if (isset($errcontext['this'])) {\n if (is_object($errcontext['this'])) {\n $classname = get_class($errcontext['this']);\n $parentclass = get_parent_class($errcontext['this']);\n $errorstring .= \"Object/Class: '$classname', Parent Class: '$parentclass'.\\n\";\n }\n }\n\n echo '<script>console.error(`' . ($auth->user['admin'] ? $errorstring : 'Server error') . '`);</script>';\n \n if (!$admin_email) {\n return;\n }\n\n $headers = 'MIME-Version: 1.0' . \"\\n\";\n $headers .= 'Content-type: text/html; charset=iso-8859-1' . \"\\n\";\n $headers .= 'From: [email protected]' . \"\\n\";\n \n $errorstring .= \"Script: '{$_SERVER['PHP_SELF']}'.\\n\";\n $errorstring .= $url . \"\\n\";\n\n $var_dump = print_r($_GET, true);\n $var_dump .= print_r($_POST, true);\n $var_dump .= print_r($_SESSION, true);\n $var_dump .= print_r($_SERVER, true);\n\n $body = $errorstring;\n $body .= '<pre>' . $var_dump . '</pre>';\n \n // remove null character\n $body = str_replace(\"\\0\", \"\", $body);\n mail($admin_email, 'PHP Error ' . $_SERVER['HTTP_HOST'], $body, $headers);\n\n default:\n break;\n }\n}", "title": "" }, { "docid": "b90b8f509bc62aa1b765617978531752", "score": "0.69360065", "text": "function session_error_handling_function($code, $msg, $file, $line) {\r\n}", "title": "" }, { "docid": "3f5072cae9538037cf011f74d805ce98", "score": "0.6929709", "text": "public function errorAction()\r\n {\r\n Propel::getConnection()->forceRollBack();\r\n\r\n\r\n $errors = $this->_getParam('error_handler');\r\n\r\n \r\n //38239 Log error message with some useful data\r\n \r\n $oUser = Phoenix_Auth_User::getInstance();\r\n $sUserName = $oUser ? (is_string($oUser) ? $oUser : $oUser->getNomPrenom()) : 'Non connecté';\r\n $sErreur = '- Utilisateur : ' . $sUserName . '\r\n - Type erreur : ' . $errors->type . '\r\n - Erreur : ' . $errors->exception->getFile() . ' (' . $errors->exception->getLine() . ') : ' . $errors->exception->getMessage() . '\r\n - Trace : ' . PHP_EOL . $errors->exception->getTraceAsString();\r\n Phoenix_Logger::getInstanceErreur()->logError($sErreur, 'E_ERROR', $errors->exception->getCode());\r\n \r\n if(!$oUser){\r\n $this->_helper->layout()->setLayout('auth');\r\n }\r\n\r\n /**\r\n * comportement pour php cli\r\n */\r\n if (PHP_SAPI == \"cli\") {\r\n echo 'Erreur : ' . PHP_EOL . $sErreur;\r\n } elseif ($this->_request->isXmlHttpRequest()) {\r\n /**\r\n * comportement pour requêtes ajax\r\n */\r\n $this->_helper->ViewRenderer->setNoRender(true);\r\n $this->getResponse()->clearBody();\r\n $this->_helper->Json(new Phoenix_Ajax_Components_Response(true, $errors->exception->getFile() . ' (' . $errors->exception->getLine() . ') : ' . $errors->exception->getMessage() . '<br />' . nl2br($errors->exception->getTraceAsString())));\r\n } else {\r\n /**\r\n * comportement pour requête http classique\r\n */\r\n if (!$errors || !$errors instanceof ArrayObject) {\r\n $this->view->message = 'You have reached the error page';\r\n return;\r\n }\r\n\r\n switch ($errors->type) {\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\r\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\r\n // 404 error -- controller or action not found\r\n $this->getResponse()->setHttpResponseCode(404);\r\n $this->view->message = 'Page not found';\r\n break;\r\n default:\r\n // application error\r\n $this->getResponse()->setHttpResponseCode(500);\r\n $this->view->message = 'Application error';\r\n break;\r\n }\r\n\r\n // conditionally display exceptions\r\n if ($this->getInvokeArg('displayExceptions') == true) {\r\n $this->view->exception = $errors->exception;\r\n }\r\n\r\n $this->view->request = $errors->request;\r\n }\r\n }", "title": "" }, { "docid": "6501328c8a1506a5f828e2a874b4f884", "score": "0.69045466", "text": "function ErrorHandler() { \n\t\t\n\t\t$this->setFlags(); // false by default\n\t\tset_error_handler(array(&$this, 'ERROR_HOOK')); \n\t\t$this->container = array();\n\t\t\n\t\t/**\n\t\t * check first if the log directory is setup, if not then create a logs dir with a+w && a-r\n\t\t */\n\t\tif (!file_exists(AT_CONTENT_DIR . 'logs/') || !realpath(AT_CONTENT_DIR. 'logs/')) {\n\t\t\t$this->makeLogDir();\n\t\t} else if (!is_dir(AT_CONTENT_DIR .'logs/')) {\n\t\t\t$this->makeLogDir();\n\t\t} \n\t}", "title": "" }, { "docid": "0fde3c1c040fb25364046c5a415d314d", "score": "0.6882851", "text": "public function error() {\n ## in the future we do something here\n }", "title": "" }, { "docid": "82a42c5fb1c068ba84bb7e20b76244da", "score": "0.6870401", "text": "public function error_handler($errno, $errstr, $errfile, $errline, $errcontext = null)\n {\n // throwing an exception in an error handler will halt execution\n // set the last error and continue\n $this->last_error = compact('errno', 'errstr', 'errfile', 'errline', 'errcontext');\n }", "title": "" }, { "docid": "d728250856ab46e069018c25c52d1397", "score": "0.6857763", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\tglobal $live, $contact_email;\n\t$message = \"An error occurred in script '$e_file' on line $e_line: \\n$e_message\\n\";\n\t//backtrace is everything that happened up until the point of the error\n\t$message .= \"<pre>\" .print_r(debug_backtrace( ), 1) . \"</pre>\\n\";\n\t// or use $message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n\";\n\t//if site isn't live, show error message in browser\n\tif (!$live) {\n\t\techo '<div class=\"error\">' . nl2br($message) . '</div>';\n\t} else {\n\terror_log ($message, 1, $contact_email, 'From:[email protected]');\n\t}\n\n\tif ($e_number != E_NOTICE) {\n\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div>';\n\t}\n}", "title": "" }, { "docid": "1cf280a11dc8051deb630ffe247a2250", "score": "0.67852056", "text": "public function error() {}", "title": "" }, { "docid": "8fb50c4bb0ef8de7d31beb288d87bd8d", "score": "0.67808634", "text": "function error()\n\t{\n\t}", "title": "" }, { "docid": "2b08cac1f15d6009284a4261095c76ea", "score": "0.67760247", "text": "function myErrorHandler ($errno, $errstr, $errfile, $errline)\r\n {\r\n echo \"<br /><table bgcolor='#cccccc'><tr><td>\r\n <p><b>ERROR:</b> $errstr</p>\r\n <p>Please try again, or contact us and tell us that\r\n the error occurred in line $errline of file '$errfile'</p>\";\r\n if ($errno == E_USER_ERROR||$errno == E_ERROR)\r\n {\r\n echo '<p>This error was fatal, program ending</p>';\r\n echo '</td></tr></table>';\r\n //close open resources, include page footer, etc\r\n exit;\r\n }\r\n echo '</td></tr></table>';\r\n }", "title": "" }, { "docid": "763af5326899eac0222f11bb40858cd3", "score": "0.6765136", "text": "private function set_error_handler() { set_error_handler(array($this, 'error_handler')); }", "title": "" }, { "docid": "0411e4ab90f04af3a136165a3932d24b", "score": "0.6761549", "text": "public function errHandler($errno, $errstr){\n\t}", "title": "" }, { "docid": "e980a995e4c338e967e035205a81132d", "score": "0.6730816", "text": "public function errorAction ( )\n {\n $errors = $this->_getParam('error_handler');\n\n if ($errors) {print_r($errors->exception->getMessage()); die; }\n\n if (!$errors || !$errors instanceof ArrayObject) {\n $this->view->message = 'You have reached the error page';\n return;\n }\n\n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n // 404 error -- controller or action not found\n $this->getResponse()->setHttpResponseCode(404);\n $priority = Zend_Log::NOTICE;\n $this->view->message = 'Page not found';\n break;\n default:\n // application error\n $this->getResponse()->setHttpResponseCode(500);\n $priority = Zend_Log::CRIT;\n $this->view->message = 'Application error';\n break;\n }\n\n // Log exception, if logger available\n if ($log = $this->getLog()) {\n $log->log($this->view->message, $priority, $errors->exception);\n $log->log('Request Parameters', $priority, $errors->request->getParams());\n }\n\n // conditionally display exceptions\n if ($this->getInvokeArg('displayExceptions') == true) {\n $this->view->exception = $errors->exception;\n }\n\n $this->view->request = $errors->request;\n\n }", "title": "" }, { "docid": "13e4f24d7997a449b560741be4151190", "score": "0.6720352", "text": "function error_handler($errno, $errstr, $errfile, $errline)\n{\n // use error_handler\n // transform a system error to a ErrorException\n $error = new ErrorException($errstr, 0, $errno, $errfile, $errline);\n switch ($errno)\n {\n case E_ERROR:\n case E_RECOVERABLE_ERROR:\n case E_USER_ERROR:\n throw $error;\n default:\n pt\\framework\\exception::append($error);\n }\n}", "title": "" }, { "docid": "5b3d199cffb744614737c0ea54400a20", "score": "0.6718064", "text": "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\t\t\n\t\t// Build Error Message\n\t\t$message = \"An error occurred in the script '$e_file' on line $e_line: $e_message\\n\";\n\t\t\n\t\t// Add date and time\n\t\t$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\t\t\n\t\tif (!LIVE) { // Development (print error)\n\t\t\t\n\t\t\t// Show the error message:\n\t\t\techo '<div class=\"error\">' . nl2br($message);\n\t\t\t\n\t\t\t// Add variables and backtrace:\n\t\t\techo '<pre>' . print_r($e_vars, 1) . \"\\n\";\n\t\t\tdebug_print_backtrace();\n\t\t\techo '</pre></div>';\n\t\t\t\n\t\t} else { // Don't show error:\n\t\t\n\t\t\t// Send email to admin:\n\t\t\t$body = $message . \"\\n\" . print_r($e_vars, 1);\n\t\t\tmail(EMAIL, 'Site Error!', $body, 'From: [email protected]');\n\t\t\t\n\t\t\t// Only print an error message if the error isn't a notice\n\t\t\tif ($e_number != E_NOTICE) {\n\t\t\t\techo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "97b8a0cf9a65d4ed45572cc26f8ddf04", "score": "0.6714723", "text": "abstract public function error();", "title": "" }, { "docid": "c24651833ce66be2c1fb0227c9a229a9", "score": "0.6688411", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line) {\r\n\t$message = 'An error occurred in script ' . $e_file . ' on line ' . $e_line . \": $e_message\";\r\n\t//error_log ($message, 1, '[email protected]'); // Production (send email)\r\n\techo '<font color=\"red\" size=\"1\">', $message, '</font>'; // Development (print the error in red)\r\n}", "title": "" }, { "docid": "af928d1d3a5c2ce9c94d9921e00d0baf", "score": "0.6685446", "text": "function SetCustomErrorHandling() {\r\n set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext) {\r\n $e['errno'] = $errno;\r\n $e['errstr'] = $errstr;\r\n $e['errfile'] = $errfile;\r\n $e['errline'] = $errline;\r\n $e['$errcontext'] = $errcontext;\r\n ThrowError(4, $e); // ERROR-4\r\n });\r\n}", "title": "" }, { "docid": "8d9c9b11f848aa2e7422d42f5e7f8724", "score": "0.6653301", "text": "function kw_error_handler($enum, $emsg, $efile, $eline, $vardump) \r\n{\r\n// *** DATA\r\n\r\n\t// Return (void)\r\n\t\r\n\r\n// *** MANIPULATE\r\n\r\n\t// ignorable errors\r\n\tif ( $enum == E_NOTICE && substr($emsg, 0, 17) == \"Undefined index: \" ) return;\r\n\tif ( defined('E_STRICT') && $enum == E_STRICT ) return;\r\n\t\r\n\t// bugtrace\r\n\t$_TRACE = debug_backtrace();\r\n\t$_ftrace = basename($_TRACE[1]['file'], '.php');\r\n\t$_ltrace = $_TRACE[1]['line'];\r\n\t$_fxtrace = $_TRACE[1]['function'];\r\n\t\r\n\t// output info\r\n\t$output = <<<FULL\r\n\r\n<!-- ERROR -->\r\n<div style=\"font-size:11px; padding:4px; background:#000; color:#990000; border:1px solid red;\">\r\n <b>Error #{$enum}</b> &raquo; <em>{$emsg}</em>\r\n <div style=\"color:#ff0000;\">line {$eline} in file {$efile}</div>\r\n <div style=\"color:#ccc;\">trace: <i>fx $_fxtrace</i> on line {$_ltrace} of file {$_ftrace}</div>\r\n</div>\r\n\r\nFULL;\r\n\r\n\t\t// print\r\n\t\techo $output;\r\n\t\r\n\r\n// *** RETURN\r\n\r\n\treturn;\r\n}", "title": "" }, { "docid": "66a44fe596f26ebfb62f312779b1ab6d", "score": "0.66226274", "text": "public function customHandleError($errorNo, $errorStr, $errorFile, $errorLine);", "title": "" }, { "docid": "ed665f7afc9471e103d69bdcf6e40193", "score": "0.66192126", "text": "abstract public function errors();", "title": "" }, { "docid": "e2df9e91d3862e2d643460fefc4279f1", "score": "0.66155165", "text": "public static function handleError(){\r\n\t \tif (!function_exists('error_get_last'))return;\r\n\t \t$error = error_get_last();\r\n\t \tif(ENVIRONMENT == 'LOCAL' && $error['type'] !=8 ){\r\n\t\t\tprint_r($error);exit;\t \t\t\r\n\t \t}\r\n \tif ($error['type'] ==1 || $error['type']==4 ) {\r\n\t\t \r\n\t\t\t\t$errormsgblock ='<div>\r\n\t\t\t\t\t\t\t\t\t <ul>\r\n\t\t\t\t\t <li><b>Line</b> '.$error['line'].'</li>\r\n\t\t\t <li><b>Message</b> '.$error['message'].'</li>\r\n\t\t\t <li><b>File</b> '.$error['file'].'</li> \r\n\t\t\t </ul>\r\n\t\t\t </div>';\r\n\t\t\t\tPageContext::printErrorMessage(\"Fatal Error\",$errormsgblock);\t\t\r\n \t}\r\n\t }", "title": "" }, { "docid": "a7f100fdd79b2153c8bea52b3e610bce", "score": "0.66150963", "text": "function atk14_error_handler($errno, $errstr, $errfile, $errline){\n\tglobal $HTTP_RESPONSE,$HTTP_REQUEST;\n\n\tif(($errno==E_USER_ERROR || $errno==512) && preg_match(\"/^Smarty/\",$errstr)){\n\t\tif(DEVELOPMENT){\n\t\t\techo \"$errstr\";\n\t\t}\n\n\t\t// catching Smarty syntax error\n\t\tif($errno==E_USER_ERROR){\n\t\t\tif(!DEVELOPMENT){\n\t\t\t\t$HTTP_RESPONSE->internalServerError();\n\t\t\t\t$HTTP_RESPONSE->flushAll();\n\t\t\t}\n\t\t}\n\n\t\t// catching Smarty template missing error\n\t\t//if($errno==512){\n\t\t\t// ...\n\t\t//}\n\n\t\tif($HTTP_REQUEST){\n\t\t\t$errstr .= \" (url: \".$HTTP_REQUEST->getUrl().\")\";\n\t\t}\n\t\terror_log($errstr);\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "ff121d73b3325c3721a582f60c0fe1ef", "score": "0.66057533", "text": "public function error();", "title": "" }, { "docid": "ff121d73b3325c3721a582f60c0fe1ef", "score": "0.66057533", "text": "public function error();", "title": "" }, { "docid": "740d6091b43a08397c7227f38cdcf7f7", "score": "0.6605295", "text": "protected function callbackError()\n {\n }", "title": "" }, { "docid": "017eee2359c80eb6886d3b717f197688", "score": "0.6584635", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n // Need these two vars:\n global $live, $contact_email;\n $message = \"An error occurred in script '$e_file' on line $e_line:\\n$e_message\\n\";\n $message .= \"<pre>\" .print_r(debug_backtrace(), 1) . \"</pre>\\n\";\n // Or just append $e_vars to the message:\n //\t$message .= \"<pre>\" . print_r ($e_vars, 1) . \"</pre>\\n\";\n\n if (!$live) {\n echo '<div class=\"error\">' . nl2br($message) . '</div>';\n } else {\n // Send the error in an email:\n //error_log ($message, 1, $contact_email, 'From:[email protected]');\n if ($e_number != E_NOTICE) {\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div>';\n }\n }\n return true; \n }", "title": "" }, { "docid": "dbe5d9904bd98f05afd2c28307ce9ebd", "score": "0.65569043", "text": "function myErrorHandler($errno, $errstr, $errfile, $errline, $errcontext) {\r\n\t$f = fopen(HOME.'/errors.txt', 'a');\r\n\tfwrite($f, \r\n\t\t\"Date: \".date('Y-m-d H:i:s').\"\\n\".\r\n\t\t\"Code: $errno\\n\".\r\n\t\t\"ErrStr: $errstr\\n\".\r\n\t\t\"$errfile:$errline\\n\".\r\n\t\tprint_r($_SERVER, true).\"\\n\".\r\n\t\tprint_r($errcontext, true).\"\\n\\n\\n\");\r\n\treturn false;\r\n}", "title": "" }, { "docid": "63abcc3abe4072d106db06a853dda3c2", "score": "0.6550212", "text": "function app_exception_handler($in_exception)\n{\n /**\n * If we already have an error, then do no more.\n */\n \n\n if (isset($_SESSION)\n and (isset($_SESSION['errstr'])\n or isset($_session['exception'])))\n { \n return;\n }\n\n /**\n * first, log the exception\n */\n $class = get_class($in_exception);\n $file = $in_exception->getFile();\n $line = $in_exception->getLine();\n $msg = $in_exception->getMessage();\n error_log(date('c') . \" Unhandled Exception: $class ($file, $line): \" . \"$msg\\r\\n\", 3, 'beerfeed.log');\n \n if (isset($_SESSION))\n {\n $_SESSION['exception'] = $in_exception;\n }\n\n header('Location: error.php ');\n}", "title": "" }, { "docid": "3610be779bf517f4f6c7dd95a0ffbcf4", "score": "0.6549447", "text": "public function errorsesion(){\n frame($this,'errorriniciosesion');\n \n }", "title": "" }, { "docid": "6fa7aeae991f5b79ebcb451aeae37c8a", "score": "0.6529753", "text": "protected function registerErrorHandler()\n {\n# set_error_handler(array($this, 'handleError'));\n }", "title": "" }, { "docid": "619a408d36e99ab87c2dcd5f1dfb0d4a", "score": "0.6528705", "text": "public function _error()\n\t{\n\t\t$this->process(self::ERROR, func_get_args());\n\t}", "title": "" }, { "docid": "853ff48e80921ea4105ded208c784e96", "score": "0.65173364", "text": "function FatalErrorHandler()\n{\n\n $error = error_get_last();\n if ($error !== NULL) {\n if ($error[\"type\"] == '1' || $error[\"type\"] == '4' || $error[\"type\"] == '16' || $error[\"type\"] == '64' || $error[\"type\"] == '4096') {\n $errno = GetErrorType($error[\"type\"]);\n $errfile = $error[\"file\"];\n $errline = $error[\"line\"];\n $errstr = $error[\"message\"];\n $Err = '<strong>' . $errno . '<br/></strong>' . $errstr . '<br />' . $errno . ' on line ' . $errline . ' in ' . $errfile . '<br />';\n// if (ON_SCREEN_ERRORS === TRUE) {\n// err($Err);\n// }\n// if (SEND_ERROR_EMAILS === TRUE) {\n// $Path = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n// gfErrEmail($Err, $Path, $errno);\n// }\n }\n }\n}", "title": "" }, { "docid": "3310625c3650f25c1c95896476590219", "score": "0.65122867", "text": "function own_error_handler($errno, $errstr, $errfile, $errline) {\r\n\r\n\t$errmsg = \"\";\r\n\r\n\tswitch ($errno) {\r\n\r\n\t/* E_ERROR */\r\n\tcase 1:\r\n\t\t$errmsg = \"Fatal run-time errors. These indicate errors that can not be recovered from, such as a memory allocation problem. Execution of the script is halted.\";\r\n\t\tbreak;\r\n\r\n\t/* E_WARNING */\r\n\tcase 2:\r\n\t\t$errmsg = \"Run-time warnings (non-fatal errors). Execution of the script is not halted.\";\r\n\t\tbreak;\r\n\r\n\t/* E_PARSE */\r\n\tcase 4:\r\n\t\t$errmsg = \"Compile-time parse errors. Parse errors should only be generated by the parser.\";\r\n\t\tbreak;\r\n\r\n\t/* E_NOTICE */\r\n\tcase 8:\r\n\t\t$errmsg = \"Run-time notices. Indicate that the script encountered something that could indicate an error, but could also happen in the normal course of running a script.\";\r\n\t\tbreak;\r\n\r\n\t/* E_CORE_ERROR */\r\n\tcase 16:\r\n\t\t$errmsg = \"Fatal errors that occur during PHP's initial startup. This is like an E_ERROR, except it is generated by the core of PHP.\";\r\n\t\tbreak;\r\n\r\n\t/* E_CORE_WARNING */\r\n\tcase 32:\r\n\t\t$errmsg = \"Warnings (non-fatal errors) that occur during PHP's initial startup. This is like an E_WARNING, except it is generated by the core of PHP.\";\r\n\t\tbreak;\r\n\r\n\t/* E_COMPILE_ERROR */\r\n\tcase 64:\r\n\t\t$errmsg = \"Fatal compile-time errors. This is like an E_ERROR, except it is generated by the Zend Scripting Engine.\";\r\n\t\tbreak;\r\n\r\n\t/* E_COMPILE_WARNING */\r\n\tcase 128:\r\n\t\t$errmsg = \"Compile-time warnings (non-fatal errors). This is like an E_WARNING, except it is generated by the Zend Scripting Engine.\";\r\n\t\tbreak;\r\n\r\n\t/* E_USER_ERROR */\r\n\tcase 256:\r\n\t\t$errmsg = \"User-generated error message. This is like an E_ERROR, except it is generated in PHP code by using the PHP function trigger_error().\";\r\n\t\tbreak;\r\n\r\n\t/* E_USER_WARNING */\r\n\tcase 512:\r\n\t\t$errmsg = \"User-generated warning message. This is like an E_WARNING, except it is generated in PHP code by using the PHP function trigger_error().\";\r\n\t\tbreak;\r\n\r\n\t/* E_USER_NOTICE */\r\n\tcase 1024:\r\n\t\t$errmsg = \"User-generated notice message. This is like an E_NOTICE, except it is generated in PHP code by using the PHP function trigger_error().\";\r\n\t\tbreak;\r\n\r\n\t/* E_ALL */\r\n\tcase 2047:\r\n\t\t$errmsg = \"All errors and warnings, as supported, except of level E_STRICT.\";\r\n\t\tbreak;\r\n\r\n\t/* E_STRICT */\r\n\tcase 2048:\r\n\t\t$errmsg = \"Run-time notices. Enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code.\";\r\n\t\tbreak;\r\n\r\n\tdefault:\r\n\t\t$errmsg = \"Unkown error type\";\r\n\t\tbreak;\r\n\t}\r\n\r\n\tif (DEF_DEBUG) {\r\n\r\n\t\techo \"<div class=\\\"alert alert-error\\\">\";\r\n\t\techo \"<table class=\\\"table table-condensed\\\">\";\r\n\t\techo \"<tbody>\";\r\n\t\techo \"<tr>\";\r\n\t\techo \"<td><a class=\\\"btn btn-danger\\\" href=\\\"#\\\">Danger</a> Error Number</td>\";\r\n\t\techo \"<td>\".$errno.\"</td>\";\r\n\t\techo \"</tr>\";\r\n\t\techo \"<tr>\";\r\n\t\techo \"<td>Error</td>\";\r\n\t\techo \"<td>\".$errstr.\"</td>\";\r\n\t\techo \"</tr>\";\r\n\t\techo \"<tr>\";\r\n\t\techo \"<td>Error File</td>\";\r\n\t\techo \"<td>\".$errfile.\"</td>\";\r\n\t\techo \"</tr>\";\r\n\t\techo \"<tr>\";\r\n\t\techo \"<td>Error Line</td>\";\r\n\t\techo \"<td>\".$errline.\"</td>\";\r\n\t\techo \"</tr>\";\r\n\t\techo \"<tr>\";\r\n\t\techo \"<td>Error Description</td>\";\r\n\t\techo \"<td>\".$errmsg.\"</td>\";\r\n\t\techo \"</tr>\";\r\n\t\techo \"</tbody>\";\r\n\t\techo \"</table>\";\r\n\t\techo \"</div>\";\r\n\t}\r\n}", "title": "" }, { "docid": "2763953d071f43950ed420f2009c6e4e", "score": "0.6509816", "text": "function customer_error_handler($errno, $errmsg, $filename, $linenum, $vars) {\n\t\t\tif( (2048 & $errno) == 2048 ) return;\n\t\t\t$this->core->log->notice( \"Library Error $errno: $errmsg in $filename :$linenum\");\n\t\t}", "title": "" }, { "docid": "12c3fb9eab4579cfa5eb706d825b7cf8", "score": "0.649693", "text": "function userErrorHandler ($errno, $errmsg, $filename, $linenum, $vars) {\r\n // de erro onde as únicas entradas a serem\r\n // consideradas são 2,8,256,512 e 1024\r\n $errortype = array (\r\n 1 => \"Error\",\r\n 2 => \"Warning\",\r\n 4 => \"Parsing Error\",\r\n 8 => \"Notice\",\r\n 16 => \"Core Error\",\r\n 32 => \"Core Warning\",\r\n 64 => \"Compile Error\",\r\n 128 => \"Compile Warning\",\r\n 256 => \"User Error\",\r\n 512 => \"User Warning\",\r\n 1024=> \"User Notice\"\r\n );\r\n\r\n // define mensagens de erro que devem ser ignoradas\r\n $ignore_errors = array (\r\n \"UNDEFINED INDEX\",\r\n \"USE OF UNDEFINED CONSTANT\"\r\n );\r\n\r\n // verifica se o erro capturado não corresponde\r\n // a algum tipo de erro que deve ser ignorado\r\n $trigger_error = TRUE;\r\n for ($i=0; $i<count($ignore_errors); $i++) {\r\n if (ereg($ignore_errors[$i],strtoupper($errmsg))) {\r\n $trigger_error = FALSE;\r\n }\r\n }\r\n if ($trigger_error) {\r\n // conjunto de tipos de erros para os quais será feito var trace\r\n $user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);\r\n\r\n // armazena os dados capturados pelo tratador de erros\r\n // número do erro, tipo do erro, mensagem de erro, arquivo e linha do código\r\n $err = $errno.\"|\";\r\n $err .= $errortype[$errno].\"|\";\r\n $err .= $errmsg.\"|\";\r\n $err .= $filename.\"|\";\r\n $err .= $linenum.\"|\";\r\n\r\n // realiza var trace para erros de usuário\r\n if (in_array($errno, $user_errors)) {\r\n ob_start();\r\n var_dump($vars);\r\n $err .= ob_get_contents();\r\n ob_end_clean();\r\n }\r\n\r\n // imprime o erro para visualização local\r\n if (LOCAL == \"APOLO\") {\r\n friendlyErrorMessage($err,$errortype[$errno]);\r\n }\r\n\r\n // salva no log de erros\r\n if (defined('PHP_ERROR_LOG_DEST')) {\r\n error_log(captureGlobalInfo().$err.\"<*>\\n\", 3, PHP_ERROR_LOG_DEST);\r\n }\r\n else {\r\n error_log(captureGlobalInfo().$err.\"<*>\\n\", 3, PHP_ERROR_LOG_DEST);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "657f038b64fc44c7ee5f2f89f092cfa2", "score": "0.64963317", "text": "public function errorAction()\n\t{\n\t\t$this->navBar('/dlayer/index/index');\n\t\t\n\t\t$errors = $this->_getParam('error_handler');\n\t\t\n\t\tif (!$errors || !$errors instanceof ArrayObject) {\n\t\t\t$this->view->message = 'You have reached the error page';\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tswitch ($errors->type) {\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n\t\t\t\t// 404 error -- controller or action not found\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\t\t\t\t$priority = Zend_Log::NOTICE;\n\t\t\t\t$this->view->message = 'Page not found';\n\t\t\tbreak;\n\t\t\t\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$priority = Zend_Log::CRIT;\n\t\t\t\t$this->view->message = 'Application error';\n\t\t\tbreak;\n\t\t\t\n\t\t\tdefault:\n\t\t\t\t// application error\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\t\t\t\t$priority = Zend_Log::CRIT;\n\t\t\t\t$this->view->message = 'Application error';\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t// Log exception, if logger available\n\t\tif ($log = $this->getLog()) {\n\t\t\t$log->log($this->view->message, $priority, $errors->exception);\n\t\t\t$log->log('Request Parameters', $priority, $errors->request->getParams());\n\t\t}\n\t\t\n\t\t// conditionally display exceptions\n\t\tif ($this->getInvokeArg('displayExceptions') == true) {\n\t\t\t$this->view->exception = $errors->exception;\n\t\t}\n\t\t\n\t\t$this->view->request = $errors->request;\n\t\t$this->view->request_params = $errors->request->getParams();\n\t}", "title": "" }, { "docid": "41d1aec01f13ebefce51e88f1b601c02", "score": "0.64936185", "text": "function error_handler_exception($errno, $errstr, $errfile, $errline ) \n\t{\n\t throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\t \n\t}", "title": "" }, { "docid": "4de267ba3cbab5e57bce46f01eb0f043", "score": "0.6476965", "text": "private function initErrors() {\n $errors = (E_ALL) & ~(E_STRICT|E_NOTICE|E_USER_NOTICE);\n set_error_handler(\n function($errno, $errmsg, $errfile, $errline, $errcontext) {\n throw new \\ErrorException($errmsg, $errno, $errno, $errfile, $errline);\n },\n $errors\n );\n set_exception_handler([$this, 'exceptionHandler']);\n }", "title": "" }, { "docid": "fe41fef4e921e5c57b3e727b91969489", "score": "0.6475367", "text": "public static function register_error_handler()\n\t{\n\t\tset_error_handler(__CLASS__.'::error_handler', E_RECOVERABLE_ERROR);\n\t}", "title": "" }, { "docid": "8745025d97269224b27f95e209c4d667", "score": "0.6470605", "text": "function SimpleSAML_error_handler($errno, $errstr, $errfile = null, $errline = 0, $errcontext = null)\n{\n if (!class_exists('SimpleSAML\\Logger')) {\n /* We are probably logging a deprecation-warning during parsing. Unfortunately, the autoloader is disabled at\n * this point, so we should stop here.\n *\n * See PHP bug: https://bugs.php.net/bug.php?id=47987\n */\n return false;\n }\n\n if (SimpleSAML\\Logger::isErrorMasked($errno)) {\n // masked error\n return false;\n }\n\n static $limit = 5;\n $limit -= 1;\n if ($limit < 0) {\n // we have reached the limit in the number of backtraces we will log\n return false;\n }\n\n // show an error with a full backtrace\n $e = new SimpleSAML_Error_Exception('Error '.$errno.' - '.$errstr);\n $e->logError();\n\n // resume normal error processing\n return false;\n}", "title": "" }, { "docid": "c508c48377a94164b86eb7709c5b40b5", "score": "0.64609486", "text": "protected function set_error_handler()\n {\n $this->last_error = null;\n set_error_handler(array($this, 'error_handler'));\n }", "title": "" }, { "docid": "e07feb0a52e970d76cbf697a068c46aa", "score": "0.6459994", "text": "public function actionError() {\n $error = Yii::app()->errorHandler->error;\n\n $code = 500;\n $message = $error['message'];\n\n\n if ($error['type'] == 'CDbException') {\n switch ($error['errorCode']) {\n case 23502:\n case 23503:\n $message = \"This item is being used by something else and can not be deleted.\";\n break;\n\n case 23505:\n $message = \"A field with the same value already exists.\";\n break;\n\n default: $message = \"Internal error\";\n }\n }\n\n\n if (Yii::app()->request->isAjaxRequest) {\n\n echo $message;\n\n Yii::app()->end();\n }\n\n switch ($error['code']) {\n case null:\n case 404:\n $this->render('error404', array('error' => $error));\n break;\n\n default:\n $this->render('error', array('code' => $code, 'message' => $message));\n break;\n }\n }", "title": "" }, { "docid": "dbf82ec16d9c38201d3a2707608dcd9a", "score": "0.6451808", "text": "public function handleFatalError();", "title": "" }, { "docid": "8fe918ecfd612d42d78f4185ef4769be", "score": "0.64360243", "text": "public function error()\n\t{\n\t}", "title": "" }, { "docid": "2c1bfbcdf939e5c40d6c9886e3371602", "score": "0.64317745", "text": "public function errorAction()\n {\n if ($this->_getParam('vmpd_jlo')) { $this->_redirect('/'); }\n \n \n // Error Code Parameter or Set Default\n $error_code = (int) Zend_Filter::filterStatic($this->_getParam('errorcode'), 'Digits');\n if (!isset($error_code) || !is_int($error_code) || !($error_code > 0)) {\n // Set Default to Not Found\n $error_code = self::HTTP_ERROR_NOT_FOUND;\n }\n $this->view->exceptions = array();\n \n // Framework Thrown Exceptions\n $errors = $this->_getParam('error_handler');\n if ($errors) { \n switch ($errors->type) {\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n $error_code = self::HTTP_ERROR_NOT_FOUND ;\n $this->view->exceptions[] = 'The requested controller was not found';\n break;\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n $error_code = self::HTTP_ERROR_NOT_FOUND ;\n $this->view->exceptions[] = 'The requested action was not found';\n break;\n case Zend_Controller_Plugin_ErrorHandler::EXCEPTION_OTHER:\n $error_code = self::HTTP_ERROR_INTERNAL_SERVER_ERROR;\n $this->view->exceptions[] = 'Other framework exception was thrown';\n break;\n default:\n }\n \n // Should be for debug or admin only\n if ($this->config->debug >= 5 || (isset($this->member) && ($this->member->site_admin || $this->member->profile->site_admin))) {\n foreach($this->getResponse()->getException() as $e) {\n $this->view->exceptions[] = $e->getMessage();\n }\n }\n }\n \n // Server Errors\n switch ($error_code) {\n case self::HTTP_ERROR_BAD_REQUEST:\n $this->view->title = 'Bad Request';\n $this->view->message = 'There was a syntax error in your request.';\n break;\n case self::HTTP_ERROR_UNAUTHORIZED:\n $this->view->title = 'Authorization Required';\n $this->view->message = 'You are not authorized to access the requested object.';\n break;\n case self::HTTP_ERROR_PAYMENT_REQUIRED:\n $this->view->title = 'Payment Required';\n $this->view->message = 'Payment is required to access the requested object.';\n break;\n case self::HTTP_ERROR_FORBIDDEN:\n $this->view->title = 'Access Forbidden';\n $this->view->message = 'You do not have permission to access the requested object.';\n break;\n case self::HTTP_ERROR_NOT_FOUND:\n $this->view->title = 'Object Not Found';\n $this->view->message = \"The requested object was not found.\";\n break;\n case self::HTTP_ERROR_METHOD_NOT_ALLOWED:\n $this->view->title = 'Method Not Allowed!';\n $this->view->message = 'The supplied method is not allowed for the requested object.';\n break;\n case self::HTTP_ERROR_NOT_ACCEPTABLE:\n $this->view->title = 'No Acceptable Object Found';\n $this->view->message = 'An appropriate representation of the requested object could not be found.';\n break;\n case self::HTTP_ERROR_PROXY_AUTH_REQUIRED:\n $this->view->title = 'Proxy Authentication Required';\n $this->view->message = 'The proxy server needs to authorize this request.';\n break;\n case self::HTTP_ERROR_REQUEST_TIMEOUT:\n $this->view->title = 'Request Time-Out';\n $this->view->message = 'Disconnecting due to request time-out.';\n break;\n case self::HTTP_ERROR_CONFLICT:\n $this->view->title = 'Conflict';\n $this->view->message = 'The request conflicts with another request or the server configuration.';\n break;\n case self::HTTP_ERROR_GONE:\n $this->view->title = 'Object Gone';\n $this->view->message = 'The requested object is no longer available.';\n break;\n case self::HTTP_ERROR_LENGTH_REQUIRED:\n $this->view->title = 'Bad Content-Length';\n $this->view->message = 'The request requires a valid Content-Length header.';\n break;\n case self::HTTP_ERROR_PRECONDITION_FAILED:\n $this->view->title = 'Precondition Failed';\n $this->view->message = 'The precondition on the requested object failed positive evaluation.';\n break;\n case self::HTTP_ERROR_REQUEST_ENTITY_TOO_LARGE:\n $this->view->title = 'Request Entity Too Large';\n $this->view->message = 'The request entity body is too large.';\n break;\n case self::HTTP_ERROR_REQUEST_URI_TOO_LONG:\n $this->view->title = 'URI Too Long';\n $this->view->message = 'The requested URI is too long.';\n break;\n case self::HTTP_ERROR_UNSUPPORTED_MEDIA_TYPE:\n $this->view->title = 'Unsupported Media Type';\n $this->view->message = 'The requested media type is not supported.';\n break;\n \n case self::HTTP_ERROR_INTERNAL_SERVER_ERROR:\n $this->view->title = 'Internal Server Error';\n $this->view->message = 'The server encountered an internal error.';\n break;\n case self::HTTP_ERROR_NOT_IMPLEMENTED:\n $this->view->title = 'Action Not Implemented';\n $this->view->message = 'The requested action is not supported.';\n break;\n case self::HTTP_ERROR_SERVICE_UNAVAILABLE:\n $this->view->title = 'Service Unavailable';\n $this->view->message = 'The server is temporarily unable to service your request.';\n break;\n case self::HTTP_ERROR_GATEWAY_TIMEOUT:\n $this->view->title = 'Gateway Time-Out';\n $this->view->message = 'A gateway or proxy has timed-out.';\n break;\n case self::HTTP_ERROR_HTTP_VERSION_NOT_SUPPORTED:\n $this->view->title = 'HTTP Version Not Supported';\n $this->view->message = 'The requested HTTP version is not supported.';\n break;\n \n default:\n $error_code = self::HTTP_ERROR_INTERNAL_SERVER_ERROR; // Set Default\n $this->view->title = 'Server Error';\n $this->view->message = 'An unexpected server error occured.';\n }\n \n // Overrides from parameters\n if ($this->_getParam('title')) { $this->view->title = $this->_getParam('title'); }\n if ($this->_getParam('message')) { $this->view->message = $this->_getParam('message'); }\n \n // Set View Variables \n $this->view->error_code = $error_code;\n $this->view->admin_name = $this->config->admin->name;\n $this->view->admin_email = $this->config->admin->email;\n if (isset($_SERVER['REQUEST_URI'])) {\n $this->view->request = $_SERVER['REQUEST_URI'];\n $this->view->exceptions[] = 'Request: ' . $_SERVER['REQUEST_URI'];\n } \n if (isset($_SERVER['HTTP_REFERER'])) {\n $this->view->referrer = $_SERVER['HTTP_REFERER'];\n $this->view->exceptions[] = 'Referrer: ' . $_SERVER['HTTP_REFERER'];\n\n }\n \n // Log Info\n if ($error_code >= 500) {\n $this->log->EMERG(\"ERROR $error_code : \" . $this->view->message . ' - ' . (implode(' - ', $this->view->exceptions)));\n }\n #else {\n # $this->log->EMERG(\"ERROR $error_code : \" . $this->view->message . ' - ' . (implode(' - ', $this->view->exceptions)));\n #}\n \n \n // Check to see if there are alternate access ACLs and redirect if there is\n if ($error_code == 401) {\n $dp = $this->_getParam('denyParams');\n \n if ($dp['type'] && $dp['id'] && $dp['priv']) {\n if (!($dp['mod'] > 0)) { $dp['mod'] = 0; }\n if (!($dp['mid'] > 0)) { $dp['mid'] = 0; }\n if (!($dp['iid'] > 0)) { $dp['iid'] = 0; }\n \n $query = \"SELECT 't'::boolean FROM acl_acls WHERE (\";\n $query .= '(module_id=0 AND matrix_counter=0 AND item_counter=0' . ($dp['mod'] ? \" AND recursive='t'\" : '') . ')';\n if ($dp['mod'] && $dp['mid']) {\n $query .= ' OR (' . $this->db->quoteInto('module_id=?', $dp['mod']) . ' AND ' . $this->db->quoteInto('matrix_counter=?', $dp['mid']) . ($dp['iid'] ? \" AND recursive='t'\" : ''). ')';\n }\n if ($dp['mod'] && $dp['mid'] && $dp['iid']) {\n $query .= ' OR (' . $this->db->quoteInto('module_id=?', $dp['mod']) . ' AND ' . $this->db->quoteInto('matrix_counter=?', $dp['mid']) . ' AND ' . $this->db->quoteInto('item_counter=?', $dp['iid']) . ')';\n }\n $query .= ') AND ';\n $query .= $this->db->quoteInto(\"privilege >= ?\", $dp['priv']);\n $query .= \" AND (expiration ISNULL OR expiration >= 'now') AND active='t' AND \";\n switch($dp['type']) {\n case 'VIA':\n $query .= $this->db->quoteInto('via_id=?', $dp['id']);\n break;\n case 'NET':\n $query .= $this->db->quoteInto('net_id=?', $dp['id']);\n break;\n default:\n $query .= $this->db->quoteInto('com_id=?', $dp['id']);\n break;\n }\n \n $query2 = $query;\n \n $query .= ' AND ((w_member_amount NOTNULL AND w_member_quantity NOTNULL AND w_member_interval NOTNULL))';\n $query2 .= ' AND (w_password NOTNULL OR (w_registration_status NOTNULL OR w_groups NOTNULL OR w_contact_profiles NOTNULL OR w_arb_profiles NOTNULL OR w_dos NOTNULL))';\n \n $query .= ' LIMIT 1';\n $query2 .= ' LIMIT 1';\n \n if ($this->db->fetchOne($query)) {\n if ($this->_getParam('vmpd_paid') && !(isset($this->member))) {\n // Coming in off of a paid subscription link\n return $this->_redirect('/member/login/' . ($this->_getParam('signup_entrance') ? 'p/signup_entrance/' . $this->_getParam('signup_entrance') . '/' : '') . '?redirect=' . urlencode($this->getFrontController()->getRequest()->getServer('REQUEST_URI')));\n }\n else {\n # Login display at the ACL\n #if (isset($this->member)) {\n #return $this->_forward('index', 'access', 'acl', array(\n # 'type' => $dp['type'],\n # 'id' => $dp['id'],\n # 'mod' => $dp['mod'],\n # 'mid' => $dp['mid'],\n # 'iid' => $dp['iid'],\n # 'priv' => $dp['priv']\n #));\n return $this->_redirect('http' . ($this->config->use_ssl ? 's' : '') . '://' . $this->vars->host . '/acl/access/?stype=' . $dp['type'] . '&sid=' . $dp['id'] . '&mod=' . $dp['mod'] . '&mid=' . $dp['mid'] . '&iid=' . $dp['iid'] . '&priv=' . $dp['priv'] . ($this->_getParam('signup_entrance') ? '&signup_entrance=' . urlencode($this->_getParam('signup_entrance')) : '') . '&redirect=' . urlencode($this->getFrontController()->getRequest()->getServer('REQUEST_URI')));\n #}\n #else {\n # return $this->_forward('index', 'login', 'member', array('redirect' => $this->getFrontController()->getRequest()->getServer('REQUEST_URI')));\n #}\n }\n }\n elseif (!(isset($this->member)) && $this->db->fetchOne($query2)) {\n #return $this->_forward('index', 'login', 'member', array('redirect' => $this->getFrontController()->getRequest()->getServer('REQUEST_URI')));\n return $this->_redirect('/member/login/' . ($this->_getParam('signup_entrance') ? 'p/signup_entrance/' . $this->_getParam('signup_entrance') . '/' : '') . '?redirect=' . urlencode($this->getFrontController()->getRequest()->getServer('REQUEST_URI')));\n }\n }\n }\n \n // HACK - Problem when view helper action throws error\n $this->getResponse()->clearBody(); \n $this->view->headLink()->setStylesheet(null);\n $this->view->headScript()->setScript(null);\n $this->view->inlineScript()->setScript(null);\n \n // Remove any placeholders or flags\n #Zend_Debug::Dump(Zend_Registry::get(Zend_View_Helper_Placeholder_Registry::REGISTRY_KEY));\n #$this->view->placeholder('space_header')->set(null);\n Zend_View_Helper_Placeholder_Registry::getRegistry()->deleteContainer('space_header' );\n $this->internal->sublayout_with_header = false;\n \n // Enable Layout if it got disabled\n $layout = Zend_Layout::getMvcInstance();\n if (null !== $layout) {\n $layout->enableLayout();\n $this->_setParam('no_layout', '');\n $this->_setParam('layout', '');\n #$layout->setMvcSuccessfulActionOnly(false);\n }\n \n // If layouts manually off, turn them on??? - Right now, no because the error will display in the layout specified (if popup etc.)\n #$this->_setParam('no_layout', 0);\n \n // Reset the Content-Type\n $this->getResponse()->setHeader('Content-Type', 'text/html', true);\n \n // Change the response header\n $this->getResponse()->setHttpResponseCode((int) $error_code);\n \n // Change Layout\n $this->_helper->ViaMe->setLayout('error');\n // Change Sub Layout\n $this->_helper->ViaMe->setSubLayout('default');\n \n // No robots\n $this->view->headMeta()->setName('robots', 'noindex, noarchive, nofollow');\n }", "title": "" }, { "docid": "18dd3c135cea044f1a9e0779b2fbe1ac", "score": "0.6421245", "text": "private\n\n\tfunction _errors( $error ) {\n\n\t\t$this->_controller = new Errors( $error );\n\t\t$this->_controller->index();\n\t\tdie;\n\t}", "title": "" }, { "docid": "a95003ef2421be3126b7876a20daa656", "score": "0.6418228", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n\tthrow new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "title": "" }, { "docid": "db2325453c35b1b36d3706d39b2bfead", "score": "0.64152336", "text": "function my_error_handler ($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n// Build the error message:\n$message = \"An error occurred in script '$e_file' on line $e_line: $e_message\\n\";\n\n// Add the date and time:\n$message .= \"Date/Time: \" . date('n-j-Y H:i:s') . \"\\n\";\n\nif (!LIVE) { // Development (print the error).\n\n// Show the error message:\necho '<div class=\"error\">' . nl2br($message);\n\n// Add the variables and a backtrace:\necho '<pre>' . print_r ($e_vars, 1) . \"\\n\";\ndebug_print_backtrace();\necho '</pre></div>';\n\n} else { // Don't show the error:\n\n// Send an email to the admin:\n$body = $message . \"\\n\" . print_r ($e_vars, 1);\nmail(EMAIL, 'Site Error!', $body, 'From: [email protected]');\n\n// Only print an error message if the error isn't a notice:\nif ($e_number != E_NOTICE) {\necho '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div><br />';\n}\n} // End of !LIVE IF.\n\n}", "title": "" }, { "docid": "664305f8b1b2f8067fabb57d051d68a9", "score": "0.6415016", "text": "function error()\n {\n render(\"error.php\", [\"title\" => \"Error\"]);\n exit;\n }", "title": "" }, { "docid": "24cabbbbe2429a539bd5fa2880a18ebf", "score": "0.64143384", "text": "function tw_error_handler($errno, $errstr, $errfile, $errline) {\n if ($errno && (($errno & E_FATAL) || ($errno & E_WARN))) {\n $e = 'Error ' . $errno . ' (' . substr($errfile, 13) . ':' . $errline . '): ' . $errstr;\n TelegramLog::error($e);\n\n if (DEBUG) {\n Req::send(null, $e);\n }\n }\n}", "title": "" }, { "docid": "18132ba72d61c42df308f379e0548907", "score": "0.6397396", "text": "function error() {\n\t\t\t//sinon on rends le template de login\n\t\t\t$template=new Template;\n\t\t\techo $template->render('error.htm');\n\t}", "title": "" }, { "docid": "00dd6c3b1a0f2baddec20cd007909613", "score": "0.6386482", "text": "function errHandler($errNo, $errStr, $file, $line, $context)\n {\n // if an @ error suppression operator has been detected (0) return null\n if (error_reporting() == 0) {\n return null;\n }\n $conf = $GLOBALS['_MAX']['CONF'];\n // do not show notices\n if ($conf['debug']['errorOverride'] == true) {\n if ($errNo == E_NOTICE || $errNo >= E_STRICT) {\n return null;\n }\n }\n if (in_array($errNo, array_keys($this->errorType))) {\n // final param is 2nd dimension element from errorType array,\n // representing PEAR error codes mapped to PHP's\n\n $oOA = new OA();\n $oOA->debug($errStr, $this->errorType[$errNo][1]);\n\n // if a debug sesssion has been started, or the site in in\n // development mode, send error info to screen\n if (!$conf['debug']['production']) {\n $source = $this->_getSourceContext($file, $line);\n // generate screen debug html\n // type is 1st dimension element from $errorType array, ie,\n // PHP error code\n $output = <<<EOF\n<hr />\n<p class=\"error\">\n <strong>MESSAGE</strong>: $errStr<br />\n <strong>TYPE:</strong> {$this->errorType[$errNo][0]}<br />\n <strong>FILE:</strong> $file<br />\n <strong>LINE:</strong> $line<br />\n <strong>DEBUG INFO:</strong>\n <p>$source</p>\n</p>\n<hr />\nEOF;\n echo $output;\n }\n\n // email the error to admin if threshold reached\n // never send email if error occurred in test\n //\n $emailAdminThreshold = is_numeric($conf['debug']['emailAdminThreshold']) ? $conf['debug']['emailAdminThreshold'] :\n @constant($conf['debug']['emailAdminThreshold']);\n if ($conf['debug']['sendErrorEmails'] && !defined('TEST_ENVIRONMENT_RUNNING') && $this->errorType[$errNo][1] <= $emailAdminThreshold) {\n // get extra info\n $oDbh =& OA_DB::singleton();\n $lastQuery = $oDbh->last_query;\n $aExtraInfo['callingURL'] = $_SERVER['SCRIPT_NAME'];\n $aExtraInfo['lastSQL'] = isset($oDbh->last_query) ? $oDbh->last_query : null;\n $aExtraInfo['clientData']['HTTP_REFERER'] =& $_SERVER['HTTP_REFERER'];\n $aExtraInfo['clientData']['HTTP_USER_AGENT'] =& $_SERVER['HTTP_USER_AGENT'];\n $aExtraInfo['clientData']['REMOTE_ADDR'] =& $_SERVER['REMOTE_ADDR'];\n $aExtraInfo['clientData']['SERVER_PORT'] =& $_SERVER['SERVER_PORT'];\n\n // store formatted output\n ob_start();\n print_r($aExtraInfo);\n $info = ob_get_contents();\n ob_end_clean();\n\n // rebuild error output w/out html\n $crlf = \"\\n\";\n $output = $errStr . $crlf .\n 'type: ' . $this->errorType[$errNo][0] . $crlf .\n 'file: ' . $file . $crlf .\n 'line: ' . $line . $crlf . $crlf;\n $message = $output . $info;\n @mail($conf['debug']['email'], $conf['debug']['emailSubject'], $message);\n }\n }\n }", "title": "" }, { "docid": "635242ce5f32628df8df0f3fb0f91182", "score": "0.6376098", "text": "public static function error()\n {\n http_response_code(400);\n exit();\n }", "title": "" }, { "docid": "8e63a132ac7dbcc625530dc4ce8c28f3", "score": "0.63678867", "text": "function error_handler_dispatcher($errno, $errstr, $errfile, $errline)\n{\n $back_trace = debug_backtrace();\n while(!empty($back_trace) && ($trace = array_shift($back_trace)))\n {\n if($trace['function'] == 'halt')\n {\n $errfile = $trace['file'];\n $errline = $trace['line'];\n break;\n }\n } \n\n # Notices and warning won't halt execution\n if(error_wont_halt_app($errno))\n {\n error_notice($errno, $errstr, $errfile, $errline);\n \treturn;\n }\n else\n {\n # Other errors will stop application\n //static $handlers = array();\n //if(empty($handlers))\n //{\n //error(E_LIM_PHP, 'error_default_handler');\n //$handlers = error();\n //}\n \n //$is_http_err = http_response_status_is_valid($errno);\n switch ($errno)\n {\n default:\n error_default_handler($errno, $errstr, $errfile, $errline);\n //exit;\n }\n \n //while($handler = array_shift($handlers))\n //{\n //$e = is_array($handler['errno']) ? $handler['errno'] : array($handler['errno']);\n //while($ee = array_shift($e))\n //{\n //if($ee == $errno || $ee == E_LIM_PHP || ($ee == E_LIM_HTTP && $is_http_err))\n //{\n // echo call_if_exists($handler['function'], $errno, $errstr, $errfile, $errline);\n // exit;\n //}\n //}\n //}\n }\n}", "title": "" }, { "docid": "79dcae620a41382a6dde888dc94abaae", "score": "0.6367047", "text": "private function ESDerror() {\n $this->_helper->flashMessenger->addMessage(\"Error: could not access Emory Shared Data\");\n // redirect to an error page\n $this->_helper->redirector->gotoRouteAndExit(array(\"controller\" => \"error\", \"action\" => \"unavailable\"));\n }", "title": "" }, { "docid": "7be273ff8506a6316c1d5cc15a59ab77", "score": "0.6366893", "text": "function StandardErrorHandler($errno, $errstr, $errfile, $errline)\n{\n $Err = $errstr . '<br />' . GetErrorType($errno) . 'on line ' . $errline . ' in ' . $errfile . '<br />';\n err($Err);\n// if (ON_SCREEN_ERRORS === TRUE) {\n// err($Err);\n// }\n// if ($errno == '256' and SEND_ERROR_EMAILS === TRUE) {\n// $Path = \"http://\" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];\n// gfErrEmail($Err, $Path, 'SQL Error');\n// }\n}", "title": "" }, { "docid": "031c0dd68282e8b50c1cdb7dc29c7e2b", "score": "0.63652253", "text": "abstract protected function getErrorMsg();", "title": "" }, { "docid": "0ad9eebd4c86d1d8f376f04173e92659", "score": "0.63611054", "text": "static function handler($errno, $errstr, $errfile, $errline, $errcontext) {\n\t\t$err = array(\n\t\t\t'errno'=>$errno,\n\t\t\t'errstr'=>$errstr,\n\t\t\t'errfile'=>$errfile,\n\t\t\t'errline'=>$errline,\n\t\t\t'errcontext'=>$errcontext\n\t\t);\n\t\t// get the backtrace from this point\n\t\t$backtrace = debug_backtrace();\n\t\t// remove the reference to this function\n\t\tarray_shift($backtrace);\n\t\t// call the error handler on the errobj and backtrace\n\t\tbettererrors::handle($err, $backtrace);\n\t}", "title": "" }, { "docid": "8294ccc5fc272e3f21116d58cdec2c70", "score": "0.63560176", "text": "function customError($errno, $errstr) {\n\t\t\t\t echo \"<b>Error:</b> [$errno] $errstr<br>\";\n\t\t\t\t echo \"Ending Script\";\n\t\t\t\t die();\n\t\t\t\t}", "title": "" }, { "docid": "368e79c70723cf202500960ed5da290a", "score": "0.6347591", "text": "public static function error_handler($errno, $errstr, $errfile, $errline, $errcontext)\n\t\t{\n\t\t\t$text = \"Error #{$errno}: {$errstr} [File {$errfile} in line {$errline}]\";\n\t\t\tthrow new Exception($text);\n\t\t}", "title": "" }, { "docid": "204549f343d2c366d8140886360bb5b1", "score": "0.6346722", "text": "function cmsSessionError() {\n die(\"Session Handler Error\");\n }", "title": "" }, { "docid": "4e132c2ade02cf7c1fe756a677b043f2", "score": "0.6343198", "text": "public function webserviceErrorHandler($errno, $errstr, $errfile, $errline)\n {\n }", "title": "" }, { "docid": "04d1fa83b520447657ca8d1f16df23f1", "score": "0.6343017", "text": "function error_handler($msg) {\r\n print(\"My Site Error\");\r\n print(\"Description:\");\r\n printf(\"%s\", $msg);\r\n exit;\r\n }", "title": "" }, { "docid": "13210dc67d6802e0ef5d7b86cd7fbb9c", "score": "0.6334043", "text": "function error() {\n\t\tdie(\"Invalid request\");\n\t}", "title": "" }, { "docid": "975fdcbb8883e03076baa4db4b4f7ffb", "score": "0.63331765", "text": "function error()\n\t{\n\t\t\n\t\t//load our template\n\t\t$template = $this->loadView('login_error');\n\t\t$template->render();\n\t}", "title": "" }, { "docid": "7f794bb1ee863645bc35584640928add", "score": "0.63185614", "text": "function error_handler($msg) {\n print(\"My Site Error\");\n print(\"Description:\");\n printf(\"%s\", $msg);\n exit;\n }", "title": "" }, { "docid": "151c4e804d3c7be15ca0dc3ba8961c59", "score": "0.631559", "text": "public function error() {\n }", "title": "" }, { "docid": "151c4e804d3c7be15ca0dc3ba8961c59", "score": "0.631559", "text": "public function error() {\n }", "title": "" }, { "docid": "92d59ffbefebeacd8ce3f3f10b5e2d70", "score": "0.6314627", "text": "function error_handler($code, $message, $file, $line)\n{\n if (0 == error_reporting())\n {\n return;\n }\n throw new ErrorException($message, 0, $code, $file, $line);\n}", "title": "" }, { "docid": "b8956dc1c2e113dcd357dba5fe0e902c", "score": "0.63144857", "text": "function ErrorHandler($error_number, $error_string, $error_file, $error_line, $error_context = false)\n{\n\t//Get the file (not the full directory) that the error occured\n\t$file_single = explode(\"/\", $error_file);\n\t$file_single = $file_single[count($file_single) - 1];\n\n\t//Variables for tracking the error for proper message generation\n\t$die = false;\n\t$type_name = \"\";\n\n\t//Based on the error, provide various outputs\n\tswitch($error_number)\n\t{\n\t\t//Standard PHP Errors\n\t\tcase \\E_ERROR:\n\t\t\t$type_name = \"Unhandled Error E_ERROR\";\n\t\tcase \\E_WARNING:\n\t\t\t$type_name = \"Unhandled Error E_WARNING\";\n\t\tbreak;\n\t\tcase \\E_PARSE:\n\t\t\t$type_name = \"Unhandled Error E_PARSE\";\n\t\tbreak;\n\t\tcase \\E_NOTICE:\n\t\t\t$type_name = \"Notice\";\n\t\tbreak;\n\t\tcase \\E_CORE_ERROR:\n\t\t\t$type_name = \"Unhandled Error E_CORE_ERROR\";\n\t\tbreak;\n\t\tcase \\E_CORE_WARNING:\n\t\t\t$type_name = \"Unhandled Error E_CORE_WARNING\";\n\t\tbreak;\n\t\tcase \\E_COMPILE_ERROR:\n\t\t\t$type_name = \"Unhandled Error E_COMPILE_ERROR\";\n\t\tbreak;\n\t\tcase \\E_COMPILE_WARNING:\n\t\t\t$type_name = \"Unhandled Error E_COMPILE_WARNING\";\n\t\tbreak;\n\t\tcase \\E_USER_ERROR:\n\t\t\t$type_name = \"Fatal Error\";\n\t\t\t$die = true;\n\t\tbreak;\n\t\tcase \\E_USER_WARNING:\n\t\t\t$type_name = \"Warning\";\n\t\tbreak;\n\t\tcase \\E_USER_NOTICE:\n\t\t\t$type_name = \"Notice\";\n\t\tbreak;\n\t\tcase \\E_STRICT:\n\t\t\t$type_name = \"Fatal Error\";\n\t\t\t$die = true;\n\t\tbreak;\n\t\tcase \\E_RECOVERABLE_ERROR:\n\t\t\t$type_name = \"Recoverable Fatal Error\";\n\t\tbreak;\n\t\tcase \\E_DEPRECATED:\n\t\t\t$type_name = \"Deprecated Code Detected\";\n\t\tbreak;\n\t\tcase \\E_ALL:\n\t\t\t$type_name = \"Unhandled Error E_ALL\";\n\t\tbreak;\n\n\t\t//General Errors\n\t\tcase GeneralError\\E_DEBUG_OUTPUT:\n\t\t\t$type_name = \"Debug Output\";\n\t\tbreak;\n\n\t\t//Database Errors\n\t\tcase DatabaseError\\E_DB_CONNECT_FAIL:\n\t\t\t$type_name = \"Database Connection Failed\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_NO_DB_CONNECTION:\n\t\t\t$type_name = \"No Database Connection Found\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_NO_QUERY_TYPE:\n\t\t\t$type_name = \"No Query Type Selected\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_NO_TABLE:\n\t\t\t$type_name = \"No Table Selected\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_INVALID_TABLE:\n\t\t\t$type_name = \"Table Could Not Be Found\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_COLUMN_NOT_FOUND:\n\t\t\t$type_name = \"Column Could Not Be Found\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_PREPARE_ERROR:\n\t\t\t$type_name = \"Failed To Prepare SQL Query\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_INVALID_COLUMN:\n\t\t\t$type_name = \"Column Not Valid\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_FAILED_QUERY:\n\t\t\t$type_name = \"Query Failed to Execute\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_INVALID_BIND_TYPE:\n\t\t\t$type_name = \"Invalid Data Type in Bind Object\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_INVALID_COMPARISON:\n\t\t\t$type_name = \"Invalid Comparison\";\n\t\tbreak;\n\t\tcase DatabaseError\\E_INVALID_CLAUSE:\n\t\t\t$type_name = \"Invalid Clause\";\n\t\tbreak;\n\n\t\t//Unhandled Error Codes\n\t\tdefault:\n\t\t\t$type_name = \"UNKWON ERROR CODE! PANIC!!!\";\n\t\tbreak;\n\t}\n\n\t//Prevent the user from seeing any output that is not our error message\n\tif($die)\n\t\tob_clean();\n\n\t//Check to see where we are going to output the error and generate formatted messages\n\tif(Settings\\Output\\Console)\n\t{\n\t\t//Replace the illegal character \\n in our error string with an escaped string\n\t\t$error_string = str_replace(\"\\n\", \"\\\\n\", $error_string);\n\t\t$script_message = ReplaceMessageText($type_name, $error_string, $error_line, $error_file, \"===PHP ERROR===\\\\nSeverity: E_TYPE\\\\nMessage: E_MESSAGE\\\\nFile: E_FILE\\\\nLine: E_LINE\\\\n\\\\n\");\n\t\tOutputScriptMessage($script_message);\n\t}\n\tif(Settings\\Output\\Window)\n\t{\n\t\t$window_message = ReplaceMessageText($type_name, $error_string, $error_line, $error_file, \"<b>E_TYPE:</b> E_MESSAGE at line E_LINE in E_FILE\");\n\t\tOutputWindowMessage($window_message);\n\t}\n\tif(Settings\\Output\\Log)\n\t{\n\t\t$log_message = ReplaceMessageText($type_name, $error_string, $error_line, $error_file, \"E_TYPE: E_MESSAGE, in file E_FILE at line E_LINE\\n\");\n\t\tOutputLogMessage($log_message);\n\t}\n\n\t//Check to see if we need to kill the script\n\tif($die)\n\t{\n\t\tob_end_flush();\n\t\tdie();\n\t}\n\n\treturn true;\n}", "title": "" }, { "docid": "bf5bab547e2a217295ca78b56d3e0731", "score": "0.6306371", "text": "function db_error_handler($params) {\n global $log;\n // log first\n $log->error(\"Database error: \" . $params['error']);\n if (isset($params['query'])) {\n $log->error(\"SQL query: \" . $params['query']);\n }\n // redirect\n header(\"Location: /internalerror\");\n die;\n}", "title": "" }, { "docid": "e8669f49057286ac84e60d8b785a5bd0", "score": "0.6303448", "text": "function error_handler($msg) {\r\n print(\"My Site Error\");\r\n print(\"Description: \");\r\n printf(\"%s\", $msg);\r\n exit;\r\n }", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.62883276", "text": "public function errors();", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.62883276", "text": "public function errors();", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.62883276", "text": "public function errors();", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.62883276", "text": "public function errors();", "title": "" }, { "docid": "93f3d9b66d959ff28541b38a6b3cb419", "score": "0.62883276", "text": "public function errors();", "title": "" }, { "docid": "e568b1d2d3ab11f64c5981de0e9af643", "score": "0.62880516", "text": "function _error() {\n\t\t$this->last_request_status = $this->Socket->response['status'];\n\t\t$this->last_response_raw = $this->Socket->response['body'];\n\t\t$rest_exception = json_decode($this->last_response_raw)->TwilioResponse->RestException;\n\t\tforeach ($rest_exception as $variable => $value) {\n\t\t\t$this->last_rest_exception[$variable] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "8762553ea8a46a31d0bf9b21861e7e8e", "score": "0.6280085", "text": "function exception_error_handler($errno, $errstr, $errfile, $errline ) {\n throw new ErrorException($errstr, 0, $errno, $errfile, $errline);\n}", "title": "" }, { "docid": "af68d5c32b155280f923f5123a4a795e", "score": "0.6269643", "text": "public function handleErrors($error_msg){\n echo $this->sendResponse($error_msg);\n die;\n }", "title": "" }, { "docid": "25da8ea254061de897d2a1979a629cd1", "score": "0.62680566", "text": "function AddErrorHandler($errno,$errstr){\t\t\n\t\tif ($errno!=8) {\n\t\t\tErrorMensaje(\"$errno: $errstr\",true);\t\n\t\t} else {\n\t\t\tErrorMensaje(\"$errno: $errstr\");\n\t\t}\n}", "title": "" }, { "docid": "03826ddae0278d72fc5f02eacd5fc9d2", "score": "0.62644047", "text": "public function errorAction()\n\t{\n\t\t$errors = $this->_getParam('error_handler');\n\n\t\t// Populate JSONP callback parameter\n\t\t$this->view->callback = $this->_getParam('callback', 'callback');\n\n\t\tswitch ($errors->type)\n\t\t{\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ROUTE:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_CONTROLLER:\n\t\t\tcase Zend_Controller_Plugin_ErrorHandler::EXCEPTION_NO_ACTION:\n \n\t\t\t\t// 404 error -- controller or action not found\n\t\t\t\t$this->getResponse()->setHttpResponseCode(404);\n\n\t\t\t\tif(\n\t\t\t\t\t 'api' != $this->getRequest()->getModuleName()\n\t\t\t\t\t&& 'development' == APPLICATION_ENV\n\t\t\t\t)\n\t\t\t\t{\n\t\t\t\t\t$this->view->errorMessage\t= 'An Error has occurred';\n\t\t\t\t\t$this->view->explanation\t= $errors->exception->getMessage();\n\t\t\t\t\t$this->view->error\t\t\t= $errors;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Disable auto-rendering\n\t\t\t\t\t$this->_helper->viewRenderer->setNoRender();\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\t// API-specific error\n\t\t\tcase ($errors->exception instanceof App\\Engine\\Exception):\n\t\t\t\t$this->getResponse()->setHttpResponseCode( ( ! $errors->exception->getCode() ) ? 500 : $errors->exception->getCode() );\n\n\t\t\t\t$this->view->responseCode\t= ( ! $errors->exception->getCode() ) ? 500 : $errors->exception->getCode();\n\t\t\t\t$this->view->errorMessage\t= 'An Error has occurred';\n\t\t\t\t$this->view->explanation\t= $errors->exception->getMessage();\n\n\t\t\t\t// Log exception, if logger available\n\t\t\t\tif ($log = $this->getLog())\n\t\t\t\t{\n\t\t\t\t\tif ( '500' == $this->view->responseCode )\n\t\t\t\t\t{\n\t\t\t\t\t\t$log->err( print_r( $errors->exception, 1 ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\t// Application error\n\t\t\tdefault:\n\t\t\t\t$this->getResponse()->setHttpResponseCode(500);\n\n\t\t\t\t$this->view->responseCode\t= 500;\n\t\t\t\t$this->view->errorMessage\t= 'An Application Error has occurred. Tech support has been notified of this situation.';\n\t\t\t\t$this->view->explanation\t= $errors->exception->getMessage();\n\n\t\t\t\t// Log exception, if logger available\n\t\t\t\tif ($log = $this->getLog())\n\t\t\t\t{\n\t\t\t\t\t$log->emerg( print_r( $errors->exception, 1 ) );\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// Conditionally display exceptions\n\t\tif ( true == $this->getInvokeArg('displayExceptions') ){}\n\t}", "title": "" }, { "docid": "ac3da82b2dc8540895d4a6718aaf9266", "score": "0.6258452", "text": "private function registerErrorHandler() {\n if(self::$debugLevel === self::DEBUG_LEVEL_TEST) {\n ini_set('display_errors', '1');\n return;\n }\n\n ini_set('display_errors', '0');\n\n $shutdown = function(Exception $exception) {\n $code = 500;\n\n if(get_class($exception) == 'Maverick\\Exception\\NoRouteException') {\n $code = 404;\n }\n\n $controller = $this->services->get('error.controller')->setException($exception);\n\n ErrorInstruction::factory($code)->instruct($this->services->get('response'), $controller);\n };\n\n $errorHandler = function($num, $str, $file, $line) use($shutdown) {\n $shutdown(new Exception($str . ' in ' . $file . ' on line ' . $line . '.'));\n };\n\n set_exception_handler($shutdown);\n set_error_handler($errorHandler);\n\n register_shutdown_function(function() use($errorHandler) {\n if($err = error_get_last()) {\n call_user_func_array($errorHandler, $err);\n }\n });\n }", "title": "" }, { "docid": "1404103725ed2b0f9aeab8bca955716c", "score": "0.625545", "text": "function myErrorHandler($errno, $errstr, $errfile, $errline) {\n//\");\n return true;\n }", "title": "" }, { "docid": "88f3bb2fc593b9b5233ff78746097803", "score": "0.62394303", "text": "function ErrorHandler($errno, $errmsg, $filename, $linenum, $vars) {\r\n\t\t// 4.3.0 bug(?)\r\n\t\tif ($errno & E_NOTICE)\r\n\t\t\treturn;\r\n\t\r\n\t\tglobal $notifyErrors;\r\n\t\t// timestamp for the error entry\r\n\t\t$dt = date(\"Y-m-d H:i:s (T)\");\r\n\t\r\n\t\t// define an assoc array of error string\r\n\t\t// in reality the only entries we should\r\n\t\t// consider are 2,8,256,512 and 1024\r\n\t\t$errortype = array (\r\n\t\t\t\t\t1 => \"Error\",\r\n\t\t\t\t\t2 => \"Warning\",\r\n\t\t\t\t\t4 => \"Parsing Error\",\r\n\t\t\t\t\t8 => \"Notice\",\r\n\t\t\t\t\t16 => \"Core Error\",\r\n\t\t\t\t\t32 => \"Core Warning\",\r\n\t\t\t\t\t64 => \"Compile Error\",\r\n\t\t\t\t\t128 => \"Compile Warning\",\r\n\t\t\t\t\t256 => \"User Error\",\r\n\t\t\t\t\t512 => \"User Warning\",\r\n\t\t\t\t\t1024=> \"User Notice\"\r\n\t\t\t\t\t);\r\n\t\t// set of errors for which a var trace will be saved\r\n\t\t$user_errors = array(E_USER_ERROR, E_USER_WARNING, E_USER_NOTICE);\r\n\t\t\r\n\t\t// $erremail = error sent through e-mail\r\n\t\t// $errlocal = error logged to local server\r\n\t\t\r\n\t\t$errlocal = \"<errorentry>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<phpversion>\".phpversion().\"</phpversion>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<sysname>\".php_uname().\"</sysname>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<datetime>\".$dt.\"</datetime>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<errornum>\".$errno.\"</errornum>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<errortype>\".$errortype[$errno].\"</errortype>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<errormsg>\".$errmsg.\"</errormsg>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<scriptname>\".$filename.\"</scriptname>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<scriptlinenum>\".$linenum.\"</scriptlinenum>\\r\\n\";\r\n\t\t$errlocal .= \"\\t<vartrace>\\r\\n\";\r\n\t\tif (in_array($errno, $user_errors)) {\r\n\t\t\tif (extension_loaded(\"wddx\"))\r\n\t\t\t\t$errlocal .= \"\\t\\t\".wddx_serialize_value($vars,\"Variables\").\"\\r\\n\";\r\n\t\t}\r\n\t\t$errlocal .= \"\\t</vartrace>\\r\\n\";\r\n\t\t$errlocal .= \"</errorentry>\\r\\n\";\r\n\t\t\r\n\t\t/* now for the e-mail payload\r\n\t\t* could just have appended onto $errlocal\r\n\t\t* but I'd prefer slightly different structure\r\n\t\t*/\r\n\t\tif ($notifyErrors) {\r\n\t\t\t$erremail = \"<errorentry>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<phpversion>\".phpversion().\"</phpversion>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<sysname>\".php_uname().\"</sysname>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<configopts>\\r\\n\";\r\n\t\t\tforeach (ini_get_all() as $key => $val) {\r\n\t\t\t\t$erremail .= \"\\t\\t<\".$key.\">\\r\\n\";\r\n\t\t\t\tforeach($val as $key2 => $val2) {\r\n\t\t\t\t\t$erremail .= \"\\t\\t\\t<\".$key2.\">\".$val2.\"</\".$key2.\">\\r\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t$erremail .= \"\\t\\t</\".$key.\">\\r\\n\";\r\n\t\t\t}\r\n\t\t\t$erremail .= \"\\t</configopts>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<loadedmods>\\r\\n\";\r\n\t\t\tforeach (get_loaded_extensions() as $key => $val)\r\n\t\t\t\t$erremail .= \"\\t\\t<module>\".$val.\"</module>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t</loadedmods>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<datetime>\".$dt.\"</datetime>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<errornum>\".$errno.\"</errornum>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<errortype>\".$errortype[$errno].\"</errortype>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<errormsg>\".$errmsg.\"</errormsg>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<scriptname>\".$filename.\"</scriptname>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<scriptlinenum>\".$linenum.\"</scriptlinenum>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<scriptcontext>\\r\\n\";\r\n\t\t\t$fp = fopen($filename,\"r\");\r\n\t\t\t$i = 1;\r\n\t\t\twhile (!feof($fp)) {\r\n\t\t\t\t$line = rtrim(fgets($fp));\r\n\t\t\t\tif ($i >= ($linenum - 10) && $i <= ($linenum + 10)) {\r\n\t\t\t\t\t$erremail .= \"\\t\\t<\".$i.\">\\r\\n\\t\\t\\t\".$line.\"\\r\\n\\t\\t</\".$i.\">\\r\\n\";\r\n\t\t\t\t}\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t\t@fclose($fp);\r\n\t\t\t$erremail .= \"\\t</scriptcontext>\\r\\n\";\r\n\t\t\t$erremail .= \"\\t<vartrace>\\r\\n\";\r\n\t\t\tif (in_array($errno, $user_errors)) {\r\n\t\t\t\tif (extension_loaded(\"wddx\"))\r\n\t\t\t\t\t$erremail .= \"\\t\\t\".wddx_serialize_value($vars,\"Variables\").\"\\r\\n\";\r\n\t\t\t}\r\n\t\t\t$erremail .= \"\\t</vartrace>\\r\\n\";\r\n\t\t\t$erremail .= \"</errorentry>\\r\\n\";\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// save to the error log, and e-mail me if there is a critical user error\r\n\t\terror_log($errlocal, 3, \"/usr/apnscp/var/log/php_error.log\");\r\n\t\tif ($notifyErrors && $errno == E_USER_ERROR)\r\n\t\t\tmail(\"[email protected]\",\"Critical Error Encountered\",$erremail);\r\n\t\t\t\r\n\t\t// lastly echo our message\r\n\t\techo \"<strong>\".$errortype[$errno].\"</strong>: \".$errmsg.\" in \".$filename.\" on line \".$linenum.\"\\n<br>\";\r\n\r\n\t}", "title": "" }, { "docid": "9f3252308604af699ebddb6889124d3c", "score": "0.622256", "text": "public function errorHandler($request, $response, $error){\n\t\t$uri = $request->getUri();\n\t\t$reqinfo = array(\n\t\t\t'host'=>$uri->getHost(),\n\t\t\t'path'=>$uri->getPath(),\n\t\t\t'query'=>$uri->getQuery(),\n\t\t\t'fragment'=>$uri->getFragment()\n\t\t);\n\t\t\n\t\t/*\n\t\t\tGet Minimal headers.\n\t\t*/\n\t\t$_headers = array(\n\t\t\t\"referer\"=>$request->getHeaderLine('referer'),\n\t\t\t\"uagent\"=>$request->getHeaderLine('user-agent'),\n\t\t\t\"dnt\"=>$request->hasHeader('dnt')\n\t\t);\n\t\t\n\t\t\n\t\t//$contentType = $request->getContentType();\n\t\t\n\t\t//$headers = $request->getHeaders();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t/* \n\t\t\tContent negotiation. \n\t\t*/\n\t\t$responseType = 'json';\n\t\tif ($request->hasHeader('accept')) {\n\t\t\tif(strpos($request->getHeaderLine('accept'),'text/html')!==false ){\n\t\t\t\t$responseType = 'html';\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t$templateVars = array(\n\t\t\t'error'=>$this->ExceptionToArray($error),\n\t\t\t'debug'=>(int)$this->debug,\n\t\t\t'clientid'=>$this->sfe->clientid\n\t\t);\n\t\t\n\t\t\n\t\t$jsonError[\"code\"]\t\t= $error->getCode;\n\t\t$jsonError[\"status\"]\t= \"Fatal Exception.\";\n\t\t$jsonError[\"statusmsg\"]\t= $error->getMessage();\n\t\t$jsonError[\"data\"] = $this->ExceptionToArray($error);\n\t\t\n\t\t\n\t\t\n\t\t\n\t\tif($error->getCode()==404){\n\t\t\t$jsonError[\"status\"]\t= \"Not found.\";\n\t\t\tif($responseType=='html'){\n\t\t\t\treturn $this->view->render($response,'HTTP404.html',$templateVars)->withStatus(404);\n\t\t\t}else{\n\t\t\t\treturn $response->withStatus(404)->withJson($jsonError);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($responseType=='html'){\n\t\t\treturn $this->view->render($response,'HTTP500.html',$templateVars)->withStatus(500);\n\t\t}else{\n\t\t\treturn $response->withStatus(500)->withJson($jsonError);\n\t\t}\n\t\t\n\t\t\n\t\t//return $response->withStatus(500)->withHeader('Content-Type', 'text/html')->write('errorHandler <pre>'.$error);\n\t}", "title": "" }, { "docid": "5bc4f7a9c40952574e5d499b48282e5c", "score": "0.6210043", "text": "public function extErrorAction() {\n\t\t$this->view->assignErrors($this->arguments->getValidationResults());\n\t}", "title": "" }, { "docid": "3c16cc6c3d614160dfc32655d10be95c", "score": "0.6210004", "text": "function my_error_handler($e_number, $e_message, $e_file, $e_line, $e_vars) {\n\n global $debug, $contact_email;\n \n // Build the error message:\n $message = \"An error occurred in script '$e_file' on line $e_line: $e_message\";\n \n // Append $e_vars to the $message:\n $message .= print_r($e_vars, 1);\n \n if ($debug) { // Show the error.\n \n echo '<div class=\"error\">' . $message . '</div>';\n debug_print_backtrace();\n \n } else { \n\n // Log the error:\n error_log ($message, 1, $contact_email); // Send email.\n\n // Only print an error message if the error isn't a notice or strict.\n if ( ($e_number != E_NOTICE) && ($e_number < 2048)) {\n echo '<div class=\"error\">A system error occurred. We apologize for the inconvenience.</div>';\n }\n\n } // End of $debug IF.\n\n}", "title": "" }, { "docid": "b093d443b4cef1878876cfdbbbad5ef3", "score": "0.6207384", "text": "function pla_error_handler( $errno, $errstr, $file, $lineno )\n{\n\tglobal $lang;\n\n\t// error_reporting will be 0 if the error context occurred\n\t// within a function call with '@' preprended (ie, @ldap_bind() );\n\t// So, don't report errors if the caller has specifically\n\t// disabled them with '@'\n\tif( 0 == ini_get( 'error_reporting' ) || 0 == error_reporting() )\n\t\treturn;\n\n\t$file = basename( $file );\n\t$caller = basename( $_SERVER['PHP_SELF'] );\n\t$errtype = \"\";\n\tswitch( $errno ) {\n case E_STRICT: $errtype = \"E_STRICT\"; break;\n\t\tcase E_ERROR: $errtype = \"E_ERROR\"; break;\n\t\tcase E_WARNING: $errtype = \"E_WARNING\"; break;\n\t\tcase E_PARSE: $errtype = \"E_PARSE\"; break;\n\t\tcase E_NOTICE: $errtype = \"E_NOTICE\"; break;\n\t\tcase E_CORE_ERROR: $errtype = \"E_CORE_ERROR\"; break;\n\t\tcase E_CORE_WARNING: $errtype = \"E_CORE_WARNING\"; break;\n\t\tcase E_COMPILE_ERROR: $errtype = \"E_COMPILE_ERROR\"; break;\n\t\tcase E_COMPILE_WARNING: $errtype = \"E_COMPILE_WARNING\"; break;\n\t\tcase E_USER_ERROR: $errtype = \"E_USER_ERROR\"; break;\n\t\tcase E_USER_WARNING: $errtype = \"E_USER_WARNING\"; break;\n\t\tcase E_USER_NOTICE: $errtype = \"E_USER_NOTICE\"; break;\n\t\tcase E_ALL: $errtype = \"E_ALL\"; break;\n\t\tdefault: $errtype = $lang['ferror_unrecognized_num'] . $errno;\n\t}\n\n\t$errstr = preg_replace(\"/\\s+/\",\" \",$errstr);\n\tif( $errno == E_NOTICE ) {\n\t\techo sprintf($lang['ferror_nonfatil_bug'], $errstr, $errtype, $file,\n $lineno, $caller, pla_version(), phpversion(), php_sapi_name(),\n $_SERVER['SERVER_SOFTWARE'], get_href('search_bug',\"&summary_keyword=\".htmlspecialchars($errstr)),get_href('add_bug'));\n\t\treturn;\n\t}\n\n\t$server = isset( $_SERVER['SERVER_SOFTWARE'] ) ? $_SERVER['SERVER_SOFTWARE'] : 'undefined';\n\t$phpself = isset( $_SERVER['PHP_SELF'] ) ? basename( $_SERVER['PHP_SELF'] ) : 'undefined';\n\tpla_error( sprintf($lang['ferror_congrats_found_bug'], $errstr, $errtype, $file,\n\t\t\t\t\t\t\t$lineno, $phpself, pla_version(),\n\t\t\t\t\t\t\tphpversion(), php_sapi_name(), $server ));\n}", "title": "" }, { "docid": "f039d336fedb58908bad7643b15cb69e", "score": "0.6192418", "text": "protected function getServerError(){\n\t\t\n\t}", "title": "" }, { "docid": "30e8edb43adb8520b1deffd5d7494e73", "score": "0.61783016", "text": "public static function catchSysErrors(){\n set_error_handler(\"Logger::sysErrorHandler\");\n }", "title": "" }, { "docid": "f52eada19b2e3ead700b6cfd2bcc5232", "score": "0.61740124", "text": "public static function errhandle($string)\n {\n switch ($string) {\n \n case 28:\n /* throw new TwitterOAuthException('Request timed out.'); */\n if (session_status() == PHP_SESSION_NONE ) { session_start(); }; // recommended way for versions of PHP >= 5.4.0\n session_destroy();\n header( 'Location: ./?errors=error_tamper' ); /* request timed out! * request user to refresh browser and try again! */\n exit(); \n break;\n case 51:\n /* throw new TwitterOAuthException('The remote servers SSL certificate or SSH md5 fingerprint failed validation.'); * request user to refresh browser and try again! */\n if (session_status() == PHP_SESSION_NONE ) { session_start(); }; // recommended way for versions of PHP >= 5.4.0\n session_destroy();\n header( 'Location: ./?errors=error_tamper' ); /* failed validation! * request user to refresh browser and try again! */\n exit();\n break;\n case 56:\n /* throw new TwitterOAuthException('Response from server failed or was interrupted.'); */\n if (session_status() == PHP_SESSION_NONE ) { session_start(); }; // recommended way for versions of PHP >= 5.4.0\n session_destroy();\n header( 'Location: ./?errors=error_tamper' ); /* response from server failed! * request user to refresh browser and try again! */\n exit();\n break;\n\n }\n }", "title": "" }, { "docid": "be262a1c9ead177b97024872a94937a8", "score": "0.61722475", "text": "protected function registerErrorHandler()\n {\n set_error_handler(array($this, 'handleError'));\n }", "title": "" }, { "docid": "2f107f3ccb280d9efe6e8e98e8f9f267", "score": "0.61718184", "text": "public static function setupErrorHandling(): void\n {\n self::$errorHandler = new ErrorHandler(self::$logger);\n self::$errorHandler->register();\n }", "title": "" }, { "docid": "001ea38ce2e436cabe50648890e36fee", "score": "0.6166862", "text": "private function ErrorOccured() \n\t\t{\n\t\t\t$this->error = true;\n\t\t\t$this->response_code = 500;\n\t\t\t$this->api_call_data = ERROR_MESSAGE;\n\t\t}", "title": "" } ]
0450848d86952ea2a57f35483b49449c
Sets/Overrides existing Sorting description
[ { "docid": "977bbc28d11f3946892749ac7c05142c", "score": "0.5621227", "text": "public function setSortDescriptor(CoreSortDescriptor $sort) {\n\t\t$this->descriptors = array($sort);\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "e9e3c76aa95d80319c9ff151c6fd2dbd", "score": "0.67578363", "text": "protected function _FormatSort()\t\t{\t$this->_DecodeParameter( kAPI_DATA_SORT );\t}", "title": "" }, { "docid": "ac7a15b9e6fb5d28ef489cdf65abd4b2", "score": "0.6726256", "text": "function createSortOrder() {\n\t\t$this->editSortOrder();\n\t}", "title": "" }, { "docid": "39e8aa4d939e2627807cb663986bfd1d", "score": "0.65142393", "text": "public function setDescription($description) {\n\t\t$this->collection->setValue('DESC', $description);\n\t}", "title": "" }, { "docid": "2d557a4309abfbebaac9f442b799e5cb", "score": "0.6468246", "text": "public function getHelpSort()\n {\n return $this->help_sort;\n }", "title": "" }, { "docid": "d761041a9dd601ba84767d9d73f17113", "score": "0.6444801", "text": "protected function getSort()\n\t{\n\t\tif ($this->DrillDown)\n\t\t\treturn \"\";\n\t\t$resetSort = Param(\"cmd\") === \"resetsort\";\n\t\t$orderBy = Param(\"order\", \"\");\n\t\t$orderType = Param(\"ordertype\", \"\");\n\n\t\t// Check for Ctrl pressed\n\t\t$ctrl = (Param(\"ctrl\") !== NULL);\n\n\t\t// Check for a resetsort command\n\t\tif ($resetSort) {\n\t\t\t$this->setOrderBy(\"\");\n\t\t\t$this->setStartGroup(1);\n\t\t\t$this->property_id->setSort(\"\");\n\t\t\t$this->group_id->setSort(\"\");\n\t\t\t$this->Code->setSort(\"\");\n\t\t\t$this->Description->setSort(\"\");\n\t\t\t$this->brand_id->setSort(\"\");\n\t\t\t$this->type_id->setSort(\"\");\n\t\t\t$this->signature_id->setSort(\"\");\n\t\t\t$this->department_id->setSort(\"\");\n\t\t\t$this->location_id->setSort(\"\");\n\t\t\t$this->Qty->setSort(\"\");\n\t\t\t$this->Variance->setSort(\"\");\n\t\t\t$this->cond_id->setSort(\"\");\n\t\t\t$this->Remarks->setSort(\"\");\n\t\t\t$this->ProcurementDate->setSort(\"\");\n\t\t\t$this->ProcurementCurrentCost->setSort(\"\");\n\t\t\t$this->PeriodBegin->setSort(\"\");\n\t\t\t$this->PeriodEnd->setSort(\"\");\n\n\t\t// Check for an Order parameter\n\t\t} elseif ($orderBy != \"\") {\n\t\t\t$this->CurrentOrder = $orderBy;\n\t\t\t$this->CurrentOrderType = $orderType;\n\t\t\t$this->updateSort($this->property_id, $ctrl); // property_id\n\t\t\t$this->updateSort($this->group_id, $ctrl); // group_id\n\t\t\t$this->updateSort($this->Code, $ctrl); // Code\n\t\t\t$this->updateSort($this->Description, $ctrl); // Description\n\t\t\t$this->updateSort($this->brand_id, $ctrl); // brand_id\n\t\t\t$this->updateSort($this->type_id, $ctrl); // type_id\n\t\t\t$this->updateSort($this->signature_id, $ctrl); // signature_id\n\t\t\t$this->updateSort($this->department_id, $ctrl); // department_id\n\t\t\t$this->updateSort($this->location_id, $ctrl); // location_id\n\t\t\t$this->updateSort($this->Qty, $ctrl); // Qty\n\t\t\t$this->updateSort($this->Variance, $ctrl); // Variance\n\t\t\t$this->updateSort($this->cond_id, $ctrl); // cond_id\n\t\t\t$this->updateSort($this->Remarks, $ctrl); // Remarks\n\t\t\t$this->updateSort($this->ProcurementDate, $ctrl); // ProcurementDate\n\t\t\t$this->updateSort($this->ProcurementCurrentCost, $ctrl); // ProcurementCurrentCost\n\t\t\t$this->updateSort($this->PeriodBegin, $ctrl); // PeriodBegin\n\t\t\t$this->updateSort($this->PeriodEnd, $ctrl); // PeriodEnd\n\t\t\t$sortSql = $this->sortSql();\n\t\t\t$this->setOrderBy($sortSql);\n\t\t\t$this->setStartGroup(1);\n\t\t}\n\t\treturn $this->getOrderBy();\n\t}", "title": "" }, { "docid": "d38b8a9ca56c050fe2783e3792fc18bf", "score": "0.63241327", "text": "function wc_customize_product_sorting($sorting_options){\n $sorting_options = array(\n 'title' => __( 'A-Z', 'woocommerce' ),\n 'title-desc' => __( 'Z-A', 'woocommerce' ),\n 'popularity' => __( 'popularity', 'woocommerce' ),\n 'rating' => __( 'average rating', 'woocommerce' ),\n 'date' => __( 'newness', 'woocommerce' ),\n 'price' => __( 'low price', 'woocommerce' ),\n 'price-desc' => __( 'high price', 'woocommerce' ),\n );\n\n return $sorting_options;\n}", "title": "" }, { "docid": "8f540dd610cf3e1b1c6181aeddee425c", "score": "0.6282458", "text": "function setSorting($sorting) { \n\t\t$this->_sorting = $sorting; \n\t}", "title": "" }, { "docid": "5ddb28f411e86614b6ed874acab5a975", "score": "0.6268525", "text": "public function getSortBy()\n {\n }", "title": "" }, { "docid": "3110579cdfbdbc3f5b5162b3d8252dac", "score": "0.6247986", "text": "function SetUpSortOrder() {\n\t\tglobal $documento_contable;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$documento_contable->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$documento_contable->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$documento_contable->UpdateSort($documento_contable->iddoctocontable); // iddoctocontable\n\t\t\t$documento_contable->UpdateSort($documento_contable->tipo_docto); // tipo_docto\n\t\t\t$documento_contable->UpdateSort($documento_contable->consec_docto); // consec_docto\n\t\t\t$documento_contable->UpdateSort($documento_contable->valor); // valor\n\t\t\t$documento_contable->UpdateSort($documento_contable->cia); // cia\n\t\t\t$documento_contable->UpdateSort($documento_contable->tercero); // tercero\n\t\t\t$documento_contable->UpdateSort($documento_contable->fecha); // fecha\n\t\t\t$documento_contable->UpdateSort($documento_contable->estado); // estado\n\t\t\t$documento_contable->UpdateSort($documento_contable->estado_pago); // estado_pago\n\t\t\t$documento_contable->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "759ad575e1567caf923debb372fa0759", "score": "0.624335", "text": "protected function setOrder(){\n $defaultSort = true;\n $oRequest = AMI::getSingleton('env/request');\n $sortField = $oRequest->get('sort', false);\n $sortDir = $oRequest->get('sort_dir', 'asc');\n if($sortField){\n if($this->oModel->hasField($sortField) && in_array($sortDir, array('asc', 'desc'))){\n $this->oList->addOrder($sortField, $sortDir);\n $defaultSort = false;\n $this->sortField = $sortField;\n $this->sortDir = $sortDir;\n $this->sortDefault = false;\n }\n }\n if($defaultSort){\n $aBrowser = $this->oCommonView->getBrowserData();\n $this->oList->addOrder($aBrowser['orderColumn'], $aBrowser['orderDirection']);\n $this->sortField = $aBrowser['orderColumn'];\n $this->sortDir = $aBrowser['orderDirection'];\n }\n }", "title": "" }, { "docid": "0ddb5158c32091679f5459b4b60ffd1f", "score": "0.6236584", "text": "public function sortable()\n {\n $this->sortable = true;\n }", "title": "" }, { "docid": "a270d83ecb629c2b370ea1f67bb32bfc", "score": "0.62147665", "text": "public function getSort()\n {\n return 100;\n }", "title": "" }, { "docid": "afa02fe76480caf9e97bd3ed546f58f2", "score": "0.62094593", "text": "protected function set_new_sortorder() {\n $search = array('parentid' => $this->get('parentid'), 'competencyframeworkid' => $this->get('competencyframeworkid'));\n $this->raw_set('sortorder', $this->count_records($search));\n }", "title": "" }, { "docid": "04ffd3d56581fac76fb863dc0e6379cb", "score": "0.61368513", "text": "function set_sort()\n\t{\n\t\tif(isset($_GET['sort'])){\n\t\t\t$this->sortOrder = $_GET['sort'];\n\t\t}else{\n\t\t\t$this->sortOrder = $this->_defaultSortColumn;\n\t\t}\n\t\t//set the sort direction\n\t\tif(isset($_GET['sortDir'])){\n\t\t\t$this->sortDir = $_GET['sortDir'];\n\t\t}else{\n\t\t\t$this->sortDir = $this->_defaultSortDirection;\n\t\t}\t\n\t}", "title": "" }, { "docid": "42dac8718988f15623f7bad30f321bd7", "score": "0.61312664", "text": "protected function sortOptions() {\n return [\n 'ASC' => $this->t('Ascending'),\n 'DESC' => $this->t('Descending'),\n ];\n }", "title": "" }, { "docid": "117d2635dba7bc5885f3524b9fc9739c", "score": "0.61181295", "text": "public function sort(): self\n {\n return $this->setFlag('-sort');\n }", "title": "" }, { "docid": "3916cc985e52075a961057cd620ec04e", "score": "0.61053544", "text": "function SetUpSortOrder() {\n\t\tglobal $cupon_categ;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$cupon_categ->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$cupon_categ->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$cupon_categ->UpdateSort($cupon_categ->cct_id); // cct_id\n\t\t\t$cupon_categ->UpdateSort($cupon_categ->cup_id); // cup_id\n\t\t\t$cupon_categ->UpdateSort($cupon_categ->cat_id); // cat_id\n\t\t\t$cupon_categ->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "a7e41be11ab6d9c0440e17709d5d3d98", "score": "0.6102439", "text": "public function switchSort(){\n\t\t$sort = $this->getSort();\n\t\tif(!empty($sort)){\n\t\t\t$sort = $sort==self::ASC ? self::DESC:self::ASC;\n\t\t}else{\n\t\t\t$sort = self::ASC;\n\t\t}\n\t\treturn $sort;\n\t}", "title": "" }, { "docid": "77effb783b16135c602e2b022c5eae1e", "score": "0.6085654", "text": "function SetUpSortOrder() {\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$this->UpdateSort($this->Codigo); // Codigo\r\n\t\t\t$this->UpdateSort($this->Status); // Status\r\n\t\t\t$this->UpdateSort($this->Id_Articulo); // Id_Articulo\r\n\t\t\t$this->UpdateSort($this->Fecha_recepcion); // Fecha_recepcion\r\n\t\t\t$this->UpdateSort($this->Hora_recepcion); // Hora_recepcion\r\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "11e1c03725d8955ab1fa3e06d206a473", "score": "0.60778403", "text": "function getSort() {\n return 5;\n }", "title": "" }, { "docid": "b81622d634d7668b8b5d7e8242a50d76", "score": "0.6069077", "text": "private function setUpSortingDefaults($sort) {\n // ...\n return $sort;\n }", "title": "" }, { "docid": "ae25005d6e65bf65eaab1a0f0218a82d", "score": "0.60684204", "text": "public function incrementSorting(){\r\n\t\t$this->attributes['sorting']++;\r\n\t}", "title": "" }, { "docid": "3902ebc6dc0bee257763a8d6b71ddbd7", "score": "0.60570836", "text": "function getSort(){\n return 999;\n }", "title": "" }, { "docid": "903fd37e09e1d93a426f2924a0889fc2", "score": "0.60300547", "text": "function SetUpSortOrder() {\r\n\t\tglobal $master_transaksi2;\r\n\r\n\t\t// Check for \"order\" parameter\r\n\t\tif (@$_GET[\"order\"] <> \"\") {\r\n\t\t\t$master_transaksi2->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\r\n\t\t\t$master_transaksi2->CurrentOrderType = @$_GET[\"ordertype\"];\r\n\t\t\t$master_transaksi2->UpdateSort($master_transaksi2->penjelasan); // penjelasan\r\n\t\t\t$master_transaksi2->UpdateSort($master_transaksi2->tanggal); // tanggal\r\n\t\t\t$master_transaksi2->UpdateSort($master_transaksi2->tipe_transaksi); // tipe_transaksi\r\n\t\t\t$master_transaksi2->UpdateSort($master_transaksi2->saldo_debet); // saldo_debet\r\n\t\t\t$master_transaksi2->UpdateSort($master_transaksi2->saldo_kredit); // saldo_kredit\r\n\t\t\t$master_transaksi2->setStartRecordNumber(1); // Reset start position\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a7423093b5a9f3bb5b7a0e6b76894f23", "score": "0.6025887", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->id_admission, $bCtrl); // id_admission\n\t\t\t$this->UpdateSort($this->nomr, $bCtrl); // nomr\n\t\t\t$this->UpdateSort($this->statusbayar, $bCtrl); // statusbayar\n\t\t\t$this->UpdateSort($this->masukrs, $bCtrl); // masukrs\n\t\t\t$this->UpdateSort($this->noruang, $bCtrl); // noruang\n\t\t\t$this->UpdateSort($this->KELASPERAWATAN_ID, $bCtrl); // KELASPERAWATAN_ID\n\t\t\t$this->UpdateSort($this->nott, $bCtrl); // nott\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "b8d3641b459dac7d083ff80bc801a1a4", "score": "0.60256994", "text": "function getSort();", "title": "" }, { "docid": "f28faf5e0167d37f3e1b9c0a7410b495", "score": "0.60233766", "text": "public function buildSortPost() {}", "title": "" }, { "docid": "a5f03c82331aa087c327b7e3e1fe3bab", "score": "0.602082", "text": "public function setSort() {\n $this->sort = filter_input(INPUT_GET, \"sort\", FILTER_SANITIZE_STRING);\n if (!isset($this->sort)) {\n $this->sort = \"relevance\";\n }\n }", "title": "" }, { "docid": "e46770cdd9007d5b3738320db06ba1e6", "score": "0.59994525", "text": "function SetUpSortOrder() {\n\t\tglobal $term_result_approval;\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$term_result_approval->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$term_result_approval->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$term_result_approval->UpdateSort($term_result_approval->approvalID); // approvalID\n\t\t\t$term_result_approval->UpdateSort($term_result_approval->sessionTermID); // sessionTermID\n\t\t\t$term_result_approval->UpdateSort($term_result_approval->status); // status\n\t\t\t$term_result_approval->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "99b6870c6f112fda975d389a51a37910", "score": "0.5995378", "text": "public function addOrderBySortOrder()\n\t{\n\t\t$this->getSelect()->order('_option_table.sort_order ASC');\n\t\t$this->getSelect()->order('display_name ASC');\n\n\t\treturn $this;\t\t\n\t}", "title": "" }, { "docid": "d577f0cd1120b1cb709aba976a17ddad", "score": "0.599064", "text": "function SetUpSortOrder() {\n\t\tglobal $trx_additional;\n\n\t\t// Check for an Order parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$trx_additional->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$trx_additional->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$trx_additional->UpdateSort($trx_additional->kode); // Field \n\t\t\t$trx_additional->UpdateSort($trx_additional->tanggal); // Field \n\t\t\t$trx_additional->UpdateSort($trx_additional->room); // Field \n\t\t\t$trx_additional->UpdateSort($trx_additional->grandtotal); // Field \n\t\t\t$trx_additional->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "2496e10a93be91a49985c56440368906", "score": "0.59900707", "text": "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->ng_id); // ng_id\n\t\t\t$this->UpdateSort($this->news_id); // news_id\n\t\t\t$this->UpdateSort($this->image); // image\n\t\t\t$this->UpdateSort($this->g_status); // g_status\n\t\t\t$this->UpdateSort($this->g_order); // g_order\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "a4480f13ac0108b713da9a648a79f589", "score": "0.5988464", "text": "function outputSortSubject()\n {\n // do not modify it! (submit renaming to af!)\n // its value refers to Page Help\n return \"attributes\";\n }", "title": "" }, { "docid": "0a957b6a891bf6b91a14dd816e98a4c3", "score": "0.5976507", "text": "public function getSort() {\r\n return 50;\r\n }", "title": "" }, { "docid": "d65ef31f52728650226f604189ed3e64", "score": "0.5962656", "text": "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->Id_Item); // Id_Item\n\t\t\t$this->UpdateSort($this->codigo_item); // codigo_item\n\t\t\t$this->UpdateSort($this->nombre_item); // nombre_item\n\t\t\t$this->UpdateSort($this->und_item); // und_item\n\t\t\t$this->UpdateSort($this->precio_item); // precio_item\n\t\t\t$this->UpdateSort($this->costo_item); // costo_item\n\t\t\t$this->UpdateSort($this->tipo_item); // tipo_item\n\t\t\t$this->UpdateSort($this->marca_item); // marca_item\n\t\t\t$this->UpdateSort($this->cod_marca_item); // cod_marca_item\n\t\t\t$this->UpdateSort($this->detalle_item); // detalle_item\n\t\t\t$this->UpdateSort($this->saldo_item); // saldo_item\n\t\t\t$this->UpdateSort($this->activo_item); // activo_item\n\t\t\t$this->UpdateSort($this->maneja_serial_item); // maneja_serial_item\n\t\t\t$this->UpdateSort($this->asignado_item); // asignado_item\n\t\t\t$this->UpdateSort($this->si_no_item); // si_no_item\n\t\t\t$this->UpdateSort($this->precio_old_item); // precio_old_item\n\t\t\t$this->UpdateSort($this->costo_old_item); // costo_old_item\n\t\t\t$this->UpdateSort($this->registra_item); // registra_item\n\t\t\t$this->UpdateSort($this->fecha_registro_item); // fecha_registro_item\n\t\t\t$this->UpdateSort($this->empresa_item); // empresa_item\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "fa0c962907332244c8fa55bb5ebba3b3", "score": "0.5954831", "text": "public function unsetSortName(): void\n {\n $this->sortName = [];\n }", "title": "" }, { "docid": "1a12a4770af65ad15a7f9c1aaffeabee", "score": "0.5953594", "text": "public function addSort() {\n\t\t$time = microtime(true);\n\t\t$tmp = $this->config['sortby'];\n\t\tif (empty($tmp) || strtolower($tmp) == 'resources' || strtolower($tmp) == 'ids') {\n\t\t\t$resources = $this->config['class'].'.'.$this->pk.':IN';\n\t\t\tif (!empty($this->config['where'][$resources])) {\n\t\t\t\t$tmp = array(\n\t\t\t\t\t'FIELD(`'.$this->config['class'].'`.`'.$this->pk.'`,\\''.implode('\\',\\'', $this->config['where'][$resources]).'\\')' => ''\n\t\t\t\t);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$tmp = array(\n\t\t\t\t\t$this->config['class'].'.'.$this->pk => !empty($this->config['sortdir'])\n\t\t\t\t\t\t? $this->config['sortdir']\n\t\t\t\t\t\t: 'ASC'\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$tmp = (is_string($tmp) && ($tmp[0] == '{' || $tmp[0] == '['))\n\t\t\t\t? $this->modx->fromJSON($this->config['sortby'])\n\t\t\t\t: array($this->config['sortby'] => $this->config['sortdir']);\n\t\t}\n\t\tif (!is_array($tmp)) {$tmp = array();}\n\t\tif (!empty($this->config['sortbyTV']) && !array_key_exists($this->config['sortbyTV'], $tmp['sortby'])) {\n\t\t\t$tmp2[$this->config['sortbyTV']] = !empty($this->config['sortdirTV'])\n\t\t\t\t? $this->config['sortdirTV']\n\t\t\t\t: 'ASC';\n\t\t\t$tmp = array_merge($tmp2, $tmp);\n\t\t}\n\n\t\t$fields = $this->modx->getFields($this->config['class']);\n\n\t\t// с этим нужно будет разобраться\n\t\t$sorts = $this->replaceTVCondition($tmp);\n\n\t\tif (is_array($sorts)) {\n\t\t\twhile (list($sortby, $sortdir) = each($sorts)) {\n\t\t\t\tif (preg_match_all('/TV(.*?)[`|.]/', $sortby, $matches)) {\n\t\t\t\t\tforeach ($matches[1] as $tv) {\n\t\t\t\t\t\tif (array_key_exists($tv,$this->config['tvsJoin'])) {\n\t\t\t\t\t\t\t$params = $this->config['tvsJoin'][$tv]['tv'];\n\t\t\t\t\t\t\tswitch ($params['type']) {\n\t\t\t\t\t\t\t\tcase 'number':\n\t\t\t\t\t\t\t\t\t$sortby = preg_replace('/(TV'.$tv.'\\.value|`TV'.$tv.'`\\.`value`)/', 'CAST($1 AS DECIMAL(13,3))', $sortby);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'date':\n\t\t\t\t\t\t\t\t\t$sortby = preg_replace('/(TV'.$tv.'\\.value|`TV'.$tv.'`\\.`value`)/', 'CAST($1 AS DATETIME)', $sortby);\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (array_key_exists($sortby, $fields)) {\n\t\t\t\t\t$sortby = $this->config['class'].'.'.$sortby;\n\t\t\t\t}\n\t\t\t\t$this->query->sortby($sortby, $sortdir);\n\n\t\t\t\t$this->writeLog('Sorted by <b>'.$sortby.'</b>, <b>'.$sortdir.'</b>','','WARN');\n\t\t\t\t$time = microtime(true);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "72d57fbb9e60a1454e3ba5fb6cc63b09", "score": "0.5944869", "text": "public function desc()\n {\n return $this->name . ' DESC';\n }", "title": "" }, { "docid": "f96a2d115db3812e39e7099cdf5b25c3", "score": "0.59431446", "text": "function SetUpSortOrder() {\n\n\t\t// Check for Ctrl pressed\n\t\t$bCtrl = (@$_GET[\"ctrl\"] <> \"\");\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->PASIENBARU, $bCtrl); // PASIENBARU\n\t\t\t$this->UpdateSort($this->NOMR, $bCtrl); // NOMR\n\t\t\t$this->UpdateSort($this->TGLREG, $bCtrl); // TGLREG\n\t\t\t$this->UpdateSort($this->KDDOKTER, $bCtrl); // KDDOKTER\n\t\t\t$this->UpdateSort($this->KDPOLY, $bCtrl); // KDPOLY\n\t\t\t$this->UpdateSort($this->KDRUJUK, $bCtrl); // KDRUJUK\n\t\t\t$this->UpdateSort($this->KDCARABAYAR, $bCtrl); // KDCARABAYAR\n\t\t\t$this->UpdateSort($this->SHIFT, $bCtrl); // SHIFT\n\t\t\t$this->UpdateSort($this->NIP, $bCtrl); // NIP\n\t\t\t$this->UpdateSort($this->MASUKPOLY, $bCtrl); // MASUKPOLY\n\t\t\t$this->UpdateSort($this->KELUARPOLY, $bCtrl); // KELUARPOLY\n\t\t\t$this->UpdateSort($this->pasien_NAMA, $bCtrl); // pasien_NAMA\n\t\t\t$this->UpdateSort($this->pasien_TEMPAT, $bCtrl); // pasien_TEMPAT\n\t\t\t$this->UpdateSort($this->peserta_cob, $bCtrl); // peserta_cob\n\t\t\t$this->UpdateSort($this->poli_eksekutif, $bCtrl); // poli_eksekutif\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "f1ff830266ae813409b1b7e20075f799", "score": "0.5928768", "text": "public function order(string $sort): void\n {\n if ($this->sort == $sort) {\n if ($this->direction == 'desc') {\n $this->direction = 'asc';\n } else {\n $this->direction = 'desc';\n }\n } else {\n $this->sort = $sort;\n $this->direction = 'asc';\n }\n }", "title": "" }, { "docid": "249864247c9daad71634fd62245e90c1", "score": "0.5919404", "text": "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->CI_RUN); // CI_RUN\n\t\t\t$this->UpdateSort($this->Expedido); // Expedido\n\t\t\t$this->UpdateSort($this->Apellido_Paterno); // Apellido_Paterno\n\t\t\t$this->UpdateSort($this->Apellido_Materno); // Apellido_Materno\n\t\t\t$this->UpdateSort($this->Nombres); // Nombres\n\t\t\t$this->UpdateSort($this->Fecha_Nacimiento); // Fecha_Nacimiento\n\t\t\t$this->UpdateSort($this->Estado_Civil); // Estado_Civil\n\t\t\t$this->UpdateSort($this->Direccion); // Direccion\n\t\t\t$this->UpdateSort($this->Telefono); // Telefono\n\t\t\t$this->UpdateSort($this->Celular); // Celular\n\t\t\t$this->UpdateSort($this->Fiscalia_otro); // Fiscalia_otro\n\t\t\t$this->UpdateSort($this->Unidad_Organizacional); // Unidad_Organizacional\n\t\t\t$this->UpdateSort($this->Unidad); // Unidad\n\t\t\t$this->UpdateSort($this->Cargo); // Cargo\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "b35af0887a6b673a09ad7fba866e070b", "score": "0.59187084", "text": "function SetUpSortOrder() {\n\n\t\t// Check for \"order\" parameter\n\t\tif (@$_GET[\"order\"] <> \"\") {\n\t\t\t$this->CurrentOrder = ew_StripSlashes(@$_GET[\"order\"]);\n\t\t\t$this->CurrentOrderType = @$_GET[\"ordertype\"];\n\t\t\t$this->UpdateSort($this->idperiodo_contable); // idperiodo_contable\n\t\t\t$this->UpdateSort($this->fecha); // fecha\n\t\t\t$this->UpdateSort($this->estado_documento_debito); // estado_documento_debito\n\t\t\t$this->UpdateSort($this->estado_documento_credito); // estado_documento_credito\n\t\t\t$this->UpdateSort($this->estado_pago_cliente); // estado_pago_cliente\n\t\t\t$this->UpdateSort($this->estado_pago_proveedor); // estado_pago_proveedor\n\t\t\t$this->UpdateSort($this->idempresa); // idempresa\n\t\t\t$this->setStartRecordNumber(1); // Reset start position\n\t\t}\n\t}", "title": "" }, { "docid": "f906dbaacb5f0c0ce936cf0e2b52cd59", "score": "0.5913891", "text": "public function getSorting(){\r\n\t\treturn $this->attributes['sorting'];\r\n\t}", "title": "" }, { "docid": "62b4258181f8d3d7e2d02c4cd1a7ed7a", "score": "0.5913441", "text": "function setSortFields(&$replace,$action,$queryStr)\n\t\t{\n\t\t\tinclude_once(\"template/clinicDetail/userArray.php\");\n\t\t\t\n\t\t\t$orderByClause = \"\";\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tforeach ($sortColTblArray as $key => $value)\n\t\t\t{\n\t\t\t\t$strKey = $key.'Img';\n\t\t\t\t\n\t\t\t\tif ($this->value('sort') == $key)\n\t\t\t\t{\n\t\t\t\t\tif($this->value('order') == \"ASC\")\n\t\t\t\t\t{\n\t\t\t\t\t\t$replace[$key] = \"action=\".$action.$queryStr.\"&sort=\".$key.\"&order=DESC\".\"&clinic_id=\".$this->value('clinic_id');\n\t\t\t\t\t\t\n\t\t\t\t\t\t$replace[$strKey] = '&nbsp;<img src=\"images/sort_asc.gif\">';\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$replace[$key] = \"action=\".$action.$queryStr.\"&sort=\".$key.\"&order=ASC\".\"&clinic_id=\".$this->value('clinic_id');\n\t\t\t\t\t\t$replace[$strKey] = '&nbsp;<img src=\"images/sort_desc.gif\">';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$replace['orderByClause'] = $value[$this->value('order')];\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\t$replace[$key] = \"action=\".$action.$queryStr.\"&sort=\".$key.\"&order=ASC\".\"&clinic_id=\".$this->value('clinic_id');\n\t\t\t\t\t$replace[$strKey] = '';\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\n\t\t\t\t\n\t\t\t}\t\t\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b27ec0840bd509a995ea810faac11c8a", "score": "0.5903028", "text": "protected function getSortFields()\n\t{\n\t\treturn array(\n\t\t\t'a.title' => JText::_('JGLOBAL_TITLE'),\n\t\t\t'a.remote_url' => JText::_('COM_J2XML_HEADING_SERVER'),\n\t\t\t'a.username' => JText::_('COM_J2XML_HEADING_USERNAME'),\n\t\t\t'a.state' => JText::_('JSTATUS'),\n\t\t\t'a.id' => JText::_('JGRID_HEADING_ID')\n\t\t);\n\t}", "title": "" }, { "docid": "aaac5cf3cce4bca6c1009aca6dd3c127", "score": "0.5895375", "text": "public function setSort($column, $order = sfDataSourceInterface::ASC);", "title": "" }, { "docid": "451c37882494d7c4cdda7afa012bb844", "score": "0.5891021", "text": "function GetSortString(){\r\r\n\t\treturn \"Order by lastName ASC ,firstName ASC\";\r\r\n\t}", "title": "" }, { "docid": "be2df33b54499955f8501f85b44d722a", "score": "0.58816093", "text": "function __construct($descr,$id) {\n parent::__construct($descr,$id);\n $this->sorties[] = NULL;\n }", "title": "" }, { "docid": "9ceceadf44664c28950b179ada77f973", "score": "0.5879457", "text": "function group_sort_by_field() {\r\n\t\tglobal $Discography;\r\n\t\t$options = $Discography->get_discography_options();\r\n\t\techo '<select id=\"discography_options_group_sort_by\" name=\"discography_options[group_sort_by]\">\r\n\t\t\t\t<option value=\"release_date\" ' . selected( 'release_date', $options['group_sort_by'], false ) . '>' . __( 'Release Date', 'discography' ) . '</option>\r\n\t\t\t\t<option value=\"order\" ' . selected( 'order', $options['group_sort_by'], false ) . '>' . __( 'Custom', 'discography' ) . '</option>\r\n\t\t\t\t<option value=\"title\" ' . selected( 'title', $options['group_sort_by'], false ) . '>' . __( 'Alphabetical', 'discography' ) . '</option>\r\n\t\t\t\t<option value=\"id\" ' . selected( 'id', $options['group_sort_by'], false ) . '>' . __( 'Album ID', 'discography' ) . '</option>\r\n\t\t\t</select>';\r\n\t}", "title": "" }, { "docid": "e4bd10d30a8a6652c2b2d735df13ec33", "score": "0.5877665", "text": "public function getSort() {\n\t\treturn $this->getTable() . \".name\";\n\t}", "title": "" }, { "docid": "fcf25f019e38a59fbb6e72dfa709cfe0", "score": "0.58743197", "text": "function sort($OrderBy = null) {\n switch ($OrderBy) {\n case \"Parm\": $SortBy = $this->xlParm; break;\n case \"Value\": $SortBy = $this->xlValue; break;\n case \"When\": $SortBy = $this->xlWhen; break;\n case \"Flag\": $SortBy = $this->xlFlag; break;\n case \"Index\": $SortBy = $this->xlIdx; break;\n default: $SortBy = $this->xlDescr;\n }\n $SortBy[0] = \" \".$SortBy[0]; // to force title to the top, twelve spaces should be enough\n array_multisort($SortBy,\n $this->xlDescr, \n $this->xlParm, \n $this->xlValue, \n $this->xlWhen, \n $this->xlFlag, \n $this->xlIdx, $this->xlUpdtd);\n }", "title": "" }, { "docid": "f0648226e767464cbe7abf83dbcfee9a", "score": "0.58645713", "text": "function getSorting() { \n\t\treturn $this->_sorting; \n\t}", "title": "" }, { "docid": "f2e1275fe9da20876766993c3e2e813a", "score": "0.585242", "text": "function _set_sortable_columns() {\n\treturn array(\n\t\t'post_id' => 'Post ID',\n\t\t'menu_order' => 'Order Number',\n\t);\n}", "title": "" }, { "docid": "b36386ca5705a4a006da2a43e9038e36", "score": "0.5842007", "text": "public function getSort() {\n return 90;\n }", "title": "" }, { "docid": "05a47a929be7482531ed7a0de778cb01", "score": "0.5839208", "text": "public function get_sortable_columns()\n {\n return array('title' => array('title', false));\n }", "title": "" }, { "docid": "6e43869b7ca156f4a837027ba8a4e6e5", "score": "0.5836094", "text": "public function setSortOrder($input)\n\t{\n\t\tswitch($input)\n\t\t{\n\t\t\tcase 'ASC':\n\t\t\t\t$this->sortorder = 'ASC';\n\t\t\t\tbreak;\n\t\t\tcase 'DESC':\n\t\t\tdefault:\n\t\t\t\t$this->sortorder = 'DESC';\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "d8d96c7c1350d8aa251c4307e47b8ce4", "score": "0.5811845", "text": "public function __toString() {\n\t\treturn \"Sortable { sort_by: '$this->sort_by', direction: '$this->direction' }\";\n\t}", "title": "" }, { "docid": "2dfa3e016aa18f614987e963b0aefc0b", "score": "0.58083063", "text": "function setSort(array $sort);", "title": "" }, { "docid": "d3ec613983aa8915c3dc737c1c7ba88d", "score": "0.58076686", "text": "public function getTabSort();", "title": "" }, { "docid": "20a8402bfb150029a92a3a827c707131", "score": "0.58068043", "text": "public function __construct()\n\t{\n\t\t$availableSortAttributes = $this->getCatalogConfig()->getAttributeUsedForSortByArray();\n\t\tunset($availableSortAttributes['position']);\n\n\t\t$this->sortAttributes = array_merge(array(\n\t\t\t'relevance' => 'Relevance' // the actual label does not matter here, we're only using the keys\n\t\t), $availableSortAttributes);\n\n\t\t// unset the sort order session data to have the sort select box always\n\t\t// reflect the correct sort field and reset it when starting a new search\n\t\tMage::getSingleton('catalog/session')->unsetData('sort_order');\n\t}", "title": "" }, { "docid": "92a2553bbe4befe86feb94de6cdb7363", "score": "0.5801397", "text": "public function sort_desc_name(){\n\t\tusort($this->activities, \"name_desc\");\n\t}", "title": "" }, { "docid": "5714b2987151b656a867f1264e39fb5e", "score": "0.57951623", "text": "public function doSort();", "title": "" }, { "docid": "6d026c10dc93f238247531b2fdec30ae", "score": "0.5785316", "text": "function category_sort_by_field() {\r\n\t\tglobal $Discography;\r\n\t\t$options = $Discography->get_discography_options();\r\n\t\techo '<select id=\"discography_options_category_sort_by\" name=\"discography_options[category_sort_by]\">\r\n\t\t\t\t<option value=\"order\" ' . selected( 'order', $options['category_sort_by'], false ) . '>' . __( 'Custom', 'discography' ) . '</option>\r\n\t\t\t\t<option value=\"title\" ' . selected( 'title', $options['category_sort_by'], false ) . '>' . __( 'Alphabetical', 'discography' ) . '</option>\r\n\t\t\t\t<option value=\"id\" ' . selected( 'id', $options['category_sort_by'], false ) . '>' . __( 'Category ID', 'discography' ) . '</option>\r\n\t\t\t</select>';\r\n\t}", "title": "" }, { "docid": "d29709f511f9b253b66865376756005e", "score": "0.5778403", "text": "public function getSortOrder();", "title": "" }, { "docid": "865e11daa7354592f78a9bc1ab155381", "score": "0.5773707", "text": "protected function applySorting()\n\t{\n\t\t$i=1;\n\t\tparse_str($this->order, $list);\n\t\tforeach ($list as $field => $dir) {\n\t\t\t$this->dataSource->orderBy($field, $dir==='a'? dibi::ASC : dibi::DESC);\n\t\t\t$list[$field]=array($dir, $i++);\n\t\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "06b16331073c851f45b895a60d379128", "score": "0.5771106", "text": "function SaveSortDetails($sort, $page_name = null)\n\t{\n\t\tif (is_null($page_name)) {\n\t\t\t$page_name = $this->GetPageName();\n\t\t}\n\t\t$user = &GetUser();\n\t\t$display_settings = $user->GetSettings('DisplaySettings');\n\t\tif (!isset($display_settings['DisplayPage'])) {\n\t\t\t$display_settings['DisplayPage'] = array();\n\t\t}\n\t\tif (!isset($display_settings['Sort']) || !is_array($display_settings['DisplayPage'])) {\n\t\t\t$display_settings['Sort'] = array();\n\t\t}\n\t\t$display_settings['Sort'][$page_name] = $sort;\n\t\t$user->SetSettings('DisplaySettings', $display_settings);\n\t\treturn $sort;\n\t}", "title": "" }, { "docid": "529900e8637448314fe90330b354f398", "score": "0.5770335", "text": "public function getSortOption()\n {\n return $this->sort_option;\n }", "title": "" }, { "docid": "0e06f9320d180052a1116a71a7a0f7b6", "score": "0.57692724", "text": "public function _getSortingFields() {\r\n return [\r\n 'id' => [\r\n 'asc' => ['id' => SORT_ASC],\r\n 'desc' => ['id' => SORT_DESC],\r\n 'default' => SORT_ASC,\r\n 'Title' => 'Article',\r\n ],\r\n 'brand' => [\r\n 'asc' => ['fk_brands' => SORT_ASC, 'fk_brands' => SORT_ASC],\r\n 'desc' => ['fk_brands' => SORT_DESC, 'fk_brands' => SORT_DESC],\r\n 'default' => SORT_ASC,\r\n 'Title' => 'Brand',\r\n ],\r\n 'mark' => [\r\n 'asc' => ['fk_marks' => SORT_ASC, 'fk_marks' => SORT_ASC],\r\n 'desc' => ['fk_marks' => SORT_DESC, 'fk_marks' => SORT_DESC],\r\n 'default' => SORT_ASC,\r\n 'Title' => 'Brand',\r\n ],\r\n 'category' => [\r\n 'asc' => ['fk_categories' => SORT_ASC, 'fk_categories' => SORT_ASC],\r\n 'desc' => ['fk_categories' => SORT_DESC, 'fk_categories' => SORT_DESC],\r\n 'default' => SORT_ASC,\r\n 'Title' => 'Category',\r\n ],\r\n 'modification' => [\r\n 'asc' => ['fk_modifications' => SORT_ASC, 'fk_modifications' => SORT_ASC],\r\n 'desc' => ['fk_modifications' => SORT_DESC, 'fk_modifications' => SORT_DESC],\r\n 'default' => SORT_ASC,\r\n 'Title' => 'Type',\r\n ],\r\n 'price' => [\r\n 'asc' => ['price' => SORT_ASC, 'price' => SORT_ASC],\r\n 'desc' => ['price' => SORT_DESC, 'price' => SORT_DESC],\r\n 'default' => SORT_ASC,\r\n 'Title' => 'Price',\r\n ],\r\n ];\r\n }", "title": "" }, { "docid": "5ba904297feeade62805d5cf794dcd78", "score": "0.5750773", "text": "protected function getSortInfo()\n {\n return array( \"sort_key_string\" => (string)$this->getValue() );\n }", "title": "" }, { "docid": "2667361d04d2f8db51d9dc8ebebd4523", "score": "0.5749576", "text": "public function getSort()\n {\n return isset($this->sort) ? $this->sort : '';\n }", "title": "" }, { "docid": "0a7b150e3ae4549818a17b4adb3c168b", "score": "0.5741909", "text": "public function SortorderFlip()\n\t{\n\n\t\t/***flip sortorder***/\n\t\tif($this->sortorder == 'ASC'){\n\t\t\t$this->sortorder = 'DESC';\n\t\t}\n\t\telse{\n\t\t\t$this->sortorder = 'ASC';\n\t\t}\n\n\t}", "title": "" }, { "docid": "58bba115f126bdfe0f4b161307bf12f5", "score": "0.5724446", "text": "public function getSortByOptions()\n {\n return [\n self::SORT_ORDER => _t(__CLASS__ . '.ORDER', 'Order'),\n self::SORT_RANDOM => _t(__CLASS__ . '.RANDOM', 'Random'),\n self::SORT_RECENT => _t(__CLASS__ . '.RECENT', 'Recent')\n ];\n }", "title": "" }, { "docid": "b1938175ea3151476ad851b6f53fe23a", "score": "0.57232606", "text": "function sort($title, $key = null, $options = array()) {\n \n\t\t// get current sort key & direction\n\t\t$sortKey = $this->sortKey();\n\t\t$sortDir = $this->sortDir();\n \n\t\t// add $sortDir class if current column is sort column\n\t\tif ($sortKey == $key && $key !== null) {\n \n\t\t\t$options['class'] = $sortDir;\n \n\t\t}\n \n\t\treturn parent::sort($title, $key, $options);\n \n\t}", "title": "" }, { "docid": "3aa4df77c2fbb8672545d0d5765dd96d", "score": "0.5721275", "text": "protected function applyDefaultSorting()\n\t{\n\t\tif (empty($this->order) && !empty($this->defaultOrder))\n\t\t\t$this->order=$this->defaultOrder;\n\t}", "title": "" }, { "docid": "d2693cb11c3fab472f5d327d86a39a83", "score": "0.5715465", "text": "function rssmi_sortable_columns() {\r\n\treturn array(\r\n\t\t// meta column id => sortby value used in query\r\n\t\t'title' => 'title',\r\n\t\t'category' => 'category'\r\n\t);\r\n}", "title": "" }, { "docid": "63d3c92178b022569414045467c2ce6e", "score": "0.5714447", "text": "public function getSort(){\n\t\treturn $this->sort;\n\t}", "title": "" }, { "docid": "cc793231c31749c1af04686674d74234", "score": "0.57109255", "text": "public function ordering(): void;", "title": "" }, { "docid": "ba48049f3cfb8f245754becac9efb89b", "score": "0.570677", "text": "protected function getSortFields()\n\t{\n\t\treturn array(\n\t\t\t'mf.manufacturer_name' => JText::_('COM_CATALOGUE_HEADING_MANUFACTURER'),\n\t\t\t'i.price' => JText::_('COM_CATALOGUE_HEADING_PRICE'),\n\t\t\t'i.ordering' => JText::_('JGRID_HEADING_ORDERING'),\n\t\t\t'i.state' => JText::_('JSTATUS'),\n\t\t\t'i.title' => JText::_('JGLOBAL_TITLE'),\n\t\t\t'category_title' => JText::_('JCATEGORY'),\n\t\t\t'access_level' => JText::_('JGRID_HEADING_ACCESS'),\n\t\t\t'i.created_by' => JText::_('JAUTHOR'),\n\t\t\t'language' => JText::_('JGRID_HEADING_LANGUAGE'),\n\t\t\t'i.created' => JText::_('JDATE'),\n\t\t\t'i.id' => JText::_('JGRID_HEADING_ID'),\n\t\t);\n\t}", "title": "" }, { "docid": "24b5423c2bcc6207a20d411e8c6710b1", "score": "0.570488", "text": "function addDesc($fieldname) {\n\t\t$this->orders = array_merge($this->orders, array($fieldname => OrmOrderBy::$DESC));\n\t}", "title": "" }, { "docid": "a9da6dd97b23155663b5c618f77e1306", "score": "0.56990737", "text": "function getMenuSort()\n {\n return 929;\n }", "title": "" }, { "docid": "5dc93e159e213124a824c3f1c232425e", "score": "0.56889987", "text": "public function setSorting($sorting){\r\n\t\t$this->hasSorting = true;\r\n\t\t$this->attributes['sorting'] = $sorting;\r\n\t}", "title": "" }, { "docid": "38548d2d03cc0c1a5598b77d2aa57b1c", "score": "0.56863165", "text": "public function getSortableString();", "title": "" }, { "docid": "a31faff983a5c8ce1c31976fc618af22", "score": "0.5677123", "text": "private static function setSortDefaultArgs( CalendarComponent $c ) : void\n {\n static $DTENDCOMPS = [ IcalInterface::VEVENT, IcalInterface::VFREEBUSY, IcalInterface::VAVAILABILITY ];\n static $DURCOMPS = [\n IcalInterface::VAVAILABILITY,\n IcalInterface::VEVENT,\n IcalInterface::VFREEBUSY,\n IcalInterface::VTODO\n ];\n $compType = $c->getCompType();\n // sortkey 0 : dtstart\n if( false !== ( $d = $c->getXprop( IcalInterface::X_CURRENT_DTSTART ))) {\n $c->srtk[0] = $d[1];\n }\n elseif( false !== ( $d = $c->getDtstart())) {\n $c->srtk[0] = $d->getTimestamp();\n }\n switch( true ) { // sortkey 1 : dtend/due(/duration)\n case ( false !== ( $d = $c->getXprop( IcalInterface::X_CURRENT_DTEND ))) :\n $c->srtk[1] = $d[1];\n break;\n case( in_array( $compType, $DTENDCOMPS, true ) ) && ( false !== ( $d = $c->getDtend())) :\n $c->srtk[1] = $d->getTimestamp();\n break;\n case ( false !== ( $d = $c->getXprop( IcalInterface::X_CURRENT_DUE ))) :\n $c->srtk[1] = $d[1];\n break;\n case (( IcalInterface::VTODO === $compType ) && ( false !== ( $d = $c->getDue()))) :\n $c->srtk[1] = $d->getTimestamp();\n break;\n case ( in_array( $compType, $DURCOMPS, true ) && ( false !== ( $d = $c->getDuration( null, true )))) :\n $c->srtk[1] = $d->getTimestamp();\n break;\n } // end switch\n // sortkey 2 : created/dtstamp\n $c->srtk[2] = (( IcalInterface::VFREEBUSY !== $compType ) &&\n ( false !== ( $d = $c->getCreated())))\n ? $d->getTimestamp()\n : $c->getDtstamp()->getTimestamp();\n // sortkey 3 : uid\n $c->srtk[3] = $c->getUid();\n }", "title": "" }, { "docid": "3d5bd13cfcc8210cb43739871e5081df", "score": "0.56720024", "text": "public function setSortOrder($sortOrder);", "title": "" }, { "docid": "5aa9c3b276930e46417cdfeff0024aee", "score": "0.5667945", "text": "function print_sort( $name, $id, $default_sort ) {\n\tglobal $orderby, $sort;\n\n\tif( isset( $orderby ) && ( $orderby == $id ) ) {\n\t\tif( $sort == 'ASC' ) {\n\t\t\t$to_sort = 'DESC';\n\t\t} else {\n\t\t\t$to_sort = 'ASC';\n\t\t}\n\t} else {\n\t\t$to_sort = $default_sort;\n\t}\n\t$return = '<a href=\"' . tep_href_link(FILENAME_CUSTOMERS_ADVANCED, 'orderby=' . $id . '&amp;sort='. $to_sort) . \n\t'\" class=\"headerLink\">' . $name . '</a>';\n\tif( $orderby == $id ) {\n\t\t$return .= '&nbsp;<img src=\"images/arrow_' . ( ( $to_sort == 'DESC' ) ? 'down' : 'up' ) . \n\t\t'.png\" width=\"10\" height=\"13\" border=\"0\" alt=\"\" />';\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "254ca656188c26fc422b135f7784061e", "score": "0.5658873", "text": "public function sortType(): self\n {\n return $this->type('sort');\n }", "title": "" }, { "docid": "2c3be055d1ecaa0aa2358794d035e087", "score": "0.56510454", "text": "static function get_default_sort()\n {\n static $sort;\n if (empty($sort)) {\n $pk = static::get_pk();\n array_walk($pk, function (&$item) {\n $item = $item . ' ASC';\n });\n $sort = implode(',', $pk);\n }\n return $sort;\n }", "title": "" }, { "docid": "17cc71b853d6b148197498ea8f90217e", "score": "0.56469333", "text": "public function getSortField() {\n\t\treturn $this->getTitle();\n\t}", "title": "" }, { "docid": "0e2ed8f3f3b881d9d776469151e8e6ac", "score": "0.56412363", "text": "public function initilaizeDescription()\n {\n if(emoty($this->getDescription)){\n $descriptionify = new Descriptionify();\n $this->Description = $descriptionify->descriptionify($this->Nom);\n }\n }", "title": "" }, { "docid": "ad85c932c6dbb6109ecb0cb16629f3d0", "score": "0.5632029", "text": "function descriptor_def()\n {\n // @todo: replace this with proper descriptor fields.\n return \"[description]\";\n }", "title": "" }, { "docid": "f7fcea8be9fec95a9f6989dc050c5bec", "score": "0.56319046", "text": "function sort_init($default_key, $default_order = 'asc', $name = null)\n {\n if ($name != null) {\n $this->sort_name = $name;\n } else {\n $this->sort_name = $this->request->params['controller'] . $this->request->params['action'] . '_sort';\n }\n\n $this->sort_default = array('key' => $default_key, 'order' => $default_order);\n }", "title": "" }, { "docid": "85e880204709c1f4e7aaf8be6283cfee", "score": "0.56302786", "text": "private function afterSort(): void\n {\n $this->trigger(self::EVENT_AFTER_SORTING);\n }", "title": "" }, { "docid": "0c2ecbf778e6b054b264ea1aedc8c486", "score": "0.562911", "text": "public function sortQuery(): void\n {\n }", "title": "" }, { "docid": "cf0c9ece1a5fd60ffe1d247226900345", "score": "0.56259924", "text": "function sortMode()\r\n {\r\n switch( $this->SortMode )\r\n {\r\n case 1 :\r\n {\r\n $SortMode = \"time\";\r\n }\r\n break;\r\n\r\n case 2 :\r\n {\r\n $SortMode = \"alpha\";\r\n }\r\n break;\r\n\r\n case 3 :\r\n {\r\n $SortMode = \"alphadesc\";\r\n }\r\n break;\r\n\r\n case 4 :\r\n {\r\n $SortMode = \"absolute_placement\";\r\n }\r\n break;\r\n\r\n default :\r\n {\r\n $SortMode = \"time\";\r\n }\r\n }\r\n\r\n return $SortMode;\r\n }", "title": "" }, { "docid": "02d0696aa4881588bf6c075c577cd32f", "score": "0.5624794", "text": "protected function getSortFields()\n\t{\n\t\treturn array(\n\t\t\t'a.linkname' => JText::_('ADMIN_FLEXBANNER_LINKNAME'),\n\t\t\t'a.linkurl' => JText::_('ADMIN_FLEXBANNER_LINKURL'),\n\t\t\t'cl.clientname' => JText::_('ADMIN_FLEXBANNER_CLIENT'),\n\t\t\t'a.state' => JText::_('JSTATUS'),\n\t\t\t'a.linkid' => JText::_('JGRID_HEADING_ID')\n\t\t);\n\t}", "title": "" }, { "docid": "6ecd996a6c65bcc5e94169f3c2863b64", "score": "0.5623178", "text": "function getSort(){\n return 777;\n }", "title": "" }, { "docid": "283037d4ca7fb487d25b24a2e56884e2", "score": "0.561513", "text": "function setSortMode( $value )\r\n {\r\n $this->SortMode = $value;\r\n }", "title": "" }, { "docid": "d4098276ca04c710db5300d03356dfd4", "score": "0.5610131", "text": "public function getSortOrder()\n {\n switch ($this->SortBy) {\n \n case self::SORT_ORDER:\n return 'Sort';\n \n case self::SORT_RECENT:\n return 'Date DESC';\n \n case self::SORT_RANDOM:\n return 'RAND()';\n \n }\n }", "title": "" }, { "docid": "6dbdd851cdd0e3c5206c8f91bf608e86", "score": "0.5608711", "text": "abstract protected function addOrderByColumn($columnAlias, $columnSorting);", "title": "" }, { "docid": "32e93a8b1ea98488198d69a7f87e3196", "score": "0.5608495", "text": "public function setAlphabeticallyOrder()\n {\n $this->setOrder('name', Zend_Db_Select::SQL_ASC);\n }", "title": "" } ]
28622cbe46f4d6d7a378bb1baff21074
Deletes an existing UploadedFile model. If deletion is successful, the browser will be redirected to the 'index' page.
[ { "docid": "922325fbaa820aee4a1ac0b394195c6e", "score": "0.6296223", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n header('Location: '.$model->path); \n }", "title": "" } ]
[ { "docid": "6398325eb76b96a1e6c8f3aaa22cbd08", "score": "0.7323613", "text": "public function delete_file(){\n $file_id = $this->input->get('file_id');\n $this->filemanager->delete_file($file_id); // delete the file\n $this->file_folder_model->delete_file($file_id);\n\n redirect('group/file_folder');\n }", "title": "" }, { "docid": "e47a9205a25685b39c462085d5472968", "score": "0.7191452", "text": "public function actionDelete()\n {\n $id = $_POST['id'];\n if($this->loadModel($id)->delete()){\n $_SESSION['delete'] = \"Image deleted successfully\";\n echo json_encode([\n 'token' => 1,\n ]);\n }\n else{\n echo json_encode([\n 'token' => 0,\n ]);\n }\n\n /*// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if(!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));*/\n }", "title": "" }, { "docid": "2b84932d8f948b66334c670e2bfe334b", "score": "0.7106719", "text": "public function actionRemove() {\n $app = Application::$app;\n if ($app->getAcc()->getAccess()) {\n if (!empty($_GET['id'])) {\n $model = new File();\n $model = $model->findFirst(array(\n array(\n 'placeholder' => ':id',\n 'compare' => '=',\n 'value' => $_GET['id'],\n 'column' => 'id',\n 'operator' => 'AND'\n ),\n array(\n 'placeholder' => ':user',\n 'compare' => '=',\n 'value' => $app->getAcc()->getUserid(),\n 'column' => 'user_id'\n )\n ));\n \n if (is_null($model->id)) {\n $app->getRequest()->setFlash('error', 'You can not remove this file');\n $app->getRequest()->redirect('/base/index');\n return;\n }\n \n $model->remove();\n $app->getRequest()->setFlash('info', 'Your file has been successfully removed');\n $app->getRequest()->redirect('/base/index');\n return;\n }\n }\n $app->getRequest()->redirect('/base/index');\n }", "title": "" }, { "docid": "87656a9927684f6de495f9c83702179e", "score": "0.7079828", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n if (!empty($model->image) && file_exists('upload/image/' . basename($model->image)))\n unlink('upload/image/' . basename($model->image));\n $model->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "748fa2ba920d84ff6e1738c12747b985", "score": "0.705183", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n if(is_file('uploads/'.$model->main_image)){\n echo 'uploads/'.$model->main_image;\n die;\n unlink('uploads/'.$model->main_image);\n }\n \n if(is_file('uploads/preview/'.$model->preview_image)){\n unlink('uploads/preview/'.$model->preview_image);\n }\n \n $model->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "72cd35bfd2986e6193d9eba68a0a89d5", "score": "0.694042", "text": "public function actionDelete($id)\n { \n Yii::$app->session->setFlash('success', 'ลบรายการสำเร็จ');\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n //@unlink(Yii::getAlias('@webroot').'/uploads/fix/'.$model->fix_photo);\n $model->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "350f11c106d1edde41a635a6ceb871ac", "score": "0.68598515", "text": "function Delete()\n\t{\n\t\t$message = $this->efup->Delete( $this->fileName, true );\n\t\t$this->ShowPage('index', array('info' => $message->message), false, true);\n\t}", "title": "" }, { "docid": "9a36f5b5ef5668b4dce5ebae2106e567", "score": "0.6842069", "text": "public function actionDelete($id)\n {\n $details=$this->findModel($id);\n $path='uploads/songs/'.$details->file_path;\n if(file_exists($path)){\n unlink($path);\n }else{\n // echo 'file not found';\n }\n \n \n $details->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "6568e929a013a0e50dce4349b66603ab", "score": "0.6821164", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $modelDescription = $this->findDescriptionModel($model->descriptionId);\n if ($modelDescription != null) $modelDescription->delete();\n $model->delete();\n $modelImage = new ImageUploader();\n $modelImage->deleteAllImages($id);\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "9a4b532999a9eff9beb8a30e394b94f7", "score": "0.68162614", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n $fileName = $model->imageName;\n if (is_file('@imagesRoot' . '/' . $fileName)) {\n die(\"dasdas\");\n unlink('@imagesRoot' . '/' . $fileName);\n }\n if ($this->findModel($id)->delete()) {\n if (is_file('@imagesRoot' . '/' . $fileName)) {\n die(\"dasdas\");\n unlink('@imagesRoot' . '/' . $fileName);\n }\n }\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "88f5cc23825c40e65efc370294c9d03d", "score": "0.6781189", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n if ($model->delete()) {\n if (!$model->deleteFile() && !empty($model->filename)) {\n Yii::$app->session->setFlash('error', Yii::t('articles', 'Error deleting attachment (controller delete)'));\n } else {\n Yii::$app->session->setFlash('success', Yii::t('articles', 'Attachment has been deleted'));\n }\n } else {\n Yii::$app->session->setFlash('error', Yii::t('articles', 'Error deleting attachment'));\n }\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "c9ffa85ac59414bca59a014b23e43f47", "score": "0.6775685", "text": "public function actionDelete() {\n\n $model = $this->loadModel();\n $profile = Profile::model()->findByPk($model->id);\n\n // Make sure profile exists\n// if ($profile)\n// $profile->delete();\n\n $model->delete();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_POST['ajax']))\n $this->redirect(array('/user/admin'));\n }", "title": "" }, { "docid": "39507243fc1c266d987a58a3064dc3aa", "score": "0.67450887", "text": "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Lock_Service_File::getFile($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tif ($info['status'] == 4) $this->output(-1, '该文件是已上架状态,无法删除');\n\t\tif (!in_array($this->userInfo['groupid'], array(1, 3))) $this->output(-1, '没有权限删除');\n\t\t//记录日志\n\t\t$log_data = array(\n\t\t\t\t'uid'=>$this->userInfo['uid'],\n\t\t\t\t'username'=>$this->userInfo['username'],\n\t\t\t\t'message'=>$this->userInfo['username'].'删除了文件:'.$info['title'],\n\t\t\t\t'file_id'=>$info['id']\n\t\t);\n\t\t$result = Lock_Service_File::delete($id, $log_data);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "title": "" }, { "docid": "b19e3606c584b6f916f9edf5bec1d8dd", "score": "0.6743459", "text": "public function deletecontratAction()\r\n {\r\n $oFile = FilesQuery::create()->findPk($this->_request->getParam('file_id'));\r\n $oFile->delete();\r\n $this->_forward('contratversions', null, null, array('op_id' => $oFile->getFileEntityId()));\r\n }", "title": "" }, { "docid": "988de55436428bcc97e8439b253d44e5", "score": "0.6725428", "text": "public function actionDelete() {\n if(Yii::app()->request->isPostRequest) {\n // we only allow deletion via POST request\n $this->loadModel();\n $file = PIC_PATH.'/attachment/'.$this->_model->path;\n $this->changeBuidModel($this->_model->buid_id, $this->_model->buid_type, $this->_model->att_type, 0);\n $upUid = $this->_model->up_uid;\n $description = \"您上传的\".Attachment::$buidTypeName[$this->_model->buid_type].$this->_model->buid_id . Attachment::$attTypeName[$this->_model->att_type].\"未通过审核,感谢您对我们的支持。\";\n $this->_model->delete();\n file_exists($file) && unlink($file);\n $msgModel = new Msg();\n $msgModel->msg_sendid = 0;\n $msgModel->msg_revid = $upUid;\n $msgModel->msg_title = '附件审核通知';\n $msgModel->msg_content = $description;\n $msgModel->msg_time = time();\n $msgModel->save();\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if(!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));\n }\n else\n throw new CHttpException(400,'Invalid request. Please do not repeat this request again.');\n }", "title": "" }, { "docid": "afd0b0eda2a2ccebf86f2b4830501046", "score": "0.67203045", "text": "public function actionDelete()\n {\n if (!isset($_REQUEST['id']))\n {\n return json_encode(['c'=>-1,'msg'=>\\Yii::t('app', 'Error Params')]);\n }\n $model = $this->findModel($_REQUEST['id']);\n if (is_object($model))\n {\n UtilHelper::DeleteImg($model->url);\n CmsAlbum::updateAllCounters(['count_pic'=>-1],'id=:id and count_pic>0',[':id'=>$model->album_id]);\n $model->delete();\n return json_encode(['c'=>0]);\n }\n else\n {\n return json_encode(['c'=>-1,'msg'=>\\Yii::t('app', 'Error Params')]);\n }\n }", "title": "" }, { "docid": "76a7aec671135dbfac264ad6ae4e750a", "score": "0.6704958", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n //remove upload file & data\n $this->removeUploadDir($model->ref);\n Uploads::deleteAll(['ref'=>$model->ref]);\n Uploads::deleteAll(['ref'=>$model->ref]);\n\n if ($model->delete()) {\n Yii::$app->session->setFlash( 'success', \"ลบข้อมูลสำเร็จ\" );\n return $this->redirect(['index']);\n }\n\n\n }", "title": "" }, { "docid": "2b26033517752e3acc851e9313f1aba3", "score": "0.6692282", "text": "public function action_delete($id = null) {\n\t\t//Remove file\n\t\t$file = Model_File::find($id);\n\t\tunlink($file->path);\n\n\n\t\t$query = DB::delete('files')\n\t\t\t->where('id', '=', $id)\n\t\t\t->execute();\n\n\t\tif ($query) {\n\t\t\tSession::set_flash('success', 'Deleted file #' . $id);\n\t\t} else {\n\t\t\tSession::set_flash('error', 'Could not delete file #' . $id);\n\t\t}\n\n\t\tResponse::redirect('admin/file');\n\t}", "title": "" }, { "docid": "1ee9e7bddd5127c62f20c9a6373fc9d0", "score": "0.6688708", "text": "public function Delete()\n {\n $this->model->Delete($_REQUEST['id']);\n header('Location: index.php');\n }", "title": "" }, { "docid": "1baabbeb605b4695fc2413ea821cecaa", "score": "0.66708046", "text": "public function actionDelete($id)\n {\n $dir = Yii::getAlias('@frontend/web');\n $model = $this->findModel($id);\n Unlink::unlinkPhoto($model->img); \n $model->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "a3e45fd737059049d30b3ac52810fa3d", "score": "0.6660714", "text": "public function actionDelete($id) {\n $model = $this->findModel($id);\n //remove upload file & data\n $this->removeUploadDir($model->ref);\n // Uploads::deleteAll(['ref'=>$model->ref]);\n\n $model->delete();\n return $this->redirect(['view-app', 'id' => $model->appilcant_id]);\n // return $this->redirect(['index']);\n }", "title": "" }, { "docid": "dc78a1a5a6a6f713e9e4def714b5b1b6", "score": "0.66475", "text": "public function actionDelete(){\n $fileId = \\Yii::$app->getRequest()->getRawBody();\n if(!$fileId){\n throw new BadRequestHttpException(\"File id is not valid\");\n }\n\n $file = UploadmanagerFiles::findOne($fileId);\n if(!$file){\n return new NotFoundHttpException(\"File not found in db\");\n }\n\n if(!$file->delete()){\n throw new ServerErrorHttpException(\"Can not delete file `{$file->id}``\");\n }\n\n // no content to return\n \\Yii::$app->getResponse()->setStatusCode(204);\n }", "title": "" }, { "docid": "75ec06587fd9b83df02e112f2a413209", "score": "0.6622711", "text": "public function actionDelete()\n {\n /** @var ActiveRecordInterface|ActiveRecord $model */\n $model = $this->getModel();\n $scenarios = $model->scenarios();\n if (isset($scenarios['delete'])) {\n $model->scenario = 'delete';\n }\n\n $pk = 'id';\n if (method_exists($this, 'getPrimaryKeyName')) {\n $pk = $this->getPrimaryKeyName();\n }\n\n $id = Yii::$app->request->get($pk);\n $model->findOne($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ab6250735709a2fb30bd6164f65be96a", "score": "0.6601833", "text": "public function deleteFile()\r\n {\r\n $errorArray = [];\r\n\r\n if (!$this->checkController->isUserLoggedIn()) array_push($errorArray, 'No active user!');\r\n if (!isset($_REQUEST['fileName'])) array_push($errorArray, 'No file requested');\r\n if ($this->checkController->checkForErrors($errorArray)) {\r\n var_dump($errorArray);\r\n $this->checkController->redirect('index.php');\r\n }\r\n\r\n $image = $_REQUEST['fileName'];\r\n $userId = $_SESSION['id'];\r\n $isAdmin = $this->checkController->isAdmin();\r\n\r\n // false if the user has uploaded the file\r\n $isUserFile = $this->modelFiles->checkUserFile($userId, $image);\r\n\r\n if (!$isAdmin && $isUserFile) {\r\n echo \"You can't delete this picture\";\r\n die();\r\n $this->formController->loginFormAction();\r\n }\r\n $isDeleted = $this->modelFiles->deleteFile( $image);\r\n if ($isDeleted) {\r\n $this->removeFile($image);\r\n $this->checkController->redirect('index.php');\r\n } else {\r\n echo \"Database error!\";\r\n return $this->checkController->redirect('index.php');\r\n }\r\n\r\n }", "title": "" }, { "docid": "7ad76b1a2e28fb2ff4197ac1b451d83f", "score": "0.6559035", "text": "public function actionDelete($id)\n {\n\n if (isset($this->findModel($id)->main_photo)) {\n unlink('uploads/screenshot/' . $this->findModel($id)->main_photo);\n } else {\n\n }\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "304388cacfe744e7cee6f7162e7dda14", "score": "0.6550324", "text": "public function deleteAction()\n {\n // set filters and validators for POST input\n $filters = array(\n 'ids' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'ids' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // read array of record identifiers\n // delete records from database\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->delete('Zf1_Model_Item i')\n ->whereIn('i.RecordID', $input->ids);\n $result = $q->execute();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach ($input->ids as $id) {\n foreach (glob(\"{$config['uploadPath']}/{$id}_*\") as $file) {\n unlink($file);\n }\n }\n $this->_helper->getHelper('FlashMessenger')->addMessage('The records were successfully deleted.');\n $this->_redirect('/admin/catalog/item/success');\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input');\n }\n }", "title": "" }, { "docid": "5d151f6e24de8428d5bd10f5cf027d61", "score": "0.6538878", "text": "public function filedeleteAction()\n {\n $request = $this->getRequest();\n\n // This is never valid with no profile, or for non-owners\n if((!$request->isPost()) || (!is_object($this->_profile)) || \n (!$this->_isOwner)) {\n return $this->notFoundAction();\n }\n\n // Check our files.\n $selectedFiles = $request->getPost('selectedFiles', array());\n\n if(empty($selectedFiles)) {\n return $this->notFoundAction();\n }\n\n // Make sure they are all integers\n foreach($selectedFiles as $selected) {\n if(!preg_match('/^\\d+$/', $selected)) {\n return $this->notFoundAction();\n }\n }\n\n // Get content table\n $contentTable = $this->getModel()->get('Content');\n\n // Try to grab 'em\n $files = $contentTable->query(array(\n 'id' => $selectedFiles,\n 'profile_id' => $this->_profile->getId(),\n ));\n\n // Abort if there's none\n if(!count($files)) {\n return $this->notFoundAction();\n }\n\n // If we have an act -- let's move\n if($request->getPost('act')) {\n // Get sanitized file list\n $fileIdList = array();\n foreach($files as $file) {\n // We can't delete directories\n // @TODO: this later ?\n if($file->getTypeId() == 3) {\n continue;\n }\n\n $fileIdList[] = $file->getId();\n\n // Let's try to delete.\n $this->getMedia()->deleteContent($file);\n }\n\n // Just in case it was only folders\n if(count($fileIdList)) {\n $contentTable->beginTransaction();\n \n $this->getModel()->get('Comments')\n ->delete(array(\n 'content_id' => $fileIdList,\n ));\n $this->getModel()->get('ContentTiersLink')\n ->delete(array(\n 'content_id' => $fileIdList,\n ));\n $contentTable->delete(array(\n 'id' => $fileIdList,\n )\n );\n $contentTable->commitTransaction();\n }\n\n $returnUrl = $request->getPost('return', '');\n\n if(strlen($returnUrl)) {\n return $this->redirect()->toUrl($returnUrl);\n } else {\n return $this->redirect()->toRoute('profile-files', array('profile' => $this->_profile->getUrl()));\n }\n }\n\n // Get a view\n $view = $this->getView(true);\n\n $view->files = $files;\n $view->returnUrl = $request->getPost('return', '');\n\n return $view;\n }", "title": "" }, { "docid": "8ae0906043ce06a8f7959ea55616d09c", "score": "0.64969313", "text": "public function deleteAction()\n {\n if ( !$this->_acl->isAllowed($this->_role, 'album', 'delete') ) {\n $this->_helper->redirector('index', 'auth');\n }\n\n if ($this->getRequest()->isPost()) {\n $del = $this->getRequest()->getPost('del');\n if ($del == 'Yes') {\n $id = $this->getRequest()->getPost('id');\n $albums = new Application_Model_DbTable_Albums();\n $albums->deleteAlbum($id);\n }\n $this->_helper->redirector('index');\n } else {\n $id = $this->_getParam('id', 0);\n $albums = new Application_Model_DbTable_Albums();\n $this->view->album = $albums->getAlbum($id);\n }\n }", "title": "" }, { "docid": "1a00ea515bef884d1b23c067c4540a79", "score": "0.6468533", "text": "public function destroy($id)\n {\n $file = File::find($id);\n $file->delete();\n return redirect('file/ListFiles');\n }", "title": "" }, { "docid": "723218988ceeaa7a12a63f729f4b8508", "score": "0.6467514", "text": "public function deleteImage(){\n\t\t$imageid= $this->input->post('id');\n\t\t$result = $this->Gallery_model->deleteImage($imageid);\n\t\t\n\t\tif($result){\n\t\t\t$msg = \"Deleted Successfully!!!\";\n\t\t\t$this->session->set_flashdata('message',alert('success',$msg));\n\t\t\tredirect('gallery/category');\n\t\t}else{\n\t\t\t$msg = \"Error in Deletion!!!\";\n\t\t\t$this->session->set_flashdata('message',alert('danger',$msg));\n\t\t\tredirect('gallery/category');\t\t\n\t\t}\t\t\n\t\t\n\n\t}", "title": "" }, { "docid": "e42d3174f50de1843717bc4d753ba6da", "score": "0.6467154", "text": "public function actionDelete()\n {\n $model = Usuarios::findOne(Yii::$app->request->post('id'));\n $model->delete();\n Yii::$app->session->setFlash('success', 'La cuenta ha sido borrada correctamente.');\n\n return $this->redirect(['usuarios/index']);\n }", "title": "" }, { "docid": "b8fa17ea3e772dc5e194a82f1e08d860", "score": "0.64573586", "text": "public function delete_file()\n {\n if (request()->has('id')) {\n up()->delete(request('id'));\n }\n }", "title": "" }, { "docid": "8773759987ed9a3029028ac2e77f4330", "score": "0.64446986", "text": "public function actionDeleteall()\n {\n $model = new Files();\n $pathToDir = '../upload/' . Yii::$app->user->identity['login'];\n\n self::cleanDirectory($pathToDir);\n $model->clearDataUser();\n\n $this->goHome();\n }", "title": "" }, { "docid": "b1e64407e2282359e9551fae87918fb7", "score": "0.64082724", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n\n //untuk menghapus foto di folder web\n unlink(Yii::$app->basePath . '/web/upload/santri/' . $model->foto);\n\n $model->delete();\n\n //notifikasi sukses\n Yii::$app->session->setFlash('success', 'Data Santri Berhasil Dihapus');\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d0d4cae1a26644b42c2a6377b31e8d88", "score": "0.6407372", "text": "public function actionDeleteImage($id) {\n $model = Report::findOne($id);\n if ($model->deleteImage()) {\n //Yii::$app->session->setFlash('success', \n //'Your image was removed successfully. Upload another by clicking Browse below');\n $sms = \"<p>Your File was removed successfully. Upload another by clicking Browse below</p>\";\n Yii::$app->getSession()->setFlash('success', $sms);\n return $this->redirect(['update', 'id' => $id]);\n } else {\n Yii::$app->session->setFlash('error', 'Error removing file. Please try again later or contact the system admin.');\n }\n return $this->render('update', ['model' => $model]);\n }", "title": "" }, { "docid": "7140a9d07bae06180b8376a827a6eafd", "score": "0.63737625", "text": "public function actionDelete() {\n\t\treturn $this->findModel(Yii::$app->request->post('id'))->delete() !== false ? $this->success() : $this->fail();\n\t}", "title": "" }, { "docid": "3e59da54f1beb89ef6fd531715f1c3e5", "score": "0.6366807", "text": "public function actionDeleteFile($id) {\r\n /*header( 'Vary: Accept' );\r\n if( isset( $_SERVER['HTTP_ACCEPT'] ) && (strpos( $_SERVER['HTTP_ACCEPT'], 'application/json' ) !== false) ) {\r\n header( 'Content-type: application/json' );\r\n } else {\r\n header( 'Content-type: text/plain' );\r\n }*/\r\n \r\n $photo = Photo::model()->findByPk($id);\r\n $success = $photo->delete();\r\n //$success = true;\r\n echo json_encode( $success ); \r\n }", "title": "" }, { "docid": "9e5aba1455f01addc77c29aa569df62c", "score": "0.6364565", "text": "protected function handleDeleting()\r\n {\r\n if (isset($_GET[\"_method\"]) && $_GET[\"_method\"] == \"delete\") {\r\n $success = false;\r\n if ($_GET[\"file\"][0] !== '.' && Yii::app()->user->hasState($this->stateVariable)) {\r\n // pull our userFiles array out of state and only allow them to delete\r\n // files from within that array\r\n $userFiles = Yii::app()->user->getState($this->stateVariable, array());\r\n\r\n // Return Media model found by id otherwise null \r\n $mediaModel = Media::model()->findByPk($_GET['modelId']);\r\n // If file and model corresponding to it are found \r\n if ($mediaModel && $this->fileExists($userFiles[$_GET[\"file\"]])) \r\n {\t// If model and corresponding file deletion is successful\r\n \t// Cause Media class implements afterDelete() we don't need to unlink file\r\n if ( $mediaModel->delete() ) \r\n {\r\n unset($userFiles[$_GET[\"file\"]]); // remove it from our session and save that info\r\n Yii::app()->user->setState($this->stateVariable, $userFiles);\r\n }\r\n }\r\n }\r\n echo json_encode($success);\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "c6b2aa6535941bd0bc28cb3a433dd82a", "score": "0.6352089", "text": "public function deleteImage($file) {\r\r $this->load->helper(array('form', 'url', 'file'));\r $success = unlink(FCPATH . 'uploads/' . $file);\r $success = unlink(FCPATH . 'uploads/thumbs/' . $file);\r //info to see if it is doing what it is supposed to\r $info = new StdClass;\r $info->sucess = $success;\r $info->path = base_url() . 'uploads/' . $file;\r $info->file = is_file(FCPATH . 'uploads/' . $file);\r if ($this->input->is_ajax_request()) {\r //I don't think it matters if this is set but good for error checking in the console/firebug\r echo json_encode(array($info));\r } else {\r //here you will need to decide what you want to show for a successful delete\r $file_data['delete_data'] = $file;\r $this->load->view('upload/delete_success', $file_data);\r }\r }", "title": "" }, { "docid": "8798fcadca2c86ec65231c3cf11d7df1", "score": "0.6351483", "text": "public function deleteAction()\n\t{\n\t\t$this->setLayout('blanco');\n\t\t$csrf = $this->_getSanitizedParam(\"csrf\");\n\t\tif (Session::getInstance()->get('csrf')[$this->_csrf_section] == $csrf ) {\n\t\t\t$id = $this->_getSanitizedParam(\"id\");\n\t\t\tif (isset($id) && $id > 0) {\n\t\t\t\t$content = $this->mainModel->getById($id);\n\t\t\t\tif (isset($content)) {\n\t\t\t\t\t$uploadDocument = new Core_Model_Upload_Document();\n\t\t\t\t\tif (isset($content->archivostlc_archivo) && $content->archivostlc_archivo != '') {\n\t\t\t\t\t\t$uploadDocument->delete($content->archivostlc_archivo);\n\t\t\t\t\t}\n\t\t\t\t\t$this->mainModel->deleteRegister($id);$data = (array)$content;\n\t\t\t\t\t$data['log_log'] = print_r($data,true);\n\t\t\t\t\t$data['log_tipo'] = 'BORRAR ARCHIVOSTLC';\n\t\t\t\t\t$logModel = new Administracion_Model_DbTable_Log();\n\t\t\t\t\t$logModel->insert($data); }\n\t\t\t}\n\t\t}\n\t\theader('Location: '.$this->route.''.'');\n\t}", "title": "" }, { "docid": "94cc8820f1316e44d52d373a897e938a", "score": "0.6341041", "text": "function del()\n {\n\t\t$id = $this->uri->segment(4);\n\t\t$thietbi_del = $this->thietbi_model->get_info($id);\n\t\tif ($thietbi_del) {\n\t\t\t$this->thietbi_model->delete($id);\n\t\t\t// unlink('./public/images/product/' . $product->img);\n\t\t}\n\t\tredirect(base_url('admin/product'));\n\t}", "title": "" }, { "docid": "fac78a2f4a882ec65ed75f26a55ba33c", "score": "0.63308036", "text": "public function destroy($id)\n {\n //Finding the file\n $file = File::find($id);\n\n //Delitting the file\n $file->delete();\n\n //Sending the user to the index page\n return redirect()->route('file/index');\n }", "title": "" }, { "docid": "d503ffa685438b725a746de96c44fcab", "score": "0.63295454", "text": "public function actionDetailDelete(){\n\t\t$form = $_POST;\n\t\t$container = $this->getContext();\n\t\t$downloadModel = new \\Models\\DownloadModel($container, $this->session->getNamespace('web')->id);\n\t\t$downloadModel->deleteFile($form['detailId']);\n\t\t$this->redirect('downloadPages:detail', array('id' => $this->getParam('id')));\n\t}", "title": "" }, { "docid": "5be32d013b61477eee8a4f92f3de57b4", "score": "0.63260734", "text": "public function actionDelete()\n\t{\n\t\tif(isset($_POST['id']) && $_POST['id']){\n\t\t \n\t\t $id = $_POST['id'];\n\t\t $model=$this->loadModel($id);\n\n\t\t $model->status ='deleted';\n \n\t\t if($model->save())\n\t\t {\n\t\t\t echo \"Deleted succesfully\";\n\t\t }\n\t\t else\n\t\t echo \"Somting went wrong\";\n\t }\n\t else\n\t {\n\t\t echo \"Invalid Request\"; \n\t }\n\t}", "title": "" }, { "docid": "736897b924f2a5969141c7d1c6304a4b", "score": "0.6322116", "text": "public function delete()\n {\n $id= $_GET['id'];\n $data=$this->advertisement->get_advertisement($id);\n if(!empty($data[0])) {\n unlink('images/adv/'.$data[0]['image']);\n $data = $this->advertisement->delete($id);\n }\n redirect('advertisement');\n }", "title": "" }, { "docid": "84dca776e22bbeb907ced45680af1ebe", "score": "0.6321632", "text": "public function actionDelete()\n {\n //$this->findModel($id)->delete();\n\t\t$intId = Yii::$app->request->post('id');\n\t\t$session = Yii::$app->session;\n\t\t$model = $this->findModel($intId);\n\t\t$model->status = 'Deleted';\n\t\tif($model->save()) {\n\t\t\t$session->setFlash('success', PROPTYPE_DEL_SUCC);\n\t\t} else {\n\t\t\t$session->setFlash('error', PROPTYPE_DEL_ERR);\n\t\t\t//print_r($model->getErrors());exit;\n\t\t}\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "46742c4952a18f8bf20155049dca55b8", "score": "0.6313987", "text": "public function deletePorductFile(){ \n\t \t $fileType = $this->input->post('fileType');\n\t \t $DataID = $this->input->post('DataID');\n\t \t $FileName = $this->input->post('FileName');\n\t\t $result = $this->Control_model->deleteProductFile($DataID, $fileType, $FileName);\n\t\t echo $result;\n\t }", "title": "" }, { "docid": "b798c79dcfc1aa61d039e781d71208db", "score": "0.6311427", "text": "public function destroySelected()\n\t{\n\t\t$documents = explode(',', Input::get('removedoc'));\n\n\t\tforeach($documents as $document)\n\t\t{\n\t\t\t$file = FileModel::find($document);\n\n\n\t\t\tif (count($file->imageable->blocks)) {\n\t\t\t\treturn Redirect::back()->with('item_cant_be_deleted', true);\n\t\t\t}\n\n\t\t\tFile::delete($file->imageable->path . '/' . $file->imageable->name);\n\n\t\t\t// Remove the file type from the database.\n\t\t\t$file->imageable->delete();\n\n\t\t\t// Remove the file from the database.\n\t\t\t$file->delete();\n\n\t\t}\n\n\t\t// Redirect back \n\t\treturn Redirect::back()->with('file_deleted', true);\t\n\t}", "title": "" }, { "docid": "453c50b7e2b34ebe798a2efa6396353a", "score": "0.62952375", "text": "public function actionDelete($id) {\r\n\t\t$this->findModel ( $id )->delete ();\r\n\t\t$img \t= Images::find()->where(['related_id' => $id])->one();\r\n\t\t$this->actionDeleteimg($img->id);\r\n\t\t\r\n\t\treturn $this->redirect ( ['index'] );\r\n\t}", "title": "" }, { "docid": "224f474a2b1eb10e43a1b355c5f0d797", "score": "0.6291646", "text": "public function delete( $params = null )\n {\n\n $request = $this->getRequest();\n\n // load the flow flags\n $params = $this->getFlags( $this->getRequest() );\n $params->ajax = true;\n\n if(!$objid = $this->request->get('objid',Validator::FILENAME) )\n {\n $this->view->message->addError('got no file to delete');\n }\n\n unlink(PATH_GW.'data/bdl/projects/upload/'.$objid);\n\n\n }", "title": "" }, { "docid": "d61360dd70afbd187c762e3aa4283e35", "score": "0.6281069", "text": "public function ajaxfiledelete() {\n\t\t\t$this->Fileuploader->ajaxfiledelete();\n\t\t}", "title": "" }, { "docid": "d61360dd70afbd187c762e3aa4283e35", "score": "0.6281069", "text": "public function ajaxfiledelete() {\n\t\t\t$this->Fileuploader->ajaxfiledelete();\n\t\t}", "title": "" }, { "docid": "d61360dd70afbd187c762e3aa4283e35", "score": "0.6281069", "text": "public function ajaxfiledelete() {\n\t\t\t$this->Fileuploader->ajaxfiledelete();\n\t\t}", "title": "" }, { "docid": "d61360dd70afbd187c762e3aa4283e35", "score": "0.6281069", "text": "public function ajaxfiledelete() {\n\t\t\t$this->Fileuploader->ajaxfiledelete();\n\t\t}", "title": "" }, { "docid": "b22b73b927b8ca095dced09abc27bfc6", "score": "0.6272595", "text": "public function executeDeleteFile()\n {\n // ZOID: Expand to allow users to delete own files? Also change button in template\n $this->forward404Unless($this->getUser()->hasCredential(\"deletecontent\"));\n \n // Get the File details ZOID: Move to pre-execute?\n $fileId = intval($this->getRequestParameter('fileId'));\n try\n {\n $selectedFile = new artworkFile($fileId);\n }\n catch (Exception $e)\n {\n $this->forward404($e);\n }\n \n try\n {\n $fileUser = $selectedFile->getUser();\n $selectedFile->deleteFile();\n }\n catch (Exception $e)\n {\n die($e->getMessage());\n }\n //$tmproute = '@user_files?user='.$fileUser;\n //Subreaktor::addSubreaktorToRoute('@user_files?user='.$fileUser);\n $this->redirect(Subreaktor::addSubreaktorToRoute('@user_content?mode=allartwork&user='.$fileUser->getUsername()));\n }", "title": "" }, { "docid": "f555ff5e7ae9cc038e1b2fdb5c805565", "score": "0.6266154", "text": "public function actionDelete() {\n\t\t\n\t\tif (Yii::app()->request->isPostRequest) {\n\t\t\t// we only allow deletion via POST request\n\t\t\t$this->loadUser()->delete();\n\t\t\tif (!Yii::app()->request->isAjaxRequest)\n\t\t\t\t$this->redirect(array('list'));\n\t\t}\n\t\telse\n\t\t\tthrow new CHttpException(404,'Invalid request. Please do not repeat this request again. You must have JavaScript turned on!');\n\t}", "title": "" }, { "docid": "2e4a0ec0f51a40242daadce288b17273", "score": "0.6265991", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d620570d1a91f4db6f175a3cb57f0869", "score": "0.62584245", "text": "public function delete(){\n\t\t//Get the filename to delete\n\t\t$sql = \"SELECT * FROM \" . DB_PREFIX . \"attached_download WHERE id='\" . $this->request->get['id'] . \"'\"; \n\t\t$query = $this->db->query($sql);\n\n\t\t$download_info = $query->row; //Download info array\n\n\t\t//Remove the file from the folder directory (Opencart doesnt do this by default so we will just take care of it here)\n\t\tunlink(DIR_DOWNLOAD . $download_info['filename']);\n\n\t\t//Remove from the atd_database\n\t\t$sql = \"DELETE FROM \" . DB_PREFIX . \"attached_download WHERE id='\" . $this->request->get['id'] . \"'\";\n\t\t$query = $this->db->query($sql);\n\n\t\tif(!$query){\n\t\t\techo json_encode(['err' => 'Unable to delete file.']);\n\t\t}else{\n\t\t\techo json_encode(['err' => false]);\n\t\t}\n\t}", "title": "" }, { "docid": "8ea4442e57b2956d4b632f5919db8412", "score": "0.6253246", "text": "public function massDeleteAction()\n {\n $attachmentIds = $this->getRequest()->getParam('attachment');\n if (!is_array($attachmentIds)) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('arcyro_document')->__('Please select attachment to delete.')\n );\n } else {\n try {\n foreach ($attachmentIds as $attachmentId) {\n $attachment = Mage::getModel('arcyro_document/attachment');\n $attachment->setId($attachmentId)->delete();\n }\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('arcyro_document')->__('Total of %d attachment were successfully deleted.', count($attachmentIds))\n );\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('arcyro_document')->__('There was an error deleting attachment.')\n );\n Mage::logException($e);\n }\n }\n $this->_redirect('*/*/index');\n }", "title": "" }, { "docid": "63a8efa3c5f76ecad5f386eba6f87593", "score": "0.62497807", "text": "public function destroy($id)\n\t{\n //$upload = DB::table('tb_upload')->where('id', $id)->first();\n $upload = Upload::find($id);\n $file = $upload->filename;\n //return public_path().'/assets/files/'.$file;\n\t\t$upload->delete();\n File::delete(public_path().'/assets/files/'.$file);\n\t\t\n\t\treturn redirect('list-file');\n\t\t/*\n return view('upload.reuploadimage')\n ->with('title', 'Reupload Image')\n ->with('data', $upload);\n\t\t*/\n\t}", "title": "" }, { "docid": "9bee1c26d65138cc1a46f320480cceeb", "score": "0.6246137", "text": "public function delete(){\r\r\n\t\t$u = $this->uri->segment(4);\r\r\n\t\t$this->Instructeur_model->delete($u);\r\r\n\t\tredirect('admin/instructeur');\r\r\n\t}", "title": "" }, { "docid": "f8e75eeefdabfd39ca658373bfa81c21", "score": "0.62461114", "text": "public function actionDelete($id)\n {\n\t\tif (Yii::$app->user->identity->idperfil == 'diracad' || Yii::$app->user->identity->idperfil == 'sa'){\n\t\t //$this->findModel($id)->delete();\n\t\t}\n\t\treturn $this->redirect(['index']);\n }", "title": "" }, { "docid": "5d2f4278cb515af8db930bde7b0b9879", "score": "0.6229203", "text": "public function delete($id){\r\n if($id){ \r\n $galleryData = $this->gallery->getRows($id); \r\n \r\n // Delete gallery data \r\n $delete = $this->gallery->delete($id); \r\n \r\n if($delete){ \r\n // Delete images data \r\n $condition = array('gallery_id' => $id); \r\n $deleteImg = $this->gallery->deleteImage($condition); \r\n \r\n // Remove files from the server \r\n if(!empty($galleryData['images'])){ \r\n foreach($galleryData['images'] as $img){ \r\n @unlink('uploads/images/'.$img['file_name']); \r\n } \r\n } \r\n \r\n $this->session->set_userdata('success_msg', 'Gallery has been removed successfully.'); \r\n }else{ \r\n $this->session->set_userdata('error_msg', 'Some problems occurred, please try again.'); \r\n } \r\n } \r\n \r\n redirect($this->controller); \r\n }", "title": "" }, { "docid": "0db7a8971401944acfcd8c96bf512db5", "score": "0.62283677", "text": "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Mall_Service_Goods::getMallgoods($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tUtil_File::del(Common::getConfig('siteConfig', 'attachPath') . $info['img']);\n\t\t$result = Mall_Service_Goods::deleteMallgoods($id);\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "title": "" }, { "docid": "899bf11b4d899bca8801230c8543c08e", "score": "0.62183744", "text": "public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n $this->view->importfile_id = $importfile_id = $this->_getParam('importfile_id');\n\n //IF CONFIRM FOR DATA DELETION\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //IMPORT FILE OBJECT\n $importFile = Engine_Api::_()->getItem('list_importfile', $importfile_id);\n\n if (!empty($importFile)) {\n\n $first_import_id = $importFile->first_import_id;\n $last_import_id = $importFile->last_import_id;\n\n //MAKE QUERY FOR FETCH THE DATA\n $tableImport = Engine_Api::_()->getDbtable('imports', 'list');\n\n $sqlStr = \"import_id BETWEEN \" . \"'\" . $first_import_id . \"'\" . \" AND \" . \"'\" . $last_import_id . \"'\" . \"\";\n\n $select = $tableImport->select()\n ->from($tableImport->info('name'), array('import_id'))\n ->where($sqlStr);\n $importDatas = $select->query()->fetchAll();\n\n if (!empty($importDatas)) {\n foreach ($importDatas as $importData) {\n $import_id = $importData['import_id'];\n\n //DELETE IMPORT DATA BELONG TO IMPORT FILE\n $tableImport->delete(array('import_id = ?' => $import_id));\n }\n }\n\n //FINALLY DELETE IMPORT FILE DATA\n Engine_Api::_()->getDbtable('importfiles', 'list')->delete(array('importfile_id = ?' => $importfile_id));\n }\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n\t\t\t\t\t'messages' => array(Zend_Registry::get('Zend_Translate')->_('Import data has been deleted successfully !'))\n ));\n }\n $this->renderScript('admin-importlisting/delete.tpl');\n }", "title": "" }, { "docid": "eb4beacb23bbe99f2f0ab4e11ad57ce2", "score": "0.620723", "text": "public function destroy($id)\n { \n $delete = Laporan::find($id);\n unlink('storage/uploads/'.$delete->name);\n $delete->delete();\n \n return redirect()->route('laporans.index')->with('success','laporan deleted successfully'); \n }", "title": "" }, { "docid": "16873322cf5e09bae4cfc1110886cb4c", "score": "0.6204295", "text": "public function deletedevisAction()\r\n {\r\n $oFile = FilesQuery::create()->findPk($this->_request->getParam('file_id'));\r\n $oFile->delete();\r\n $this->_forward('devisversions', null, null, array('op_id' => $oFile->getFileEntityId()));\r\n }", "title": "" }, { "docid": "fb27c130c26276b4b952f58cb4150642", "score": "0.6201405", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n $this->_removeDirectory(Yii::getAlias($this->_imagePath.'/'.'product'.$model->id));\n $this->_removeDirectory(Yii::getAlias($this->_imagePath.'/'.'product'.$model->id.'_thumb'));\n $model->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "fb27c130c26276b4b952f58cb4150642", "score": "0.6201405", "text": "public function actionDelete($id)\n {\n $model = $this->findModel($id);\n \n $this->_removeDirectory(Yii::getAlias($this->_imagePath.'/'.'product'.$model->id));\n $this->_removeDirectory(Yii::getAlias($this->_imagePath.'/'.'product'.$model->id.'_thumb'));\n $model->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "15c00f1bff6627ddcdac462c93538458", "score": "0.61985385", "text": "public function actionDelete($id)\n {\n $info = Gallery::findOne($id);\n $lists = GalleryItem::find()->where(['item'=>$info->id])->all();\n foreach ($lists as $key => $val) {\n //删除旧文件\n if(!empty($val['files'])){\n @unlink('.'.$val['files']);\n }\n }\n GalleryItem::deleteAll(['item'=>$info->id]);\n $fileimg = \".\".$info->thumb;\n if(file_exists($fileimg))\n {\n @unlink($fileimg);\n }\n Gallery::findOne($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "35ad49ea04798817ae949ea2187e9d9d", "score": "0.61980295", "text": "public function destroy($id)\n {\n try {\n $data = Drtv::find($id);\n if($data->photo){\n if (Storage::disk('public')->exists('uploads/Drtv/'.$data->photo)) {\n Storage::disk('public')->delete('uploads/Drtv/'.$data->photo);\n }\n }\n $data->delete();\n $notification=array(\n 'messege'=>'Successfully delete',\n 'alert-type'=>'success'\n );\nreturn Redirect()->back()->with($notification);\n } catch (ModelNotFoundException $e) {\n $notification=array(\n 'messege'=>'Sorry!',\n 'alert-type'=>'error'\n );\nreturn Redirect()->back()->with($notification);\n }\n }", "title": "" }, { "docid": "6dd3666fd64584294e36249c15aef2d6", "score": "0.61949927", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->is_deleted = 1;\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "4df9a86c65f7b12fbfb42fe669eeac1e", "score": "0.61945444", "text": "public function actionDelete($id)\n {\n try{\n if( !$modelFiles = Files::findOne($id))\n throw new GoodException('Error', 'Doesn\\'t exist field with this id...');\n\n $filePath = self::getFilePathById($id);\n if( file_exists ($filePath) )\n unlink($filePath);\n\n if( !$modelFiles->delete() )\n throw new GoodException('Error', 'Deleting file error...');\n }catch(Exception $e){\n return $e->getMessage();\n }\n\n return $this->goHome();\n }", "title": "" }, { "docid": "6d6be722b2b79e223a058ad783135201", "score": "0.6194222", "text": "public function actionDelete($id)\n {\n// $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bbc1d2ed127ff2f5db9d2a5f39a318bf", "score": "0.6194205", "text": "public function destroy($id)\n {\n $this->delete_products_files($id);\n session()->flash('success', trans('admin.record_deleted'));\n return redirect(aurl('products'));\n }", "title": "" }, { "docid": "f4f3d1ce27fb59fbafca438ff25b740a", "score": "0.618283", "text": "public function actionDelete($id)\n {\n unlink(Yii::getAlias('@root')\n . Yii::$app->params['frontend_upload_path'] . $this->findModel($id)->img_name);\n$images=json_decode($this->findModel($id)->images,true);\nforeach ($images as $key) {\n unlink(Yii::getAlias('@root')\n . Yii::$app->params['frontend_upload_path'] . $key);\n}\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d466b7e0a3b086ecd18ab9db9b6e0575", "score": "0.6177754", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "5224e0347d64fce6018144b8150b8151", "score": "0.61722547", "text": "public function index_delete(){\n\t\t// $this->load->model('Users_model','users');\n\t\t// $id = $this->users->delete($id);\n\t\t// $this->response(array('ok' => 'Success'), 200);\n\t}", "title": "" }, { "docid": "565f309562dbfb4e70641379fbc7874d", "score": "0.6171846", "text": "public function actionDelete($id)\n {\n $image = $this->findModel($id);\n $categoryId = $image->category_id;\n $image->delete();\n\n return $this->redirect(['index', 'id' => $categoryId]);\n }", "title": "" }, { "docid": "96a1e0407c0e39cc94ea3e191c544532", "score": "0.61705256", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "96a1e0407c0e39cc94ea3e191c544532", "score": "0.61705256", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "96a1e0407c0e39cc94ea3e191c544532", "score": "0.61705256", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "320c8c0a21e70c7649c7a2132468a21e", "score": "0.6167473", "text": "public function destroy($id)\n {\n $idArray = explode(',', Input::get('deletelist'));\n\n try {\n $upload = Upload::where('user_id', '=', Auth::User()->id)\n ->whereIn('id', $idArray)->delete();\n\n Session::flash('message', 'File deleted');\n\n return Redirect::to('users/storage');\n } catch (Exception $e) {\n echo 'Error find file';\n }\n }", "title": "" }, { "docid": "93cbce4b74f8e50f1c5ea6b7105fec9c", "score": "0.6167167", "text": "public function delete()\n {\n $model = new user($_GET['id']);\n $model->deleteuser();\n\n /*** Redirect User to BoatRamp/Index ***/\n header(\"location: index.php?rt=user/index\");\n\n }", "title": "" }, { "docid": "3ee91df933134bd19ae85dc00c6c76df", "score": "0.6158672", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "3ee91df933134bd19ae85dc00c6c76df", "score": "0.6158672", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "cd0cd1d3de36670681388e603448065b", "score": "0.61573976", "text": "public function actionDelete()\n {\n $this->getEntity()->delete();\n\n $this->addVars(['message' => \"deleted\"]);\n $this->forward(\"list\");\n }", "title": "" }, { "docid": "57da3807d8198570b7092a16537ca39e", "score": "0.6156584", "text": "public function actionDeleteItem($id)\n\t{\n\t\t$model = $this->findModel($id);\n\t\t$images = AutoImg::find()->where(['id_item'=>$id])->all();\n\t\t$path = Url::to('@frt_dir/img/auto/');\n\t\tif($images){\n\t\t\tforeach ($images as $item){\n\t\t\t\t$file = $path.$item->path;\n\t\t\t\tif(file_exists($file)){\n\t\t\t\t\tunlink($file);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$model->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "39eded6dfdeccda18ac5c3fc5e1960f9", "score": "0.61541206", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "66d8ab902c1fbfbc5efef90c7406486d", "score": "0.61532104", "text": "public function actionDelete($id)\n {\n /*$this->findModel($id)->delete();\n\n return $this->redirect(['index']);*/\n }", "title": "" }, { "docid": "b22e17feecd85d4f140ecddcaa92b44f", "score": "0.6153181", "text": "public function actionDelete( $id ) {\n\t\t\t$this->findModel( $id )->delete();\n\t\t\t\n\t\t\treturn $this->redirect( [ 'index' ] );\n\t\t}", "title": "" }, { "docid": "38e9cad4ee0e5025f84fb12f84689acc", "score": "0.6151596", "text": "public function deleteimg() {\n $path = $this->input->post('image_path'); \n delete_files($path);\n if (unlink($path)) {\n echo 'deleted successfully';\n } else {\n echo 'errors occured';\n }\n }", "title": "" }, { "docid": "b2ced53849c3ed40c562f56af76f66fb", "score": "0.6151207", "text": "public function delete()\n\t{\n\t\t$this->auth->restrict('Simplenews.Content.Delete');\n\n\t\t$id = $this->uri->segment(5);\n\n\t\tif (!empty($id))\n\t\t{\n\n\t\t}\n\n\t\tredirect(SITE_AREA .'/content/simplenews');\n\t}", "title": "" }, { "docid": "94cd49a0394cc5737113c8b4b5fa8006", "score": "0.61462516", "text": "public function actionDelete($id)\r\n {\n \t\n \tif (!isset(Yii::$app->user->identity)) {\n \t\treturn $this->redirect(Yii::$app->user->loginUrl);\n \t}\n \t \r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "25d6f9250402cb57ca90b54361e0adf6", "score": "0.6146117", "text": "public function deleteAction() {\n $this->_helper->layout->setLayout('admin-simple');\n $this->view->importfile_id = $importfile_id = $this->_getParam('importfile_id');\n\n //IF CONFIRM FOR DATA DELETION\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //IMPORT FILE OBJECT\n $importFile = Engine_Api::_()->getItem('sitepage_importfile', $importfile_id);\n\n if (!empty($importFile)) {\n\n $first_import_id = $importFile->first_import_id;\n $last_import_id = $importFile->last_import_id;\n\n //MAKE QUERY FOR FETCH THE DATA\n $tableImport = Engine_Api::_()->getDbtable('imports', 'sitepage');\n\n $sqlStr = \"import_id BETWEEN \" . \"'\" . $first_import_id . \"'\" . \" AND \" . \"'\" . $last_import_id . \"'\" . \"\";\n\n $select = $tableImport->select()\n ->from($tableImport->info('name'), array('import_id'))\n ->where($sqlStr);\n $importDatas = $select->query()->fetchAll();\n\n if (!empty($importDatas)) {\n foreach ($importDatas as $importData) {\n $import_id = $importData['import_id'];\n\n //DELETE IMPORT DATA BELONG TO IMPORT FILE\n $tableImport->delete(array('import_id = ?' => $import_id));\n }\n }\n\n //FINALLY DELETE IMPORT FILE DATA\n Engine_Api::_()->getDbtable('importfiles', 'sitepage')->delete(array('importfile_id = ?' => $importfile_id));\n }\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n\t\t\t\t\t'messages' => array(Zend_Registry::get('Zend_Translate')->_('Import data has been deleted successfully !'))\n ));\n }\n $this->renderScript('admin-importlisting/delete.tpl');\n }", "title": "" }, { "docid": "2a2b510824fd65346724e743204efd66", "score": "0.61442655", "text": "public function actionDelete($id)\n {\n \t$url =WxMember::find()->where(['id'=>$id])->One();\n \tif(!empty($url->imgPaths)){\n \tforeach ($url->imgPaths as $img_url){\n \t\t\t\t$img_name=substr($img_url,strrpos($img_url,'/'));\n \t\t\t\tif(is_file('../../storage/web/source/1'.$img_name)){\n \t\t\t\tunlink('../../storage/web/source/1'.$img_name);\n \t\t\t\t}\n \t}\n \t\n }\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "06328d0f9880fa6077e003cddd424dd3", "score": "0.6143469", "text": "public function actionDelete($id)\n\t\t{\n\t\t\t$this->findModel($id)->delete();\n\n\t\t\treturn $this->redirect(['index']);\n\t\t}", "title": "" }, { "docid": "edf33ed611453f049934f6165a0e7917", "score": "0.61398983", "text": "public function destroy(File $file)\n {\n $this->imagy->deleteAllFor($file);\n $this->file->destroy($file);\n\n flash(trans('media::messages.file deleted'));\n\n return redirect()->route('admin.media.media.index');\n }", "title": "" }, { "docid": "98561ef039e1f3e686a8e0d0c319549d", "score": "0.6139107", "text": "public function actionDelete($id)\n\t{\n\t\t$model = $this->loadModel($id);\n\n\t\t$criteria = new CDbCriteria;\n\t\t$criteria->compare('product_id',$model->id);\n\t\tif($model->payment_rel instanceof ModProductPayment)\n\t\t\t$del1 = $model->payment_rel->delete();\n\t\t$del2 = ModProductViewed::model()->deleteAll($criteria);\n\t\tif($model->images_count>0){\n\t\t\tforeach($model->images_rel as $image){\n\t\t\t\tif(file_exists($image->src.$image->image)){\n\t\t\t\t\tif(unlink($image->src.$image->image)){\n\t\t\t\t\t\tif(file_exists($image->thumb.$image->image))\n\t\t\t\t\t\t\tunlink($image->thumb.$image->image);\n\t\t\t\t\t\t$model->delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$model->delete();\n\n\t\t// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n\t\tif(!isset($_GET['ajax']))\n\t\t\t$this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n\t}", "title": "" }, { "docid": "91ffd1a0b1714289da8865b81f920acc", "score": "0.6129409", "text": "public function actionDelete($id)\n {\n $data = $this->findModel($id);\n $this->findModel($id)->delete();\n// $data = $this->findModel($id);\n $this->_eventAfterDelete($data);\n return $this->redirect(['index']);\n }", "title": "" } ]
31879c771a8a4f7262f0a8038bba06ab
Set the signature field for the PayPal object
[ { "docid": "807b1039d48905bb4704eb4a3f4100de", "score": "0.7375016", "text": "function set_signature($signature){\n $this->signature = $signature;\n return $signature;\n }", "title": "" } ]
[ { "docid": "cd38a02b4fdbf79e36e273b93817ada8", "score": "0.714636", "text": "public function setSignature($signature) {\n $this->signature = $signature;\n }", "title": "" }, { "docid": "c7e6343ebcbdc56a588cd11abde300f8", "score": "0.70009154", "text": "public function setSignature(string $signature): void;", "title": "" }, { "docid": "ff0d4df7f51e0a1d8d61dfe9d11ca215", "score": "0.6720076", "text": "public function setSignature($var)\n {\n GPBUtil::checkString($var, False);\n $this->signature = $var;\n\n return $this;\n }", "title": "" }, { "docid": "0b2d75382cda55bcd6730b0176ef240e", "score": "0.65964353", "text": "public function setSignature($signature)\n\t{\n\t\t$this->signature = ky_assure_string($signature);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2e939169353bb187b7d591b4743e0474", "score": "0.6596023", "text": "public function setSignature($value)\n {\n return $this->set(self::SIGNATURE, $value);\n }", "title": "" }, { "docid": "a08d273adeacca3ac24009273c9f8e40", "score": "0.6232354", "text": "public function setSignature(\\horstoeko\\ubl\\entities\\cac\\Signature $signature)\n {\n $this->signature = $signature;\n return $this;\n }", "title": "" }, { "docid": "c738ffb69bd4423a52cc0b8b26579e7a", "score": "0.6165452", "text": "protected function _putsignature() {\n\t\tif ((!$this->sign) OR (!isset($this->signature_data['cert_type']))) {\n\t\t\treturn;\n\t\t}\n\t\t$sigobjid = ($this->sig_obj_id + 1);\n\t\t$out = $this->_getobj($sigobjid).\"\\n\";\n\t\t$out .= '<< /Type /Sig';\n\t\t$out .= ' /Filter /Adobe.PPKLite';\n\t\t$out .= ' /SubFilter /adbe.pkcs7.detached';\n\t\t$out .= ' '.TCPDF_STATIC::$byterange_string;\n\t\t$out .= ' /Contents<'.str_repeat('0', $this->signature_max_length).'>';\n\t\tif (empty($this->signature_data['approval']) OR ($this->signature_data['approval'] != 'A')) {\n\t\t\t$out .= ' /Reference ['; // array of signature reference dictionaries\n\t\t\t$out .= ' << /Type /SigRef';\n\t\t\tif ($this->signature_data['cert_type'] > 0) {\n\t\t\t\t$out .= ' /TransformMethod /DocMDP';\n\t\t\t\t$out .= ' /TransformParams <<';\n\t\t\t\t$out .= ' /Type /TransformParams';\n\t\t\t\t$out .= ' /P '.$this->signature_data['cert_type'];\n\t\t\t\t$out .= ' /V /1.2';\n\t\t\t} else {\n\t\t\t\t$out .= ' /TransformMethod /UR3';\n\t\t\t\t$out .= ' /TransformParams <<';\n\t\t\t\t$out .= ' /Type /TransformParams';\n\t\t\t\t$out .= ' /V /2.2';\n\t\t\t\tif (!TCPDF_STATIC::empty_string($this->ur['document'])) {\n\t\t\t\t\t$out .= ' /Document['.$this->ur['document'].']';\n\t\t\t\t}\n\t\t\t\tif (!TCPDF_STATIC::empty_string($this->ur['form'])) {\n\t\t\t\t\t$out .= ' /Form['.$this->ur['form'].']';\n\t\t\t\t}\n\t\t\t\tif (!TCPDF_STATIC::empty_string($this->ur['signature'])) {\n\t\t\t\t\t$out .= ' /Signature['.$this->ur['signature'].']';\n\t\t\t\t}\n\t\t\t\tif (!TCPDF_STATIC::empty_string($this->ur['annots'])) {\n\t\t\t\t\t$out .= ' /Annots['.$this->ur['annots'].']';\n\t\t\t\t}\n\t\t\t\tif (!TCPDF_STATIC::empty_string($this->ur['ef'])) {\n\t\t\t\t\t$out .= ' /EF['.$this->ur['ef'].']';\n\t\t\t\t}\n\t\t\t\tif (!TCPDF_STATIC::empty_string($this->ur['formex'])) {\n\t\t\t\t\t$out .= ' /FormEX['.$this->ur['formex'].']';\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out .= ' >>'; // close TransformParams\n\t\t\t// optional digest data (values must be calculated and replaced later)\n\t\t\t//$out .= ' /Data ********** 0 R';\n\t\t\t//$out .= ' /DigestMethod/MD5';\n\t\t\t//$out .= ' /DigestLocation[********** 34]';\n\t\t\t//$out .= ' /DigestValue<********************************>';\n\t\t\t$out .= ' >>';\n\t\t\t$out .= ' ]'; // end of reference\n\t\t}\n\t\tif (isset($this->signature_data['info']['Name']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Name'])) {\n\t\t\t$out .= ' /Name '.$this->_textstring($this->signature_data['info']['Name'], $sigobjid);\n\t\t}\n\t\tif (isset($this->signature_data['info']['Location']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Location'])) {\n\t\t\t$out .= ' /Location '.$this->_textstring($this->signature_data['info']['Location'], $sigobjid);\n\t\t}\n\t\tif (isset($this->signature_data['info']['Reason']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['Reason'])) {\n\t\t\t$out .= ' /Reason '.$this->_textstring($this->signature_data['info']['Reason'], $sigobjid);\n\t\t}\n\t\tif (isset($this->signature_data['info']['ContactInfo']) AND !TCPDF_STATIC::empty_string($this->signature_data['info']['ContactInfo'])) {\n\t\t\t$out .= ' /ContactInfo '.$this->_textstring($this->signature_data['info']['ContactInfo'], $sigobjid);\n\t\t}\n\t\t$out .= ' /M '.$this->_datestring($sigobjid, $this->doc_modification_timestamp);\n\t\t$out .= ' >>';\n\t\t$out .= \"\\n\".'endobj';\n\t\t$this->_out($out);\n\t}", "title": "" }, { "docid": "f70b3ca8f52df16fb76250e25d09dc7a", "score": "0.6160505", "text": "function setSignatureMode($mode)\n {\n $this->signatureMode = $mode;\n }", "title": "" }, { "docid": "2ee9cce8b85c854484ffa5855604ed97", "score": "0.61247987", "text": "function get_signature(){\n return $this->signature;\n }", "title": "" }, { "docid": "17cbf0811d925d42084d9e7f32508c51", "score": "0.59803224", "text": "public function setSignature(\\Digipost\\Signature\\API\\XML\\Thirdparty\\XMLdSig\\Signature $signature)\n {\n $this->signature = $signature;\n return $this;\n }", "title": "" }, { "docid": "5fa21f4b5a58b70a912f12aa44108905", "score": "0.5892457", "text": "public function setSignature_path($signature_path)\n {\n $this->signature_path = $signature_path;\n\n return $this;\n }", "title": "" }, { "docid": "5c484036bde64dad9b63396b39ecc694", "score": "0.58761895", "text": "public static function setSignature($userAgentSignature, $overwrite = true)\n {\n if (defined('WRAPPERCONFIG_NO_SIGNATURE')) {\n throw new ExceptionHandler(\n 'You are not allowed to set global signature.',\n Constants::LIB_UNHANDLED\n );\n }\n if (Flag::isFlag('PROTECT_FIRST_SIGNATURE')) {\n $overwrite = false;\n }\n if (!empty(self::$userAgentSignature) && !$overwrite) {\n return;\n }\n self::$userAgentSignature = $userAgentSignature;\n }", "title": "" }, { "docid": "957f71c04d65aaf6d0aaeb64076401ea", "score": "0.5860187", "text": "protected function getSignature()\n {\n $config = sfConfig::get('app_jmsPaymentPlugin_paypal');\n if (!array_key_exists('signature', $config))\n throw new RuntimeException('You must set a PayPal signature.');\n \n return $config['signature'];\n }", "title": "" }, { "docid": "bbcb696871382a566af6bb5d23ebecf1", "score": "0.58166677", "text": "public function setChangeSignature($value)\n {\n return $this->set('ChangeSignature', $value);\n }", "title": "" }, { "docid": "aaf53f5c228f979516ba763f2bc3c5e4", "score": "0.5679469", "text": "public function setSignatureVersion($val)\n {\n $this->_propDict[\"signatureVersion\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "d71994435678baa09b0c7ea4bb703283", "score": "0.567476", "text": "public function setSignature($signing_cert='', $private_key='', $private_key_password='', $extracerts='', $cert_type=2, $info=array(), $approval='') {\n\t\t// to create self-signed signature: openssl req -x509 -nodes -days 365000 -newkey rsa:1024 -keyout tcpdf.crt -out tcpdf.crt\n\t\t// to export crt to p12: openssl pkcs12 -export -in tcpdf.crt -out tcpdf.p12\n\t\t// to convert pfx certificate to pem: openssl\n\t\t// OpenSSL> pkcs12 -in <cert.pfx> -out <cert.crt> -nodes\n\t\t$this->sign = true;\n\t\t++$this->n;\n\t\t$this->sig_obj_id = $this->n; // signature widget\n\t\t++$this->n; // signature object ($this->sig_obj_id + 1)\n\t\t$this->signature_data = array();\n\t\tif (strlen($signing_cert) == 0) {\n\t\t\t$this->Error('Please provide a certificate file and password!');\n\t\t}\n\t\tif (strlen($private_key) == 0) {\n\t\t\t$private_key = $signing_cert;\n\t\t}\n\t\t$this->signature_data['signcert'] = $signing_cert;\n\t\t$this->signature_data['privkey'] = $private_key;\n\t\t$this->signature_data['password'] = $private_key_password;\n\t\t$this->signature_data['extracerts'] = $extracerts;\n\t\t$this->signature_data['cert_type'] = $cert_type;\n\t\t$this->signature_data['info'] = $info;\n\t\t$this->signature_data['approval'] = $approval;\n\t}", "title": "" }, { "docid": "f7cb35d81dcc86dc9fa48a59b2d74b12", "score": "0.56458586", "text": "public function setSignatureRef(\\Medidata\\RwsPhp\\Schema\\ODM\\SignatureRef $signatureRef)\n {\n $this->signatureRef = $signatureRef;\n return $this;\n }", "title": "" }, { "docid": "66736c653d3131eb38375602dd7e6837", "score": "0.5629335", "text": "public function set_sign_method($sign_method)\n {\n $this->sign_method = $sign_method;\n }", "title": "" }, { "docid": "0a9aa99426b8213f6f8d184703f931c6", "score": "0.56286377", "text": "function updateSignature($id_member, $signature)\n{\n\trequire_once(SUBSDIR . '/Members.subs.php');\n\tupdateMemberData($id_member, array('signature' => $signature));\n}", "title": "" }, { "docid": "8f70457cd95c906c8721cf851afc73e9", "score": "0.5602829", "text": "function getSignature()\n\t{\n\t\treturn $this->signature;\n\t}", "title": "" }, { "docid": "3a3672c3cba0c8e1a7775320e4dbf143", "score": "0.5598993", "text": "public function getSignatureID()\n {\n return $this->signatureID;\n }", "title": "" }, { "docid": "335a71d0829c1512c69a3f8daa1707b9", "score": "0.5589029", "text": "public function setSignatureDate(DateTime $signatureDate = null) {\n $this->signatureDate = $signatureDate;\n return $this;\n }", "title": "" }, { "docid": "afe0874c0ebf7492cb2f4b9b53e1fb6d", "score": "0.55651057", "text": "public function composeMerchantSignature();", "title": "" }, { "docid": "684cb6b3cb39403e89783a6b9e00dbca", "score": "0.55412287", "text": "public function setSignatureString($spore) {\n // add request method and path\n $this->_signatureString = strtolower($spore->getRequestMethod()) . $spore->getRequestUrlPath() ;\n\n // add request params\n $string_params = '';\n $params = $spore->getRequestParams();\n if (isset($params) && !empty($params)) {\n ksort($params);\n foreach ($params as $key => $val) {\n $string_params .= \"$key=$val\";\n }\n }\n $this->_signatureString .= $string_params;\n\n // add private key\n $this->_signatureString .= $this->_privateKey;\n }", "title": "" }, { "docid": "19bf7b0427585e28a75b26df4f7fe788", "score": "0.5513702", "text": "function acf_signature_field_save_meta_box_data( $post_id ) {\n\t\t// Make sure that it is set.\n\t\tif ( isset( $_POST['signature_acf_field'] ) ){\n\t\t\t$signature = sanitize_text_field( $_POST['signature_acf_field'] );\n\n\t\t\t// Update the meta field in the database.\n\t\t\tupdate_post_meta( $post_id, 'signature_acf_field', $signature );\n\t\t}\n\t}", "title": "" }, { "docid": "29d496e0d98a0e73587447652bc5e39b", "score": "0.54830235", "text": "protected function k_signature() {return null;}", "title": "" }, { "docid": "50630c1beb3149ccc246a17fa9f750fa", "score": "0.5482562", "text": "public function getSignature()\n {\n return $this->signature;\n }", "title": "" }, { "docid": "50630c1beb3149ccc246a17fa9f750fa", "score": "0.5482562", "text": "public function getSignature()\n {\n return $this->signature;\n }", "title": "" }, { "docid": "50630c1beb3149ccc246a17fa9f750fa", "score": "0.5482562", "text": "public function getSignature()\n {\n return $this->signature;\n }", "title": "" }, { "docid": "90d6b72ec8a9389231465d4b10d620b6", "score": "0.5463071", "text": "private function _setXMLSignature($file_path) {\n\t\t$this->xml_signature = md5($file_path);\n\t}", "title": "" }, { "docid": "6e4d327da2fb861ddfcacf3f786c9b2a", "score": "0.5458725", "text": "public function setSignature($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (boolean) $v;\n\t\t}\n\n\t\tif ($this->signature !== $v || $v === false) {\n\t\t\t$this->signature = $v;\n\t\t\t$this->modifiedColumns[] = MwgfApplicationPeer::SIGNATURE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "68bb3f185a9fa7db362b1b34e7ee0e41", "score": "0.5409227", "text": "function bp_forum_extras_signatures_xprofile_screen_change_signature() {\r\n\tglobal $bp;\r\n\r\n\tif ( !bp_is_my_profile() && !is_site_admin() )\r\n\t\treturn false;\r\n\r\n\trequire_once( BP_PLUGIN_DIR . '/bp-forums/bbpress/bb-includes/functions.bb-formatting.php' );\r\n\r\n\tif ( isset( $_POST['signature-submit'] ) && check_admin_referer( 'bp_forum_extras_signatures' ) ) {\r\n\r\n\t\tglobal $bb_signatures;\r\n\t\t\r\n\t\tdo_action( 'bp_forum_extras_signatures_init');\r\n\t\t\r\n\t\t$signature = trim( substr($_POST['signature'], 0, $bb_signatures['max_length']) );\r\n\t\tif ($signature) {\r\n\r\n\t\t\t$signature = apply_filters( 'bp_forum_extras_signatures_text_before_save', $signature );\r\n\r\n\t\t\t$signature = stripslashes( bp_forums_filter_kses( force_balance_tags( bb_code_trick( bbbp_forums_encode_bad($signature) ) ) ) );\r\n\t\t\t$signature = strip_tags( $signature, $bb_signatures['allowed_tags'] );\r\n\t\t\t$signature = implode(\"\\n\", array_slice( explode(\"\\n\",$signature), 0, $bb_signatures['max_lines']) );\t\r\n\r\n\t\t\tupdate_usermeta($bp->displayed_user->id, \"signature\", $signature);\r\n\t\t\tbp_core_add_message( __( 'Signature updated!', 'bp-forums-extras' ) );\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\tbp_core_add_message( __( 'Signature removed!', 'bp-forums-extras' ) );\r\n\t\t\tdelete_usermeta($bp->displayed_user->id, \"signature\");\r\n\t\t}\r\n\t}\r\n\r\n\tadd_action( 'bp_template_title', 'bp_forum_extras_signatures_xprofile_screen_title' );\r\n\tadd_action( 'bp_template_content', 'bp_forum_extras_signatures_xprofile_screen_content' );\r\n\tbp_core_load_template( apply_filters( 'bp_core_template_plugin', 'members/single/plugins' ) );\r\n}", "title": "" }, { "docid": "9988f8b30f6020bae49e82277f1fba77", "score": "0.5388471", "text": "public function setExampleSignature(?FHIRSignature $exampleSignature = null): object\n\t{\n\t\t$this->_trackValueSet($this->exampleSignature, $exampleSignature);\n\t\t$this->exampleSignature = $exampleSignature;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "dab314772a35d95782cb23e004e868a9", "score": "0.5388117", "text": "public function setFixedSignature(?FHIRSignature $fixedSignature = null): object\n\t{\n\t\t$this->_trackValueSet($this->fixedSignature, $fixedSignature);\n\t\t$this->fixedSignature = $fixedSignature;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "abee633e6828a7b5dfe699785baff751", "score": "0.5379528", "text": "public function getSignature()\n\t{\n\t\treturn $this->signature;\n\t}", "title": "" }, { "docid": "abee633e6828a7b5dfe699785baff751", "score": "0.5379528", "text": "public function getSignature()\n\t{\n\t\treturn $this->signature;\n\t}", "title": "" }, { "docid": "91cdae82446c8f3ccc0c0eeeb9cd0271", "score": "0.5356193", "text": "public function loadSignatures(){\n $this->testFieldsSignature = [\n 'mandante' => 'teste',\n 'nome' => 'produto 1',\n 'promocao' => false,\n 'estoque' => false,\n 'valorUnitVenda' => 10,\n ];\n }", "title": "" }, { "docid": "9c3beefa85d2566cf45e2ec7cca4d925", "score": "0.535375", "text": "public function setSignatureAppearance($x=0, $y=0, $w=0, $h=0, $page=-1, $name='') {\n\t\t$this->signature_appearance = $this->getSignatureAppearanceArray($x, $y, $w, $h, $page, $name);\n\t}", "title": "" }, { "docid": "d58ea987f82f70a699e649d1986110ac", "score": "0.5351", "text": "public function getSignature() {\n return isset($this->configuration['signature']) ? $this->configuration['signature'] : '';\n }", "title": "" }, { "docid": "66b693604d7b1ff5691c4062afe51e42", "score": "0.53186387", "text": "public function setSignatureMethod($method)\n {\n $method = strtoupper($method);\n \n switch ($method) {\n case 'PLAINTEXT':\n case 'HMAC-SHA1':\n $this->sigMethod = $method;\n break;\n default:\n throw new \\Dropbox\\Exception('Unsupported signature method ' . $method);\n }\n }", "title": "" }, { "docid": "efe74ad0bbaba3a88e3466cf98a781a8", "score": "0.53136307", "text": "public function setSignatureID(\\horstoeko\\ubl\\entities\\cbc\\SignatureID $signatureID)\n {\n $this->signatureID = $signatureID;\n return $this;\n }", "title": "" }, { "docid": "334b10222db92872ad3895b2bb4267b4", "score": "0.52942437", "text": "public function update(Signature $signature)\n {\n $signature->flag();\n\n return $signature;\n }", "title": "" }, { "docid": "5845b0d35bf4a87c3a8bc42640002dab", "score": "0.5280787", "text": "public function getSignature();", "title": "" }, { "docid": "5845b0d35bf4a87c3a8bc42640002dab", "score": "0.5280787", "text": "public function getSignature();", "title": "" }, { "docid": "87aeaa2f460ad24899e54127c12e824d", "score": "0.5269714", "text": "public function sign()\n {\n return $this->getTargetObject()->sign();\n }", "title": "" }, { "docid": "7af2ccb5f8459a089d64abf4b59f47f4", "score": "0.5261339", "text": "public function setSignatures(array $signatures)\n {\n $this->signatures = $signatures;\n return $this;\n }", "title": "" }, { "docid": "db6450950ce8d68804d2759180a7a8a7", "score": "0.5242395", "text": "public function getSignature() : string;", "title": "" }, { "docid": "d50403be9ce8cf5cff8d0effc0e6320c", "score": "0.52409375", "text": "public function setDefaultSignature($defaultSignature)\n {\n return $this->setProperty('defaultSignature', trim($defaultSignature));\n }", "title": "" }, { "docid": "627260d950afdf862f1c41e5773dcea3", "score": "0.5219052", "text": "public function generateSignature($payment_request_obj, $secret_key) {\n\n //1) Convert object to JSON string\n $raw_json_string = json_encode(get_object_vars($payment_request_obj));\n\n //2) Convert JSON string to string array\n $json_array = $this->jsonToArray($raw_json_string);\n\n //3) Sorting in ascending alphabetical order based on ASCII names\n $this->sortArray($json_array);\n\n //4) Convert sorted string array to a string\n $signature = $this->arraryToString($json_array);\n\n //5) Generate hashed signature by using HMAC-SHA256 with merchant sercret key \n $hashed_signature = $this->hashSignature($signature, $secret_key);\n \n return $hashed_signature;\n }", "title": "" }, { "docid": "6cfe45d6986292342aae0f074b17ba38", "score": "0.52144116", "text": "public function save_email_signature( $user_id ) {\n\t\t\t//check user permision \n\t\t\tif ( !current_user_can( 'edit_user', $user_id ) )\n\t\t\t\treturn false;\n\n\t\t\tif ( empty( $user_id ) ) {\n\t\t\t\t$user_id = $_POST[ 'user_id' ];\n\t\t\t}\n\n\t\t\tif ( empty( $user_id ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//verify nonce\n\t\t\t$sign_nonce = !empty( $_POST[ 'email_signature_nonce' ] ) ? $_POST[ 'email_signature_nonce' ] : '';\n\n\t\t\tif ( empty( $sign_nonce ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t//verify nonce for signature\n\t\t\tif ( !wp_verify_nonce( $_POST[ 'email_signature_nonce' ], 'email_signature_nonce' ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t//update usermeta of email signature\n\t\t\tupdate_usermeta( $user_id, '_email_signature', $_POST[ 'email_signature' ] );\n\t\t}", "title": "" }, { "docid": "211c95e0c9c5b42a20d04fdfc1c9c7b5", "score": "0.5206975", "text": "public function setDefaultValueSignature(?FHIRSignature $defaultValueSignature = null): object\n\t{\n\t\t$this->_trackValueSet($this->defaultValueSignature, $defaultValueSignature);\n\t\t$this->defaultValueSignature = $defaultValueSignature;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a48ab99b56357ef419061917a7c7eba7", "score": "0.51994056", "text": "public function setPropertiesToSign($props = array())\n {\n $this->props = $props;\n }", "title": "" }, { "docid": "1c88045b600d3d5ea638c5e9859efe87", "score": "0.5190719", "text": "public function getSignature_path()\n {\n return $this->signature_path;\n }", "title": "" }, { "docid": "eaed87742576c87c51c796b4434d6702", "score": "0.51491934", "text": "protected function signRequest($request)\n {\n $url = $request->getUrl(true);\n $url->getQuery()->add('key', $this->key);\n\n $request->setUrl($url);\n }", "title": "" }, { "docid": "4cb733617b8f7fecfa68a11c9494a7de", "score": "0.51367766", "text": "public function update_signature( $request = null ) {\n\t \n\t $id = $request->get('id');\n $signature_title = $request->get('signatureTitle');\n $signature = $request->get('signature');\n $signature_status = $request->get('signatureStatus');\n\t\t\t $modified_date = date_create( date( 'Y-m-d H:i:s' ) );\n \n $entity_manager = $this->getEntityManager(); //access entity manager from inside the repository\n try{\n $query = $entity_manager->createQueryBuilder()\n ->update('UsersUserManageBundle:signature', 's')\n ->set('s.signatureTitle', ':signature_title')\n ->set('s.signature', ':signature')\n ->set('s.signatureStatus', ':signature_status')\n\t\t\t\t\t\t\t\t\t\t->set('s.modifiedAt', ':modified_date')\n ->where('s.id = ?1')\n ->setParameter('signature_title', $signature_title)\n ->setParameter('signature', $signature)\n ->setParameter('signature_status', $signature_status)\n\t\t\t\t\t\t\t\t\t\t->setParameter('modified_date', $modified_date)\n ->setParameter(1, $id)\n ->getQuery()->execute();\n return true; \n }catch(\\Exception $e){\n $logger = $this->get('logger');\n $logger->error($e->getMessage());\n return false;\n \n } \n\t}", "title": "" }, { "docid": "efd839354eac618600d18510dbd7b970", "score": "0.5124548", "text": "public function __construct($signature, $certificate)\n {\n $this->signature = $signature;\n $this->certificate = $certificate;\n }", "title": "" }, { "docid": "94fb92dcc7219566ecff0e80aa72d2d4", "score": "0.51241475", "text": "public function setMerchantSignature($merchant_signature) {\n if (empty($merchant_signature)) {\n throw new SermepaException('The specified Ds_Merchant_MerchantSignature is not valid.', Sermepa::BAD_PARAM);\n }\n return $this->set('DsMerchantMerchantSignature', $merchant_signature);\n }", "title": "" }, { "docid": "47b3519f6a37abc09aa62105ea37a8ab", "score": "0.51080906", "text": "public function getSignatureDate() {\n return $this->signatureDate;\n }", "title": "" }, { "docid": "069b480c05b654db40e773e7b301a6b0", "score": "0.5092398", "text": "public function setChargeSignature($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->charge_signature !== $v) {\n\t\t\t$this->charge_signature = $v;\n\t\t\t$this->modifiedColumns[] = MwgfApplicationPeer::CHARGE_SIGNATURE;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "c8a80981102288d0ae919c999059b6cc", "score": "0.5083236", "text": "public function setRecipientSignatureDocflow(\\Diadoc\\Api\\Proto\\Docflow\\RecipientSignatureDocflow $value=null)\n {\n return $this->set(self::RECIPIENTSIGNATUREDOCFLOW, $value);\n }", "title": "" }, { "docid": "30d94e42e844e32201182e0fb2a2635a", "score": "0.5074469", "text": "public function getSignature()\n {\n return md5(sprintf('%s:%s:%s', $this->type, $this->data, $this->recipient));\n }", "title": "" }, { "docid": "f6533aa71d5a7462c50a5b3a2207591b", "score": "0.5063525", "text": "public function void(Varien_Object $payment)\n {\n }", "title": "" }, { "docid": "ca4a5ebbecfabde0c257e5689c201d8f", "score": "0.50618356", "text": "public function getSignatureImage() {\n return $this->_signatureImage;\n }", "title": "" }, { "docid": "67a66fc16bb5b39db6bf3c9758fe415a", "score": "0.5041221", "text": "private function CreateSignature() {\n\n\t\t\t// echo time();\n\t\t\t// exit;\n\n\t\t\t$this->validSignature = hash('sha256', $this->componentID . $this->receivedTimeStamp . GYLDENDAL_COMPONENTBRIDGE_SECRET);\n\t\t\t// echo $this->receivedTimeStamp;\n\t\t\t// echo '<br />'.$this->validSignature;\n\t\t\t// exit;\n\t\t}", "title": "" }, { "docid": "a2ad099a531784ce36a4ec24d5559dd0", "score": "0.50394833", "text": "public function setSignatureVille($signatureVille) {\n $this->signatureVille = $signatureVille;\n return $this;\n }", "title": "" }, { "docid": "4b67f7978f4e16010f22352e8c4cd6a6", "score": "0.50370514", "text": "public function getMerchantSignature() {\n return $this->DsMerchantMerchantSignature;\n }", "title": "" }, { "docid": "352f9d3dc782d4d1460e2a27ad9d1b43", "score": "0.50369614", "text": "protected function _setDigitalSignature($requestChild)\n {\n $signSecurityLevel = static::$_signSecurityLevel;\n $signature = static::$_signature;\n if ($signSecurityLevel === 0) {\n return;\n }\n if ($signSecurityLevel === 1) {\n $requestChild->addChild('sign', $signature);\n\n return;\n }\n if ($signSecurityLevel === 2) {\n $signatureData = sprintf(\n '%s%s%s%s',\n $this->_merchantId,\n $this->_amount,\n $this->_currency,\n trim($this->_refNo)\n );\n $signature = hash_hmac('sha256', $signatureData, hex2bin($signature));\n $requestChild->addChild('sign', $signature);\n\n return;\n }\n\n throw new Exception('Invalid digital signature security level: ' . $signSecurityLevel);\n }", "title": "" }, { "docid": "583cc1e17d79107ab56c04119401332c", "score": "0.5028752", "text": "public static function signAgreement(Person $person, string $tag, bool $signature): void\n {\n $paper = self::DOCUMENTS[$tag] ?? null;\n if (!$paper) {\n throw new InvalidArgumentException('Document tag not found');\n }\n\n $personEvent = PersonEvent::firstOrNewForPersonYear($person->id, current_year());\n\n if (!self::canSignDocument($person, $tag, $personEvent)) {\n throw new InvalidArgumentException('Document not available to sign');\n }\n\n $col = $paper['column'];\n if ($paper['term'] == self::TERM_LIFETIME) {\n $person->{$col} = $signature;\n $person->saveWithoutValidation();\n } else {\n $personEvent->{$col} = $signature;\n $personEvent->saveWithoutValidation();\n }\n\n ActionLog::record($person, 'agreement-signature', null, [\n 'tag' => $tag,\n 'signature' => $signature\n ]);\n }", "title": "" }, { "docid": "19a0442a5a682f6aacf685e1ddd77764", "score": "0.4996409", "text": "function setPaymentDate($paymentDate){\n $this->paymentDate = $paymentDate; \n }", "title": "" }, { "docid": "f3652438fc34328ee7bbc6b4cb45e2d3", "score": "0.49939895", "text": "public function generateSignatureToPayBox()\n {\n $this->checkRequiredParams();\n $string = $this->generateStringForSign();\n $signature = $this->signatureHelper->generateSign($string, $this->secretKey);\n\n return $signature;\n }", "title": "" }, { "docid": "de46f441d70a9ced0834f07d581d51a7", "score": "0.4953248", "text": "public function setSignatureToken($purpose, $token) {\n\t\t$_SESSION[$purpose] = $token;\n\t}", "title": "" }, { "docid": "421eea108747635cceaa937d4b983810", "score": "0.49499545", "text": "public function set_payment_definition(){\n\n \t$this->plan->setPaymentDefinitions(array(\n \t $this->paymentDefinition\n \t));\n\n \treturn;\n\n }", "title": "" }, { "docid": "58ed602d2d70aaaacb57906e50d8a121", "score": "0.49333283", "text": "public function setDirectPayment($value);", "title": "" }, { "docid": "d553263f791f3c9dbfefa5a3aba946fd", "score": "0.49267995", "text": "public function setPaid() {\r\n\r\n\t\t$this->errorReset();\r\n\t\t$this->isPaid = true;\r\n\t}", "title": "" }, { "docid": "43e2ef140487e89f3a2a27c60b9d85e5", "score": "0.49190414", "text": "public function addSignatureService(OAuthSignatureInterface $signatureService)\n {\n $this->signatureServices[strtolower($signatureService->getName())] = $signatureService;\n }", "title": "" }, { "docid": "7d145d20cf4897b6877c601737fe374f", "score": "0.48747227", "text": "public function setPaytrToken(){\n $this->paytr_token = base64_encode(hash_hmac('sha256', implode(\"\", [$this->gethashCode(), $this->getMerchantSalt()]) , $this->getMerchantKey(), true));\n }", "title": "" }, { "docid": "ca84012627485fd72529c3bc5bd6a577", "score": "0.48728088", "text": "public function testGenerateSignature() {\n\n\t\t$payment_details = array(\n\t\t 'amount' => '10.00',\n\t\t 'interval_length' => 1,\n\t\t 'interval_unit' => 'month'\n\t\t);\n\n\t\t$sig = GoCardless_Utils::generate_signature($payment_details, $this->config['app_secret']);\n\n\t\t// Check against a pre-built hash\n\t\t$this->assertEquals('889b12a1aa31ca4c804d8554d4991fccc2d6d269bca4a20ecde6ef0cc20abc9c', $sig);\n\n\t}", "title": "" }, { "docid": "a45f7fcfa751b063eb93fbd0f54a75ca", "score": "0.48695275", "text": "protected function _calculateSignature()\n {\n if (isset($this->_postArray['isOldPost']) && $this->_postArray['isOldPost'])\n {\n return $this->_calculateOldSignature();\n }\n\n $origArray = $this->_postArray;\n unset($origArray['brq_signature']);\n\n //sort the array\n $sortableArray = $this->buckarooSort($origArray);\n\n //turn into string and add the secret key to the end\n $signatureString = '';\n foreach($sortableArray as $key => $value) {\n $value = urldecode($value);\n $signatureString .= $key . '=' . $value;\n }\n\n $signatureString .= Mage::getStoreConfig('buckaroo/buckaroo3extended/digital_signature', $this->getStoreId());\n\n $this->_debugEmail .= \"\\nSignaturestring: {$signatureString}\\n\";\n\n //return the SHA1 encoded string for comparison\n $signature = SHA1($signatureString);\n\n $this->_debugEmail .= \"\\nSignature: {$signature}\\n\";\n\n return $signature;\n }", "title": "" }, { "docid": "771edab71acdababce2384d771bf922e", "score": "0.48686826", "text": "public function setPatternSignature(?FHIRSignature $patternSignature = null): object\n\t{\n\t\t$this->_trackValueSet($this->patternSignature, $patternSignature);\n\t\t$this->patternSignature = $patternSignature;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "246be02ab2a78c54b42be118f6aadb38", "score": "0.485971", "text": "public function signWithClientCredentials () {\n\t\t$this->set(\"client_id\", $this->client_id);\n\t\t$this->set(\"client_secret\", $this->client_secret);\n\t}", "title": "" }, { "docid": "81b315579db4d7332b3795054ee83ab4", "score": "0.48490232", "text": "public function setSigningCertificate(?string $value): void {\n $this->getBackingStore()->set('signingCertificate', $value);\n }", "title": "" }, { "docid": "8b2364d40228701e76a8f3b9e02c0137", "score": "0.48409495", "text": "public function setHeadersToSign($headers_to_sign)\n {\n $this->headers_to_sign = $headers_to_sign;\n return $this;\n }", "title": "" }, { "docid": "00d1e0b84f09eb8a05c9189adebdd863", "score": "0.4827564", "text": "public function signGuestBook($signature) {\r\n $query = \"INSERT INTO visitors (signature, date)\r\n\t\t\t\t VALUES (:signature, NOW())\";\r\n $statement = $this->db->prepare($query);\r\n $statement->bindValue(':signature', $signature);\r\n $statement->execute();\r\n $row_count = $statement->rowCount();\r\n $statement->closeCursor();\r\n if ($row_count == 0) {\r\n var_dump(\"false\");\r\n return False;\r\n }\r\n return True;\r\n }", "title": "" }, { "docid": "dc10c960f702517d2faa607ea69aade7", "score": "0.48262388", "text": "public function getSignature()\n {\n return $this->securityPacket['signature'];\n }", "title": "" }, { "docid": "74cdd8d3608c37df53f64cf5441b8d31", "score": "0.48223364", "text": "public function email_signature_setting( $user ) {\n\t\t\t//include file for html\n\t\t\trequire \\rtCamp\\WP\\rtEmailSignature\\PATH . 'includes/views/email-signature-admin.php';\n\t\t}", "title": "" }, { "docid": "d8b3ad4b8594ab42f7c6119002d64d1f", "score": "0.4822239", "text": "public function setPayMethod()\n {\n $this->payMethod = new PayPalPaymentMethod();\n $this->id = 'hp_va';\n $this->name = 'PayPal';\n\n $this->bookingModes = array(\n 'PA' => 'authorize',\n 'DB' => 'debit'\n );\n }", "title": "" }, { "docid": "15d3201a0dc42c5f79862c7ce257f1ca", "score": "0.4820297", "text": "public function getSignature(){\n\t\treturn md5( $this->getString($this->SIGNATURE_FORMAT) );\n\t}", "title": "" }, { "docid": "e67d0dc393e869ce0f2b7954b2aaa0c1", "score": "0.48126316", "text": "public function getSignature()\n {\n $value = $this->get(self::SIGNATURE);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "6cbc3701918396f6bfd29b1f9d3c33d4", "score": "0.48059553", "text": "public function setShaSignature($shaSignature)\n {\n $this->_shaSignature = $shaSignature;\n return $this;\n }", "title": "" }, { "docid": "f0dcaf4f84bcd7f4f2d9f204eeaa0d4c", "score": "0.48051515", "text": "function acf_signature_field_add_meta_box() {\n\t\tadd_meta_box('signature_acf_field_sectionid', esc_html__( 'Signature group', 'xkit' ),\n\t\t\t'acf_signature_field_meta_box_callback',\n\t\t\t'acf-field-group'\n\t\t);\n\t}", "title": "" }, { "docid": "6fa9e1bd912a065e550e1a2eebc90e2e", "score": "0.4788535", "text": "public function setPayment(Payment $payment)\n {\n $this->payment = $payment;\n }", "title": "" }, { "docid": "2396df93bbdba5124268faeba5964e3a", "score": "0.4787399", "text": "protected function BuildSignature()\n\t\t{\n\t\t\treturn Security::IntegrityHash(IntegrationData::CancelationKey, $this->Prodid, $this->Tid, $this->Custom, IntegrationData::Pid, $this->Source);\n\t\t}", "title": "" }, { "docid": "1b52f1738e7dbe66a919115ea6cbe22e", "score": "0.47851595", "text": "public function setMerchantIdentifier();", "title": "" }, { "docid": "cd11042051a762c84ee0e6baeec076ab", "score": "0.47785285", "text": "public function __construct($sign)\n {\n $this->sign = $sign;\n }", "title": "" }, { "docid": "7265f175bdd25318c2ac2758c131bff9", "score": "0.47771654", "text": "public static function toSignature(?string $signature): ?Signature\n {\n return $signature ? new Signature($signature) : null;\n }", "title": "" }, { "docid": "ddd88c80024f2382b5a0af876bdfdb09", "score": "0.4777156", "text": "public function getApiSignature()\n {\n return $this->_config->apiSignature;\n }", "title": "" }, { "docid": "de15bcf43e3cca58e37b56fad1b358b2", "score": "0.47762194", "text": "public function tmsSignature( $request , $secret_key ){\n\t\t\n\t\t$method = $request->getMethod();\n\t\t// The HTTP Header fields are used to authenticate the request\n\t\t$requestHeaders = $request->getHeaders();\n\t\t// note that header names are converted to lower case\n\t\t$dateValue = $requestHeaders['date'];\n\t\t\n\t\t$requestPath = $request->getURL()->getPath();\n\t\t\n\t\t// Not all requests will define a content-type\n\t\tif( isset( $requestHeaders['content-type'] ))\n\t\t\t$this->contentType = $requestHeaders['content-type'];\n\t\n\t\tif ( $method == 'GET' || $method == 'DELETE' ) {\n\t\t\t// Do nothing because the strings are already set correctly\n\t\t} else if ( $method == 'POST' || $method == 'PUT' ) {\n\t\t\t// If this is a POST or PUT the request should have a request body\n\t\t\t$this->hexDigest = md5( $request->getBody() , false );\n\t\t\t\n\t\t} else {\n\t\t\tprint(\"ERROR: Invalid content type passed to Sig Builder\");\n\t\t}\n\t\t\n\n\n\t\t$toDigest = $method . \"\\n\" . $this->hexDigest . \"\\n\" . $this->contentType . \"\\n\" . $dateValue . \"\\n\" . $requestPath ;\n\n//\t\techo $toDigest;\n\t\t\n\t\t$shaHashed = \"\";\n\t\t\n\t\ttry {\n\t\t\t// the SHA1 hash needs to be transformed from hexidecimal to Base64\n\t\t\t$shaHashed = $this->hexToBase64( hash_hmac(\"sha1\", $toDigest , $secret_key) );\n\t\t\t\n\t\t} catch ( Exception $e) {\n\t\t\t$e->getMessage();\n\t\t}\n\n\t\treturn $shaHashed;\t\n\t}", "title": "" }, { "docid": "46dbf34d1e76d25a9e4c0ca409ab21ff", "score": "0.47741732", "text": "public function testSetDateSignature() {\n\n // Set a Date/time mock.\n $dateSignature = new DateTime(\"2018-09-10\");\n\n $obj = new LettresMissionsEntetes();\n\n $obj->setDateSignature($dateSignature);\n $this->assertSame($dateSignature, $obj->getDateSignature());\n }", "title": "" }, { "docid": "87ced85a3cb6dfda1ca8c567e16f4b42", "score": "0.47737053", "text": "public function setPackageSignatureType($packageidx, $value) {\r\n $ret = inship_fedexship_set($this->handle, 95, $value , $packageidx);\r\n if ($ret != 0) {\r\n throw new Exception($ret . \": \" . inship_fedexship_get_last_error($this->handle));\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "fa748e0183a75e220f5bd93a39535fe1", "score": "0.4771764", "text": "public function getSignature(): string\n {\n return $this->requireString('signature');\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "45903628ff69251019708b230944f6f0", "score": "0.69152695", "text": "public function store(StoreResourceRequest $request)\n {\n\n $data = $request->input();\n\n if ( empty($data['teacher_id']) ) {\n $data['teacher_id'] = null;\n }\n\n DB::transaction(function() use ($request, $data)\n {\n $resource = Resource::create($data);\n $uploadedFile = $request->file('file');\n\n $type = $uploadedFile->getClientOriginalExtension();\n $name = $resource->generateResourceName();\n $path = $resource->generateResourcePath();\n\n Storage::put(\"{$path}.{$type}\", file_get_contents($uploadedFile->getRealPath()));\n\n $file = File::create([\n 'resource_id' => $resource->id,\n 'name' => $name,\n 'type' => $type,\n 'url' => \"{$path}.{$type}\"\n ]);\n\n if ( !$resource || !$file ) {\n return redirect()->back()->with('error', 'Failed :( Try Again!');\n }\n });\n\n return redirect()\n ->route('home')\n ->with('info', 'Resource Uploaded. Pending of revision.');\n }", "title": "" }, { "docid": "3142727ee8880b6b9792726e4513dca0", "score": "0.68027574", "text": "public function store()\n {\n $validation = new $this->resourceRequestValidation;\n $this->validate(request(), $validation->rules());\n DB::beginTransaction();\n try {\n $store = $this->repository->eloquentCreate($this->resourceCreateRequestInputs);\n if ($store) {\n Session::flash(\"success\", \" [ \". (!is_array($store->name) && $store->name ? $store->name : $store->name_val) .\" ] \" . __(\"main.session_created_message\"));\n } else {\n Session::flash(\"danger\", __(\"main.session_falid_created_message\"));\n }\n DB::commit();\n } catch (Exception $e) {\n DB::rollback();\n Session::flash(\"danger\", $e->getMessage());\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "8a450d988729c270cfacfb2daffbda8e", "score": "0.67614126", "text": "public function store(ResourceCreateRequest $request)\n {\n Resource::create([\n 'title' => $request->input('title'),\n 'description' => $request->input('description'),\n 'cat_id' => $request->input('category'),\n 'link' => $request->input('url'),\n 'user_id' => Auth::user()->id\n ]);\n return redirect(route('index'))->with('status', 'Resource Created Successfully');\n }", "title": "" }, { "docid": "a15cea6cc2c6f1b34e41fa10dc7a85e9", "score": "0.6511993", "text": "public function save()\n {\n $this->_storage->modify($this->id, $this->toHash(true));\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.64245033", "text": "public function create($resource);", "title": "" }, { "docid": "7d031b8290ff632bab7fef6a00576916", "score": "0.63913447", "text": "public function store()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.63753176", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6365053", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "2013cf53419c1746030f01635e54fbc5", "score": "0.6349064", "text": "public function storeAndNew()\n {\n $this->storeAndNew = true;\n $this->store();\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63417834", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
b4be1097bf73aa9f0470b7d3a4b7795f
An alias of the get method.
[ { "docid": "b4f85c8f08bfa6b4b8dade0da30da6e6", "score": "0.0", "text": "public function first(): Cursor\n {\n return $this->get();\n }", "title": "" } ]
[ { "docid": "704da54f5d36c220b03cf69a33055972", "score": "0.79768956", "text": "public function getGet()\n {\n return $this->get('get');\n }", "title": "" }, { "docid": "6a386048cfe0afb08ca560116fd151a8", "score": "0.788507", "text": "public static function get();", "title": "" }, { "docid": "7ece59602d2a454738b829d8a412988f", "score": "0.7881261", "text": "public function get()\n {\n }", "title": "" }, { "docid": "7ece59602d2a454738b829d8a412988f", "score": "0.7881261", "text": "public function get()\n {\n }", "title": "" }, { "docid": "f88e9f088c23cd2ef8e2715799fd8c24", "score": "0.7776378", "text": "public function get() {\n\t\t$args = func_get_args() ;\n\t\treturn $this->__call('get', $args) ;\n\t}", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "4867b115c4499522ec3de31cd5abce6d", "score": "0.77728647", "text": "public function get();", "title": "" }, { "docid": "33074edc635ed4e7a46264e9a63481db", "score": "0.77501833", "text": "public function get()\n {\n\n }", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.77175623", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.77175623", "text": "abstract public function get();", "title": "" }, { "docid": "e802366590f1cbe09fd8090ae3d33e58", "score": "0.77175623", "text": "abstract public function get();", "title": "" }, { "docid": "48bc6b1a65df7ecdafd36749bf47b983", "score": "0.76627517", "text": "function get();", "title": "" }, { "docid": "48bc6b1a65df7ecdafd36749bf47b983", "score": "0.76627517", "text": "function get();", "title": "" }, { "docid": "48bc6b1a65df7ecdafd36749bf47b983", "score": "0.76627517", "text": "function get();", "title": "" }, { "docid": "b11a5f2a071a3b16cddd496805a198f0", "score": "0.75664175", "text": "public function get($method = '') {\n return parent::get($method);\n }", "title": "" }, { "docid": "5cd2f362ba50d996759635788a9b02de", "score": "0.7535637", "text": "public function get(): string;", "title": "" }, { "docid": "5cd2f362ba50d996759635788a9b02de", "score": "0.7535637", "text": "public function get(): string;", "title": "" }, { "docid": "35f8ff218e4c2a5ffd6533829018fd5f", "score": "0.7517469", "text": "abstract protected function _get();", "title": "" }, { "docid": "2319b378c577af1bb5d654d90b6d6830", "score": "0.74424654", "text": "protected function get() {\n\t\t$function = array_shift($_GET) . '_get';\n\t\t$this->$function();\n\t}", "title": "" }, { "docid": "36006c8786b768f14fa9cd64000910bd", "score": "0.7411822", "text": "public function get(): string\n\t{\n\t}", "title": "" }, { "docid": "1e499ec55fe3d4a7d82e42517ec8a947", "score": "0.730987", "text": "public function __get($name) {\r\n $method = \"get{$name}\";\r\n if (method_exists($this, $method)) {\r\n return $this->$method();\r\n }\r\n }", "title": "" }, { "docid": "1c881a49639386aa8e5970eb3094eb73", "score": "0.72540176", "text": "public function __get($param);", "title": "" }, { "docid": "24afba5a826e79f38e4e3b62b8f5ef70", "score": "0.7186069", "text": "public function get($name) {}", "title": "" }, { "docid": "cd202ab3e5c89ba946b68bb8b9b5f9e2", "score": "0.71780413", "text": "public function get($name){ }", "title": "" }, { "docid": "c4685ae246263add2ddedbb1327dd955", "score": "0.713919", "text": "protected function getMethod()\n\t{\n\t\treturn 'get';\n\t}", "title": "" }, { "docid": "e1a3c2cb4377492a4183c85227bbbc36", "score": "0.7114445", "text": "public function get($get = null, $as_array=false);", "title": "" }, { "docid": "19802d79ba1ebb7a32f964271168644d", "score": "0.71029913", "text": "public function get($key){ }", "title": "" }, { "docid": "f3cdda43572250585b40381aaaebc9cc", "score": "0.7095508", "text": "public static function Get()\n\t\t{\n\t\t\t\tif (!self::$Get) \n\t\t\t\t{\n\t\t\t\t\t\tself::$Get = new Request\\Get;\n\t\t\t\t}\n\t\t\t\treturn self::$Get;\n\t\t}", "title": "" }, { "docid": "0659c0d8879c806f4fa58ebc46d31a10", "score": "0.7044785", "text": "protected function getMethod(){\n\t\treturn \"GET\";\n\t}", "title": "" }, { "docid": "ab5276e0edeaf4b4e345a28f237800e6", "score": "0.7035464", "text": "public function get($key)\n {\n }", "title": "" }, { "docid": "9a83e46ceaed1011ad999b524060b8e2", "score": "0.70108265", "text": "public function get($key) {}", "title": "" }, { "docid": "9a83e46ceaed1011ad999b524060b8e2", "score": "0.70108265", "text": "public function get($key) {}", "title": "" }, { "docid": "b3fe5a0c2e2226d0edb4461f94df28da", "score": "0.70076466", "text": "function __get(string $name) \n {\n return $this->access($name);\n }", "title": "" }, { "docid": "e65bbd05f955b5b75bdae3d86f1b5915", "score": "0.6964842", "text": "public function __get($name)\n\t{\n\t$method = 'get' . $name;\n\tif (!method_exists($this, $method))\n\t{\n\t throw new \\Exception('Clase Entity: Trayud. Invalid specified property: get'.$name);\n\t}\n\treturn $this->$method();\n\t}", "title": "" }, { "docid": "f92388e913fbd3797c491150e8fc03b1", "score": "0.6957792", "text": "public function __get($name = null) {}", "title": "" }, { "docid": "691bd89dad283beda65b62425bcab16a", "score": "0.6949095", "text": "public function &get($name);", "title": "" }, { "docid": "691bd89dad283beda65b62425bcab16a", "score": "0.6949095", "text": "public function &get($name);", "title": "" }, { "docid": "fbd06f63debff2ecd1104e675641ed40", "score": "0.6934598", "text": "public function __get($name)\n {\n $method = 'get' . ucfirst($name);\n\n if (method_exists($this, $method)) {\n return $this->$method();\n }\n }", "title": "" }, { "docid": "37735c921300d7a12a69b929143ddc98", "score": "0.6925948", "text": "public function __get($name) {\r\n \treturn $this->get($name);\r\n }", "title": "" }, { "docid": "197d7ae53e194344ae933970a18247e7", "score": "0.6869734", "text": "public function __get($param)\n {\n return $this->get($param);\n }", "title": "" }, { "docid": "d3b1bfa1af703f3bd5175ae9c09acaba", "score": "0.6844411", "text": "public function __get($name) {\t\t\n\t\t$method = 'get' . ucfirst($name);\n\t\tif(method_exists($this, $method) && is_callable(array($this, $method))) {\n\t\t\treturn $this->{$method}();\n\t\t}\n\t\telse {\n\t\t\tif(isset($this->_values[$name])) {\n\t\t\t\treturn $this->_values[$name];\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "7f15e070d4b9fa0ed1e7f929f085b79c", "score": "0.68293715", "text": "public function __get($name)\n\t{\n\t$method = 'get' . $name;\n\tif (!method_exists($this, $method))\n\t{\n\t throw new \\Exception('Clase Entity: Tvmovi. Invalid specified property: get'.$name);\n\t}\n\treturn $this->$method();\n\t}", "title": "" }, { "docid": "6822986da5a811e7dd305475315c25ab", "score": "0.67976755", "text": "public function __get($name)\n\t{\n\t\t$access = array_unique(array_merge(explode(',', static::GETACCESS), explode(',', self::GETACCESS)));\n\t\t$access = array_map('trim', $access);\n\t\tif (in_array($name, $access))\n\t\t{\n\t\t\treturn $this->{$name};\n\t\t}\n\t\telseif (array_key_exists($name, $this->attach))\n\t\t{\n\t\t\treturn $this->attach[$name];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new \\Exception(\"Cannot grant accessor \". get_class() .\"(\". get_called_class() .\"->{$name})\");\n\t\t}\n\t}", "title": "" }, { "docid": "ecfe111e84388fefe01e295173665e11", "score": "0.67786646", "text": "public static function get($name) {}", "title": "" }, { "docid": "6270bd10277e9788ecc15a053c0096e6", "score": "0.6768408", "text": "function &GET()\n{\n\treturn tgsfGet::get_instance();\n}", "title": "" }, { "docid": "930c0dd61fb096be07c83f7bbcfd671e", "score": "0.6766811", "text": "public function __get($name)\n\t{\n\t$method = 'get' . $name;\n\tif (!method_exists($this, $method))\n\t{\n\t throw new \\Exception('Clase Entity: Tvbode. Invalid specified property: get'.$name);\n\t}\n\treturn $this->$method();\n\t}", "title": "" }, { "docid": "e70582802af84b4ba36d1e3e0ba2a0bb", "score": "0.67518723", "text": "abstract public function onGet();", "title": "" }, { "docid": "5180f616583e7bd6239e9bb9b453ee59", "score": "0.6750223", "text": "public function getOne()\n {\n }", "title": "" }, { "docid": "40a999248fe5d69a4dd868f36520af93", "score": "0.6746124", "text": "public function get( $args, $assoc_args ) {\n\t\tparent::get( $args, $assoc_args );\n\t}", "title": "" }, { "docid": "1259db4dc9792e300d53fd791ce1f6cc", "score": "0.67420965", "text": "public function __get($param)\n {\n return $this->get($param);\n }", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "738bb7f6d1cd06f302dba4878417204a", "score": "0.67337286", "text": "public function get($name);", "title": "" }, { "docid": "6c7394306c4a94a56819f71eabac75f6", "score": "0.67160326", "text": "function get($name);", "title": "" }, { "docid": "c4d189c2cb857fabc7668b8afb1c0d23", "score": "0.67130303", "text": "public function get(): Get\n {\n return new Get($this->_provider);\n }", "title": "" }, { "docid": "c4d189c2cb857fabc7668b8afb1c0d23", "score": "0.67130303", "text": "public function get(): Get\n {\n return new Get($this->_provider);\n }", "title": "" }, { "docid": "c4d189c2cb857fabc7668b8afb1c0d23", "score": "0.67130303", "text": "public function get(): Get\n {\n return new Get($this->_provider);\n }", "title": "" }, { "docid": "c4d189c2cb857fabc7668b8afb1c0d23", "score": "0.67130303", "text": "public function get(): Get\n {\n return new Get($this->_provider);\n }", "title": "" }, { "docid": "7207ae69d55ca3f9a27e1b3b125d1901", "score": "0.67102176", "text": "public function setMethodAsGet()\n {\n $this->method = 'GET';\n return $this;\n }", "title": "" }, { "docid": "242435e2385022de56a523124184b0a0", "score": "0.6706809", "text": "public function __get($name) {\r\n\t\t$method = 'get' . $name;\r\n\t\tif ('mapper' == $name || ! method_exists ( $this, $method )) {\r\n\t\t\tthrow new Zend_Exception ( 'Invalid property specified', Zend_Log::ERR );\r\n\t\t}\r\n\t\treturn $this->$method ();\r\n\t}", "title": "" }, { "docid": "38357711a44d523b26dd43708e9aa4fe", "score": "0.6697626", "text": "public function __get($name)\n {\n }", "title": "" }, { "docid": "23b64f5d845ef44f5c14e4d175e9bbb9", "score": "0.6692622", "text": "public function get($name) {\n\t\telgg_deprecated_notice(\"Use -> instead of get()\", 1.9);\n\t\treturn $this->__get($name);\n\t}", "title": "" }, { "docid": "db06791daaea8d2df6a7662f04eb0b58", "score": "0.6680135", "text": "public function get(string $name);", "title": "" }, { "docid": "db06791daaea8d2df6a7662f04eb0b58", "score": "0.6680135", "text": "public function get(string $name);", "title": "" }, { "docid": "db06791daaea8d2df6a7662f04eb0b58", "score": "0.6680135", "text": "public function get(string $name);", "title": "" }, { "docid": "93c91da8dd663ec4ec72e47ada73c4ed", "score": "0.6676727", "text": "public function __get( /* string */ $key )\n\t{\n\t\t// If a get* method exists for this key, use that method to get this value.\n\t\tif ( method_exists( $this, $key ) )\n\t\t{\n\t\t\treturn $this->$key();\n\t\t}\n\t\t\n\t\tif ( isset( $this->$key ) )\n\t\t{\n\t\t\treturn $this->$key;\n\t\t}\n\t}", "title": "" }, { "docid": "967ea9b75ea065d78508df998b18cad9", "score": "0.66697925", "text": "protected function method()\n {\n return 'GET';\n }", "title": "" }, { "docid": "14f380317e0d411c000594287768e315", "score": "0.6663196", "text": "public function __get($parameter);", "title": "" }, { "docid": "c922ab9f030e805635bc8b891779c3d3", "score": "0.6652146", "text": "public function __get(string $key);", "title": "" }, { "docid": "c922ab9f030e805635bc8b891779c3d3", "score": "0.6652146", "text": "public function __get(string $key);", "title": "" }, { "docid": "b6f47d688e86ebf4ac9e506451442944", "score": "0.6648571", "text": "public function __get( string $key )\n\t{\n\t\treturn $this->get( $key );\n\t}", "title": "" }, { "docid": "1d8e5c397f9309eca9f1db04de9d38b4", "score": "0.66436905", "text": "abstract public function get($name);", "title": "" }, { "docid": "94064a855a1be8646581f4b2919c4d6f", "score": "0.663109", "text": "public function get(): string\n {\n return (string) parent::get();\n }", "title": "" }, { "docid": "1393fc9c393d0d0e362549937e73259b", "score": "0.6630335", "text": "public static function get() {\n\t\treturn static::instance()->get();\n\t}", "title": "" } ]
369b67033d2de22a6f7a56d92dd9d120
Stitch queries to each other by stitch rules
[ { "docid": "072097508868a62a2116b41d4ff543cd", "score": "0.5982542", "text": "private function stitchQueries()\n {\n $result = [];\n foreach ($this->requests as $serviceName => $request) {\n /** @var QueryBuilder $query */\n foreach ($request as $queryName => $query) {\n if (count($query->getStitched()) > 0) {\n $this->bindRelations($query);\n }\n\n $result['data'][$serviceName][$queryName] = $query->getArrayResult();\n }\n }\n $this->requests = [];\n return $result;\n }", "title": "" } ]
[ { "docid": "0d213b5b7d23df43ccfb1d977fbfd4a1", "score": "0.540743", "text": "function get_swimmer_relays_query($swid, $criteria) {\n switch($criteria) {\n case 'Event':\n $crit = 'eid,stroke,distance,time';\n break;\n case 'Course':\n $crit = 'course,stroke,distance,time';\n break;\n case 'Stroke':\n $crit = 'stroke,distance,course,time';\n break;\n case 'Rank':\n $crit = 'rank_in_ag,stroke,distance,time';\n break;\n\n\n\n }\n $sql = \"Select rscid,events.eid,stroke,distance,swid1,swid2,swid3,swid4,time,age_group,rank_in_ag, points, events.location, events.date,events.course,gender,splits FROM relays \n LEFT JOIN events ON relays.eid = events.eid\n WHERE swid1 LIKE '\" . $swid . \"' OR swid2 LIKE '\" . $swid . \"' OR swid3 LIKE '\" . $swid . \"' OR swid4 LIKE '\" . $swid . \"' ORDER BY \" . $crit;\n\n $conn = db_connection();\n\n\n $result = $conn->query($sql);\n if ($result->num_rows > 0) {\n $ret = [];\n while ($row = $result->fetch_assoc()) {\n array_push($ret, $row);\n }\n } else {\n }\n $conn->close();\n return $ret;\n}", "title": "" }, { "docid": "586a25524ad521bef8a8d3c330489e0c", "score": "0.51097363", "text": "function regularStrategies(Request $request, $subject, $step){\n\n\t\t$strats = DB::select(\"\n\t\t\t\t\t\tSELECT\n\tstrategy_id, title, rating_score, block_score, subject_score, sum(expert_rated) as expert_rated\nFROM \n\t(\n\tSELECT \n\t\tstrategy_id, rating_score, block_score, subject_score, 0 as expert_rated\n\tFROM\n\t\t(\n\t\t# Add weighted block rating with subject rating for the strategies\n\t\tSELECT\n\t\t\tstrategy_id, (10 * block_score + 1 * subject_score) AS rating_score, block_score, subject_score\n\t\tFROM\n\t\t\t(\n\t\t\t# Get rating from the specific block\n\t\t\tSELECT\n\t\t\t\tdistinct_ids.strategy_id, ifnull(score,0) as block_score, subject_score\n\t\t\tFROM\n\t\t\t\t# Get the strategies that have correct tags for current block and subject\n\t\t\t\t(\n\t\t\t\tSELECT\n\t\t\t\t\tstrategy_id\n\t\t\t\tFROM\n\t\t\t\t\tks_strategies_tags\n\t\t\t\tWHERE\n\t\t\t\t\ttag IN (\n\t\t\t\t\tSELECT \n\t\t\t\t\t\ttag\n\t\t\t\t\tFROM\n\t\t\t\t\t\tks_subjects_tags\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tsubject_id = (\n\t\t\t\t\t\tSELECT \n\t\t\t\t\t\t\tid\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tks_subjects\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tblock = ? AND subject = ?\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\tGROUP BY\n\t\t\t\t\tstrategy_id\n\t\t\t\t) AS distinct_ids\n\t\t\t\n\t\t\tLEFT JOIN (\n\t\t\t\n\t\t\t# Get the sum of all rating made for the specific block\n\t\t\tSELECT \n\t\t\t\tstrategy_id, SUM(rating) AS score \n\t\t\tFROM\n\t\t\t\tks_ratings\n\t\t\tWHERE\n\t\t\t\tsubject_id = (\n\t\t\t\tSELECT \n\t\t\t\t\tid\n\t\t\t\tFROM\n\t\t\t\t\tks_subjects\n\t\t\t\tWHERE\n\t\t\t\t\tblock = ? AND subject = ?\n\t\t\t\t)\n\t\t\tGROUP BY strategy_id\n\t\t\t) AS elegible_ratings ON distinct_ids.strategy_id = elegible_ratings.strategy_id\n\t\t\t\n\t\t\t\n\t\t\tJOIN (\n\t\t\t\n\t\t\t# Get rating from the subject\n\t\t\tSELECT \n\t\t\t\tdistinct_ids2.strategy_id, ifnull(score,0) AS subject_score\n\t\t\tFROM\n\t\t\t\t(\n\t\t\t\t# Get the strategies that have correct tags for current block and subject\n\t\t\t\tSELECT \n\t\t\t\t\tstrategy_id\n\t\t\t\tFROM\n\t\t\t\t\tks_strategies_tags\n\t\t\t\tWHERE\n\t\t\t\t\ttag IN (\n\t\t\t\t\tSELECT \n\t\t\t\t\t\ttag\n\t\t\t\t\tFROM\n\t\t\t\t\t\tks_subjects_tags\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tsubject_id IN (\n\t\t\t\t\t\tSELECT \n\t\t\t\t\t\t\tid\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tks_subjects\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tsubject = ? AND block = ?\n\t\t\t\t\t\t)\n\t\t\t\t\t)\n\t\t\t\tGROUP BY strategy_id) AS distinct_ids2\n\t\t\tLEFT JOIN (\n\t\t\t\tSELECT \n\t\t\t\t\tSUM(rating) AS score, strategy_id\n\t\t\t\tFROM\n\t\t\t\t\tks_ratings\n\t\t\t\tWHERE\n\t\t\t\t\tsubject_id IN (\n\t\t\t\t\tSELECT \n\t\t\t\t\t\tid\n\t\t\t\t\tFROM\n\t\t\t\t\t\tks_subjects\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tsubject = ?\n\t\t\t\t\t)\n\t\t\t\tGROUP BY strategy_id\n\t\t\t) AS elegible_ratings2 ON distinct_ids2.strategy_id = elegible_ratings2.strategy_id\n\t\t) AS overall ON overall.strategy_id = elegible_ratings.strategy_id\n\t\t) AS overall2\n\t) AS strategy_scores\n\n\tUNION\n\n\tSELECT\n\t\texpert_strategy_id as strategy_id, 0 as rating_score, 0 as block_score, 0 as subject_score, 1 as expert_rated\n\tFROM\n\t\tks_subjects\n\tWHERE\n\t\tsubject = ? AND block = ?\n\t) as no_title\nJOIN\n\tks_strategies ON no_title.strategy_id = ks_strategies.id\nWHERE\n strategy_id NOT IN (\n SELECT \n\t\tstrategy_id\n\tFROM\n\t\tks_user_strategies\n\tWHERE\n\t\tuser_id = 1)\nGROUP BY strategy_id\nORDER BY expert_rated DESC,rating_score DESC\nLIMIT 0 , 5;\n\n\t\t\", [$step,$subject, $step, $subject, $subject, $step,$subject, $subject,$step]);\n\t\treturn json_encode(array('strategies'=>$strats));\n\t}", "title": "" }, { "docid": "913a25edbe32042350d9a749dec41606", "score": "0.49670503", "text": "public function getHistoricMatchesByLeagueAndSeason()\n {\n $leagueId = $this->input->get('league');\n if(!$leagueId){\n exit();\n }\n $results = $this->sportradar->getAllResultByLeagueId($leagueId);\n try {\n $this->db->trans_start();\n foreach ($results->results as $result) {\n $homeId = str_replace('sr:competitor:', '', $result['sport_event']['competitors'][0]['id']);\n $awayId = str_replace('sr:competitor:', '', $result['sport_event']['competitors'][1]['id']);\n $matchId = str_replace('sr:match:', '', $result['sport_event']['id']);\n\n if (!$this->mdl_teams->where('team_id', $homeId)->get()) {\n $homeTeamInfo = $this->sportradar->getTeamInfo($homeId);\n\n if (isset($homeTeamInfo->team['country_code'])) {\n $country = $this->mdl_country->where('alias', $homeTeamInfo->team['country_code'])->get();\n if (!$country) {\n $insert_country_data = [\n 'name' => $homeTeamInfo->team['country'],\n 'alias' => $homeTeamInfo->team['country_code'],\n ];\n $this->mdl_country->insert($insert_country_data);\n }\n\n $insert_team_info = [\n 'team_id' => $homeId,\n 'team_api_id' => $homeId,\n 'name' => $homeTeamInfo->team['name'],\n 'country_id' => $this->mdl_country->where('alias',\n $homeTeamInfo->team['country_code'])->get()->id,\n 'stadium' => isset($homeTeamInfo->venue['name']) ? $homeTeamInfo->venue['name'] : 'No info',\n 'alias' => slug($homeTeamInfo->team['name']),\n ];\n $this->mdl_teams->insert($insert_team_info);\n }\n }\n\n if (!$this->mdl_teams->where('team_id', $awayId)->get()) {\n $awayTeamInfo = $this->sportradar->getTeamInfo($awayId);\n if (isset($awayTeamInfo->team['country_code'])) {\n $country = $this->mdl_country->where('alias', $awayTeamInfo->team['country_code'])->get();\n if (!$country) {\n $insert_country_data = [\n 'name' => $awayTeamInfo->team['country'],\n 'alias' => $awayTeamInfo->team['country_code'],\n ];\n $this->mdl_country->insert($insert_country_data);\n }\n\n $insert_team_info = [\n 'team_id' => $awayId,\n 'team_api_id' => $awayId,\n 'name' => $awayTeamInfo->team['name'],\n 'country_id' => $this->mdl_country->where('alias',\n $awayTeamInfo->team['country_code'])->get()->id,\n 'stadium' => isset($awayTeamInfo->venue['name']) ? $awayTeamInfo->venue['name'] : 'No info',\n 'alias' => slug($awayTeamInfo->team['name']),\n ];\n $this->mdl_teams->insert($insert_team_info);\n }\n }\n\n $matchSumary = $this->sportradar->getMatchInfo($matchId);\n\n if (isset($matchSumary->statistics)) {\n $matchInfos = $matchSumary->statistics['teams'];\n $homeMatchInfo = $matchInfos[0]['statistics'];\n $awayMatchInfo = $matchInfos[1]['statistics'];\n }\n\n $lineUp = $this->sportradar->getLineUpOfMatch($matchId);\n if (isset($lineUp->lineups)) {\n $lineUpHomeInfo = $lineUp->lineups[0];\n $lineUpAwayInfo = $lineUp->lineups[1];\n\n $home_line_up_defense = [];\n $home_line_up_midfield = [];\n $home_line_up_forward = [];\n\n foreach ($lineUpHomeInfo['starting_lineup'] as $info) {\n if ($info['type'] == 'defender') {\n $home_line_up_defense[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n if ($info['type'] == 'midfielder') {\n $home_line_up_midfield[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n if ($info['type'] == 'forward') {\n $home_line_up_forward[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n if ($info['type'] == 'goalkeeper') {\n $home_line_up_goal_keeper = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n }\n\n $home_line_up_substitutes = [];\n\n foreach ($lineUpHomeInfo['substitutes'] as $info) {\n $home_line_up_substitutes[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n\n $home_line_up_defense = implode(', ', $home_line_up_defense);\n $home_line_up_midfield = implode(', ', $home_line_up_midfield);\n $home_line_up_forward = implode(', ', $home_line_up_forward);\n $home_line_up_coach = implode(' ', array_reverse(explode(',', $lineUpHomeInfo['manager']['name'])));\n $home_line_up_substitutes = implode(', ', $home_line_up_substitutes);\n $home_team_formation = isset($lineUpHomeInfo['formation']) ? $lineUpHomeInfo['formation'] : 'No info';\n\n $away_line_up_defense = [];\n $away_line_up_midfield = [];\n $away_line_up_forward = [];\n\n foreach ($lineUpAwayInfo['starting_lineup'] as $info) {\n if ($info['type'] == 'defender') {\n $away_line_up_defense[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n if ($info['type'] == 'midfielder') {\n $away_line_up_midfield[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n if ($info['type'] == 'forward') {\n $away_line_up_forward[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n if ($info['type'] == 'goalkeeper') {\n $away_line_up_goal_keeper = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n }\n\n $away_line_up_substitutes = [];\n\n foreach ($lineUpAwayInfo['substitutes'] as $info) {\n $away_line_up_substitutes[] = implode(' ', array_reverse(explode(',', $info['name'])));\n }\n\n $away_line_up_defense = implode(', ', $away_line_up_defense);\n $away_line_up_midfield = implode(', ', $away_line_up_midfield);\n $away_line_up_forward = implode(', ', $away_line_up_forward);\n $away_line_up_coach = implode(' ', array_reverse(explode(',', $lineUpAwayInfo['manager']['name'])));\n $away_line_up_substitutes = implode(', ', $away_line_up_substitutes);\n $away_team_formation = isset($lineUpAwayInfo['formation']) ? $lineUpAwayInfo['formation'] : 'No info';\n }\n\n $homeInfo = $this->mdl_teams->where('team_id', $homeId)->get();\n $awayInfo = $this->mdl_teams->where('team_id', $awayId)->get();\n\n $round = (isset($result['sport_event']['tournament_round']['number'])) ? $result['sport_event']['tournament_round']['number'] : 0;\n $date = date('Y-m-d H:i:s', strtotime($result['sport_event']['scheduled']));\n $existFixtureMatch = $this->mdl_fixture_matches->where('fixture_matches_id', $matchId)->get();\n\n if (!$existFixtureMatch && $this->mdl_teams->where('team_id',\n $homeId)->get() && $this->mdl_teams->where('team_id', $awayId)->get()) {\n $insert_fixture_match = array(\n 'fixture_matches_id' => $matchId,\n 'fixture_matches_api_id' => $matchId,\n 'league_id' => $leagueId,\n 'season_id' => 1,\n 'round' => $round,\n 'date' => $date,\n 'home_team' => $this->mdl_teams->where('team_id', $homeId)->get()->name,\n 'home_team_api_id' => $homeId,\n 'home_team_id' => $homeId,\n 'home_goals' => $result['sport_event_status']['home_score'],\n 'away_team' => $this->mdl_teams->where('team_id', $awayId)->get()->name,\n 'away_team_id' => $awayId,\n 'away_team_api_id' => $awayId,\n 'away_goals' => $result['sport_event_status']['away_score'],\n 'time' => date('H:i', strtotime($result['sport_event']['scheduled'])),\n 'location' => $matchSumary->sport_event['venue']['name'],\n 'referee' => isset($matchSumary->sport_event_conditions['referee']['name']) ?\n implode(' ', array_reverse(explode(',',\n $matchSumary->sport_event_conditions['referee']['name']))) : 'No info',\n );\n $this->mdl_fixture_matches->insert($insert_fixture_match);\n }\n if ($homeInfo && $awayInfo && isset($result['sport_event']['venue']['capacity']) && isset($result['sport_event_status']['home_score'])\n && $this->mdl_teams->where('team_id', $homeId)->get() && $this->mdl_teams->where('team_id',\n $awayId)->get()\n && !$this->mdl_matches_history->where('fixture_matches_id', $matchId)->get()) {\n $insert_history_data = array(\n 'season_id' => 1,\n 'match_api_id' => $matchId,\n 'fixture_matches_id' => $matchId,\n 'date' => $date,\n 'round' => $round,\n 'league_id' => $leagueId,\n 'spectators' => $result['sport_event']['venue']['capacity'],\n\n 'home_team' => $this->mdl_teams->where('team_id', $homeId)->get()->name,\n 'home_team_id' => $homeId,\n 'home_team_api_id' => $homeId,\n 'home_corners' => isset($homeMatchInfo['corner_kicks']) ? $homeMatchInfo['corner_kicks'] : 0,\n 'home_goals' => $result['sport_event_status']['home_score'],\n 'half_time_home_goals' => $result['sport_event_status']['period_scores'][0]['home_score'],\n 'home_shots' => isset($homeMatchInfo['shots_off_target']) ? $homeMatchInfo['shots_off_target'] : 0,\n 'home_shots_on_target' => isset($homeMatchInfo['shots_on_target']) ? $homeMatchInfo['shots_on_target'] : 0,\n 'home_fouls' => isset($homeMatchInfo['fouls']) ? $homeMatchInfo['fouls'] : 0,\n 'home_line_up_goal_keeper' => $home_line_up_goal_keeper,\n 'home_line_up_defense' => $home_line_up_defense,\n 'home_line_up_midfield' => $home_line_up_midfield,\n 'home_line_up_forward' => $home_line_up_forward,\n 'home_line_up_substitutes' => $home_line_up_substitutes,\n 'home_line_up_coach' => $home_line_up_coach,\n 'home_yellow_cards' => isset($homeMatchInfo['yellow_cards']) ? $homeMatchInfo['yellow_cards'] : 0,\n 'home_red_cards' => isset($homeMatchInfo['red_cards']) ? $homeMatchInfo['red_cards'] : 0,\n 'home_team_formation' => $home_team_formation,\n\n 'away_team' => $this->mdl_teams->where('team_id', $awayId)->get()->name,\n 'away_team_id' => $awayId,\n 'away_team_api_id' => $awayId,\n 'away_corners' => isset($awayMatchInfo['corner_kicks']) ? $awayMatchInfo['corner_kicks'] : 0,\n 'away_goals' => $result['sport_event_status']['away_score'],\n 'half_time_away_goals' => $result['sport_event_status']['period_scores'][0]['away_score'],\n 'away_shots' => isset($awayMatchInfo['shots_off_target']) ? $awayMatchInfo['shots_off_target'] : 0,\n 'away_shots_on_target' => isset($awayMatchInfo['shots_on_target']) ? $awayMatchInfo['shots_on_target'] : 0,\n 'away_fouls' => isset($awayMatchInfo['fouls']) ? $awayMatchInfo['fouls'] : 0,\n 'away_line_up_goal_keeper' => $away_line_up_goal_keeper,\n 'away_line_up_defense' => $away_line_up_defense,\n 'away_line_up_midfield' => $away_line_up_midfield,\n 'away_line_up_forward' => $away_line_up_forward,\n 'away_line_up_substitutes' => $away_line_up_substitutes,\n 'away_line_up_coach' => $away_line_up_coach,\n 'away_yellow_cards' => isset($awayMatchInfo['yellow_cards']) ? $awayMatchInfo['yellow_cards'] : 0,\n 'away_red_cards' => isset($awayMatchInfo['red_cards']) ? $awayMatchInfo['red_cards'] : 0,\n 'away_team_formation' => $away_team_formation,\n );\n\n $this->mdl_matches_history->insert($insert_history_data);\n $this->db->trans_complete();\n }\n }\n } catch (Exception $e) {\n echo \"XMLSoccerException: \" . $e->getMessage();\n }\n echo \"<pre>\";\n print_r($value = 'Hoàn tất lấy lịch sử trận');\n echo \"</pre>\";\n }", "title": "" }, { "docid": "7463de1751ac3d6834da053c45280e9f", "score": "0.48447508", "text": "function func_db_query_old_skool($db, $str_query, $boo_apply_security = true)\r\r\n{\r\r\n // Does not provide any protection against SQL injection attacks\r\r\n\r\r\n $arr_result = array();\r\r\n \r\r\n // Apply Security to all queries if requested. default = true.\r\r\n if ($boo_apply_security)\r\r\n {\r\r\n $str_query = auth_apply_sql_security($db, $str_query);\r\r\n }\r\r\n $str_query = str_replace('@TABLE_PREFIX@', constant(\"table_prefix\"), $str_query);\r\r\n\r\r\n if ($result = $db->query($str_query, MYSQLI_USE_RESULT))\r\r\n {\r\r\n while($row = $result->fetch_array())\r\r\n {\r\r\n $arr_result[] = $row;\r\r\n }\r\r\n $result->close();\r\r\n }\r\r\n else\r\r\n {\r\r\n fatal_error_handler ($db, \"SQL Processing Error [2] - \" . $db->errno . \" - \" . $db->error . ' SQL: ' . $str_query);\r\r\n }\r\r\n \r\r\n // Increment query counter\r\r\n $GLOBALS['NX3_DB_QUERY_COUNT']++;\r\r\n \r\r\n // Add query to query log\r\r\n $GLOBALS['NX3_DB_QUERY_LOG'][] = array('query' => $str_query, 'binds' => 'n/a: old skool', 'security' => $boo_apply_security);\r\r\n \r\r\n return $arr_result;\r\r\n}", "title": "" }, { "docid": "9e238281bf6d9290d2ee32d200dd3929", "score": "0.4815321", "text": "public function get_stream_list() {\n\t\t$streamlist_arr = array();\n\t\t\n\t\tinclude_once($_SERVER[\"DOCUMENT_ROOT\"] . \"/php/sql.php\");#connect to MySQL db\n\t\n\t\t$query = \"select streamname, promoted from twitch_channels\";\n\t\t$result = mysql_query($query);\n\t\tif(!$result){\n\t\t\tdie(\"<\".$wrapper.\" style='color:red;'>\".\n\t\t\tmysql_error().\"<br/>\".$query.\"</\".$_GET[\"streamlist_wrapper\"].\">\");\n\t\t}\n\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t$streamlist_arr[] = $row[\"streamname\"];\n\t\t}\n\t\t\n\t\t//get list of live twitch stream IDs\n\t\t$streamlist_twitch_arr = array();\n\t\t\n\t\t$userGrab = \"http://api.justin.tv/api/stream/list.json?channel=raginghadrons\";\n\t\t\n\t\tforeach($streamlist_arr as $i =>$value){\n\t\t\t$userGrab .= \",\";\n\t\t\t$userGrab .= $value;\n\t\t}\n\t\tunset($value);\n\t\t\n\t\t// Customize headers and get stream list\n\t\t$opts = array(\n\t\t 'http'=>array(\n\t\t\t'method' => \"GET\",\n\t\t\t'header' =>\t\"Accept-language: en\\r\\n\" .\n\t\t\t\t\t\t\"Accept: application/vnd.twitchtv.v2+json\" .\n\t\t\t\t\t\t\"x-api-version: 2\\r\\n\".\n\t\t\t\t\t\t\"Client-ID: do17chojf6qhk12fjqnxlcgfzd1aeot\\r\\n\"\n\t\t )\n\t\t);\n\t\t$context = stream_context_create($opts);\n\t\t//grabs the channel data from twitch.tv streams\n\t\t$json_file = file_get_contents($userGrab, 0, $context, null);\n\t\t$json_array = json_decode($json_file, true);\n\t\t\n\t\t$streamlist_live = array( # 0,1,2...\n\t\t\tarray(), #login 'rhexact', 'raginghadrons'...\n\t\t\tarray(), #channel_url 'twitch.tv/rhexact', 'twitch.tv/mlg'\n\t\t\tarray(), #meta_game 'Hearthstone'\n\t\t\tarray(), #image_url_small 'http://profile-image-70x70.png'\n\t\t\tarray() #screen_cap_url_medium '/live_user_rhexact-320x240.jpg\n\t\t);\n\t\t\n\t\t//output wrapper\n\t\tif($wrapper){\n\t\t\t$streamlist .= \"<\".$wrapper.\">\";\n\t\t}\n\t\t\n\t\t$num_streams = 0;\n\t\tforeach($json_array as $i=>$js){\n\t\t\t$num_streams++;\n\t\t\t//get USERNAME, USERLINK, USERLOGO\t\t\n\t\t\t$streamlist .= '<'.$type.' title=\"'.$json_array[$i]['channel']['login'].' is live with '.(2 + $json_array[$i]['stream_count']).' viewers!\">'.\n\t\t\t\t '<a class=\"stream_link\" href=\"http://www.twitch.tv/'.\n\t\t\t\t $json_array[$i]['channel']['login']. '\"></a>'.\n\t\t\t\t '<span class=\"stream_username\">'.\n\t\t\t\t $json_array[$i]['channel']['login'].'</span>'.\n\t\t\t\t '<span class=\"stream_userlogo\" style=\"background-image:url(\\''.$json_array[$i]['channel']['image_url_small'].'\\');\">'.\n\t\t\t\t '</span>'.\n\t\t\t\t '<span class=\"stream_preview\" style=\"background-image:url(\\''.$json_array[$i]['channel']['screen_cap_url_medium'].'\\');\">'.\n\t\t\t\t '</span>'.\n\t\t\t\t '<span class=\"stream_game\">'.\n\t\t\t\t $json_array[$i]['channel']['meta_game'].\n\t\t\t\t '</span>'.\n\t\t\t\t \n\t\t\t\t '</'.$type.'>';\n\t\t}\n\t\t\n\t\t//output wrapper end-tag\n\t\tif($wrapper){\n\t\t\t$streamlist .= \"</\".$wrapper.\">\";\n\t\t}\n\t\t\n\t\t$streamlist .= \"<{$type} style=\\\"display:none;\\\" id=\\\"num_streams\\\" data-num-streams=\\\"{$num_streams}\\\"></{$type}>\";\n\t\t\n\t\treturn $streamlist;\n\t}", "title": "" }, { "docid": "15e5a6302bc0bedf3b9831da3599b143", "score": "0.48081958", "text": "protected function doQueries()\n {\n\n // Initialize the array of sockets\n $sockets = [];\n\n // Iterate over the server list\n foreach ($this->servers as $server_id => $server) {\n /* @var $server \\GameQ\\Server */\n\n // Invoke the beforeSend method\n $server->protocol()->beforeSend($server);\n\n // Get all the non-challenge packets we need to send\n $packets = $server->protocol()->getPacket('!' . Protocol::PACKET_CHALLENGE);\n\n if (count($packets) == 0) {\n // Skip nothing else to do for some reason.\n continue;\n }\n\n // Try to use an existing socket\n if (($socket = $server->socketGet()) === null) {\n // Let's make a clone of the query class\n $socket = clone $this->query;\n\n // Set the information for this query socket\n $socket->set(\n $server->protocol()->transport(),\n $server->ip,\n $server->port_query,\n $this->timeout\n );\n }\n\n try {\n // Iterate over all the packets we need to send\n foreach ($packets as $packet_data) {\n // Now write the packet to the socket.\n $socket->write($packet_data);\n\n // Let's sleep shortly so we are not hammering out calls rapid fire style\n usleep($this->write_wait);\n }\n\n unset($packets);\n\n // Add the socket information so we can reference it easily\n $sockets[(int)$socket->get()] = [\n 'server_id' => $server_id,\n 'socket' => $socket,\n ];\n } catch (QueryException $e) {\n // Check to see if we are in debug, if so bubble up the exception\n if ($this->debug) {\n throw new \\Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n break;\n }\n\n // Clean up the sockets, if any left over\n $server->socketCleanse();\n }\n\n // Now we need to listen for and grab response(s)\n $responses = call_user_func_array(\n [$this->query, 'getResponses'],\n [$sockets, $this->timeout, $this->stream_timeout]\n );\n\n // Iterate over the responses\n foreach ($responses as $socket_id => $response) {\n // Back out the server_id\n $server_id = $sockets[$socket_id]['server_id'];\n\n // Grab the server instance\n /* @var $server \\GameQ\\Server */\n $server = $this->servers[$server_id];\n\n // Save the response from this packet\n $server->protocol()->packetResponse($response);\n\n unset($server);\n }\n\n // Now we need to close all of the sockets\n foreach ($sockets as $socketInfo) {\n /* @var $socket \\GameQ\\Query\\Core */\n $socket = $socketInfo['socket'];\n\n // Close the socket\n $socket->close();\n\n unset($socket);\n }\n\n unset($sockets);\n }", "title": "" }, { "docid": "b4192cc1b91388421bbe176b11acda68", "score": "0.4788015", "text": "function getStreak($user) {\r\n\trequire ('variables.php');\r\n\t$sql = \"SELECT winner, winner2, loser, loser2 from $gamestable \".\r\n\t\t\"where (winner = '$user' or winner2 = '$user' or loser = '$user' \".\r\n\t\t\"or loser2 = '$user') and deleted = 'no' \".\r\n\t\t\"order by game_id desc\";\r\n\t$result = mysql_query($sql);\r\n\t$num_rows = mysql_num_rows($result);\r\n\t$winner_losestreak = 0;\r\n\t$winner_winstreak = 0;\r\n\t$result_array = array ();\r\n\t$isWinstreak = true;\r\n\tfor ($i = 0; i < $num_rows; $i ++) {\r\n\t\t$row = mysql_fetch_array($result);\r\n\t\t$row_winner = $row['winner'];\r\n\t\t$row_loser = $row['loser'];\r\n\t\t$row_winner2 = $row['winner2'];\r\n\t\t$row_loser2 = $row['loser2'];\r\n\t\t$isDraw = $row['isDraw'];\r\n\t\tif ($i == 0) {\r\n\t\t\t$isWinstreak = ($row_winner == $user || $row_winner2 == $user);\r\n\t\t\tif ($isDraw > 0) {\r\n\t\t\t\tbreak;\r\n\t\t\t} else if ($isWinstreak) {\r\n\t\t\t\t$winner_winstreak ++;\r\n\t\t\t} else {\r\n\t\t\t\t$winner_losestreak ++;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif ($isWinstreak) {\r\n\t\t\t\tif (($row_winner == $user || $row_winner2 == $user) && $isDraw == 0) {\r\n\t\t\t\t\t$winner_winstreak ++;\r\n\t\t\t\t} else\r\n\t\t\t\t\tbreak;\r\n\t\t\t} else {\r\n\t\t\t\tif (($row_loser == $user || $row_loser2 == $user) && $isDraw == 0) {\r\n\t\t\t\t\t$winner_losestreak ++;\r\n\t\t\t\t} else\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn array ($winner_winstreak, $winner_losestreak);\r\n}", "title": "" }, { "docid": "494119f912dda98b020896e261ad7fda", "score": "0.47226188", "text": "public function storymonitizeonreq($userid, $sid){\n\t $query = $this->db->from('stories')->join('signup','stories.user_id = signup.user_id','left')\n\t ->where('stories.sid', $sid)->where('signup.monetisation','yes')->limit(1)->get();\n if($query->num_rows() > 0){\n return $this->db->where('stories.sid', $sid)->where('stories.user_id',$userid)\n ->update('stories', array('pay_story' => 'Y'));\n }else{ // check user moitized or not(followers + write stories)\n \t $language = $this->langshortname($this->uri->segment(1));\n \t $checkfollowwrite = $this->followwritecount($userid, $language);\n \t if($checkfollowwrite->num_rows() > 0){\n \t $usermonitizereq = $this->monitizeonreq($userid);\n \t return $this->db->where('stories.sid', $sid)->where('stories.user_id',$userid)\n \t ->update('stories', array('pay_story' => 'Y'));\n \t }\n }\n\t}", "title": "" }, { "docid": "0a93f4bc3f4e2c03631c4fbc8ae1ce6a", "score": "0.47220552", "text": "public function playMatches() {\n //Results are updated to the database\n \n }", "title": "" }, { "docid": "1c3ebc130870a74782d3039eea566b1b", "score": "0.4674148", "text": "function query() {\n $this->ensure_my_table();\n\n if (!empty($this->argument)) {\n // Add filter for the argument value\n $this->query->add_where('user_involved', \"$this->table_alias.sender\", $this->argument);\n $this->query->add_where('user_involved', \"$this->table_alias.recipient\", $this->argument);\n $this->query->set_where_group('OR', 'user_involved');\n }\n }", "title": "" }, { "docid": "d664d8c41a212e8a161d2e52b9a8825a", "score": "0.4641352", "text": "function steamming($filter)\r\n\t{\r\n\r\n\t\tforeach ($filter as $key => $value) \r\n\t\t{\r\n\t\t\t$stm[] = str_word_count($value, 1);\r\n\t\t}\r\n\r\n\t\tforeach ($stm as $key => $value) \r\n\t\t{\r\n\t\t\tforeach ($value as $key1 => $value1) \r\n\t\t\t{\r\n\t\t\t\t$stmm[$key][]= hapusakhiran(hapusawalan2(hapusawalan1(hapuspp(hapuspartikel($value1))))); \r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($stmm as $key => $value) \r\n\t\t{\r\n\t\t\t$steamming[]= implode(' ', $value); \r\n\t\t}\r\n\t\treturn $steamming;\r\n\t}", "title": "" }, { "docid": "51f8766e6df1cd39c83fb7e56e50743b", "score": "0.46249947", "text": "public function __construct()\n {\n $mixes = Mix::where(\"game_status\", 1)->get();\n foreach ($mixes as $mix) {\n $mix->getServer();\n $mix->getMap();\n if ($mix->server) {\n if ($mix->game_status == 1) {\n\n $messenger = $mix->checkServer();\n if (!$messenger) {\n $mix->resetGame(\"Сервер перестал отвечать на запросы.\");\n }\n\n $mix->getPlayers();\n\n foreach ($mix->players as $player) {\n if ($player->leaved == 1 && $player->banned == 0) {\n $user = User::find($player->user_id);\n\n $leave_time = $player->getLeaveTime();\n\n $nick = preg_replace(\"/[^a-zA-Zа-яА-Я0-9]+/\", \"\", $user->name);\n\n $nick = addslashes($nick);\n\n if ($leave_time == 300) {\n $player->banned = 1;\n $user->banned_until = Carbon::now()->addMinutes(10);\n $user->state = -1;\n $user->ban_reason = \"Выход из игры №\" . $mix->id;\n $user->save();\n $player->save();\n $messenger->send('say \"Игрок ' . $nick . ' заблокирован на 10 минут за выход из игры\"');\n $res = $mix->validateTeams();\n if ($res == 1) {\n $messenger->send('say \"Техническая победа для команды Team 1. Игра окончена.\"');\n $mix->changeStatus(2, [\"Техническая победа\", \"Техническое поражение\"], $res, \"16:0\", true, false);\n $mix->server->state = 0;\n $mix->server->save();\n } elseif ($res == 2) {\n $messenger->send('say \"Техническая победа для команды Team 2. Игра окончена.\"');\n $mix->changeStatus(2, [\"Техническая победа\", \"Техническое поражение\"], $res, \"0:16\", true, false);\n $mix->server->state = 0;\n $mix->server->save();\n }\n } else {\n if ($leave_time % 60 == 0) {\n $messenger->send('say \"У игрока ' . $nick . ' осталось ' . (300 - $leave_time) . ' секунд чтобы переподключиться\"');\n }\n if ($leave_time % 30 == 0) {\n $messenger->send('say \"Для паузы игры напишите !pause в чат.\"');\n }\n }\n Cache::put($mix->id . \"leave\" . $player->user_id, $leave_time, 60);\n }\n }\n }\n } else {\n $mix->changeStatus(-1, \"Технические неполадки на сервере(сервер не найден)\");\n }\n }\n }", "title": "" }, { "docid": "183f364f2ade391f35d7080ac700baa5", "score": "0.4622506", "text": "public function runCrawling()\n {\n $low = DB::Table('twitters')->min('tweet_id');\n $sentimen = \"positif\";\n for ($i=0; $i < 10; $i++) { \n $tw = $this->getTweets($low);\n if($i > 5) {\n $sentimen = \"positif\";\n }\n else {\n $sentimen = \"negatif\";\n }\n foreach ($tw->statuses as $key => $value) {\n $data['user_id'] = $value->user->id; // id tweet\n $data['username'] = $value->user->name;\n $data['tweet_id'] = $value->id; // id tweet\n $data['tweet'] = $value->full_text;\n $data['sentiment'] = $sentimen;\n\n // cek apakah id user belum ada di database\n $userId = DB::Table('twitters')->where('user_id', $value->user->id)->doesntExist();\n $tweetId = DB::Table('twitters')->where('tweet_id', $value->id)->doesntExist();\n if($userId && $tweetId) {\n $this->saveTweet($data);\n }\n \n\n if($low > $value->id) {\n $low = $value->id;\n }\n }\n\n }\n }", "title": "" }, { "docid": "daf60ddc0c4f51acf27261527fd65939", "score": "0.4612984", "text": "function _breakTieAdvanced( $teamList, $data ) {\n\n/* ... data declarations */\n $standingOrder = array();\n\n/* ... pull the information for this division out of growing arrays */\n foreach ($teamList as $teamID) {\n $divTeam['points'][$teamID] = $data['points'][$teamID];\n }\n\n/* ... first sort is by points */\n arsort( $divTeam['points'] );\n\n/* ... okay, so we start moving through the standings, place by place */\n $curPlace = 0;\n do {\n\n/* ... find out teams tied with points as the current place we are checking */\n $tiedTeams = $this->_findTiedTeams( $divTeam['points'], array_keys( $divTeam['points'] ), $curPlace );\n\n/* ... if we have tied teams, then we need to move through the tiebreaker levels */\n $tieBreakReason = \"\";\n $tieBroken = false;\n if (count( $tiedTeams ) > 1) {\n\n/* ... easiest to prepare by getting both head to head info we may use - records and run diff */\n list($h2hPoints, $h2hDiff) = $this->_getHeadToHeadDetails( $tiedTeams );\n\n/* ... first tiebreaker we'll try to apply is for head to head record */\n $points = array_values( $h2hPoints );\n if ($points[0] != $points[1]) {\n $tiedTeams = array_keys( $h2hPoints );\n $tieBroken = true;\n $tieBreakReason = \"Best head to head record\";\n }\n else {\n\n/* ... we still have teams tied so remove those teams that aren't at the top level from further tiebreaker evaluation */\n $tiedTeams = array();\n $topTeam = true;\n foreach ($h2hPoints as $teamID => $value) {\n if (!in_array( $teamID, $standingOrder )) { \n if ($topTeam) {\n $tiedTeams[] = $teamID;\n $valToMatch = $value;\n $topTeam = false;\n }\n elseif ($value == $valToMatch) {\n \t$tiedTeams[] = $teamID;\n }\n }\n }\n }\n\n/* ... second tiebreaker we'll apply is most wins overall */\n if (!$tieBroken) {\n foreach ($tiedTeams as $teamID) {\n $divTeam['wins'][$teamID] = $data['wins'][$teamID];\n }\n arsort( $divTeam['wins'] );\n $wins = array_values( $divTeam['wins'] );\n if ($wins[0] != $wins[1]) {\n $tiedTeams = array_keys( $divTeam['wins'] );\n $tieBroken = true;\n $tieBreakReason = \"Most overall wins\";\n }\n else {\n\n/* ... we still have teams tied so remove those teams that aren't at the top level from further tiebreaker evaluation */\n $tiedTeams = array();\n $topTeam = true;\n foreach ($divTeam['wins'] as $teamID => $value) {\n if (!in_array( $teamID, $standingOrder )) { \n if ($topTeam) {\n $tiedTeams[] = $teamID;\n $valToMatch = $value;\n $topTeam = false;\n }\n elseif ($value == $valToMatch) {\n \t$tiedTeams[] = $teamID;\n }\n }\n }\n }\n }\n\n/* ... third tiebreaker we'll apply is head to head run differential */\n if (!$tieBroken) {\n\n/* ... since we may have eliminated some teams in more than 3 team situations, we need to get the appropriate head to head run diff for teams left */\n list($h2hPoints, $h2hDiff) = $this->_getHeadToHeadDetails( $tiedTeams );\n $runDelta = array_values( $h2hDiff );\n if ($runDelta[0] != $runDelta[1]) {\n $tiedTeams = array_keys( $h2hDiff );\n $tieBroken = true;\n $tieBreakReason = \"Best head to head run differential\";\n }\n else {\n\n/* ... we still have teams tied so remove those teams that aren't at the top level from further tiebreaker evaluation */\n $tiedTeams = array();\n $topTeam = true;\n foreach ($h2hDiff as $teamID => $value) {\n if (!in_array( $teamID, $standingOrder )) { \n if ($topTeam) {\n $tiedTeams[] = $teamID;\n $valToMatch = $value;\n $topTeam = false;\n }\n elseif ($value == $valToMatch) {\n \t$tiedTeams[] = $teamID;\n }\n } \n }\n }\n }\n\n/* ... fourth tiebreaker we'll apply is better run differential overall */\n if (!$tieBroken) {\n foreach ($tiedTeams as $teamID) {\n $divTeam['runsDiff'][$teamID] = $data['runsFor'][$teamID] - $data['runsAga'][$teamID];\n }\n arsort( $divTeam['runsDiff'] );\n $runDelta = array_values( $divTeam['runsDiff'] );\n if ($runDelta[0] != $runDelta[1]) {\n $tiedTeams = array_keys( $divTeam['runsDiff'] );\n $tieBroken = true;\n $tieBreakReason = \"Best overall run differential\";\n }\n }\n\n }\n else {\n/* ... no team with same number of points - so easy to make the following declaration */\n $tieBroken = true;\n }\n\n/* ... did we break the tie? */\n if ($tieBroken) {\n\n/* ... the team at the top of the list is the team we put as our team in that standing's spot */\n $standingOrder[$curPlace] = $tiedTeams[0];\n $data['tiebreaks'][$tiedTeams[0]] = $tieBreakReason;\n $divTeam['points'][$tiedTeams[0]] = 100; // Set the points to a high value to float the team out of further tiebreaker review \n $curPlace++;\n }\n else {\n/* ... we have teams tied that we couldn't order automatically, so note them each as requiring some form of manual tiebreak */\n foreach ($tiedTeams as $teamID) {\n $standingOrder[$curPlace] = $teamID;\n $data['tiebreaks'][$teamID] = \"Coin toss required\";\n $divTeam['points'][$teamID] = 100;\n $curPlace++;\n }\n }\n\n arsort( $divTeam['points'] );\n }\n while ($curPlace < count( $teamList ));\n\n/* ... time to go */\n return( array( $standingOrder, $data['tiebreaks'] ) );\n }", "title": "" }, { "docid": "c0a9ee343df7f49f535c13fd6aa15724", "score": "0.45997554", "text": "function spam_filters($imap_stream) {\n global $data_dir, $username, $uid_support;\n global $SpamFilters_YourHop;\n global $SpamFilters_DNScache;\n global $SpamFilters_SharedCache;\n global $SpamFilters_BulkQuery;\n\n $filters_spam_scan = getPref($data_dir, $username, 'filters_spam_scan');\n $filters_spam_folder = getPref($data_dir, $username, 'filters_spam_folder');\n $filters = load_spam_filters();\n\n if ($SpamFilters_SharedCache) {\n filters_LoadCache();\n }\n\n $run = false;\n\n foreach ($filters as $Key => $Value) {\n if ($Value['enabled']) {\n $run = true;\n break;\n }\n }\n\n // short-circuit\n if (!$run) {\n return;\n }\n\n sqimap_mailbox_select($imap_stream, 'INBOX');\n\n $search_array = array();\n if ($filters_spam_scan == 'new') {\n $read = sqimap_run_command($imap_stream, 'SEARCH UNSEEN', true, $response, $message, $uid_support);\n if (isset($read[0])) {\n for ($i = 0, $iCnt = count($read); $i < $iCnt; ++$i) {\n if (preg_match(\"/^\\* SEARCH (.+)$/\", $read[$i], $regs)) {\n $search_array = explode(' ', trim($regs[1]));\n break;\n }\n }\n }\n }\n\n if ($filters_spam_scan == 'new' && count($search_array)) {\n $msg_str = sqimap_message_list_squisher($search_array);\n $imap_query = 'FETCH ' . $msg_str . ' (FLAGS BODY.PEEK[HEADER.FIELDS (RECEIVED)])';\n } else if ($filters_spam_scan != 'new') {\n $imap_query = 'FETCH 1:* (FLAGS BODY.PEEK[HEADER.FIELDS (RECEIVED)])';\n } else {\n return;\n }\n\n $read = sqimap_run_command_list($imap_stream, $imap_query, true, $response, $message, $uid_support);\n\n if (isset($response) && $response != 'OK') {\n return;\n }\n\n $messages = parseFetch($read);\n\n $bulkquery = (strlen($SpamFilters_BulkQuery) > 0 ? true : false);\n $aSpamIds = array();\n foreach($messages as $id=>$message) {\n if (isset($message['UID'])) {\n $MsgNum = $message['UID'];\n } else {\n $MsgNum = $id;\n }\n\n if (isset($message['received'])) {\n foreach($message['received'] as $received) {\n if (is_int(strpos($received, $SpamFilters_YourHop))) {\n if (preg_match('/([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})/', $received, $matches)) {\n $IsSpam = false;\n if (filters_spam_check_site($matches[1], $matches[2], $matches[3], $matches[4], $filters)) {\n $aSpamIds[] = $MsgNum;\n $IsSpam = true;\n }\n\n if ($bulkquery) {\n array_shift($matches);\n $IP = explode('.', $matches);\n foreach ($filters as $key => $value) {\n if ($filters[$key]['enabled'] && $filters[$key]['dns']) {\n if (strlen($SpamFilters_DNScache[$IP . '.' . $filters[$key]['dns']]) == 0) {\n $IPs[$IP] = true;\n break;\n }\n }\n }\n }\n // If we've checked one IP and YourHop is\n // just a space\n if ($SpamFilters_YourHop == ' ' || $IsSpam) {\n break; // don't check any more\n }\n }\n }\n }\n }\n }\n // Lookie! It's spam! Yum!\n if (count($aSpamIds) && sqimap_mailbox_exists($imap_stream, $filters_spam_folder)) {\n sqimap_msgs_list_move($imap_stream, $aSpamIds, $filters_spam_folder);\n sqimap_mailbox_expunge($imap_stream, 'INBOX', true, $aSpamIds);\n }\n\n if ($bulkquery && count($IPs)) {\n filters_bulkquery($filters, $IPs);\n }\n\n if ($SpamFilters_SharedCache) {\n filters_SaveCache();\n } else {\n sqsession_register($SpamFilters_DNScache, 'SpamFilters_DNScache');\n }\n}", "title": "" }, { "docid": "0e921afa41a8e405a39c4b2f197470f1", "score": "0.45944703", "text": "function _standings() {\n\n/* ... data declarations */\n $data = array();\n $positions = array();\n \n/* ... we'll determine each division on it's own - so get the list of divisions */\n $divList = $this->Model_Team->getListOfDivisions();\n foreach ($divList as $curDivision) {\n\n/* ... step 1: get the team IDs in the current division */\n $teamList = $this->Model_Team->getTeamsInDivision( $curDivision );\n\n/* ... step 2: get the list of games for all teams in the division */\n $schedDetails = $this->Model_Schedule->getScheduleDetails( $curDivision );\n\n/* ... step 3: initialize our data collection array to zero */\n foreach ($teamList as $teamID) {\n $data['wins'][$teamID] = 0;\n $data['losses'][$teamID] = 0;\n $data['ties'][ $teamID] = 0;\n $data['runsFor'][$teamID] = 0;\n $data['runsAga'][$teamID] = 0;\n }\n\n/* ... step 4: go through the games and record the appropriate results for the games played */\n for ($i = 0; $i < count( $schedDetails ); $i++) {\n if ($schedDetails[$i]['Status'] == \"PLAYED\") {\n $this->_processGameResult( $schedDetails[$i], $data );\n }\n }\n\n/* ... step 5: determine the number of points each team has */\n foreach ($teamList as $teamID) {\n $data['points'][$teamID] = 2 * $data['wins'][$teamID] + $data['ties'][$teamID];\n }\n\n/* ... step 6: determine which tiebreaker formula we are to use and then use it to get a standings order */\n if ($this->config->item( 'my_tiebreakerFormula' ) == \"ADVANCED\") {\n list( $positions[$curDivision], $data['tiebreaks'][$curDivision] ) = $this->_breakTieAdvanced( $teamList, $data );\n }\n else {\n $positions[$curDivision] = $this->_breakTieBasic( $teamList, $data );\n }\n\n }\n\n/* ... time to go */\n return( array( $data, $positions ) );\n }", "title": "" }, { "docid": "958274325127a537d65d9fcfc53be772", "score": "0.4579864", "text": "function doWarTruce(&$objWinAlli, &$objSuxAlli)\n{\n global $orkTime;\n\n $winner = $objWinAlli->get_allianceid();\n $looser = $objSuxAlli->get_allianceid();\n\n // Clear events\n $iEventid1 = $objWinAlli->get_war('event_id');\n $iEventid2 = $objSuxAlli->get_war('event_id');\n clearEvents($iEventid1, $iEventid2);\n\n // Get game hours\n require_once('inc/classes/clsGame.php');\n $objGame = new clsGame();\n $arrGameTime = $objGame->get_game_times();\n\n // M: Update winner alli\n $arrWinWar = $objWinAlli->get_wars();\n $arrNewWinWar = array(\n 'target' => 0,\n 'last_target' => $looser,\n 'last_outgoing' => 'truce',\n 'last_end' => $arrGameTime['hour_counter'],\n 'truce' => $arrWinWar['truce'] + 1,\n 'event_id' => ''\n );\n $objWinAlli->set_wars($arrNewWinWar);\n\n // M: Update looser alli\n $arrSuxWar = $objSuxAlli->get_wars();\n $arrNewSuxWar = array(\n 'target' => 0,\n 'last_target' => $winner,\n 'last_outgoing' => 'truce',\n 'last_end' => $arrGameTime['hour_counter'],\n 'truce' => $arrSuxWar['truce'] + 1,\n 'event_id' => ''\n );\n $objSuxAlli->set_wars($arrNewSuxWar);\n\n // News for winner, looser and global\n mysql_query(\"INSERT INTO news (id, time, ip, type, duser, ouser, result, text, kingdom_text, kingdoma, kingdomb) VALUES ('', '$orkTime', '---', 'war-end', '0', '0', '1', '', '<strong class=\\\"positive\\\">We have truced with alliance #$looser.</strong>', '$winner', '')\");\n mysql_query(\"INSERT INTO news (id, time, ip, type, duser, ouser, result, text, kingdom_text, kingdoma, kingdomb) VALUES ('', '$orkTime', '---', 'war-end', '0', '0', '1', '', '<strong class=\\\"positive\\\">We have truced with alliance #$winner.</strong>', '$looser', '')\");\n mysql_query(\"INSERT INTO news (id, time, ip, type, duser, ouser, result, text, kingdom_text, kingdoma, kingdomb) VALUES ('', '$orkTime', '---', 'global', '0', '0', '1', '', '<strong>Alliance #$winner and #$looser ended their war with a truce.</strong>', '0', '')\");\n}", "title": "" }, { "docid": "adee7e9516e529a8b913f92854d076d9", "score": "0.45665056", "text": "function query() {}", "title": "" }, { "docid": "72a3e9817eff34d6b000b2ddab5a321e", "score": "0.45433214", "text": "public function prepareQuery() {\n error_log('Environment: ' . $this->environment);\n error_log('Original Query: ' . $this->query);\n $thetime = time();\n $this->query = str_replace('{{now}}', date('Ymd', $thetime), $this->query);\n $this->query = str_replace('{{tomorrow}}', date('Ymd', $thetime+86400), $this->query);\n $this->query = str_replace('{{yesterday}}', date('Ymd', $thetime-86400), $this->query);\n $this->query = str_replace('{{nextweek}}', date('Ymd', $thetime+604800), $this->query);\n $this->query = str_replace('{{lastweek}}', date('Ymd', $thetime-604800), $this->query);\n $this->query = str_replace('{{nextmonth}}', date('Ymd', $thetime+2592000), $this->query);\n $this->query = str_replace('{{lastmonth}}', date('Ymd', $thetime-2592000), $this->query);\n error_log('Query after Replacers: ' . $this->query);\n if($this->sticky) {\n if($this->sticky_posts === false) {\n $this->sticky_posts = get_option('sticky_posts');\n }\n if(count($this->sticky_posts)) {\n $this->query .= '&post__in{}=' . implode('&post__in{}=', (array) $this->sticky_posts);\n }\n }\n error_log('Query after Sticky: ' . $this->query);\n // Setup the recalled environment ids\n $recalled_environments = '0';\n if($this->recall_environment) {\n if(strpos($this->recall_environment, ',') !== false) {\n $to_recall = explode(',', $this->recall_environment);\n } else {\n $to_recall = array($this->recall_environment);\n }\n foreach($to_recall as $key) {\n if(isset($this->environments[$key])) {\n $recalled_environments .= ','\n . implode(',', $this->environments[$key]);\n }\n }\n }\n $this->query = str_replace('{{environment}}', $recalled_environments, $this->query);\n if($this->recall_environment_type) {\n $environments = explode(',', $recalled_environments);\n foreach($environments as $id) {\n $this->query .= '&' . $this->recall_environment_type . '[]=' . $id;\n }\n }\n error_log('Query after Recalled Environments: ' . $this->query);\n // Allows you to use URL encoding by surrounding those statements in {{stuffhere}}\n $this->query = preg_replace_callback(\n \"/({{)([^}}]+)(}})/\",\n function($matches) {\n return urlencode($matches[2]);\n },\n $this->query);\n error_log('Query after Preg: ' . $this->query);\n // This allows you to use brackets in your query by using curly braces instead\n $this->query = str_replace(array('{','}'),array('[',']'), $this->query);\n // This makes sure your &s don't get converted to hex, and that your query doesn't\n // get surrounded with quotes (as happens for mysterious WP reasons)\n $this->query = html_entity_decode($this->query);\n $this->query = str_replace(array('”', '″'), '', $this->query);\n error_log('Final Query: ' . $this->query);\n }", "title": "" }, { "docid": "d6d4f941cc3906b092376650d927fc90", "score": "0.45431447", "text": "public function testStatisticsByStrategiesFilteredByGameParams()\n {\n $gameParamsFilters = $this->createRandomGameParamsFilters();\n $formatter = $this->getFormatterService();\n $faker = Factory::create();\n $filtersKeys = array_keys($gameParamsFilters);\n $randomKey1 = $faker->randomElement($filtersKeys);\n $randomKey2 = $faker->randomElement($filtersKeys);\n $randomKey3 = $faker->randomElement($filtersKeys);\n unset($gameParamsFilters[$randomKey1], $gameParamsFilters[$randomKey2], $gameParamsFilters[$randomKey3]);\n\n // 2. Get filtered by dates statistics from DB\n $statisticsFromDBQuery = $this->entityManager->createQueryBuilder()\n ->from(GameResult::class, 'gr')\n ->select([\n 's.id',\n 's.name AS strategy',\n 'SUM(gr.result)/SUM(g.rounds) AS bales',\n 'COUNT(gr.game) AS gamesCount',\n 'SUM(g.rounds) AS roundsCount',\n ])\n ->innerJoin('gr.game', 'g')\n ->innerJoin('gr.strategy', 's')\n ->where('g.user = :user')\n ->setParameter('user', $this->getRandomUser())\n ->groupBy('strategy')\n ->orderBy('bales', 'DESC')\n ->addOrderBy('s.id', 'ASC')\n ;\n $this->addFiltersToQuery($statisticsFromDBQuery, $gameParamsFilters);\n $statisticsFromDB = [];\n foreach ($statisticsFromDBQuery->getQuery()->getArrayResult() as $stats) {\n $statisticsFromDB[] = array_merge($stats, [\n 'bales' => $formatter->toFloat($stats['bales']),\n 'gamesCount' => $formatter->toInt($stats['gamesCount']),\n 'roundsCount' => $formatter->toInt($stats['roundsCount']),\n ]);\n }\n\n // 3. Enable Doctrine dates filters\n $this->enableDoctrineFilters($gameParamsFilters, 'game_');\n\n // 4. Get filtered statistics from Service\n $statisticsFromService = $this->getStatisticsService()->getStatisticsByStrategies($this->getRandomUser());\n\n // 5. Compare statistics from DB and statistics from service - they must be equals\n $this->assertEquals($statisticsFromDB, $statisticsFromService, sprintf('Test %s failed. Filtered statistics from DB and from service are not much. Filters: %s',\n 'total_statistics_by_strategies_filtered_by_game_params', json_encode($gameParamsFilters)));\n }", "title": "" }, { "docid": "c1922463989149ed054f353b32f7247d", "score": "0.454256", "text": "public function topScorers()\n {\n echo \"Starting get topScorers day ... \" . date(\"Y-m-d\") . \"............. \\n\";\n $league_cron = array_merge(loadLeague(), loadFavoriteLeagueCup());\n $this->db->trans_start();\n foreach ($league_cron as $league_data) {\n $league = $league_data->id;\n try {\n $allTop = $this->sportradar->getTopScores($league);\n if ($allTop) {\n $this->db->trans_start();\n\n // delete league data exits\n\n $this->mdl_top_scorers->where('league_id', $league)->delete();\n\n foreach ($allTop->top_goals as $key => $top) {\n $top = (object)$top;\n $teamId = str_replace('sr:competitor:', '', $top->team['id']);\n $playerId = str_replace('sr:player:', '', $top->player['id']);\n $existPlayer = $this->mdl_players->where('player_id', $playerId)->get();\n $existTeam = $this->mdl_teams->where('team_id', $teamId)->get();\n if ($existTeam && $existPlayer) {\n // insert new data\n $insert_data = array(\n 'season_id' => 1,\n 'league_id' => str_replace('sr:tournament:', '', $allTop->tournament['id']),\n 'team_id' => $teamId,\n 'team_name' => $top->team['name'],\n 'name' => $this->mdl_players->where('player_id', $playerId)->get()->name,\n 'rank' => $top->rank,\n 'alias' => slug(trim($top->player['name'])),\n 'nationality' => $this->mdl_players->where('player_id', $playerId)->get()->nationality,\n 'goals' => $top->goals,\n );\n $this->mdl_top_scorers->insert($insert_data);\n echo \"Insert done Cau thu \" . $top->player['name'] . \" \\n\";\n }\n }\n $this->db->trans_complete();\n } else {\n echo \"No data topScorers \\n\";\n }\n } catch (Exception $e) {\n echo \"XMLSoccerException: \" . $e->getMessage();\n }\n }\n $this->db->trans_complete();\n if ($this->db->trans_status() === false) {\n log_message('error', 'Cant not trans_complete for topScorers' . date(\"Y-m-d\"));\n }\n echo \"Hoàn tất lấy Vua phá lướt \\n\";\n log_message('info', 'Done all topScorers()' . date(\"Y-m-d\"));\n log_message('info', '100% Done all cron Job Step 4 ' . date(\"Y-m-d\"));\n exit();\n }", "title": "" }, { "docid": "d6355d9a469f58b0c91fbe4a023b4276", "score": "0.4534215", "text": "public function index()\n {\n //getting the active ranks\n $clansActiveRank = Rank::where('game_mode', 'TM')->where('is_active', 1)->first();\n $playersActiveRank = Rank::where('game_mode', 'DM')->where('is_active', 1)->first();\n\n //formatting date in readable string\n $clanRankStart = latinDateFormat($clansActiveRank->start);\n $clanRankEnd = latinDateFormat($clansActiveRank->end);\n $playerRankStart = latinDateFormat($playersActiveRank->start);\n $playerRankEnd = latinDateFormat($playersActiveRank->end);\n\n //how long it will take to finish the rank from now\n $clanDaysLeft = daysDiff($clansActiveRank->end, Carbon::now());\n $playerDaysLeft = daysDiff($playersActiveRank->end, Carbon::now());\n\n //how long the ranked is going to take from beginner to end\n $clanTotalDays = daysDiff($clansActiveRank->start, $clansActiveRank->end);\n $playerTotalDays = daysDiff($playersActiveRank->start, $playersActiveRank->end);\n\n //rank progress in percentage\n $clanRankPercent = percentFromTotal($clanTotalDays - $clanDaysLeft, $clanTotalDays);\n $playerRankPercent = percentFromTotal($playerTotalDays - $playerDaysLeft, $playerTotalDays);\n\n //get all the validated matches published\n $playerGames = GameMatch::where('game_mode', 'DM')\n ->where('rank_id', $playersActiveRank->id)\n ->where('is_validated', 1)\n ->get();\n $clanGames= GameMatch::where('game_mode', 'TM')\n ->where('rank_id', $clansActiveRank->id)\n ->where('is_validated', 1)\n ->get();\n\n $clanGames = count($clanGames);\n $playerGames = count($playerGames);\n\n $activeClans = MatchHistory::where('rank_id', $clansActiveRank->id)\n ->where(function($query){\n $query->where('wins', '>', 0)\n ->orWhere('losses', '>', 0)\n ->orWhere('draws', '>', 0);\n })->get();\n\n $activePlayers = MatchHistory::where('rank_id', $playersActiveRank->id)\n ->where(function($query){\n $query->where('wins', '>', 0)\n ->orWhere('losses', '>', 0)\n ->orWhere('draws', '>', 0);\n })->get();\n $activeClans = count($activeClans);\n $activePlayers = count($activePlayers);\n\n return view('pages.rank.season.index', [\n 'clansActiveRank' => $clansActiveRank,\n 'playersActiveRank' => $playersActiveRank,\n 'activeClans' => $activeClans,\n 'activePlayers' => $activePlayers,\n 'clanGames' => $clanGames,\n 'playerGames' => $playerGames,\n 'clanRankStart' => $clanRankStart,\n 'clanRankEnd' => $clanRankEnd,\n 'playerRankStart' => $playerRankStart,\n 'playerRankEnd' => $playerRankEnd,\n 'playerDaysLeft' => $playerDaysLeft,\n 'clanDaysLeft' => $clanDaysLeft,\n 'clanTotalDays' => $clanTotalDays,\n 'playerTotalDays' => $playerTotalDays,\n 'playerRankPercent' => $playerRankPercent,\n 'clanRankPercent' => $clanRankPercent\n ]);\n }", "title": "" }, { "docid": "ff59cf0c70868f66e1270a68519f195e", "score": "0.4532453", "text": "public function executeBestStories( $request ) {\n $this->setLayout(\"layout.stream\");\n\n $value = $this->getRequest()->getParameter(\"value\", 604800);\n\n $sf = new yiggStoryFinder();\n $user = $this->session->getUser();\n\n if (false !== $user) {\n $sf->confineWithMarkedForFrontpage($user->id);\n } else {\n $sf->confineWithMarkedForFrontpage();\n }\n\n $sf->confineWithStoryFilter($value);\n $sf->sortByYTTCS();\n\n $query = $sf->getQuery();\n $query->groupBy(\"s.id\");\n\n $this->value = $value;\n $this->limit = 10;\n $this->stories = $this->setPagerQuery($query)->execute();\n\n $this->storyCount = count($this->stories->getKeys());\n if ( $this->storyCount > 0 ) {\n $this->populateStoryAttributeCache();\n }\n if ($this->getRequest()->getParameter(\"sf_format\") !== \"atom\") {\n $this->getResponse()->setSlot('sponsoring', $this->getComponent(\"sponsoring\",\"sponsoring\", array( 'place_id' => 1 ,'limit' => 1)));\n }\n\n $this->getResponse()->setTitle('Die besten Nachrichten von heute');\n return sfView::SUCCESS;\n }", "title": "" }, { "docid": "27ff5312cada8026f1c0e676704ee392", "score": "0.45286334", "text": "private function set_seo_filters( &$query ) {\n\t\t$filter = Param::get( 'seo-filter' );\n\t\tif ( false === $filter ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$hash = [\n\t\t\t'empty-fk' => [\n\t\t\t\t'key' => 'rank_math_focus_keyword',\n\t\t\t\t'compare' => 'NOT EXISTS',\n\t\t\t],\n\t\t\t'bad-seo' => [\n\t\t\t\t'key' => 'rank_math_seo_score',\n\t\t\t\t'value' => 50,\n\t\t\t\t'compare' => '<=',\n\t\t\t\t'type' => 'numeric',\n\t\t\t],\n\t\t\t'good-seo' => [\n\t\t\t\t'key' => 'rank_math_seo_score',\n\t\t\t\t'value' => [ 51, 80 ],\n\t\t\t\t'compare' => 'BETWEEN',\n\t\t\t\t'type' => 'numeric',\n\t\t\t],\n\t\t\t'great-seo' => [\n\t\t\t\t'key' => 'rank_math_seo_score',\n\t\t\t\t'value' => 80,\n\t\t\t\t'compare' => '>',\n\t\t\t\t'type' => 'numeric',\n\t\t\t],\n\t\t\t'noindexed' => [\n\t\t\t\t'key' => 'rank_math_robots',\n\t\t\t\t'value' => 'noindex',\n\t\t\t\t'compare' => 'LIKE',\n\t\t\t],\n\t\t];\n\n\t\t// Extra conditions for \"SEO Score\" filters.\n\t\t$seo_score_filters = [ 'bad-seo', 'good-seo', 'great-seo' ];\n\t\tif ( in_array( $filter, $seo_score_filters, true ) ) {\n\t\t\t$query['relation'] = 'AND';\n\t\t\t$query[] = [\n\t\t\t\t'key' => 'rank_math_robots',\n\t\t\t\t'value' => 'noindex',\n\t\t\t\t'compare' => 'NOT LIKE',\n\t\t\t];\n\t\t\t$query[] = [\n\t\t\t\t'key' => 'rank_math_focus_keyword',\n\t\t\t\t'compare' => 'EXISTS',\n\t\t\t];\n\t\t\t$query[] = [\n\t\t\t\t'key' => 'rank_math_focus_keyword',\n\t\t\t\t'value' => '',\n\t\t\t\t'compare' => '!=',\n\t\t\t];\n\t\t}\n\n\t\tif ( isset( $hash[ $filter ] ) ) {\n\t\t\t$query[] = $hash[ $filter ];\n\t\t}\n\t}", "title": "" }, { "docid": "6fcb7e8763a12faaf5b5775260ee10fe", "score": "0.45120707", "text": "function GetTeamsInSidePool($week) \n {\n $query = \"SELECT * FROM $this->tableName WHERE InPot='1' AND week='$week' ORDER BY Points DESC\";\n parent::SetQuery($query);\n parent::DoQuery();\n }", "title": "" }, { "docid": "a411979215a1efa092924f64c32804cd", "score": "0.44976524", "text": "function processtweets($tweetbucket) {\n\n if (CAPTURE == \"track\") {\n $querybins = getActiveTrackBins();\n } elseif (CAPTURE == \"follow\") {\n $querybins = getActiveFollowBins();\n } elseif (CAPTURE == \"onepercent\") {\n $querybins = getActiveOnepercentBin();\n }\n\n // we run through every bin to check whether the received tweets fit\n foreach ($querybins as $binname => $queries) {\n $list_tweets = array();\n $list_hashtags = array();\n $list_urls = array();\n $list_mentions = array();\n\n // running through every single tweet\n foreach ($tweetbucket as $data) {\n\n if (!array_key_exists('entities', $data)) {\n\n // unexpected/irregular tweet data\n if (array_key_exists('delete', $data)) {\n // a tweet has been deleted. @todo: process\n continue;\n }\n\n // this can get very verbose when repeated?\n logit(CAPTURE . \".error.log\", \"irregular tweet data received.\");\n continue;\n }\n\n $found = false;\n\n if (CAPTURE == \"track\") {\n\n // we check for every query in the bin if they fit\n\n foreach ($queries as $query => $track) {\n\n $pass = false;\n\n // check for queries with more than one word, but go around quoted queries\n if (preg_match(\"/ /\", $query) && !preg_match(\"/'/\", $query)) {\n $tmplist = explode(\" \", $query);\n\n $all = true;\n\n foreach ($tmplist as $tmp) {\n if (!preg_match(\"/\" . $tmp . \"/i\", $data[\"text\"])) {\n $all = false;\n break;\n }\n }\n\n // only if all words are found\n if ($all == true) {\n $pass = true;\n }\n } else {\n\n // treat quoted queries as single words\n $query = preg_replace(\"/'/\", \"\", $query);\n\n if (preg_match(\"/\" . $query . \"/i\", $data[\"text\"])) {\n $pass = true;\n }\n }\n\n // at the first fitting query, we break\n if ($pass == true) {\n $found = true;\n break;\n }\n }\n } elseif (CAPTURE == \"follow\") {\n\n // we check for every query in the bin if they fit\n $found = in_array($data[\"user\"][\"id\"], $queries) ? TRUE : FALSE;\n } elseif (CAPTURE == \"onepercent\") {\n\n // always match in onepercent\n $found = true;\n }\n\n // if the tweet does not fit in the current bin, go to the next tweet\n if ($found == false) {\n continue;\n }\n\n $t = array();\n $t[\"id\"] = $data[\"id_str\"];\n $t[\"created_at\"] = date(\"Y-m-d H:i:s\", strtotime($data[\"created_at\"]));\n $t[\"from_user_name\"] = addslashes($data[\"user\"][\"screen_name\"]);\n $t[\"from_user_id\"] = $data[\"user\"][\"id_str\"];\n $t[\"from_user_lang\"] = $data[\"user\"][\"lang\"];\n $t[\"from_user_tweetcount\"] = $data[\"user\"][\"statuses_count\"];\n $t[\"from_user_followercount\"] = $data[\"user\"][\"followers_count\"];\n $t[\"from_user_friendcount\"] = $data[\"user\"][\"friends_count\"];\n $t[\"from_user_listed\"] = $data[\"user\"][\"listed_count\"];\n $t[\"from_user_realname\"] = addslashes($data[\"user\"][\"name\"]);\n $t[\"from_user_utcoffset\"] = $data[\"user\"][\"utc_offset\"];\n $t[\"from_user_timezone\"] = addslashes($data[\"user\"][\"time_zone\"]);\n $t[\"from_user_description\"] = addslashes($data[\"user\"][\"description\"]);\n $t[\"from_user_url\"] = addslashes($data[\"user\"][\"url\"]);\n $t[\"from_user_verified\"] = $data[\"user\"][\"verified\"];\n $t[\"from_user_profile_image_url\"] = $data[\"user\"][\"profile_image_url\"];\n $t[\"source\"] = addslashes($data[\"source\"]);\n $t[\"location\"] = addslashes($data[\"user\"][\"location\"]);\n $t[\"geo_lat\"] = 0;\n $t[\"geo_lng\"] = 0;\n if ($data[\"geo\"] != null) {\n $t[\"geo_lat\"] = $data[\"geo\"][\"coordinates\"][0];\n $t[\"geo_lng\"] = $data[\"geo\"][\"coordinates\"][1];\n }\n $t[\"text\"] = addslashes($data[\"text\"]);\n $t[\"retweet_id\"] = null;\n if (isset($data[\"retweeted_status\"])) {\n $t[\"retweet_id\"] = $data[\"retweeted_status\"][\"id_str\"];\n }\n $t[\"to_user_id\"] = $data[\"in_reply_to_user_id_str\"];\n $t[\"to_user_name\"] = addslashes($data[\"in_reply_to_screen_name\"]);\n $t[\"in_reply_to_status_id\"] = $data[\"in_reply_to_status_id_str\"];\n $t[\"filter_level\"] = $data[\"filter_level\"];\n\n $list_tweets[] = \"('\" . implode(\"','\", $t) . \"')\";\n\n\n if (count($data[\"entities\"][\"hashtags\"]) > 0) {\n foreach ($data[\"entities\"][\"hashtags\"] as $hashtag) {\n $h = array();\n $h[\"tweet_id\"] = $t[\"id\"];\n $h[\"created_at\"] = $t[\"created_at\"];\n $h[\"from_user_name\"] = $t[\"from_user_name\"];\n $h[\"from_user_id\"] = $t[\"from_user_id\"];\n $h[\"text\"] = addslashes($hashtag[\"text\"]);\n\n $list_hashtags[] = \"('\" . implode(\"','\", $h) . \"')\";\n }\n }\n\n if (count($data[\"entities\"][\"urls\"]) > 0) {\n foreach ($data[\"entities\"][\"urls\"] as $url) {\n $u = array();\n $u[\"tweet_id\"] = $t[\"id\"];\n $u[\"created_at\"] = $t[\"created_at\"];\n $u[\"from_user_name\"] = $t[\"from_user_name\"];\n $u[\"from_user_id\"] = $t[\"from_user_id\"];\n $u[\"url\"] = $url[\"url\"];\n $u[\"url_expanded\"] = addslashes($url[\"expanded_url\"]);\n\n $list_urls[] = \"('\" . implode(\"','\", $u) . \"')\";\n }\n }\n\n if (count($data[\"entities\"][\"user_mentions\"]) > 0) {\n foreach ($data[\"entities\"][\"user_mentions\"] as $mention) {\n $m = array();\n $m[\"tweet_id\"] = $t[\"id\"];\n $m[\"created_at\"] = $t[\"created_at\"];\n $m[\"from_user_name\"] = $t[\"from_user_name\"];\n $m[\"from_user_id\"] = $t[\"from_user_id\"];\n $m[\"to_user\"] = $mention[\"screen_name\"];\n $m[\"to_user_id\"] = $mention[\"id_str\"];\n\n $list_mentions[] = \"('\" . implode(\"','\", $m) . \"')\";\n }\n }\n }\n\n // use insert delayed\n $delayed = (defined('USE_INSERT_DELAYED') && USE_INSERT_DELAYED) ? 'DELAYED' : '';\n\n // distribute tweets into bins\n if (count($list_tweets) > 0) {\n\n $sql = \"INSERT $delayed IGNORE INTO \" . $binname . \"_tweets (id,created_at,from_user_name,from_user_id,from_user_lang,from_user_tweetcount,from_user_followercount,from_user_friendcount,from_user_listed,from_user_realname,from_user_utcoffset,from_user_timezone,from_user_description,from_user_url,from_user_verified,from_user_profile_image_url,source,location,geo_lat,geo_lng,text,retweet_id,to_user_id,to_user_name,in_reply_to_status_id,filter_level) VALUES \" . implode(\",\", $list_tweets);\n\n $sqlresults = mysql_query($sql);\n if (!$sqlresults) {\n logit(CAPTURE . \".error.log\", \"insert error: \" . $sql);\n } elseif (database_activity()) {\n $pid = getmypid();\n file_put_contents(BASE_FILE . \"proc/\" . CAPTURE . \".procinfo\", $pid . \"|\" . time());\n }\n }\n\n if (count($list_hashtags) > 0) {\n\n $sql = \"INSERT $delayed IGNORE INTO \" . $binname . \"_hashtags (tweet_id,created_at,from_user_name,from_user_id,text) VALUES \" . implode(\",\", $list_hashtags);\n\n $sqlresults = mysql_query($sql);\n if (!$sqlresults) {\n logit(CAPTURE . \".error.log\", \"insert error: \" . $sql);\n }\n }\n\n if (count($list_urls) > 0) {\n\n $sql = \"INSERT $delayed IGNORE INTO \" . $binname . \"_urls (tweet_id,created_at,from_user_name,from_user_id,url,url_expanded) VALUES \" . implode(\",\", $list_urls);\n\n $sqlresults = mysql_query($sql);\n if (!$sqlresults) {\n logit(CAPTURE . \".error.log\", \"insert error: \" . $sql);\n }\n }\n\n if (count($list_mentions) > 0) {\n\n $sql = \"INSERT $delayed IGNORE INTO \" . $binname . \"_mentions (tweet_id,created_at,from_user_name,from_user_id,to_user,to_user_id) VALUES \" . implode(\",\", $list_mentions);\n\n $sqlresults = mysql_query($sql);\n if (!$sqlresults) {\n logit(CAPTURE . \".error.log\", \"insert error: \" . $sql);\n }\n }\n }\n return TRUE;\n}", "title": "" }, { "docid": "54648d962815e4ed3340b7a31ee759ea", "score": "0.4482383", "text": "function _breakTieBasic( $teamList, $data ) {\n\n/* ... data declarations */\n $i = 1;\n $standingOrder = array();\n\n/* ... ensure our temporary database table is empty */\n $this->db->empty_table( 'Temp_Standings' );\n \n/* ... we will use database functions and actions to determine our standings order - so get data into a table */\n foreach ($teamList as $teamID) {\n $rowData = array(\n \"TeamID\" => $teamID,\n \"GamesPlayed\" => $data['wins'][$teamID] + $data['losses'][$teamID] + $data['ties'][$teamID],\n \"Wins\" => $data['wins'][$teamID], \n \"Losses\" => $data['losses'][$teamID], \n \"Ties\" => $data['ties'][$teamID],\n \"Points\" => $data['points'][$teamID],\n \"RunsFor\" => $data['runsFor'][$teamID], \n \"RunsAga\" => $data['runsAga'][$teamID],\n \"RunsDelta\" => $data['runsFor'][$teamID] - $data['runsAga'][$teamID],\n \"Position\" => $i++,\n );\n $this->Model_Team->addStandingsInfo( $rowData );\n }\n\n/* ... get a revised standings order based upon some basic criteria */\n $sortingOrder = \"Points DESC, RunsDelta DESC, Wins DESC, Losses ASC, GamesPlayed DESC\";\n $standingOrder = $this->Model_Team->getStandingsOrder( $sortingOrder );\n\n/* ... time to go */\n return( $standingOrder );\n }", "title": "" }, { "docid": "7f776105b8a617e50c0b5fe0fe8bacda", "score": "0.44532523", "text": "protected function runQueries()\n {\n }", "title": "" }, { "docid": "bc6f08210a1f846a6a1b70e1f6b0e29b", "score": "0.445189", "text": "public function run()\n {\n // for now 2 innings\n /**\n * @param $match \\App\\Models\\Match\n */\n foreach (\\App\\Models\\Match::where('match_date', '<', Carbon\\Carbon::now())->get() as $match) {\n $scorecard = \\App\\Models\\Scorecard::create([\n 'match_id' => $match->id\n ]);\n\n // hometeam innings\n $innings = \\App\\Models\\Innings::create([\n 'scorecard_id' => $scorecard->id,\n 'order' => 1\n ]);\n\n /** @var \\App\\Models\\Team $hometeam */\n $hometeam = $match->homeTeam;\n $awayTeam = $match->awayTeam;\n $hometeamPlayers = $hometeam->players()->limit(11)->get();\n\n // 6 the allrounder, 7 keepers, 8 to 11 bowlers\n $awayTeamIds = $awayTeam->players->pluck('id')->toArray();\n $bowlerIds = [$awayTeamIds[5],$awayTeamIds[7],$awayTeamIds[8],$awayTeamIds[9], $awayTeamIds[10] ];\n $keeper = \\App\\Models\\Player::find($awayTeamIds[6]);\n\n $nBatted = rand(4,11);\n $ctr = 0;\n foreach($hometeamPlayers as $player) {\n $ctr++;\n $runs = rand(0, 120);\n\n $bowler = \\App\\Models\\Player::find($bowlerIds[array_rand($bowlerIds)]);\n $fielder = \\App\\Models\\Player::find($awayTeamIds[array_rand($awayTeamIds)]);\n\n $factory = new \\App\\Factories\\DismissalsFactory($match, $innings, $ctr, $runs, $player,\n $bowler, #bowler\n $fielder, #fielder,\n null #balls faced\n );\n if ($ctr <= $nBatted) {\n // potential for refactor here...\n // @todo add rarer forms of dismissal\n $random = rand(0,100);\n if ($random < 20) {\n $factory->bowled();\n } elseif ($random < 65) {\n $factory->caught();\n } elseif ($random < 75) {\n $factory->runOut();\n } elseif ($random < 80) {\n // need the keeper here\n $factory = new \\App\\Factories\\DismissalsFactory($match, $innings, $ctr, $runs, $player,\n $bowler, #bowler\n $keeper,\n null #balls faced\n );\n $factory->stumped();\n } elseif ($random < 90) {\n $factory->runOut();\n } elseif ($random<100) {\n $factory->legBeforeWicket();\n }\n\n } else {\n $factory->didNotBat();\n }\n\n /*\n * id | integer | not null default nextval('innings_batsman_id_seq'::regclass)\n created_at | timestamp(0) without time zone |\n updated_at | timestamp(0) without time zone |\n batsman_id | integer | not null\n position | integer | not null\n team_id | integer | not null\n match_id | integer | not null\n time_start | timestamp(0) without time zone |\n time_finished | timestamp(0) without time zone |\n assisting_player_id | integer |\n bowler_id | integer |\n dismissable_method_id | integer |\n runs | integer | not null\n balls_faced | integer |\n innings_id | integer | not null\n\n */\n }\n\n\n }\n }", "title": "" }, { "docid": "f732840e3a7162f6bc2df35031beb706", "score": "0.44497836", "text": "function doDemote(){\n\n$type = @$this->req['_type'];\n\t\t$whom = @$this->req['_whom'];\n\t\t\n\t\tif($type == \"all\"){\n\t\t\t\n\t\t\t$query = \"UPDATE students SET _is_candidate= ( _is_candidate - 1 ) WHERE _school_index = '\".@$whom['school'].\"' ; UPDATE student_data SET _student_class = ( _student_class - 1 ) WHERE _school_id = '\".@$whom['school'].\"' \";\n\t\t\t$query = $this->connection->mquery($query, true );\t\n\t\t\tif($query){\n\t\t\t\treturn json_encode( array( \"response\" => \"SUCCESS\", \"data\" => array( \"message\" => \"SUCCESSFULLY UPDATED ALL STUDENT RECORDS!\", \"command\" => \"\") ) );\n\t\t\t}else{\n\t\t\t\treturn json_encode( array( \"response\" => \"ERROR\", \"data\" => array( \"message\" => \"FAILED TO UPDATE ALL STUDENT RECORDS!\", \"command\" => \"\") ) );\n\t\t\t}\t\n\t\t\t\t\n\t\t}else if( $type == \"class\" ){\n\t\t\t\n\t\t\t$query = \"UPDATE students SET _is_candidate= ( _is_candidate - 1 ) WHERE _school_index = '\".@$whom['school'].\"' AND _is_candidate = '\".@$whom['class'].\"' ; UPDATE student_data SET _student_class = ( _student_class - 1 ) WHERE _school_id = '\".@$whom['school'].\"' AND _student_class = '\".@$whom['class'].\"' \";\n\t\t\t$query = $this->connection->mquery($query, true );\n\t\t\tif($query){\n\t\t\t\treturn json_encode( array( \"response\" => \"SUCCESS\", \"data\" => array( \"message\" => \"SUCCESSFULLY UPDATED ALL FORM {$whom['class']} CLASS RECORDS! \", \"command\" => \"\") ) );\n\t\t\t}else{\n\t\t\t\treturn json_encode( array( \"response\" => \"ERROR\", \"data\" => array( \"message\" => \"FAILED TO UPDATE ALL FORM {$whom['class']} CLASS RECORDS!\", \"command\" => \"\") ) );\n\t\t\t}\n\t\t\t\n\t\t}else if($type == \"single\" ){\n\t\t\t\n\t\t\t$query = \"UPDATE students SET _is_candidate= ( _is_candidate - 1 ) WHERE _school_index = '\".@$whom['school'].\"' AND id = '\".@$whom['class'].\"' ; UPDATE student_data SET _student_class = ( _student_class - 1 ) WHERE _school_id = '\".@$whom['school'].\"' AND id = '\".@$whom['class'].\"'\";\n\t\t\t$query = $this->connection->mquery($query, true );\n\t\t\tif($query){\n\t\t\t\treturn json_encode( array( \"response\" => \"SUCCESS\", \"data\" => array( \"message\" => \"SUCCESSFULLY UPDATED THE STUDENT RECORDS! \", \"command\" => \"\") ) );\n\t\t\t}else{\n\t\t\t\treturn json_encode( array( \"response\" => \"ERROR\", \"data\" => array( \"message\" => \"FAILED TO UPDATE THE STUDENT RECORDS!\", \"command\" => \"\") ) );\n\t\t\t}\n\t\t\t\n\t\t}else{\n\t\t\t\n\t\t\t$query = \"DELETE FROM students WHERE _school_index = '\".@$whom['school'].\"' AND id = '\".@$whom['class'].\"' ; DELETE FROM student_data WHERE _school_id = '\".@$whom['school'].\"' AND id = '\".@$whom['class'].\"'\";\n\t\t\t$query = $this->connection->mquery($query, true );\n\t\t\tif($query){\n\t\t\t\treturn json_encode( array( \"response\" => \"SUCCESS\", \"data\" => array( \"message\" => \"SUCCESSFULLY PURGED THE STUDENT RECORDS! \", \"command\" => \"\") ) );\n\t\t\t}else{\n\t\t\t\treturn json_encode( array( \"response\" => \"ERROR\", \"data\" => array( \"message\" => \"FAILED TO PURGE THE STUDENT RECORDS!\", \"command\" => \"\") ) );\n\t\t\t}\n\t\t}\n\n\n}", "title": "" }, { "docid": "f24df36f24cedcc1d0f6474d232af033", "score": "0.444701", "text": "private function prepareStatements() {\r\n\t\t\r\n\t\t\t$this->stmtAddShow = $this->db->prepare('INSERT OR IGNORE INTO show (channelIdx, eventID, eventTsStart, eventTsEnd, title, descShort, descLong, genre) VALUES ( (SELECT idx FROM channel WHERE code = ?), ?,?,?,?,?,?,?)');\r\n\t\t\t$this->stmtAddChannel = $this->db->prepare('INSERT OR IGNORE INTO channel (idx, name, code) VALUES (?,?,?)');\r\n\t\t\t$this->stmtGetChannelByCode = $this->db->prepare('SELECT name, code, idx FROM channel WHERE code = ?');\r\n\t\t\t$this->stmtGetChannelByIndex = $this->db->prepare('SELECT name, code, idx FROM channel WHERE idx = ?');\r\n\t\t\t$this->stmtGetAllChannels = $this->db->prepare('SELECT name, code, idx FROM channel');\r\n\t\t\t\r\n\t\t\t$this->stmtGetEntryById = $this->db->prepare('SELECT s.*,c.name as channelName, c.code as channelCode FROM show s LEFT JOIN channel c on c.idx = s.channelIdx WHERE id = ?');\r\n\t\t\t//$this->stmtGetEntriesByTS = $this->db->prepare('SELECT s.*, c.name AS channelName, c.code AS channelCode FROM channel c LEFT OUTER JOIN show s ON c.idx = s.channelIdx AND eventTsStart <= ? AND (eventTsStart + eventDuration) > ?');\r\n\t\t\t//$this->stmtGetEntriesByTSNext = $this->db->prepare('SELECT s.*, c.name AS channelName, c.code AS channelCode FROM show s LEFT JOIN channel c ON c.idx = s.channelIdx WHERE s.id IN (SELECT id+1 FROM show WHERE eventTsStart < ? AND (eventTsStart + eventDuration) >= ?)');\r\n\t\t\t//$this->stmtGetEntriesByTSBetween = $this->db->prepare('SELECT s.*, c.name AS channelName, c.code AS channelCode FROM show s LEFT JOIN channel c ON c.idx = s.channelIdx WHERE (eventTsStart + eventDuration > ?) AND (eventTsStart < ?) ');\r\n\t\t\t//$this->stmtGetEntriesBySearch = $this->db->prepare('SELECT s.*, c.name AS channelName, c.code AS channelCode FROM show s LEFT JOIN channel c ON c.idx = s.channelIdx WHERE (title LIKE :txt OR descLong LIKE :txt) AND (eventTsStart+eventDuration) > :ts');\r\n\t\t\t//$this->stmtGetEntriesByChannel = $this->db->prepare('SELECT s.*, c.name AS channelName, c.code AS channelCode FROM show s LEFT JOIN channel c ON c.idx = s.channelIdx WHERE (s.channelIdx = ?) AND ((eventTsStart+eventDuration) > ?) LIMIT 100');\r\n\t\t\r\n\t\t}", "title": "" }, { "docid": "4a99d8effcbfcf0c3e828e96a97d7777", "score": "0.4441813", "text": "public function testStatisticsByGamesFilteredByGameParams()\n {\n $gameParamsFilters = $this->createRandomGameParamsFilters();\n $formatter = $this->getFormatterService();\n $faker = Factory::create();\n $filtersKeys = array_keys($gameParamsFilters);\n $randomKey1 = $faker->randomElement($filtersKeys);\n $randomKey2 = $faker->randomElement($filtersKeys);\n $randomKey3 = $faker->randomElement($filtersKeys);\n unset($gameParamsFilters[$randomKey1], $gameParamsFilters[$randomKey2], $gameParamsFilters[$randomKey3]);\n\n // 2. Get filtered by dates statistics from DB\n $bestResultBalesQueryBuilder = $this->entityManager->createQueryBuilder()\n ->from(GameResult::class, 'gr3')\n ->select('MAX(gr3.result)')\n ->andWhere('gr3.game = g.id')\n ;\n $bestResultStrategyQueryBuilder = $this->entityManager->createQueryBuilder()\n ->from(GameResult::class, 'gr4')\n ->select('s4.name')\n ->innerJoin('gr4.strategy', 's4')\n ->andWhere('gr4.game = g.id')\n ->andWhere('gr4.result = bestResultBales')\n ;\n $worseResultBalesQueryBuilder = $this->entityManager->createQueryBuilder()\n ->from(GameResult::class, 'gr5')\n ->select('MIN(gr5.result)')\n ->andWhere('gr5.game = g.id')\n ;\n $worseResultStrategyQueryBuilder = $this->entityManager->createQueryBuilder()\n ->from(GameResult::class, 'gr6')\n ->select('s6.name')\n ->innerJoin('gr6.strategy', 's6')\n ->andWhere('gr6.game = g.id')\n ->andWhere('gr6.result = worseResultBales')\n ;\n\n $statisticsFromDBQuery = $this->createStatsQueryBuilder()\n ->select([\n 'g.id',\n 'g.name AS game',\n sprintf('DATE_FORMAT(g.createdAt, \\'%s\\') AS gameDate', $this->getParam('database_date_format')),\n sprintf('SUM_QUERY(%s)/g.rounds AS bales', $this->createGameResultBalesSubQuery('gr1')->getQuery()->getDQL()),\n sprintf('SUM_QUERY(%s) AS totalBales', $this->createGameResultBalesSubQuery('gr2')->getQuery()->getDQL()),\n 'g.rounds AS roundsCount',\n sprintf('FIRST(%s) AS bestResultBales', $bestResultBalesQueryBuilder->getDQL()),\n sprintf('FIRST(%s) AS bestResultStrategy', $bestResultStrategyQueryBuilder->getDQL()),\n sprintf('FIRST(%s) AS worseResultBales', $worseResultBalesQueryBuilder->getDQL()),\n sprintf('FIRST(%s) AS worseResultStrategy', $worseResultStrategyQueryBuilder->getDQL()),\n ])\n ->groupBy('game')\n ->orderBy('gameDate', 'ASC')\n ->addOrderBy('g.id', 'ASC')\n ;\n\n $this->addFiltersToQuery($statisticsFromDBQuery, $gameParamsFilters);\n\n $statisticsFromDB = [];\n foreach ($statisticsFromDBQuery->getQuery()->getArrayResult() as $stats) {\n $winner = [\n 'strategy' => $stats['bestResultStrategy'],\n 'bales' => $formatter->toFloat($stats['bestResultBales'] / $stats['roundsCount']),\n ];\n $loser = [\n 'strategy' => $stats['worseResultStrategy'],\n 'bales' => $formatter->toFloat($stats['worseResultBales'] / $stats['roundsCount']),\n ];\n unset($stats['bestResultStrategy'], $stats['bestResultBales'], $stats['worseResultStrategy'], $stats['worseResultBales']);\n\n $statisticsFromDB[] = array_merge($stats, [\n 'totalBales' => $formatter->toInt($stats['totalBales']),\n 'bales' => $formatter->toFloat($stats['totalBales'] / $stats['roundsCount']),\n 'roundsCount' => $formatter->toInt($stats['roundsCount']),\n 'winner' => $winner,\n 'loser' => $loser,\n ]);\n }\n\n // 3. Enable Doctrine dates filters\n $this->enableDoctrineFilters($gameParamsFilters, 'game_');\n\n // 4. Get filtered statistics from Service\n $statisticsFromService = $this->getStatisticsService()->getStatisticsByGames($this->getRandomUser());\n\n // 5. Compare statistics from DB and statistics from service - they must be equals\n $this->assertEquals($statisticsFromDB, $statisticsFromService, sprintf('Test %s failed. Filtered statistics from DB and from service are not much. Filters: %s',\n 'total_statistics_by_games_filtered_by_game_params', json_encode($gameParamsFilters)));\n }", "title": "" }, { "docid": "c8db7f0c3adacd17a581aa6e8a319699", "score": "0.44394368", "text": "public function testGetMatchingStatementsUseCachedResult()\n {\n $successor = new BasicTriplePatternStore(\n new NodeFactoryImpl(new RdfHelpers()),\n new StatementFactoryImpl(),\n new QueryFactoryImpl(new RdfHelpers()),\n new StatementIteratorFactoryImpl()\n );\n $this->fixture->setChainSuccessor($successor);\n\n // test data\n $statement = new StatementImpl(\n new NamedNodeImpl(new RdfHelpers(), 'http://s/'),\n new NamedNodeImpl(new RdfHelpers(), 'http://p/'),\n new NamedNodeImpl(new RdfHelpers(), 'http://o/')\n );\n $statementIterator = new StatementSetResultImpl(array($statement));\n $options = array(1);\n\n // assumption is that all given parameter will be returned\n $this->assertEquals(\n new StatementSetResultImpl(array()),\n $this->fixture->getMatchingStatements($statement, $this->testGraph, $options)\n );\n\n // call getMatchingStatements again and see what happens\n $this->assertEquals(\n new StatementSetResultImpl(array()),\n $this->fixture->getMatchingStatements($statement, $this->testGraph, $options)\n );\n\n // check latest query cache container\n $this->assertEquals(\n array(\n array(\n 'graph_uris' => array($this->testGraph->getUri() => $this->testGraph->getUri()),\n 'query' => 'SELECT ?s ?p ?o FROM <http://localhost/Saft/TestGraph/> '.\n 'WHERE { '.\n '?s ?p ?o '.\n 'FILTER (str(?s) = \"'. $statement->getSubject()->getUri() .'\") '.\n 'FILTER (str(?p) = \"'. $statement->getPredicate()->getUri() .'\") '.\n 'FILTER (str(?o) = \"'. $statement->getObject()->getUri() .'\") '.\n '}',\n 'result' => new StatementSetResultImpl(array()),\n 'triple_pattern' => array(\n $this->testGraph->getUri() .\n $this->separator .'*'. $this->separator .'*'. $this->separator .'*'\n => $this->testGraph->getUri() .\n $this->separator .'*'. $this->separator .'*'. $this->separator .'*'\n )\n )\n ),\n $this->fixture->getLatestQueryCacheContainer()\n );\n }", "title": "" }, { "docid": "db61cf8015c29d9f1d535de4fffaf2f4", "score": "0.44255832", "text": "public function ThongkeTonghop($exp = null)\n {\n\n $where = null;\n if (isset($exp['sid'])) {\n $where = $where . \"AND s.sid = '\" . $exp['sid'] . \"' \";\n }\n\n if (Core_Login::getUserId() != ADMIN_ID) {\n if (!isset($exp['sid']) && $exp['sid'] == \"\") {\n if (isset($exp['partners'])) {\n $where = $where . \"AND s.sid IN(\" . $exp['partners'] . \")\";\n }\n }\n }\n if (Core_Login::getUserId() == ADMIN_ID) {\n if(isset($exp['user_id']) && $exp['user_id'] != \"\") {\n if (isset($exp['partners'])) {\n $where = $where . \"AND s.sid IN(\" . $exp['partners'] . \")\";\n }\n }\n }\n\n $result = $this->query(\"SELECT\n COUNT(CASE WHEN reason = 'RENEW' AND params = '0' THEN 1 END) AS GiaHanThanhCong,\n COUNT(CASE WHEN reason = 'RENEW' AND params != '0' THEN 1 END) AS GiaHanLoi,\n s.createdate, s.sid, s.channel\n FROM \" . $this->prefix . \"monfree AS s WHERE\n DATE(s.createdate) >= '\" . $exp['fromdate'] . \"'\n AND DATE(s.createdate) <= '\" . $exp['todate'] . \"' \".$where. \"\n GROUP BY DATE(s.createdate), s.sid\n ORDER BY DATE(s.createdate) DESC, s.sid ASC\");\n if ($this->numRows() > 0) {\n return $result;\n }\n }", "title": "" }, { "docid": "930dde6a22c442fa647c6fbd8e20c944", "score": "0.4412833", "text": "function doWarSurrender(&$objSuxAlli, &$objWinAlli)\n{\n global $orkTime;\n\n $winner = $objWinAlli->get_allianceid();\n $looser = $objSuxAlli->get_allianceid();\n\n // Clear events\n $iEventid1 = $objWinAlli->get_war('event_id');\n $iEventid2 = $objSuxAlli->get_war('event_id');\n clearEvents($iEventid1, $iEventid2);\n\n // Get game hours\n require_once('inc/classes/clsGame.php');\n $objGame = new clsGame();\n $arrGameTime = $objGame->get_game_times();\n\n // M: Update winner alli\n $arrWinWar = $objWinAlli->get_wars();\n $arrNewWinWar = array(\n 'target' => 0,\n 'last_target' => $looser,\n 'last_outgoing' => 'victory',\n 'last_end' => $arrGameTime['hour_counter'],\n 'victory' => $arrWinWar['victory'] + 1,\n 'event_id' => ''\n );\n $objWinAlli->set_wars($arrNewWinWar);\n\n // M: Update looser alli\n $arrSuxWar = $objSuxAlli->get_wars();\n $arrNewSuxWar = array(\n 'target' => 0,\n 'last_target' => $winner,\n 'last_outgoing' => 'surrender',\n 'last_end' => $arrGameTime['hour_counter'],\n 'surrender' => $arrSuxWar['surrender'] + 1,\n 'event_id' => ''\n );\n $objSuxAlli->set_wars($arrNewSuxWar);\n\n // M: Update winner alli fame\n $objTmpUser = new clsUser(0);\n $arrUserId = $objWinAlli->get_userids();\n foreach ($arrUserId as $iUserid)\n {\n $objTmpUser->set_userid($iUserid);\n $iNewFame = $objTmpUser->get_stat('fame') + WAR_SURRENDER_FAME;\n $objTmpUser->set_stat('fame', $iNewFame);\n }\n\n // M: Update looser alli fame\n $arrUserId = $objSuxAlli->get_userids();\n foreach ($arrUserId as $iUserid)\n {\n $objTmpUser->set_userid($iUserid);\n $iNewFame = max(0, $objTmpUser->get_stat('fame') - WAR_SURRENDER_FAME);\n $objTmpUser->set_stat('fame', $iNewFame);\n }\n\n // M: Transfer research\n $arrResearch = moveResearch($objSuxAlli, $objWinAlli, WAR_SURRENDER_LOSSES);\n\n // M: Transfer market goods (Atm this is the same % as regular victory)\n $arrMarket = moveMarketGoods($objSuxAlli, $objWinAlli, WAR_VICTORY_GOODS);\n\n // News for winner, looser and global\n mysql_query(\"INSERT INTO news (id, time, ip, type, duser, ouser, result, text, kingdom_text, kingdoma, kingdomb) VALUES ('', '$orkTime', '---', 'war-end', '0', '0', '1', '', '<strong class=\\\"positive\\\">We were victorious in the war with alliance #$looser!</strong>', '$winner', '')\");\n mysql_query(\"INSERT INTO news (id, time, ip, type, duser, ouser, result, text, kingdom_text, kingdoma, kingdomb) VALUES ('', '$orkTime', '---', 'war-end', '0', '0', '1', '', '<strong class=\\\"negative\\\">We have surrendered in the war with #$winner!</strong>', '$looser', '')\");\n mysql_query(\"INSERT INTO news (id, time, ip, type, duser, ouser, result, text, kingdom_text, kingdoma, kingdomb) VALUES ('', '$orkTime', '---', 'global', '0', '0', '1', '', '<strong class=\\\"positive\\\">Alliance #$looser have surrendered! #$winner wins!</strong>', '0', '')\");\n\n return (array($arrResearch, $arrMarket));\n}", "title": "" }, { "docid": "72a9a28e9267c968129bacf25bf61008", "score": "0.44094163", "text": "function fetchEloquentRaltionships()\n\t{\n\t\t$user = \\App\\User::find(1); \n\t\t$hamster = new \\App\\Hamster([ 'name' => 'Furry']);\n\t\t\n\t\t$user->hamsters()->save($hamster); \n\t\t\n\t\t//get results \n\t\t//2 NAČINA ISTO VRAČAJU:\n\t\tdd(\\App\\User::find(1)->hamsters()->get());\n\t\tdd(\\App\\User::find(1)->hamsters);\n\t\t\n\t\t//*************ADVANCE ELOQUENT RELATIONSHIPS**************\n\t\t\n\t\t//MAMY TO MANY\n\t\t/************************/\n\t\t// an existing Hamster from last lesson\n\t\t$hamster = \\App\\Hamster::find(1);\n\n\t\t// a simple \"attach\"\n\t\t$user->hamsters()->attach($hamster->id, ['role' => 'owner']);\n\n\t\t// or instead, a complex \"sync\"\n\t\t$user->hamsters()->sync([ $hamster->id => ['role' => 'owner']]);\n\n\t\t// view our User's hamsters just like before\n\t\tdd($user->hamsters);\n\t\t\n\t\t//ZAKLJUČAK: SYNC JE BOLJI JER NEMA DUPLIKATA I PUTEM POLJA VIŠE VRIJEDNOSTI MOGUĆE UNIJETI\n\t\t->sync([1,2,3], false); //sync dodaje noev postojeće zadržava, izbjegava dupliakte time\n\t\t\n\t\t/************************/\n\t\n\t\t//DEDICATED CONNTROLLER AND MODEL\n\t\t\n\t\t/*Dvojba prilikom arhitekture aplikacije , kako dohvatai mješavinu pivot tablice, kreirati\n\t\tnovi kontroler ili koristite nbeki od podtojecih dvaju. Najbolje je kreireati odvojen\n\t\tentity koji će predstvljazti pivot tablicu i koristiti taj model u poziv u neka od dva kontrolera*/\n\t\t\n\t}", "title": "" }, { "docid": "7f0bc60c20e0d7f857f67704faacf87a", "score": "0.44070634", "text": "function blindsHandler($instance, $dom, $owner, $sqlData) {\n\n $bigBlind = $dom->getElementsByTagName('bigBlind');\n $smallBlind = $dom->getElementsByTagName('smallBlind');\n $player = $dom->getElementsByTagName('currentMove');\n\n $flag = false;\n if ($bigBlind[0]->nodeValue === \"none\" && $smallBlind[0]->nodeValue === \"none\") { //beginning of game only once\n $sql = \"SELECT `USER` FROM `TableCreatedBy_\" . $owner . \"` Limit 2;\";\n $retval = $instance->sendRequest($sql);\n while ($row = mysql_fetch_row($retval)) {\n if ($flag === false) {\n $smallBlind[0]->nodeValue = $row[0];\n $flag = true;\n } else if ($flag === true) {\n $bigBlind[0]->nodeValue = $row[0];\n }\n }\n } else {\n findNext($sqlData, $dom, \"bigBlind\");\n findNext($sqlData, $dom, \"smallBlind\");\n $bigBlind = $dom->getElementsByTagName('bigBlind');\n $smallBlind = $dom->getElementsByTagName('smallBlind');\n \n }\n\n $sql = \"UPDATE `TableCreatedBy_\" . $owner . \"` SET `MoneyOnTable` = '50' where `user`='\" . $smallBlind[0]->nodeValue . \"';\";\n $retval = $instance->sendRequest($sql);\n $player[0]->nodeValue = $smallBlind[0]->nodeValue;\n \n $sql = \"UPDATE `TableCreatedBy_\" . $owner . \"` SET `MoneyOnTable` = '100' where `user`='\" . $bigBlind[0]->nodeValue . \"';\";\n $retval = $instance->sendRequest($sql);\n \n updateTotalMoney(\"150\", $instance, $owner);\n}", "title": "" }, { "docid": "00ba08afebedb810e60402b0a29da5f1", "score": "0.4406498", "text": "function tosser($toss)#the numeral 1 = tails and 2 = sonic(heads)\n{\n $test_array = [];#empty list for testing consecutive \"sonics\" tosses($toss)\n $result_array = [];#empty list to record results of every toss\n do {\n if (mt_rand(1,2) == 1)\n {\n array_push($result_array, 1);#adds every tails flip to result_array\n unset($test_array);#clears test list when ever result is 1 (aka flip is \"tails\")\n $test_array = [];\n }\n else\n {\n array_push($result_array, 2);#adds every \"sonic\" flip to result_array\n array_push($test_array, 2);#adds to test_array\n }\n } while(count($test_array) < $toss);#when length of test_array is equal to the desired consecutive tosses...STOP tossing!\n return $result_array;#returns a list of results {1,2,1,1,2....}\n}", "title": "" }, { "docid": "45ed80357a397c54b1dba6e6a3f25910", "score": "0.44017538", "text": "function go($count=1) {\n # Repeat until done...\n $sleep = $this->v('scutter_sleep', 10, $this->a);\n $res = array('g_count' => 0, 'graphs' => array());\n while ($count) {\n if (!$this->getLock())\n return $this->addError('Unable to obtain scutter lock.');\n # Find a new representation that should be fetched (not skipped).\n $row = $this->query('\nPREFIX scutter: <'.$this->ns().'>\nSELECT ?url\nWHERE { ?r scutter:source ?url .\n OPTIONAL { ?r scutter:skip ?s } .\n OPTIONAL { ?r scutter:latestFetch ?f }\n FILTER ( isIri(?url) && regex(str(?url), \"^http:\") && !BOUND(?s) && !BOUND(?f) )\n} LIMIT 1', 'row');\n if ($e = $this->getErrors()) {\n $this->releaseLock();\n return $this->addError('Oops: \"' . join(\"\\n\", $e) . '\"');\n }\n if (!isset($row['url'])) {\n # Find a representation that should be updated (not skipped).\n $row = $this->query('\nPREFIX scutter: <'.$this->ns().'>\nPREFIX mysql: <http://web-semantics.org/ns/mysql/>\nPREFIX dct: <http://purl.org/dc/terms/>\nSELECT ?url\nWHERE { ?r scutter:source ?url .\n OPTIONAL { ?r scutter:skip ?s } .\n ?r scutter:latestFetch ?f .\n ?f scutter:interval ?interval ; dct:date ?date\n FILTER ( isIri(?url) && regex(str(?url), \"^http:\") && !BOUND(?s) &&\n (mysql:unix_timestamp(mysql:replace(mysql:replace(?date,\"T\",\"\"),\"Z\",\"\")) + ?interval < mysql:unix_timestamp(\"' . gmdate('Y-m-d H:i:s') . '\") ) )\n} LIMIT 1', 'row');\n if ($e = $this->getErrors()) {\n $this->releaseLock();\n return $this->addError('Oops: \"' . join(\"\\n\", $e) . '\"');\n }\n if (!isset($row['url'])) {\n $this->releaseLock();\n return $res;\n }\n }\n # Perform and register fetch...\n if (is_array($r = $this->fetch($row['url']))) {\n foreach ($r as $k => $v) {\n if (is_numeric($v)) {\n if (!isset($res[$k]))\n $res[$k] = $v;\n elseif (is_numeric($res[$k]))\n $res[$k] += $v;\n }\n }\n $res['g_count']++;\n $res['graphs'][] = $row['url'];\n }\n $this->releaseLock();\n $count--;\n if ($count)\n sleep($sleep);\n }\n return $res;\n }", "title": "" }, { "docid": "b27970e6e0504c4d2df38104de23ef78", "score": "0.4391352", "text": "public function rerunRadioStreamData()\n {\n $streams = $this->em->getRepository('AppBundle:RadioStationStream')->getStreamsWithoutArtistId();\n\n if($streams){\n foreach ($streams as $stream){\n //check ISRC code\n $isrc = $stream->getIsrc();\n if(strlen($isrc) > 5){\n if(substr($isrc,0,2) == 'ZA'){\n //then song is local\n $stream->setIsLocal(true);\n $stream->setIsAfrican(true);\n $this->em->persist($stream);\n $this->em->flush();\n }\n }\n\n $this->eventDispatcher->dispatch(\n RadioStationStreamEvents::ON_STREAM_INCOMING,\n new RadioStationStreamEvent($stream)\n );\n }\n }\n }", "title": "" }, { "docid": "44b32305340e423196ed58d574597b7a", "score": "0.438687", "text": "public function standings($groups=null){\n $standings = array();\n if(!$groups){\n $groups = Group::with(['matches','teams'])->get(); \n }\n foreach($groups as $group){\n $standings[$group->id] = array();\n // assign initial values for the teams in the group\n foreach($group->teams as $team){\n $standings[$group->id][$team->id] = array(\n 'team_id'=>$team->id,\n 'team_name'=>$team->name,\n 'team_iso'=>$team->iso,\n 'played' => 0,\n 'wins' => 0,\n 'draws' => 0,\n 'losts'=> 0,\n 'goalsFor' => 0,\n 'goalsAgainst' => 0,\n );\n }\n // parse the pronostics for the group matches \n foreach($group->matches as $match){\n $pronostic = $this->pronostics->where('match_id',$match->id)->first(); // ->first() return an instance of the first found model, or null otherwise.\n if(!$pronostic||is_null($pronostic->score_h) || is_null($pronostic->score_a)) continue;\n $team_h = $match->team_h; // team id\n $team_a = $match->team_a;\n $standings[$group->id][$team_h]['played'] += 1;\n $standings[$group->id][$team_a]['played'] += 1;\n $standings[$group->id][$team_h]['goalsFor'] += $pronostic->score_h;\n $standings[$group->id][$team_h]['goalsAgainst'] += $pronostic->score_a; \n $standings[$group->id][$team_a]['goalsFor'] += $pronostic->score_a;\n $standings[$group->id][$team_a]['goalsAgainst'] += $pronostic->score_h;\n switch ($pronostic->score_h <=> $pronostic->score_a){\n case 0 : $standings[$group->id][$team_h]['draws'] += 1; $standings[$group->id][$team_a]['draws'] += 1; break; // tie\n case 1 : $standings[$group->id][$team_h]['wins'] += 1; $standings[$group->id][$team_a]['losts'] += 1; break; // home team wins\n case -1: $standings[$group->id][$team_h]['losts'] += 1; $standings[$group->id][$team_a]['wins'] += 1; break; // home team loses\n } \n }\n usort($standings[$group->id],array($this, \"cmp_standings\")); \n } \n return $standings;\n }", "title": "" }, { "docid": "613455476d2e7e3aa4234838db2f8bf3", "score": "0.43849114", "text": "public function check_stream($stream_type, $id) {\n\n\t\t\theader('Content-type: application/json');\n\t\t\t$stmt = $this->conn->prepare(\"SELECT category_id FROM follows WHERE user_id = ?\");\n\t\t\t$stmt->execute(array(USER_ID));\n\t\t\tif($stmt->rowCount()!=0) {\n\t\t\t\t$user_categories = \"AND (\";\n\t\t\t\tforeach($stmt->fetchAll(PDO::FETCH_ASSOC) as $ii) {\n\t\t\t\t\tif($stream_type==2) \t$user_categories .= \"questions.category LIKE '%\".$ii['category_id'].\" %' OR \";\n\t\t\t\t\telse \t\t\t\t\t$user_categories .= \"category LIKE '%\".$ii['category_id'].\" %' OR \";\n\t\t\t\t}\n\t\t\t\tif($stream_type==2)\t\t$user_categories .= \"questions.category LIKE '0')\";\n\t\t\t\telse \t\t\t\t\t$user_categories .= \"category LIKE '0')\";\n\t\t\t}\n\n\t\t\tswitch($stream_type) {\n\t\t\t\tcase 0: \t\t/* Unanswered */\n\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT COUNT(*) AS total FROM questions WHERE status='1' AND answers<1 \".$user_categories.\" AND time>?\");\n\t \t\t\t\t$stmt->execute(array($id));\n\t \t\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t break;\n\t\t\t\tcase 1: \t\t/* Answered */\n\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT COUNT(*) AS total FROM questions WHERE status='1' AND answers>0 \".$user_categories.\" AND time>?\");\n\t \t\t\t\t$stmt->execute(array($id));\n\t \t\t\t\t$result = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t break;\n\t\t\t\tcase 2: \t\t/* Popular */\n\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT questions.*, COUNT( likes.question_id ) AS number FROM questions, likes WHERE questions.id = likes.question_id AND questions.status = '1' \".$t_user_categories.\" GROUP BY likes.question_id ORDER BY number DESC LIMIT 1\");\n\t\t\t\t\t\t\t\t$stmt->execute();\n\t \t\t\t\t$max = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT questions.*, COUNT( likes.question_id ) AS number FROM questions, likes WHERE questions.id = likes.question_id AND questions.status = '1' \".$user_categories.\" AND questions.time>? GROUP BY likes.question_id HAVING COUNT(*)>?\");\n\t \t\t\t\t$stmt->execute(array($id,$max['number']/2));\n\t \t\t\t\t$result['total'] = $stmt->rowCount();\n\t\t\t\t\t break;\n\t\t\t\tcase 3: \t\t/* Followed */\n\t\t\t\t\t\t\t\t$result['total'] = 0;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 4: \t\t/* All */\n\t\t\t\t\t\t\t\t$stmt = $this->conn->prepare(\"SELECT COUNT(*) AS total FROM questions WHERE status='1' \".$user_categories.\" AND time>?\");\n\t\t\t\t\t $stmt->execute(array($id));\n\t\t\t\t\t $result = $stmt->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t\t break;\n\t\t\t}\n\t if($result['total']>0) {\n\t \t$json = array ('response'=>\"1\");\n\t }\n\t else {\n\t \t$json = array ('response'=>'0');\n\t }\n\t echo json_encode($json);\n\t\t}", "title": "" }, { "docid": "b450f0d21101ee91b9918f96fef07c4a", "score": "0.43749267", "text": "public function performanceTests2()\n {\n //todo fetch user with all underlying stuff.\n //todo fetch each small segment\n $user = Auth::user();\n $problem = Problem::with( 'service' )\n ->with( 'contact' )\n ->where( 'user_id', $this->getUserId() )->firstOrFail();\n }", "title": "" }, { "docid": "0ecd431fcc9e4bf3060c6e00719693ca", "score": "0.4370635", "text": "function show_statistics_bowling_rookies($db,$statistics,$sort,$direction,$option,$team)\n{\n global $dbcfg, $PHP_SELF, $bluebdr, $greenbdr, $yellowbdr;\n $db_roo_all = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n\t$db_roo_all->SelectDB($dbcfg['db']);\n\t$db_roo_min = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n\t$db_roo_min->SelectDB($dbcfg['db']);\n\t$db_roo_sea = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n\t$db_roo_sea->SelectDB($dbcfg['db']);\n\t \n $db->Query(\"SELECT * FROM seasons ORDER BY SeasonID\");\n for ($i=0; $i<$db->rows; $i++) {\n $db->GetRow($i);\n $seasons[$db->data['SeasonID']] = $db->data['SeasonName'];\n }\n\n $db->Query(\"SELECT * FROM teams WHERE LeagueID = 1 ORDER BY TeamName\");\n for ($i=0; $i<$db->rows; $i++) {\n $db->GetRow($i);\n $teams[$db->data['TeamID']] = $db->data['TeamAbbrev'];\n }\n \n \n if (!$db->Exists(\"SELECT COUNT( s.player_id ) AS Matches, s.player_id, p.PlayerID, LEFT(p.PlayerFName,1) AS PlayerInitial, p.PlayerFName, p.PlayerLName FROM scorecard_bowling_details s INNER JOIN players p ON s.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON s.game_id = g.game_id INNER JOIN seasons n ON g.season = n.SeasonID GROUP BY s.player_id\")) {\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\"; \n \n if($option == \"byseason\") echo \"<p>There are no bowling statistics in the database for the year <b>$statistics.</b></p>\\n\";\n if($option == \"allcareer\") echo \"<p>There are no bowling statistics in the database.</p>\\n\";\n if($option == \"teamcareer\") echo \"<p>There are no bowling statistics in the database for the team <b>$team.</b></p>\\n\";\n \n echo \"<p>&laquo; <a href=\\\"javascript:history.back()\\\">back to selection</a></p>\\n\";\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n \n } else { \n \n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \"<tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n\n if($option == \"byseason\") echo \" <a href=\\\"/index.php\\\">Home</a> &raquo; <a href=\\\"/statistics.php\\\">Statistics</a> &raquo; $statistics statistics</p>\\n\";\n if($option == \"allcareer\") echo \" <a href=\\\"/index.php\\\">Home</a> &raquo; <a href=\\\"/statistics.php\\\">Statistics</a> &raquo; Career statistics</p>\\n\";\n if($option == \"teamcareer\") echo \" <a href=\\\"/index.php\\\">Home</a> &raquo; <a href=\\\"/statistics.php\\\">Statistics</a> &raquo; {$teams[$team]} statistics</p>\\n\";\n\n echo \" </td>\\n\";\n //echo \" <td align=\\\"right\\\" valign=\\\"top\\\">\\n\";\n //require (\"navtop.php\");\n //echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n\n $db->QueryRow(\"\n SELECT\n MIN(game_date) AS earlydate\n FROM\n scorecard_game_details\n \");\n $db->BagAndTag();\n \n $d = sqldate_to_string($db->data['earlydate']); \n\t$inc = '';\n\tif(date(\"Y\") == $statistics) {\n\t\t$inc = \"Including Knock-Outs.\";\n\t}\n if($option == \"byseason\") {\n if($sort == \"Wickets\") echo \"<b class=\\\"16px\\\">$statistics - Rookie Bowling - Most Wickets</b><br>$inc Qualification 1 over.<br><br>\\n\";\n if($sort == \"Balls\") echo \"<b class=\\\"16px\\\">$statistics - Rookie Bowling - Workhorses</b><br>$inc Qualification 1 over.<br><br>\\n\";\n if($sort == \"Average\") echo \"<b class=\\\"16px\\\">$statistics - Rookie Bowling - Best Averages</b><br>$inc Qualification 1 over.<br><br>\\n\";\n }\n\n if($option == \"allcareer\") {\n if($sort == \"Wickets\") echo \"<b class=\\\"16px\\\">Career Bowling - Most Wickets</b><br>From <b>$d</b> to the present. Qualification 50 overs.<br><br>\\n\";\n if($sort == \"Balls\") echo \"<b class=\\\"16px\\\">Career Bowling - Workhorses</b><br>From <b>$d</b> to the present. Qualification 50 overs.<br><br>\\n\";\n if($sort == \"Average\") echo \"<b class=\\\"16px\\\">Career Bowling - Best Averages</b><br>From <b>$d</b> to the present. Qualification 50 overs.<br><br>\\n\";\n }\n\n if($option == \"teamcareer\") {\n if($sort == \"Wickets\") echo \"<b class=\\\"16px\\\">{$teams[$team]} Career Bowling - Most Wickets</b><br>From <b>$d</b> to the present.<br><br>\\n\";\n if($sort == \"Balls\") echo \"<b class=\\\"16px\\\">{$teams[$team]} Career Bowling - Workhorses</b><br>From <b>$d</b> to the present.<br><br>\\n\";\n if($sort == \"Average\") echo \"<b class=\\\"16px\\\">{$teams[$team]} Career Bowling - Best Averages</b><br>From <b>$d</b> to the present.<br><br>\\n\";\n }\n\n //////////////////////////////////////////////////////////////////////////////////////////\n // Statistics Option Box\n //////////////////////////////////////////////////////////////////////////////////////////\n\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"3\\\" bordercolor=\\\"$bluebdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$bluebdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">OPTIONS</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td class=\\\"trrow1\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\">\\n\";\n\n \n // List by season for schedule\n\n echo \"<p class=\\\"10px\\\">Season: \";\n echo \"<select name=ccl_mode onChange=\\\"gotosite(this.options[this.selectedIndex].value)\\\">\\n\";\n echo \"<option value=\\\"\\\" selected>year</option>\\n\";\n\n// 19-Aug-2009\n $db->Query(\"SELECT la.season, se.SeasonName FROM scorecard_batting_details la INNER JOIN seasons se ON la.season = se.SeasonID GROUP BY la.season ORDER BY se.SeasonName DESC\");\n// $db->Query(\"SELECT la.season, se.SeasonName FROM scorecard_batting_details la INNER JOIN seasons se ON la.season = se.SeasonID WHERE se.SeasonName NOT LIKE '%KO%' GROUP //BY la.season ORDER BY se.SeasonName DESC\");\n for ($x=0; $x<$db->rows; $x++) {\n $db->GetRow($x);\n $db->BagAndTag();\n $sen = $db->data['SeasonName'];\n $sid = $db->data['season'];\n \t$selected = \"\";\n\t if ($statistics == $sen) {\n\t \t$selected = \"selected\";\n\t }\n if($sort == \"Average\") echo \"<option $selected value=\\\"$PHP_SELF?option=byseason&statistics=$sen&sort=Average&direction=asc&ccl_mode=9\\\" class=\\\"10px\\\">$sen</option>\\n\";\n if($sort == \"Wickets\") echo \"<option $selected value=\\\"$PHP_SELF?option=byseason&statistics=$sen&sort=Wickets&direction=desc&ccl_mode=9\\\" class=\\\"10px\\\">$sen</option>\\n\";\n if($sort == \"Balls\") echo \"<option $selected value=\\\"$PHP_SELF?option=byseason&statistics=$sen&sort=Balls&direction=desc&ccl_mode=9\\\" class=\\\"10px\\\">$sen</option>\\n\";\n }\n\n if($sort == \"Average\") echo \"<option value=\\\"$PHP_SELF?option=byseason&statistics=&sort=Average&direction=asc&ccl_mode=9\\\" class=\\\"10px\\\">all</option>\\n\";\n if($sort == \"Wickets\") echo \"<option value=\\\"$PHP_SELF?option=byseason&statistics=&sort=Wickets&direction=desc&ccl_mode=9\\\" class=\\\"10px\\\">all</option>\\n\";\n if($sort == \"Balls\") echo \"<option value=\\\"$PHP_SELF?option=byseason&statistics=&sort=Balls&direction=desc&ccl_mode=9\\\" class=\\\"10px\\\">all</option>\\n\";\n \n echo \" </select></p>\\n\";\n\n echo \" </td>\\n\";\n echo \" </tr>\\n\";\n echo \"</table><br>\\n\";\n \n //////////////////////////////////////////////////////////////////////////////////////////\n // begin bowling statistics \n //////////////////////////////////////////////////////////////////////////////////////////\n \n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bordercolor=\\\"$greenbdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$greenbdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">&nbsp;BOWLING STATS</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td class=\\\"trrow1\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\" colspan=\\\"2\\\">\\n\";\n\n echo \"<table width=\\\"100%\\\" cellspacing=\\\"1\\\" cellpadding=\\\"3\\\" class=\\\"tablehead\\\">\\n\";\n echo \" <tr class=\\\"colhead\\\">\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"2%\\\">#</td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"26%\\\"><b>NAME</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\"><b>O</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\"><b>M</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\"><b>R</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\"><b>W</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"9%\\\"><b>AVE</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\"><b>BBI</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\"><b>4w</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\"><b>5w</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><b>ECO</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><b>TEAM</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><b>TEAM 2</b></td>\\n\";\n echo \" </tr>\\n\";\n\t\n \n $season_year = substr($statistics, 0, 4);\n\t$final_players = '';\n\t$db_roo_all->Query(\" SELECT DISTINCT playerid FROM scorecard_game_details gd, scorecard_bowling_details bowl, players p WHERE gd.game_id = bowl.game_id AND bowl.player_id = p.playerid AND YEAR( game_date ) = $season_year \");\n\tfor ($i=0; $i<$db_roo_all->rows; $i++) {\n\t\t$db_roo_all->GetRow($i);\n\t\t$db_roo_all->BagAndTag();\n\t\t$playerid_all = $db_roo_all->data['playerid'];\n\t\t//echo $db_roo_all->data[sum_runs].\"<BR>\";\n\t\t$db_roo_min->Query(\" SELECT MIN( gd1.game_date ) as min_date FROM scorecard_game_details gd1, scorecard_batting_details bt WHERE gd1.game_id = bt.game_id AND bt.player_id = $playerid_all \");\n\t\t$j = 0;\n\t\t$db_roo_min->GetRow($j);\n\t\t$db_roo_min->BagAndTag();\n\t\t$min_date = $db_roo_min->data['min_date'];\n\t\t\tif(substr($min_date,0,4) == $season_year) {\n\t\t\t\tif($final_players == '') {\n\t\t\t\t\t$final_players = $playerid_all;\n\t\t\t\t}else{\n\t\t\t\t\t$final_players .= \",\". $playerid_all;\n\t\t\t\t}\n\t\t\t}\n\t}\n\t\n\t$array_final_player = explode(\",\", $final_players);\n\t\n\t$db_roo_sea->Query(\"Select player_id, sum(wickets) from scorecard_bowling_details, seasons where seasons.seasonid=scorecard_bowling_details.season AND SeasonName LIKE '%{$statistics}%' AND player_id in (\".$final_players.\") group by 1 order by 2 desc\");\n\t\n\t\n\t$i = 0;\n for ($k=0; $k<$db_roo_sea->rows; $k++) {\n $db_roo_sea->GetRow($k);\n $db_roo_sea->BagAndTag();\n\t\t$playerid = $db_roo_sea->data['player_id'];\n \n \n \n if($option == \"byseason\") $db->Query(\"SELECT t.TeamID TeamID, t.TeamAbbrev TeamAbbrev, t2.TeamID TeamID2, t2.TeamAbbrev TeamAbbrev2, b.player_id, SUM(IF(INSTR(overs, '.'),((LEFT(overs, INSTR(overs, '.') - 1) * 6) + RIGHT(overs, INSTR(overs, '.') - 1)),(overs * 6))) AS Balls, SUM( b.maidens ) AS Maidens, SUM( b.runs ) AS BRuns, SUM( b.wickets ) AS Wickets, SUM( b.runs ) / SUM( b.wickets ) AS Average, p.PlayerLName, p.PlayerFName, p.PlayerLAbbrev, LEFT(p.PlayerFName,1) AS PlayerInitial FROM scorecard_bowling_details b INNER JOIN players p ON b.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id INNER JOIN teams t ON p.PlayerTeam = t.TeamID LEFT OUTER JOIN teams t2 ON p.PlayerTeam2 = t2.TeamID INNER JOIN seasons n ON g.season = n.SeasonID WHERE (g.league_id=1 OR g.league_id=4) AND n.SeasonName LIKE '%{$statistics}%' AND b.player_id = \".$playerid .\" GROUP BY b.player_id HAVING Balls >=6 ORDER BY $sort $direction, Average ASC\");\n if($option == \"allcareer\") $db->Query(\"SELECT t.TeamID TeamID, t.TeamAbbrev TeamAbbrev, t2.TeamID TeamID2, t2.TeamAbbrev TeamAbbrev2, b.player_id, SUM(IF(INSTR(overs, '.'),((LEFT(overs, INSTR(overs, '.') - 1) * 6) + RIGHT(overs, INSTR(overs, '.') - 1)),(overs * 6))) AS Balls, SUM( b.maidens ) AS Maidens, SUM( b.runs ) AS BRuns, SUM( b.wickets ) AS Wickets, SUM( b.runs ) / SUM( b.wickets ) AS Average, p.PlayerLName, p.PlayerFName, p.PlayerLAbbrev, LEFT(p.PlayerFName,1) AS PlayerInitial FROM scorecard_bowling_details b INNER JOIN players p ON b.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id INNER JOIN teams t ON p.PlayerTeam = t.TeamID LEFT OUTER JOIN teams t2 ON p.PlayerTeam2 = t2.TeamID WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = \".$playerid .\" GROUP BY b.player_id HAVING Balls >=300 ORDER BY $sort $direction, Average ASC\");\n if($option == \"teamcareer\") $db->Query(\"SELECT t.TeamID TeamID, t.TeamAbbrev TeamAbbrev, t2.TeamID TeamID2, t2.TeamAbbrev TeamAbbrev2, b.player_id, SUM(IF(INSTR(overs, '.'),((LEFT(overs, INSTR(overs, '.') - 1) * 6) + RIGHT(overs, INSTR(overs, '.') - 1)),(overs * 6))) AS Balls, SUM( b.maidens ) AS Maidens, SUM( b.runs ) AS BRuns, SUM( b.wickets ) AS Wickets, SUM( b.runs ) / SUM( b.wickets ) AS Average, p.PlayerLName, p.PlayerFName, p.PlayerLAbbrev, LEFT(p.PlayerFName,1) AS PlayerInitial FROM scorecard_bowling_details b INNER JOIN players p ON b.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id INNER JOIN teams t ON p.PlayerTeam = t.TeamID LEFT OUTER JOIN teams t2 ON p.PlayerTeam2 = t2.TeamID WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = \".$playerid .\" AND p.PlayerTeam = $team GROUP BY b.player_id ORDER BY $sort $direction, Average ASC\");\n\n $db->BagAndTag();\n\n // instantiate new db class\n $subdb = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n $subdb->SelectDB($dbcfg['db']);\n //\n // serialNumber will be used later to display the serial number\n // of the bowlers with best averages etc.\n // Jarrar (2nd August 2005).\n $serialNumber=0;\n for ($r=0; $r<$db->rows; $r++) {\n \n $db->GetRow($r); \n\t\t$i = $i + 1;\n $playerid = $db->data['player_id'];\n \n $init = $db->data['PlayerInitial'];\n $fname = $db->data['PlayerFName'];\n $lname = $db->data['PlayerLName'];\n $labbr = $db->data['PlayerLAbbrev'];\n $scmai = $db->data['Maidens'];\n $scbru = $db->data['BRuns'];\n $scwic = $db->data['Wickets'];\n $teama = $db->data['TeamAbbrev'];\n $teamid = $db->data['TeamID']; \n $teama2 = $db->data['TeamAbbrev2'];\n $teamid2 = $db->data['TeamID2']; \n \n if($db->data['Average'] != \"\") {\n $average = $db->data['Average'];\n } else {\n $average = \"-\";\n }\n\n $bnum = $db->data['Balls']; \n $bovers = Round(($bnum / 6), 2); \n $bfloor = floor($bovers); \n\n if($bovers == $bfloor + 0.17) { \n $scove = $bfloor + 0.1; \n } else \n if($bovers == $bfloor + 0.33) { \n $scove = $bfloor + 0.2; \n } else \n if($bovers == $bfloor + 0.5) { \n $scove = $bfloor + 0.3; \n } else \n if($bovers == $bfloor + 0.67) { \n $scove = $bfloor + 0.4; \n } else \n if($bovers == $bfloor + 0.83) { \n $scove = $bfloor + 0.5; \n } else { \n $scove = $bfloor; \n } \n\n if($option == \"byseason\") $subdb->QueryRow(\"SELECT COUNT(b.wickets) AS fourwickets FROM scorecard_bowling_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND s.SeasonName LIKE '%{$statistics}%' AND b.wickets = 4\");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT COUNT(b.wickets) AS fourwickets FROM scorecard_bowling_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND b.wickets = 4\");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT COUNT(b.wickets) AS fourwickets FROM scorecard_bowling_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND (b.team = $team OR (b.team IN (SELECT PlayerTeam from players where PlayerTeam2 = $team AND PlayerID = $playerid) OR b.team IN (SELECT PlayerTeam2 from players where PlayerTeam = $team AND player_id = $playerid))) AND b.wickets = 4\");\n\n if($subdb->data['fourwickets'] != \"0\") {\n $scbfo = $subdb->data['fourwickets'];\n } else {\n $scbfo = \"-\";\n }\n\n if($option == \"byseason\") $subdb->QueryRow(\"SELECT COUNT(b.wickets) AS fivewickets FROM scorecard_bowling_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND s.SeasonName LIKE '%{$statistics}%' AND b.wickets >= 5\");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT COUNT(b.wickets) AS fivewickets FROM scorecard_bowling_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND b.wickets >= 5\");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT COUNT(b.wickets) AS fivewickets FROM scorecard_bowling_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND (b.team = $team OR (b.team IN (SELECT PlayerTeam from players where PlayerTeam2 = $team AND PlayerID = $playerid) OR b.team IN (SELECT PlayerTeam2 from players where PlayerTeam = $team AND player_id = $playerid))) AND b.wickets >= 5\");\n\n if($subdb->data['fivewickets'] != \"0\") {\n $scbfi = $subdb->data['fivewickets'];\n } else {\n $scbfi = \"-\";\n } \n\n\n if($scbru >= 1 && $scwic >= 1) {\n $boavg = Number_Format(Round($scbru / $scwic, 2),2);\n } else {\n $boavg = \"-\";\n }\n\n if($scbru >= 1 && $scove >= 0.1) { \n $boeco = Number_Format(Round($scbru / $scove, 2),2);\n } else {\n $boeco = \"-\";\n } \n\n if($option == \"byseason\") $subdb->QueryRow(\"SELECT b.player_id, b.wickets, b.runs FROM scorecard_bowling_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND s.SeasonName LIKE '%{$statistics}%' ORDER BY b.wickets DESC, b.runs ASC LIMIT 1\");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT b.player_id, b.wickets, b.runs FROM scorecard_bowling_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid ORDER BY b.wickets DESC, b.runs ASC LIMIT 1\");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT b.player_id, b.wickets, b.runs FROM scorecard_bowling_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid ORDER BY b.wickets DESC, b.runs ASC LIMIT 1\");\n\n $scbbw = $subdb->data['wickets'];\n $scbbr = $subdb->data['runs'];\n \n // Hide all those bowlers who haven't yet taken a wicket\n\n if($scwic != \"0\") {\n\n if($i % 2) {\n echo \"<tr class=\\\"trrow2\\\">\\n\";\n } else {\n echo \"<tr class=\\\"trrow1\\\">\\n\";\n }\n \n echo \" <td align=\\\"left\\\" width=\\\"2%\\\">\";\n echo $i;\n echo \" </td>\\n\"; \n echo \" <td align=\\\"left\\\" width=\\\"26%\\\"><a href=\\\"players.php?players=$playerid&ccl_mode=1\\\" class=\\\"statistics\\\">\";\n\n if($lname != \"\" && $fname == \"\") {\n echo $lname;\n } elseif($fname != \"\" && $lname != \"\" && $labbr != \"\") {\n echo \"$fname $labbr\";\n } elseif($fname != \"\" && $lname != \"\" && $labbr == \"\") {\n echo \"$fname $lname\"; \n } else {\n echo \"$fname\\n\";\n } \n\t\n echo \" </a></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\">$scove</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\">$scmai</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\">$scbru</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\">$scwic</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"9%\\\">$average</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\">$scbbw-$scbbr</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\">$scbfo</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\">$scbfi</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\">$boeco</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><a href=\\\"/statistics.php?statistics=$statistics&team=$teamid&ccl_mode=2\\\" class=\\\"statistics\\\">$teama</a></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><a href=\\\"/statistics.php?statistics=$statistics&team=$teamid2&ccl_mode=2\\\" class=\\\"statistics\\\">$teama2</a></td>\\n\";\n echo \" </tr>\\n\";\n \n } \n }\n }\n \n echo \"</table>\\n\"; \n\n echo \"</td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table><br>\\n\";\n\n\n echo \" </td>\\n\";\n echo \" </tr>\\n\";\n echo \"</table>\\n\";\n\n }\n \n}", "title": "" }, { "docid": "a2f27261225309b9c568287a9a7bd948", "score": "0.436946", "text": "function show_statistics_mostruns_rookies($db,$statistics,$sort,$sort2,$option,$team)\n{\n global $dbcfg, $PHP_SELF, $bluebdr, $greenbdr, $yellowbdr;\n\t$db_roo_all = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n\t$db_roo_all->SelectDB($dbcfg['db']);\n\t$db_roo_sea = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n\t$db_roo_sea->SelectDB($dbcfg['db']);\n\t$db_roo_min = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n\t$db_roo_min->SelectDB($dbcfg['db']);\n\t\t\n $db->Query(\"SELECT * FROM seasons ORDER BY SeasonID\");\n for ($i=0; $i<$db->rows; $i++) {\n $db->GetRow($i);\n $seasons[$db->data['SeasonID']] = $db->data['SeasonName'];\n }\n\n $db->Query(\"SELECT * FROM teams WHERE LeagueID = 1 ORDER BY TeamName\");\n for ($i=0; $i<$db->rows; $i++) {\n $db->GetRow($i);\n $teams[$db->data['TeamID']] = $db->data['TeamAbbrev'];\n }\n \n if(!$db->Exists(\"SELECT COUNT( s.player_id ) AS Matches, SUM( s.runs ) AS Runs, MAX( s.runs ) AS HS, SUM( s.notout ) AS Notouts, COUNT( s.player_id ) - SUM( s.how_out=1 ) AS Innings, SUM( s.runs ) / ((COUNT( s.player_id ) - SUM( s.notout )) - SUM(( s.how_out=1 ))) AS Average, SUM( s.runs ) * 100 / SUM( s.balls) AS StrikeRate, s.player_id, p.PlayerID, LEFT(p.PlayerFName,1) AS PlayerInitial, p.PlayerFName, p.PlayerLName FROM scorecard_batting_details s INNER JOIN players p ON s.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON s.game_id = g.game_id GROUP BY s.player_id\")) {\n \n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\"; \n \n if($option == \"byseason\") echo \"<p>There are no batting statistics in the database for the year <b>$statistics.</b></p>\\n\";\n if($option == \"allcareer\") echo \"<p>There are no batting statistics in the database.</p>\\n\";\n if($option == \"teamcareer\") echo \"<p>There are no batting statistics in the database for the team <b>$team.</b></p>\\n\";\n \n echo \"<p>&laquo; <a href=\\\"javascript:history.back()\\\">back to selection</a></p>\\n\";\n echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\"; \n\n } else {\n\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"10\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n\n echo \"<table width=\\\"100%\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" border=\\\"0\\\">\\n\";\n echo \"<tr>\\n\";\n echo \" <td align=\\\"left\\\" valign=\\\"top\\\">\\n\";\n \n if($option == \"byseason\") echo \" <a href=\\\"/index.php\\\">Home</a> &raquo; <a href=\\\"/statistics.php\\\">Statistics</a> &raquo; $statistics statistics</p>\\n\";\n if($option == \"allcareer\") echo \" <a href=\\\"/index.php\\\">Home</a> &raquo; <a href=\\\"/statistics.php\\\">Statistics</a> &raquo; Career statistics</p>\\n\";\n if($option == \"teamcareer\") echo \" <a href=\\\"/index.php\\\">Home</a> &raquo; <a href=\\\"/statistics.php\\\">Statistics</a> &raquo; {$teams[$team]} statistics</p>\\n\";\n \n echo \" </td>\\n\";\n //echo \" <td align=\\\"right\\\" valign=\\\"top\\\">\\n\";\n //require (\"navtop.php\");\n //echo \" </td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n\n $db->QueryRow(\"\n SELECT\n MIN(game_date) AS earlydate\n FROM\n scorecard_game_details\n \");\n $db->BagAndTag();\n \n $d = sqldate_to_string($db->data['earlydate']); \n $inc = '';\n if(date(\"Y\") == $statistics){\n \t$inc = \"Including Knock-Outs.\";\n }\n if($option == \"byseason\") {\n if($sort == \"Average\") echo \"<b class=\\\"16px\\\">$statistics - Rookie Batting - Highest Averages</b><br> $inc Qualification 25 runs<br><br>\\n\";\n if($sort == \"Runs\") echo \"<b class=\\\"16px\\\">$statistics - Rookie Batting - Most Runs</b><br>$inc Qualification 25 runs<br><br>\\n\";\n }\n \n if($option == \"allcareer\") {\n if($sort == \"Average\") echo \"<b class=\\\"16px\\\">Career Batting - Highest Averages</b><br>From <b>$d</b> to the present. Qualification 100 runs<br><br>\\n\";\n if($sort == \"Runs\") echo \"<b class=\\\"16px\\\">Career Batting - Most Runs</b><br>From <b>$d</b> to the present. Qualification 100 runs<br><br>\\n\"; \n }\n \n if($option == \"teamcareer\") {\n if($sort == \"Average\") echo \"<b class=\\\"16px\\\">{$teams[$team]} Career Batting - Highest Averages</b><br>From <b>$d</b> to the present. Qualification 3 innings<br><br>\\n\";\n if($sort == \"Runs\") echo \"<b class=\\\"16px\\\">{$teams[$team]} Career Batting - Most Runs</b><br>From <b>$d</b> to the present. Qualification 3 innings<br><br>\\n\"; \n }\n\n //////////////////////////////////////////////////////////////////////////////////////////\n // Statistics Option Box\n //////////////////////////////////////////////////////////////////////////////////////////\n\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"3\\\" bordercolor=\\\"$bluebdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$bluebdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">OPTIONS</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td class=\\\"trrow1\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\">\\n\";\n\n \n // List by season for schedule\n\n echo \"<p class=\\\"10px\\\">Season: \";\n echo \"<select name=ccl_mode onChange=\\\"gotosite(this.options[this.selectedIndex].value)\\\">\\n\";\n echo \"<option value=\\\"\\\" selected>year</option>\\n\";\n\n// 19-Aug-2009\n$db->Query(\"SELECT la.season, se.SeasonName FROM scorecard_batting_details la INNER JOIN seasons se ON la.season = se.SeasonID GROUP BY la.season ORDER BY se.SeasonName DESC\");\n// $db->Query(\"SELECT la.season, se.SeasonName FROM scorecard_batting_details la INNER JOIN seasons se ON la.season = se.SeasonID WHERE se.SeasonName NOT LIKE '%KO%' GROUP // BY la.season ORDER BY se.SeasonName DESC\");\n for ($x=0; $x<$db->rows; $x++) {\n $db->GetRow($x);\n $db->BagAndTag();\n $sen = $db->data['SeasonName'];\n $sid = $db->data['season'];\n \t$selected = \"\";\n\t if ($statistics == $sen) {\n\t \t$selected = \"selected\";\n\t }\n if($sort == \"Average\") echo \" <option $selected value=\\\"$PHP_SELF?option=byseason&statistics=$sen&sort=Average&sort2=Runs&ccl_mode=8\\\" class=\\\"10px\\\">$sen</option>\\n\";\n if($sort == \"Runs\") echo \" <option $selected value=\\\"$PHP_SELF?option=byseason&statistics=$sen&sort=Runs&sort2=Average&ccl_mode=8\\\" class=\\\"10px\\\">$sen</option>\\n\";\n }\n if($sort == \"Average\") echo \" <option $selected value=\\\"$PHP_SELF?option=byseason&statistics=&sort=Average&sort2=Runs&ccl_mode=8\\\" class=\\\"10px\\\">all</option>\\n\";\n if($sort == \"Runs\") echo \" <option $selected value=\\\"$PHP_SELF?option=byseason&statistics=&sort=Runs&sort2=Average&ccl_mode=8\\\" class=\\\"10px\\\">all</option>\\n\";\n\n echo \" </select></p>\\n\";\n\n echo \" </td>\\n\";\n echo \" </tr>\\n\";\n echo \"</table><br>\\n\";\n \n\n echo \"<table width=\\\"100%\\\" border=\\\"1\\\" cellspacing=\\\"0\\\" cellpadding=\\\"0\\\" bordercolor=\\\"$greenbdr\\\" align=\\\"center\\\">\\n\";\n echo \" <tr>\\n\";\n echo \" <td bgcolor=\\\"$greenbdr\\\" class=\\\"whitemain\\\" height=\\\"23\\\">&nbsp;BATTING STATS</td>\\n\";\n echo \" </tr>\\n\";\n echo \" <tr>\\n\";\n echo \" <td class=\\\"trrow1\\\" valign=\\\"top\\\" bordercolor=\\\"#FFFFFF\\\" class=\\\"main\\\" colspan=\\\"2\\\">\\n\"; \n \n //////////////////////////////////////////////////////////////////////////////////////////\n // begin batting statistics\n //////////////////////////////////////////////////////////////////////////////////////////\n\n echo \"<table width=\\\"100%\\\" cellspacing=\\\"1\\\" cellpadding=\\\"3\\\" class=\\\"tablehead\\\">\\n\";\n echo \" <tr class=\\\"colhead\\\">\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"2%\\\"><b>#</b></td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"23%\\\"><b>NAME</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"4%\\\"><b>M</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"4%\\\"><b>I</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"6%\\\"><b>NO</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\"><b>RUNS</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"6%\\\"><b>HS</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\"><b>AVE</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\"><b>SR</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\"><b>100</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\"><b>50</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\"><b>Ct</b></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\"><b>St</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><b>TEAM</b></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><b>TEAM 2</b></td>\\n\";\n echo \" </tr>\\n\";\n $season_year = substr($statistics, 0, 4);\n\t$final_players = '';\n\t$db_roo_all->Query(\" SELECT DISTINCT playerid, sum(bat.runs) as sum_runs FROM scorecard_game_details gd, scorecard_batting_details bat, players p WHERE gd.game_id = bat.game_id AND bat.player_id = p.playerid AND YEAR( game_date ) = $season_year group by 1 order by sum_runs desc\");\n\tfor ($i=0; $i<$db_roo_all->rows; $i++) {\n\t\t$db_roo_all->GetRow($i);\n\t\t$db_roo_all->BagAndTag();\n\t\t$playerid_all = $db_roo_all->data['playerid'];\n\t\t//echo $db_roo_all->data[sum_runs].\"<BR>\";\n\t\t$db_roo_min->Query(\" SELECT MIN( gd1.game_date ) as min_date FROM scorecard_game_details gd1, scorecard_batting_details bat1 WHERE gd1.game_id = bat1.game_id AND bat1.player_id = $playerid_all \");\n\t\t$j = 0;\n\t\t$db_roo_min->GetRow($j);\n\t\t$db_roo_min->BagAndTag();\n\t\t$min_date = $db_roo_min->data['min_date'];\n\t\tif(substr($min_date,0,4) == $season_year) {\n\t\t\tif($final_players == '') {\n\t\t\t\t$final_players = $playerid_all;\n\t\t\t}else{\n\t\t\t\t$final_players .= \",\". $playerid_all;\n\t\t\t}\n\t\t}\n\t}\n\t$array_final_player = explode(\",\", $final_players);\n\t\n\t$db_roo_sea->Query(\"Select player_id, sum(runs) from scorecard_batting_details, seasons where seasons.seasonid=scorecard_batting_details.season AND SeasonName LIKE '%{$statistics}%' AND player_id in (\".$final_players.\") group by 1 order by 2 desc\");\t\n\t\n\t$i = 0;\n for ($k=0; $k<$db_roo_sea->rows; $k++) {\n $db_roo_sea->GetRow($k);\n\t\t$db_roo_sea->BagAndTag();\n $playerid = $db_roo_sea->data['player_id'];\n \n \n if($option == \"byseason\") $db->Query(\"SELECT t.TeamID TeamID, t.TeamAbbrev TeamAbbrev, t2.TeamID TeamID2, t2.TeamAbbrev TeamAbbrev2, COUNT( s.player_id ) AS Matches, SUM( s.runs ) AS Runs, SUM( s.notout ) AS Notouts, COUNT( s.player_id ) - SUM( s.how_out=1 ) AS Innings, SUM( s.runs ) / ((COUNT( s.player_id ) - SUM( s.notout )) - SUM(( s.how_out=1 ))) AS Average, SUM( s.runs ) * 100 / SUM( s.balls) AS StrikeRate, s.player_id, p.PlayerID, LEFT(p.PlayerFName,1) AS PlayerInitial, p.PlayerFName, p.PlayerLName, p.PlayerLAbbrev FROM scorecard_batting_details s INNER JOIN players p ON s.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON s.game_id = g.game_id INNER JOIN teams t ON p.PlayerTeam = t.TeamID LEFT OUTER JOIN teams t2 ON p.PlayerTeam2 = t2.TeamID INNER JOIN seasons n ON g.season = n.SeasonID WHERE n.SeasonName LIKE '%{$statistics}%' AND s.player_id = \".$playerid .\" AND (g.league_id=1 OR g.league_id=4) GROUP BY s.player_id HAVING (SUM( s.runs )) >=25 ORDER BY $sort DESC, $sort2 DESC\");\n if($option == \"allcareer\") $db->Query(\"SELECT t.TeamID TeamID, t.TeamAbbrev TeamAbbrev, t2.TeamID TeamID2, t2.TeamAbbrev TeamAbbrev2, COUNT( s.player_id ) AS Matches, SUM( s.runs ) AS Runs, SUM( s.notout ) AS Notouts, COUNT( s.player_id ) - SUM( s.how_out=1 ) AS Innings, SUM( s.runs ) / ((COUNT( s.player_id ) - SUM( s.notout )) - SUM(( s.how_out=1 ))) AS Average, SUM( s.runs ) * 100 / SUM( s.balls) AS StrikeRate, s.player_id, p.PlayerID, LEFT(p.PlayerFName,1) AS PlayerInitial, p.PlayerFName, p.PlayerLName, p.PlayerLAbbrev FROM scorecard_batting_details s INNER JOIN players p ON s.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON s.game_id = g.game_id INNER JOIN teams t ON p.PlayerTeam = t.TeamID LEFT OUTER JOIN teams t2 ON p.PlayerTeam2 = t2.TeamID WHERE (g.league_id=1 OR g.league_id=4) AND s.player_id = \".$playerid.\" GROUP BY s.player_id HAVING (SUM( s.runs )) >=100 ORDER BY $sort DESC, $sort2 DESC\");\n if($option == \"teamcareer\") $db->Query(\"SELECT t.TeamID TeamID, t.TeamAbbrev TeamAbbrev, t2.TeamID TeamID2, t2.TeamAbbrev TeamAbbrev2, COUNT( s.player_id ) AS Matches, SUM( s.runs ) AS Runs, SUM( s.notout ) AS Notouts, COUNT( s.player_id ) - SUM( s.how_out=1 ) AS Innings, SUM( s.runs ) / ((COUNT( s.player_id ) - SUM( s.notout )) - SUM(( s.how_out=1 ))) AS Average, SUM( s.runs ) * 100 / SUM( s.balls) AS StrikeRate, s.player_id, p.PlayerID, LEFT(p.PlayerFName,1) AS PlayerInitial, p.PlayerFName, p.PlayerLName, p.PlayerLAbbrev FROM scorecard_batting_details s INNER JOIN players p ON s.player_id = p.PlayerID INNER JOIN scorecard_game_details g ON s.game_id = g.game_id INNER JOIN teams t ON p.PlayerTeam = t.TeamID LEFT OUTER JOIN teams t2 ON p.PlayerTeam2 = t2.TeamID WHERE (p.PlayerTeam = $team OR p.PlayerTeam2 = $team) AND (g.league_id=1 OR g.league_id=4) AND s.player_id = \".$playerid.\" GROUP BY s.player_id HAVING (COUNT( s.player_id )) >=3 ORDER BY $sort DESC, $sort2 DESC\");\n\n $db->BagAndTag();\n\n // instantiate new db class\n $subdb = new mysql_class($dbcfg['login'],$dbcfg['pword'],$dbcfg['server']);\n $subdb->SelectDB($dbcfg['db']);\n\t\n for ($r=0; $r<$db->rows; $r++) {\n $db->GetRow($r); \n\t$i = $i + 1;\n $playerid = $db->data['player_id'];\n $init = $db->data['PlayerInitial'];\n $fname = $db->data['PlayerFName'];\n $lname = $db->data['PlayerLName'];\n $labbr = $db->data['PlayerLAbbrev'];\n $match = $db->data['Matches'];\n $scrun = $db->data['Runs'];\n //$schig = $db->data['HS']; \n $teama = $db->data['TeamAbbrev'];\n $teamid = $db->data['TeamID'];\n $teama2 = $db->data['TeamAbbrev2'];\n $teamid2 = $db->data['TeamID2'];\n\n $innings = $db->data['Innings'];\n\n if($db->data['Notouts'] != 0) {\n $notouts = $db->data['Notouts'];\n } else {\n $notouts = \"-\";\n }\n\n if($db->data['Average'] != \"\") {\n $average = $db->data['Average'];\n } else {\n $average = \"-\";\n }\n\n if($db->data['Average'] != \"\") {\n $average = $db->data['Average'];\n\t $average = number_format($average, 2);\n } else {\n $average = \"-\";\n }\n\n if($db->data['StrikeRate'] != \"\") {\n $sr = $db->data['StrikeRate'];\n\t $sr = number_format($sr, 2);\n } else {\n $sr = \"-\";\n }\n\n\n // Get Hundreds\n \n if($option == \"byseason\") $subdb->QueryRow(\"SELECT COUNT(b.runs) AS Hundred FROM scorecard_batting_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND s.SeasonName LIKE '%{$statistics}%' AND b.runs >= 100\");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT COUNT(b.runs) AS Hundred FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND b.runs >= 100\");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT COUNT(b.runs) AS Hundred FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND (b.team = $team OR (b.team IN (SELECT PlayerTeam from players where PlayerTeam2 = $team AND PlayerID = $playerid) OR b.team IN (SELECT PlayerTeam2 from players where PlayerTeam = $team AND player_id = $playerid))) AND b.runs >= 100\");\n \n if($subdb->data['Hundred'] != \"0\") {\n $schun = $subdb->data['Hundred']; \n } else {\n $schun = \"-\";\n }\n\n // Get Fifties\n \n if($option == \"byseason\") $subdb->QueryRow(\"SELECT COUNT(b.runs) AS Fifty FROM scorecard_batting_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND s.SeasonName LIKE '%{$statistics}%' AND (b.runs BETWEEN 50 AND 99) \");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT COUNT(b.runs) AS Fifty FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND (b.runs BETWEEN 50 AND 99) \");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT COUNT(b.runs) AS Fifty FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND (b.team = $team OR (b.team IN (SELECT PlayerTeam from players where PlayerTeam2 = $team AND PlayerID = $playerid) OR b.team IN (SELECT PlayerTeam2 from players where PlayerTeam = $team AND player_id = $playerid))) AND (b.runs BETWEEN 50 AND 99) \"); \n \n if($subdb->data['Fifty'] != \"0\") {\n $scfif = $subdb->data['Fifty']; \n } else {\n $scfif = \"-\";\n }\n\n // Get Catches\n \n if($option == \"byseason\") $subdb->QueryRow(\"SELECT COUNT(b.assist) AS Caught FROM scorecard_batting_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.assist = $playerid AND s.SeasonName LIKE '%{$statistics}%' AND (b.how_out = 4 OR b.how_out = 17)\");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT COUNT(b.assist) AS Caught FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.assist = $playerid AND (b.how_out = 4 OR b.how_out = 17)\");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT COUNT(b.assist) AS Caught FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.assist = $playerid AND (b.opponent = $team OR (b.opponent IN (SELECT PlayerTeam from players where PlayerTeam2 = $team) OR b.opponent IN (SELECT PlayerTeam2 from players where PlayerTeam = $team))) AND (b.how_out = 4 OR b.how_out = 17)\");\n\n $scctc = $subdb->data['Caught']; \n\n // Get Caught and Bowleds\n\n if($option == \"byseason\") $subdb->QueryRow(\"SELECT COUNT(b.bowler) AS CandB FROM scorecard_batting_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.bowler = $playerid AND s.SeasonName LIKE '%{$statistics}%' AND b.how_out = 5\");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT COUNT(b.bowler) AS CandB FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.bowler = $playerid AND b.how_out = 5\");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT COUNT(b.bowler) AS CandB FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.bowler = $playerid AND (b.opponent = $team OR (b.opponent IN (SELECT PlayerTeam from players where PlayerTeam2 = $team) OR b.opponent IN (SELECT PlayerTeam2 from players where PlayerTeam = $team))) AND b.how_out = 5\");\n\n $sccab = $subdb->data['CandB']; \n\n if($scctc + $sccab != \"0\") {\n $sccat = $scctc + $sccab;\n } else {\n $sccat = \"-\";\n }\n \n // Get Stumpings\n\n if($option == \"byseason\") $subdb->QueryRow(\"SELECT COUNT(b.assist) AS Stumped FROM scorecard_batting_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.assist = $playerid AND s.SeasonName LIKE '%{$statistics}%' AND b.how_out = 10\");\n if($option == \"allcareer\") $subdb->QueryRow(\"SELECT COUNT(b.assist) AS Stumped FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.assist = $playerid AND b.how_out = 10\");\n if($option == \"teamcareer\") $subdb->QueryRow(\"SELECT COUNT(b.assist) AS Stumped FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.assist = $playerid AND (b.opponent = $team OR (b.opponent IN (SELECT PlayerTeam from players where PlayerTeam2 = $team) OR b.opponent IN (SELECT PlayerTeam2 from players where PlayerTeam = $team))) AND b.how_out = 10\");\n\n if($subdb->data['Stumped'] != \"0\") {\n $scstu = $subdb->data['Stumped']; \n } else {\n $scstu = \"-\";\n }\n \n // Get Highest Score\n\n if($option == \"byseason\") {\n\t\tif (!$subdb->Exists(\"SELECT b.notout, MAX(b.runs) AS HS FROM scorecard_batting_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND s.SeasonName LIKE '%{$statistics}%' GROUP BY b.notout ORDER BY HS DESC LIMIT 1\")) {\n\t\t\t$schig = \"\";\n\t\t\t$scnot = \"\";\n\t\t} else {\n\t\t\t$subdb->QueryRow(\"SELECT b.notout, MAX(b.runs) AS HS FROM scorecard_batting_details b INNER JOIN seasons s ON b.season = s.SeasonID INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid AND s.SeasonName LIKE '%{$statistics}%' GROUP BY b.notout ORDER BY HS DESC LIMIT 1\");\n\t\t\t$schig = $subdb->data['HS'];\n\t\t\t$scnot = $subdb->data['notout'];\n\t\t}\n\t}\n if($option == \"allcareer\" || $option == \"teamcareer\") {\n\t\tif (!$subdb->Exists(\"SELECT b.notout, MAX(b.runs) AS HS FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid GROUP BY b.notout ORDER BY HS DESC LIMIT 1\")) {\n\t\t\t$schig = \"\";\n\t\t\t$scnot = \"\";\n\t\t} else {\n\t\t\t$subdb->QueryRow(\"SELECT b.notout, MAX(b.runs) AS HS FROM scorecard_batting_details b INNER JOIN scorecard_game_details g ON b.game_id = g.game_id WHERE (g.league_id=1 OR g.league_id=4) AND b.player_id = $playerid GROUP BY b.notout ORDER BY HS DESC LIMIT 1\");\n\t\t\t$schig = $subdb->data['HS'];\n\t\t\t$scnot = $subdb->data['notout'];\n\t\t}\n\t}\n\t\n if($i % 2) {\n echo \"<tr class=\\\"trrow1\\\">\\n\";\n } else {\n echo \"<tr class=\\\"trrow2\\\">\\n\";\n }\n \n echo \" <td align=\\\"left\\\" width=\\\"2%\\\">\";\n echo ($i);\n echo \" </td>\\n\";\n echo \" <td align=\\\"left\\\" width=\\\"23%\\\"><a href=\\\"players.php?players=$playerid&ccl_mode=1\\\" class=\\\"statistics\\\">\";\n\n if($lname == \"\" && $fname == \"\") {\n echo \"\";\n } elseif($fname != \"\" && $lname != \"\" && $labbr != \"\") {\n echo \"$fname $labbr\";\n } elseif($fname != \"\" && $lname != \"\" && $labbr == \"\") {\n echo \"$fname $lname\"; \n } else {\n echo \"$fname\\n\";\n } \n\n echo \" </a></td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"4%\\\">$match</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"4%\\\">$innings</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"6%\\\">$notouts</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"5%\\\">$scrun</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"6%\\\">$schig\";\n if($scnot == \"1\") echo \"*\";\n echo \" </td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\">$average</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"7%\\\">$sr</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\">$schun</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\">$scfif</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\">$sccat</td>\\n\";\n echo \" <td align=\\\"center\\\" width=\\\"5%\\\">$scstu</td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><a href=\\\"/statistics.php?statistics=$statistics&team=$teamid&ccl_mode=2\\\" class=\\\"statistics\\\">$teama</a></td>\\n\";\n echo \" <td align=\\\"right\\\" width=\\\"8%\\\"><a href=\\\"/statistics.php?statistics=$statistics&team=$teamid2&ccl_mode=2\\\" class=\\\"statistics\\\">$teama2</a></td>\\n\";\n echo \" </tr>\\n\";\n\n }\n }\n\n echo \"</table>\\n\";\n\n echo \"</td>\\n\";\n echo \"</tr>\\n\";\n echo \"</table>\\n\";\n\n echo \" </td>\\n\";\n echo \" </tr>\\n\";\n echo \"</table>\\n\";\n\n }\n}", "title": "" }, { "docid": "a9c804cfc1a9dab0456d9f5758213356", "score": "0.43686318", "text": "function syn_fund_manager_funds_TT_from_How() {\n\t\t//$sql = \"select fund_code, manager_name, fund_size, maxlos, average, rank, payback from test_fund_manager_funds order by fund_code\";\n\t\t$sql = \"select * from test_fund_manager_funds order by fund_code\";\n\t\t$source_data = DB::getData($sql);\n\t\t$source_size = count($source_data);\n\n\n\t\t$sql = \"select fund_code, manager_name from fund_manager_funds order by fund_code\";\n\t\t$target_data = DB::getData($sql);\n\t\t$target_size = count($target_data);\n\n\t\t// check for match, then update\n\t\t$source_pos = 0;\n\t\t$target_pos = 0;\n\t\t$insert_count = 0;\n\t\t$margin = 50;\n\t\t$source_miss = 0;\n\t\t$target_miss = 0;\n\t\t$source_start = 0;\n\t\t$source_end = -1;\n\t\t$target_start = 0;\n\t\t$target_end = -1;\n\t\t$sql = \"\";\n\t\t$symbol_list = \"\";\n\t\t$name_list = \"\";\n\t\tfor (; $source_start < $source_size; ) {\n\t\t\t$this->get_start_and_end_pos($source_data, \"fund_code\", $source_size, $source_start, $source_end);\n\t\t\tfor (; $target_start < $target_size; ) {\n\t\t\t\t$this->get_start_and_end_pos($target_data, \"fund_code\", $target_size, $target_start, $target_end);\n\t\t\t\t$source_id = $source_data[$source_start][\"fund_code\"];\n\t\t\t\t$target_id = $target_data[$target_start][\"fund_code\"];\n\n\t\t\t\tif ($target_id == $source_id) {\n\t\t\t\t\t// do it\n\t\t\t\t\t$this->syn_TT_from_How_per_fund($sql, $symbol_list, $name_list, $insert_count, $source_data, $source_start, $source_end, $target_data, $target_start, $target_end, $margin);\n\n\t\t\t\t\techo \"{$source_id}, {$source_data[$source_pos][\"manager_name\"]}, {$target_data[$target_pos][\"fund_code\"]}\\n\";\n\t\t\t\t\t$source_start = $source_end + 1;\n\t\t\t\t\t$target_start = $target_end + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t} else if ($source_id < $target_id) {\n\t\t\t\t\t// target miss\n\t\t\t\t\t$target_miss ++;\n\t\t\t\t\t$this->get_start_and_end_pos($source_data, \"fund_code\", $source_size, $source_start, $source_end);\n\n\t\t\t\t\t$source_start = $source_end + 1;\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\t// source miss\n\t\t\t\t\t$source_miss ++;\n\t\t\t\t\t$this->get_start_and_end_pos($target_data, \"fund_code\", $target_size, $target_start, $target_end);\n\t\t\t\t\t$target_start = $target_end + 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($target_start >= $target_size) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// do remain\n\t\tif ($insert_count > 0) {\n\t\t\techo \"do sql\\n\";\n\t\t\t$sql[0] = $sql[0].\" END\";\n\t\t\t$sql[1] = $sql[1].\" END\";\n\t\t\t$sql[2] = $sql[2].\" END\";\n\t\t\t$sql[3] = $sql[3].\" END\";\n\t\t\t$sql[4] = $sql[4].\" END\";\n\t\t\t//$sql[5] = $sql[5].\" END\";\n\t\t\t//$sql[6] = $sql[6].\" END\";\n\t\t\t$final_sql = \"update ignore fund_manager_funds set \";\n\t\t\t$final_sql = $final_sql.$sql[0];\n\t\t\t$final_sql = $final_sql.$sql[1];\n\t\t\t$final_sql = $final_sql.$sql[2];\n\t\t\t$final_sql = $final_sql.$sql[3];\n\t\t\t$final_sql = $final_sql.$sql[4];\n\t\t\t//$final_sql = $final_sql.$sql[5];\n\t\t\t//$final_sql = $final_sql.$sql[6];\n\t\t\t$final_sql = $final_sql.\" WHERE fund_code in ({$symbol_list}) and manager_name in ({$name_list})\";\n\n\t\t\tvar_dump($final_sql);\n\t\t\t$ret = DB::runSql($final_sql);\n\t\t\t$sql = \"\";\n\t\t\t$name_list = \"\";\n\t\t\t$symbol_list = \"\";\n\t\t\t$insert_count = 0;\n\t\t}\n\n\t\techo \"source missing : \";\n\t\techo \"{$source_miss} \\n\";\n\t\techo \"target missing: \";\n\t\techo \"{$target_miss} \\n\";\n\t}", "title": "" }, { "docid": "b846d6caf6849f9dec5ba712ac18ead4", "score": "0.43597448", "text": "function pfb_filterrules() {\n\tglobal $pfb;\n\n\t$rule_list\t\t= array();\n\t$rule_list['id']\t= array();\n\t$rule_list['other']\t= array();\n\t$rule_list['int']\t= array();\n\n\texec(\"{$pfb['pfctl']} -vvsr 2>&1\", $results);\n\tif (!empty($results)) {\n\t\tforeach ($results as $result) {\n\t\t\tif (substr($result, 0, 1) == '@') {\n\n\t\t\t\t$type = strstr(ltrim(strstr($result, ' ', FALSE), ' '), ' ', TRUE);\n\t\t\t\tif (in_array($type, array('block', 'pass', 'match'))) {\n\n\t\t\t\t\t// Since pfSense CE 2.6 and pfSense Plus 22.01, pf rules use an 'ridentifier' string\n\t\t\t\t\tif (strrpos($result, 'ridentifier') !== FALSE) {\n\t\t\t\t\t\t$id_begin_delim = 'ridentifier ';\n\t\t\t\t\t\t$id_end_delim = ' ';\n\t\t\t\t\t} elseif (strpos($result, '(') !== FALSE && strpos($result, ')') !== FALSE) {\n\t\t\t\t\t\t$id_begin_delim = '(';\n\t\t\t\t\t\t$id_end_delim = ')';\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Get the rule ID\n\t\t\t\t\t$id_begin_offset\t= strpos($result, $id_begin_delim) + strlen($id_begin_delim);\n\t\t\t\t\t$id_end_offset\t\t= strpos($result, $id_end_delim, $id_begin_offset);\n\n\t\t\t\t\tif ($id_end_offset !== FALSE) {\n\t\t\t\t\t\t$id_length = $id_end_offset - $id_begin_offset;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$id_length = strlen($result) - $id_begin_offset;\n\t\t\t\t\t}\n\t\t\t\t\t$id = substr($result, $id_begin_offset, $id_length);\n\t\t\t\t\tif (!is_numeric($id)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add the rule to the list\n\t\t\t\t\tif (strpos($result, ' <pfB_') !== FALSE) {\n\t\t\t\t\t\t$descr = ltrim(stristr($result, '<pfb_', FALSE), '<');\n\t\t\t\t\t\t$descr = strstr($descr, ':', TRUE);\n\t\t\t\t\t\t$type = strstr(ltrim(strstr($result, ' ', FALSE), ' '), ' ', TRUE);\n\t\t\t\t\t\tif ($type == 'match') {\n\t\t\t\t\t\t\t$type = 'unkn(%u)';\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\tif (!is_array($rule_list[$id])) {\n\t\t\t\t\t\t\t$rule_list[$id] = array();\n\t\t\t\t\t\t}\n\t\n\t\t\t\t\t\t$rule_list['id'][]\t= $id;\n\t\t\t\t\t\t$rule_list[$id]['name']\t= $descr;\n\t\t\t\t\t\t$rule_list[$id]['type']\t= $type;\n\t\n\t\t\t\t\t\t$int = strstr(ltrim(strstr($result, ' on ', FALSE), ' on '), ' ', TRUE);\n\t\t\t\t\t\tif (!empty($int)) {\n\t\t\t\t\t\t\t $rule_list['int'][$int] = '';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t// All other non-pfBlockerNG Tracker IDs\n\t\t\t\t\t\t$rule_list['other'][$id] = '';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $rule_list;\n}", "title": "" }, { "docid": "cca2346fe9a1b8a5fba5cce25e3ad7b0", "score": "0.43503386", "text": "public function main()\n {\n $topEventCreator = getTopCount('createdEvents', 'created_events', 1) ;\n $topChallengeCreator = getTopCount('createdChallenges', 'created_challenges', 1) ;\n $topappliedEvents = getTopCount('appliedEvents', 'applied_events', 1) ;\n $topchallenged = getTopCount('challengeEvents', 'challenge_events', 1) ;\n $topcandidatedEvents = getTopCount('candidatedEvents', 'candidated_events', 1) ;\n $topPlayerReservations = getTopCount('PlayerReservations', 'Player_reservations', 1) ;\n ///////////////// get top club /////////////////////\n $topclubBranches = getTopCount('clubBranches', 'club_branches', 2) ;\n $topclubPlaygrounds = getTopCount('clubPlaygrounds', 'club_playgrounds', 2) ;\n $topclubReservation = getTopCount('clubReservation', 'club_reservation', 2) ;\n \n ///////////////// get top 10 players /////////////////////\n $topTenEventCreator = getTopCount('createdEvents', 'created_events', 1, 10) ;\n $topTenChallengeCreator = getTopCount('createdChallenges', 'created_challenges', 1, 10) ;\n $topTenappliedEvents = getTopCount('appliedEvents', 'applied_events', 1, 10) ;\n $topTenchallenged = getTopCount('challengeEvents', 'challenge_events', 1, 10) ;\n $topTencandidated = getTopCount('candidatedEvents', 'candidated_events', 1, 10) ;\n $topTenReservations = getTopCount('PlayerReservations', 'Player_reservations', 1, 10) ;\n ///////////////// get top 10 clubs /////////////////////\n $topTenclubBranches = getTopCount('clubBranches', 'club_branches', 2, 10) ;\n $topTenclubPlaygrounds = getTopCount('clubPlaygrounds', 'club_playgrounds', 2, 10) ;\n $topTenclubReservation = getTopCount('clubReservation', 'club_reservation', 2, 10) ;\n \n //return $topTenReservations;\n\n $playersCount = User::where('type', 1)->count() ;\n $clubsCount = User::where('type', 2)->count() ;\n $clubBranchesCount = clubBranche::count() ;\n $playgroundsCount = Playground::count() ;\n $eventsCount = Event::count() ;\n $challengesCount = Challenge::count() ;\n $reservationsCount = Reservation::count() ;\n $sportsCount = Sport::count() ;\n \n //return $playgroundsCount ;\n return view('admin.home', compact('playersCount', \n 'clubsCount', \n 'clubBranchesCount', \n 'playgroundsCount', \n 'eventsCount',\n 'challengesCount',\n 'reservationsCount',\n 'sportsCount',\n\n 'topEventCreator',\n 'topChallengeCreator',\n 'topappliedEvents',\n 'topchallenged',\n 'topcandidatedEvents',\n 'topPlayerReservations',\n 'topclubBranches',\n 'topclubPlaygrounds',\n 'topclubReservation',\n 'topTenEventCreator',\n 'topTenChallengeCreator',\n 'topTenappliedEvents',\n 'topTenchallenged',\n 'topTencandidated',\n 'topTenReservations',\n 'topTenclubBranches',\n 'topTenclubPlaygrounds',\n 'topTenclubReservation'\n ));\n }", "title": "" }, { "docid": "0ad2996e1401d1c6815382b9bb0d7a41", "score": "0.4344158", "text": "function travelTogetherSeperateRoom($passenger_ids_sep,$passenger_ids_group,$group_id){\n\t\t\t\t\t$db \t\t= $this->getDbo();\n\t\t\t\t\t$user = JFactory::getUser(); \t\t\n\t\t\t\t\tif($passenger_ids_group){\n\t\t\t\t\t\tforeach($passenger_ids_group as $pg){\n\t\t\t\t\t\t\t$type_room = count($passenger_ids_group)-count($passenger_ids_sep);\n\t\t\t\t\t\t\t$travel_together = 0;\n\t\t\t\t\t\t\t$status_share_room=0;\n\t\t\t\t\t\t\tforeach($passenger_ids_sep as $ps){\n\t\t\t\t\t\t\t\tif($ps==$pg){\n\t\t\t\t\t\t\t\t\t$type_room=1;\n\t\t\t\t\t\t\t\t\t$status_share_room=0;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t$detailgroup=$this->getDetailgroup($pg,$group_id);\t\t\t\t\t\t\n\t\t\t\t\t\t\t$query=\"UPDATE #__sfs_status_share_room SET status_share_room='\".$status_share_room.\"', type_room='\".$type_room.\"' where id='\".$detailgroup->share_room_id.\"'\";\t\t\n\n\t\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t\t$db->execute();\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}", "title": "" }, { "docid": "b3d818f45c73f6726b37256b14daf909", "score": "0.434166", "text": "function addQuery($esoTalk, $query)\n{\n\t$_SESSION[\"queries\"][] = array($query, round($this->microtimeFloat() - $this->queryTimer, 4));\n}", "title": "" }, { "docid": "27ae18136ee150fb984dcfa6a09dd6c2", "score": "0.4335538", "text": "function SjekkPlassering($Bruker)\n {\n global $Timestamp;\n \n $Kidnappet = mysql_query(\"SELECT * FROM kidnapping WHERE offer='$Bruker'\");\n $Sykehus = mysql_query(\"SELECT * FROM sykehus WHERE brukernavn='$Bruker' AND timestampen_ute > $Timestamp\");\n \n $Bunker = mysql_query(\"SELECT * FROM bunker_invite WHERE kis_invitert='$Bruker' AND godtatt_elle LIKE '1'\");\n \n $Fengsel = mysql_query(\"SELECT * FROM fengsel WHERE brukernavn='$Bruker'\");\n \n if(empty($Bruker))\n {\n header(\"Location: index.php\");\n }\n\n elseif(mysql_num_rows($Kidnappet) > '0')\n {\n header(\"Location: game.php?side=kidnappet\");\n }\n\n elseif(mysql_num_rows($Sykehus) > '0')\n {\n header(\"Location: game.php?side=Sykehus\");\n }\n\n elseif(mysql_num_rows($Bunker) > '0')\n {\n header(\"Location: game.php?side=bunker\");\n }\n\n elseif(mysql_num_rows($Fengsel) > '0')\n {\n header(\"Location: game.php?side=Fengsel\");\n }\n else\n {\n return 'klar';\n }\n\n }", "title": "" }, { "docid": "a5f503def70f072a3a1be7a30741e918", "score": "0.43342373", "text": "public /**\n * Our complex fighting algorithm!\n *\n * @param Ship $ship1\n * @param $ship1Quantity\n * @param Ship $ship2\n * @param $ship2Quantity\n * @return BattleResult\n */\n function battle( Ship $ship1, $ship1Quantity, Ship $ship2, $ship2Quantity)\n {\n $ship1Health = $ship1->getStrength() * $ship1Quantity;\n $ship2Health = $ship2->getStrength() * $ship2Quantity;\n\n $ship1UsedJediPowers = false;\n $ship2UsedJediPowers = false;\n while ($ship1Health > 0 && $ship2Health > 0) {\n // first, see if we have a rare Jedi hero event!\n if ($this->didJediDestroyShipUsingTheForce($ship1)) {\n $ship2Health = 0;\n $ship1UsedJediPowers = true;\n\n break;\n }\n if ($this->didJediDestroyShipUsingTheForce($ship2)) {\n $ship1Health = 0;\n $ship2UsedJediPowers = true;\n\n break;\n }\n\n // now battle them normally\n $ship1Health = $ship1Health - ($ship2->getWeaponPower() * $ship2Quantity);\n $ship2Health = $ship2Health - ($ship1->getWeaponPower() * $ship1Quantity);\n }\n\n $ship1->setStrength($ship1Health);\n $ship2->setStrength($ship2Health);\n\n\n\n if ($ship1Health <= 0 && $ship2Health <= 0) {\n // they destroyed each other\n $winningShip = null;\n $losingShip = null;\n $usedJediPowers = $ship1UsedJediPowers || $ship2UsedJediPowers;\n } elseif ($ship1Health <= 0) {\n $winningShip = $ship2;\n $losingShip = $ship1;\n $usedJediPowers = $ship2UsedJediPowers;\n } else {\n $winningShip = $ship1;\n $losingShip = $ship2;\n $usedJediPowers = $ship1UsedJediPowers;\n }\n\n // Return new BattelREsult object that contains the attle results;\n return new BattleResult($winningShip, $losingShip, $usedJediPowers);\n\n return array(\n 'winning_ship' => $winningShip,\n 'losing_ship' => $losingShip,\n 'used_jedi_powers' => $usedJediPowers,\n );\n }", "title": "" }, { "docid": "69c2e5cfe159e28e4d02edbf6b0e7861", "score": "0.4325105", "text": "function apply_system_rules() {\n\n\tglobal $zurich;\n\n/* These rules are applied only at the end of each turn, one after the other */\n\n/* Rule 1: if the water supply > water demand and supply < 1.5 demand, \n\t\t\tincrease water quality by (1..3) */\n\t\t\t\n\tif ($zurich->water_supply > $zurich->water_demand\n\t\tand $zurich->water_supply < 1.5 * $zurich->water_demand) {\n\t\t$change = dice_up($zurich->water_quality, 1, 3);\n\t\t$zurich->water_quality += $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because water supply exceeds demand, the water quality has increased by $change.\", \n\t\t\t'Rule', 3);\t\n\t\t}\n\t\t\t\n/* Rule 2: if the water supply is > 1.5 demand, reduce water quality */\n\n\tif ($zurich->water_supply >= 1.5 * $zurich->water_demand) {\n\t\t$change = dice_down($zurich->water_quality, 1, 3);\n\t\t$zurich->water_quality -= $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because water supply greatly exceeds demand, the water quality has decreased by $change.\", \n\t\t\t'Rule', 3);\t\n\t\t}\n\n/* Rule 3: (a) if the waste water utility used to have debts, now paid off, increase \n\t\t\t\t\tthe politician's popularity by (1..3)\n\t\t\t(b) if the water utility used to have debts, now paid off, increase \n\t\t\t\t\tthe politician's popularity by (1..3) */\n\t\t\t\n\tif ($zurich->players['waste_water_utility']->paid_off_debts) {\n\t\t$change = dice_up($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity += $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the waste water utility no longer has debts, the politician's popularity has increased by $change.\", \n\t\t\t'Rule', 3);\n\t\t$zurich->players['waste_water_utility']->paid_off_debts = 0;\n\t\t}\n\tif ($zurich->players['water_utility']->paid_off_debts) {\n\t\t$change = dice_up($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity += $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the water utility no longer has debts, the politician's popularity has increased by $change.\", \n\t\t\t'Rule', 3);\n\t\t$zurich->players['water_utility']->paid_off_debts = 0;\n\t\t}\n\t\t\n\t\t\t\n/* Rule 4: if the water quality was above 7 at any time during the last turn,\n \t\t\t\tincrease the politician's popularity by (1..3)*/\n \t\t\t\t\n \tif ($zurich->max_water_quality > 7) {\n\t\t$change = dice_up($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity += $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the water quality has risen above 7, the politician's popularity has increased by $change.\", \n\t\t\t'Rule', 3);\n\t\t$zurich->max_water_quality = 0;\n \t}\n \t\t\n/* Rule 5: if the water quality is now below 6, decrease political popularity */\n\n \tif ($zurich->water_quality < 6) {\n\t\t$change = dice_down($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity -= $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the water quality is below 6, the politician's popularity has decreased by $change.\", \n\t\t\t'Rule', 3);\n \t}\n\n/* Rule 6: if the lake water quality is below 6, decrease political popularity */\n\n \tif ($zurich->lake_quality) {\n\t\t$change = dice_down($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity -= $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the lake's water quality is below 6, the politician's popularity has decreased by $change.\", \n\t\t\t'Rule', 3);\n \t}\n\n/* Rule 7: if the water supply is less than demand, decrease political popularity */\n\n \tif ($zurich->water_supply < $zurich->water_demand) {\n\t\t$change = dice_down($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity -= $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the water supply is less than the water demand, the politician's popularity has decreased by $change.\", \n\t\t\t'Rule', 3);\n \t}\n\n/* Rule 8: if the lake water quality was ever below 5 in this turn, increase\n\t\tenvironmental awareness */\n\t\t\n\t if ($zurich->min_lake_quality < 5) {\n\t\t$change = dice_up($zurich->env_awareness, 1, 3);\n\t\t$zurich->env_awareness += $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the lake water quality fell to below 5, the level of environmental awareness has increased by $change.\", \n\t\t\t'Rule', 3);\n\t\t$zurich->min_water_quality = 9999;\n \t}\n\n/* Rule 9: if the politican, the water utility or the waste water utility owes money, \n\t\t\tdecrease the poitician's popularity */\n\t\t\t\n\tif ($zurich->players['water_utility']->debtor()) {\n\t\t$change = dice_down($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity -= $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the water utility owes money, the politician's popularity has decreased by $change.\", \n\t\t\t'Rule', 3);\n \t}\n\tif ($zurich->players['waste_water_utility']->debtor()) {\n\t\t$change = dice_down($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity -= $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the waste water utility owes money, the politician's popularity has decreased by $change.\", \n\t\t\t'Rule', 3);\n \t}\n\tif ($zurich->players['politician']->debtor()) {\n\t\t$change = dice_down($zurich->political_popularity, 1, 3);\n\t\t$zurich->political_popularity -= $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the politician owes money, the politician's popularity has decreased by $change.\", \n\t\t\t'Rule', 3);\n \t}\n\t\n/* Rule 10: if the lake water quality was ever above 7 in this turn, increase\n\t\tpolitical popularity */\n\t\t\n\t if ($zurich->max_lake_quality > 7) {\n\t\t$change = dice_up($zurich->env_awareness, 1, 3);\n\t\t$zurich->political_popularity += $change;\n\t\tif ($change) log_and_confirm(\n\t\t\"Because the lake water quality rose above 7, the politician's popularity has increased by $change.\", \n\t\t\t'Rule', 3);\n\t\t$zurich->max_water_quality = 0;\n \t}\n\n\n/* Rule 11: implemented by politician */\n\n/* Rule 12: if demand is below 50, the waste water utility flushes the pipes */\n\n\tif ($zurich->water_demand < 50) {\n\t\tlog_and_confirm(\n\t\t\t\"Because water demand is low, the waste pipes are beoming clogged and must be flushed.\", \n\t\t\t\t'Rule', 3);\n\t\t$zurich->players['waste_water_utility']->flush_pipes();\n\t}\n\t\n/* Rule 13: every six years, the politician must be voted back in */\n\n\t\t/* DON'T KNOW HOW TO IMPLEMENT THIS ! */\n\t\t\n/* Rule 14: if politician calls a referendum, there is no subsequent loss in \npopularity when there is a price rise. Implemented by politician */\n\n/* Rule 15: For every point of price reduction, the politician's popularity rises by one point. \n\t\tImplemented by politican */\t\n\n/* Rule 16: Max. quoted price for water systems is 750 \n\t\tImplemented by manufacturer */\n\t\t\n}", "title": "" }, { "docid": "35ff752244072f3efacca64666632ffb", "score": "0.43171856", "text": "static function standardQueryDef($kind, TweetUser $penName,$query=\"\"){\n\t\t$sn=$penName->screen_name;\n\t\tswitch ($kind) {\n\t\t\tcase 'mentions':\n\t\t\t\treturn array (\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'penNameID' => $penName->ID,\n\t\t\t\t \"service\"=>\"http://twitter.com/statuses/mentions\",\n\t\t\t\t \"auth\" => \"true\",\n\t\t\t\t\t'filler' => 'fillTweetsFromAPI'\n\t\t\t\t\t);\n\t\t\tcase 'penFollowers':\n\t\t\t\treturn array (\n\t\t\t\t'auth'=>true,\n\t\t\t\t'penNameID' => $penName->ID,\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'query' => '',\n\t\t\t\t'service'=>'http://twitter.com/statuses/followers/'.$sn,\n\t\t\t\t'filler' => 'fillTweetsFromAPI'\n\t\t\t\t\t);\n\t\t\tcase 'penDirectSent': \n\t\t\tcase 'penDirect':\n\t\t\t\t// force a run-time-error\n\t\t\t\t$x = \"wow\";\n\t\t\t\t$x[] = \"wow\";\n\t\t\t\t$x = \"wow\";\n\t\t\t\tbreak;\n\t\t\tcase 'penFriends':\n\t\t\t\t$x = \"wow\";\n\t\t\t\t$x[] = \"wow\";\n\t\t\t\t$x = \"wow\";\n\t\t\t\treturn array (\n\t\t\t\t'auth'=>false,\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'query' => '',\n\t\t\t\t'service' => 'http://twitter.com/statuses/friends/'.$sn,\n\t\t\t\t'filler' => 'fillTweetsFromAPI'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'sponsorFriends':\n\t\t\t\treturn array (\n\t\t\t\t'auth'=>false,\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'service' => 'http://twitter.com/statuses/friends/'.$Organizer->screen_name,\n\t\t\t\t'query' => '',\n\t\t\t\t'filler' => 'fillTweetsFromAPI'\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase 'penFriendsTimeline':\n\t\t\t\t$x = \"wow\";\n\t\t\t\t$x[] = \"wow\";\n\t\t\t\t$x = \"wow\";\n\t\t\t\treturn array (\n\t\t\t\t'auth'=>true,\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'penNameID' => $penName->ID,\n\t\t\t\t'service' => 'http://twitter.com/statuses/friends_timeline',\n\t\t\t\t'query' => '',\n\t\t\t\t'filler' => 'fillTweetsFromAPI'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'public':\n\t\t\t\treturn array (\n\t\t\t\t'auth'=>false,\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'service' => 'http://twitter.com/statuses/public_timeline',\n\t\t\t\t'query' => '',\n\t\t\t\t'filler' => 'fillTweetsFromAPI'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'penSent':\n\t\t\t\treturn array (\n\t\t\t\t'auth'=>false,\n\t\t\t\t'penName' => $this->Title,\n\t\t\t\t'service' => \"http://twitter.com/statuses/user_timeline/\".$sn,\n\t\t\t\t'query' => '',\n\t\t\t\t'filler' => 'fillTweetsFromAPI'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'user':\n\t\t\t\treturn array (\n\t\t\t\t// this is really tweets 'from' the 'query' field which is the user\n\t\t\t\t// make sure that the user is in the DataBase\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'auth'=>false,\n\t\t\t\t'service' => \"http://twitter.com/statuses/user_timeline/\".$sn,\n\t\t\t\t'filler' => 'fillTweetsFromUser'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\tcase 'hash':\n\t\t\tcase 'keyword':\n\t\t\t//no rate limiting needed\n\t\t\t\treturn array (\n\t\t\t\t'penName' => $sn,\n\t\t\t\t'requestKind' => 'Query',\n\t\t\t\t'auth'=>false,\n\t\t\t\t'query' => $query,\n\t\t\t\t'filler' => 'fillQueriedTweets'\n\t\t\t\t);\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "add925ab85f131e1961f7a6edd40d741", "score": "0.43161413", "text": "abstract protected function query();", "title": "" }, { "docid": "4522695cb363fb6681aa19fd25fc4fe7", "score": "0.43154934", "text": "public function doAttack($direction){\n //Retrieve the fighter-\n App::uses('CakeSession', 'Model/Datasource');\n $idFighterSelected=CakeSession::read('User.fighter');\n $myFighter=$this->findById($idFighterSelected)[\"Fighter\"];\n $cooX=$myFighter[\"coordinate_x\"];\n $cooY=$myFighter[\"coordinate_y\"];\n $errorMessage=\"\";\n //Make the fighter attacks according to a direction\n if(strcmp($direction,\"east\")==0){\n if($cooX<14){\n //debug($this->find('all'));\n //X coo of the attack\n $cooXAtk=$cooX+1;\n //find if there's a fighter on the attack coo\n $findFighter=$this->find('first', array('conditions'=>array( \"Fighter.coordinate_x\"=>$cooXAtk,\"Fighter.coordinate_y\"=>$cooY)));\n //start the attack algorithm\n $errorMessage=$this->attackProcess($findFighter,$myFighter);\n \n }else{\n $errorMessage+=\"Arena limits reach\\n\";\n }\n //debug($this->find('all'));\n }else if(strcmp($direction,\"west\")==0){\n if($cooX>0){\n //debug($this->find('all'));\n $cooXAtk=$cooX-1;\n $findFighter=$this->find('first', array('conditions'=>array( \"Fighter.coordinate_x\"=>$cooXAtk,\"Fighter.coordinate_y\"=>$cooY)));\n $errorMessage=$this->attackProcess($findFighter,$myFighter);\n \n }else{\n $errorMessage+=\"Arena limits reach\\n\";\n }\n }else if(strcmp($direction,\"north\")==0){\n if($cooY<9){\n //debug($this->find('all'));\n $cooYAtk=$cooY+1;\n $findFighter=$this->find('first', array('conditions'=>array( \"Fighter.coordinate_x\"=>$cooX,\"Fighter.coordinate_y\"=>$cooYAtk)));\n $errorMessage=$this->attackProcess($findFighter,$myFighter);\n \n }else{\n $errorMessage+=\"Arena limits reach\\n\";\n }\n }else if(strcmp($direction,\"south\")==0){\n if($cooY>0){\n //debug($this->find('all'));\n $cooYAtk=$cooY-1;\n $findFighter=$this->find('first', array('conditions'=>array( \"Fighter.coordinate_x\"=>$cooX,\"Fighter.coordinate_y\"=>$cooYAtk)));\n $errorMessage=$this->attackProcess($findFighter,$myFighter);\n \n }else{\n $errorMessage+=\"Arena limits reach\\n\";\n }\n }else{\n $errorMessage+=\"Invalid direction\\n\";\n }\n if(!empty($errorMessage)){\n return($errorMessage);\n }else return null;\n }", "title": "" }, { "docid": "7300f666682422fe00aba337e5518d63", "score": "0.431467", "text": "function travelTogetherShareRoom($passenger_ids_sha,$passenger_ids_group,$group_id){\n\t\t\t\t\t$db \t\t= $this->getDbo();\n\t\t\t\t\t$user = JFactory::getUser(); \t\t\n\t\t\t\t\tif($passenger_ids_group){\n\t\t\t\t\t\tforeach($passenger_ids_group as $pg){\n\t\t\t\t\t\t\t$type_room = count($passenger_ids_group)-count($passenger_ids_sha);\n\t\t\t\t\t\t\t$travel_together = 0;\n\t\t\t\t\t\t\t$status_share_room=0;\n\t\t\t\t\t\t\tforeach($passenger_ids_sha as $ps){\n\t\t\t\t\t\t\t\tif($ps==$pg){\n\t\t\t\t\t\t\t\t\t$type_room=count($passenger_ids_sha);\n\t\t\t\t\t\t\t\t\t$status_share_room=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\t$detailgroup=$this->getDetailgroup($pg,$group_id);\t\t\t\t\t\t\n\t\t\t\t\t\t\t$query=\"UPDATE #__sfs_status_share_room SET status_share_room='\".$status_share_room.\"', type_room='\".$type_room.\"' where id='\".$detailgroup->share_room_id.\"'\";\t\t\n\t\t\t\t\t\t\t$db->setQuery($query);\n\t\t\t\t\t\t\tif( !$db->execute()) {\n\t\t\t\t\t\t\t\t$this->setError($db->getErrorMsg());\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\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\treturn 1;\n\t\t\t\t}", "title": "" }, { "docid": "b695e27c26d232a269408dceb91c3d7b", "score": "0.42940262", "text": "public function setSnitch(string $snitch): self\n {\n $this->setOption('snitch', $snitch);\n\n return $this;\n }", "title": "" }, { "docid": "3928de7a811637326d6d363a657fbffb", "score": "0.42817232", "text": "public function queries(){\n\t\t\n\t\t$packet = [];\n\n\t\t$packet['one'] = $this->query->execute(\n\t\t\t'SELECT * FROM test_table WHERE id = ?;', \n\t\t\t[1]\n\t\t);\n\n\t\t$packet['two'] = $this->query->execute( \n\t\t\t$this->query->fetchQuery('Example', 'get'), \n\t\t\t[2] \n\t\t);\n\n\t\t$id = $this->query->quote('3');\n\t\t$packet['three'] = $this->query->raw('SELECT * FROM test_table WHERE id = '.$id.';');\n\n\t\t$this->view->load('query', $packet);\n\t}", "title": "" }, { "docid": "aca96fde5bdd6faae9cb62354af93bb8", "score": "0.427433", "text": "private static function player_initDefaultQueries() {\n HotstatusPipeline::filter_generate_season();\n\n $q = [\n HotstatusPipeline::FILTER_KEY_SEASON => [\n HotstatusResponse::QUERY_IGNORE_AFTER_CACHE => true,\n HotstatusResponse::QUERY_ISSET => false,\n HotstatusResponse::QUERY_RAWVALUE => null,\n HotstatusResponse::QUERY_SQLVALUE => null,\n HotstatusResponse::QUERY_SQLCOLUMN => \"season\",\n HotstatusResponse::QUERY_TYPE => HotstatusResponse::QUERY_TYPE_RAW\n ],\n HotstatusPipeline::FILTER_KEY_GAMETYPE => [\n HotstatusResponse::QUERY_IGNORE_AFTER_CACHE => false,\n HotstatusResponse::QUERY_ISSET => false,\n HotstatusResponse::QUERY_RAWVALUE => null,\n HotstatusResponse::QUERY_SQLVALUE => null,\n HotstatusResponse::QUERY_SQLCOLUMN => \"gameType\",\n HotstatusResponse::QUERY_TYPE => HotstatusResponse::QUERY_TYPE_RAW\n ],\n ];\n\n return $q;\n }", "title": "" }, { "docid": "02ce7f1ffb82b38aec73fddfa592084d", "score": "0.42607757", "text": "function read_standings(&$current) {\n $query = \"select roster_id, roster_charfirst, roster_class, roster_earned, roster_spent, roster_adjusted, (roster_earned-roster_spent+roster_adjusted) as standings_current\";\n $query .= \" from \" . TABLE_PREFIX . \"roster\";\n $query .= \" order by roster_charfirst asc, roster_earned desc, roster_spent desc, roster_adjusted desc\";\n\n $current[\"count\"] = query_db($query, $current, true);\n}", "title": "" }, { "docid": "ffceed08af9f46a938e6c4a2cb8ce462", "score": "0.42599705", "text": "public static function recalculateSharingRulesByUser($id)\n\t{\n\t\t$userModel = \\App\\User::getUserModel($id);\n\t\t$roles = explode('::', $userModel->getParentRolesSeq());\n\t\t$groups = $userModel->getGroups();\n\t\t$sharing = [];\n\t\tforeach (\\Settings_SharingAccess_Rule_Model::$dataShareTableColArr['ROLE'] as $key => $item) {\n\t\t\t$row = (new \\App\\Db\\Query())->select([$item['target_id']])->from($item['table'])->where([$item['source_id'] => $roles])->column();\n\t\t\tif ($row) {\n\t\t\t\tif (!isset($sharing[$key])) {\n\t\t\t\t\t$sharing[$key] = [];\n\t\t\t\t}\n\t\t\t\t$sharing[$key] = array_merge($sharing[$key], $row);\n\t\t\t}\n\t\t}\n\t\tforeach (\\Settings_SharingAccess_Rule_Model::$dataShareTableColArr['RS'] as $key => $item) {\n\t\t\t$row = (new \\App\\Db\\Query())->select([$item['target_id']])->from($item['table'])->where([$item['source_id'] => $roles])->column();\n\t\t\tif ($row) {\n\t\t\t\tif (!isset($sharing[$key])) {\n\t\t\t\t\t$sharing[$key] = [];\n\t\t\t\t}\n\t\t\t\t$sharing[$key] = array_merge($sharing[$key], $row);\n\t\t\t}\n\t\t}\n\t\tif ($groups) {\n\t\t\tforeach (\\Settings_SharingAccess_Rule_Model::$dataShareTableColArr['GRP'] as $key => $item) {\n\t\t\t\t$row = (new \\App\\Db\\Query())->select([$item['target_id']])->from($item['table'])->where([$item['source_id'] => $groups])->column();\n\t\t\t\tif ($row) {\n\t\t\t\t\tif (!isset($sharing[$key])) {\n\t\t\t\t\t\t$sharing[$key] = [];\n\t\t\t\t\t}\n\t\t\t\t\t$sharing[$key] = array_merge($sharing[$key], $row);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$users = [[]];\n\t\tforeach ($sharing as $type => $item) {\n\t\t\tswitch ($type) {\n\t\t\t\tcase 'US':\n\t\t\t\t\t$users[] = array_unique($item);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'GRP':\n\t\t\t\t\tforeach ($item as $grpId) {\n\t\t\t\t\t\t$users[] = static::getUsersByGroup($grpId);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ROLE':\n\t\t\t\t\tforeach ($item as $roleId) {\n\t\t\t\t\t\t$users[] = static::getUsersByRole($roleId);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'RS':\n\t\t\t\t\tforeach ($item as $roleId) {\n\t\t\t\t\t\t$users[] = static::getUsersByRoleAndSubordinate($roleId);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tforeach (array_unique(array_merge(...$users)) as $userId) {\n\t\t\tUserPrivilegesFile::createUserSharingPrivilegesfile($userId);\n\t\t}\n\t}", "title": "" }, { "docid": "c87c8fcff26bad3ee960d965aab953a6", "score": "0.42573327", "text": "public function bake()\n {\n $result = array();\n \n foreach( $this->searchResult as $line )\n {\n $id = $line[ 'id' ];\n \n $result[ $id ][ 'title' ] = $line[ 'title' ];\n $result[ $id ][ 'matches' ] = $line[ 'matches' ];\n $result[ $id ][ 'score' ] = count( $line[ 'matches' ] ) * 60 / $this->queryCount;\n }\n \n $sortedResult = array();\n \n foreach( $result as $id => $datas )\n {\n $sortedResult[ $datas[ 'score' ] ][ $id ] = array( 'title' => $datas[ 'title' ]\n , 'matches' => $datas[ 'matches' ] );\n }\n \n krsort( $sortedResult );\n \n return $this->bakedResult = $sortedResult;\n }", "title": "" }, { "docid": "4c271f8cd50f5708889693378e11b64c", "score": "0.42528734", "text": "public function runResultFilters();", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.4246907", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.4246907", "text": "function query() {\n }", "title": "" }, { "docid": "2c8425d72177e25a69ed666b8ffbbbf4", "score": "0.4246907", "text": "function query() {\n }", "title": "" }, { "docid": "705c25033aa42e66f2bc18e1520506e4", "score": "0.4244678", "text": "private function _get_students_asu_mkr(){\n // TODO: get all students and check status (std.std7 and std.std11) on sync?????!!!!!!!\n $this->students_mkr= $this->asu_mkr->gets(\"\nselect \n f.f1,\n st.st1,\n st.st2,\n st.st3,\n st.st4,\n st.st15,\n st.st32,\n st.st71, \n st.st74, \n st.st75, \n st.st76, \n st.st144,\n st.st108,\n gr.gr3,\n std.std7,\n std.std11,\n pnsp.pnsp1,\n sp.sp1\nfrom st\n inner join std on (st.st1 = std.std2)\n inner join gr on (std.std3 = gr.gr1)\n inner join sg on (gr.gr2 = sg.sg1)\n inner join sp on (sg.sg2 = sp.sp1)\n inner join pnsp on (sp.sp11 = pnsp.pnsp1)\n inner join f on (sp.sp5 = f.f1)\nwhere \n (std.std7 is null ) and (std.std11 <> 1) and (st.st2<>'');\n \");\n }", "title": "" }, { "docid": "2efc3e8dd3c446f88dea9f5f92f0f19e", "score": "0.42396992", "text": "public function loadSearchWhisper($query)\r\n {\r\n return $this->queryAll('\r\n SELECT DISTINCT tt.name, tt.uniprot_id\r\n FROM transporter_targets tt\r\n JOIN transporters t ON t.id_target = tt.id\r\n JOIN transporter_datasets td ON td.id = t.id_dataset\r\n WHERE (tt.name LIKE ? OR tt.uniprot_id LIKE ?) AND td.visibility = ?\r\n LIMIT 10\r\n ', array($query, $query, Transporter_datasets::VISIBLE), False);\r\n }", "title": "" }, { "docid": "1f1409ab1f7fea32a8b34af903ca1181", "score": "0.42382586", "text": "function via_synch_participants() {\n global $DB, $CFG;\n\n $result = true;\n\n $via = $DB->get_record('modules', array('name' => 'via'));\n $lastcron = $via->lastcron;\n\n // Add participants (with student roles only) that are in the ue table but not in via.\n $sql = 'from {user_enrolments} ue\n left join {enrol} e on ue.enrolid = e.id\n left join {via} v on e.courseid = v.course\n left join {via_participants} vp on vp.activityid = v.id AND ue.userid = vp.userid\n left join {context} c on c.instanceid = e.courseid\n left join {role_assignments} ra on ra.contextid = c.id AND ue.userid = ra.userid';\n $where = 'where (vp.activityid is null OR ra.timemodified > '.$lastcron.' )\n and c.contextlevel = 50 and v.enroltype = 0 and e.status = 0 and v.enroltype = 0 and v.groupingid = 0';\n\n $ners = $DB->get_recordset_sql('select distinct ue.userid, e.courseid, v.id as viaactivity, v.noparticipants '.\n $sql.' '.$where, null, $limitfrom = 0, $limitnum = 0);\n\n // Add users from automatic enrol type.\n foreach ($ners as $add) {\n try {\n $type = via_user_type($add->userid, $add->courseid, $add->noparticipants);\n\n } catch (Exception $e) {\n notify(\"error:\".$e->getMessage());\n }\n try {\n if ($type != 2) { // Only add participants and animators.\n via_add_participant($add->userid, $add->viaactivity, $type);\n }\n\n } catch (Exception $e) {\n notify(\"error:\".$e->getMessage());\n }\n }\n\n // Add users from group synch.\n $newgroupmemberssql = ' FROM {via} v\n LEFT JOIN {groupings_groups} gg ON v.groupingid = gg.groupingid\n LEFT JOIN {groups_members} gm ON gm.groupid = gg.groupid\n LEFT JOIN {via_participants} vp ON vp.activityid = v.id AND vp.userid = gm.userid ';\n $newgroupmemberswhere = ' WHERE v.groupingid != 0 AND vp.id is null ';\n\n $newgroupmembers = $DB->get_recordset_sql('select distinct v.id as activityid, v.course, v.noparticipants, gm.userid\n '.$newgroupmemberssql.' '.$newgroupmemberswhere);\n\n foreach ($newgroupmembers as $add) {\n try {\n $type = via_user_type($add->userid, $add->course, $add->noparticipants);\n } catch (Exception $e) {\n notify(\"error:\".$e->getMessage());\n }\n try {\n if ($type != 2) { // Only add participants and animators.\n via_add_participant($add->userid, $add->activityid, $type);\n }\n\n } catch (Exception $e) {\n notify(\"error:\".$e->getMessage());\n $result = false;\n }\n }\n\n // Now we remove via participants that have been unerolled from a cours.\n $oldenrollments = $DB->get_records_sql('SELECT vp.id, vp.activityid, vp.userid, vp.timesynched, vp.synchvia\n FROM {via_participants} vp\n LEFT JOIN {user_enrolments} ue ON ue.enrolid = vp.enrolid and ue.userid = vp.userid\n WHERE ue.enrolid is null AND vp.userid != 2 and vp.enrolid != 0');\n // 2== admin user which is never enrolled.\n\n // If we are using groups.\n $oldgroupmembers = $DB->get_records_sql('SELECT distinct vp.id, vp.activityid, vp.userid, vp.timesynched, vp.synchvia\n FROM {via_participants} vp\n LEFT JOIN {via} v ON v.id = vp.activityid\n LEFT JOIN {groupings_groups} gg ON gg.groupingid = v.groupingid\n LEFT JOIN {groups} g ON gg.groupid = g.id AND v.course = g.courseid\n LEFT JOIN {groups_members} gm ON vp.userid = gm.userid\n WHERE ( gm.id is null OR g.id is null )\n AND vp.participanttype = 1 AND v.groupingid != 0');\n\n $totalmerge = array_merge($oldenrollments, $oldgroupmembers);\n $total = array_unique($totalmerge, SORT_REGULAR);\n foreach ($total as $remove) {\n try {\n // If user is not mananger, we remove him.\n if (!$DB->get_record('role_assignments', array('userid' => $remove->userid, 'contextid' => 1, 'roleid' => 1))) {\n // By adding the info here, we are cutting on calls to the DB later on.\n if ($remove->synchvia == 1 || $remove->timesynched && is_null($remove->synchvia)) {\n $synch = true;\n } else {\n $synch = false;\n }\n via_remove_participant($remove->userid, $remove->activityid, $synch);\n }\n } catch (Exception $e) {\n notify(\"error:\".$e->getMessage());\n $result = false;\n }\n }\n\n return $result;\n}", "title": "" }, { "docid": "2c11d5d7b80077625cafe67da571af11", "score": "0.42328402", "text": "public function currentStreak() {\n $streak = 0;\n $latest_mood = $this->moods->last()->mood;\n\n $first_mood_date = $this->moods->first()->created_at;\n\n\n\n $i_date = Carbon::today();\n $i_mood = $this->moods()->where('created_at', '>=', Carbon::today())\n ->where('created_at', '<', Carbon::tomorrow())->last()->mood;\n\n while ($latest_mood == $i_mood) {\n $streak++;\n\n $i_date = $i_date->subDays(1);\n $i_mood = $this->moods()->where('created_at', '>=', $i_date)\n ->where('created_at', '<', $i_date->addDays(1))->last()->mood;\n }\n }", "title": "" }, { "docid": "9d93346f0aee3b6c4d2d937f1b9031c4", "score": "0.42311314", "text": "function query() {\n }", "title": "" }, { "docid": "06b1f3037dc7620abf169f0e0d13a2c2", "score": "0.42259073", "text": "public function getStandings($tournament)\n\t{\n\t\t$participants = collect($this->getParticipants($tournament));\n\t\t$matches = collect($this->getMatches($tournament));\t\t\t\t\n\t\t$matchesComplete = count($matches->where('state', 'complete'));\n\t\t$result['progress'] = (($matchesComplete > 0) ? round(($matchesComplete / count($matches)*100)) : 0);\n\t\t$group = [];\n\n\t\tforeach ($participants as $team) {\n\t\t\t$teamWithResults = $this->getStanding($team, $matches);\n\t\t\t$finals[] = $teamWithResults->final['results'];\n\t\t\tif(!empty($teamWithResults->groups[0]))\t$group[] = $teamWithResults->groups[0]['results']; \n\t\t\t//TODO extend to loop over n groups \"$group[group_id]\"\n\t\t\t// $teamsWithResults[] = $teamWithResults;\n\t\t}\n\t\t((!empty($finals))? $result['final'] = collect($finals)->sortByDesc('win') : $finals = null);\n\t\t((!empty($group))? $result['groups'] = collect($group)->sortByDesc('win') : $group = null);\n\n\t\treturn $result;\n\n\t\t// return $teamsWithResults;\n\t}", "title": "" }, { "docid": "6c2039218116c6ff5fa6fa946f09ec27", "score": "0.42219323", "text": "function getMatches($idplayer){\n $query = \"SELECT * FROM aquigaza_fsutt_local.games \n WHERE fk_won = \".escapeString($idplayer).\" OR \n\t\t\t\t\t\tfk_lost= \".escapeString($idplayer);\n $resource = runQuery($query);\n return ozRunQuery($resource);\n}", "title": "" }, { "docid": "1388b2d286ad5d830442f084912370e0", "score": "0.42203143", "text": "function submitQuery() {\n\t\t$this->logMsg ( \">>> submitQuery\", MM_ALL );\n\t\t\n\t\t// Verify the query is sufficently defined.\n\t\tif ($this->getQueryText () == NULL) { // Bad query\n\t\t\t$this->logMsg ( \"Attempt to insert improperly-defined query\", MM_ERROR );\n\t\t} else { // Handle the query\n\t\t // Write query to database\n\t\t\t$submittedQuery = $this->insertQuery ();\n\t\t\t$returnCode = $submittedQuery;\n\t\t\t\n\t\t\t// Parse query into stimuli\n\t\t\t$stimulusList = split ( \"[^a-zA-Z0-9\\']\", $this->getQueryText () );\n\t\t\t\n\t\t\t// Create each stimulus and write it into the database.\n\t\t\tforeach ( $stimulusList as $rawStimulus ) { // Add the new stimuli\n\t\t\t \n\t\t\t\t// build stimulus object.\n\t\t\t\t$newStimulus = new stimulus ();\n\t\t\t\t$stimulusText = $newStimulus->setStimulus ( $rawStimulus );\n\t\t\t\t$stimulusQuery = $newStimulus->linkToQuery ( $submittedQuery );\n\t\t\t\t\n\t\t\t\t// Write stimulus to database.\n\t\t\t\t$addedStimulus = $newStimulus->insertStimulus ();\n\t\t\t\tif ($addedStimulus === NULL) { // Error writing stimulus to database\n\t\t\t\t\t$this->logMsg ( sprintf ( \"Error inserting stimulus '%s'\", $stimulusText ), MM_ERROR );\n\t\t\t\t\t$addedStimulus = $stimulusText;\n\t\t\t\t} else { // Stimulus added to database\n\t\t\t\t\t$this->logMsg ( sprintf ( \"Added stimulus '%s' to query %s\", $addedStimulus, $submittedQuery ), MM_INFO );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// Connect to the database and execute the query\n\t\t\t$dbConn = $this->dbconn;\n\t\t\t$attrib = array (\n\t\t\t\t\t'%QUERYID%' => $submittedQuery \n\t\t\t);\n\t\t\t$record = $this->getAction ( 'think', $attrib );\n\t\t}\n\t\t$this->logMsg ( sprintf ( \"<<< submitQuery (%s)\", $returnCode ), MM_ALL );\n\t\treturn $returnCode;\n\t}", "title": "" }, { "docid": "557b83370487a74d86f372a42aae205c", "score": "0.42136037", "text": "function get_feeds($username, $page)\n{\n $queue = \"SELECT tb_posts.* FROM tb_posts, tb_friends WHERE tb_friends.userfriend = tb_posts.username AND tb_friends.username='$username' UNION SELECT * FROM tb_posts WHERE username = '$username' ORDER BY timepublish DESC;\";\n $query = run_query($queue);\n\n return array($query);\n}", "title": "" }, { "docid": "052cc5a646c30555dd49a44fba8cbdb3", "score": "0.4213593", "text": "private function part2()\n {\n $this->start();\n\n $this->setRules();\n\n $outers = [\n 'shiny gold' => 1\n ];\n\n $required_inners = 0;\n\n while ($outers) {\n $inners = $this->processInners($outers);\n $required_inners += array_sum($inners);\n $outers = $inners;\n }\n\n $this->finish();\n\n $this->addPart([\n 'table' => [\n 'headings' => ['Part 2: Answer'],\n 'data' => [[$required_inners]],\n ],\n 'time' => $this->getTime(),\n ]);\n }", "title": "" }, { "docid": "54b174a0fe71afd986d92977b6d165b4", "score": "0.4213415", "text": "public function stage1_1()\n {\n $this->syncAPI->setSyncMode(tx_st9fissync::SYNC_MODE_SYNC);\n\n $this->syncAPI->addOkMessage($this->getSyncMesgPrefixed($this->syncAPI->getSyncLabels('stage.sync.stage1_1.start')));\n\n //query for all syncable objects from Intranet --> Website\n $syncableQueryDTOs = $this->syncAPI->getSyncDataTransferObject(true)->getSyncableQueryDTOs(true);\n\n $numOfObjectsToProcess = $this->syncAPI->getSyncLabels('stage.sync.numqueryobjects') . ' [' . count($syncableQueryDTOs) . ']';\n $this->syncAPI->addOkMessage($this->getSyncMesgPrefixed($numOfObjectsToProcess));\n\n //break them into batch size as set from config\n $batchsize = $this->syncAPI->getSyncConfigManager()->getSyncQuerySetBatchSize();\n $syncQueryBatches = array_chunk($syncableQueryDTOs, $batchsize, true);\n\n $batchSizeMesg = $this->syncAPI->getSyncLabels('stage.sync.querybatchsize') . ' [' . $batchsize . ']';\n $this->syncAPI->addInfoMessage($this->getSyncMesgPrefixed($batchSizeMesg));\n\n $numOfBatchesToProcess = $this->syncAPI->getSyncLabels('stage.sync.numbatches') . ' [' . count($syncQueryBatches) . ']';\n $this->syncAPI->addInfoMessage($this->getSyncMesgPrefixed($numOfBatchesToProcess));\n\n $passSyncedCount = 0;\n $failedSyncedCount = 0;\n\n //process each batch\n foreach ($syncQueryBatches as $queryBatch) {\n\n //send each batch to replay on the other instance (Website)\n $this->getSyncResultResponse('tx_st9fissync_service_handler','replayActions', $queryBatch,true, 'stage1_1_postProcess');\n\n //the negative results i.e. errors already handled in the post process\n //results of such an execution on the remote end\n $queryExecRes = $this->syncAPI->getSyncResultResponseDTO()->getSyncResults();\n\n if ($queryExecRes != null) {\n $qvIds = array();\n for ($queryExecRes->rewind(); $queryExecRes->valid(); $queryExecRes->next()) {\n\n $currentRes = $queryExecRes->current();\n $currentKey = $queryExecRes->key();\n\n /**\n *\n * form status messages for synced fail/pass\n */\n $syncToRemoteStatusMessage = $this->syncAPI->getSyncLabels('stage.sync.querytracking.id') . '[' . $currentKey . '] / ';\n $syncToRemoteStatusMessage .= $this->syncAPI->getSyncLabels('stage.sync.querytracking.details');\n $syncToRemoteStatusMessage .= $this->syncAPI->getSyncLabels('stage.sync.querytracking.tablename') . '[' . $syncableQueryDTOs[$currentKey]['tablenames'] . '] / ';\n $tableRowId = intval($syncableQueryDTOs[$currentKey]['uid_foreign']);\n if ($tableRowId > 0) {\n $syncToRemoteStatusMessage .= $this->syncAPI->getSyncLabels('stage.sync.querytracking.tablerowid') . '[' . $tableRowId . ']';\n } else {\n $syncToRemoteStatusMessage .= $this->syncAPI->getSyncLabels('stage.sync.querytracking.mmtablerowid');\n }\n\n if ($currentRes['synced']) {\n $qvIds[] = $currentKey;\n $syncToRemoteStatusMessage = $this->syncAPI->getSyncLabels('stage.sync.querytracking.toremotesuccess') . $syncToRemoteStatusMessage;\n $passSyncedCount++;\n } else {\n $syncToRemoteStatusMessage = $this->syncAPI->getSyncLabels('stage.sync.querytracking.toremotefail') . $syncToRemoteStatusMessage;\n $failedSyncedCount++;\n }\n\n $this->syncAPI->addInfoMessage($this->getSyncMesgPrefixed($syncToRemoteStatusMessage));\n\n }\n\n if (count($qvIds) > 0 ) {\n $updated = $this->syncAPI->getSyncDBOperationsManager()->setSyncIsSyncedForIndexedQueries($qvIds);\n }\n }\n }\n\n if ($passSyncedCount > 0) {\n $this->clearRemoteCache = true;\n }\n\n $passSyncedCountMessage = $this->syncAPI->getSyncLabels('stage.sync.querycount.pass') . '[' . $passSyncedCount . ']';\n $failedSyncedCountMessage = $this->syncAPI->getSyncLabels('stage.sync.querycount.fail'). '[' . $failedSyncedCount . ']';\n $this->syncAPI->addOkMessage($this->getSyncMesgPrefixed($passSyncedCountMessage));\n $this->syncAPI->addOkMessage($this->getSyncMesgPrefixed($failedSyncedCountMessage));\n $this->syncAPI->addOkMessage($this->getSyncMesgPrefixed($this->syncAPI->getSyncLabels('stage.sync.stage1_1.finished')));\n }", "title": "" }, { "docid": "26352b4cc08c7d87ff5d5114b7503423", "score": "0.42119592", "text": "function get_all_requests_rules ($userId) {\n\n\n $query = \"\n SELECT variable,\n value,\n function_labels.function,\n rules.id,\n operation\n FROM \n change_requests,\n request_rules,\n rules,\n function_labels\n WHERE change_requests.userId = '$userId'\n AND change_requests.id = request_rules.requestid\n AND request_rules.ruleid = rules.id\n AND function_labels.id = request_rules.functionid\n AND change_requests.status = '0'\n ORDER BY rules.id\";\n \n return run_query($query);\n}", "title": "" }, { "docid": "973b321a85592ac5423ba0f2a2e321da", "score": "0.42117128", "text": "function start_filters() {\n global $mailbox, $imapServerAddress, $imapPort, $imap,\n $imap_general, $filters, $imap_stream, $imapConnection,\n $UseSeparateImapConnection, $AllowSpamFilters;\n\n sqgetGlobalVar('username', $username, SQ_SESSION);\n sqgetGlobalVar('key', $key, SQ_COOKIE);\n\n\n $filters = load_filters();\n\n // No point running spam filters if there aren't any to run //\n if ($AllowSpamFilters) {\n $spamfilters = load_spam_filters();\n\n $AllowSpamFilters = false;\n foreach($spamfilters as $filterkey => $value) {\n if ($value['enabled'] == SMPREF_ON) {\n $AllowSpamFilters = true;\n break;\n }\n }\n }\n\n // No user filters, and no spam filters, no need to continue //\n if (!$AllowSpamFilters && empty($filters)) {\n return;\n }\n\n\n // Detect if we have already connected to IMAP or not.\n // Also check if we are forced to use a separate IMAP connection\n if ((!isset($imap_stream) && !isset($imapConnection)) ||\n $UseSeparateImapConnection ) {\n $stream = sqimap_login($username, $key, $imapServerAddress,\n $imapPort, 10);\n $previously_connected = false;\n } else if (isset($imapConnection)) {\n $stream = $imapConnection;\n $previously_connected = true;\n } else {\n $previously_connected = true;\n $stream = $imap_stream;\n }\n $aStatus = sqimap_status_messages ($stream, 'INBOX', array('MESSAGES'));\n\n if ($aStatus['MESSAGES']) {\n sqimap_mailbox_select($stream, 'INBOX');\n // Filter spam from inbox before we sort them into folders\n if ($AllowSpamFilters) {\n spam_filters($stream);\n }\n\n // Sort into folders\n user_filters($stream);\n }\n\n if (!$previously_connected) {\n sqimap_logout($stream);\n }\n}", "title": "" }, { "docid": "4df9117ae9da5e56261b48129adfb17e", "score": "0.42040366", "text": "public static function getScrumStorys($formData, $sortby, $sorttype, $limit = '', $countOnly = false)\r\n\t{\r\n\t\t$whereString = '';\r\n\t\tif($formData['fspid'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.sp_id = '.(int)$formData['fspid'].' ';\r\n\r\n\t\tif(isset($formData['fsiid']))\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.si_id = '.(int)$formData['fsiid'].' ';\r\n\r\n\t\tif($formData['fid'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_id = '.(int)$formData['fid'].' ';\r\n\r\n\t\tif($formData['fasa'] != '')\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_asa = \"'.Helper::unspecialtext((string)$formData['fasa']).'\" ';\r\n\r\n\t\tif($formData['fiwant'] != '')\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_iwant = \"'.Helper::unspecialtext((string)$formData['fiwant']).'\" ';\r\n\r\n\t\tif($formData['fsothat'] != '')\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_sothat = \"'.Helper::unspecialtext((string)$formData['fsothat']).'\" ';\r\n\r\n\t\tif($formData['ftag'] != '')\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_tag = \"'.Helper::unspecialtext((string)$formData['ftag']).'\" ';\r\n\r\n\t\tif($formData['fpoint'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_point = '.(float)$formData['fpoint'].' ';\r\n\r\n\t\tif($formData['fcategoryid'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_categoryid = '.(int)$formData['fcategoryid'].' ';\r\n\r\n\t\tif($formData['fstatus'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_status = '.(int)$formData['fstatus'].' ';\r\n\r\n\t\tif($formData['fpriority'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_priority = '.(int)$formData['fpriority'].' ';\r\n\r\n\t\tif($formData['flevel'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_level = '.(int)$formData['flevel'].' ';\r\n\r\n\t\tif($formData['fdisplayorder'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_displayorder = '.(int)$formData['fdisplayorder'].' ';\r\n\r\n\t\tif($formData['fdatecompleted'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_datecompleted = '.(int)$formData['fdatecompleted'].' ';\r\n\r\n\t\tif($formData['fdatecreated'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_datecreated = '.(int)$formData['fdatecreated'].' ';\r\n\r\n\t\tif($formData['fdatemodified'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_datemodified = '.(int)$formData['fdatemodified'].' ';\r\n\r\n\t\tif($formData['fsssid'] > 0)\r\n\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.sss_id = '.(int)$formData['fsssid'].' ';\r\n\r\n\r\n\r\n\r\n\t\tif(strlen($formData['fkeywordFilter']) > 0)\r\n\t\t{\r\n\t\t\t$formData['fkeywordFilter'] = Helper::unspecialtext($formData['fkeywordFilter']);\r\n\r\n\t\t\tif($formData['fsearchKeywordIn'] == 'asa')\r\n\t\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_asa LIKE \\'%'.$formData['fkeywordFilter'].'%\\'';\r\n\t\t\telseif($formData['fsearchKeywordIn'] == 'iwant')\r\n\t\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_iwant LIKE \\'%'.$formData['fkeywordFilter'].'%\\'';\r\n\t\t\telseif($formData['fsearchKeywordIn'] == 'sothat')\r\n\t\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_sothat LIKE \\'%'.$formData['fkeywordFilter'].'%\\'';\r\n\t\t\telseif($formData['fsearchKeywordIn'] == 'tag')\r\n\t\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . 'ss.ss_tag LIKE \\'%'.$formData['fkeywordFilter'].'%\\'';\r\n\t\t\telse\r\n\t\t\t\t$whereString .= ($whereString != '' ? ' AND ' : '') . '( (ss.ss_asa LIKE \\'%'.$formData['fkeywordFilter'].'%\\') OR (ss.ss_iwant LIKE \\'%'.$formData['fkeywordFilter'].'%\\') OR (ss.ss_sothat LIKE \\'%'.$formData['fkeywordFilter'].'%\\') OR (ss.ss_tag LIKE \\'%'.$formData['fkeywordFilter'].'%\\') )';\r\n\t\t}\r\n\t\t//checking sort by & sort type\r\n\t\tif($sorttype != 'DESC' && $sorttype != 'ASC')\r\n\t\t\t$sorttype = 'DESC';\r\n\r\n\r\n\t\tif($sortby == 'spid')\r\n\t\t\t$orderString = 'sp_id ' . $sorttype;\r\n\t\telseif($sortby == 'siid')\r\n\t\t\t$orderString = 'si_id ' . $sorttype;\r\n\t\telseif($sortby == 'id')\r\n\t\t\t$orderString = 'ss_id ' . $sorttype;\r\n\t\telseif($sortby == 'asa')\r\n\t\t\t$orderString = 'ss_asa ' . $sorttype;\r\n\t\telseif($sortby == 'iwant')\r\n\t\t\t$orderString = 'ss_iwant ' . $sorttype;\r\n\t\telseif($sortby == 'sothat')\r\n\t\t\t$orderString = 'ss_sothat ' . $sorttype;\r\n\t\telseif($sortby == 'tag')\r\n\t\t\t$orderString = 'ss_tag ' . $sorttype;\r\n\t\telseif($sortby == 'point')\r\n\t\t\t$orderString = 'ss_point ' . $sorttype;\r\n\t\telseif($sortby == 'categoryid')\r\n\t\t\t$orderString = 'ss_categoryid ' . $sorttype;\r\n\t\telseif($sortby == 'status')\r\n\t\t\t$orderString = 'ss_status ' . $sorttype;\r\n\t\telseif($sortby == 'priority')\r\n\t\t\t$orderString = 'ss_priority ' . $sorttype;\r\n\t\telseif($sortby == 'displayorder')\r\n\t\t\t$orderString = 'ss_displayorder ' . $sorttype;\r\n\t\telseif($sortby == 'datecompleted')\r\n\t\t\t$orderString = 'ss_datecompleted ' . $sorttype;\r\n\t\telseif($sortby == 'datecreated')\r\n\t\t\t$orderString = 'ss_datecreated ' . $sorttype;\r\n\t\telseif($sortby == 'datemodified')\r\n\t\t\t$orderString = 'ss_datemodified ' . $sorttype;\r\n\t\telse\r\n\t\t\t$orderString = 'ss_id ' . $sorttype;\r\n\r\n\t\tif($countOnly)\r\n\t\t\treturn self::countList($whereString);\r\n\t\telse\r\n\t\t\treturn self::getList($whereString, $orderString, $limit);\r\n\t}", "title": "" }, { "docid": "d8498adf245748dbb77beb14388869d2", "score": "0.42039517", "text": "public static function run() {\n\t\t$sources = DataObject::get('BlogSyndicatorSource');\n\t\t\n\t\tif (!$sources) return;\n\t\t\n\t\tforeach ($sources as $source) {\n\t\t\t// Get the source\n\t\t\t$ch = curl_init();\n\t\t\t$url = Controller::join_links($source->SourceURL, $source->LastUpdate);\n\t\t\t\n\t\t\t$options = array(\n\t\t\t\tCURLOPT_URL => $url,\n\t\t\t\tCURLOPT_RETURNTRANSFER => true,\n\t\t\t\tCURLOPT_FOLLOWLOCATION => true\n\t\t\t);\n\t\t\tcurl_setopt_array($ch, $options);\n\t\t\t$results = curl_exec($ch);\n\t\t\t$results = Convert::json2obj($results);\n\t\t\t\n\t\t\t\n\t\t\tif ( isset($results->data) && is_array($results->data) ) {\n\t\t\t\tforeach ($results->data as $entryData) {\n\t\t\t\t\t\n\t\t\t\t\tif ( isset($entryData->ClassName) && $entryData->ClassName == 'BlogSyndicatorDeletedEntry' ) {\n\t\t\t\t\t\t$entry = DataObject::get_one('BlogEntry', '\"SyndicatorSourceID\" = \\'' . Convert::raw2sql($entryData->EntryID) . \"'\");\n\t\t\t\t\t\tif ($entry) {\n\t\t\t\t\t\t\t$entry->deleteFromStage('Live');\n\t\t\t\t\t\t\t$entry->delete();\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$entryData->SyndicatorSourceID = $entryData->ID;\n\t\t\t\t\t\tunset($entryData->ID);\n\n\t\t\t\t\t\t$entry = DataObject::get_one('BlogEntry', '\"SyndicatorSourceID\" = \\'' . Convert::raw2sql($entryData->SyndicatorSourceID) . \"'\");\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Try getting it from the draft site.\n\t\t\t\t\t\tif ( !$entry ) {\n\t\t\t\t\t\t\t$entry = Versioned::get_one_by_stage('BlogEntry', 'Stage', '\"SyndicatorSourceID\" = \\'' . Convert::raw2sql($entryData->SyndicatorSourceID) . \"'\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If there's still no entry create a new one\n\t\t\t\t\t\tif ( !$entry ) {\n\t\t\t\t\t\t\t$entry = Object::create('BlogEntry', (array) $entryData);\n\t\t\t\t\t\t} \n\t\t\t\t\t\t\n\t\t\t\t\t\t// If it's not new, update fields.\n\t\t\t\t\t\tif ($entry->ID) {\n\t\t\t\t\t\t\t$fields = array_diff(array_keys($entry->toMap()), self::$excludedFields);\n\t\t\t\t\t\t\tforeach ($fields as $field) {\n\t\t\t\t\t\t\t\tif (isset($entryData->$field)) {\n\t\t\t\t\t\t\t\t\t$entry->$field = $entryData->$field;\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\n\t\t\t\t\t\t// Always set some fields.\n\t\t\t\t\t\t$entry->ParentID = $source->BlogHolder()->ID;\n\t\t\t\t\t\t$entry->Syndicated = true;\n\t\t\t\t\t\t$entry->Syndicate = false;\n\t\t\t\t\t\t$entry->Date = $entryData->Date; // For some reason I can't understand Date doesn't seem to always update correctly without this.\n\t\t\t\t\t\t$entry->write();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ($entryData->Status == 'Published') {\n\t\t\t\t\t\t\t$entry->doPublish();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ($entryData->Status == 'Unpublished') {\n\t\t\t\t\t\t\t$entry->doUnpublish();\n\t\t\t\t\t\t}\n\t\t\t\t\t} \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t$source->LastUpdate = time();\n\t\t\t$source->write();\n\t\t}\n\t}", "title": "" }, { "docid": "793c437519c1af4dad5dad352db7ac48", "score": "0.42010108", "text": "public function collectWqGenerallyCaseTwo(){\n $system = System::latest()->first();\n\n $M = $system->M;\n $system->service_time;\n $system->interarrival_time;\n $µ = 1/$system->service_time;\n\n $wq1 = ($M-1)/2*$µ;\n $wq2 = \"(\".$M.\"-1+n)*(\".$system->service_time.\")-n*\".$system->interarrival_time;\n $wq3 = 0;\n\n $system->wq1 = $wq1;\n $system->wq2 = $wq2;\n $system->wq3 = $wq3;\n $system->save();\n\n return redirect()->route('show','two');\n\n\n\n }", "title": "" }, { "docid": "a9d0f4cc878d765810baa52c40cf4aff", "score": "0.41969484", "text": "public static function recommendArticlesForTeam($id)\n {\n $now = \\Carbon\\Carbon::now()->format('Y-m-d');\n $result = Cypher::Run(\"MATCH (t:Team)-[:TAGGED_TEAM]-(a:Article) WHERE ID(t)=$id return a UNION \n MATCH (t:Team)-[:PLAYS]-(p:Player)-[:TAGGED_PLAYER]-(a:Article) WHERE ID(t)=$id return a UNION \n MATCH (t:Team)-[r1:TEAM_COACH]-(:Coach)-[:TAGGED_COACH]-(a:Article) WHERE ID(t)=$id AND r1.coached_until >= '$now' return a\");\n\n return self::fromRecordsToArticles($result->getRecords());\n }", "title": "" }, { "docid": "c88ec919f7ea84cae2766dbf04366b12", "score": "0.41954234", "text": "public function execute() {\n\t\t\n\t\t// Result of current technique. \n\t\t// Form: array( SQLInjectionCheckTechResult, SQLInjectionCheckTechResult, ... ).\n\t\t$techniqueResults = array();\n\n\t\t// Request handler that makes requests.\n\t\t$requestHandler = new Insomnia_Common_Request_SQLInjectionRequestHandler();\n\n\t\t// Checking all magic quotes for vulnerabilities.\n\t\tforeach(self::$magicQuotesSet as $magicQuote) {\n\n\t\t\t// Infects researched param.\n\t\t\t$infectedParamValue = $this->researchData[\"paramValue\"] . $magicQuote;\n\n\n\t\t\t//if($this->researchData[\"POSTParamFlag\"]) Необходимо будет сделать.\n\n\t\t\t// Making request data for request with infected values.\n\t\t\t// ONLY FOR [GET] REQUESTS. NOT FOR [POST].\n\t\t\t// POST REQUEST IS NOT READY NOW.\n\t\t\t$requestSet = Insomnia_Common_Request_Builder_SQLInjectionRequestSetBuilder::buildRequestSet(\n\t\t\t\t$this->researchData[\"originalURL\"],\n\t\t\t\tarray(\n\t\t\t\t\t'paramPositionID' => $this->researchData[\"paramPositionID\"],\n\t\t\t\t\t'pathParamFlag' => $this->researchData[\"pathParamFlag\"],\n\t\t\t\t\t'paramName' => $this->researchData[\"paramName\"],\n\t\t\t\t\t'paramValue' => $infectedParamValue\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Registration of request set.\n\t\t\t$requestHandler->setRequestSet($requestSet);\n\n\t\t\t// Making request and getting reply.\n\t\t\t$replySet = $requestHandler->executeProcess();\n\n\t\t\t// Checking reply for errors.\n\t\t\t$errorCheckData = $this->checkOutput($replySet);\n\n\t\t\t// Add checking result into result set.\n\t\t\t$techniqueResults[] = new Insomnia_Common_Data_SQLInjectionCheckTechResult(\n\t\t\t\tself::$techniqueID,\n\t\t\t\t$infectedParamValue,\n\t\t\t\t$replySet,\n\t\t\t\t$errorCheckData['vulnerable'],\n\t\t\t\t$errorCheckData['dbType']\n\t\t\t);\n\t\t}\n\n\t\treturn $techniqueResults;\n\t}", "title": "" }, { "docid": "2430865a148f649bed3acf91e475d616", "score": "0.41948438", "text": "public function run()\n {\n Shop::truncate();\n Shop::create(['id' => 1, 'name' => 'FunHouse']);\n\n Staff::truncate();\n Staff::create(['id' => 1, 'first_name' => 'Black Widow', 'surname' => 'Hero', 'shop_id' => 1]);\n Staff::create(['id' => 2, 'first_name' => 'Thor', 'surname' => 'Hero', 'shop_id' => 1]);\n Staff::create(['id' => 3, 'first_name' => 'Wolverine', 'surname' => 'Hero', 'shop_id' => 1]);\n Staff::create(['id' => 4, 'first_name' => 'Gamora', 'surname' => 'Hero', 'shop_id' => 1]);\n\n Rota::truncate();\n Rota::create(['id' => 1, 'shop_id' => 1, 'week_commence_date' => '2018-02-01']);\n Rota::create(['id' => 2, 'shop_id' => 1, 'week_commence_date' => '2018-02-08']);\n\n Shift::truncate();\n ShiftBreak::truncate();\n\n // Scenario One\n // Black Widow: |----------------------|\n Shift::create(\n [\n 'id' => 1,\n 'rota_id' => 1,\n 'staff_id' => 1,\n 'start_time' => '2018-02-01 10:00:00',\n 'end_time' => '2018-02-01 18:00:00'\n ]\n );\n\n // Scenario Two\n // Black Widow: |----------|\n // Thor: |-------------|\n Shift::create(\n [\n 'id' => 2,\n 'rota_id' => 1,\n 'staff_id' => 1,\n 'start_time' => '2018-02-02 10:00:00',\n 'end_time' => '2018-02-02 13:00:00'\n ]\n );\n Shift::create(\n [\n 'id' => 3,\n 'rota_id' => 1,\n 'staff_id' => 2,\n 'start_time' => '2018-02-02 13:00:00',\n 'end_time' => '2018-02-02 18:00:00'\n ]\n );\n\n // Scenario Three\n // Wolverine: |------------|\n // Gamora: |-----------------|\n Shift::create(\n [\n 'id' => 4,\n 'rota_id' => 1,\n 'staff_id' => 3,\n 'start_time' => '2018-02-03 10:00:00',\n 'end_time' => '2018-02-03 16:00:00'\n ]\n );\n Shift::create(\n [\n 'id' => 5,\n 'rota_id' => 1,\n 'staff_id' => 4,\n 'start_time' => '2018-02-03 11:00:00',\n 'end_time' => '2018-02-03 18:00:00'\n ]\n );\n\n // Scenario Four\n // Wolverine: |----| |-----------------|\n // Gamora: |----------------| |-----|\n\n Shift::create(\n [\n 'id' => 6,\n 'rota_id' => 1,\n 'staff_id' => 3,\n 'start_time' => '2018-02-04 10:00:00',\n 'end_time' => '2018-02-04 18:00:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 6, 'start_time' => '2018-02-04 12:00:00', 'end_time' => '2018-02-04 13:00:00']);\n\n Shift::create(\n [\n 'id' => 7,\n 'rota_id' => 1,\n 'staff_id' => 4,\n 'start_time' => '2018-02-04 10:00:00',\n 'end_time' => '2018-02-04 18:00:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 7, 'start_time' => '2018-02-04 16:10:00', 'end_time' => '2018-02-04 17:00:00']);\n\n // Scenario Five\n // Black Widow: |----| |------| |----|\n // Thor: |-------| |-------|\n\n Shift::create(\n [\n 'id' => 8,\n 'rota_id' => 1,\n 'staff_id' => 1,\n 'start_time' => '2018-02-05 10:00:00',\n 'end_time' => '2018-02-05 20:00:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 8, 'start_time' => '2018-02-05 12:00:00', 'end_time' => '2018-02-05 14:00:00']);\n ShiftBreak::create(['shift_id' => 8, 'start_time' => '2018-02-05 16:00:00', 'end_time' => '2018-02-05 18:00:00']);\n\n Shift::create(\n [\n 'id' => 9,\n 'rota_id' => 1,\n 'staff_id' => 2,\n 'start_time' => '2018-02-05 11:30:00',\n 'end_time' => '2018-02-05 18:30:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 9, 'start_time' => '2018-02-05 14:20:00', 'end_time' => '2018-02-05 15:40:00']);\n\n // Scenario Six\n // Black Widow: |-----------------|\n // Thor: |-------| |-------|\n // Wolverine: |------| |-------|\n\n Shift::create(\n [\n 'id' => 10,\n 'rota_id' => 1,\n 'staff_id' => 1,\n 'start_time' => '2018-02-06 10:00:00',\n 'end_time' => '2018-02-06 18:00:00'\n ]\n );\n\n Shift::create(\n [\n 'id' => 11,\n 'rota_id' => 1,\n 'staff_id' => 2,\n 'start_time' => '2018-02-06 10:00:00',\n 'end_time' => '2018-02-06 20:00:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 11, 'start_time' => '2018-02-06 14:00:00', 'end_time' => '2018-02-06 15:00:00']);\n\n Shift::create(\n [\n 'id' => 12,\n 'rota_id' => 1,\n 'staff_id' => 3,\n 'start_time' => '2018-02-06 12:00:00',\n 'end_time' => '2018-02-06 22:00:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 12, 'start_time' => '2018-02-06 14:20:00', 'end_time' => '2018-02-06 15:20:00']);\n\n // Scenario Seven\n // Black Widow: |--| |--|\n // Thor: |--| |--|\n // Wolverine: |--| |--|\n // Gamora: |----------|\n\n Shift::create(\n [\n 'id' => 13,\n 'rota_id' => 1,\n 'staff_id' => 1,\n 'start_time' => '2018-02-07 10:00:00',\n 'end_time' => '2018-02-07 18:00:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 13, 'start_time' => '2018-02-06 12:00:00', 'end_time' => '2018-02-06 16:00:00']);\n\n Shift::create(\n [\n 'id' => 14,\n 'rota_id' => 1,\n 'staff_id' => 2,\n 'start_time' => '2018-02-07 12:00:00',\n 'end_time' => '2018-02-07 20:00:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 14, 'start_time' => '2018-02-06 14:00:00', 'end_time' => '2018-02-06 18:00:00']);\n\n Shift::create(\n [\n 'id' => 15,\n 'rota_id' => 1,\n 'staff_id' => 3,\n 'start_time' => '2018-02-07 14:00:00',\n 'end_time' => '2018-02-07 22:10:00'\n ]\n );\n ShiftBreak::create(['shift_id' => 15, 'start_time' => '2018-02-06 16:00:00', 'end_time' => '2018-02-06 20:00:00']);\n\n Shift::create(\n [\n 'id' => 16,\n 'rota_id' => 1,\n 'staff_id' => 4,\n 'start_time' => '2018-02-07 12:00:00',\n 'end_time' => '2018-02-07 20:00:00'\n ]\n );\n\n // Scenario Eight\n // Black Widow: |-------------|\n // Thor: |-------------|\n // Wolverine: |-------------|\n // Gamora: |-------------|\n\n Shift::create(\n [\n 'id' => 17,\n 'rota_id' => 2,\n 'staff_id' => 1,\n 'start_time' => '2018-02-07 10:00:00',\n 'end_time' => '2018-02-07 18:00:00'\n ]\n );\n\n Shift::create(\n [\n 'id' => 18,\n 'rota_id' => 2,\n 'staff_id' => 2,\n 'start_time' => '2018-02-07 10:00:00',\n 'end_time' => '2018-02-07 18:00:00'\n ]\n );\n\n Shift::create(\n [\n 'id' => 19,\n 'rota_id' => 2,\n 'staff_id' => 3,\n 'start_time' => '2018-02-07 10:00:00',\n 'end_time' => '2018-02-07 18:00:00'\n ]\n );\n\n Shift::create(\n [\n 'id' => 20,\n 'rota_id' => 2,\n 'staff_id' => 4,\n 'start_time' => '2018-02-07 10:00:00',\n 'end_time' => '2018-02-07 18:00:00'\n ]\n );\n\n }", "title": "" }, { "docid": "2252c9f83efccdabedb5066bd9f25cc5", "score": "0.41930953", "text": "public function loadFilterRecords(Request $request){\n $filterFlag = $request->input('filters');\n $price = $request->input('price');\n $amount = str_replace(\"$\",\"\",$price);\n $array = explode(\"-\",$amount);\n $amt1 = $array[0];\n $amt2 = $array[1];\n $imgLimit = $request->session()->get('imgCount');\n $result = $request->session()->get('hotels');\n $flag = $request->session()->get('reqFlag');\n $nights = $request->session()->get('nights');\n if($filterFlag == 'true'){\n /*============ portion executed if filters applied ============*/\n $filterChanged = $request->session()->get(\"filterChanged\");\n $filterComb = $request->session()->get('filterCombinations');\n $reside = \"\";\n $facs = $request->input('facss');\n $stars = $request->input('starss');\n $dests = $request->input('destss');\n if($facs == 0){\n $facs = array();\n }\n if($stars == 0){\n $stars = array();\n }\n if($dests == 0){\n $dests = array();\n }\n $startIndex;\n $signal = 0;\n $facCombFlag = '';\n for($c = 0; $c < count($filterComb); $c++){\n\t\t\t\t$facDiff = array_intersect($facs,$filterComb[$c]['facs']);\n $starDiff = array_intersect($stars,$filterComb[$c]['stars']);\n $destDiff = array_intersect($dests,$filterComb[$c]['dests']);\n if(count($facDiff) == count($facs) && count($facs) == count($filterComb[$c]['facs'])){\n $reside .= \"First\";\n if(count($starDiff) == count($stars) && count($stars) == count($filterComb[$c]['stars'])){\n $reside .= \"Second\";\n if(count($destDiff) == count($dests) && count($dests) == count($filterComb[$c]['dests'])){\n $reside .= \"Third\";\n $facCombFlag = $c;\n $signal = 1;\n break;\n }\n }\n }\n }\n if($signal > 0){\n if($filterChanged == $facCombFlag){\n $startIndex = $filterComb[$facCombFlag]['lastIndex'];\n }elseif($filterChanged != $facCombFlag){\n $filterComb[$facCombFlag]['lastIndex'] = 0;\n $filterComb[$facCombFlag]['records'] = array();\n $startIndex = $filterComb[$facCombFlag]['lastIndex'];\n }\n }else{\n $reside .= \"In else part\";\n $facCombFlag = count($filterComb);\n $filterComb[$facCombFlag]['facs'] = $facs;\n $filterComb[$facCombFlag]['stars'] = $stars;\n $filterComb[$facCombFlag]['dests'] = $dests;\n $filterComb[$facCombFlag]['identity'] = 'filter'.$facCombFlag;\n $filterComb[$facCombFlag]['records'] = array();\n $filterComb[$facCombFlag]['lastIndex'] = 0;\n $startIndex = $filterComb[$facCombFlag]['lastIndex'];\n }\n $request->session()->set(\"imgCount\",0);\n $request->session()->save();\n if($flag == 0){\n return response()->json(['error'=>1,'msg'=>'','identity'=>$filterComb[$facCombFlag]['identity']]);\n }\n if($startIndex == count($result)){\n return response()->json(['error'=>1,'msg'=>'','identity'=>$filterComb[$facCombFlag]['identity']]);\n }\n $request->session()->set(\"reqFlag\",0);\n $request->session()->set(\"filterChanged\",$facCombFlag);\n $request->session()->save();\n $html = \"\";\n $hotelCount = 0;\n $lastIndexCounter = 0;\n if($startIndex > 0){\n $startIndex = $startIndex+1;\n }\n for($i = $startIndex; $i < count($result); $i++){\n $hotel_code = $result[$i][\"hotelCode\"];\n /*============================== rating section =================================*/\n List($class, $hotelRating, $rating) = Helper::starCheckerWithoutCounter($result[$i][\"starRating\"]);\n /*============================== end rating section ==============================*/\n /*======================== check if stars match with hotel rating =============*/\n if(count($stars) > 0){\n if(!in_array($hotelRating,$stars)){\n continue;\n }\n }\n /*======================== end check if stars match with hotel rating =========*/\n /*================== check if destination match with hotel destination ========*/\n if(count($dests) > 0){\n if(!in_array($result[$i]['city'],$dests)){\n continue;\n }\n }\n /*============== end check if destination match with hotel destination ========*/\n $curFacs = \"\";\n /*================== check if facilities match with hotel facilities ==========*/\n if(is_array($facs)){\n if(count($facs) > 0){\n DB::setFetchMode(\\PDO::FETCH_ASSOC);\n $checkValidFacs = DB::select(\"SELECT facility_name_code from tblfacilities WHERE hotel_id = '$hotel_code'\");\n if(count($checkValidFacs) > 0){\n $checkValidFacs = array_column($checkValidFacs,'facility_name_code');\n $facExist = array_intersect($facs,$checkValidFacs);\n\t\t\t\t\t\t\tif(count($facExist) == 0){\n continue;\n }\n }\n \n }\n }\n /*================ end check if facilities match with hotel facilities ==========*/\n /*============================== images section =================================*/\n if(!isset($result[$i]['image'])){\n $url1 = \"http://api.bonotel.com/index.cfm/user/\".$this->APiUser.\"/action/hotel/hotelCode/\".$hotel_code;\n $ch1 = curl_init();\n curl_setopt($ch1, CURLOPT_URL, $url1);\n curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch1, CURLOPT_POST, false);\n curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, 1);\n $result1 = curl_exec($ch1);\n curl_close($ch1);\n $hotelImages = @simplexml_load_string($result1);\n if(isset($hotelImages->code)){\n $result[$i]['image'] = (String)$result[$i]['thumbNailUrl'];\n }else{\n $result[$i]['image'] = (String)$hotelImages->hotel->images->image[0]; \n }\n /*$curImg = DB::table('hotel')->where('hotelCode',$hotel_code)->select('image')->first();\n if(isset($curImg->image) && !empty($curImg->image)){\n $result[$i]['image'] = (String)$curImg->image;\n }else{\n $result[$i]['image'] = (String)$result[$i]['thumbNailUrl'];\n }*/\n $imgName = array('image' => $result[$i]['image'], 'code' => (string)$result[$i][\"hotelCode\"]);\n $request->session()->push('hImages',$imgName);\n }\n /*============================== images section =================================*/\n\n /*============================== rates section ==================================*/\n $currMinDeal = $result[$i][\"roomInformation\"];\n\t\t\t\t$rateInfo = array();\n \tforeach($currMinDeal as $deal){\n if(!isset($deal['rateInformation'])){\n $rateInfo[] = (int) str_replace(',', '',$currMinDeal['rateInformation']['totalRate']);\n }\n else{\n $abc = $deal['rateInformation'];\n $rateInfo[] = (int) str_replace(',', '', $abc['totalRate']);\n }\n }\n\t\t\t $sortArray = sort($rateInfo);\n $newrate = $rateInfo[0];\n //$newrate = Helper::getCalculatedPrice($newrate);\n //if ((($amt1-1) <= ($newrate/$nights)) && ($amt2 >= ($newrate/$nights))){\n $lastIndexCounter++;\n $roomUrl = url(\"/rooms\");\n $bookUrl = url(\"/payment\").\"/\".$hotel_code;\n $cityClass = str_replace(\" \",\"-\",$result[$i][\"city\"]);\n $html .= '<div class=\"hotel-desp-box common-srch satr-num-'.$hotelRating.' '.$curFacs.' '.$filterComb[$facCombFlag]['identity'].' '.$hotel_code.' '.$cityClass.'\" id=\"s-'.$hotelRating.'\"><a href=\"'.$roomUrl.'?hotel='.$hotel_code.'\" class=\"desp-link\"></a>'.\n '<div class=\"hotel-img\">'.\n '<img style=\"height:200px; width:300px;\" src=\"'.$result[$i][\"image\"].'\">'.\n '</div>'.\n '<div class=\"hotel-desp\">'.\n '<span class=\"hotel-rating '.$class.' check-price\">'.$rating.'</span>'.\n '<div class=\"hotel-name-price\">'.\n '<div class=\"left-align\">'.$result[$i][\"name\"]. '<span>'.$result[$i][\"address\"] .\", \". $result[$i][\"city\"].\n '</span></div>';\n $html .= '<div class=\"right-align\">$'.round($newrate/$nights,2).'<span>/night</span></div>'.\n '</div>'.\n '<p>';\n $des = \"\";\n if(isset($result[$i][\"shortDescription\"])) {\n if(is_array($result[$i][\"shortDescription\"])){\n $desc = implode(\" \",$result[$i][\"shortDescription\"]);\n @$pos=strpos($desc, ' ', 150);\n $des = substr($desc,0,$pos ).\" \".\"...\";\n }else{\n @$pos = strpos($result[$i][\"shortDescription\"], ' ', 150);\n $des = substr($result[$i][\"shortDescription\"],0,$pos ).\" \".\"...\";\n }\n }\n $html .= $des.'</p></a>'.\n '<div class=\"hotel-links\">'.\n '<div class=\"left-align\">'.\n '<ul>'.\n '<li>'.\n '<a href=\"'.$roomUrl.'?hotel='.$hotel_code.'&section=overview\">Overview</a>'.\n '</li>'.\n '<li>'.\n '<a href=\"'.$roomUrl.'?hotel='.$hotel_code.'&section=rooms\">Room Details</a>'.\n '</li>'.\n ' </ul>'.\n '</div>'.\n '<div class=\"right-align\">'.\n '<a href=\"'.$bookUrl.'\">Book Rooms<i class=\"ion-ios-arrow-thin-right\"></i></a>'.\n '</div>'.\n '</div>'.\n '</div>'.\n '<div class=\"clear\"></div>'.\n '</div>';\n $filterComb[$facCombFlag]['lastIndex'] = $i;\n $recordLen = count($filterComb[$facCombFlag]['records']);\n $filterComb[$facCombFlag]['records'][$recordLen] = $result[$i];\n //}\n \n /*============================== making html section ================================*/\n\n if($lastIndexCounter == 15){\n\n break;\n\n }\n\n }\n\n if($lastIndexCounter < 15)\n\n {\n\n $filterComb[$facCombFlag]['lastIndex'] = count($result);\n\n }\n\n $request->session()->set('hotels',$result);\n\n $request->session()->set('filterCombinations',$filterComb);\n\n $request->session()->set('reqFlag',1);\n\n $request->session()->save();\n\n return response()->json(['error'=>0,'msg'=>$html,'identity'=>$filterComb[$facCombFlag]['identity'],'count'=>$lastIndexCounter\n\n ,'lastindex'=>$filterComb[$facCombFlag]['lastIndex'],'startIndex'=>$startIndex,'reside'=>$reside]);\n\n /*============ end portion executed if filters applied =========*/\n\n }\n\n else\n\n {\n\n /*============ portion executed if filters not applied =========*/\n\n $hotelsLen = count($result);\n\n if($imgLimit >= $hotelsLen || $flag == 0)\n\n {\n\n return response()->json(['error'=>1,'msg'=>'','identity'=>'withoutFilter']);\n\n }\n\n $curLen = $imgLimit+15;\n\n if($curLen > $hotelsLen)\n\n {\n\n $diff = $hotelsLen-$imgLimit;\n\n $curLen = $imgLimit+$diff;\n\n }\n\n $request->session()->set(\"reqFlag\",0);\n\n $request->session()->set(\"filterChanged\",-1);\n\n $request->session()->set('imgCount',$curLen);\n\n $request->session()->save();\n\n $price = $request->input('price');\n\n $amount = str_replace(\"$\",\"\",$price);\n\n\n $array = explode(\"-\",$amount);\n\n\n\n $amt1 = $array[0];\n\n $amt2 = $array[1];\n\n $nights = $request->session()->get('nights');\n\n $html = \"\";\n\n for($i = $imgLimit; $i < $curLen; $i++)\n\n {\n\n $hotel_code = $result[$i][\"hotelCode\"];\n\n /*============================== rating section =================================*/\n\n\n List($class, $hotelRating, $rating) = Helper::starCheckerWithoutCounter($result[$i][\"starRating\"]);\n\n /*============================== rating section =================================*/\n\n\n\n /*============================== images section =================================*/\n\n if(!isset($result[$i]['image']))\n\n {\n\n $url1 = \"http://api.bonotel.com/index.cfm/user/\".$this->APiUser.\"/action/hotel/hotelCode/\".$hotel_code;\n\n $ch1 = curl_init();\n\n curl_setopt($ch1, CURLOPT_URL, $url1);\n\n curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);\n\n curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, false);\n\n curl_setopt($ch1, CURLOPT_POST, false);\n\n $result1 = curl_exec($ch1);\n\n curl_close($ch1);\n\n $hotelImages = @simplexml_load_string($result1);\n\n if(isset($hotelImages->code))\n\n {\n\n $result[$i]['image'] = (String)$result[$i]['thumbNailUrl'];\n\n }\n\n else\n\n {\n\n $result[$i]['image'] = (String)$hotelImages->hotel->images->image[0];\n\n }\n\n /*$curImg = DB::table('hotel')->where('hotelCode',$hotel_code)->select('image')->first();\n\n if(isset($curImg->image) && !empty($curImg->image))\n\n {\n\n $result[$i]['image'] = (String)$curImg->image;\n\n }\n\n else\n\n {\n\n $result[$i]['image'] = (String)$result[$i]['thumbNailUrl'];\n\n }*/\n\n $imgName = array('image' => $result[$i]['image'], 'code' => (string)$result[$i][\"hotelCode\"]);\n\n $request->session()->push('hImages',$imgName);\n\n }\n\n /*============================== images section ====================================*/\n\n $newrate = 0;\n\n /*============================== rates section =====================================*/\n\n $currMinDeal = array();\n\n $currMinDeal = $result[$i][\"roomInformation\"];\n\n if(isset($currMinDeal[0]['roomCode']))\n\n {\n\n uasort($currMinDeal, function ($a, $b) {\n\n return intval(str_replace(',','',$a['rateInformation']['totalRate'])) - intval(str_replace(',','',$b['rateInformation']['totalRate']));\n\n });\n\n $currMinDeal = array_values($currMinDeal);\n\n }\n\n if(empty($currMinDeal[0][\"rateInformation\"][\"totalRate\"]))\n\n {\n\n $rate = $currMinDeal[\"rateInformation\"][\"totalRate\"];\n\n $newrate = str_replace( ',', '', $rate);\n\n }\n\n else\n\n {\n $rate = Helper::getOptimalRate($currMinDeal);\n\n $newrate = str_replace( ',', '', $rate );\n\n }\n\n /*============================== end rates section ==================================*/\n\n\n\n /*============================== add taxes by admin =================================*/\n\n $rate = Helper::Rate();\n\n $actualTax = floatVal(str_replace(\",\",\"\",$rate[0]->global_value));\n\n $actualDis = floatVal(str_replace(\",\",\"\",$rate[0]->global_discount));\n\n $rateType = $rate[0]->global_type;\n\n\n\n if($rateType == 0)\n\n {\n\n $taxAmount = floatVal(($newrate*$actualTax)/100);\n\n $discountAmount = floatVal(($actualDis*$newrate)/100);\n\n $totalRate = floatVal($totalRate+$taxAmount-$discountAmount);\n\n }\n\n elseif($rateType == 1)\n\n {\n\n $totalRate = floatVal($newrate+$actualTax-$actualDis);\n\n }\n\n if($actualTax > 0)\n\n {\n\n $totalRent = round($totalRate/$nights,2);\n\n }\n\n else\n\n {\n\n $totalRent = round($newrate/$nights,2);\n\n }\n\n /*============================== making html section ================================*/\n\n if (($amt1 <= ($newrate/$nights)) && ($amt2 >= ($newrate/$nights)))\n\n {\n\n $cityClass = str_replace(\" \",\"-\",$result[$i][\"city\"]);\n\n $roomUrl = url(\"/rooms\");\n\n $bookUrl = url(\"/payment\").\"/\".$result[$i][\"hotelCode\"];\n\n $html .= '<div class=\"hotel-desp-box common-srch satr-num-'.$hotelRating.' '.' withoutFilter '.$result[$i]['hotelCode'].' '.$cityClass.'\" id=\"s-'.$hotelRating.'\"><a href=\"'.$roomUrl.'?hotel='.$hotel_code.'\" class=\"desp-link\"></a>'.\n\n '<div class=\"hotel-img\">'.\n\n '<img style=\"height:200px; width:300px;\" src=\"'.$result[$i][\"image\"].'\">'.\n\n '</div>'.\n\n '<div class=\"hotel-desp\">'.\n\n '<span class=\"hotel-rating '.$class.' check-price\">'.$rating.'</span>'.\n\n '<div class=\"hotel-name-price\">'.\n\n '<div class=\"left-align\">'.$result[$i][\"name\"]. '<span>'.$result[$i][\"address\"] .\", \". $result[$i][\"city\"].\n\n '</span></div>';\n\n $html .= '<div class=\"right-align\">$'.$totalRent.'<span>/night</span></div>'.\n\n '</div>'.\n\n '<p>';\n\n $des = \"\";\n\n if(isset($result[$i][\"shortDescription\"])) {\n\n if(is_array($result[$i][\"shortDescription\"]))\n\n {\n\n $desc = implode(\" \",$result[$i][\"shortDescription\"]);\n\n @$pos=strpos($desc, ' ', 150);\n\n $des = substr($desc,0,$pos ).\" \".\"...\";\n\n }\n\n else\n\n {\n\n @$pos = strpos($result[$i][\"shortDescription\"], ' ', 150);\n\n $des = substr($result[$i][\"shortDescription\"],0,$pos ).\" \".\"...\";\n\n }\n\n }\n\n $html .= $des.'</p></a>'.\n\n '<div class=\"hotel-links\">'.\n\n '<div class=\"left-align\">'.\n\n '<ul>'.\n\n '<li>'.\n\n '<a href=\"'.$roomUrl.'?hotel='.$result[$i][\"hotelCode\"].'&section=overview\">Overview</a>'.\n\n '</li>'.\n\n '<li>'.\n\n '<a href=\"'.$roomUrl.'?hotel='.$result[$i][\"hotelCode\"].'&section=rooms\">Room Details</a>'.\n\n '</li>'.\n\n ' </ul>'.\n\n '</div>'.\n\n '<div class=\"right-align\">'.\n\n '<a href=\"'.$bookUrl.'\">Book Room<i class=\"ion-ios-arrow-thin-right\"></i></a>'.\n\n '</div>'.\n\n '</div>'.\n\n '</div>'.\n\n '<div class=\"clear\"></div>'.\n\n '</div>';\n\n }\n /*============================== making html section ================================*/\n }\n $request->session()->set('hotels',$result);\n $request->session()->set('reqFlag',1);\n $request->session()->save();\n return response()->json(['error'=>0,'msg'=>$html,'identity'=>'withoutFilter','lastindex'=>$curLen]);\n /*======== end portion executed if filters not applied =========*/\n }\n }", "title": "" }, { "docid": "c1f06f489c0db3ef92d6a998f03ebd3b", "score": "0.41885903", "text": "public function prepare($is_drush = FALSE) {\n try {\n $this->sendDrushLog('------------------', 'success', $is_drush);\n $this->sendDrushLog('Prepare - GTFS schedule switch over check', 'success', $is_drush);\n $this->sendDrushLog('------------------', 'success', $is_drush);\n\n /******************************\n * Check for GTFS switchover\n * - Upcoming > Feed Info > Start Date\n * -- Exists\n * -- In the past\n ******************************/\n $table_key = 'gtfs_feed_info__upcoming';\n $query = $this->databaseConnection->select($table_key, 'gfi');\n $query->fields('gfi', [\n 'feed_start_date',\n ]);\n $results = $query->execute()->fetchAll();\n\n $upcoming_start_date = '';\n if (!empty($results)) {\n $upcoming_start_date = $results[0]->feed_start_date;\n }\n\n if (\n !empty($upcoming_start_date) &&\n strtotime($upcoming_start_date) < strtotime('now')\n ) {\n $this->sendDrushLog('-- Ready for switch over', 'success', $is_drush);\n $this->sendDrushLog('--------------------------------------', 'success', $is_drush);\n\n /******************************\n * Copying / Removing Route Maps and Turn by Turn Directions\n * - Upcoming -> Current\n ******************************/\n try {\n $this->sendDrushLog('------------------', 'success', $is_drush);\n $this->sendDrushLog('Copying / Removing Route Maps and Turn by Turn Directions', 'success', $is_drush);\n $this->sendDrushLog('------------------', 'success', $is_drush);\n\n $routes = $this->entityManager->getStorage('node')->loadByProperties([\n 'type' => 'route',\n ]);\n $route_update_count = 0;\n\n if (!empty($routes)) {\n\n foreach ($routes as $route) {\n $route_updated = FALSE;\n\n /******************************\n * Maps\n ******************************/\n if (\n $route->hasField('field_map') &&\n $route->hasField('field_up_map') &&\n !($route->get('field_up_map')->isEmpty())\n ) {\n $upcoming_map_target_id = $route->get('field_up_map')->getValue()[0]['target_id'];\n $route->get('field_map')->setValue($upcoming_map_target_id);\n $route->get('field_up_map')->setValue(NULL);\n $route_updated = TRUE;\n }\n\n /******************************\n * Turn by Turn Directions\n ******************************/\n if (\n $route->hasField('field_turn_by_turn_directions') &&\n $route->hasField('field_up_turn_by_turn_directions') &&\n !empty($route->get('field_up_turn_by_turn_directions')->getValue()[0]['value'])\n ) {\n $upcoming_turn_by_turn_directions = [\n $route->get('field_up_turn_by_turn_directions')->getValue()[0]['value'],\n $route->get('field_up_turn_by_turn_directions')->getValue()[1]['value'],\n ];\n $route->get('field_turn_by_turn_directions')->setValue($upcoming_turn_by_turn_directions);\n $route->get('field_up_turn_by_turn_directions')->setValue(NULL);\n $route_updated = TRUE;\n }\n\n if ($route_updated) {\n $route->save();\n $route_update_count++;\n }\n }\n }\n $this->sendDrushLog('Routes updated: ' . $route_update_count, 'success', $is_drush);\n }\n catch (\\Exception $e) {\n throw $e;\n }\n finally {\n /******************************\n * Validate\n * - Expected Result:\n * -- Empty Route Upcoming Map and Turn by Turn Directions\n ******************************/\n $validation_result = TRUE;\n\n $routes = $this->entityManager->getStorage('node')->loadByProperties([\n 'type' => 'route',\n ]);\n\n if (!empty($routes)) {\n foreach ($routes as $route) {\n if (\n (\n $route->hasField('field_up_map') &&\n !($route->get('field_up_map')->isEmpty())\n ) || (\n $route->hasField('field_up_turn_by_turn_directions') &&\n !empty($route->get('field_up_turn_by_turn_directions')->getValue()[0]['value'])\n )\n ) {\n $validation_result = FALSE;\n }\n }\n }\n\n /******************************\n * Logging\n ******************************/\n $logging_info = [\n 'step' => 'Prepare - Copying / Removing Route Maps and Turn by Turn Directions',\n 'result' => $validation_result ? 'passed' : 'failed',\n 'summary' => $validation_result ? 'Successfully copied / removed Route Maps and Turn by Turn Directions.' : 'Route Maps and Turn by Turn Directions not fully copied / removed.',\n ];\n $this->logMessage($is_drush, $logging_info);\n }\n\n /******************************\n * Remove all Route Schedule PDFs\n ******************************/\n try {\n $this->sendDrushLog('------------------', 'success', $is_drush);\n $this->sendDrushLog('Removing outdated Route Schedule PDFs', 'success', $is_drush);\n $this->sendDrushLog('------------------', 'success', $is_drush);\n\n $route_schedule_pdf_versions = [\n 'current',\n 'upcoming',\n ];\n\n foreach ($route_schedule_pdf_versions as $route_schedule_pdf_version) {\n $this->sendDrushLog(ucwords($route_schedule_pdf_version), 'success', $is_drush);\n\n $directory = VtaGtfsImportService::ROUTE_SCHEDULE_PDF_DIRECTORY_PATH . $route_schedule_pdf_version . '/';\n $it = new RecursiveDirectoryIterator($directory, FilesystemIterator::SKIP_DOTS);\n $files = new RecursiveIteratorIterator($it, RecursiveIteratorIterator::CHILD_FIRST);\n\n $remove_directory_count = 0;\n $remove_file_count = 0;\n foreach ($files as $file) {\n if ($file->isDir()) {\n rmdir($file);\n $remove_directory_count++;\n }\n else {\n unlink($file);\n $remove_file_count++;\n }\n }\n $this->sendDrushLog('-- Directories removed: ' . $remove_directory_count, 'success', $is_drush);\n $this->sendDrushLog('-- Files removed: ' . $remove_file_count, 'success', $is_drush);\n if ($route_schedule_pdf_versions === 'current') {\n $this->sendDrushLog('------------------', 'success', $is_drush);\n }\n }\n $this->sendDrushLog('--------------------------------------', 'success', $is_drush);\n }\n catch (\\Exception $e) {\n throw $e;\n }\n finally {\n /******************************\n * Validate\n * - Expected Result:\n * -- Empty Route Schedule PDF directories\n ******************************/\n $validation_result = TRUE;\n\n foreach ($route_schedule_pdf_versions as $route_schedule_pdf_version) {\n $directory = VtaGtfsImportService::ROUTE_SCHEDULE_PDF_DIRECTORY_PATH . $route_schedule_pdf_version;\n\n if ((new \\FilesystemIterator($directory))->valid()) {\n $validation_result = FALSE;\n }\n }\n\n /******************************\n * Logging\n ******************************/\n $logging_info = [\n 'step' => 'Prepare - Remove Route Schedule PDFs',\n 'result' => $validation_result ? 'passed' : 'failed',\n 'summary' => $validation_result ? 'Successfully removed Route Scheduled PDFs.' : 'Route Scheduled PDFs not fully removed.',\n ];\n $this->logMessage($is_drush, $logging_info);\n }\n\n /******************************\n * Copying / Removing GTFS files\n *\n * Mapping:\n * - current_previous -> (removed)\n * - current -> current_previous\n * - upcoming -> current\n * - upcoming_next -> upcoming\n ******************************/\n try {\n $this->sendDrushLog('------------------', 'success', $is_drush);\n $this->sendDrushLog('Copying / Removing GTFS files', 'success', $is_drush);\n $this->sendDrushLog('------------------', 'success', $is_drush);\n\n $gtfs_import_files_directory = VtaGtfsImportService::IMPORT_DIRECTORY_PATH;\n $current_previous_directory = $gtfs_import_files_directory . 'current_previous/';\n $current_directory = $gtfs_import_files_directory . 'current/';\n $upcoming_directory = $gtfs_import_files_directory . 'upcoming/';\n $upcoming_next_directory = $gtfs_import_files_directory . 'upcoming_next/';\n\n $gtfs_import_files_mappings = [\n 'current_previous' => [\n 'source' => $current_previous_directory,\n 'destination' => '',\n 'action' => 'remove',\n ],\n 'current' => [\n 'source' => $current_directory,\n 'destination' => $current_previous_directory,\n 'action' => 'copy',\n ],\n 'upcoming' => [\n 'source' => $upcoming_directory,\n 'destination' => $current_directory,\n 'action' => 'copy',\n ],\n 'upcoming_next' => [\n 'source' => $upcoming_next_directory,\n 'destination' => $upcoming_directory,\n 'action' => 'copy',\n ],\n ];\n\n foreach ($gtfs_import_files_mappings as $mapping_key => $gtfs_import_files_mapping) {\n $mapping_key = ucwords(str_replace('_', ' ', $mapping_key));\n\n // Main GTFS files.\n $this->sendDrushLog($mapping_key, 'success', $is_drush);\n $this->prepareFiles($gtfs_import_files_mapping, $is_drush);\n\n // Helper GTFS files.\n $this->sendDrushLog($mapping_key . ' - Helper', 'success', $is_drush);\n $gtfs_import_files_mapping['source'] .= '/helper/';\n $gtfs_import_files_mapping['destination'] .= '/helper/';\n $this->prepareFiles($gtfs_import_files_mapping, $is_drush);\n\n $this->sendDrushLog('-------------------', 'success', $is_drush);\n }\n }\n catch (\\Exception $e) {\n throw $e;\n }\n finally {\n /******************************\n * Validate\n * - Expected Result:\n * -- Directory is EMPTY -- TRUE\n * -- Directory is NOT EMPTY -- FALSE\n ******************************/\n $validation_result = TRUE;\n $gtfs_import_files_expected_results = [\n 'current_prevous' => FALSE,\n 'current' => FALSE,\n 'upcoming' => TRUE,\n 'upcoming_next' => TRUE,\n ];\n\n foreach ($gtfs_import_files_mappings as $mapping_key => $gtfs_import_files_mapping) {\n $files = scandir($gtfs_import_files_mapping['source']);\n\n foreach ($files as $file) {\n // Check to see if there is a valid file.\n if (!in_array($file, ['.', '..', 'helper']) && substr($file, 0, 1) != '.') {\n // Check if the directory should be empty.\n if ($gtfs_import_files_expected_results[$mapping_key]) {\n $validation_result = FALSE;\n }\n break;\n }\n }\n }\n\n /******************************\n * Logging\n ******************************/\n $logging_info = [\n 'step' => 'Prepare - Copying / Removing GTFS files',\n 'result' => $validation_result ? 'passed' : 'failed',\n 'summary' => $validation_result ? 'Successfully copied / removed GTFS files.' : 'GTFS files not fully copied / removed.',\n ];\n $this->logMessage($is_drush, $logging_info);\n }\n }\n else {\n $this->sendDrushLog('-- Not ready for switch over', 'success', $is_drush);\n }\n $this->sendDrushLog('--------------------------------------', 'success', $is_drush);\n }\n catch (\\Exception $e) {\n throw $e;\n }\n }", "title": "" }, { "docid": "d4182033d14bd4b64c85aef8fc0ea9db", "score": "0.41837695", "text": "public static function streak()\n {\n $tweets = Tweet::orderBy('created', 'asc')->get();\n\n if (count($tweets) < 2) {\n return [\n Carbon::now(config('app.timezone')),\n Carbon::now(config('app.timezone')),\n ];\n }\n\n $maintenanceDays = config('app.maintenance_days');\n $startDate = null; //$tweets[0]->created->copy();\n $endDate = null; //$tweets[1]->created->copy();\n $counter = null; //$endDate->copy();\n $longestDiff = 0;\n\n for ($i = 0; $i < count($tweets) - 1; $i++) {\n $newStartDate = $tweets[$i]->created->copy();\n $newEndDate = $tweets[$i+1]->created->copy();\n $newCounter = $newEndDate->copy();\n\n // Handle maintenance days\n foreach ($maintenanceDays as $day) {\n // Subtract a day for each maintenance day from the end of the streak, if the maintenace\n // day occurred during a streak, reducing the difference.\n // Maintenance days don't reset the clock but don't count as a day of service either.\n if ($newStartDate->lessThanOrEqualTo($day) && $newEndDate->greaterThanOrEqualTo($day)) {\n $newCounter->subDay();\n }\n }\n\n $diff = $newStartDate->diffInSeconds($newCounter);\n if ($diff > $longestDiff) {\n $longestDiff = $diff;\n $startDate = $newStartDate;\n $endDate = $newEndDate;\n $counter = $newCounter;\n }\n }\n\n // Handle current time. Are we currently in the longest streak?\n $lastTweet = Cache::rememberForever('lastTweet', function () {\n return Tweet::last()->get()[0];\n });\n\n $lastDate = $lastTweet->created->copy();\n $now = Carbon::now(config('app.timezone'));\n $counterNow = $now->copy();\n\n // Handle maintenance days\n foreach ($maintenanceDays as $day) {\n // Subtract a day for each maintenance day from the end of the streak, if the maintenace\n // day occurred during a streak, reducing the difference.\n // Maintenance days don't reset the clock but don't count as a day of service either.\n if ($lastDate->lessThanOrEqualTo($day) && $now->greaterThanOrEqualTo($day)) {\n $counterNow->subDay();\n }\n }\n\n $currDiff = $lastDate->diffInSeconds($counterNow);\n if ($currDiff > $longestDiff) {\n $startDate = $lastDate;\n $endDate = $now;\n $counter = $counterNow;\n }\n\n return [\n $startDate,\n $endDate,\n $counter,\n ];\n }", "title": "" }, { "docid": "4f8cf20db1ecf6408d7b384700945a5a", "score": "0.41762963", "text": "public function run()\n {\n \t$games = IGDB::searchGames('Dark Souls');\n foreach ($games as $game) {\n \t$onPc = false;\n \tforeach($game->platforms as $p)\n \t{\n \t\t$platform = IGDB::getPlatform($p);\n \t\tif($platform->name == \"PC (Microsoft Windows)\")\n \t\t\t$onPc = true;\n \t}\n \tif($onPc)\n \t{\n \t\tGame::create([\n\t\t 'name' => $game->name,\n\t\t 'description' => $game->summary,\n\t\t 'genre' => IGDB::getGenre($game->genres[0])->name,\n\t\t 'release_date' => $game->release_dates[0]->human,\n\t\t 'image' => 'https:'. str_replace('thumb', '1080p', $game->cover->url), //choose the cover definition\n\t\t 'gamepack_id' => 1,\n\t \t]);\n \t}\n } \n\n \t$games = IGDB::searchFranchises('Warcraft')[0];\n \t$i = 0;\n foreach ($games->games as $k) {\n \t$game = IGDB::getGame($k);\n \tif($i < self::MAX_GAMES)\n \t{\n\t \t\tGame::create([\n\t\t 'name' => isset($game->name) ? $game->name : '',\n\t\t 'description' => isset($game->summary) ? $game->summary : '',\n\t\t 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n\t\t 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n\t\t 'image' => 'https:'. isset($game->cover) ? str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n\t\t 'gamepack_id' => 2,\n\t \t]); \n \t}\n \t$i++; \n } \n\n $games = null;\n \t$games[] = IGDB::searchGames('Civilization VI')[0];\n \t$games[] = IGDB::searchGames('XCOM 2')[0];\n \t$games[] = IGDB::searchGames('Total War Warhammer 2')[0];\n \t$games[] = IGDB::searchGames('StarCraft 2: Wings of Liberty')[0];\n \t$games[] = IGDB::searchGames('Aven Colony')[0];\n\n \t$i = 0;\n foreach ($games as $game) {\n \tif($i < self::MAX_GAMES)\n \t{\n\t \t\tGame::create([\n\t\t 'name' => isset($game->name) ? $game->name : '',\n\t\t 'description' => isset($game->summary) ? $game->summary : '',\n\t\t 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n\t\t 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n\t\t 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n\t\t 'gamepack_id' => 3,\n\t \t]); \n \t}\n \t$i++; \n } \n\n $games = null;\n \t$games[] = IGDB::searchGames('Nier: Automata')[0];\n \t$games[] = IGDB::searchGames('Mass Effect: Andromeda')[0];\n \t$games[] = IGDB::searchGames('Destiny 2')[0];\n \t$games[] = IGDB::searchGames('Tom Clancy\\'s Ghost Recon Wildlands')[0];\n \t$games[] = IGDB::searchGames('PlayerUnknown\\'s Battlegrounds')[0];\n\n \t$i = 0;\n foreach ($games as $game) {\n \tif($i < self::MAX_GAMES)\n \t{\n\t \t\tGame::create([\n\t\t 'name' => isset($game->name) ? $game->name : '',\n\t\t 'description' => isset($game->summary) ? $game->summary : '',\n\t\t 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n\t\t 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n\t\t 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n\t\t 'gamepack_id' => 4,\n\t \t]); \n \t}\n \t$i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Need For Speed : Payback')[0];\n $games[] = IGDB::searchGames('Need For Speed')[0];\n $games[] = IGDB::searchGames('Need For Speed : No Limits')[0];\n $games[] = IGDB::searchGames('Need For Speed : Rivals')[0];\n $games[] = IGDB::searchGames('Need For Speed : Most Wanted')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 5,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('The Elder Scrolls V : Skyrim')[0];\n $games[] = IGDB::searchGames('The Elder Scrolls IV : Oblivion')[0];\n $games[] = IGDB::searchGames('The Elder Scrolls III : Morrowind')[0];\n $games[] = IGDB::searchGames('The Elder Scrolls : Legends')[0];\n $games[] = IGDB::searchGames('The Elder Scrolls Online : Morrowind')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 6,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Total War : Rome II')[0];\n $games[] = IGDB::searchGames('Empire : Total War ')[0];\n $games[] = IGDB::searchGames('Napoleon : Total War')[0];\n $games[] = IGDB::searchGames('Total War : Warhammer 2')[0];\n $games[] = IGDB::searchGames('Total War : Attila')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 7,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Wolfenstein II')[0];\n $games[] = IGDB::searchGames('Call of Duty : WWII ')[0];\n $games[] = IGDB::searchGames('Far Cry 5')[0];\n $games[] = IGDB::searchGames('Battlefield 1')[0];\n $games[] = IGDB::searchGames('Titanfall 2')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 8,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Titan Quest')[0];\n $games[] = IGDB::searchGames('Diablo II ')[0];\n $games[] = IGDB::searchGames('Torchlight II')[0];\n $games[] = IGDB::searchGames('Grim Dawn')[0];\n $games[] = IGDB::searchGames('Victor Vran')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 9,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Street Fighter V')[0];\n $games[] = IGDB::searchGames('Mortal Kombat X ')[0];\n $games[] = IGDB::searchGames('Tekken 7')[0];\n $games[] = IGDB::searchGames('WWE 2K17')[0];\n $games[] = IGDB::searchGames('Dragon Ball FighterZ')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 10,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Surviving Mars')[0];\n $games[] = IGDB::searchGames('Cities Skylines ')[0];\n $games[] = IGDB::searchGames('Planet Coaster')[0];\n $games[] = IGDB::searchGames('Northgard')[0];\n $games[] = IGDB::searchGames('Overcooked')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 11,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Stellaris')[0];\n $games[] = IGDB::searchGames('Hearts of Iron IV')[0];\n $games[] = IGDB::searchGames('Crusader Kings II')[0];\n $games[] = IGDB::searchGames('Steel Division: Normandy 44')[0];\n $games[] = IGDB::searchGames('Europa Universalis IV')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 12,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Minecraft : Story Mode')[0];\n $games[] = IGDB::searchGames('Batman : The Telltale Series')[0];\n $games[] = IGDB::searchGames('The Walking Dead : A New Frontier')[0];\n $games[] = IGDB::searchGames('Tales from the Borderlands')[0];\n $games[] = IGDB::searchGames('Game of Thrones: A Telltale Games Series')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 13,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Fallout 4')[0];\n $games[] = IGDB::searchGames('Fallout 3')[0];\n $games[] = IGDB::searchGames('Fallout : New Vegas')[0];\n $games[] = IGDB::searchGames('Fallout 2')[0];\n $games[] = IGDB::searchGames('Fallout')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 14,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Kerbal Space Program ')[0];\n $games[] = IGDB::searchGames('Farming Simulator 2017')[0];\n $games[] = IGDB::searchGames('Euro Truck Simulator 2')[0];\n $games[] = IGDB::searchGames('Goat Simulator')[0];\n $games[] = IGDB::searchGames('The Sims 4')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 15,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Call of Duty : WWII')[0];\n $games[] = IGDB::searchGames('Call of Duty : Infinite Warfare')[0];\n $games[] = IGDB::searchGames('Call of Duty : Modern Warfare II')[0];\n $games[] = IGDB::searchGames('Call of Duty : Black Ops')[0];\n $games[] = IGDB::searchGames('Call of Duty : World at War')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 16,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Tom Clancy\\'s Ghost Recon Wildlands')[0];\n $games[] = IGDB::searchGames('Tom Clancy\\'s : The Division')[0];\n $games[] = IGDB::searchGames('Tom Clancy\\'s : Rainbow Six Siege')[0];\n $games[] = IGDB::searchGames('Tom Clancy\\'s Ghost Recon : Future Soldier')[0];\n $games[] = IGDB::searchGames('Tom Clancy\\'s Splinter Cell : Blacklist')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 17,\n ]); \n }\n $i++; \n }\n\n $games = null;\n $games[] = IGDB::searchGames('Assassin\\'s Creed : Origins')[0];\n $games[] = IGDB::searchGames('Assassin\\'s Creed : Syndicate')[0];\n $games[] = IGDB::searchGames('Assassin\\'s Creed : Black Flag')[0];\n $games[] = IGDB::searchGames('Assassin\\'s Creed : Unity')[0];\n $games[] = IGDB::searchGames('Assassin\\'s Creed Rogue')[0];\n\n $i = 0;\n foreach ($games as $game) {\n if($i < self::MAX_GAMES)\n {\n Game::create([\n 'name' => isset($game->name) ? $game->name : '',\n 'description' => isset($game->summary) ? $game->summary : '',\n 'genre' => isset($game->genres) ? IGDB::getGenre($game->genres[0])->name : '',\n 'release_date' => isset($game->release_dates[0]->human) ? $game->release_dates[0]->human : '',\n 'image' => isset($game->cover) ? 'https:'. str_replace('thumb', '1080p', $game->cover->url) : '', //choose the cover definition\n 'gamepack_id' => 18,\n ]); \n }\n $i++; \n }\n\n\n }", "title": "" }, { "docid": "bb0654f2fa6769e39d3d46a2b81ad9aa", "score": "0.4167441", "text": "private function iterateModel(){ \n //Determine initial adjustment\n $additionalSteamFlow = $this->steamToDA;\n if ( $additionalSteamFlow==0 ) $additionalSteamFlow = 1; \n if ($this->additionalSteamFlow) $additionalSteamFlow = $this->additionalSteamFlow;\n\n $this->debug = array();\n $adjustment = $this->convergeAdjustment($additionalSteamFlow, .01);\n \n $cc=0;\n $this->debug = array();\n while ( abs($adjustment)>1e-5 and $cc++<50){ \n $this->debug[$cc] = array();\n $adjustment = $this->convergeAdjustment($additionalSteamFlow);\n\n switch ($cc){\n case 1:\n $y1= $additionalSteamFlow;\n $x1 = $adjustment;\n break;\n case 2:\n $y2= $additionalSteamFlow;\n $x2 = $adjustment;\n break;\n default: \n //Set New Test Point\n $yNew = $additionalSteamFlow;\n $xNew = $adjustment;\n\n //Select Closest Old Test Point\n $y1diff = abs($y1-$yNew);\n $y2diff = abs($y2-$yNew);\n if ($y1diff<$y2diff){\n $y2 = $yNew;\n $x2 = $xNew;\n }else{\n $y2 = $y1;\n $x2 = $x1; \n $y1 = $yNew;\n $x1 = $xNew;\n }\n break;\n }\n\n //User Linear Interpolation to determine new adjustment\n if ( isset($y1) and isset($y2) ){\n if ($x2==$x1){ \n $adjustment = $this->convergeAdjustment($additionalSteamFlow+=$adjustment);\n break;\n }\n $slope = ($y2-$y1)/($x2-$x1);\n $yIntercept = $y2-$x2*$slope;\n if (($cc>10 and $cc%5==0) or (isset($lastSlope) and ($slope ==0 or $lastSlope/$slope<0) ) ){\n $additionalSteamFlow += $adjustment; \n }else{\n $additionalSteamFlow = $yIntercept; \n }\n $lastSlope = $slope;\n }else{\n $additionalSteamFlow += $adjustment;\n }\n if (is_nan($adjustment) ) break;\n }\n if ($this->checkWarnings()>0) $adjustment = $this->convergeAdjustment($additionalSteamFlow);\n $this->totalRuns = $cc;\n return $additionalSteamFlow;\n }", "title": "" }, { "docid": "a24c264b3866a69675957f25b3a693fa", "score": "0.41628385", "text": "function via_synch_users() {\n global $DB, $CFG;\n\n $result = true;\n\n $deleted = $DB->get_records_sql('SELECT u.id\n FROM {user} u\n LEFT JOIN {via_users} vu ON vu.userid = u.id\n WHERE u.deleted = 1 AND vu.id IS NOT null' );\n\n foreach ($deleted as $vuser) {\n\n $activities = $DB->get_records_sql('SELECT v.id, v.viaactivityid\n FROM {via_participants} vp\n LEFT JOIN {via} v ON v.id = vp.activityid\n WHERE vp.userid = '. $vuser->id);\n $api = new mod_via_api();\n\n try {\n foreach ($activities as $via) {\n if ($via->synchvia == 1 || $via->timesynched && is_null($via->synchvia)) {\n $synch = true;\n } else {\n $synch = false;\n }\n $response = via_remove_participant($vuser->id, $via->viaid, $synch);\n }\n $DB->delete_records('via_participants', array('userid' => $vuser->id));\n $DB->delete_records('via_users', array('userid' => $vuser->id));\n\n } catch (Exception $e) {\n notify(get_string(\"error:\".$e->getMessage(), \"via\"));\n $result = false;\n continue;\n }\n }\n\n // Else, no change, the sender is the same.\n return $result;\n\n}", "title": "" }, { "docid": "5962ffefa5a4d60d139513bc900dd66d", "score": "0.41620007", "text": "protected function execute($arguments = array(), $options = array())\n {\n $databaseManager = new sfDatabaseManager($this->configuration);\n $connection = $databaseManager->getDatabase($options['connection'])->getConnection();\n \n //{\\\"type\\\":\\\"subscribe\\\",\\\"data\\\":{\\\"player_id\\\":\\\"1974957\\\"}}\\x0d\\x0a\n\t\t//{\\\"type\\\":\\\"chat_join\\\",\\\"data\\\":{\\\"player_id\\\":\\\"1974957\\\",\\\"room\\\":\\\"global::181\\\"}}\\x0d\\x0a\n\t\t//{\\\"type\\\":\\\"chat_join\\\",\\\"data\\\":{\\\"player_id\\\":\\\"1974957\\\",\\\"room\\\":\\\"alliance::444136::181\\\"}}\\x0d\\x0a\n\t\t//{\\\"type\\\":\\\"chat_join\\\",\\\"data\\\":{\\\"player_id\\\":\\\"1974957\\\",\\\"room\\\":\\\"locale::181::en\\\",\\\"player_name\\\":\\\"BRIGADA\\\"}}\\x0d\\x0a\n \n $this->sector = 181;\n $this->player_id = 1974957;\n $this->player_name = \"BRIGADA\";\n $this->alliance_id = 444136;\n \n// $this->out[] = \n \n \n $this->connect();\n \n while(true) {\n \t$rsocks = array($this->sock);\n \t$wsocks = count($this->out) ? array($this->sock) : array();\n \t$esocks = null;\n \t\n \tif(socket_select($rsocks, $wsocks, $esocks, null) < 0)\n \t{\n \t\tdie('socket_select');\n \t}\n \t\n \tif(in_array($this->sock, $rsocks)) {\n \t\t$r = socket_read($this->sock, 4096);\n \t\tif(strlen($r) == 0) {\n \t\t\t$this->logBlock('RECONECTING', 'ERROR');\n \t\t\tsocket_shutdown($this->sock);\n\t\t\t\t\tsocket_close($this->sock);\n\t\t\t\t\t$this->out = array();\n \t\t\t$this->connect();\n \t\t}\n \t\telse {\n\t \t\t$messages = explode(\"\\r\\n\", $this->in.$r);\n\t \t\twhile(count($messages) > 1) {\n\t \t\t\t$cur = array_shift($messages);\n\t \t\t\t\n\t \t\t\t$c = json_decode($cur, true);\n\t \t\t\t\n\t \t\t\t$record = new Proxy();\n\t \t\t\t$record->type = $c['type'];\n\t \t\t\t$record->params = $c['data'];\n\t \t\t\t$record->save();\n\t \t\t\t\n\t \t\t\tswitch($c['type']) {\n\t \t\t\t\tcase 'subscribe':\n\t\t\t\t\t\t $this->out[] = array('type'=>'chat_join', 'data'=>array('player_id'=>strval($this->player_id), 'room'=>sprintf('global::%u', $this->sector)));\n\t\t\t\t\t\t $this->out[] = array('type'=>'chat_join', 'data'=>array('player_id'=>strval($this->player_id), 'room'=>sprintf('alliance::%u::%u', $this->alliance_id, $this->sector)));\n\t\t\t\t\t\t $this->out[] = array('type'=>'chat_join', 'data'=>array('player_id'=>strval($this->player_id), 'room'=>sprintf('locale::%u::en', $this->sector), 'player_name'=>$this->player_name));\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t\t\n\t \t\t\t\tcase 'chat_message':\n\t \t\t\t\t\t$chat = new Chat();\n\t \t\t\t\t\t$chat->fromArray($c['data']);\n\t \t\t\t\t\t$chat->save();\t \t\t\t\t\t\n\t \t\t\t\t\tbreak;\n\n\t \t\t\t\tcase 'chat_join':\n\t \t\t\t\t\tbreak;\n\t \t\t\t\t\t\n\t \t\t\t\tdefault:\n\t \t\t\t\t\t$this->logSection('>>>>>', $cur);\n\t \t\t\t\tcase 'job_completed':\n\t \t\t\t\tcase 'xp_changed':\n\t \t\t\t\tcase 'level_changed':\n\t \t\t\t\tcase 'force_changed':\n\t \t\t\t\tcase 'player_boosts_changed':\n\t \t\t\t\tcase 'energies_available_changed':\n\t \t\t\t\t\t\n//\t \t\t\t\t\t$record->d \n\t\t\t\t\t\t\t\tbreak;\n\t \t\t\t} \t\t\t\n\t \t\t}\n\t \t\t$this->in = implode(\"\\r\\n\", $messages);\n \t\t}\n \t}\n \t\n \tif(in_array($this->sock, $wsocks)) {\n \t\tif(count($this->out)) {\n \t\t\t$cur = json_encode(array_shift($this->out));\n \t\t\t$this->logSection('<<<', $cur);\n \t\t\tsocket_write($this->sock, $cur.\"\\r\\n\");\n \t\t}\n \t}\n }\n\n socket_close($this->sock);\n }", "title": "" }, { "docid": "38cf69012f4d3e1930a427640ff8113b", "score": "0.41606975", "text": "public function getStandingDay()\n {\n echo \"Starting get getStandingDay day ... \" . date(\"Y-m-d\") . \"............. \\n\";\n $league_cron = array_merge(loadLeague(), loadFavoriteLeague());\n $this->db->trans_start();\n foreach ($league_cron as $league_data) {\n $league = $league_data->id;\n $is_cup = $this->mdl_leagues->where('id', $league_data->id)->get()->is_cup;\n $standings = $this->sportradar->getStandingByLeagueId($league);\n try {\n if ($is_cup) {\n if (isset($standings->standings) && $standings->standings) {\n $this->db->trans_start();\n foreach ($standings->standings[0][\"groups\"] as $standingGroup) {\n foreach ($standingGroup[\"team_standings\"] as $standing) {\n $teamId = intval(str_replace(\"sr:competitor:\", \"\", $standing[\"team\"][\"id\"]));\n $team_standing = $this->mdl_teams->where('team_api_id', $teamId)->get();\n\n if ($team_standing) {\n // check exits on database team_standing\n // if exits delete data and update again\n\n $this->mdl_league_team_standing\n ->where('league_id', $league)\n ->where('team_id', $teamId)\n ->delete();\n\n $this->mdl_league_team_cup_standing->where('team_id', $teamId)->delete();\n if (!$this->mdl_league_group_cup->where('league_id', $league)->where('name', $standingGroup['name'])->get()) {\n $insert_data = array(\n 'name' => $standingGroup['name'],\n 'alias' => slug($standingGroup['name']),\n 'league_id' => $league,\n 'season_id' => 1,\n );\n $this->mdl_league_group_cup->insert($insert_data);\n }\n $insert_data_standing = array(\n 'team_id' => $teamId,\n 'team_api_id' => $teamId,\n 'team' => $standing[\"team\"][\"name\"],\n 'played' => $standing[\"played\"],\n 'won' => $standing[\"win\"],\n 'draw' => $standing[\"draw\"],\n 'lost' => $standing[\"loss\"],\n 'goals_for' => $standing[\"goals_for\"],\n 'goals_against' => $standing[\"goals_against\"],\n 'goal_difference' => $standing[\"goal_diff\"],\n 'points' => $standing[\"points\"],\n 'group' => $standingGroup['name'],\n 'updated_at' => date('Y-m-d H:i:s'),\n 'group_id' => $this->mdl_league_group_cup->where('league_id', $league)->where('name', $standingGroup['name'])->get()->league_group_id,\n );\n if ($this->mdl_league_team_cup_standing->insert($insert_data_standing)) {\n echo(\"Insert complete standing for team =>\" . $team_standing->name . \" league cup => \".$league_data->name.\" \\n\");\n }\n\n }\n }\n }\n $this->db->trans_complete();\n }\n } else {\n if (isset($standings->standings) && $standings->standings) {\n $this->db->trans_start();\n foreach ($standings->standings[0][\"groups\"] as $standingGroup) {\n foreach ($standingGroup[\"team_standings\"] as $standing) {\n $teamId = intval(str_replace(\"sr:competitor:\", \"\", $standing[\"team\"][\"id\"]));\n $team_standing = $this->mdl_teams->where('team_api_id', $teamId)->get();\n if ($team_standing) {\n // check exits on database team_standing\n // if exits delete data and update again\n $existTeamStanding = $this->mdl_league_team_standing->where('team_id', $teamId)->where('league_id', $league)->delete();\n $insert_data_standing = array(\n 'team_id' => $teamId,\n 'league_id' => $league,\n 'season_id' => 1,\n 'team_api_id' => $teamId,\n 'team' => $standing[\"team\"][\"name\"],\n 'played' => $standing[\"played\"],\n 'won' => $standing[\"win\"],\n 'draw' => $standing[\"draw\"],\n 'lost' => $standing[\"loss\"],\n 'goals_for' => $standing[\"goals_for\"],\n 'goals_against' => $standing[\"goals_against\"],\n 'goal_difference' => $standing[\"goal_diff\"],\n 'points' => $standing[\"points\"],\n 'updated_at' => date('Y-m-d H:i:s'),\n );\n if ($this->mdl_league_team_standing->insert($insert_data_standing)) {\n echo(\"Insert complete standing for team =>\" . $team_standing->name . \" league => \".$league_data->name.\" \\n\");\n }\n }\n }\n }\n $this->db->trans_complete();\n }\n }\n } catch (Exception $e) {\n echo \"XMLSoccerException: \" . $e->getMessage();\n }\n echo(\"DONE LEAGUE :\" . $league_data->id . \" \\n\");\n }\n $this->db->trans_complete();\n echo \"Hoàn tất lấy BXH Cup \\n\";\n log_message('info', 'Done all Standing()' . date(\"Y-m-d\"));\n log_message('info', '100% Done all cron Job Step 2 ' . date(\"Y-m-d\"));\n exit();\n }", "title": "" }, { "docid": "093ced3d9b577eb36ef60b1a8e05a496", "score": "0.41591036", "text": "protected function doChallenges()\n {\n\n // Initialize the sockets for reading\n $sockets = [];\n\n // By default we don't have any challenges to process\n $server_challenge = false;\n\n // Do challenge packets\n foreach ($this->servers as $server_id => $server) {\n /* @var $server \\GameQ\\Server */\n\n // This protocol has a challenge packet that needs to be sent\n if ($server->protocol()->hasChallenge()) {\n // We have a challenge, set the flag\n $server_challenge = true;\n\n // Let's make a clone of the query class\n $socket = clone $this->query;\n\n // Set the information for this query socket\n $socket->set(\n $server->protocol()->transport(),\n $server->ip,\n $server->port_query,\n $this->timeout\n );\n\n try {\n // Now write the challenge packet to the socket.\n $socket->write($server->protocol()->getPacket(Protocol::PACKET_CHALLENGE));\n\n // Add the socket information so we can reference it easily\n $sockets[(int)$socket->get()] = [\n 'server_id' => $server_id,\n 'socket' => $socket,\n ];\n } catch (QueryException $e) {\n // Check to see if we are in debug, if so bubble up the exception\n if ($this->debug) {\n throw new \\Exception($e->getMessage(), $e->getCode(), $e);\n }\n }\n\n unset($socket);\n\n // Let's sleep shortly so we are not hammering out calls rapid fire style hogging cpu\n usleep($this->write_wait);\n }\n }\n\n // We have at least one server with a challenge, we need to listen for responses\n if ($server_challenge) {\n // Now we need to listen for and grab challenge response(s)\n $responses = call_user_func_array(\n [$this->query, 'getResponses'],\n [$sockets, $this->timeout, $this->stream_timeout]\n );\n\n // Iterate over the challenge responses\n foreach ($responses as $socket_id => $response) {\n // Back out the server_id we need to update the challenge response for\n $server_id = $sockets[$socket_id]['server_id'];\n\n // Make this into a buffer so it is easier to manipulate\n $challenge = new Buffer(implode('', $response));\n\n // Grab the server instance\n /* @var $server \\GameQ\\Server */\n $server = $this->servers[$server_id];\n\n // Apply the challenge\n $server->protocol()->challengeParseAndApply($challenge);\n\n // Add this socket to be reused, has to be reused in GameSpy3 for example\n $server->socketAdd($sockets[$socket_id]['socket']);\n\n // Clear\n unset($server);\n }\n }\n }", "title": "" }, { "docid": "072df35e277b415bc802049e651b42d0", "score": "0.4158231", "text": "public function run()\n {\n $s1 = new Stage;\n $s1->question_text = '¿Año de inauguración del Kursaal?';\n $s1->lat = 43.32432693770287;\n $s1->lng = -1.978370547294617;\n $s1->stage_type = 'text';\n $s1->question_image = 'https://i.imgur.com/5cp4ooO.jpg';\n $s1->order = 1;\n $s1->circuit_id = 1;\n $s1->save();\n $s1->setAnswer('1999');\n\n $s2 = new Stage;\n $s2->question_text = '¿Nombre de esta playa?';\n $s2->lat = 43.31646676426851;\n $s2->lng = -1.9871950149536135;\n $s2->stage_type = 'quiz';\n $s2->order = 2;\n $s2->question_image = 'https://i.imgur.com/KWSW1SW.jpg';\n $s2->circuit_id = 1;\n $s2->save();\n $s2->setCorrect_ans('Concha');\n $s2->setPossible_ans1('Zurriola');\n $s2->setPossible_ans2('Ondarreta');\n $s2->setPossible_ans3('Santa Clara');\n\n $s1 = new Stage;\n $s1->question_text = '¿Qué es esto?';\n $s1->lat = 43.32432693770287;\n $s1->lng = -1.978370547294617;\n $s1->stage_type = 'text';\n $s1->order = 1;\n $s1->circuit_id = 2;\n $s1->save();\n $s1->setAnswer('juego');\n\n $s2 = new Stage;\n $s2->question_text = '¿Qué es esto?';\n $s2->lat = 43.327422;\n $s2->lng = -1.970889;\n $s2->stage_type = 'quiz';\n $s2->order = 2;\n $s2->circuit_id = 2;\n $s2->save();\n $s2->setCorrect_ans('Correcto');\n $s2->setPossible_ans1('Mal');\n $s2->setPossible_ans2('Mal');\n $s2->setPossible_ans3('Mal');\n\n $s1 = new Stage;\n $s1->question_text = '¿Año de inauguración del Kursaal?';\n $s1->lat = 43.32432693770287;\n $s1->lng = -1.978370547294617;\n $s1->stage_type = 'text';\n $s1->question_image = 'https://i.imgur.com/5cp4ooO.jpg';\n $s1->order = 1;\n $s1->circuit_id = 3;\n $s1->save();\n $s1->setAnswer('1999');\n\n $s2 = new Stage;\n $s2->question_text = '¿Nombre de esta playa?';\n $s2->lat = 43.31646676426851;\n $s2->lng = -1.9871950149536135;\n $s2->stage_type = 'quiz';\n $s2->order = 2;\n $s2->question_image = 'https://i.imgur.com/KWSW1SW.jpg';\n $s2->circuit_id = 3;\n $s2->save();\n $s2->setCorrect_ans('Concha');\n $s2->setPossible_ans1('Zurriola');\n $s2->setPossible_ans2('Ondarreta');\n $s2->setPossible_ans3('Santa Clara');\n\n\n $s1 = new Stage;\n $s1->question_text = '¿Año de inauguración del Kursaal?';\n $s1->lat = 43.32432693770287;\n $s1->lng = -1.978370547294617;\n $s1->stage_type = 'text';\n $s1->question_image = 'https://i.imgur.com/5cp4ooO.jpg';\n $s1->order = 1;\n $s1->circuit_id = 4;\n $s1->save();\n $s1->setAnswer('1999');\n\n $s2 = new Stage;\n $s2->question_text = '¿Nombre de esta playa?';\n $s2->lat = 43.31646676426851;\n $s2->lng = -1.9871950149536135;\n $s2->stage_type = 'quiz';\n $s2->order = 2;\n $s2->question_image = 'https://i.imgur.com/KWSW1SW.jpg';\n $s2->circuit_id = 4;\n $s2->save();\n $s2->setCorrect_ans('Concha');\n $s2->setPossible_ans1('Zurriola');\n $s2->setPossible_ans2('Ondarreta');\n $s2->setPossible_ans3('Santa Clara');\n\n $s1 = new Stage;\n $s1->question_text = '¿Cual es el nombre de este recinto?';\n $s1->lat = 43.322955;\n $s1->lng = -1.982457;\n $s1->stage_type = 'text';\n $s1->order = 1;\n $s1->circuit_id = 5;\n $s1->save();\n $s1->setAnswer('La Bretxa');\n\n $s2 = new Stage;\n $s2->question_text = '¿Cómo se llama la discoteca?';\n $s2->lat = 43.321489;\n $s2->lng = -1.986549;\n $s2->stage_type = 'quiz';\n $s2->order = 2;\n $s2->circuit_id = 5;\n $s2->save();\n $s2->setCorrect_ans('Gu');\n $s2->setPossible_ans1('Doka');\n $s2->setPossible_ans2('Bataplan');\n $s2->setPossible_ans3('DabaDaba');\n\n $s1 = new Stage;\n $s1->question_text = '¿Año de inauguración del Kursaal?';\n $s1->lat = 43.32432693770287;\n $s1->lng = -1.978370547294617;\n $s1->stage_type = 'text';\n $s1->question_image = 'https://i.imgur.com/5cp4ooO.jpg';\n $s1->order = 1;\n $s1->circuit_id = 5;\n $s1->save();\n $s1->setAnswer('1999');\n\n $s2 = new Stage;\n $s2->question_text = '¿Nombre de esta playa?';\n $s2->lat = 43.31646676426851;\n $s2->lng = -1.9871950149536135;\n $s2->stage_type = 'quiz';\n $s2->order = 2;\n $s2->question_image = 'https://i.imgur.com/KWSW1SW.jpg';\n $s2->circuit_id = 5;\n $s2->save();\n $s2->setCorrect_ans('Concha');\n $s2->setPossible_ans1('Zurriola');\n $s2->setPossible_ans2('Ondarreta');\n $s2->setPossible_ans3('Santa Clara');\n }", "title": "" }, { "docid": "ccd29b43eefa280b3065635aba2cdafc", "score": "0.4156326", "text": "public function applyBeforeQuery($query);", "title": "" }, { "docid": "6633d4ecaae7c44f6b6776b6ad67c62a", "score": "0.41545993", "text": "function mWS(){\n try {\n $_type = t016actionsLexer::T_WS;\n $_channel = t016actionsLexer::DEFAULT_TOKEN_CHANNEL;\n // runtime/Php/test/Antlr/Tests/grammers/t016actions.g\n // runtime/Php/test/Antlr/Tests/grammers/t016actions.g\n {\n // runtime/Php/test/Antlr/Tests/grammers/t016actions.g\n $cnt2=0;\n //loop2:\n do {\n $alt2=2;\n $LA2_0 = $this->input->LA(1);\n\n if ( (($LA2_0>=$this->getToken('9') && $LA2_0<=$this->getToken('10'))||$LA2_0==$this->getToken('13')||$LA2_0==$this->getToken('32')) ) {\n $alt2=1;\n }\n\n\n switch ($alt2) {\n \tcase 1 :\n \t // runtime/Php/test/Antlr/Tests/grammers/t016actions.g\n \t {\n \t if ( ($this->input->LA(1)>=$this->getToken('9') && $this->input->LA(1)<=$this->getToken('10'))||$this->input->LA(1)==$this->getToken('13')||$this->input->LA(1)==$this->getToken('32') ) {\n \t $this->input->consume();\n\n \t } else {\n \t $mse = new MismatchedSetException(null,$this->input);\n \t $this->recover($mse);\n \t throw $mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( $cnt2 >= 1 ) break 2;//loop2;\n $eee =\n new EarlyExitException(2, $this->input);\n throw $eee;\n }\n $cnt2++;\n } while (true);\n\n $_channel=self::$HIDDEN;\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "title": "" }, { "docid": "1e572d3753c7c6ecc452f47051646fe5", "score": "0.4152084", "text": "function _getHeadToHeadDetails( $tiedTeams ) {\n\n/* ... data declarations */\n foreach ($tiedTeams as $teamID) {\n $h2hPoints[$teamID] = 0;\n $h2hDiff[$teamID] = 0;\n }\n\n/* ... get the list of games these teams played against each other */\n $h2hGames = $this->Model_Schedule->getHeadToHeadMatches( $tiedTeams );\n\n/* ... now for each game these teams played, figure out who to record as the winner (or a tie) and run diff */\n foreach ($h2hGames as $gameID) {\n $gameDetails = $this->Model_Schedule->gameResult( $gameID );\n if ($gameDetails['Result'] != \"TIE\") {\n $h2hPoints[$gameDetails['Winner']] += 2;\n $h2hDiff[$gameDetails['Winner']] += $gameDetails['RunDiff'];\n $h2hDiff[$gameDetails['Loser']] -= $gameDetails['RunDiff'];\n }\n else {\n $h2hPoints[$gameDetails['Winner']] += 1;\n $h2hPoints[$gameDetails['Loser']] += 1;\n }\n }\n\n/* ... sort the data */\n arsort( $h2hPoints );\n arsort( $h2hDiff );\n\n/* ... time to go */\n return( array( $h2hPoints, $h2hDiff ) );\n }", "title": "" }, { "docid": "56a04dddd492713b15a567c6a1b98804", "score": "0.41509503", "text": "function sqlSubset($where = NULL) {\n error_reporting(E_ALL);\n global $esc;\n $collation = current_collation();\n $sql = \"\";\n if (!empty($esc['mysql']['url_query']) && strstr($where, \"u.\") == false)\n $sql .= \" INNER JOIN \" . $esc['mysql']['dataset'] . \"_urls u ON u.tweet_id = t.id \";\n if (!empty($esc['mysql']['media_url_query']) && strstr($where, \"med.\") == false)\n $sql .= \" INNER JOIN \" . $esc['mysql']['dataset'] . \"_media med ON med.tweet_id = t.id \";\n $sql .= \" WHERE \";\n if (!empty($where))\n $sql .= $where;\n if (!empty($esc['mysql']['from_user_name'])) {\n if (strstr($esc['mysql']['from_user_name'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['from_user_name']);\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.from_user_name COLLATE $collation) = LOWER('\" . $subquery . \"' COLLATE $collation) AND \";\n }\n } elseif (strstr($esc['mysql']['from_user_name'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['from_user_name']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.from_user_name COLLATE $collation) = LOWER('\" . $subquery . \"' COLLATE $collation) OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"LOWER(t.from_user_name COLLATE $collation) = LOWER('\" . $esc['mysql']['from_user_name'] . \"' COLLATE $collation) AND \";\n }\n }\n if (!empty($esc['mysql']['exclude_from_user_name'])) {\n if (strstr($esc['mysql']['exclude_from_user_name'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['exclude_from_user_name']);\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.from_user_name COLLATE $collation) NOT LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) AND \";\n }\n } elseif (strstr($esc['mysql']['exclude_from_user_name'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['exclude_from_user_name']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.from_user_name COLLATE $collation) NOT LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"LOWER(t.from_user_name COLLATE $collation) NOT LIKE LOWER('%\" . $esc['mysql']['exclude_from_user_name'] . \"%' COLLATE $collation) AND \";\n }\n }\n if (!empty($esc['mysql']['from_user_description'])) {\n if (strstr($esc['mysql']['from_user_description'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['from_user_description']);\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.from_user_description COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) AND \";\n }\n } elseif (strstr($esc['mysql']['from_user_description'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['from_user_description']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.from_user_description COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"LOWER(t.from_user_description COLLATE $collation) LIKE LOWER('%\" . $esc['mysql']['from_user_description'] . \"%' COLLATE $collation) AND \";\n }\n }\n if (!empty($esc['mysql']['query'])) {\n if (strstr($esc['mysql']['query'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['query']);\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.text COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) AND \";\n }\n } elseif (strstr($esc['mysql']['query'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['query']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.text COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"LOWER(t.text COLLATE $collation) LIKE LOWER('%\" . $esc['mysql']['query'] . \"%' COLLATE $collation) AND \";\n }\n }\n if (!empty($esc['mysql']['url_query'])) {\n if (strstr($esc['mysql']['url_query'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['url_query']);\n foreach ($subqueries as $subquery) {\n $sql .= \"(\";\n $sql .= \"(LOWER(u.url_followed COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(u.url_expanded COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation))\";\n $sql .= \")\";\n $sql .= \" AND \";\n }\n } elseif (strstr($esc['mysql']['url_query'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['url_query']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"(\";\n $sql .= \"(LOWER(u.url_followed COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(u.url_expanded COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation))\";\n $sql .= \")\";\n $sql .= \" OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $subquery = $esc['mysql']['url_query'];\n $sql .= \"(\";\n $sql .= \"(LOWER(u.url_followed COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(u.url_expanded COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation))\";\n $sql .= \") AND \";\n }\n }\n if (!empty($esc['mysql']['media_url_query'])) {\n if (strstr($esc['mysql']['media_url_query'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['media_url_query']);\n foreach ($subqueries as $subquery) {\n $sql .= \"(\";\n $sql .= \"(LOWER(med.url COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(med.media_url_https COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(med.url_expanded COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation))\";\n $sql .= \")\";\n $sql .= \" AND \";\n }\n } elseif (strstr($esc['mysql']['media_url_query'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['media_url_query']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"(\";\n $sql .= \"(LOWER(med.url COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(med.media_url_https COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(med.url_expanded COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation))\";\n $sql .= \")\";\n $sql .= \" OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $subquery = $esc['mysql']['media_url_query'];\n $sql .= \"(\";\n $sql .= \"(LOWER(med.url COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(med.media_url_https COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation)) OR \";\n $sql .= \"(LOWER(med.url_expanded COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation))\";\n $sql .= \") AND \";\n }\n }\n if (!empty($esc['mysql']['geo_query']) && dbserver_has_geo_functions()) {\n\n $polygon = \"POLYGON((\" . $esc['mysql']['geo_query'] . \"))\";\n\n $polygonfromtext = \"GeomFromText('\" . $polygon . \"')\";\n $pointfromtext = \"PointFromText(CONCAT('POINT(',t.geo_lng,' ',t.geo_lat,')'))\";\n\n $sql .= \" ( t.geo_lat != '0.00000' and t.geo_lng != '0.00000' and ST_Contains(\" . $polygonfromtext . \", \" . $pointfromtext . \") \";\n\n $sql .= \" ) AND \";\n }\n\n if (!empty($esc['mysql']['from_source'])) {\n if (strstr($esc['mysql']['from_source'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['from_source']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.source COLLATE $collation) LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"LOWER(t.source COLLATE $collation) LIKE LOWER('%\" . $esc['mysql']['from_source'] . \"%' COLLATE $collation) AND \";\n }\n }\n if (!empty($esc['mysql']['exclude'])) {\n if (strstr($esc['mysql']['exclude'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['exclude']);\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.text COLLATE $collation) NOT LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) AND \";\n }\n } elseif (strstr($esc['mysql']['exclude'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['exclude']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"LOWER(t.text COLLATE $collation) NOT LIKE LOWER('%\" . $subquery . \"%' COLLATE $collation) OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"LOWER(t.text COLLATE $collation) NOT LIKE LOWER('%\" . $esc['mysql']['exclude'] . \"%' COLLATE $collation) AND \";\n }\n }\n if (!empty($esc['mysql']['from_user_lang'])) {\n if (strstr($esc['mysql']['from_user_lang'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['from_user_lang']);\n foreach ($subqueries as $subquery) {\n $sql .= \"from_user_lang = '\" . $subquery . \"' AND \";\n }\n } elseif (strstr($esc['mysql']['from_user_lang'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['from_user_lang']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"from_user_lang = '\" . $subquery . \"' OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"from_user_lang = '\" . $esc['mysql']['from_user_lang'] . \"' AND \";\n }\n }\n if (!empty($esc['mysql']['lang'])) {\n if (strstr($esc['mysql']['lang'], \"AND\") !== false) {\n $subqueries = explode(\" AND \", $esc['mysql']['lang']);\n foreach ($subqueries as $subquery) {\n $sql .= \"lang = '\" . $subquery . \"' AND \";\n }\n } elseif (strstr($esc['mysql']['lang'], \"OR\") !== false) {\n $subqueries = explode(\" OR \", $esc['mysql']['lang']);\n $sql .= \"(\";\n foreach ($subqueries as $subquery) {\n $sql .= \"lang = '\" . $subquery . \"' OR \";\n }\n $sql = substr($sql, 0, -3) . \") AND \";\n } else {\n $sql .= \"lang = '\" . $esc['mysql']['lang'] . \"' AND \";\n }\n }\n\n if ( $esc['mysql']['replyto'] == 'yes' ) {\n $sql .= \"in_reply_to_status_id IS NULL AND \";\n }\n\n\n\n $sql .= \" t.created_at >= '\" . $esc['datetime']['startdate'] . \"' AND t.created_at <= '\" . $esc['datetime']['enddate'] . \"' \";\n //print $sql.\"<br>\"; die;\n\n return $sql;\n}", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "e0710dca4e74ea28a9a2498fc31098d8", "score": "0.0", "text": "public function run()\n {\n // $count = 4;\n VehicleCategory::create([\n 'name'=> 'Autos y Camionetas',\n 'slug'=> 'autos-y-camionetas',\n // 'image_url'=> \"\"\n ]);\n\n VehicleCategory::create([\n 'name'=> 'Camiones',\n 'slug'=> 'camiones',\n // 'image_url'=> \"\"\n ]);\n\n VehicleCategory::create([\n 'name'=> 'Motos',\n 'slug'=> 'motos',\n // 'image_url'=> \"\"\n ]);\n }", "title": "" } ]
[ { "docid": "963776365fb19044e27fa4db733ae2fd", "score": "0.80740553", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // factory(App\\User::class, 1001)->create()->each(function ($user) {\n // $user->roles()->attach([4]);\n // });\n\n // factory(App\\Model\\Listing\\Listing::class, 1000)->create()->each(function ($listing) {\n // for ($i=1; $i < rand(1, 10); $i++) { \n // $listing->categories()->attach([rand(1, 1719)]);\n // } \n // });\n\n //factory(App\\Model\\Category\\Category::class, 1720)->create();\n\n //factory(App\\Model\\Listing\\Ratings::class, 1000)->create();\n factory(App\\Model\\Listing\\Reviews::class, 7500)->create();\n }", "title": "" }, { "docid": "0106cc017f1041544cb660c0b7b15aa4", "score": "0.80636656", "text": "public function run()\n {\n\n // $this->call(UsersTableSeeder::class);\n factory(App\\Party::class, 50)->create();\n factory(App\\Parcel::class, 100)->create();\n factory(App\\Transfer::class, 200)->create();\n\n DB::table('document_type')->insert([\n 'name' => 'Quick Claim Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Warranty Deed'\n ]);\n DB::table('document_type')->insert([\n 'name' => 'Other Deed'\n ]);\n\n }", "title": "" }, { "docid": "e58d26f8aeda30b8582ea97455c145f1", "score": "0.79895705", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n DB::table('users')->truncate();\n DB::table('posts')->truncate();\n DB::table('categories')->truncate();\n DB::table('tags')->truncate();\n\n factory(App\\User::class,10)->create();\n $users = App\\User::all();\n factory(App\\Post::class,20)->make()->each(function($post)use($users){\n // dd($users->random()->id);\n $post->user_id = $users->random()->id;\n $post->save();\n });\n factory(App\\Tag::class,10)->create();\n $tags = App\\Tag::all();\n App\\Post::all()->each(function($post)use($tags){\n $post->tags()->sync($tags->random(rand(1,3))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "e2ab26233d4e02ab726b5051b8407cc4", "score": "0.7973096", "text": "public function run() {\n\t\t\n\t\t$this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\t\t\n\t\t//factory(User::class,10)->create();\n\t\t$tags = factory('App\\Tag',8)->create();\n\t\t$categories = factory('App\\Category',5)->create();\n\t\t\n\t\tfactory('App\\Post',15)->create()->each(function($post) use ($tags) {\n\t\t\t$post->comments()->save(factory('App\\Comment')->make());\n\t\t\t$post->categories()->attach(mt_rand(1,5));\n\t\t\t$post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n\t\t\t});\n\t\t\n\t\t}", "title": "" }, { "docid": "f9793248863f4c34dbb3819cb4517afd", "score": "0.7960071", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $ath = Athlete::create([\n 'name' => 'Carlos',\n 'surname' => 'Cebrecos',\n 'genre' => Genre::M,\n 'role' => 'Velocista',\n 'habilities' => '100 mll - 200 mll',\n 'license' => 'CT-19433',\n 'date_birth' => '1993-08-23',\n 'active' => True\n ]);\n\n Velocity::create([\n 'athlete_id' => $ath->id,\n 'category' => Category::PR,\n 'track' => '200mll',\n 'result' => '00:00:21.970',\n 'place' => 'San Sebastián',\n 'date' => '2013-02-11',\n 'field' => 'PC'\n ]);\n \n factory(App\\Athlete::class, 12)->create()->each(function ($u){\n $u->velocities()->save(factory(App\\Velocity::class)->make());\n $u->competitions()->save(factory(App\\Competition::class)->make());\n });\n }", "title": "" }, { "docid": "5b7510aab66d08421776839e939b8736", "score": "0.79478914", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n DB::table('users')->insert([\n 'name' =>\"locphan\",\n 'email' => '[email protected]',\n 'password' => Hash::make('12344321'),\n ]);\n\n DB::table('tags')->insert([\n 'name' =>\"HL\"\n ]);\n DB::table('tags')->insert([\n 'name' =>\"AI\"\n ]);\n\n DB::table('categories')->insert([\n 'name' =>\"Technology\"\n ]);\n DB::table('categories')->insert([\n 'name' =>\"Science\"\n ]);\n }", "title": "" }, { "docid": "71b82164ac0d4793056f9cd6e930fd2b", "score": "0.79316914", "text": "public function run()\n {\n $this->call(RoleTableSeeder::class);\n $this->call(UserTableSeeder::class);\n\n $tags = factory('App\\Tag', 8)->create();\n $categories = factory('App\\Category', 5)->create();\n\n factory('App\\Post', 15)->create()->each(function($post) use ($tags){\n $post->comments()->save(factory('App\\Comment')->make());\n $post->categories()->attach(mt_rand(1,5));\n $post->tags()->attach($tags->random(mt_rand(1,4))->pluck('id')->toArray());\n });\n }", "title": "" }, { "docid": "9172ae0257f26680f6efc009f6e63b7c", "score": "0.79181814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n $faker = Faker::create();\n \tforeach (range(1,10) as $index) {\n DB::table('posts')->insert([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph \n ]);\n\t}\n \n\n }", "title": "" }, { "docid": "5bfaf90476324edc67c90adf206a9eca", "score": "0.78917843", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(ContactsTableSeeder::class);\n\n\n DB::table('users')->insert([\n 'name' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n 'password' => Hash::make('password'),\n ]);\n\n DB::table('posts')->insert([\n 'post_id' => 1,\n 'post_content' => Str::random(10),\n 'post_title' => Str::random(10),\n 'post_status'=> Str::random(10),\n 'post_name'=> Str::random(10),\n 'post_type'=> Str::random(10),\n 'post_category'=> Str::random(10),\n 'post_date'=> '2020-03-13 12:00', \n \n ]);\n }", "title": "" }, { "docid": "9ca436f3408c7ae5cd47415014ebf341", "score": "0.7885604", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Book::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 $quantity= $faker->randomDigit;\n Book::create([\n 'title' => $faker->sentence,\n 'author' => $faker->firstName . \" \" . $faker->lastName,\n 'editor' => $faker->company,\n 'price' => $faker->randomFloat(2,5,50),\n 'quantity' => $quantity,\n 'available' => $quantity != 0\n ]);\n }\n }", "title": "" }, { "docid": "c466d72cc0a5ffc2ce690349590795f2", "score": "0.78851664", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n $programas = Programa::factory(10)->create();\n $canales = Canal::factory(10)->create();\n\n foreach($programas as $programa){\n $programa->canales()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Plan::factory(10)->create();\n\n foreach($canales as $canal){\n $canal->plans()->attach([\n rand(1,4),\n rand(5,8)\n ]);\n }\n\n Cable::factory(10)->create();\n Internet::factory(10)->create(); \n Telefonia::factory(10)->create(); \n Paquete::factory(10)->create();\n Factura::factory(10)->create();\n\n \n }", "title": "" }, { "docid": "6b480d5190ccba10aa7f084898878fda", "score": "0.7878214", "text": "public function run()\n {\n // reset the contents table\n DB::table('contents')->truncate();\n\n // generate 10 dummy contents data\n $contents = [];\n $faker = Factory::create();\n\n for ($i = 1; $i <= 10; $i++)\n {\n $contents[] = [\n 'user_id' => rand(1, 3),\n 'cancertype_id' => rand(1, 4),\n 'treatment_stage_id' => rand(1, 5),\n 'category_id' => rand(1, 4),\n 'title' => $faker->sentence(rand(5, 10)),\n 'body' => $faker->paragraphs(rand(10, 15), true),\n ];\n }\n\n DB::table('contents')->insert($contents);\n }", "title": "" }, { "docid": "b574cee3e999997b96242d9e48e9e538", "score": "0.7860442", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\n App\\User::create([\n 'name' => 'Administrador',\n 'email' => '[email protected]',\n 'password' => Hash::make('abc123')\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 1',\n 'descripcion' => 'Lorem ipsum dolor sit amet 1',\n 'imagen' => '1.png',\n 'orden' => 1\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 2',\n 'descripcion' => 'Lorem ipsum dolor sit amet 2',\n 'imagen' => '2.png',\n 'orden' => 2\n ]);\n\n App\\NegocioDigital::create([\n 'titulo' => 'Negocio 3',\n 'descripcion' => 'Lorem ipsum dolor sit amet 3',\n 'imagen' => '3.png',\n 'orden' => 3\n ]);\n }", "title": "" }, { "docid": "82184a634a30971b8da09162488cf43d", "score": "0.7856666", "text": "public function run()\n {\n // Truncate Employee table truncate before seeding\n Employee::truncate();\n \n $faker = Factory::create();\n \n foreach (range(1,50) as $index) {\n Employee::create([\n 'first_name' => $faker->firstname,\n 'last_name' => $faker->lastname,\n 'email' => $faker->unique()->safeEmail,\n 'company_id' => $faker->numberBetween($min = 1, $max = 10),\n 'phone' => $faker->numerify('##########'),\n 'created_at' => $faker->dateTime($max = 'now', $timezone = null),\n 'updated_at' => $faker->dateTime($max = 'now', $timezone = null)\n ]);\n }\n }", "title": "" }, { "docid": "58dde04e1aff533900aaa1de2e3c771b", "score": "0.78543514", "text": "public function run()\n {\n // $this->call(ProfileSeeder::class);\n // $this->call(UserSeeder::class);\n \\DB::table('profiles')->insert(\n ['name' => 'admisnitrador']);\n\n\n \\DB::table('users')->insert(\n ['username' =>\t'Administrador',\n 'email'\t\t =>\t'[email protected]',\n 'password' =>\tbcrypt('1234'),\n 'act' \t\t =>\t'1',\n 'perfil_id' => '1']);\n\n \\DB::table('locations')->insert(\n ['name' =>\t'Avellaneda']);\n\n \\DB::table('streets')->insert(\n ['name' =>\t'Calle Falsa',\n 'num_from' =>\t'0',\n 'num_to' =>\t'2000',\n 'state' =>\t'Buenos Aires',\n 'locations_id' =>\t'1']);\n\n \\DB::table('ranks')->insert(\n ['name' =>\t'Bombero']);\n\n }", "title": "" }, { "docid": "039707eb1db799d2a572e0887a732e6f", "score": "0.7853228", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Country::truncate();\n State::truncate();\n City::truncate();\n $countries = [\n \t['name'=>'India'],\n \t['name'=>'US']\n ];\n $states =[\n \t['country_id'=>1,'name'=>'Gujrat'],\n \t['country_id'=>1,'name'=>'Maharashtra'],\n \t['country_id'=>2,'name'=>'New York'],\n ];\n $cities=[\n \t['state_id'=>1,'name'=>'Rajkot'],\n \t['state_id'=>1,'name'=>'Ahmedabad'],\n \t['state_id'=>2,'name'=>'Mumbai'],\n \t['state_id'=>3,'name'=>'New York'],\n ];\n\n Country::insert($countries);\n State::insert($states);\n City::insert($cities);\n\n }", "title": "" }, { "docid": "a4fd61f33599e71641de766104f5ee0f", "score": "0.7852123", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n \n $data = [];\n\n $users = App\\User::pluck('id')->toArray();\n \n for($i = 1; $i <= 100 ; $i++) {\n $title = $faker->sentence(rand(6,10));\n array_push($data, [\n 'title' => $title,\n 'sub_title' => $faker->sentence(rand(10, 15)),\n 'slug' => Str::slug($title),\n 'body' => $faker->realText(4000),\n 'published_at' => $faker->dateTime(),\n 'user_id' => $faker->randomElement($users),\n ]);\n }\n \n DB::table('articles')->insert($data);\n }", "title": "" }, { "docid": "9c1ad9c9a665a5e45b19a020f38bf940", "score": "0.7845105", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n DB::table('posts')->insert(['title' => 'First post','Slug' => 'First_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Second post','Slug' => 'Second_post','user_id' => 1,'text' =>$faker->text]);\n DB::table('posts')->insert(['title' => 'Thirth post','Slug' => 'Thirth_post','user_id' => 1,'text' =>$faker->text]);\n }", "title": "" }, { "docid": "8033d2ffe9933ed1497d756039c9da85", "score": "0.7842638", "text": "public function run()\n {\n $this->call(ArticlesTableSeeder::class);\n $this->call(RecommendsTableSeeder::class);\n $this->call(HotsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CommentsSeeder::class);\n DB::table('categories')->insert([\n 'name' => \"读书\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"编程\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"article\",\n ]);\n DB::table('categories')->insert([\n 'name' => \"javascript\",\n 'userid' => 1,\n 'queryid'=>md5(uniqid()),\n 'type' =>\"wiki\",\n ]);\n }", "title": "" }, { "docid": "ed2ed28b5f19c08009fb043458a6ea1d", "score": "0.78390396", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ja_JP');\n DB::table('MST_SALES')->delete();\n foreach (range(1, 100) as $value) {\n DB::table('MST_SALES')->insert([\n 'id' => $value,\n 'sum_price' => rand(2000,40000),\n 'name' => $faker->name(),\n 'sex' => rand(1, 2),\n 'post_num' => $faker->postcode(),\n 'address' => $faker->address(),\n 'email' => $faker->email(),\n 'created_at' => $faker->dateTime(),\n 'user_id' => NULL\n ]);\n }\n }", "title": "" }, { "docid": "7fce381c2d283331a49697d2b2a44912", "score": "0.7830409", "text": "public function run()\n {\n $this->call(RoleSeeder::class);\n $this->call(UserSeeder::class);\n Photo::create(['route_photo' => 'usuarioAnonimo.jpg']);\n Miniature::create(['route_miniature' => 'maxresdefault.jpg']);\n Video::create(['route_video' => 'https://www.youtube.com/embed/ZCsS1GGPrWU']);\n Post::factory(100)->create();\n Commentary::factory(200)->create();\n }", "title": "" }, { "docid": "6b5f92492d382fd188a9ad7effd7e348", "score": "0.783006", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Role::create([\n 'id' => 1,\n 'name' => 'Administrator',\n 'description' => 'Full access to create, edit, and update',\n ]);\n Role::create([\n 'id' => 2,\n 'name' => 'Customer',\n 'description' => 'A standard user that can have a licence assigned to them. No administrative features.',\n ]);\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n 'role_id' => 1,\n ]);\n User::create([\n 'name' => 'User',\n 'email' => '[email protected]',\n 'password' => bcrypt('user'),\n 'role_id' => 2,\n ]);\n }", "title": "" }, { "docid": "f40e64bcdfa16f568b70a3375936cf0c", "score": "0.78271097", "text": "public function run()\n {\n $this->seeds([\n KategoriKualifikasi::class => ['kepegawaian/kategori.csv', 13],\n Jabatan::class => ['kepegawaian/jabatans.csv', 9],\n Kualifikasi::class => ['kepegawaian/kualifikasis.csv', 167],\n Pegawai::class => ['kepegawaian/pegawais.csv', 301],\n ]);\n }", "title": "" }, { "docid": "a23bab42fc12cca6d1a9a36e50f365f4", "score": "0.78265446", "text": "public function run()\n {\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n DB::table('ratings')->truncate();\n \n // Rating::create([\n // 'id' => 1,\n // 'givenBy' => 2,\n // 'givenTo' => 3,\n // 'ratingValue' => 5\n // ]);\n\n Rating::create([\n 'id' => 2,\n 'givenBy' => 2,\n 'givenTo' => 4,\n 'ratingValue' => 3\n ]);\n\n Rating::create([\n 'id' => 3,\n 'givenBy' => 2,\n 'givenTo' => 5,\n 'ratingValue' => 4\n ]);\n\n Rating::create([\n 'id' => 4,\n 'givenBy' => 6,\n 'givenTo' => 5,\n 'ratingValue' => 3\n ]);\n \n Rating::create([\n 'id' => 1,\n 'givenBy' => 6,\n 'givenTo' => 3,\n 'ratingValue' => 5\n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "739c29c39e152a09634953cafca33ad9", "score": "0.78206795", "text": "public function run()\n\t{\n\t\t// DB::table('models')->delete();\n\n\t\t$models = array(\n\t\t\tarray('name' =>'Pamela' ,'age' => '20', 'description' =>'El video fue dirigido por Stephen Schuster. Comienza con un avión aterrizando y chicas en bikini, bronceándose y nadando en la playa.' ),\n\t\t\tarray('name' =>'Tania' ,'age' => '24', 'description' =>'l sencillo debutó el 6 de agosto de 2009, en el número ocho en la lista Swedish Singles Chart.' ),\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('models')->insert($models);\n\t}", "title": "" }, { "docid": "e987cd48edea67e81cb2403a2e69c023", "score": "0.7820271", "text": "public function run()\n {\n $this->call(UserTableSeeder::class);\n $this->call(EmployeeTableSeeder::class);\n // $this->call(PartnerTableSeeder::class);\n $this->call(OtherTableSeeder::class);\n $this->call(TrafficSignSeeder::class);\n App::truncate();\n App::create([\n 'name' => 'FASKES PROV',\n 'logo' => 'logo.png'\n ]);\n }", "title": "" }, { "docid": "717334b3d328066c91d6d64c0cb10819", "score": "0.7820166", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = factory(App\\User::class,3)->create();\n// $carteiras = factory(App\\Carteira::class,6)->create();\n $ativos = factory(App\\Ativo::class,1)->create();\n// $trades = factory(App\\Trade::class,5)->create();\n// $tradeEntradas = factory(App\\TradeEntrada::class,20)->create();\n// $tradeSaidas = factory(App\\TradeSaida::class,20)->create();\n }", "title": "" }, { "docid": "496536ac82829ff2c3488b1bc428a7f1", "score": "0.7814424", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // factory('App\\StudentUser', 100)->create();\n // factory('App\\Music', 1000)->create();\n // factory('App\\RobotOrder', 100)->create();\n // factory('App\\UserAction', 1000)->create();\n // factory('App\\Practice', 20)->create();\n }", "title": "" }, { "docid": "42081848f882af09bfd4cf0f8efe8eb5", "score": "0.7813038", "text": "public function run()\n {\n // $faker = Faker::create();\n\n // $dataClass = DB::table('users')->pluck('id')->toArray();\n // $dataClass = DB::table('movies')->pluck('id')->toArray();\n\n // foreach(range(1, 100) as $index) {\n // DB::table('movie_user')->insert([\n // 'user_id' => $faker->randomElement($dataClass),\n // 'movie_id' => $faker->randomElement($dataClass)\n // ]);\n // }\n }", "title": "" }, { "docid": "630b1e277c10f7d8cf32cba237b4da38", "score": "0.78121483", "text": "public function run()\n {\n \\DB::table('users')->delete();\n \\DB::table('answers')->delete();\n \\DB::table('questions')->delete();\n\n $user = new \\App\\User();\n $user->name = 'John Doe';\n $user->email = '[email protected]';\n $user->password = Hash::make('password');\n $user->save();\n\n // $this->call(UserSeeder::class);\n factory(App\\User::class, 3)->create()\n ->each(function($u) {\n $u->questions()\n ->saveMany(\n factory(App\\Question::class, rand(1, 5))->make()\n )\n ->each(function($q) {\n $q->answers()\n ->saveMany(\n factory(App\\Answer::class, rand(1, 5))->make()\n );\n });\n });\n }", "title": "" }, { "docid": "e5e2525215ec8bf3881f1c6e341aec83", "score": "0.7806573", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n User::truncate();\n Category::truncate();\n Brand::truncate();\n Product::truncate();\n Address::truncate();\n PaymentMethod::truncate();\n Order::truncate();\n\n $users = 1000;\n $categories = 20;\n $brands = 15;\n $products = 1000;\n $address = 3000;\n $paymentMethod = 100;\n $order = 100;\n $orderDetail = 500;\n\n factory(User::class, $users)->create();\n factory(Category::class, $categories)->create();\n factory(Brand::class, $brands)->create();\n factory(Address::class, $address)->create();\n factory(Product::class, $products)->create();\n factory(PaymentMethod::class,$paymentMethod)->create();\n factory(Order::class,$order)->create();\n factory(OrderDetails::class,$orderDetail)->create();\n }", "title": "" }, { "docid": "33db14990dd20205cbf0ed23ac91d8a5", "score": "0.7797709", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(\\App\\Models\\Blog\\Category::class,10)->create();\n factory(\\App\\Models\\Blog\\Post::class,100)->create();\n $this->call(PostsCategoriesTableSeeder::class);\n }", "title": "" }, { "docid": "7d4a8acce261539d99f3a600a7fded39", "score": "0.7794814", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // Stocks\n $stocks = factory(Stock::class, 5)->create();\n\n $categories = factory(Category::class, 10)->create();\n\n $products = factory(Product::class, 500)->create();\n\n $products->each(function (Product $product) use ($categories, $stocks) {\n $randomCategories = $categories->random(3);\n $randomStocks = $stocks->random(rand(1, 3));\n\n $product->categories()->attach($randomCategories->pluck('id'));\n\n // associate with stocks\n foreach ($randomStocks as $stock) {\n $product->stocks()->attach($stock->id, [\n 'products_count' => rand(10, 100)\n ]);\n }\n });\n\n // Empty categories\n factory(Category::class, 5)->create();\n }", "title": "" }, { "docid": "8a2ce50a7068a74d62b9970c1f9302e3", "score": "0.7790919", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1, 20) as $value) {\n \\App\\Models\\posts::create([\n 'title' => $faker->text('20'),\n 'content' => $faker->text('500'),\n 'user_id'=> \\App\\Models\\Users::inRandomOrder()->first()->id,\n 'cate_id'=> \\App\\Models\\Catogery::inRandomOrder()->first()->id\n ]);\n\n }\n }", "title": "" }, { "docid": "4c9d16245dfaaf355245ed6f6be2592c", "score": "0.7789509", "text": "public function run()\n {\n\n $this->call(RolSeeder::class);\n\n \\App\\Models\\User::factory(10)->create();\n\n User::create([\n 'name' => 'gabriel',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678')\n ])->assignRole('Administrador');\n\n Categoria::factory(4)->create();\n Almacen::factory(3)->create();\n Kit::factory(5)->create();\n Proveedor::factory(4)->create();\n Producto::factory(40)->create();\n Empleado::factory(5)->create();\n Proyecto::factory(5)->create();\n $this->call(PrestamoSeeder::class);\n\n\n\n // Proveedor::factory(4)->create();\n // $this->call(ProductoSeeder::class);\n }", "title": "" }, { "docid": "6e3d9c728792a048ad7cb291d3db22d9", "score": "0.77889967", "text": "public function run()\n {\n /**\n * This is a dummy data seeder. All the information is here for demonstration purposes.\n */\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n DB::statement('TRUNCATE TABLE assignments');\n \n $data = [\n ['id' => 1, 'name' => 'Biología', 'created_at' => now()],\n ['id' => 2, 'name' => 'Geografía', 'created_at' => now()],\n ['id' => 3, 'name' => 'Historia', 'created_at' => now()],\n ['id' => 4, 'name' => 'Lengua y Literatura', 'created_at' => now()],\n ['id' => 5, 'name' => 'Matemáticas', 'created_at' => now()],\n ['id' => 6, 'name' => 'Educación Física', 'created_at' => now()],\n ['id' => 7, 'name' => 'Música', 'created_at' => now()],\n ['id' => 8, 'name' => 'Educación Plástica', 'created_at' => now()],\n ['id' => 9, 'name' => 'Computación', 'created_at' => now()],\n ['id' => 10, 'name' => 'Idioma', 'created_at' => now()]\n ];\n\n DB::table('assignments')->insert($data);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n }", "title": "" }, { "docid": "88446e1bf24041ad962665525b97b12d", "score": "0.7787001", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $users = [\n [\n 'name' => 'nur',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'monjur',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'farhana',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'towhid',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'majedul',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'mobarok',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jahed',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'jb',\n 'email' => '[email protected]'\n ],\n ];\n foreach ($users as $user) {\n factory(User::class)->create([\n 'name' => $user['name'],\n 'email' => $user['email']\n ]);\n }\n factory(Note::class, 30)->create();\n }", "title": "" }, { "docid": "4b87096935422c5247afb2aaa8f23776", "score": "0.7781426", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $cats = factory(App\\ProductCategory::class, 3)->create()->each(function ($cat) {\n factory(App\\ProductCategory::class, 5)->create([\n 'parent_id' => $cat->id,\n ]);\n });\n factory(App\\User::class, 50)->create()->each(function ($user) use($cats) {\n factory(App\\Product::class, 2)->create([\n 'user_id' => $user->id,\n 'category_id' => $cats->random()->id,\n ]);\n });\n\n }", "title": "" }, { "docid": "f436dada1953139b05cfe23060658c72", "score": "0.7780704", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker::create();\n foreach (range(0,0) as $index) {\n \t DB::table('users')->insert([\n \t 'name' => 'Vinay Paramanand',\n \t 'email' => '[email protected]',\n 'password' => bcrypt('vinaytest'),\n 'main_image_path'=>'/img/img.jpg',\n 'active'=>1\n ]);\n }\n\n foreach (range(0,0) as $index) {\n\t DB::table('socials')->insert([\n\t 'linkedin_url' => $faker->url,\n 'contact_email' => $faker->url,\n 'rss_feed' => $faker->text,\n\t 'quora_url' => $faker->url,\n 'contact_email' => $faker->url\n ]);\n }\n\n\n\n }", "title": "" }, { "docid": "3d653e15cd03e74996be098cff42dfca", "score": "0.77792233", "text": "public function run()\n {\n \\App\\Models\\Admin::factory(10)->create();\n \\App\\Models\\User::factory(10)->create();\n\n Book::create(\n [\n \"title\" => \"Self Discipline\",\n \"author\" => \"Shawn Norman\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 50,\n ]\n );\n\n Book::create(\n [\n \"title\" => \"Atomic Habits\",\n \"author\" => \"James Clear\",\n \"publisher\" => \"Google\",\n \"year\" => 2018,\n \"stock\" => 20,\n ]);\n\n Book::create(\n [\n \"title\" => \"The Last Thing He Told Me\",\n \"author\" => \"Laura Dave\",\n \"publisher\" => \"Google\",\n \"year\" => 2021,\n \"stock\" => 10,\n ]\n );\n }", "title": "" }, { "docid": "8a56b49c8ccacd412dc12ad6eb4f1c17", "score": "0.7772089", "text": "public function run()\n {\n User::factory(10)->create();\n Category::factory(4)->create();\n SubCategory::factory(4)->create();\n Color::factory(4)->create();\n Size::factory(4)->create();\n Product::factory(4)->create();\n ProductQuantity::factory(4)->create();\n Banner::factory(4)->create();\n Favourite::factory(4)->create();\n Gallery::factory(4)->create();\n City::factory(4)->create();\n Region::factory(4)->create();\n District::factory(4)->create();\n Address::factory(4)->create();\n RateComment::factory(4)->create();\n\n $this->call(PermissionsTableSeeder::class);\n $this->call(UpdatePermissionsTableSeeder::class);\n $this->call(SettingTableSeeder::class);\n $this->call(AddTaxToSettingTableSeeder::class);\n\n }", "title": "" }, { "docid": "defbf35392fe9a4d769e6b94f0fcd99b", "score": "0.7768574", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$faker = Faker\\Factory::create();\n\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\t\tPost::truncate();\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n\t\tforeach(range(1, 30) as $index)\n\t\t{\n\t\t\t// MYSQL\n\t\t\t$userId = User::orderBy(DB::raw('RAND()'))->first()->id;\n\n\t\t\t// SQLITE\n\t\t\t// $userId = User::orderBy(DB::raw('random()'))->first()->id;\n\n\t\t\tPost::create([\n\t\t\t\t'user_id' => $userId,\n\t\t\t\t'title' => $faker->name($gender = null|'male'|'female'),\n\t\t\t\t'body' => $faker->catchPhrase\n\t\t\t]);\n\t\t}\n\n\t\t// $this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "88876dd02f4a05f504ca51338370b797", "score": "0.7765722", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\User::class, 2)->create();\n factory(App\\Type::class, 8)->create();\n factory(App\\Room::class, 6)->create();\n \n\n // foreach($rooms as $room){\n // $room->owners()->attach(\n // $owners->random(random_int(1,3))\n // );\n // }\n \n }", "title": "" }, { "docid": "b11c80e4171d8992cf52a3d8c6ff07f3", "score": "0.77626616", "text": "public function run()\n {\n Eloquent::unguard();\n $faker = Faker::create();\n\n foreach(range(1, 3) as $index) {\n\n $title = $faker->sentence(2);\n\n Category::create(array(\n 'title' => $title,\n 'slug' => $this->generateSlug($title),\n 'description' => $faker->paragraph(2)\n ));\n }\n }", "title": "" }, { "docid": "c3a07070351bd000cfaf6a6bb53c9e90", "score": "0.77616376", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n \n User::truncate();\n Products::truncate();\n \n // $this->call(UserSeeder::class);\n factory(User::class,10)->create();\n factory(Products::class,10)->create();\n \n }", "title": "" }, { "docid": "373927e90cd67705d12a2a2602b9c28a", "score": "0.7761006", "text": "public function run()\n {\n $faker = Factory::create();\n\n Product::truncate();\n Category::truncate();\n\n foreach (range(1, 10) as $key => $value) {\n Category::create([\n 'name' => $faker->word\n ]);\n }\n\n foreach (range(1,10) as $key => $value) {\n Product::create([\n 'name' => $faker->word,\n 'stock' => $faker->randomDigit(3),\n 'description' => $faker->paragraph(1),\n 'category_id' => $faker->randomDigit(2),\n 'user_id' =>$faker->randomDigit(2)\n ]);\n }\n }", "title": "" }, { "docid": "7fd6f0c247e33899edabe04b649cd22c", "score": "0.7756213", "text": "public function run()\n {\n // $this->call(UserTableSeeder::class);\n Model::unguard();\n $this->call(RoleTableSeeder::class);\n $this->call(TagTableSeeder::class);\n // DB::table('users')->delete();\n\n $users = [\n ['name' => 'root', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n ['name' => 'test', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n ['name' => 'vova', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n ['name' => 'bob', 'email' => '[email protected]',\n 'password' => Hash::make('qwerty')],\n\n ];\n // Loop through each user above and create the record for them in the database\n foreach ($users as $user) {\n $newUser = User::create($user);\n if ($user['name'] == 'root') {\n $newUser->roles()->attach(1);\n } else {\n $newUser->roles()->attach(2);\n }\n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "05f5b66919509425a7194863454ee9d7", "score": "0.77492213", "text": "public function run()\n {\n\n $this->seedStudies();\n $this->seedCourses();\n\n }", "title": "" }, { "docid": "6ac18121221894258f25afa3e3a09f99", "score": "0.77469724", "text": "public function run()\n {\n Costumer::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 Costumer::create([\n 'name' => $faker->name,\n 'phone' => $faker->sentence,\n 'Type' => $faker->sentence,\n 'city' => $faker->sentence,\n 'adress' => $faker->sentence,\n 'contact' => $faker->sentence,\n 'contact_phone' => $faker->sentence,\n 'created_by' => 1,\n ]);\n }\n }", "title": "" }, { "docid": "14aa0fd99ba18e6fb7278892a18441fc", "score": "0.7746705", "text": "public function run()\n {\n //delete all records from role table\n Role::truncate();\n\n $faker = Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n Role::create([\n 'name' => $faker->name\n ]);\n }\n }", "title": "" }, { "docid": "f5bfd65a0ab76fe80a146147ec5ed014", "score": "0.77440494", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(UserTableSeeder::class);\n\n Model::reguard();\n\n # =========================================================================\n # CATEGORIES SEEDS\n # =========================================================================\n\n DB::table('categories')->delete();\n\n $categories = [\n [ 'name' => 'Wildlife',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ],\n [ 'name' => 'Pollution',\n 'created_at' =>\\Carbon\\Carbon::now('Africa/Johannesburg')->toDateTimeString()\n ]\n ];\n\n foreach ($categories as $category) {\n Category::create($category);\n }\n }", "title": "" }, { "docid": "ecb482ed5a02df8c19bf99957a103522", "score": "0.77431524", "text": "public function run()\n {\n Model::unguard();\n $faker = Faker::create();\n\n // DB::table('users')->delete();\n\n // $users = array(\n // ['name' => 'Tyler Torola', 'email' => '[email protected]', 'password' => Hash::make('password')],\n // ['name' => 'Bobby Anderson', 'email' => '[email protected]', 'password' => Hash::make(\"***REMOVED***\")],\n // ['name' => 'Ike Goss', 'email' => '[email protected]', 'password' => Hash::make('***REMOVED***')],\n // );\n \n // // Loop through each user above and create the record for them in the database\n // foreach ($users as $user)\n // {\n // User::create($user);\n // }\n\n // foreach (range(1,10) as $index) {\n // $invoice = [\n // 'first_name' => $faker->firstName,\n // 'last_name' => $faker->lastName,\n\n // ]\n // }\n\n foreach (range(1,10) as $index) {\n \n }\n\n Model::reguard();\n }", "title": "" }, { "docid": "115c012dd8846c3cb80cbb9f7a8327c6", "score": "0.7742761", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $categories = factory(Category::class)->times(10)->create();\n\n $users = factory(User::class)->times(20)->create();\n\n $products = factory(Product::class)->times(40)->create();\n\n $transactions = factory(Transaction::class)->times(10)->create();\n\n\n }", "title": "" }, { "docid": "0136ec9783e5809a5fe2c594d8780c7e", "score": "0.7741538", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Eloquent::unguard();\n\n $faker = Faker\\Factory::create();\n factory(App\\Answer::class, 100)->create();\n factory(App\\Kerja::class, 100)->create();\n factory(App\\Lulus::class, 100)->create();\n factory(App\\Nikah::class, 100)->create();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "42daa4f7485840fe27f640e7e7069e40", "score": "0.77378654", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([UsuarioSeed::class]);\n $this->call([CategoriasSeed::class]);\n $this->call([ExperienciaSeeder::class]);\n }", "title": "" }, { "docid": "d253031e250b9050d7af431c4c10f0bf", "score": "0.7737546", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $this->disableForeignKeyCheck();\n User::truncate();\n Tag::truncate();\n Post::truncate();\n\n factory(User::class, 50)->create();\n factory(Tag::class, 20)->create();\n factory(Post::class, 100)->create()->each(function ($post) {\n $tags = Tag::all()->random(mt_rand(1, 5))->pluck('id');\n $post->tags()->attach($tags);\n });\n }", "title": "" }, { "docid": "f70d3c8ab2d963dc7360a2749f67f6b7", "score": "0.7736429", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n Course::factory(3)->create();\n assignament::factory(9)->create();\n exercise::factory(6)->create();\n }", "title": "" }, { "docid": "31bba37eb86cd9ac68eaf41572a295dc", "score": "0.7735254", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n DB::table('roles')->insert([\n [ \n 'name' => 'voter'\n ],\n [ \n 'name' => 'admin'\n ],\n ]);\n\n DB::table('organizers')->insert([\n [\n 'name' => 'BEM UI'\n ],\n [\n 'name' => 'BEM FT UI'\n ]\n ]);\n\n DB::table('elections')->insert([\n [\n 'name' => 'Pemira UI',\n 'unique_code' => 'UI012021',\n 'election_date' => '2021-04-26',\n 'end_date' => '2021-05-28'\n ],\n [\n 'name' => 'Pemira FT UI',\n 'unique_code' => 'FT3012021',\n 'election_date' => '2021-05-03',\n 'end_date' => '2021-05-28'\n ]\n ]);\n\n $this->call([\n CandidateSeeder::class,\n UserSeeder::class,\n VoteSeeder::class\n ]);\n\n }", "title": "" }, { "docid": "de1da3761353d82d818811e2158ffcc6", "score": "0.77292454", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n $types = ['t-shirt', 'mug', 'boots', 'phone-case'];\n $colors = ['whitesilver','grey','black','navy','blue','cerulean','sky blue','turquoise','blue-green','azure','teal','cyan','green','lime','chartreuse','live','yellow','gold','amber','orange','brown','orange-red','red','maroon','rose','red-violet','pink','magenta','purple','blue-violet','indigo','violet','peach','apricot','ochre','plum'];\n $sizes = ['xs','s','m','l','xl'];\n\n // And now, let's create a few prods in our database:\n for ($i = 0; $i < 50; $i++) {\n\n $prod = Product::create([\n 'title' => $faker->sentence,\n 'body' => $faker->paragraph,\n 'price' => rand(0, 1000)/10,\n 'productType' => $types[array_rand($types)],\n 'color' => $colors[array_rand($colors)],\n 'size' => $sizes[array_rand($sizes)],\n ]);\n }\n Schema::enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "0ae073ea04e3e51b9a5a234a6645d3a1", "score": "0.77288526", "text": "public function run()\n {\n $this->truncateTables([\n //'products',\n //'services',\n //'categories',\n //'subcategories',\n 'products_users',\n //'users',\n 'avatars',\n ]);\n\n // Ejecutar los seeders:\n //$products = factory(Product::class)->times(4)->create();\n //$categories = factory(Category::class)->times(2)->create();\n //$subcategories = factory(SubCategory::class)->times(5)->create();\n //factory(Service::class)->times(4)->create();\n //factory(User::class)->times(10)->create();\n $avatars = factory(Avatar::class)->times(15)->create();\n\n /*foreach ($products as $oneProduct) {\n $oneProduct->category()->associate($categories->random(1)->first()->id);\n $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n $oneProduct->save();\n };*/\n\n // foreach ($products as $oneProduct) {\n // $oneProduct->category()->associate($categories->random(1)->first()->id);\n // $oneProduct->subcategory()->associate($subcategories->random(1)->first()->id);\n // $oneProduct->save();\n // };c9b1c36c8caeabda8347106e58f70033dd0265ca\n }", "title": "" }, { "docid": "a8c4b0faab2536f6924d6a6f05f50027", "score": "0.77278227", "text": "public function run()\n {\n $faker = Factory::create('fr_FR');\n $categories = ['Animaux', 'Nature', 'People', 'Sport', 'Technologie', 'Ville'];\n foreach ($categories as $category) {\n DB::table('categories')->insert([\n 'name' => $category,\n 'created_at' => $faker->date('Y-m-d H:i'),\n 'updated_at' => $faker->date('Y-m-d H:i'),\n ]);\n }\n $this->call(UserSeeder::class);\n }", "title": "" }, { "docid": "e424e7ea028abae43ad7eb31b541b451", "score": "0.771601", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // $this->call(ProductsTableSeeder::class);\n // $this->call(ProductImageSeeder::class);\n // $this->call(VariationSeeder::class);\n \\App\\Models\\Product::factory()->count(5)->create();\n \\App\\Models\\ProductImage::factory()->count(10)->create();\n //\\App\\Models\\Variation::factory()->create();\n }", "title": "" }, { "docid": "3d5934c5d799d5a3b3747a0bbd0e3d71", "score": "0.77135783", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::table('tasks')->delete();\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 Task::create([\n 'idCustomer' => $faker->numberBetween($min = 1, $max = 10),\n 'title' => $faker->sentence,\n 'description' => $faker->sentence,\n 'price' => $faker->numberBetween($min = 10, $max = 1000),\n 'deadline' => $faker->dateTimeBetween($startDate = 'now', $endDate = '+2 years', $timezone = 'Asia/Bishkek'),\n ]);\n }\n }", "title": "" }, { "docid": "f204d23341cb7fd2b48bb27ffde1b8f2", "score": "0.77124816", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n factory(App\\User::class, 4)->create();\n factory(App\\Group::class, 2)->create()->each(function($u) { $u->users()->save(App\\User::find(1)); });\n factory(App\\Item::class, 10)->create();\n }", "title": "" }, { "docid": "70fbcb2aeac3103c8556e273a1ea07ef", "score": "0.7712306", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'nome' => \"Felipe Gustavo Braiani Santos\",\n 'siape' => 2310754,\n 'password' => bcrypt('2310754'),\n 'perfil' => '3'\n ]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Mecânica\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Informática\"]);\n DB::table('cursos')->insert(['nome' => \"Técnico em Eletrotécnica\"]);\n }", "title": "" }, { "docid": "72deab4b4ba460677188b9e5ddc3d631", "score": "0.77109", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Article::truncate();\n Store::truncate();\n Schema::enableForeignKeyConstraints();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 10; $i++) {\n Store::create([\n 'name' => $faker->name,\n 'address' => $faker->address,\n ]);\n }\n }", "title": "" }, { "docid": "9877b188f4441322b489cf690def43a1", "score": "0.7704052", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\Category::class,10)->create();\n factory(\\App\\User::class,10)->create();\n\n $fake = \\Faker\\Factory::create();\n\n $users = \\App\\User::all();\n\n foreach ($users as $user){\n for ($i=0 ; $i<10 ; $i++){\n \\App\\Post::create([\n 'user_id' => $user->id,\n 'title' => $fake->name,\n 'description' => $fake->paragraph(5),\n ]);\n }\n }\n }", "title": "" }, { "docid": "b2a9f176c7df114ff184aa138ee5c05e", "score": "0.77025133", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Players::class, 10000)->create();\n \n factory(App\\GamePlay::class, 3835)->create(); \n\n $this->call(GamesTableSeeder::class);\n \n }", "title": "" }, { "docid": "3b2cd726bae9a08c2dfd89fc525f4d5f", "score": "0.77025044", "text": "public function run()\n {\n\n $this->call(UsersTableSeeder::class);\n $this->call(CuentaTableSeeder::class);\n $this->call(MovimientoTableSeeder::class);\n // factory ('App\\Vehiculo',6)->create();\n // factory ('App\\Estacionamiento',6)->create();\n $this->call(VehiculoTableSeeder::class);\n $this->call(OrigenTableSeeder::class);\n $this->call(TarifasTableSeeder::class);\n $this->call(ZonasTableSeeder::class);\n $this->call(EstaciomamientoTableSeeder::class);\n factory ('App\\Inspector',10)->create();\n }", "title": "" }, { "docid": "acf364571e79e5cefded12cff1dc405e", "score": "0.7700658", "text": "public function run()\n\t{\n\t\t$faker = Faker::create();\n\t\tforeach (range(1, 50) as $key) {\n\t\t\tDB::table('books')->insert([\n\t\t\t'title' => $faker->sentence(),\n\t\t\t'description' => $faker->paragraph(),\n\t\t\t'author' => $faker->name(),\n\t\t\t'created_at' => Carbon::now(),\n\t\t\t'updated_at' => Carbon::now(),\n\t\t\t]);\n\t\t}\n}", "title": "" }, { "docid": "443e869bc448f240356820ce99b73eba", "score": "0.76993686", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(SettingSeeder::class);\n\n factory(Category::class, 7)->create();\n\n factory(Product::class,150)->create();\n\n $categories = App\\Category::all();\n\n Product::all()->each(function ($product) use ($categories)\n {\n $product->categories()->attach(\n // $categories->random(rand(3,6))->pluck('id')->toArray()\n $categories->random(rand(1,6))->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "8fe4489137a56b956b08ecc256a24aa7", "score": "0.7697992", "text": "public function run()\n {\n //\n Product::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 < 5; $i++) {\n\n\n $cost=$faker->randomFloat(2,0,1000);\n\n Product::create([\n 'category_id' => random_int(1,5),\n 'cost' => $cost,\n 'stock' => random_int(1,20),\n 'priceTotal' => $cost+10,\n 'tax' => random_int(1,10),\n 'description' => 'Descripcion'. $i,\n 'reference' => 'Referencia'. $i,\n 'user_id'=> random_int(1,User::count())\n ]);\n }\n }", "title": "" }, { "docid": "a3ead8af61223146f6e3fdec15b00904", "score": "0.7697128", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([QuizSeeder::class]);\n $this->call([AnswererSeeder::class]);\n $this->call([SectionSeeder::class]);\n $this->call([QuestionSeeder::class]);\n $this->call([AnswerSeeder::class]);\n $this->call([OptionSeeder::class]);\n $this->call([OptionColSeeder::class]);\n }", "title": "" }, { "docid": "02a3de1d1d158c365800c7a0830fe308", "score": "0.7693202", "text": "public function run()\n {\n //\n // DB::table('articles')->delete();\n\n\t // for ($i=0; $i < 10; $i++) {\n\t // \\App\\Article::create([\n\t // 'title' => 'Title '.$i,\n\t // 'body' => 'Body '.$i,\n\t // 'user_id' => 1,\n\t // 'like' => 0,\n\t // 'draft' => true\n\t // ]);\n\t // }\n\n\n\t // DB::table('articles')->insert([\n // 'title' => 'Title '.str_random(10),\n // 'body' => 'Body '.str_random(10),\n // 'user_id' => 1,\n // 'like' => 0,\n // 'draft' => true\n // ]);\n\n \t// factory(App\\Article::class, 50)->create()->each(function ($u) {\n\t // $u->posts()->save(factory(App\\Article::class)->make());\n\t // });\n\t factory(App\\Article::class, 50)->create();\n\n }", "title": "" }, { "docid": "1c370e9bc1f2d1d56de7442838321847", "score": "0.7689267", "text": "public function run()\n {\n $this->call(CompanySeeder::class);\n $this->call(JobsSeeder::class);\n $this->call(UserSeeder::class);\n\n $categories=[\n 'Government','NGO','Banking','software','Networking','2nd optionb'\n ];\n foreach ($categories as $category){\n \\App\\Models\\Category::create(['name'=>$category]);\n }\n }", "title": "" }, { "docid": "d821e4330d8dabc502854ce12d329af5", "score": "0.7686517", "text": "public function run()\n {\n $this->call(ColorsTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(SexesTableSeeder::class);\n $this->call(SizesTableSeeder::class);\n\n $this->call(User_StatusesTableSeeder::class);\n\n $this->call(SubcategoriesTableSeeder::class);\n $this->call(ProvincesTableSeeder::class);\n\n $this->call(ProductsTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n\n // factory(\\App\\Product::class, 62)->create();\n factory(\\App\\User::class, 25)->create();\n factory(\\App\\Cart::class, 99)->create();\n }", "title": "" }, { "docid": "29695a5ff1fa3c45993913799e105323", "score": "0.76861745", "text": "public function run()\n\t{\n\t\tDB::table(self::TABLE_NAME)->delete();\n\n\t\t$dateset = new Seed(self::TABLE_NAME);\n\n\t\tforeach ($dateset as $rows) {\n\t\t\t$records = [];\n\t\t\tforeach ($rows as $row)\n\t\t\t\t$records[] = [\n\t\t\t\t\t'id'\t\t\t=> $row->id,\n\t\t\t\t\t'created_at'\t=> $row->created_at ?? Carbon::now(),\n\t\t\t\t\t'updated_at'\t=> $row->updated_at ?? Carbon::now(),\n\n\t\t\t\t\t'sport_id'\t\t=> $row->sport_id,\n\t\t\t\t\t'country_id'\t=> $row->country_id,\n\t\t\t\t\t'gender_id'\t\t=> $row->gender_id,\n\n\t\t\t\t\t'name'\t\t\t=> $row->name,\n\t\t\t\t\t'external_id'\t=> $row->external_id ?? null,\n\t\t\t\t\t'logo'\t\t\t=> $row->logo ?? null,\n\t\t\t\t];\n\n\t\t\tinsert(self::TABLE_NAME, $records);\n\t\t}\n\t}", "title": "" }, { "docid": "3114668392a1c46e1e1ae8969bf609b6", "score": "0.76837957", "text": "public function run()\n {\n $faker = Faker::create();\n\n // seeder for authorised member\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Django\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('1234')\n ]);\n User::create([\n 'role' => \"auth_member\",\n 'name' => \"Mr.Prism\",\n 'email' => \"[email protected]\",\n 'password' => Hash::make('1234')\n ]);\n\n // seeder for 3 second markers\n foreach(range(1, 3) as $index) {\n User::create([\n 'role' => 'second_marker',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 4 supervisors\n foreach(range(1, 4) as $index) {\n User::create([\n 'role' => 'supervisor',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n\n // seeder for 30 students\n foreach(range(1, 30) as $index) {\n User::create([\n 'role' => 'student',\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => Hash::make('1234')\n ]);\n }\n }", "title": "" }, { "docid": "8b162d964f15bb87bea6b64c3def25df", "score": "0.7679688", "text": "public function run()\n {\n //TODO Seeder create X Users\n factory(\\App\\User::class, 10)->create();\n //TODO Seeder create X Authors\n factory(\\App\\Author::class, 10)->create();\n //TODO Seeder create X Libraries and looping Libraries\n factory(\\App\\Library::class, 10)->create()->each(function($library){\n //TODO Seeder create X Books and looping Books\n factory(\\App\\Book::class, 10)->make()->each(function($book) use($library){\n //TODO Seeder asign Books to Libraries (relationship)\n $library->books()->save($book);\n });\n });\n }", "title": "" }, { "docid": "bdd67eaf9bb5c705971ec25aad3d2bf9", "score": "0.76768607", "text": "public function run()\n {\n $faker = Faker\\Factory::create('es_ES');\n\n DB::table('empresas')->delete();\n for ($cantidadEmpresas = 0; $cantidadEmpresas != 6; $cantidadEmpresas++) {\n DB::table('empresas')->insert(array(\n 'nombre' => $faker->company,\n 'direccion' => $faker->address,\n 'email' => $faker->companyEmail,\n 'url' => $faker->url,\n 'telefono' => $faker->numberBetween(600000000,699999999),\n 'created_at' => date('Y-m-d H:m:s'),\n 'updated_at' => date('Y-m-d H:m:s'),\n ));\n }\n }", "title": "" }, { "docid": "01775d6adda6df1ce8c05497acdfcd54", "score": "0.76755834", "text": "public function run()\n {\n\n News::truncate();\n $faker = Faker\\Factory::create();\n\n $categories = ['business', 'popular', 'hotnews', 'lifestyle', 'world', 'world', 'sports'];\n for ($i = 0; $i < count($categories); $i++) {\n for ($j = 0; $j < 5; $j++) {\n News::create([\n 'title' => $categories[$i] . ' title ' . $j,\n 'content' => $faker->paragraph(),\n 'category' => $categories[$i],\n 'image' => $faker->image('public/uploads/news/', 640, 480, null, false),\n ]);\n }\n }\n }", "title": "" }, { "docid": "b186d6546035ec76f8db21fdbd2a0e44", "score": "0.7674704", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('products')->insert([\n 'id' => $index,\n 'name' => $faker->name,\n 'image' => $faker->imageUrl(600,400),\n 'price' => $faker->numberBetween(0,1000)\n ]);\n }\n $this->call(ProductSeeder::class);\n }", "title": "" }, { "docid": "ae0478774917d2a61935b3bb56a50045", "score": "0.76742005", "text": "public function run()\n {\n State::create(['id' => 1, 'name' => 'not state']);\n State::create(['id' => 2, 'name' => 'to do']);\n State::create(['id' => 3, 'name' => 'doing']);\n State::create(['id' => 4,'name' => 'done']);\n\n Role::create(['name' => 'Scrum Master']);\n Role::create(['name' => 'Product Owner']);\n Role::create(['name' => 'Developer']);\n\n Tag::factory(5)->create();\n Category::factory(5)->create();\n\n User::create([\n // 'id' => 1,\n 'name' => 'Joel',\n 'email' => '[email protected]',\n 'email_verified_at' => now(),\n 'password' => bcrypt('1234567')\n ]);\n\n User::factory(10)->create()->each(function ($user) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $user->tasks()->save(Task::factory()->make());\n }\n });\n\n Team::factory(5)->create()->each(function ($team) {\n $number_tasks = rand(1, 11);\n\n for ($i=0; $i < $number_tasks; $i++) {\n $team->tasks()->save(Task::factory()->make());\n }\n\n $team->users()->attach($this->array(rand(2, 11)));\n });\n }", "title": "" }, { "docid": "8ba9e1eb60aa2ce75e4f67b85523a3b3", "score": "0.76738054", "text": "public function run()\n {\n //\n\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 // $name = $faker->unique()->word;\n // $quantity = $faker->numberBetween(1, 50);\n // $price = $faker->randomFloat(2,10,200);\n // $value = $price * $quantity;\n User::create([\n 'name' => $faker->unique()->word,\n 'email' => $faker->unique()->word.'@gmail.com',\n 'password' => bcrypt('123456'),\n 'email_verified_at' => Carbon::now(),\n 'remember_token' => Carbon::now(),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n ]);\n }\n }", "title": "" }, { "docid": "0a6360cbcc87c10411cfdb8218573c6a", "score": "0.7670969", "text": "public function run()\n {\n $faker = Faker::create('id_ID');\n foreach (range(1, 100) as $index) {\n DB::table('products')->insert([\n 'code' => $faker->unique()->randomNumber,\n 'name' => $faker->sentence(4),\n 'stock' => $faker->randomNumber,\n 'varian' => $faker->sentence(1),\n 'description' => $faker->text,\n 'image' => $faker->imageUrl(\n $width = 640,\n $height = 480\n ),\n 'category_id' => rand(1, 5)\n ]);\n }\n }", "title": "" }, { "docid": "e7c35bf1a78291d3c85c164ebd658980", "score": "0.7670915", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //seeding the furnitures\n $this->call(FurnituresTableSeeder::class);\n\n // seeding the tags\n $this->call(TagsTableSeeder::class);\n\n // seeding the users, houses, and rooms table by creating room for each\n // house for each user\n factory(App\\User::class, 3)->create()->each(function ($user) {\n $user->houses()->saveMany(factory(App\\House::class, 2)->create()->each(function ($house) {\n $house->rooms()->saveMany(factory(App\\Room::class, 3)->create());\n }));\n });\n }", "title": "" }, { "docid": "c4192461f63978082f8fcbfb0f3a4b92", "score": "0.7668657", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n // User::create([\n\t\t// 'username' => 'admin',\n\t\t// 'password' => Hash::make('admin'),\n\t\t// 'real_password' => 'admin'\n\t\t// ]);\n\n //check and count inventory records\n $inventory = inventory::all();\n if(count($inventory)){\n $item_id = 'inv_'.$this->randomString().'_'.(count($inventory)+1);\n }else{\n $item_id = 'inv_'.$this->randomString().'_'.'1';\n }\n \n inventory::create([\n 'item_id' => $item_id,\n 'username' => 'admin',\n 'item_name' => 'Medicine 3',\n 'item_description' => 'If you take this you will eventually die',\n 'item_quantity' => 20\n ]);\n }", "title": "" }, { "docid": "7b59b344bf9bf9580742222e5ba42ec2", "score": "0.7665538", "text": "public function run()\n {\n \t // DB::table('users')->insert([\n \n // 'username' => \"quy\",\n // 'email' => \"[email protected]\",\n // 'sex' => 0,\n // 'phone_number' => 0,\n // 'password' => Hash::make('123456'),\n // ]);\n $faker = Faker\\Factory::create();\n for($i = 0; $i < 20; $i++) {\n App\\news::create([\n 'tittle' => $faker->text(40),\n 'intro' => $faker->text($minNbChars = 60),\n 'content' => $faker->text($minNbChars = 400),\n 'image' => $faker->imageUrl($width = 640, $height = 480),\n 'user_id' => 6\n ]);\n }\n\n }", "title": "" }, { "docid": "8c8e23570f05312b54416c1cbcb81e7b", "score": "0.766276", "text": "public function run()\n {\n // $this->call('UsersTableSeeder');\n // $this->call([\n // UserSeeder::class,\n // PostSeeder::class,\n // CommentSeeder::class,\n // ]);\n\n // User Table Seeding\n User::factory()\n ->count(5)\n ->create();\n\n // Category Table Seeding\n ProductCategory::factory()\n ->count(5)\n ->create();\n\n // Product Table Seeding\n Product::factory()\n ->count(10)\n ->create();\n }", "title": "" }, { "docid": "d4833208ba9ca3bb97bd734168301979", "score": "0.7659574", "text": "public function run()\n {\n $this->call(ReligionsTableSeeder::class);\n $this->call(SubjectsTableSeeder::class);\n $this->call(BuildingsTableSeeder::class);\n $this->call(ScholarshipsTableSeeder::class);\n $this->call(GradesTableSeeder::class);\n $this->call(CollegesTableSeeder::class);\n $this->call(DepartmentsTableSeeder::class);\n factory('App\\Faculty', 500)->create();\n // factory('App\\Student', 1000)->create();\n factory('App\\Room', 140)->create();\n $this->call(CurriculaTableSeeder::class);\n $this->call(CurriculumSubjectsTableSeeder::class);\n $this->call(StudentsTableSeeder::class); \n }", "title": "" }, { "docid": "6fdeeeb37f42681366483a8c2c186b05", "score": "0.765777", "text": "public function run()\n {\n Model::unguard();\n $userId = DB::table('users')->pluck('id')->toArray();\n $bookId = DB::table('books')->pluck('id')->toArray();\n $faker = Faker::create();\n for ($i = 0; $i <= 15; $i++) {\n factory(App\\Model\\Post::class, 1)->create([\n 'user_id' => $faker->randomElement($userId),\n 'book_id' => $faker->randomElement($bookId)\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "ade397526ae1d55557124d57dafcccd2", "score": "0.765603", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\empresa::class,10)->create();\n factory(\\App\\tut_lab::class,20)->create();\n factory(\\App\\tut_doc::class,20)->create();\n factory(\\App\\ciclo::class,20)->create();\n factory(\\App\\fecha::class,20)->create();\n factory(\\App\\alumno::class,20)->create();\n \n\n }", "title": "" }, { "docid": "43a50dd07282ff905667d4ed0c2f4a4b", "score": "0.76543665", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create(\n [\n 'email' => '[email protected]',\n 'name' => 'Leszek'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => '[email protected]',\n 'name' => 'Gosia'\n ]\n );\n\n factory(User::class)->create(\n [\n 'email' => '[email protected]',\n 'name' => 'Agnieszka'\n ]\n );\n }", "title": "" }, { "docid": "f39736a1dd58b24415fb18f580a15480", "score": "0.7653886", "text": "public function run()\n {\n //$faker = Factory::create('uk_UA');\n $faker = Factory::create('ru_RU');\n\n foreach (range(1, 10) as $i) {\n Staff::create([\n 'first_name' => (($i % 2) == 0) ? $faker->firstNameMale : $faker->firstNameFemale,\n 'last_name' => $faker->lastName,\n 'middle_name' => (($i % 2) == 0) ? $faker->middleNameMale() : $faker->middleNameFemale(),\n 'sex' => (($i % 2) == 0) ? 'мужской' : 'женский',\n 'salary' => 600,\n ]);\n }\n\n foreach (Staff::all() as $people) {\n $positions = Position::inRandomOrder()->take(rand(1,3))->pluck('id');\n $people->positions()->attach($positions);\n }\n }", "title": "" }, { "docid": "727a6eb0cfb135db37a834cd42286ad5", "score": "0.7651371", "text": "public function run()\n {\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n //factory(Post::class, 48)->create();\n }", "title": "" }, { "docid": "0aa9e71a7d39d8e1c143c2676348855e", "score": "0.7650461", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n // call our class and run our seeds\n\n DB::table('armari_a')->insert([\n\n 'id' => '2',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Bosses puntes pipetes',\n 'stock_inicial' => '4',\n 'stock_actual' => '5',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '11971',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n ]);\n DB::table('armari_a')->insert([\n\n 'id' => '3',\n 'nom_armari' => 'armari A',\n 'nom_producte' => 'Puntes micropipeta',\n 'stock_inicial' => '17',\n 'stock_actual' => '17',\n 'proveedor' => 'PIDISCAT',\n 'referencia_proveedor'=> '0',\n 'marca_equip' => 'null',\n 'num_lot' => '0',\n\n\n ]);\n\n\n }", "title": "" }, { "docid": "3a36602f580a4a0d79e184724854eff2", "score": "0.76479024", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n User::truncate();\n Admin::truncate();\n factory(User::class, 2)->create();\n factory(Admin::class, 1)->create();\n //factory(Link::class, 10)->create();\n //factory(Category::class, 2)->create();\n }", "title": "" }, { "docid": "8a18fcb1937bb7f261796040e1fcfa6d", "score": "0.76466405", "text": "public function run()\n {\n //$this->call(StudentSeeder::class);\n $this->call(ClassroomSeeder::class);\n $this->call(FacultyMemberSeeder::class);\n $this->call(LectureSeeder::class);\n $this->call(LectureRegisterSeeder::class);\n\n DB::table('users')->insert([\n 'role' => '1',\n 'name' => 'Öğrenci işleri',\n 'email' => '[email protected]',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İlk',\n 'surname' => 'Öğrenci',\n 'code' => '1231231231',\n 'email' => '[email protected]',\n 'password' => Hash::make( '123123' )\n ]);\n DB::table('users')->insert([\n 'role' => '2',\n 'name' => 'İkinci',\n 'surname' => 'Öğrenci',\n 'code' => '1231231232',\n 'email' => '[email protected]',\n 'password' => Hash::make( '123123' )\n ]);\n }", "title": "" }, { "docid": "bcb79b7af39bcb53c4feae04acbb1a67", "score": "0.76453894", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Attribute::create(['title' => 'Expertise and Competence']);\n Attribute::create(['title' => 'Responsiveness']);\n Attribute::create(['title' => 'Communication and Reporting']);\n Attribute::create(['title' => 'Trustworthiness (Confidentiality)']);\n Attribute::create(['title' => 'Quality of Service']);\n }", "title": "" }, { "docid": "41157008c4eff9687b3dcc670f9e4f1e", "score": "0.7644173", "text": "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 < 50; $i++) {\n User::create([\n 'username' => $faker->word,\n 'fullname' => $faker->word,\n 'state' => 0,\n 'tel' => $faker->word,\n 'whatsapp' => $faker->word,\n 'token' => $faker->sentence,\n 'address' => $faker->word,\n 'email' => $faker->email,\n 'password' => $faker->word\n ]);\n }\n }", "title": "" }, { "docid": "9fde55e4c96d4dec4240ddd0ecd757be", "score": "0.7643901", "text": "public function run()\n {\n\t\t$this->call(CategoryTableSeeder::class);\n\t\t$this->call(GenreTableSeeder::class);\n\t\t$this->call(StateTableSeeder::class);\n\t\t$this->call(ImageTableSeeder::class);\n\t\t$this->call(AuthorImageTableSeeder::class);\n\t\t$this->call(CharacterImageTableSeeder::class);\n\n\t factory(User::class, 10)->create();\n\t factory(Customer::class, 10)->create();\n\t factory(Product::class, 20)->create();\n }", "title": "" } ]
e9f1b1de872c0cb579fdc1be7a6405ab
/ turns arguments array into variables
[ { "docid": "4b6ff58ebbaf8a2e6eab2fa489f89139", "score": "0.0", "text": "function prince_type_post_select( $args = array() ) {\n\t\textract( $args );\n\n\t\t/* verify a description */\n\t\t$has_desc = $field_desc ? true : false;\n\n\t\t/* format setting outer wrapper */\n\t\techo '<div class=\"format-setting type-post-select ' . ( $has_desc ? 'has-desc' : 'no-desc' ) . ' ' . ($field_block ? 'block' : '') . '\">';\n\n\t\t/* description */\n\t\techo $has_desc ? '<div class=\"description\">' . htmlspecialchars_decode( $field_desc ) . '</div>' : '';\n\n\t\t/* format setting inner wrapper */\n\t\techo '<div class=\"format-setting-inner\">';\n\n\t\t/* build page select */\n\t\techo '<select name=\"' . esc_attr( $field_name ) . '\" id=\"' . esc_attr( $field_id ) . '\" class=\"prince-ui-select ' . $field_class . '\">';\n\n\t\t/* query posts array */\n\t\t$my_posts = get_posts( apply_filters( 'prince_type_post_select_query', array(\n\t\t\t'post_type' => array( 'post' ),\n\t\t\t'posts_per_page' => - 1,\n\t\t\t'orderby' => 'title',\n\t\t\t'order' => 'ASC',\n\t\t\t'post_status' => 'any'\n\t\t), $field_id ) );\n\n\t\t/* has posts */\n\t\tif ( is_array( $my_posts ) && ! empty( $my_posts ) ) {\n\t\t\techo '<option value=\"\">-- ' . __( 'Choose One', 'wp-radio' ) . ' --</option>';\n\t\t\tforeach ( $my_posts as $my_post ) {\n\t\t\t\t$post_title = '' != $my_post->post_title ? $my_post->post_title : 'Untitled';\n\t\t\t\techo '<option value=\"' . esc_attr( $my_post->ID ) . '\"' . selected( $field_value, $my_post->ID, false ) . '>' . $post_title . '</option>';\n\t\t\t}\n\t\t} else {\n\t\t\techo '<option value=\"\">' . __( 'No Posts Found', 'wp-radio' ) . '</option>';\n\t\t}\n\n\t\techo '</select>';\n\n\t\techo '</div>';\n\n\t\techo '</div>';\n\n\t}", "title": "" } ]
[ { "docid": "b80a5bab2375d8f0a5a591f5616bfd78", "score": "0.68327385", "text": "public static function args();", "title": "" }, { "docid": "de201a09c9e16075fcc9e3cccd550563", "score": "0.68280756", "text": "function getArguments();", "title": "" }, { "docid": "595fdf02b8df7ad405d2b5e50992fbb6", "score": "0.66703874", "text": "public function getArgs();", "title": "" }, { "docid": "f219196ed7ba6791e6f410c9b6286d2d", "score": "0.6665805", "text": "function func_get_args() {}", "title": "" }, { "docid": "629b2e03860bba12721c66914e96e0e0", "score": "0.6576605", "text": "public function getArguments();", "title": "" }, { "docid": "629b2e03860bba12721c66914e96e0e0", "score": "0.6576605", "text": "public function getArguments();", "title": "" }, { "docid": "629b2e03860bba12721c66914e96e0e0", "score": "0.6576605", "text": "public function getArguments();", "title": "" }, { "docid": "629b2e03860bba12721c66914e96e0e0", "score": "0.6576605", "text": "public function getArguments();", "title": "" }, { "docid": "342fddca6922096c95ac87135de504a3", "score": "0.64731693", "text": "public function getArgumentsStringVariations(array $args) {\n $variations = [];\n for ($length = 1; $length <= count($args); $length++) {\n $args_slice = array_slice($args, 0, $length);\n $variations[] = $this->convertArgumentsArrayToString($args_slice);\n }\n return $variations;\n }", "title": "" }, { "docid": "6376b74ecec4c9dd7d36f54fbde8cb5e", "score": "0.6409545", "text": "function parse_arguments() {\n global $argc;\n global $argv;\n global $_REQUEST;\n \n if ($argc > 0) {\n for ($i=1;$i < $argc;$i++) {\n parse_str($argv[$i],$tmp);\n $_REQUEST = array_merge($_REQUEST, $tmp);\n }\n }\n}", "title": "" }, { "docid": "733e20662e20da6b77b765aa4a3a07af", "score": "0.6406482", "text": "public function getArguments() : array;", "title": "" }, { "docid": "faff4efc35e5065223be0f4ac6b12ccf", "score": "0.6397233", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\t\n\t\t];\n\t}", "title": "" }, { "docid": "6116ffd91d56f311459dd223ef20e210", "score": "0.638311", "text": "function var_args(){\n\t echo 'Počet parametrů: ';\n\t echo func_num_args();\n\t \n\t echo '<br />';\n\t $args = func_get_args();\n\t foreach ($args as $arg){\n\t\t echo $arg.'<br />';\n\t }\n }", "title": "" }, { "docid": "710a40439d1238f06f9e5f212b74205c", "score": "0.63470703", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "710a40439d1238f06f9e5f212b74205c", "score": "0.63470703", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "bbf40d46d6f43c3e842c5230db283146", "score": "0.63426113", "text": "public function getArguments() {}", "title": "" }, { "docid": "bbf40d46d6f43c3e842c5230db283146", "score": "0.63426113", "text": "public function getArguments() {}", "title": "" }, { "docid": "63e1f5d858f660d32038d2567143c278", "score": "0.6289115", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\t\t\n\t\t];\n\t}", "title": "" }, { "docid": "47e33fc47c1199e99e1c1b568789c2fc", "score": "0.62592196", "text": "public function parseArgs(...$args): array;", "title": "" }, { "docid": "dc351afdf79c463750da4b59d5b45928", "score": "0.6240273", "text": "protected function extractArguments()\n {\n $chunks = array_filter($this->chunks, [$this, 'isArgument']);\n\n return array_map([$this, 'cleanChunk'], $chunks);\n }", "title": "" }, { "docid": "2c515f4123eaf61cfdcc1a06db672223", "score": "0.62201697", "text": "public function args(){\n return func_get_args();\n }", "title": "" }, { "docid": "3030c5aa3e76ec2651dd4a3930abf643", "score": "0.62149936", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\n\t\t];\n\t}", "title": "" }, { "docid": "20a7ddd7b959647ceec98672d8f246c4", "score": "0.6213388", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "20a7ddd7b959647ceec98672d8f246c4", "score": "0.6213388", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "20a7ddd7b959647ceec98672d8f246c4", "score": "0.6213388", "text": "protected function getArguments()\n\t{\n\t\treturn [\n\t\t];\n\t}", "title": "" }, { "docid": "2e743a7b6a0d608a8700d81748c33e6c", "score": "0.621141", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "2e743a7b6a0d608a8700d81748c33e6c", "score": "0.621141", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\n\t\t);\n\t}", "title": "" }, { "docid": "bd276e150427dee56e9a1c766f119190", "score": "0.6193044", "text": "protected function getArguments()\r\n\t{\r\n\t\treturn array();\r\n\t}", "title": "" }, { "docid": "8d98aede0c2ad8d7d6a278aa9c12d5c7", "score": "0.61918104", "text": "public static function getComposerScriptArguments(array $arguments)\n {\n $keyValueArguments = array();\n\n foreach ($arguments as $argument) {\n list($argKey, $argValue) = (strpos($argument, '=') !== false) ? explode('=', $argument) : [$argument, null];\n $keyValueArguments[trim($argKey, '-')] = $argValue;\n }\n\n return $keyValueArguments;\n }", "title": "" }, { "docid": "a96676dbc24d737a4f3a95fbbe206406", "score": "0.61672074", "text": "public function parseArgs($arguments) {\n list($positional_args, $mixed_args) = self::extractAssoc($arguments);\n list($assoc_args, $runtime_config) = $this->unmixAssocArgs($mixed_args);\n $array = array($positional_args, $assoc_args, $runtime_config);\n return $array;\n }", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.61627555", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "d0fa0b4bc6e2f152165b33c7671c9a46", "score": "0.61627555", "text": "protected function getArguments()\n\t{\n\t\treturn array(\n\t\t);\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.6139489", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.6139489", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.6139489", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.6139489", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "f23032e6086da610ada52ea4bc5ac819", "score": "0.6139489", "text": "protected function getArguments()\n\t{\n\t\treturn array();\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.6139229", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.6139229", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.6139229", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.6139229", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.6139229", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "d924ffcad1023b131dec5c088b6fae6f", "score": "0.6139229", "text": "protected function getArguments()\n\t{\n\t\treturn [];\n\t}", "title": "" }, { "docid": "1d6b30cee844a0fbdb9e8116890479e8", "score": "0.6104175", "text": "static public function args () {\n\t\t#/usr/local/share/haxe/std/php/_std/Sys.hx:40: lines 40-44\n\t\tif (array_key_exists(\"argv\", $_SERVER)) {\n\t\t\t#/usr/local/share/haxe/std/php/_std/Sys.hx:41: characters 4-89\n\t\t\treturn \\Array_hx::wrap(array_slice($_SERVER[\"argv\"], 1));\n\t\t} else {\n\t\t\t#/usr/local/share/haxe/std/php/_std/Sys.hx:43: characters 4-13\n\t\t\treturn new \\Array_hx();\n\t\t}\n\t}", "title": "" }, { "docid": "e9b31f46fe5fbf7d500fb9d9eea7c98c", "score": "0.60978246", "text": "protected function extract_variables()\n {\n return wp_parse_args($this->template_vars(), $this->get_options());\n }", "title": "" }, { "docid": "6bc75ad8b82f913f9a5a1f9febc0a6c5", "score": "0.60548556", "text": "protected static function argument(array $arguments)\n {\n array_shift($arguments);\n return $arguments;\n }", "title": "" }, { "docid": "eb9f2925ff4ee792db2a91d7999353ae", "score": "0.60404056", "text": "protected function getArguments()\n\t{\n \n return array();\n \n\t}", "title": "" }, { "docid": "4330a5acf848cd32c29e59a4a7e48877", "score": "0.60303247", "text": "protected function getArguments()\r\n {\r\n return [\r\n\r\n ];\r\n }", "title": "" }, { "docid": "695b1a96c2effd411c781e34d1af0a4d", "score": "0.60274494", "text": "function setArgs($args = []);", "title": "" }, { "docid": "fe919ab6532e220a99647d66de335f58", "score": "0.6026632", "text": "protected function get_args() : array {\n\t\treturn [];\n\t}", "title": "" }, { "docid": "ed014ec51278b7ea5c1b05c1d50ce56e", "score": "0.599455", "text": "function arguments($argv) {\n $ARG = [];\n foreach ($argv as $key => $value) {\n $val = $argv[$i];\n if (preg_match('/^[-]{1,2}([^=]+)=([^=]+)/', $val, $match)) $ARG[$match[1]] = $match[2];\n }\n return $ARG;\n}", "title": "" }, { "docid": "da81fa78b4d7675571cb594d25b51838", "score": "0.5975062", "text": "public function getArguments() : iterable;", "title": "" }, { "docid": "cc82d3eb1059fd12bed62c1af2b040d0", "score": "0.59676003", "text": "public function getArguments(): array\n {\n $arguments = array();\n \n if (isset($this->backgroundColor)) {\n $arguments[] = \"-dBackgroundColor={$this->backgroundColor}\";\n }\n\n if (isset($this->downScaleFactor)) {\n $arguments[] = \"-dDownScaleFactor={$this->downScaleFactor}\";\n }\n \n return $arguments;\n \n }", "title": "" }, { "docid": "f9c69080f29daf63e7c64562f1bed185", "score": "0.5967412", "text": "function getArgs($args)\n{\n //function getArgs($args) by: B Crawford @php.net\n $out = array();\n $last_arg = null;\n for ($i = 1, $il = sizeof($args); $i < $il; $i++) {\n if ((bool) preg_match(\"/^--(.+)/\", $args[$i], $match)) {\n $parts = explode(\"=\", $match[1]);\n $key = preg_replace(\"/[^a-z0-9]+/\", \"\", $parts[0]);\n if (isset($parts[1])) {\n $out[$key] = $parts[1];\n } else {\n $out[$key] = true;\n }\n $last_arg = $key;\n } else if ((bool) preg_match(\"/^-([a-zA-Z0-9]+)/\", $args[$i], $match)) {\n for ($j = 0, $jl = strlen($match[1]); $j < $jl; $j++) {\n $key = $match[1]{$j};\n $out[$key] = true;\n }\n $last_arg = $key;\n } else if ($last_arg !== null) {\n $out[$last_arg] = $args[$i];\n }\n }\n return $out;\n}", "title": "" }, { "docid": "084632c5f06e9385ef5bfae3172e67e5", "score": "0.5933367", "text": "protected function assign_arguments()\n\t{\n\t\tif (isset($GLOBALS['argv']) AND is_array($GLOBALS['argv']))\n\t\t{\n\t\t\tforeach (array_slice($GLOBALS['argv'], 1) as $argument)\n\t\t\t{\n\t\t\t\t@list($param, $value) = explode('=', $argument);\n\n\t\t\t\tif (substr($param, 0, 2) !== '--')\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$param = ltrim($param, '-');\n\n\t\t\t\tif (isset(self::$arguments[$param]))\n\t\t\t\t{\n\t\t\t\t\tself::$arguments[$param] = empty($value) ? TRUE : $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "910e42a640c5615e12e0091d3674f63a", "score": "0.5932753", "text": "protected function getArguments()\n\t{\n return [];\n\t}", "title": "" }, { "docid": "29ef3e45218986c1f33d6b2b2c50975f", "score": "0.59174734", "text": "protected function getArguments()\n {\n return [\n \n ];\n }", "title": "" }, { "docid": "268b67daabbb8fbb71b6706f5058363c", "score": "0.5904326", "text": "protected function getArguments()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "268b67daabbb8fbb71b6706f5058363c", "score": "0.5904326", "text": "protected function getArguments()\n {\n return [\n\n ];\n }", "title": "" }, { "docid": "cedd12e0bb574e3fe7fbc9ae99ba3b3c", "score": "0.5894571", "text": "protected function getArguments()\n {\n return [\n ];\n }", "title": "" }, { "docid": "cedd12e0bb574e3fe7fbc9ae99ba3b3c", "score": "0.5894571", "text": "protected function getArguments()\n {\n return [\n ];\n }", "title": "" }, { "docid": "10e0df65653ec1343114117f5a7c7a15", "score": "0.58813804", "text": "function get_cli_arguments(): array\n{\n global $argv;\n $arguments = [];\n $params = [];\n\n foreach ($argv as $k => $arg) {\n if ($k === 1) {\n $arguments['task'] = $arg;\n } elseif ($k === 2) {\n $arguments['action'] = $arg;\n } elseif ($k >= 3) {\n $params[] = $arg;\n }\n }\n $arguments[] = $params;\n return $arguments;\n\n //return implode(\"/\",array_slice($argv,1));\n}", "title": "" }, { "docid": "aa6b3274568be38d4710afeb7b890126", "score": "0.58805037", "text": "#[Pure]\n public function getArguments(): array {}", "title": "" }, { "docid": "d0bf8e781e071cb3d69b5a5c87f85a9d", "score": "0.58559674", "text": "protected function getArguments ()\n {\n return array();\n\n }", "title": "" }, { "docid": "f1542860004ba592757785fbe5d515f1", "score": "0.5840098", "text": "public function getArguments()\n {\n if (!isset($this->payload['args'])) {\n return [];\n }\n\n //return $this->payload['args'][0];\n return $this->payload['args'];\n }", "title": "" }, { "docid": "61c0b1104026ca251c8d3ae2650d3852", "score": "0.5833825", "text": "protected function getArguments()\n {\n return array(\n );\n }", "title": "" }, { "docid": "7656018f56889fa33482c28c483189e2", "score": "0.58144486", "text": "public function getArgs()\n\t\t{\n\t\t\treturn $this->_argumentos;\n\t\t}", "title": "" }, { "docid": "d48fcb8e3b59ff1456f475fa3b400c6b", "score": "0.5799495", "text": "protected function getArguments() {\n return [\n ];\n }", "title": "" }, { "docid": "ab7f57609cce727babd5b794bd6cd6ff", "score": "0.579591", "text": "private function resolveArgs(array $args)\n {\n $realArgs = [];\n foreach ($args as $k => $v) {\n\n $isCustom = false;\n $customValue = $this->resolveCustomNotation($v, $isCustom);\n\n if (false === $isCustom) {\n\n if (is_array($v)) {\n if (true === SicTool::isSicBlock($v, $this->passKey)) {\n $v = $this->getService($v);\n } else {\n $v = $this->resolveArgs($v);\n }\n }\n } else {\n $v = $customValue;\n }\n $realArgs[$k] = $v;\n }\n return $realArgs;\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "80a2ca0be930886196441a5347f5597d", "score": "0.5790618", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "c2b230b05edc0c222f586ac7d8ad44d5", "score": "0.57764065", "text": "function varzx($arg)\n {\n $args = func_get_args();\n call_user_func_array('varz', $args);\n die();\n }", "title": "" }, { "docid": "fe0a70c46d52f204dac7be113514df13", "score": "0.5771001", "text": "public static function makeArgs(Array $args, &$bound)\n {\n foreach ($args as $key => $value) {\n $bound[':' . $key] = $value;\n }\n }", "title": "" }, { "docid": "6902269ec1ad4322b31aada36fa47f2c", "score": "0.5767795", "text": "private function parseArguments(): array\n {\n if (empty($this->arguments)) {\n return [];\n }\n\n $arguments = explode(',', $this->arguments);\n $trimmedArguments = array_map('trim', $arguments);\n return array_map(\n function ($argument) {\n $argumentWithoutQuotes = str_replace(['\\'', '\"'], '', $argument);\n return $argumentWithoutQuotes;\n },\n $trimmedArguments\n );\n }", "title": "" }, { "docid": "693690e99544deaf6f254fc05260842b", "score": "0.57672846", "text": "public function getVariables(): array;", "title": "" }, { "docid": "693690e99544deaf6f254fc05260842b", "score": "0.57672846", "text": "public function getVariables(): array;", "title": "" }, { "docid": "c72a2a41b114ca06d496fde92c04db88", "score": "0.57619625", "text": "private function getArgs(array $frame): array\n {\n /**\n * Defining an array of arguments to be returned\n */\n $arguments = [];\n\n /**\n * If args param is not exist or empty\n * then return empty args array\n */\n if (empty($frame['args'])) {\n return $arguments;\n }\n\n /**\n * ReflectionFunction/ReflectionMethod class reports information\n * about a function/method.\n */\n $reflection = $this->getReflectionMethod($frame);\n\n /**\n * If reflection function in missing then create a simple list of arguments\n */\n if (!$reflection) {\n foreach ($frame['args'] as $index => $value) {\n $arguments['arg' . $index] = $value;\n }\n } else {\n /**\n * Get reflection params\n */\n $reflectionParams = $reflection->getParameters();\n\n /**\n * Passing through reflection params to get real names for values\n */\n foreach ($reflectionParams as $reflectionParam) {\n $paramName = $reflectionParam->getName();\n $paramPosition = $reflectionParam->getPosition();\n\n if (isset($frame['args'][$paramPosition])) {\n $arguments[$paramName] = $frame['args'][$paramPosition];\n }\n }\n }\n\n /**\n * @todo Remove the following code when hawk.types\n * supports non-iterable list of arguments\n */\n $newArguments = [];\n foreach ($arguments as $name => $value) {\n $value = $this->serializer->serializeValue($value);\n\n try {\n $newArguments[] = sprintf('%s = %s', $name, $value);\n } catch (\\Exception $e) {\n // Ignore unknown types\n }\n }\n\n $arguments = $newArguments;\n\n return $arguments;\n }", "title": "" }, { "docid": "6fa234b7cf3229388f9284b2a6c41797", "score": "0.5741849", "text": "public function setArguments(array $arguments) {}", "title": "" }, { "docid": "6fa234b7cf3229388f9284b2a6c41797", "score": "0.5741849", "text": "public function setArguments(array $arguments) {}", "title": "" }, { "docid": "3fc036fc93a844c003f5e522c4df5be1", "score": "0.57415867", "text": "protected function getArguments()\r\n {\r\n return [];\r\n }", "title": "" }, { "docid": "72898b3efcd213410c4f710ca97a2617", "score": "0.57197034", "text": "protected function getArguments()\n {\n return array();\n }", "title": "" }, { "docid": "1600af5d25443d47c4cb2463fc52153d", "score": "0.571467", "text": "protected function getArgs()\n {\n return $this->arguments;\n }", "title": "" }, { "docid": "6f71f561537516e1bc20c291f9e11197", "score": "0.5694378", "text": "protected function GetArgsArray()\n {\n #encrypt the current password\n $this->encrypted_password = PasswordEncrypt::EncryptPass($this->password);\n \n $args = array(\n \"staffId\"=>$this->staffId,\n \"firstName\"=>$this->firstName,\n \"lastName\"=>$this->lastName,\n \"username\"=>$this->username,\n \"email\"=>$this->email,\n \"phone\"=>$this->phone,\n \"accType\"=>$this->accType,\n \"encrypted_password\"=>$this->encrypted_password\n );\n\n return $args;\n }", "title": "" }, { "docid": "42de70ea08b8e13aaaf77784628ca05c", "score": "0.56840855", "text": "public function &getArguments();", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" }, { "docid": "b72197f233a72e96e4470aa700268c8e", "score": "0.56796634", "text": "protected function getArguments()\n {\n return [];\n }", "title": "" } ]
f43c8fae0e778083ba63777ace128afb
get a names of fields of table
[ { "docid": "8bfdb2a8a8ac593fe18c803777c72f19", "score": "0.0", "text": "function getFieldsName(){\n\t\t$fieldsName = array();\n\t\t$fieldsName[] = '№';\n\t\t$fieldsName[] = \"Гос.номер\";\n\t\t$fieldsName[] = \"VIN\";\n\t\t$fieldsName[] = \"Марка\";\n\t\t$fieldsName[] = \"Статус\";\n\t\t$fieldsName[] = \"Дата подключения\";\n\t\t$fieldsName[] = \"Клиент\";\t\t\t// change this field on client name for production\n\t\t$fieldsName[] = \"Редактирование\";\t\t\t// change this field on client name for production\n\t\treturn $fieldsName;\n\t}", "title": "" } ]
[ { "docid": "1314851b12bb80f14093e6121f85231b", "score": "0.8333218", "text": "private function getAllTableFields()\n {\n $connection = $this->searchQuery->getConnection();\n $tableName = $this->searchQuery->getMainTable();\n $fields = $connection->describeTable($tableName);\n\n return $fields;\n }", "title": "" }, { "docid": "cde733d27f7e6c1e7e976e48d8fab562", "score": "0.81794846", "text": "public function fields()\n\t{\n\t\tforeach ($this->_data as $key => $value)\n\t\t\t$fields[] = $this->_table_name.'.'.$key;\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "09e4637e7b8f81f499358539b6985f83", "score": "0.8104634", "text": "protected function getTableFields()\n { \n $connection = Connection::connect();\n\n $driver = getenv('P_DRIVER');\n\n if ($driver == 'pgsql') {\n $describe = '\\d ';\n }\n $describe = 'describe ';\n \n $q = $connection->prepare($describe.$this->getTableName($this->className));\n $q->execute();\n \n return $q->fetchAll(PDO::FETCH_COLUMN); \n }", "title": "" }, { "docid": "2ab109c8cff299eefb1ff24f46c62a87", "score": "0.80853856", "text": "function fieldnames($table) {\n $rs = mysql_query(\"SELECT * FROM $table WHERE 0;\");\n $fields = array();\n $n = mysql_num_fields($rs);\n for ($i = 0; $i < $n; $i++)\n $fields[] = mysql_field_name($rs, $i);\n return $fields;\n}", "title": "" }, { "docid": "78e09719e87dd848d172af1a0535cec8", "score": "0.8002191", "text": "public function getTableFields() {\n \n if ($this -> ifTableExists() !== FALSE) { // if table exists\n \n $st = $this -> dbo -> prepare(\"DESCRIBE \" . $this -> table_name);\n\n $st -> execute();\n\n $table_fields_names = $st -> fetchAll(PDO::FETCH_COLUMN);\n\n return $table_fields_names;\n\n } else {\n \n return FALSE;\n \n }\n \n }", "title": "" }, { "docid": "98356e810c09bcfa37d9a8497b42d244", "score": "0.7992761", "text": "public function getFieldsForExport()\n {\n return array_keys($this->describeTable());\n }", "title": "" }, { "docid": "158be1a069912e646b550b86f360c4a1", "score": "0.7984191", "text": "public function fields()\n {\n return $this->db->list_fields($this->_table);\n }", "title": "" }, { "docid": "f5d54bfa26a68e1fd5cd9a54e80193e3", "score": "0.79794776", "text": "function getFields($table) {\r\n $db = new DB();\r\n $query = EQueries::getQuery(EQueries::LIST_COLUMNS) . $table;\r\n $db->select($query);\r\n return $db->get();\r\n }", "title": "" }, { "docid": "8f435f049638aa95c11c956596d95386", "score": "0.7936571", "text": "public function getFields($table) {\n\n $this->schema = $this->getConnection();\n \n $fields = $this->schema->describe($table);\n \n return $fields->columns(); \n }", "title": "" }, { "docid": "bfde1ea904faf751bfe118ba39dc9fb4", "score": "0.79361784", "text": "function get_field_names() {\n\t\treturn array_keys( $this->fields );\n\t}", "title": "" }, { "docid": "f282ad4093c161eedd39db2c50b8c7f3", "score": "0.7919838", "text": "public function list_fields()\n {\n $field_names = [];\n for ($i = 0, $c = $this->num_fields(); $i < $c; $i++) {\n // Might trigger an E_WARNING due to not all subdrivers\n // supporting getColumnMeta()\n $field_names[$i] = @$this->result_id->getColumnMeta($i);\n $field_names[$i] = $field_names[$i]['name'];\n }\n\n return $field_names;\n }", "title": "" }, { "docid": "6ba8407eda8bf2a2373c1e6994bfde71", "score": "0.7850533", "text": "private function getTableField()\n\t{\n\n\t\t$fields = array();\n\t\t$result = $this -> db ->query(\"DESCRIBE `{$this->_tabela}`\")->fetchAll();\n\n\t\tforeach ($result as $r) {\n\t\t\tarray_push($fields, $r['Field']);\n\t\t}\n\n\t\treturn $fields;\n\n\t}", "title": "" }, { "docid": "90ea7bf35a9c8ea5b38eccf3fee3f208", "score": "0.7834349", "text": "public static function getFields () {\n\t\tif (static::$fields === null) {\n\t\t\t$table = static::$table;\n\t\t\treturn static::$fields = static::$Db->query(\"DESCRIBE `$table`\", \\PDO::FETCH_COLUMN, 0)->fetchAll();\n\t\t}\n\n\t\treturn static::$fields;\n\t}", "title": "" }, { "docid": "ef0c6f6e59abf565053e4ccde7a35d05", "score": "0.7788697", "text": "public function getFields()\n {\n if (empty($this->tableFields)) {\n $this->getTableInfo();\n }\n\n return $this->tableFields;\n }", "title": "" }, { "docid": "0ede942c2bab44d85e1bbf8c2e675225", "score": "0.77121603", "text": "private function getFields($table)\n {\n in_array($table, $this->readTables()) or die;\n $table = $this->db->prefix . $table;\n $columns = $this->query(\"SHOW COLUMNS FROM ${table}\");\n return array_map(function ($column) {\n return $column->Field;\n }, $columns);\n }", "title": "" }, { "docid": "e3097b7a536d672b6655d3c1ae2c4e57", "score": "0.770515", "text": "public function list_fields()\n {\n $field_names = array();\n $this->result_id->field_seek(0);\n while ($field = $this->result_id->fetch_field())\n {\n $field_names[] = $field->name;\n }\n\n return $field_names;\n }", "title": "" }, { "docid": "a64868436c74e6118860e40e6c8676a3", "score": "0.7654689", "text": "public function getFields() {\n $result = $this->dbh->getColumnsInfo(self::USER_TABLE_NAME);\n return $result;\n }", "title": "" }, { "docid": "a832e938d7e42d14f2e061737743762e", "score": "0.76449955", "text": "private function _Get_Fields () {\n\t\treturn array_keys(self::Database(null,false,false));\n\t}", "title": "" }, { "docid": "c1f807967755e5378cc0640ebc011718", "score": "0.763355", "text": "function getfield_Name($table)\n\t{\n\t\tglobal $db;\n\t\t$sql= \"SHOW COLUMNS FROM \".$table;\n \t\t$db->query($sql);\n\t\treturn ($db->fetch_array());\n\t}", "title": "" }, { "docid": "7909a08a925f65ac9214d30e9879c50b", "score": "0.7630272", "text": "public function getFields($tablename)\n {\n return R::inspect($tablename);\n }", "title": "" }, { "docid": "a5f4bf178321791218bf6b4b7807e4ee", "score": "0.7625299", "text": "public function listFields($table);", "title": "" }, { "docid": "96f3d587ec40908592b198b61146b529", "score": "0.76197165", "text": "function getFieldNames($tableName) {\n// $qry = \"SELECT column_name FROM information_schema.COLUMNS WHERE table_name = '\".$tableName.\"' AND TABLE_SCHEMA = '\".$this->dbName.\"' \";\n $qry = \"desc \".$tableName;\n $res1 = $this->db->get_results($qry);\n// $flds = $this->db->col_info;\n// $this->db->vardump($res1);\n if (isset($res1)){ //if (isset($flds)){\n foreach ($res1 as $fld) {\n $fields[] = $fld->Field;\n }\n }else{\n echo ('Error: getting field names.');\n }\n return $fields;\n }", "title": "" }, { "docid": "178c7b24a6f268e7f6666ead174a2ae6", "score": "0.76107943", "text": "function getTableFields($table)\n {\n\n $table = $this->getDescribeTable ( $table );\n foreach ( array_keys ( $table ) as $key )\n {\n $val [$key] = $key;\n }\n return $val;\n }", "title": "" }, { "docid": "e062719ce03c2115a23ea67afaae58c7", "score": "0.75905555", "text": "public static function getFieldsNames()\n {\n return array();\n }", "title": "" }, { "docid": "572a124a15ddcdca9eebf52ee05d26f7", "score": "0.7589143", "text": "public function getFieldNames()\n\t{\n\t\treturn array_keys($this->_fields);\n\t}", "title": "" }, { "docid": "074b5d5dba967e2f4a785c86f8415cc2", "score": "0.7583566", "text": "function get_fields_list(){\n global $conn;\n \n $fields = [];\n $sql = \"SELECT `column_name` FROM `INFORMATION_SCHEMA`.`COLUMNS` WHERE `TABLE_SCHEMA`='\" . constant('DB_NAME') . \"' AND `TABLE_NAME`='\" . $this->table_name . \"';\";\n \n $query_rs = mysqli_query($conn, $sql);\n while ($row = mysqli_fetch_assoc($query_rs)) {\n $fields[] = $row['column_name'];\n }\n\n return $fields;\n }", "title": "" }, { "docid": "5f70451e7676204608de35287c620f2b", "score": "0.7558899", "text": "public final function _listFields()\n\t{\n\t\t$field_names = array();\n\t\twhile ($field = mysqli_fetch_field($this->_result))\n\t\t{\n\t\t\t$field_names[] = $field->name;\n\t\t}\n\n\t\treturn $field_names;\n\t}", "title": "" }, { "docid": "726c80c42bb1af340c21db8641612b9e", "score": "0.75547373", "text": "public function get_fields()\n\t{\n\t\treturn array_keys( $this->fields );\n\t}", "title": "" }, { "docid": "8abba8d3f5bd5cd28eab4be8ae73afc4", "score": "0.75308406", "text": "function getFieldsName();", "title": "" }, { "docid": "f1d8090bcf465ec52f7e902bcb02d4d5", "score": "0.7493752", "text": "function wrapper_field_names($table) {\n\n\t\t$fields = $this->functions['list_fields']($this->database, $table, $this->link_id);\n\t\t$columns = $this->functions['num_fields']($fields);\n\n\t\tfor ($i = 0; $i < $columns; $i++) {\n\t\t\t$array[] = $this->functions['field_name']($fields, $i);\n\t\t}\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "94603e86680501c0ad8b390ddeb90cc0", "score": "0.74902934", "text": "public function returntablecolumnnames();", "title": "" }, { "docid": "4053d20fd4af2d42a09ac0038999e376", "score": "0.7486128", "text": "public function fields() {\n\t\treturn $this->columns;\n\t}", "title": "" }, { "docid": "e3d3962ff58340133a9cb49ae042e81b", "score": "0.74533314", "text": "public function getFields()\n {\n if (!static::$fields) {\n $fields = static::getFieldsFromTableStructure();\n\n static::$fields = $fields;\n }\n\n return static::$fields;\n }", "title": "" }, { "docid": "31a096d299192ce10947f8ac0c2f2567", "score": "0.74484354", "text": "public function getFieldNames()\n {\n }", "title": "" }, { "docid": "e6d3d29ae5dcf318520e8329021431f2", "score": "0.744575", "text": "public function names()\n {\n return array_keys($this->_fields);\n }", "title": "" }, { "docid": "53cde549e1545df5d5f13e4fd973a2ff", "score": "0.7443923", "text": "function field_names() {\n $arr = array();\n foreach ( array_keys( $this->attributes ) as $field ) {\n if ($field != $this->primary_key) {\n $arr[] = $field;\n }\n }\n return $arr;\n }", "title": "" }, { "docid": "b40e72316863a65b175f48fd7645c24b", "score": "0.7442795", "text": "function fields ($table_name) {\n\t\t$data = $this->all(\"DESC {$table_name}\");\n\t\t$fields = false;\n\n\t\tforeach ($data as $item)\n\t\t\t$fields[] = array('name'=>$item['Field'], 'type'=>$item['Type']);\n\n\t\treturn $fields;\n\t}", "title": "" }, { "docid": "34c765af891d04484fa4bd106e4754ac", "score": "0.74388206", "text": "public function getFieldnames()\n\t{\n\t\treturn $this->fieldnames;\n\t}", "title": "" }, { "docid": "0a97ce82b160790ad760482059b897a5", "score": "0.7435321", "text": "public static function getFields();", "title": "" }, { "docid": "fbb1d381d5cde6de5f27fc163b4ca2a4", "score": "0.7421395", "text": "public function getDbFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7414483", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7414483", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7414483", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7414483", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7414483", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7414483", "text": "public function getFields();", "title": "" }, { "docid": "9ba0c7b6cfac0c5057262a72bdc5915c", "score": "0.7414483", "text": "public function getFields();", "title": "" }, { "docid": "ee58352aa0e203c05c3691a1a47d4228", "score": "0.73810506", "text": "function GetFieldsList()\n\t{\n\t\tglobal $dal_info;\n\t\treturn array_keys( $dal_info[ $this->infoKey ] );\n\t}", "title": "" }, { "docid": "ce543b3d65160383ed16a693bb1d0963", "score": "0.73563045", "text": "public function getFieldNames() : array;", "title": "" }, { "docid": "22a62ba56c5c28d91410277bf91b8af9", "score": "0.7326765", "text": "public function getFieldNames()\n {\n return array_keys($this->fieldMappings);\n }", "title": "" }, { "docid": "77d4873ffba80d190a23297fd98ead82", "score": "0.7312588", "text": "public function fields();", "title": "" }, { "docid": "30170dba3fea9bb967114f5a5070fc71", "score": "0.730845", "text": "public function getFields()\n {\n $this->fields = array_keys( $this->dataSet ); \n return $this->fields;\n }", "title": "" }, { "docid": "8af6447930f954a20733b0719c52ce2f", "score": "0.7293474", "text": "protected function getColumns() {\n\t\t$model_fields = create_function( '$obj', 'return get_object_vars($obj);' );\n\t\treturn array_keys( $model_fields( $this ) );\n\t}", "title": "" }, { "docid": "d7325eba7966d3d1a314d85b96ff61b9", "score": "0.7273759", "text": "public function fetchFields()\n\t{\n\t\treturn $this->_getCols();\t\n\t}", "title": "" }, { "docid": "a6c599891d0546ce78858f4fc1bd83a5", "score": "0.72583747", "text": "protected function loadFields() {\n\t\t$t = new MySQLTable($this->object_table);\n\t\treturn $t->getTableFields();\n\t}", "title": "" }, { "docid": "6d8aa3a3f47a863d6b64add33cb397b0", "score": "0.7251339", "text": "function get_table_field_names($db_id,$table_id)\n {\n $collection = $collection=$this->mongo_client->{$this->get_db_name()}->{$this->get_table_name($db_id,$table_id)};\n $result = $collection->findOne();\n\n $output=array();\n\n if($result){\n\n foreach (array_keys((array)$result) as $key){\n $output[$key]=$key;\n }\n }\n\n return $output;\n }", "title": "" }, { "docid": "486b2ae57e1266a102925900812f7b84", "score": "0.7234861", "text": "public function listFields(string $table): array\n {\n $hash = spl_object_hash($this);\n if (!isset($this->data['list_fields'][$table])) {\n $this->{$hash}['list_fields'][$table] =\n $this->query('SHOW COLUMNS FROM `'\n . $this->escape_string($table) . '`')->fetch_col();\n }\n return $this->{$hash}['list_fields'][$table];\n }", "title": "" }, { "docid": "44ec8ed8950f697997cb6e19a3efc935", "score": "0.7233046", "text": "public function getFieldNames() : array \n\t{\n\t\t$fieldNames = [];\n\t\tforeach (sqlsrv_field_metadata( $this->resultID ) as $offset => $field) {\n\t\t\t$fieldNames[] = $field['Name'];\n\t\t}\n\n\t\treturn $fieldNames;\n\t}", "title": "" }, { "docid": "50563d7cf9eb39c8d7faf433b27f8281", "score": "0.722842", "text": "public function getFieldNames() {\n\t\tglobal $wpdb;\n\t\t$data_table = $wpdb->prefix . 'amazon_feed_tpl_data';\n\n\t\t$items = $wpdb->get_col( $wpdb->prepare(\"\n\t\t\tSELECT field\n\t\t\tFROM $data_table\n\t\t\tWHERE tpl_id = %d\n\t\t\tORDER BY id ASC\n\t\t\", $this->id ));\n\n\t\treturn apply_filters( 'wpla_feed_template_column_names', $items, $this );\n\t}", "title": "" }, { "docid": "4a7c21d785d0686ff4ae12e59d980d2a", "score": "0.72240317", "text": "protected function getFields()\n\t{\n\t\tif($this->fieldArray == null)\n\t\t{\n\t\t\t$start = microtime(true);\n\t\t\t$results = $this->wpdb->get_results('SHOW columns FROM '.$this->getTable());\n\t\t\t$GLOBALS['DB_MODELS_DEBUG'][] = ['SHOW columns FROM '.$this->getTable(), microtime(true) - $start, false];\n\t\t\tforeach($results as $field)\n\t\t\t{\n\t\t\t\tif(strtolower($field->Key) == 'pri') $this->primaryKey = $field->Field;\n\t\t\t\t$this->fieldArray[] = $field->Field;\n\t\t\t}\n\t\t}\n\t\treturn $this->fieldArray;\n\t}", "title": "" }, { "docid": "a1f53aa1fb1bab11f380b66741447c8c", "score": "0.7209369", "text": "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "title": "" }, { "docid": "a1f53aa1fb1bab11f380b66741447c8c", "score": "0.7209369", "text": "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "title": "" }, { "docid": "a1f53aa1fb1bab11f380b66741447c8c", "score": "0.7209369", "text": "public static function getFieldNames() {\n\t\treturn self::$FIELD_NAMES;\n\t}", "title": "" }, { "docid": "796f294534c59da1bc26276b7e44a8b7", "score": "0.7185256", "text": "public function listFields_noid($table) {\n\t\t\t$contador = 0;\n\t\t\t$query = 'SHOW COLUMNS FROM '.$table;\n\t\t\t$res = $this->runQuery($query);\n\t\t\twhile ($row = $this->fetch($res)) {\n\t\t\t\tif ($contador != 0) {\n\t\t\t\t\t$fields[] = $row['Field'];\n\t\t\t\t}\n\t\t\t\t$contador++;\n\t\t\t}\n\t\t\treturn $fields;\n\t\t}", "title": "" }, { "docid": "e92ec2f5e5c76c0767570ec21bfb9969", "score": "0.7178091", "text": "public function getFieldNames(string $table) : array\n\t{\n\t\t//print \"\\n\".__CLASS__.\":\".__METHOD__.\"( $table )\\n\";\n\t\t$flds = $this->getFields($table);\n\t\t$a = [];\n\t\tforeach ($flds as $f) {\n\t\t\t$a[] = $f['Field'];\n\t\t}\n\t\t//print \"\\n\".__CLASS__.\":\".__METHOD__.\"( $table )\\n\";\n\t\treturn $a;\n\t}", "title": "" }, { "docid": "531c507501b8db22d31bf8f21cb9886f", "score": "0.7174382", "text": "public function get_fields();", "title": "" }, { "docid": "c3daa9bb5b3985606a6995f4850780e2", "score": "0.7150512", "text": "public function fields(): array\n {\n return array_keys($this->_fields);\n }", "title": "" }, { "docid": "0e4ebb1e3c4951bc3fd27446dd872625", "score": "0.71504253", "text": "public function getFieldNames()\n {\n return array_keys($this->field_definitions);\n }", "title": "" }, { "docid": "a719022c9acfca42615cc269594f5388", "score": "0.7143177", "text": "function metaFields($table)\r\n {\r\n $this->checkConnected();\r\n return $this->Connection->metaFields($table);\r\n }", "title": "" }, { "docid": "79aa3d8538014f77d2d145dfa9287ba6", "score": "0.713024", "text": "public function listFields($table)\n {\n $sth = $this->conn->query('SHOW COLUMNS FROM ' . $table . ';');\n\n $result = [];\n foreach ($sth->fetchAll(\\PDO::FETCH_ASSOC) as $row) {\n $result[] = [\n 'field' => $row['Field'],\n 'type' => $row['Type'],\n 'null' => $row['Null'],\n 'key' => $row['Key'],\n 'default' => $row['Default'],\n 'extra' => $row['Extra']\n ];\n }\n return $result;\n }", "title": "" }, { "docid": "476234ea2f424c8bcc04aac22cdaef20", "score": "0.71200943", "text": "protected function fields()\n\t{\n\t\treturn 'person_id, first_name, last_name, id_number, id_type, primary_address, primary_email_address, primary_phone_number, comments, created_on, created_by, modified_on, modified_by';\n\t}", "title": "" }, { "docid": "d6e17a1ba2b8d12a2756ad043e7355ca", "score": "0.71046513", "text": "protected static function getFieldsFromTableStructure()\n {\n $db = static::getStaticAdapter()->getDb();\n $statement = $db->query(\"DESCRIBE \".static::getTableName());\n $result = $statement->execute();\n\n $fields = [];\n foreach ($result as $column) {\n if (strpos($column['Type'], '(') !== false) {\n $type = substr($column['Type'], 0, strpos($column['Type'], '('));\n } else {\n $type = $column['Type'];\n }\n if (in_array($type, ['int', 'mediumint'])) {\n $type = 'integer';\n } else if (in_array($type, ['timestamp', 'datetime'])) {\n $type = 'datetime';\n } else {\n // FIXME: need mapping for more types here\n $type = 'string';\n }\n\n $fields[$column['Field']] = $type;\n }\n\n return $fields;\n }", "title": "" }, { "docid": "fd93de5aa3a479684bbb6d447343cc07", "score": "0.7103141", "text": "public function getColnames();", "title": "" }, { "docid": "a0ada0e089fbdc02ce6bdbd28765c443", "score": "0.7101629", "text": "public function fieldsForTable(Table $table)\n {\n // Execute the query directly\n $result = $this->client->query(\"SHOW COLUMNS FROM $table->name\");\n\n // If no results are returned, return an empty array\n if ($result === false) {\n return [];\n }\n\n // Loop through the query results, and add each field name to the array\n $fields = [];\n while ($data = $result->fetch(PDO::FETCH_ASSOC)) {\n $fields[] = $data['Field'];\n }\n\n return $fields;\n }", "title": "" }, { "docid": "0de46b7b38f55e10a11301c44ff54fee", "score": "0.7089153", "text": "public function fields(): array\n {\n return $this->schema->getLookupFields();\n }", "title": "" }, { "docid": "6db8bbbde3f16a5fd0d98bd10d100781", "score": "0.7087754", "text": "public function getFields($table) {\n $query = $this->db->query(\"DESCRIBE `\" . DB_PREFIX . $table . \"`\");\n $table = array();\n foreach ($query->rows as $item) {\n $table[$item['Field']] = $this->cleanField($item['Field']);\n }\n return $table;\n }", "title": "" }, { "docid": "8df5c6da31c702e596d51a7c9154ad7f", "score": "0.70859563", "text": "public function columns() {\n return array_keys(get_object_vars($this));\n }", "title": "" }, { "docid": "f4cfa44a37aba5f561f621bad91649f9", "score": "0.7085253", "text": "public function getFields () {\n /** @var array $a */\n $a = @$this->_result['response']['data'][0]['fieldData'];\n return @array_keys($a);\n }", "title": "" }, { "docid": "b7fbfe144ca9c1d034bb7ebf8120f86a", "score": "0.7085014", "text": "public abstract function getFields();", "title": "" }, { "docid": "d840b3bd53d7bd1d6d97486de19d127b", "score": "0.7058004", "text": "public function getIndexFields() {\r\n\t\t\r\n\t\t// Get primary table\r\n\t\t$table = $this->query[$this->query_id][\"table\"];\r\n\t\t\r\n\t\t// Get fields\r\n\t\t$fields = array();\r\n\t\tif (@count($results = $this->runSQL(\"SHOW INDEX FROM $table\"))) {\r\n\t\t\tforeach ($results as $row) {\r\n\t\t\t\tif ($row[\"Index_type\"]=='FULLTEXT')\r\n\t\t\t\t\t$fields[] = $row[\"Table\"].\".\".$row[\"Column_name\"];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $fields;\r\n\t}", "title": "" }, { "docid": "87199bbbc08a347969164aaf0b9038d8", "score": "0.70533586", "text": "public function getFields ()\n {\n if ( empty($this->results) )\n return array();\n\n return array_keys( $this->results[0] );\n }", "title": "" }, { "docid": "704fd4d8ce831ccd84579cbdecbce146", "score": "0.70504975", "text": "abstract public function list_fields();", "title": "" }, { "docid": "74a9fae4148baed4234744e53e19b812", "score": "0.70370406", "text": "function get_table_fields($db, $tableName )\n{\n $arrFields = array();\n if( empty($tableName) )\n {\n return false;\n }\n \n $db->query(\"SHOW TABLES LIKE '\".$tableName.\"'\");\n \n if( 0 == $db->getRowsCount())\n {\n return false;\n }\n \n $db->query(\"SHOW COLUMNS FROM \".$tableName);\n \n \n while( $row = mysql_fetch_array($db->fResult) )\n {\n $arrFields[] = trim( $row[0] );\n }\n \n return $arrFields;\n}", "title": "" }, { "docid": "1928a36d7b05ba3691e9ad3983913290", "score": "0.70292", "text": "public function get_columns()\n {\n global $wpdb;\n\n $fields = $wpdb->get_results(\"SHOW COLUMNS FROM $this->table_name\");\n $my_fields = array();\n foreach ($fields as $field) {\n if ($field->Type == \"bigint(20)\") {\n $my_fields[$field->Field] = \"%d\";\n } else {\n $my_fields[$field->Field] = \"%s\";\n }\n }\n return $my_fields;\n }", "title": "" }, { "docid": "74c3a0590e4a826e14ee2254edf31822", "score": "0.7016002", "text": "private static function get_sql_field_list(): string {\n return implode(', ', array_keys(static::$fields));\n }", "title": "" }, { "docid": "3bce10943f3629cd6ccbf16a07034b8d", "score": "0.7015939", "text": "function tbl_fields( $fields, $table = false ) {\r\n return table_fields( $fields, $table );\r\n }", "title": "" }, { "docid": "5732f9e796edb47fdffa3f8ec29830cd", "score": "0.7001568", "text": "function fields_list($table) {\n if (! $this->table_exists($table)) {\n throw new Exception(\"Table $table does not exist\");\n }\n\n return $this->fields_list [$table];\n }", "title": "" }, { "docid": "ff1d609db161578c28d253b875299817", "score": "0.6996918", "text": "public static function fields()\n {\n return array_keys(CriteriaOption::validations());\n }", "title": "" }, { "docid": "a787d28c6cb1fb900590988920346735", "score": "0.6983937", "text": "protected function hnsFields() {\r\n\t\t$mapping = $this->getHnsMapping();\r\n\r\n\t\treturn $mapping['fields'];\r\n\t}", "title": "" }, { "docid": "8d8d6795e8f1bdfe5b5534dd2e0382e7", "score": "0.69814974", "text": "private function getField($table) {\n\t\t$sql = \"SELECT COLUMN_NAME,COLUMN_TYPE FROM `information_schema`.`COLUMNS` WHERE `TABLE_SCHEMA`='\" . $this->dbname . \"' AND `TABLE_NAME`='\" . $table . \"'\";\n\t\t$result = $this->db->prepare($sql);\n\t\t$rs = $result->execute();\n\t\tif ($rs)\n\t\t\treturn $result->fetchAll($type);\n }", "title": "" }, { "docid": "3dab25bdbd331fdf4486b5cb56825910", "score": "0.69669807", "text": "public function getTableColumns($table)\n {\n $driver = $this->getDriverName();\n $bind = [];\n if ($driver == 'sqlite') {\n $table = $this->quoteIdentifiers($table);\n $sql = 'PRAGMA table_info(' . $table . ');';\n $key = 'name';\n } elseif ($driver == 'mysql') {\n $table = $this->quoteIdentifiers($table);\n $sql = 'DESCRIBE ' . $table . ';';\n $key = 'Field';\n } else {\n $bind[] = $table;\n $sql = 'SELECT column_name FROM information_schema.columns WHERE ';\n if ($driver == 'pgsql') {\n $bind = explode('.', $table, 2);\n if (count($bind) == 2) {\n $sql .= 'table_schema = ? AND ';\n }\n }\n $sql .= 'table_name = ? ;';\n $key = 'column_name';\n }\n\n $fields = [];\n if (is_array($list = $this->run($sql, $bind, false))) {\n foreach ($list as $record) {\n $fields[] = $record[$key];\n }\n return $fields;\n }\n return $fields;\n }", "title": "" }, { "docid": "990368088db11732f1b5dd995be55dcb", "score": "0.69580704", "text": "function getFields()\n {\n return $this->_impl->getFields();\n }", "title": "" }, { "docid": "ac7c2511f11d4dfb44b99965f3475682", "score": "0.69525915", "text": "protected function getFormFields(): array\n {\n $table = $this->resourceModel->getTable();\n $columns = array_flip(\\Schema::getColumnListing($table));\n $fillable = $this->resourceModel->getFillable();\n\n $columns = array_only($columns, $fillable);\n\n foreach ($columns as $name => $val){\n $columns[$name] = \\DB::connection()->getDoctrineColumn($table, $name)->getType()->getName();\n }\n\n return $columns;\n }", "title": "" }, { "docid": "c7da32275ee3b9d909b93675ed1fd43d", "score": "0.6949384", "text": "public function fields()\n {\n return array();\n }", "title": "" }, { "docid": "142521e658f5ac7bde853fc3c3145eb3", "score": "0.69382924", "text": "function listFields()\n {\n return $this->_impl->listFields();\n }", "title": "" }, { "docid": "0bd9913ceafb7869674500e39c678c3c", "score": "0.6931147", "text": "abstract public function fields();", "title": "" }, { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.6930886", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.6930886", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "cb784583fc50a40bbe716f975fcb6232", "score": "0.6930886", "text": "public function schemaFields() { \n return $this->allFieldsArray;\n }", "title": "" }, { "docid": "0ef3075c8fbe2d2cc4ff734390995e2f", "score": "0.6919914", "text": "public function columnNames($table)\n\t{\n\t\treturn $this->columns($table,self::COLUMN_NAME);\n\t}", "title": "" }, { "docid": "51d0b3ec01275fe922b0c66280c76f6a", "score": "0.69049585", "text": "protected function getFieldsOfTable($tableName)\n {\n $sql = \"SHOW COLUMNS \n FROM \" . $tableName;\n $result = $this->query($sql);\n\n $return = array();\n foreach ($result as $tableColumn)\n {\n $return[$tableColumn->Field] = $tableColumn->Type;\n }\n return $return;\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "6cb43a10e8b782afbed4f765f8a644bb", "score": "0.0", "text": "public function index()\n {\n \treturn Book::paginate(Config::get('app.paginate'));\n }", "title": "" } ]
[ { "docid": "1d35b0b22ac44c3da96756e129561d1e", "score": "0.7596873", "text": "protected function listAction()\n {\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->config['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'));\n\n return $this->render('@EasyAdmin/list.html.twig', array(\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'view' => 'list',\n ));\n }", "title": "" }, { "docid": "0da19d65b0ae22a9a9aea8c7d8f9691e", "score": "0.74184996", "text": "public function listAction()\n { $resources = $this->fetchResourcesAndIiifUrls();\n if (!count($resources)) {\n return $this->jsonError(new NotFoundException, \\Laminas\\Http\\Response::STATUS_CODE_404);\n }\n\n $query = $this->params()->fromQuery();\n $version = $this->requestedVersion();\n $currentUrl = $this->url()->fromRoute(null, [], ['query' => $query, 'force_canonical' => true], true);\n\n $iiifCollectionList = $this->viewHelpers()->get('iiifCollectionList');\n try {\n $manifest = $iiifCollectionList($resources, $version, $currentUrl);\n } catch (\\IiifServer\\Iiif\\Exception\\RuntimeException $e) {\n return $this->jsonError($e, \\Laminas\\Http\\Response::STATUS_CODE_400);\n }\n\n return $this->iiifJsonLd($manifest, $version);\n }", "title": "" }, { "docid": "7f885ee63d7fde5e395eeff7eff36f82", "score": "0.7408405", "text": "public function indexAction()\r\n {\r\n $limit = $this->Request()->getParam('limit', 1000);\r\n $offset = $this->Request()->getParam('start', 0);\r\n $sort = $this->Request()->getParam('sort', []);\r\n $filter = $this->Request()->getParam('filter', []);\r\n\r\n $result = $this->resource->getList($offset, $limit, $filter, $sort);\r\n\r\n $this->View()->assign(['success' => true, 'data' => $result]);\r\n }", "title": "" }, { "docid": "5312faff5fa7125f9c939e21e4cc3413", "score": "0.72905934", "text": "public function listAction() {\n // Handle saving of a create/edit first, so it will reflect in the list\n $this->handleSave();\n\n // Process list now\n $this->headings = $this->getListHeadings();\n\n $rows = array();\n if ($this->module) {\n $res = $this->_getApi()->getList($this->module);\n $rows = $this->getListRows($res);\n }\n\n $this->rows = $rows;\n }", "title": "" }, { "docid": "db3decb51890b80d45fe4f716c97523a", "score": "0.71218187", "text": "public function list() {\n\t\t$this->protectIt( 'read' ); \n\t\tsetTitle( 'Listagem' );\n\t\t\n\t\t// Carrega o grid\n\t\tview( 'grid/grid' );\n\t}", "title": "" }, { "docid": "da70bb19a6c8e0562a0e54373a840197", "score": "0.7119305", "text": "public function index()\n {\n $list = $this->resouce->listResource();\n $tree = Helper::menuTree($list, true);\n $list = Helper::multiArrayToOne($tree);\n $this->setResponse($list);\n return $this->response();\n }", "title": "" }, { "docid": "3ebc7b4fb8651186fc87d5fb5cb8b455", "score": "0.7118158", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('VMBResourceBundle:Resource')->findAllByDate();\n\n return $this->render('VMBResourceBundle:Resource:index.html.twig', array(\n 'mainTitle' => $this->get('translator')->trans('resource.browse'),\n\t\t\t'addButtonUrl' => $this->generateUrl('resource_new'),\n 'entities' => $entities\n ));\n }", "title": "" }, { "docid": "405b6604e6bba890cbf7539c671390f5", "score": "0.70995116", "text": "public function list() {\n return $this->render(\"/sandwich/list.html.twig\");\n }", "title": "" }, { "docid": "8abbd6fc2b8eb9c6981a14c1d833bc3f", "score": "0.7087527", "text": "function list() {\n $data = $this->handler->handleList();\n\n $page = new Page(\"Applicants\", \"Applicants\");\n $page->top();\n\n listView($data);\n\n $page->bottom();\n }", "title": "" }, { "docid": "05a3a1abee5cdb637e4ecb2bed78f793", "score": "0.7044714", "text": "public function index() {\n ${$this->resources} = $this->model->orderBy('created_at', 'DESC')\n ->paginate(Variables::get('items_per_page'));\n\n return view($this->view_path . '.index', compact($this->resources));\n }", "title": "" }, { "docid": "abe6de6ae60572e5912b850a19d1d680", "score": "0.7037733", "text": "public function actionIndex()\r\n {\r\n $searchModel = new ResourceSearch();\r\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\r\n\r\n return $this->render('index', [\r\n 'searchModel' => $searchModel,\r\n 'dataProvider' => $dataProvider,\r\n ]);\r\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70293266", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "6151a50f557e88b87eb8f70be8393002", "score": "0.7028584", "text": "public function index()\n\t{\n\t\t$resources = Resource::latest()->get();\n\t\treturn view('admin.resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "6ebebdc63fae4da7ebeb3b9b7f417cd2", "score": "0.7014356", "text": "public function list()\n\t\t{\n\t\t\tglobal $app;\n\t\t\t$sth = $this->PDO->prepare(\"SELECT * FROM cars\");\n\t\t\t$sth->execute();\n\t\t\t$result = $sth->fetchAll(\\PDO::FETCH_ASSOC);\n\t\t\t$app->render('default.php',[\"data\"=>$result],200); \n\t\t}", "title": "" }, { "docid": "f92d52acde121c57bdf5619d33199871", "score": "0.69987994", "text": "public function index()\n {\n $resources = Resource::all();\n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "03aab1a3d0f29df3c9c01f676da4d986", "score": "0.69908047", "text": "public function index()\n\t{\n\t\t$this->listing('recent');\n\t}", "title": "" }, { "docid": "613162e5b8bb35685ca245a33b184f09", "score": "0.6918154", "text": "public function index()\n {\n $is_paginated = $this->request->query(\\Config::get('resource.type','resource-type'),'paginated') != 'collection';\n $result = $is_paginated ? $this->_indexPaginate() : $this->_indexCollection() ;\n\n $meta = $this->getMeta($this->resource,$result);\n\n return response()->resource($result,$this->getTransformer(),[ 'message' => $this->getMessage('index'), 'meta' => $meta ]);\n }", "title": "" }, { "docid": "79739617940af1c1c53e8d6ecec053f2", "score": "0.69099164", "text": "public function listAction()\n {\n $this->view->pageTitle = \"Document List\";\n \n $service = new App_Service_DocumentService();\n $this->view->docs = $service->getDocuments();\n \n $this->setPartial();\n }", "title": "" }, { "docid": "adb2cfce1206f7acf8cb4580fd08df71", "score": "0.6909121", "text": "public function index()\n {\n return DishResource::collection(Dish::paginate());\n }", "title": "" }, { "docid": "ce9698986cea138f641a36279605e7e0", "score": "0.6898258", "text": "public function index()\n {\n return InfoResource::collection(Resource::paginate(30));\n }", "title": "" }, { "docid": "35b022b0a4b421fcb5624635dcd9fe8f", "score": "0.6869782", "text": "public function _list()\n\t{\n\t\t_root::getRequest()->setAction('list');\n\n\t\t$oDocModel = new model_doc();\n\t\t$tDocs = $oDocModel->findAll();\n\n\t\t$oView = new _view('docs::list');\n\t\t$oView->tDocs = $tDocs;\n\n\t\t$this->oLayout->add('work', $oView);\n\t}", "title": "" }, { "docid": "30eced964887c2aef75a368b0de6cca4", "score": "0.683872", "text": "public function index()\n\t{\n // Set the sistema locale configuration.\n $this->set_locale();\n \n\t\t$this->_template(\"{$this->_controller}/list\", $this->_get_assets('list', $this->data));\n }", "title": "" }, { "docid": "f29709817ec3db2d44ad77fdc0a55269", "score": "0.6829548", "text": "public function _index()\n\t{\n\t\t$this->_list();\n\t}", "title": "" }, { "docid": "a050363540859438f2bfba3e253e49b6", "score": "0.6825998", "text": "public function index()\n {\n //\n $resources = Resource::all();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "2e1081176934c84955413f91a6d6b5aa", "score": "0.6822386", "text": "public function index()\n\t{\n\t\t$listings = $this->listing->all();\n\n\t\treturn View::make('listings.index', compact('listings'));\n\t}", "title": "" }, { "docid": "e39e490f9dd6d2633e939500f416862a", "score": "0.68211234", "text": "protected function listAction()\n {\n return $this->renderForm('list');\n }", "title": "" }, { "docid": "06d2b70f0a929084bcd3d1ce8021741e", "score": "0.6812034", "text": "public function index()\n {\n $resource = Resource::leftjoin('categories', 'resources.resource_category_id', '=', 'categories.category_id')\n ->leftjoin('sub_categories', 'resources.resource_sub_category_id', '=', 'sub_categories.sub_category_id')\n ->leftjoin('sources', 'resources.resource_source_id', '=', 'sources.source_id')\n ->leftjoin('authors', 'resources.resource_author_id', '=', 'authors.author_id')\n ->orderBy('resources.created_at', 'desc')->get();\n\n $view_data = [\n 'resource' => $resource,\n ];\n\n return view('resource.index', $view_data);\n }", "title": "" }, { "docid": "a07e724e196f9b0fd9d1230bd447f5bf", "score": "0.68106884", "text": "public function index()\n {\n return view('backend.resource.index');\n }", "title": "" }, { "docid": "620b35ada66373ffe1f703e36235dc33", "score": "0.68044376", "text": "public function listAction() {\n\t\t$all = $this->users->findAll();\n\t\t$this->views->add('users/list-all', [\n\t\t\t\t'users' => $all, \n\t\t\t\t'title' => \"Visa alla användare\"\n\t\t\t]);\n\t}", "title": "" }, { "docid": "aa8d3c35a6d3df3c02417b793ad19e32", "score": "0.6799941", "text": "public function actionList() {\r\n\t\t$model = $this->model;\r\n\t\t$items = $model->doList($this->paramsArray);\r\n\t\t$fields = true;\r\n\t\tif (isset($this->paramsArray['fields'])) {\r\n\t\t\t$fields = $this->paramsArray['fields'];\r\n\t\t}\r\n\t\t$itemsAr = ActiveRecord::makeArray($items, $fields);\r\n\t\t$this->respond(200, array(\"result\"=>$itemsAr, \"timestamp\"=>time()));\r\n\t}", "title": "" }, { "docid": "796201f21ca0c2d35a132ef98fbfa143", "score": "0.6793618", "text": "public function listAction()\n {\n $this->init(); // TODO: create a controller listener to call it automatically\n\n $polls = $this->pollEntityRepository->findBy(\n array('published' => true, 'closed' => false),\n array('createdAt' => 'DESC')\n );\n\n return $this->render('PrismPollBundle:Frontend\\Poll:list.html.twig', array(\n 'polls' => $polls\n ));\n }", "title": "" }, { "docid": "09027ea66bbe9d5f56484038f519de35", "score": "0.6787082", "text": "public function index()\n {\n return view('visitor.resources.index', [\n 'resources' => $this->resourceService->all()\n ]);\n }", "title": "" }, { "docid": "1b9b93c758b801d7f44b3b35dcb70a84", "score": "0.67787373", "text": "public function index()\n {\n return RedResponse::success(Todo::getListWithPage($this->requestObj));\n }", "title": "" }, { "docid": "06886aeb949a8582132f62e7cd3ac34f", "score": "0.677748", "text": "public function actionList()\n {\n $data=array();\n $looks = new Looks('search');\n $looks->unsetAttributes();\n if ( isset($_GET['Looks']) ) {\n $looks->attributes = $_GET['Looks'];\n }\n \n \t\t$users_all = Users::model()->findAll(\"status=:status\", array(':status'=>Users::STATUS_PUBLISH));\n \t\t$data['users'] = CHtml::listData($users_all, 'id', 'fullNameWithId');\n\n \n $this->render('list', array(\n 'model' => $looks,\n 'data'=>$data,\n )); \n }", "title": "" }, { "docid": "f8555ba3dc23008cd0a0c16a4559a6f8", "score": "0.67767936", "text": "public function showAll() {\n echo json_encode([\"MSG\" => $this->rest->showAll(), \"CODE\" => 200]);\n }", "title": "" }, { "docid": "989e888f453ad4e6aca439789fa4e466", "score": "0.6764753", "text": "public function actionList()\n {\n\t\t//$client->connect();\n\t\t\n\t $request = Yii::$app->request;\n\n\t $page = (!empty($request->get('page'))) ? $request->get('page') : 1;\n\n\t $blogService = new BlogService();\n\t $result = $blogService->getList($page);\n\n\t $pages = new Pagination(['totalCount' => $result['total']]);\n\n return $this->render('list', [\n 'models' => $result['blogs'],\n 'pages' => $pages,\n ]);\n }", "title": "" }, { "docid": "39872964f7d5564e8285c3a9fe12f919", "score": "0.67504454", "text": "function index() {\n $this->addBreadcrumb(lang('List'));\n \n $per_page = 10;\n $page = $this->getPaginationPage();\n \n if (!$this->active_category->isNew()) {\n list($files, $pagination) = Files::paginateByCategory($this->active_category, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } else {\n list($files, $pagination) = Files::paginateByProject($this->active_project, $page, $per_page, STATE_VISIBLE, $this->logged_user->getVisibility());\n } // if\n \n $this->smarty->assign(array(\n 'files' => $files,\n 'pagination' => $pagination,\n 'categories' => Categories::findByModuleSection($this->active_project, 'files', 'files'),\n 'pagination_url' => assemble_url('mobile_access_view_files', array('project_id' => $this->active_project->getId())),\n 'page_back_url' => assemble_url('mobile_access_view_project', array('project_id' => $this->active_project->getId())),\n ));\n }", "title": "" }, { "docid": "92aaa491ca5099382123536e546b9aa3", "score": "0.67480475", "text": "public function listAction()\n {\n $article_manager = $this->getDI()->get(\n 'core_article_manager'\n );\n \n // Sisipkan hasil query/find ke dalam variabel articles\n // Secara default, view yang dipanggil adalah Views/Default/article/list.volt\n $this->view->articles = $article_manager->find();\n }", "title": "" }, { "docid": "782e995121f434d308103646571fa51f", "score": "0.6743787", "text": "public function index()\n {\n return Resource::with('location')\n ->orderBy('name')\n ->get();\n }", "title": "" }, { "docid": "b9bc7c6f98f5ba96d276b3ad631acd74", "score": "0.67292553", "text": "public function index()\n {\n $statuses = Status::paginate(10);\n return StatusResource::collection($statuses);\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "244a81dd1c2b337ec541d21216bf2674", "score": "0.67227656", "text": "public function index(Request $request)\n {\n $this->authorize('list', $this->resourceType);\n\n $search = $request->get('q');\n $order = $request->get('order');\n\n $resources = $this->getRepository()->index($search, $order);\n\n return $this->view('index')\n ->with('type', $this->resourceType)\n ->with('instance', $this->instance)\n ->with('resources', $resources);\n }", "title": "" }, { "docid": "df0d6207611fb7003570319e39a4393e", "score": "0.67204595", "text": "public function index()\n {\n $data = Product::paginate(10);\n\t\treturn ProductResource::Collection($data);\n }", "title": "" }, { "docid": "0d8a9aedf606052ab1459ef7661d1186", "score": "0.6716726", "text": "public function index()\n {\n return ItemResource::collection($this->item->list());\n }", "title": "" }, { "docid": "0d159b9b5426dcb31868b3e360075031", "score": "0.6715198", "text": "public function indexAction() {\n\t\t$perpage = $this->perpage;\n\t\t$page = intval($this->getInput('page'));\n\t\t$title = $this->getInput('title');\n\t\t$status = intval($this->getInput('status'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t$params = array();\n\t\t$search = array();\n\t\tif($title) {\n\t\t\t$search['title'] = $title;\n\t\t\t$params['title'] = array('LIKE', $title);\n\t\t}\n\t\tif($status) {\n\t\t\t$search['status'] = $status;\n\t\t\t$params['status'] = $status - 1;\n\t\t}\n\t\t$params['ad_type'] = $this->ad_type;\n\t list($total, $ads) = Client_Service_Ad::getCanUseAds($page, $perpage, $params);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('ads', $ads);\n\t\t$this->assign('postion', $this->postion);\n\t\t$this->assign('ad_ptype', $this->ad_ptype);\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign(\"total\", $total);\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.67116815", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "1c447ea38f47ee196c9862f06d62be13", "score": "0.66989833", "text": "public function index() {\n // Get all records\n $inventories = Inventory::all();\n // Return a list of inventories as a resource\n return InventoryResource::collection($inventories);\n }", "title": "" }, { "docid": "8232f091751d390d26007fa44c243d15", "score": "0.66985327", "text": "public function ListView()\r\n\t{\r\n\t\t$this->Render();\r\n\t}", "title": "" }, { "docid": "b4a4bae274dd96e096b8b4dd55f07244", "score": "0.6691387", "text": "public function index()\n {\n $listInventory = DB::table('inventory')\n ->join('loker', function ($join) {\n $join->on('inventory.id', '=', 'loker.inventory_id')\n ->where('inventory.status_id', 1);\n })->select('*')->get();\n\n // $listInventory = Inventory::all();\n\n return $this->sendResponse(InventoryResource::collection($listInventory), 'List inventory retrieved successfully.');\n\n // return response(['listInventory' => InventoryResource::collection($listInventory), 'message' => 'Retrieved successfully'], 200);\n\n // return response()->json([\n // 'success' => true,\n // 'message' => 'Inventory List',\n // 'data' => $listInventory\n // ]);\n }", "title": "" }, { "docid": "d22f89e9d6b27f65524503cb66269ec3", "score": "0.6684074", "text": "public function index()\n {\n return StudentResource::collection(Student::paginate());\n }", "title": "" }, { "docid": "d6319a190b91d60006c656ee0a40d758", "score": "0.66839117", "text": "public function index()\n {\n $recipes = Recipe::all();\n return RecipeResource::collection($recipes);\n }", "title": "" }, { "docid": "8c7eaa14947e3fc2a24fd3541c974e98", "score": "0.6681884", "text": "function Index()\r\n\t\t{\r\n\t\t\t$parameters = array('num_rows');\r\n\t\t\t$this->data[$this->name] = $this->controller_model->ListItemsPaged($this->request->get, '', $parameters);\r\n\t\t\t$this->data[num_rows] = $parameters[num_rows];\r\n\t\t}", "title": "" }, { "docid": "dc37386e4ee63037decda6f08247fdd5", "score": "0.6672321", "text": "public function listAction() {\n $id = $this->_getParam('id', null);\n \n $this->view->listname = $id;\n $this->view->tasks = $this->service->getTasksFromList($id);\n }", "title": "" }, { "docid": "145c8599914d7576e7404163ccf8b519", "score": "0.66572666", "text": "public function index()\n {\n $this->data['action_name'] = 'List';\n $this->data['rows'] = $this->crud_model::all();\n return view($this->crud_view . '.index', $this->data);\n }", "title": "" }, { "docid": "0fb116b141476b8f916bb11b2f5f58d7", "score": "0.6649448", "text": "public function index()\n {\n $items = Item::paginate();\n\n return $this->sendResponse(new ItemsCollection($items), 'Items retrieved successfully.');\n }", "title": "" }, { "docid": "e3a22916f65a2ec228b5e3965c154843", "score": "0.6648183", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(20));\n }", "title": "" }, { "docid": "8d187ee99e2e1fd8633cee90820af4b0", "score": "0.6647199", "text": "protected function run_list() {\n\t\treturn $this->render_template($this->get_template(), ['objects' => $this->get_model()->get()]);\n\t}", "title": "" }, { "docid": "22d91bbe1074dab71958a7841af08295", "score": "0.6643972", "text": "public function index()\n {\n $this->global['pageTitle'] = 'List Sparepart - '.APP_NAME;\n $this->global['pageMenu'] = 'List Sparepart';\n $this->global['contentHeader'] = 'List Sparepart';\n $this->global['contentTitle'] = 'List Sparepart';\n $this->global ['role'] = $this->role;\n $this->global ['name'] = $this->name;\n $this->global ['repo'] = $this->repo;\n \n $data['readonly'] = $this->readonly;\n $data['classname'] = $this->cname;\n $data['url_list'] = base_url($this->cname.'/list/json');\n $this->loadViews($this->view_dir.'index', $this->global, $data);\n }", "title": "" }, { "docid": "076caa2f864fc2268b0d4d47a19486ab", "score": "0.66425085", "text": "public function index()\n {\n return ProductResource::collection(\n Product::paginate(10)\n );\n }", "title": "" }, { "docid": "de506437ae33a70184040846dd276c78", "score": "0.66416246", "text": "public function index(Request $request)\n {\n $this->authorize('viewList', $this->getResourceModel());\n\n $paginatorData = [];\n $perPage = (int) $request->input('per_page', '');\n $perPage = (is_numeric($perPage) && $perPage > 0 && $perPage <= 100) ? $perPage : 15;\n if ($perPage != 15) {\n $paginatorData['per_page'] = $perPage;\n }\n $search = trim($request->input('search', ''));\n if (! empty($search)) {\n $paginatorData['search'] = $search;\n }\n $records = $this->getSearchRecords($request, $perPage, $search);\n $records->appends($paginatorData);\n\n return view($this->filterIndexView('_resources.index'), $this->filterSearchViewData($request, [\n 'records' => $records,\n 'search' => $search,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n 'perPage' => $perPage,\n ]));\n }", "title": "" }, { "docid": "30e45406c5ee243e6ad94d1aa4cbe67f", "score": "0.66305417", "text": "public function listAction()\n {\n $this->_helper->viewRenderer->setViewSuffix('txt');\n\n $model = new Default_Model_Action();\n $this->view->actions = $model->getAll();\n }", "title": "" }, { "docid": "d0295a3d33fcd89a347becc0a34dbe5c", "score": "0.6626129", "text": "public function index()\n {\n $specializations = Specialization::latest()->paginate(25);\n\n return SpecializationResource::collection($specializations);\n }", "title": "" }, { "docid": "25325ea5baf58fda0bdae7e51324bdd3", "score": "0.6625245", "text": "public function index()\n {\n //get tasks\n $tasks = Task::orderBy('id', 'asc')->paginate(100);\n\n //return the collection of tasks as a resource\n return TaskResource::collection($tasks);\n\n }", "title": "" }, { "docid": "0b40c32743cbb461753992a4b05fa545", "score": "0.662055", "text": "public function showlist()\n \t{\n \t\t$items = Item::all();\n \t\treturn view('item.list',array('items'=>$items,'page'=>'list'));\n \t}", "title": "" }, { "docid": "8e7a175a1d69fc1e276dbd290552b522", "score": "0.66002595", "text": "public function list(){\n\t\t$this->current->list();\n\t}", "title": "" }, { "docid": "5071a61b8379d3dbc27c9379480e9a8c", "score": "0.6599687", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int)$this->param($this->view->translate('page'), 1);\n $propertyId = (int)$this->param($this->view->translate('propertyId'));\n $properties =$this->service\n ->retrieveAllPicturesByPropertyId($propertyId, $page);\n $this->view->pictures = $properties;\n $this->view->paginator = $this->service->getPaginator($page);\n $this->view->propertyId = $propertyId;\n }", "title": "" }, { "docid": "8aabf1b98b72ec9ef7738f5deae5172d", "score": "0.65963185", "text": "public function index()\n {\n return EntryResource::collection(Entry::all());\n //return AnswersResource::collection(Answer::all());\n }", "title": "" }, { "docid": "726d3e7e355e4d0b3bbadd1f2237a742", "score": "0.65945095", "text": "public function overviewAction()\n\t{\n\t\t$subSiteKey = '*';\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$subSiteKey = Site::getCurrentSite()->getRootDocument()->getKey();\n\t\t}\n\t\t$language = $this->language;\n\n\t\t// Retrieve items from object list\n\t\t$newsList = new Object_Vacancy_List();\n\t\t$newsList->setOrderKey(\"date\");\n\t\t$newsList->setOrder(\"desc\");\n\t\t$newsList->setLocale($language);\n\t\tif (Site::isSiteRequest()) {\n\t\t\t$newsList->setCondition('subsites LIKE ? AND title != \"\"', '%' . $subSiteKey . '%');\n\t\t}\n\n\t\t$paginator = Zend_Paginator::factory($newsList);\n\t\t$paginator->setCurrentPageNumber($this->_getParam('page', 1));\n\t\t$paginator->setItemCountPerPage(10);\n\t\t$this->view->paginator = $paginator;\n\t}", "title": "" }, { "docid": "110b54105de1a0ec45cec206dbc35c67", "score": "0.65845126", "text": "public function index()\n {\n // needs to return multiple articles\n // so we use the collection method\n return TaskListResource::collection(Task::all());\n }", "title": "" }, { "docid": "8668ccc17814e06acdd730ecc3fa0dd2", "score": "0.65773076", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\tlist($total, $result) = Activity_Service_Fanli::getList($page, $perpage);\r\n\t\t\r\n\t\t$this->assign('result', $result);\r\n\t\t$this->cookieParams();\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl']));\r\n\t}", "title": "" }, { "docid": "b81dd94e271b0c84cd548a81ec7d984f", "score": "0.6575219", "text": "public function listAction()\n {\n if ($this->settings['listtype'] === 'x') {\n $projects = $this->projectRepostitory->findAll();\n } else {\n $projects = $this->projectRepostitory->findByStatus($this->settings['listtype']);\n }\n\n $this->view->assign('projects', $projects);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "bf0537679d083764e7d496b7e9f333b7", "score": "0.6550873", "text": "public function index(): View\n {\n $items = QueryBuilder::for(Resource::class)\n ->allowedFilters([\n 'name',\n 'is_facility',\n 'categories.id',\n 'groups.id',\n AllowedFilter::scope('flags', 'currentStatus'),\n ])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n $filterCategories = Category::orderBy('name')->pluck('name', 'id');\n $filterGroups = Group::orderBy('name')->pluck('name', 'id');\n $filterFlags = Flag::pluck('name', 'abbr');\n\n return view('resources.index')->with(compact([\n 'items',\n 'filterCategories',\n 'filterGroups',\n 'filterFlags',\n ]));\n }", "title": "" }, { "docid": "3cf2644fce763701f59cab74b93915e2", "score": "0.6540747", "text": "public function indexAction() {\n\t\t$request = $this->getRequest();\n\t\t$params = $request->getParams();\n\n\t\t$list = new List8D_Model_List;\n\t\t$list = $list->getById(1);\n\t\t\n\t\t$acl = new List8D_ACL;\n\t\t$this->view->list = $list;\n\t\t$this->view->aclresult = $acl->checkListACL($list);\n\n\t}", "title": "" }, { "docid": "ed961c9f0fcb9ad07a48b882d9df24ad", "score": "0.65403396", "text": "public function index()\n\t{\n\t\t$subResourceDetailLikes = $this->subResourceDetailLikeRepository->paginate(10);\n\n\t\treturn view('subResourceDetailLikes.index')\n\t\t\t->with('subResourceDetailLikes', $subResourceDetailLikes);\n\t}", "title": "" }, { "docid": "f1ecf3ea6ca691d8230bfd5de1a0c2bc", "score": "0.6537993", "text": "public function index()\n\t{\n\t\t$view = $this->start_view($this->section_url.'/be/list');\n\t\t\n\t\t// Type\n\t\tif($this->input->get('type') !== false && array_key_exists($this->input->get('type'),Kohana::config('example_3.types'))){\n\t\t\t$type = $this->input->get('type');\n\t\t} else {\n\t\t\t$type = 1;\n\t\t}\n\t\t\n\t\tlist($pagination, $data) = $this->list_data($type);\n\t\t\n\t\t$view->set_global('data', $data);\n\t\t$view->set_global('pagination', $pagination);\n\t\t\n\t\t// Set general info\n\t\t$view->set_global($this->section_details());\n\t\t\n\t\t// Type tab override\n\t\t$view->set_global('active_tab',$type);\n\t\t\n\t\t// Set Breadcrumb items\n\t\t$view->breadcrumbs = array(\n\t\t\t$this->section_url => $this->section_name,\n\t\t\t'' => 'Listing'\n\t\t);\n\t\t\n\t\t$this->render_view($view);\n\t}", "title": "" }, { "docid": "14cbe87d366063edc7062faf79058bc0", "score": "0.6533205", "text": "public function index()\n {\n return $this->response->paginator(Viewer::orderBy('id', 'desc')->paginate(10), new ViewerTransformer);\n }", "title": "" }, { "docid": "a29a971d51fcb42465841db6bd2a38ad", "score": "0.6532911", "text": "public function viewList() {\n\n\t\t$context = (isset($this->options['list_type'])) ? $this->options['list_type'] : 'list';\n\n\t\telgg_push_context($context);\n\n\t\t$items = $this->getItems();\n\t\t$options = $this->getOptions();\n\t\t$count = $this->getCount();\n\n\t\t$offset = elgg_extract('offset', $options);\n\t\t$limit = elgg_extract('limit', $options);\n\t\t$base_url = elgg_extract('base_url', $options, '');\n\t\t$pagination = elgg_extract('pagination', $options, true);\n\t\t$offset_key = elgg_extract('offset_key', $options, 'offset');\n\t\t$position = elgg_extract('position', $options, 'after');\n\n\t\tif ($pagination && $count) {\n\t\t\t$nav = elgg_view('navigation/pagination', array(\n\t\t\t\t'base_url' => $base_url,\n\t\t\t\t'offset' => $offset,\n\t\t\t\t'count' => $count,\n\t\t\t\t'limit' => $limit,\n\t\t\t\t'offset_key' => $offset_key,\n\t\t\t));\n\t\t}\n\n\t\t$html .= '<div class=\"elgg-list-container\">';\n\n\t\tif ($position == 'before' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$list_attrs = elgg_format_attributes($this->getListAttributes());\n\n\t\t$html .= \"<ul $list_attrs>\";\n\n\t\tforeach ($items as $item) {\n\n\t\t\t$view = elgg_view_list_item($item, $options);\n\n\t\t\tif (!$view) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$has_items = true;\n\n\t\t\t$item_attrs = elgg_format_attributes($this->getItemAttributes($item));\n\n\t\t\t$html .= \"<li $item_attrs>$view</li>\";\n\t\t}\n\n\t\tif (!$has_items) {\n\t\t\t$html .= '<li class=\"elgg-list-placeholder\">' . elgg_echo('list:empty') . '</li>';\n\t\t}\n\n\t\t$html .= '</ul>';\n\n\t\tif ($position == 'after' || $position == 'both') {\n\t\t\t$html .= $nav;\n\t\t}\n\n\t\t$html .= '</div>';\n\n\t\telgg_pop_context();\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "f1673a17c984cf24b6d574aa7a325e35", "score": "0.65327483", "text": "public function index()\n {\n return FlightResource::collection(Flight::paginate(15));\n }", "title": "" }, { "docid": "eb4bc3428c5096a035b8d71351d4f9c3", "score": "0.6529615", "text": "public function index()\n {\n //\n $units = Unit::paginate(10);\n return UnitResource::collection($units);\n }", "title": "" }, { "docid": "1e991a3059ff8a7aa8b4543e6d5ec071", "score": "0.652604", "text": "public function index()\n {\n $data['resources'] = CarModel::paginate($this->paginate_by);\n return view($this->base_view_path.'index', $data);\n }", "title": "" }, { "docid": "0aefb1879ed86536b4b0301bdcb431fb", "score": "0.65217865", "text": "public function indexAction() {\r\n\t\t$page = intval($this->getInput('page'));\r\n\t\t$ad_type = $this->getInput('ad_type');\r\n\t\t\r\n\t\t$perpage = $this->perpage;\r\n\t\t\r\n\t\t$search = array();\r\n\t\tif ($ad_type) $search['ad_type'] = $ad_type;\r\n\t\tlist($total, $ads) = Gou_Service_Ad::getList($page, $perpage, $search);\r\n\t\t$this->assign('ad_types', $this->ad_types);\r\n\t\t\r\n\t\t$this->assign('search', $search);\r\n\t\t$this->assign('ads', $ads);\r\n\t\t$this->cookieParams();\r\n\t\t$url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\r\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\r\n\t}", "title": "" }, { "docid": "f504aa8b0d4e26dbe40f10d29efd07da", "score": "0.6520624", "text": "public function index()\n {\n return $this->collection(\n $this->repository->all()\n );\n }", "title": "" }, { "docid": "84219766af32e7ff206e88dffca57430", "score": "0.65162116", "text": "public function index()\n {\n try {\n return $this->resp->ok(eRespCode::CAT_LISTED_200_00, new CategoryResourceCollection($this->categoryService->getAll()));\n } catch (Throwable $th) {\n Log::info($th);\n return $this->resp->guessResponse(eRespCode::_500_INTERNAL_ERROR);\n }\n }", "title": "" }, { "docid": "5439447ac88f8cc98dc7832990b07305", "score": "0.65154237", "text": "public function indexAction()\n {\n $this->display();\n\n }", "title": "" }, { "docid": "e1183ebde99a8d3c589ddd34164e88f0", "score": "0.65118366", "text": "public function index() {\n\t\t$this->all();\n\t}", "title": "" }, { "docid": "93a7ba35330c263ce449589f25157263", "score": "0.65116036", "text": "public function index()\n {\n $todos = Todo::latest()->get();\n return (new TodoResourceCollection($todos));\n }", "title": "" }, { "docid": "2277c0665c4148cb55e2e8ca37774962", "score": "0.6510777", "text": "public function index()\n {\n return ProductResource::collection(Product::paginate(20));\n }", "title": "" }, { "docid": "b04a0cb3fd073d7067244a0fe69ce396", "score": "0.65095365", "text": "public function index()\n {\n //get movies\n $movies = MoviesModel::paginate(10);\n\n //return collection of article as a resource\n return MoviesResource::collection($movies);\n }", "title": "" }, { "docid": "021eb06ebdab9fb37e6b65a67751a381", "score": "0.64975077", "text": "public function listData()\n {\n $catalog = DB::table($this->screen)->where('IsActive', '1')->paginate(15);\n\n $data['catalog'] = $catalog;\n return view('catalog.index', $data);\n }", "title": "" }, { "docid": "cbfc279e9e82aba8cb2814815737b9eb", "score": "0.64964104", "text": "public function listAction() {\n $users = $this->userRepository->findAll();\n $this->view->assign('users', $users);\n $this->view->render();\n }", "title": "" }, { "docid": "c0ac6b16fca466eabec5fae9f571583e", "score": "0.64929396", "text": "public function actionList() {\n\t\t$id = isset($_GET['id'])? $_GET['id'] : 'all';\n\n\t\tif(is_numeric($id))\n\t\t\t$list = CActiveRecord::model('X2List')->findByPk($id);\n\t\t\t\n\t\tif(isset($list)) {\n\t\t\t$model = new Contacts('search');\n\t\t\t$model->setRememberScenario('contacts-list-'.$id);\n\t\t\t//set this as the list we are viewing, for use by vcr controls\n\t\t\tYii::app()->user->setState('contacts-list', $id);\n\t\t\t$dataProvider = $model->searchList($id);\n\t\t\t$list->count = $dataProvider->totalItemCount;\n\t\t\t$list->save();\n\t\t\t\n\t\t\t$this->render('list',array(\n\t\t\t\t'listModel'=>$list,\n\t\t\t\t// 'listName'=>$list->name,\n\t\t\t\t// 'listId'=>$id,\n\t\t\t\t'dataProvider'=>$dataProvider,\n\t\t\t\t'model'=>$model,\n\t\t\t));\n\t\t\t\n\t\t} else {\n\t\t\tif($id == 'my')\n\t\t\t\t$this->redirect(array('/contacts/myContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telseif($id == 'new')\n\t\t\t\t$this->redirect(array('/contacts/newContacts'));\n\t\t\t\t// $dataProvider = CActiveRecord::model('Contacts')->searchAll();\n\t\t\telse\n\t\t\t\t$this->redirect(array('/contacts/allContacts'));\n\t\t}\n\t}", "title": "" }, { "docid": "005629388e14797f6fdbc0ea8785e7ac", "score": "0.64864695", "text": "public function index()\n {\n $Products = products::orderby('created_at','desc')->paginate(40);\n return ProductsResource::collection($Products);\n }", "title": "" }, { "docid": "3e2e5ecfe76abe9cd2482096fab1fab6", "score": "0.64849615", "text": "public function index()\n {\n //\n $response = $this->rest->all();\n return $this->response(\n \"Menus Successfully Fetched.\",\n $response,\n Response::HTTP_OK\n );\n }", "title": "" }, { "docid": "837955b2fe169580b5216e269f283ee3", "score": "0.64833194", "text": "public function listAction()\n {\n $data = $this->getDm()->getRepository('AcmeDemoBundle:Widget')->findAll();\n $widgets = array();\n foreach($data as $v) {\n $widgets[] = $v;\n }\n\n $view = View::create(array('vendors' => $widgets));\n $view->setTemplate('AcmeDemoBundle:Widgets:list.html.twig');\n $view->setData(array('widgets' => $widgets));\n\n return $this->get('fos_rest.view_handler')->handle($view); \n }", "title": "" } ]
b42f7a3ca1d9d3144ff8896175bbfd06
Closes a database connection or terminates program on error.
[ { "docid": "6e7f6e24120f31903e1290c671215cf1", "score": "0.0", "text": "function close_db_connection($db_conn) {\n\t$result = mysqli_close($db_conn);\n\n\tif (!$result) {\n\t\tfatal_error();\n\t};\n\n\t// successfully closed connection\n\treturn true;\n}", "title": "" } ]
[ { "docid": "112c831cb4d5074eae55a8dc0c6512d3", "score": "0.72915983", "text": "public function db_close()\r\n\t{\r\n\t\tif (isset($this->conn)) {\r\n\t\t\t$this->conn = null;\r\n\t\t\tunset($this->conn);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "927866e3e81fed018ff869ce6e83b5cf", "score": "0.71958977", "text": "public function close() {\r\n\t\t\t$result = mysql_close($this->connection_id);\r\n\t\t\tif(!$result) {\r\n\t\t\t\tthrow new DatabaseConnectionException('Could not close database connection #' . $this->connection_id);\r\n\t\t\t}\r\n\t\t}", "title": "" }, { "docid": "49b72f04fcccc12dfb78bbd184fca639", "score": "0.7142897", "text": "public static function closeConnection()\n\t{\n\t\tif( isset( self::$DBH ) )\n\t\t\tself::$DBH = null;\n\t\t\n\t\t# Method End\n\t}", "title": "" }, { "docid": "af4755205212f60e59090a5105f62a6c", "score": "0.70902485", "text": "public function dbClose() {\r\n\t\t//in PDO assigning null to the connection object closes the connection\r\n\t\t$this->dbConn = null;\r\n\t}", "title": "" }, { "docid": "d6ab664b037429282a58ca617e9fb10b", "score": "0.70672727", "text": "public function close()\n {\n pg_close($this->dbConn);\n }", "title": "" }, { "docid": "6ae3ff97eefed455cccb48e9971b6c51", "score": "0.70440483", "text": "public static function closeConnection() {\n unset($dbConn);\n }", "title": "" }, { "docid": "c31210a33e5353a698e6c1f9228e1dbf", "score": "0.70429647", "text": "public function close_db();", "title": "" }, { "docid": "98b809a005931f1224d663c89f2ee2a2", "score": "0.70393276", "text": "public function closeConnection()\r\n {\r\n $this->_db = NULL;\r\n }", "title": "" }, { "docid": "ea500fd1399cf05d0a712b20926bd9d5", "score": "0.7008355", "text": "public function DBClose()\n\t{\n\t\ttry \n\t\t{\n\t\t\tif($this->Connection){\n\t\t\t\tif(!$this->Connection->close()){\n\t\t\t\t\t$this->ErrorMessage = 'Database Connection was NULL... ';\n\t\t\t\t\tthrow new DataBaseException();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn; // for whatever reason - sometimes the connection is null.... forget about it!\t\t\t\n\t\t}\n\t\tcatch(DataBaseException $e)\n\t\t{\n\t\t\t\t$this->ErrorMessage .= 'Could not close the database: ';\n\t\t\t\t$this->ErrorMessage .= mysql_error();\n\t\t\t\t$this->Error = 2;\t\n\t\t\t\techo $e->errorMessage($this->ErrorMessage, $this->Error);\n\t\t}\n\t}", "title": "" }, { "docid": "ea500fd1399cf05d0a712b20926bd9d5", "score": "0.7008355", "text": "public function DBClose()\n\t{\n\t\ttry \n\t\t{\n\t\t\tif($this->Connection){\n\t\t\t\tif(!$this->Connection->close()){\n\t\t\t\t\t$this->ErrorMessage = 'Database Connection was NULL... ';\n\t\t\t\t\tthrow new DataBaseException();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\treturn; // for whatever reason - sometimes the connection is null.... forget about it!\t\t\t\n\t\t}\n\t\tcatch(DataBaseException $e)\n\t\t{\n\t\t\t\t$this->ErrorMessage .= 'Could not close the database: ';\n\t\t\t\t$this->ErrorMessage .= mysql_error();\n\t\t\t\t$this->Error = 2;\t\n\t\t\t\techo $e->errorMessage($this->ErrorMessage, $this->Error);\n\t\t}\n\t}", "title": "" }, { "docid": "e6fcb94f1291bca81ffced272026b592", "score": "0.70039326", "text": "public function closeDbConnection()\n {\n if (!is_null($this->dbh)) {\n mysqli_close($this->dbh);\n $this->dbh = null;\n }\n }", "title": "" }, { "docid": "824af1dae727c0ef5248ec42ea8054e3", "score": "0.69935703", "text": "public function db_disconnect() {\n\t\t$conn = $this->conn;\n\t\tif(!is_null($conn)) {\n\n\t\t\tif($this->rdbms == 'MYSQLi') {\n\t\t\t\t$conn->close();\n\t\t\t}\n\t\t\tif($this->rdbms == 'POSTGRES') {\n\t\t\t\tpg_close($conn);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "14fdd40c519326e1e707de417a226915", "score": "0.6988872", "text": "public function close() {\n\t\t$this->dbh = null;\n\t}", "title": "" }, { "docid": "e50858f8a377e77086f4ccde37516c37", "score": "0.69682664", "text": "public function DBClose() {\n $this->db_conn->disconnect();\n }", "title": "" }, { "docid": "6ecd85e59c05a4e50e69a9f40c8015cf", "score": "0.6966266", "text": "static public function close_db() {\n\t\tif (self::$db_link) :\n\t\t\tmysql_close(self::$db_link);\n\t\tendif;\n\t}", "title": "" }, { "docid": "c6687304c54d3d7675ba38d3db30b441", "score": "0.6934646", "text": "public function close() {\r\n\t\tif (! isset ( $this->db )) {\r\n\t\t\t// Close the database\r\n\t\t\t$this->db->close ();\r\n\t\t}\r\n\t\treturn;\r\n\t}", "title": "" }, { "docid": "7d7154bc21cae25be56e6102fb169e93", "score": "0.6932774", "text": "function db_close(array $options = array()) {\n if (empty($options['target'])) {\n $options['target'] = NULL;\n }\n Database::closeConnection($options['target']);\n}", "title": "" }, { "docid": "71871b9c84055fcc3e0c85166e6b2bfa", "score": "0.69191957", "text": "public function close()\n\t{\n\t\t$this->database->disconnect();\n\t}", "title": "" }, { "docid": "6723d70e24a143cb6b846ecfc7833fde", "score": "0.6913912", "text": "public function closeConnection()\n\t{\n\t\techo \"\\nclosing connection\\n\";\n\t\t$this->db->close(); \n\t\techo \"\\nconnection closed\\n\";\n\t}", "title": "" }, { "docid": "4f6841f50c03581d7243bf49efadacd4", "score": "0.6913074", "text": "protected function exit()\n {\n $this->db->closeConnection();\n }", "title": "" }, { "docid": "faf2bbda23c46a3ff2deaa3ce0e3fc1f", "score": "0.6907387", "text": "final public function terminaConnessioneDB()\r\n {\r\n //clean up, chiusura della connessione \r\n $this->_connessione->close();\r\n }", "title": "" }, { "docid": "55419ec20eb4007166c5b0c6cd0b5e50", "score": "0.68949616", "text": "function db_close() {\r\n global $db_link;\r\n\r\n /* Close if already connected */\r\n if($db_link != null) {\r\n $db_link->close();\r\n $db_link = null;\r\n\r\n } \r\n }", "title": "" }, { "docid": "8945e23be737c687ef193950eb8e4075", "score": "0.6873476", "text": "public function close(){\r\n\t\tif( $this->isOpen() ){\r\n\t\t\t$this->db->close();\r\n\t\t\t$this->db = null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "e9ac20f976d94ae6459481352cc4551b", "score": "0.6862978", "text": "public function close()\n\t{\n\t\t$this->dbConnection->close();\n\t}", "title": "" }, { "docid": "5a1eac165109a415206242f99712bacc", "score": "0.6844631", "text": "private function closeDB() {\n if(isset($this->_conn)) {\n $this->_conn = null;\n $this->_isDbOpen = false;\n }\n }", "title": "" }, { "docid": "f174b38df533cd934f32c027b7fe6bb7", "score": "0.68287694", "text": "public function closeConnection() {\n unset($this->dbConn);\n }", "title": "" }, { "docid": "47504b9eb8529937c891bb8056f133f5", "score": "0.682807", "text": "public function close() {\n\t\t$this->db = null;\n\t}", "title": "" }, { "docid": "e851b0fd821725bee06ddce6c8ef8528", "score": "0.68245107", "text": "function db_close($con)\n {\n runDebug(__FILE__, __FUNCTION__, __LINE__, 'This DB is now closed. You don\\'t have to go home, but you can\\'t stay here.', 2);\n $discdb = mysql_close($con) or trigger_error('Couldn\\'t close the DB. Error = ' . mysql_error());\n }", "title": "" }, { "docid": "0d1ce6aedd8468eb643378b04d9579ba", "score": "0.68221635", "text": "public function closeDB()\n {\n $this->connObject=null;\n }", "title": "" }, { "docid": "b78e94f21090fed1ccee9ba1508a9765", "score": "0.67979556", "text": "public function close_db() {\n\n if( $this->_db_connection ) {\n mysqli_close( $this->_db_connection );\n $this->_db_connection = FALSE;\n }\n }", "title": "" }, { "docid": "7bd64c0a5dcbb838fc0fc5be47bc0046", "score": "0.6789254", "text": "public function disconnect()\n {\n try {\n if ($this->valid()) {\n $this->db->close();\n }\n } catch (\\Exception $e) {\n\n } finally {\n $this->close = true;\n unset($this->db);\n $this->db = null;\n }\n }", "title": "" }, { "docid": "f5ed60c35428713c2a83073e725c2ca3", "score": "0.6779903", "text": "public function closeConn()\n {\n $this->dbh = null;\n }", "title": "" }, { "docid": "411419edaef539999ed5f67014f7baa9", "score": "0.6746329", "text": "function close() {\n // closing db connection\n $this->db = null;\n }", "title": "" }, { "docid": "822e608a3aa8d9af21545c1035bdd0c9", "score": "0.6745299", "text": "public function close(): void\n {\n if ($this->master) {\n if ($this->pdo === $this->master->getPDO()) {\n $this->pdo = null;\n }\n\n $this->master->close();\n\n $this->master = null;\n }\n\n if ($this->pdo !== null) {\n if ($this->enableLogging) {\n $this->logger->log(LogLevel::DEBUG, 'Closing DB connection: ' . $this->dsn . ' ' . __METHOD__);\n }\n\n $this->pdo = null;\n $this->schema = null;\n $this->transaction = null;\n }\n\n if ($this->slave) {\n $this->slave->close();\n $this->slave = null;\n }\n }", "title": "" }, { "docid": "559e98c4e6ca9b31e9240f1788d20d08", "score": "0.67337203", "text": "public static function DBClose(&$connection)\n {\n if(!is_null($connection))\n {\n db2_close($connection);\n }\n }", "title": "" }, { "docid": "6b0cfe2d24c414ab1b6529f846043235", "score": "0.67164636", "text": "public function closeConnection()\n\t{\n\t\t$this->db->CloseConnection();\n\t}", "title": "" }, { "docid": "e8f7f0f2a78f23b23f9a6c62aa427a71", "score": "0.67158735", "text": "public function disconnect()\n {\n try {\n if ($this->valid()) {\n $this->db->close();\n }\n } catch (\\Exception $e) {\n\n } finally {\n unset($this->db);\n $this->db = null;\n }\n }", "title": "" }, { "docid": "5c8a1f1f1a3da4d0ac4dd5123d027987", "score": "0.6695691", "text": "public function close() {\n\t\t\t// Tur: SQL sunucusuna bağlantıyı kapatır.\n\t\t\t$this->error = false;\n\t\t\t$this->error_msg = null;\n\n\t\t\tif ($this->dbtype == 'mysqli') {\n\t\t\t\t@$this->conn->close();\n\t\t\t}\n\t\t\telseif ($this->dbtype == 'mysql') {\n\t\t\t\t@mysql_close($this->conn);\n\t\t\t}\n\t\t\telseif ($this->dbtype == 'pdo_mysql') {\n\t\t\t\t$this->conn = null;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->error = true;\n\t\t\t\t$this->error_msg = $this->show_msg('Database Type ( '.$this->dbtype.' ) not supported.');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "dc8f1721d174b49be9b218e8b0801459", "score": "0.6688687", "text": "function closeDB() {\n pg_close($this->conn);\n }", "title": "" }, { "docid": "4df01294a652a6ebc3e8f417b4342096", "score": "0.6674857", "text": "public function closeDb($identifier)\n {\n if (isset($this->dbConnections[$identifier]))\n {\n $this->dbConnections[$identifier]->close();\n unset($this->dbConnections[$identifier]);\n }\n }", "title": "" }, { "docid": "e26897b82d85e64e0c4fd58a50603b23", "score": "0.6670675", "text": "public function dbClose(){\n $this->connection->close();\n }", "title": "" }, { "docid": "bc141c284e080897d569bce5db1ffff2", "score": "0.6667099", "text": "public function disconnect() {\n @$this->db_conn->close();\n }", "title": "" }, { "docid": "2f9fa4c427e7dcd420f427fff365b29d", "score": "0.66587853", "text": "public function dbDisconnect()\r\n\t{\r\n\t\tif($this->connection == true)\r\n\t\t{\r\n\t\t\t$this->connection->close();\r\n\t\t\tunset($this->connection);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3a78ee283b7a6fab66c71c45fea5cd42", "score": "0.6654109", "text": "public static function disconnect() {\n if (self::$db) :\n mysqli_close(self::$db);\n self::$db = null;\n endif;\n }", "title": "" }, { "docid": "6e5e06346b8983201032ed0ffe143820", "score": "0.6642662", "text": "private function closeDBConnection()\n {\n $this->connection = null;\n }", "title": "" }, { "docid": "059892e13b0bdee21d01a3d1fb2aa192", "score": "0.6640752", "text": "public function closeConnection() {\r\n\t\t$this -> connections[$this -> activeConnection] -> close();\r\n\t}", "title": "" }, { "docid": "8c8f80ab461b420102fff34106099efb", "score": "0.6625956", "text": "public function closeDB()\n {\n mysqli_close($this->datab);\n }", "title": "" }, { "docid": "5859950cbd14df9f694ea4dc328f7c64", "score": "0.6625282", "text": "function close_db($conn) { \n\t\t/** PDO Close Connection **/\n\t\ttry {\n\t\t\t$conn = null;\n\t\t} catch (Exception $e) { \n\t\t\techo $e->getMessage(); \n\t\t}\n\t\t\n\t\t/** MySQLi Object-Oriented \n\t\ttry { \n\t\t\t$conn->close(); \n\t\t} catch (Exception $e) { \n\t\t\techo $e->getMessage(); \n\t\t} \n\t\t**/\n\t}", "title": "" }, { "docid": "82673738ab6f6c4ef86d7f4c7c477e27", "score": "0.66252345", "text": "function close() {\r\n // closing db connection\r\n oci_close($con);\r\n }", "title": "" }, { "docid": "b870eb3295037aff200465f04356eb82", "score": "0.662289", "text": "function bx_db_close () {\n global $db_link;\n if ( strcmp ( DB_SERVER_TYPE, \"mysql\" ) == 0 ) {\n return @mysql_close ( $db_link );\n } else if ( strcmp ( DB_SERVER_TYPE, \"oracle\" ) == 0 ) {\n return OCILogOff ( $db_link );\n } else if ( strcmp ( DB_SERVER_TYPE, \"postgresql\" ) == 0 ) {\n return pg_close ( $GLOBALS[\"postgresql_connection\"] );\n } else if ( strcmp ( DB_SERVER_TYPE, \"odbc\" ) == 0 ) {\n return odbc_close ( $GLOBALS[\"odbc_connection\"] );\n } else {\n bx_db_fatal_error ( \"dbi_close(): db_type not defined.\" );\n }\n\n}", "title": "" }, { "docid": "c56cdb6adfb23a032e1fee84deff9634", "score": "0.6610635", "text": "private function close()\n {\n if ($this->_db != NULL)\n {\n mysqli_close($this->_db);\n }\n }", "title": "" }, { "docid": "5b900fbae994afb8c1d8154ad051c1ac", "score": "0.659959", "text": "function closeDB()\n {\n $this->connection->close();\n }", "title": "" }, { "docid": "f8b54f5312b61d2a3ee5bf410f8d4594", "score": "0.65971726", "text": "function close() {\n $this->dbc->close();\n }", "title": "" }, { "docid": "1ac609bcd68b78bc30ea88e4ec83a77e", "score": "0.65884537", "text": "public function close()\n {\n $this->_pipeline = false;\n $this->_pipeline_order = [];\n\n foreach ($this->_storage as $i => &$conn) {\n $this->_socket = &$conn;\n if ($this->_socket !== false) {\n $connection = $this->hostname[$i] . ':' . $this->port[$i] . ', database=' . $this->database[$i];\n $this->logger('Closing DB connection: ' . $connection, __METHOD__);\n try {\n $this->executeCommand('QUIT');\n } catch (RedisShardsException $e) {\n // ignore errors when quitting a closed connection\n }\n fclose($this->_socket);\n $this->_socket = false;\n $this->_storage[$i] = false;\n }\n }\n }", "title": "" }, { "docid": "4103dc555fff11155ca1b7999b0d0939", "score": "0.65858287", "text": "public function close(){\n\t\tif(!@mysql_close($this->link_id)){\n\t $this->oops(\"Connection close failed.\");\n\t }\n\t}", "title": "" }, { "docid": "b5a60d00af35631bbb7f79b176584582", "score": "0.65778047", "text": "public function dbClose() \n { \n @mysqli_close($this->db_link); \n }", "title": "" }, { "docid": "9f5974690b160b5710035d398ccf2388", "score": "0.6556088", "text": "public function close()\n {\n self::$db = null;\n }", "title": "" }, { "docid": "ace13837a7e27a836e251ab5e366af36", "score": "0.6541203", "text": "protected function CloseConn()\n \t{\n\t\t$this->DbConn->close();\n\t\tlog_info(\"info\",\"connection closed[ Db ~ Query [db:\".$this->DbName.\"] --- \".__FILE__.\"::\".__LINE__.\"::---- ]\");\t\n\n\t}", "title": "" }, { "docid": "89f1f34e1f4385bf67ec250369c85d45", "score": "0.6539985", "text": "function db_close() {\n global $db;\n $db->close();\n }", "title": "" }, { "docid": "c336cef8de8eb5209adeac8f98d5964b", "score": "0.6538764", "text": "private function disconnect()\n {\n pg_close($this->dbconn);\n }", "title": "" }, { "docid": "a319d00ab80aa000ab86b6e5217cb22c", "score": "0.65375245", "text": "public function dbclose()\r\n\t{\r\n\t\tmysqli_kill($this->mysqli,$this->mysqli->thread_id);\r\n\t\tmysqli_close($this->mysqli);\r\n\t}", "title": "" }, { "docid": "206ea39a7d1ceded0e01276dbe986b14", "score": "0.6532272", "text": "protected function close()\n\t{\n\t\tYii::trace('Closing DB connection','system.db.CDbConnection');\n\t\t$this->_pdo=null;\n\t\t$this->_active=false;\n\t\t$this->_schema=null;\n\t}", "title": "" }, { "docid": "ef33d9626d61965b9b8dfbb1b6edc7f4", "score": "0.65162903", "text": "public function disconnect()\n {\n pg_close($this->dbconn);\n }", "title": "" }, { "docid": "e72a759c2f2869d12a33ab99adef72c1", "score": "0.6516289", "text": "public function closeConnection() {\n //Isset whether or not the variable has been set and if the is information present in the variable.\n if (isset($this->connection)) {\n //You must remember to close your connection to the database. \n $this->connection->close();\n }\n }", "title": "" }, { "docid": "9ad372657f4e5a80aa7e3e6da2cf4e29", "score": "0.65111125", "text": "protected function close(): void {\r\n\t\t$this->free();\r\n\t\t$this->database = null;\r\n\t}", "title": "" }, { "docid": "20ef1ae577381c0545e6050e39bc63b2", "score": "0.6501132", "text": "public static function dbClose()\n\t\t{\n\t\t\tmysql_close();\n\t\t}", "title": "" }, { "docid": "d76a0ad0deaf9016e1d35d1bc2348a04", "score": "0.64877915", "text": "function Disconnect()\r\n\t{\r\n\t\t$this->handler->Log(DBH_LOG_INFO, \"Closing Connection...\");\r\n\r\n\t\tif ($this->dbopen)\r\n\t\t{\r\n\t\t\tmysql_close($this->dbconn);\r\n\t\t\t$this->dbopen = false;\r\n\t\t\t$this->handler->Log(DBH_LOG_INFO, \"Connection closed\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->handler->Log(DBH_LOG_WARNING, \"Connection Already Closed\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b6d81642524a5b249b41e7c8d891984d", "score": "0.64848346", "text": "public function closeDbConnect() {\n $this->conn->close();\n }", "title": "" }, { "docid": "ac33a5b06424a8516b76ebb158870873", "score": "0.6479199", "text": "function close_db_connection($dbh) {\n\tpg_close($dbh);\n}", "title": "" }, { "docid": "fc5a4fa46e725ab586d8f73f91b469bc", "score": "0.64764565", "text": "public function close() {\n $this->conection->closeConection();\n }", "title": "" }, { "docid": "59830a00634b93815a60720e90ebe1a4", "score": "0.6472116", "text": "function asg_db_disconnect($con) {\n $con->close();\n }", "title": "" }, { "docid": "e05ed38da3db0cc89c877523bb8a4feb", "score": "0.64283603", "text": "public function close( ) {\n if( !@mysql_close( $this->link_id ) ) {\n echo \"Connection close failed!\" ;\n }\n }", "title": "" }, { "docid": "93f989a58949f43b9c343cfeb570de0c", "score": "0.64231026", "text": "public static function closeDbConnections()\r\n\t{\r\n\t\t// this will limit the number of concurrent db connections as dumping a file make take a long time\r\n\r\n\t\ttry\r\n\t\t{\r\n\t\t\tPropel::close();\r\n\t\t}\r\n\t\tcatch(Exception $e)\r\n\t\t{\r\n\t\t\t$this->logMessage(\"closeDbConnections: error closing db $e\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "528352f2f5ae5674213800b12311e8f7", "score": "0.64169335", "text": "function close()\t{\n\t\t@mysql_close($this->dbLink);\n\t}", "title": "" }, { "docid": "358bd6ccb7989a5ac458362bd974ca49", "score": "0.6409133", "text": "protected function close_db() \n\t{\n\t if ($this->db !== null) {\n\t mysql_close($this->db);\n\t }\n\t $this->db = null;\n\t}", "title": "" }, { "docid": "8634a3ea08d7c35ef90148ed67315f7e", "score": "0.6402643", "text": "FUNCTION desconectar () {\n $this->db->Close();\n }", "title": "" }, { "docid": "93be0a195c2430c5c90573451f7cd609", "score": "0.6400925", "text": "function close() {\n // closing db connection\n mysql_close();\n }", "title": "" }, { "docid": "96819570d7f5bbab996a59964a02ffe0", "score": "0.640014", "text": "function DBclose(){\n\t\t\tif($this->conn){\n\t\t\t\tmysql_close($this->conn);\n\t\t\t}\n\t\t\tif($this->conn_read){\n\t\t\t\tmysql_close($this->conn_read);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "9e2b54ad27c04826491d110d0db58eb9", "score": "0.6400063", "text": "public function CloseDatabaseConnect(){\n\t\tmysql_query(\"COMMIT\", $this->connect);\n\t\tif(mysql_close($this->connect)){\n\t\t\techo \"Database calls:\".$this->calls;\n\t\t\treturn true;\n\t\t}\n\t\telse{\n\t\t\treturn $this->DisplayError();\n\t\t}\n\t}", "title": "" }, { "docid": "7665b2a9880811baaaa946743acd4eed", "score": "0.6396572", "text": "public function sql_close()\n {\n mysqli_close($this->sqlConnection);\n $this->db_admin_user = null;\n $this->db_admin_pass = null;\n $this->sqlConnection = null;\n }", "title": "" }, { "docid": "7816a0579eb0618ce41ab6d9992b8797", "score": "0.63900566", "text": "public function finish()\n\t{\n\t\ttry {\n\t\t\t$this->statement->closeCursor();\n\t\t} catch ( \\PDOException $e ) {\n\t\t\tthrow new \\Aimeos\\MW\\DB\\Exception( $e->getMessage(), $e->getCode(), $e->errorInfo );\n\t\t}\n\t}", "title": "" }, { "docid": "543d82efd15f780a73d4204e5839adde", "score": "0.63851464", "text": "function close()\n\t{\n\t\t$this->db->close();\n\t}", "title": "" }, { "docid": "00f576371d1b3798f152c845b48ae797", "score": "0.63669", "text": "function closeDB()\n {\n $this->conn->close();\n }", "title": "" }, { "docid": "742087a7883069447d67124da572619b", "score": "0.63667953", "text": "public function close()\n {\n foreach ($this->_pool as $socket) {\n /**\n * @var $socket Redis\n */\n $connection = $this->connectionString . ', database=' . $this->database;\n \\Yii::debug('Closing DB connection: ' . $connection, __METHOD__);\n try {\n $socket->close();\n } catch (\\Exception $e) {\n // ignore errors when quitting a closed connection\n }\n }\n\n $this->_pool = [];\n }", "title": "" }, { "docid": "2d7258e33e3feb21928e7690fa75cc69", "score": "0.6354965", "text": "public function closeDbConnect()\n\t{\n\t\tif(mysql_close())\n\t\t\t$this->connstatus=0;\n\t\telse \n\t\t\t$this->connstatus=1;\n\t}", "title": "" }, { "docid": "c37b48cea9051be9e9a4a15187fccd9b", "score": "0.63472486", "text": "function close() {\n // closing db connection\n if($this->con) {\n $this->con->close(); \n }\n\n }", "title": "" }, { "docid": "a73846e99c7380a0c832681bc337b3fa", "score": "0.6344896", "text": "public function close(){\n\t\tif($this->con && $this->con->isConnected()){\n\t\t\t$this->con->write(\"quit\\r\\n\");\n\t\t\t$this->con->close();\n\t\t}\n\t}", "title": "" }, { "docid": "4a18eff315a0c553f2c9205113e39297", "score": "0.6340186", "text": "function close_db(){\n $this->_dbh = null;\n \n }", "title": "" }, { "docid": "02b7abff9172047ac34e8734daab8e68", "score": "0.633741", "text": "public\n function close()\n {\n try\n {\n if (!!!mysqli_close($this->conn))\n {\n throw new Exception(\"Error closing database!\");\n }\n $this->conn = null;\n } catch (Exception $e)\n {\n $this->registry->View_Template->showError($e->getMessage(), \"Contact your administrator\");\n }\n }", "title": "" }, { "docid": "18825392ed7add5cd79d888c755b73b8", "score": "0.6334758", "text": "function Close()\n {\n mysql_close($this->dblink);\n }", "title": "" }, { "docid": "24fe8bc013febd9a97ae79ec112132de", "score": "0.63126737", "text": "public function close()\n\t{\n\t\t$this->pdo = NULL;\n\t\t$this->isConnected = FALSE;\n\t}", "title": "" }, { "docid": "7ee086e7b78fb5d2375074afcaf2fe5b", "score": "0.6312229", "text": "function close_db() {\n mysqli_close($this->connection);\n }", "title": "" }, { "docid": "3ac97add7b3adaa46ad7dd718757f079", "score": "0.63113433", "text": "public function disconnect_DataBase()\r\n {\r\n $this->db->close();\r\n }", "title": "" }, { "docid": "0837f2c68fc63c22e1c7e115280e765c", "score": "0.630202", "text": "function close() {\n if($this->established) {\n $this->driver->close();\n $this->established = false;\n }\n }", "title": "" }, { "docid": "635e14279d89440d0a5609b48be842a8", "score": "0.6298409", "text": "function close() {\r\n // closing db connection\r\n mysql_close();\r\n }", "title": "" }, { "docid": "2b695e51b22acaf4a6b76f5b68687636", "score": "0.6288795", "text": "function close() {\n\t\t$this->db = null;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "df43f56dc4de1d00d0aa744f7fdb450d", "score": "0.62876296", "text": "public function __destruct() {\r\n\t\t$this->db->close ();\r\n\t}", "title": "" }, { "docid": "d7e8ec7e55be551aad2d9c2208ba24b8", "score": "0.6286654", "text": "function _dbClose($link){\n @mysqli_close($link) or die (mysqli_error($link));\n }", "title": "" }, { "docid": "5ebdbddbb5aeed8f9241f2356941dccd", "score": "0.62824196", "text": "function __destruct() {\n\t\t$this->dbConn->close();\n\t}", "title": "" }, { "docid": "c9f1f8d176333977484816576cc505df", "score": "0.62810636", "text": "public function __destruct()\n {\n parent::$db->closeConnection();\n }", "title": "" }, { "docid": "c9f1f8d176333977484816576cc505df", "score": "0.62810636", "text": "public function __destruct()\n {\n parent::$db->closeConnection();\n }", "title": "" } ]
360dbe51995fbc5c54819aa903ea1c14
Returns table name mapped in the model.
[ { "docid": "01fa84e0d7c9058c3aa37afb9e28f9bd", "score": "0.0", "text": "public function getSource()\n {\n return 'circle_thpolloption';\n }", "title": "" } ]
[ { "docid": "856a0e61f155ff589216bde42f7d6b30", "score": "0.8360661", "text": "public function getTableName() : string {\n $reflection = new \\ReflectionClass($this);\n return $this->convertToUnderscore(rtrim($reflection->getShortName(), 'Model'));\n }", "title": "" }, { "docid": "8459abe97b9fd4b4b8b223f60feb6491", "score": "0.83041775", "text": "public function getTableName(): string\n {\n return static::TABLE ?: (static::MODEL)::getTableName();\n }", "title": "" }, { "docid": "d822fd426c2b1902d95bb4f3d06afbc5", "score": "0.8153858", "text": "public function getTableName()\n\t{\n\t\treturn $this->model->getTableName();\n\t}", "title": "" }, { "docid": "ff1c5060d43e471d411e0f712476cc1b", "score": "0.80550057", "text": "public static function getTableName()\n {\n $model = new static();\n\n return $model->getTable();\n }", "title": "" }, { "docid": "03705af10d2a13a1d008084f1227cfe4", "score": "0.79209954", "text": "public function tablename($model) {\n foreach($this->models as $table => $modelname) {\n if($modelname == $model) {\n return (is_string($table)) ? $table : $model;\n }\n }\n }", "title": "" }, { "docid": "79ba1ea41306e7bff5ceb1af81c3f8ae", "score": "0.7917566", "text": "public function getTableName() {\n\t\treturn static::$table_name;\n\t}", "title": "" }, { "docid": "29c6aedefd7345257b8096b098bcb9e5", "score": "0.78653735", "text": "public function getTable(): string\n\t{\n\t\t$class = class_basename($this);\n\n\t\treturn $this->table ?? Str::snake(Str::plural($class));\n\t}", "title": "" }, { "docid": "db53f27c8f5080f3c96d037081bc33a4", "score": "0.7856382", "text": "public function getTableName()\n {\n return $this->table_name;\n }", "title": "" }, { "docid": "5e1b794635648b5fd2f11b7f9c38a080", "score": "0.78479767", "text": "private static function _tablename() {\n $table = strtolower(get_called_class());\n ApplicationSql::check_table($table);\n return $table;\n }", "title": "" }, { "docid": "240eb7e2f5e8746f69dd686572696c05", "score": "0.7843282", "text": "public static function tableName() {\r\n $tableName = $this->table_name;\r\n return '{{%'.($tableName).'}}';\r\n }", "title": "" }, { "docid": "9ccb5fda02fa436e766b181583ff0fd1", "score": "0.7841303", "text": "public function getTableName(): string\n {\n return $this->tableNameCache ??\n ($this->tableNameCache = $this->dataMapper->getDataMap($this->selfReference->objectType)->getTableName());\n }", "title": "" }, { "docid": "e8fa9c82ebe63b82afa303109667b634", "score": "0.7798019", "text": "public function getTableName()\n {\n return $this->table;\n }", "title": "" }, { "docid": "34f8068efcfb98cafd1372c279a34d34", "score": "0.7789941", "text": "public function tableName()\n\t{\n\t\treturn $this->tableNamePrefix().$this->rawTableName();\n\t}", "title": "" }, { "docid": "0cce661392dce846b6011ae2174ae24d", "score": "0.77852726", "text": "public function getTableName()\n {\n return $this->name;\n }", "title": "" }, { "docid": "2b32952a277a82669d8283a5c0cd9688", "score": "0.7780016", "text": "public function getTableName();", "title": "" }, { "docid": "884717ed5d86ad274d292a641b482d9f", "score": "0.77559274", "text": "public function getModelTableName(): mixed\n {\n return $this->getContainer()->call([$this->getObjectClass(), 'defaultTableName']);\n }", "title": "" }, { "docid": "8e1a2e2f18da928623081244f4b4b42a", "score": "0.77241206", "text": "public function getTableName()\n {\n $reflection = new \\ReflectionClass($this);\n return strtolower($reflection->getShortName());\n }", "title": "" }, { "docid": "32e24f29fd22cb705d2ab6ab686f9638", "score": "0.7715477", "text": "protected function getTableName()\n {\n return strtolower($this->getPackageName()) . 's';\n }", "title": "" }, { "docid": "b32de562cdaf12396db263bc7ec17444", "score": "0.7705061", "text": "protected function _table()\n {\n return $this->_model()->getTable();\n }", "title": "" }, { "docid": "d044cbd063acf83b89d4e1d98213dea6", "score": "0.77024454", "text": "public function getTableName()\n\t{\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "d1c48fa9f88996b5eb57a3e825ab56e7", "score": "0.770047", "text": "public static function getTableName()\n {\n return ((new self)->getTable());\n }", "title": "" }, { "docid": "0414863f17531b945c79be9657795fe4", "score": "0.7694363", "text": "protected function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "4c96da32a462630735559ec9e17536f2", "score": "0.7692149", "text": "public static function getTableName() {\n return self::$tableName;\n }", "title": "" }, { "docid": "4c96da32a462630735559ec9e17536f2", "score": "0.7692149", "text": "public static function getTableName() {\n return self::$tableName;\n }", "title": "" }, { "docid": "e3ef8fae08df058065aea7813fb1e48b", "score": "0.7692058", "text": "protected function tableName(): string\n {\n return static::TABLE_ALIAS ? static::TABLE . ' as ' . static::TABLE_ALIAS : static::TABLE;\n }", "title": "" }, { "docid": "5e5903aa07de0422301ba40915c34e14", "score": "0.7689192", "text": "public function getTableName()\n {\n return $this->_name;\n }", "title": "" }, { "docid": "6f81966a05cf5fc16702d19af184496f", "score": "0.76889986", "text": "protected function getTableName()\n {\n if (isset($this->tableName)) {\n return $this->tableName;\n } else {\n return get_class($this->entity);\n }\n }", "title": "" }, { "docid": "1c782aaa6d81ccc3fd52cc793dd34105", "score": "0.76799303", "text": "public function getTableName() {\r\n\t\treturn $this->_name;\r\n\t}", "title": "" }, { "docid": "5cd2712ec8d720cb06203552eb26b2a3", "score": "0.7674272", "text": "protected static function getTableName() {\n\t\t$obj = static::create();\n\t\t$name = $obj->buildTableName();\n\t\tunset($obj);\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7668591", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7668591", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7668591", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "cf3b58040e1f1638285ede090ba0dce5", "score": "0.7668591", "text": "public function getTableName()\n {\n return $this->tableName;\n }", "title": "" }, { "docid": "edabb869ab5300bde252f10f5f5f19ca", "score": "0.7658916", "text": "function getTablename(): string\n {\n\n if (!is_null($this->tablename)) {\n $tblname = $this->tablename;\n } else {\n $p = preg_split(\"/[\\\\\\]/\", strtolower(get_class($this)));\n $clsname = array_pop($p);\n $tblname = self::pluralize($clsname);\n unset ($clsname);\n }\n\n return $tblname;\n }", "title": "" }, { "docid": "c791f2b36c0dec0fb14222fce3c5d531", "score": "0.7653223", "text": "private function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "c791f2b36c0dec0fb14222fce3c5d531", "score": "0.7653223", "text": "private function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "44a354d173a427c5daf7a58182f38bf1", "score": "0.7651406", "text": "public function getTableName()\n {\n return $this->db->prefix . $this->pluginPrefix . $this->tableName;\n }", "title": "" }, { "docid": "37af891a7ec59a216dfd3bd3924be66d", "score": "0.76500934", "text": "public function get_name() {\n\n\t\treturn $this->table_name;\n\t}", "title": "" }, { "docid": "2c428f6a33fa1d105d950175684509b9", "score": "0.7637799", "text": "public function getTableName() {\n return $this->tableName;\n }", "title": "" }, { "docid": "78ea25a0d518939d5b600f7f50bc201d", "score": "0.7632748", "text": "public function getTable()\n {\n if (isset($this->table)) return $this->table;\n return str_replace('\\\\', '', snake_case(class_basename($this)));\n }", "title": "" }, { "docid": "37f6cee8e39c9cf77227830ea042d420", "score": "0.7624493", "text": "public function getTableName()\n\t{\n\t\treturn $this->_name;\n\t}", "title": "" }, { "docid": "0fa37992d41e9c39dfe799f32530f5db", "score": "0.76136935", "text": "public function getTableName(){\r\n\t\treturn $this->tableName;\r\n\t}", "title": "" }, { "docid": "3011c7cb0e47aa3671888ec2f6ef26c3", "score": "0.76130474", "text": "public function getTable()\n\t{\n\t\t//check if the table name variable contains a value\n\t\tif ( empty($this->table) ) \n\t\t{\n\t\t\t//if table is not set yet, get a table name from this class instance\n\t\t\t$this->table = strtolower(StringUtility::singular(get_class($this)));\n\n\t\t}\n\n\t\t//return the formed table name\n\t\treturn $this->table;\n\n\t}", "title": "" }, { "docid": "6adac161ed0c965daa2b96e787c98db7", "score": "0.7590704", "text": "public static function tableName()\n {\n return self::$tableName;\n }", "title": "" }, { "docid": "a70f3dcbc9673b54f2c9eb9f19ba7a73", "score": "0.75853276", "text": "public function getName()\n {\n return $this->table->getName();\n }", "title": "" }, { "docid": "d0d15226b64695d75ebdfa4ce92d667a", "score": "0.7573705", "text": "public static function getTableName();", "title": "" }, { "docid": "0e6738210c4d8e95baf7c1da0c980aed", "score": "0.75732446", "text": "private function determineTableName()\n {\n $annotations = $this->inspector->getClassAnnotations();\n $name = self::parseTableName($this->entity);\n if ($annotations->hasAnnotation('@table')) {\n $name = $annotations->getAnnotation('@table')->getValue();\n }\n return $name;\n }", "title": "" }, { "docid": "e3062822ef80f95d11bdfb15ec22263d", "score": "0.75661826", "text": "public function getTableName() {\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "d4ff4b30b55ca8d551a711c7458a8302", "score": "0.7560659", "text": "private function getTableName() {\n if ($this->resource) {\n return \"dkan_datastore_{$this->resource->getId()}\";\n }\n else {\n return \"\";\n }\n }", "title": "" }, { "docid": "49357289dd352eec05d15c1d8f682482", "score": "0.7554328", "text": "protected function getModelName()\n {\n return ucwords(str_singular(camel_case($this->meta['table'])));\n }", "title": "" }, { "docid": "cea6a42ff45f6c31928e81061a7af7f5", "score": "0.7551456", "text": "public function getTableName()\n\t{\n\t\treturn $this->tableName;\n\t}", "title": "" }, { "docid": "a5eef774902af5b86a34f2385ad3e232", "score": "0.7547303", "text": "public static function getTableAlias()\n {\n return static::$strTable;\n }", "title": "" }, { "docid": "87310cfc09a8706368a1651bd6c5db47", "score": "0.7537014", "text": "public function getTable()\n {\n return $this->model->getTable();\n }", "title": "" }, { "docid": "93759d1fae776b8e69d21ce7a29e07db", "score": "0.751927", "text": "public function getTableName()\n {\n return $this->_tableName;\n }", "title": "" }, { "docid": "93759d1fae776b8e69d21ce7a29e07db", "score": "0.751927", "text": "public function getTableName()\n {\n return $this->_tableName;\n }", "title": "" }, { "docid": "5e3239c9874b88edb1e726381a91835a", "score": "0.7514256", "text": "function table_name()\n {\n return self::TABLE_NAME;\n }", "title": "" }, { "docid": "e7e3a04b83edfb2b20676c6c9bf3bb5c", "score": "0.7511452", "text": "public function getTable()\n {\n if (static::$table !== null) {\n return static::$table;\n }\n $split = explode('\\\\', get_class($this));\n return strtolower($split[count($split) - 1]);\n }", "title": "" }, { "docid": "dfe0c12612fa46cfa88762fb9fd50966", "score": "0.75097436", "text": "public function getTableName(): string;", "title": "" }, { "docid": "dfe0c12612fa46cfa88762fb9fd50966", "score": "0.75097436", "text": "public function getTableName(): string;", "title": "" }, { "docid": "4bf9b1ba6ae28a74eb63086854e675b0", "score": "0.75082123", "text": "public function getTable()\n\t{\n\t\tif (!isset($this->table)) {\n\t\t\treturn str_replace('\\\\', '', Str::snake(Str::plural(class_basename(new parent))));\n\t\t}\n\n\t\treturn $this->table;\n\t}", "title": "" }, { "docid": "020467c59375f12d9484769ed7a9af47", "score": "0.74997675", "text": "public static function getTableName()\n {\n return '';\n }", "title": "" }, { "docid": "5c463c7b7eb451817c23b65a45eafadf", "score": "0.74609554", "text": "public abstract function getTableName();", "title": "" }, { "docid": "78b5e403dc35498b66b3c4b6dcc3c69e", "score": "0.7448417", "text": "public function getTable() {\n return $this->tableName;\n }", "title": "" }, { "docid": "9536857fe3196993e74dc0d0982b8ae6", "score": "0.7439482", "text": "public function modelname($table) {\n foreach($this->models as $tablename => $modelname) {\n if((is_string($table) && $table == $tablename) || $modelname == $table) {\n return $modelname;\n }\n }\n }", "title": "" }, { "docid": "f3640f096991e3bdb83a8e6ef99ce5b0", "score": "0.74281925", "text": "protected function getTableName() {\n\t\treturn ( ( substr( $this->sTableName, 0, strlen( $this->getPrefix() ) ) !== $this->getPrefix() ) ? ( $this->getPrefix() . $this->sTableName ) : $this->sTableName );\n\t}", "title": "" }, { "docid": "eeb8cb1fff1ed9275620b9cf82beb69c", "score": "0.7428045", "text": "public function singular_table_name()\n{\n\tif ( ! $this->singular_table_name )\n\t{\n\t\t$this->singular_table_name = strtolower($this->inflector->singularize($this->table_name()));\n\t}\n\t\n\treturn $this->singular_table_name;\n}", "title": "" }, { "docid": "8deaa5b9f33af549945dd3bc6bd0ae4c", "score": "0.74264175", "text": "public function getTableName() {\n\t\t\n\t\t$this->initTableName();\n\t\t\n\t\treturn $this->_sPrefixedTableName;\n\t}", "title": "" }, { "docid": "9a3a79614b12b027f93c117d9555f517", "score": "0.7414824", "text": "public function getTableName()\n {\n if (null == $this->tableName) {\n $this->tableName = $this->determineTableName();\n }\n return $this->tableName;\n }", "title": "" }, { "docid": "c461dfd12e5ac7c6d8dd13c2e525d886", "score": "0.7414226", "text": "public function getTableName() {\n return $this->_name . \"_\" . (intval(fmod($this->hash, 10)) + 1);\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.74087894", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "dd471a7b73abaacd7b3d1494a0aeff05", "score": "0.74087894", "text": "public function getTable(): string\n {\n return $this->table;\n }", "title": "" }, { "docid": "d769b29dd2664defba0028df7a379caf", "score": "0.74024355", "text": "public function getTable()\n {\n return $this->getModel()->getTable();\n }", "title": "" }, { "docid": "969ef122e25ee14b94068879ea8639e2", "score": "0.74014187", "text": "protected function table_name($table_name = NULL)\n{\t\n\tif ( empty($this->table_name) || $table_name )\n\t{\t\n\t\t$this->table_name = $table_name ? $table_name : $this->inflector->pluralize(str_replace('_model', '', strtolower(get_class($this))));\n\t}\t\n\t\n\treturn $this->table_name;\n}", "title": "" }, { "docid": "718f2d963c057dfedba0b8c03713db94", "score": "0.7375028", "text": "public function getTable()\r\n {\r\n return $this->tablename;\r\n }", "title": "" }, { "docid": "45728fb97550d19fbec0cd04cce83d67", "score": "0.73746574", "text": "public static function getTableName()\n\t{\n\t\t$splitter = new Splitter(self::getClassName());\n\n\t\t$tableName = $splitter->format();\n\t\t$tableName = Pluralize::pluralize($tableName);\n\n\t\treturn $tableName;\n\t}", "title": "" }, { "docid": "c63b7641b12cede1fd766b49417070d2", "score": "0.7353279", "text": "abstract public function getTableName();", "title": "" }, { "docid": "2ca1b3b124459d0eb6b08b8bf5b4bc26", "score": "0.73490936", "text": "public function table($name='')\r\n {\r\n if(!empty($name)){\r\n return strtolower($name);\r\n }else if($this->table_name !== ''){\r\n return $this->table_name;\r\n }else{\r\n return strtolower($this->class_name).'s';\r\n }\r\n }", "title": "" }, { "docid": "1b34b431a3be6619ee662230442fa278", "score": "0.7347465", "text": "public static function tableName()\n {\n $name = static::class;\n if ($pos = strrchr($name, '\\\\')) {\n $name = (substr($pos, 1));\n }\n $name = str_replace('Search', '', $name);\n $name_a = preg_split('#([A-Z][^A-Z]*)#', $name, null, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n $name = strtolower(implode('_', $name_a));\n return $name;\n }", "title": "" }, { "docid": "7ada835582e4ff3e24674c336881bd36", "score": "0.7346581", "text": "static function tableName() {\n\t\tif (static::$tableName) return static::$tableName;\n\t\t$tname = get_called_class(); // get the class name\n\t\t$tname = preg_replace(\"/(?<!^)([A-Z])/\", \"_$1\", $tname); // convert camelcase to underscores\n\t\t$tname = strtolower( $tname ); // all lowercase\n\t\treturn static::plural($tname); // return the plural version\n\t}", "title": "" }, { "docid": "816288a6ac5b02d17ce8eabc6ed29ef5", "score": "0.7343224", "text": "public static function table(){\n $calling_class = get_called_class();\n $default_table = strtolower($calling_class) . 's';\n \n $table = isset(static::$table) ? static::$table : $default_table;\n return $table;\n }", "title": "" }, { "docid": "d45835b626ff70161d5f838a7093dfcc", "score": "0.7341985", "text": "protected static function table() \n {\n $path = explode('\\\\', static::class);\n return lcfirst(array_pop($path));\n }", "title": "" }, { "docid": "97650fde6bde103621d86fc73f16149c", "score": "0.73239326", "text": "protected function getTableName()\n {\n if ($this->option('table')) {\n return trim($this->option('table'));\n }\n\n return str_plural(snake_case(class_basename($this->argument('name'))));\n }", "title": "" }, { "docid": "4837a651905a1fa64155be2ea6e6abe9", "score": "0.7310575", "text": "public function getTable()\n {\n return $this->fullAlias();\n }", "title": "" }, { "docid": "9c1248f150a1e8688aa1581f9bd83608", "score": "0.73045033", "text": "public function getTable(): string\n {\n return Config::get('flow.steps.table_name', parent::getTable());\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.7291765", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.7291765", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.7291765", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "9329851104d801a15519cdb952f7f5ec", "score": "0.7291765", "text": "public static function getTableName()\n {\n return with(new static)->getTable();\n }", "title": "" }, { "docid": "ad7f21cab4a1404a87af24feeac48a35", "score": "0.72826904", "text": "public function table()\n {\n return $this->table;\n }", "title": "" }, { "docid": "ad7f21cab4a1404a87af24feeac48a35", "score": "0.72826904", "text": "public function table()\n {\n return $this->table;\n }", "title": "" }, { "docid": "aa1a390c6afe08bc8624b8085642e350", "score": "0.72808444", "text": "public function getTableName()\r\n\t{\r\n\t\t$TablePara = $this->getTableArray();\r\n $tablename = '';\r\n\t\tfor($i=0,$nt = count($TablePara);$i<$nt;$i++)\r\n\t\t{\r\n\t\t\t$tablename .= $TablePara[$i][0].\" `\".$TablePara[$i][1].\"`,\";\r\n\t\t}\r\n\t\t$tablename = substr($tablename,0,-1);\r\n\t\treturn $tablename;\r\n\t}", "title": "" }, { "docid": "a10dcabd780ad77e2305e9c159cc7d0e", "score": "0.7270795", "text": "public function getTable($name)\n {\n if (isset($this->params['table'])) {\n return $this->params['table'];\n }\n return Inflector::underscore($name);\n }", "title": "" }, { "docid": "30c1d1872bc69847e0ba18bdbe07a360", "score": "0.7270199", "text": "public function table()\n\t{\n\t\treturn '(=tableName)';\n\t}", "title": "" }, { "docid": "95cb4f8a6e3ed9bc7d9d5a8d627d2bb3", "score": "0.7269134", "text": "static function get_table_name()\n\t{\n\n return self :: TABLE_NAME;\n\t}", "title": "" }, { "docid": "d32ea682cd686f9f2d7628ebbab807b0", "score": "0.72627264", "text": "public function table()\n\t{\n\t\t$table = parent::table();\n\n\t\t$table = $this->prefix\n\t\t\t? $this->prefix.$table\n\t\t\t: $table;\n\n\t\treturn $table;\n\t}", "title": "" }, { "docid": "a0c2d32f7350afacd9b850e47e038718", "score": "0.7262262", "text": "public function getTableAttribute()\n {\n return 'mx_' . $this->handle;\n }", "title": "" }, { "docid": "9b3e119645bcf419de6487cc0f718326", "score": "0.72534686", "text": "public function get_table() {\n return $this->table;\n }", "title": "" }, { "docid": "67a88098570f4724fcf56bf51e6006d3", "score": "0.7251808", "text": "public function table() {\n return $this->wpdb()->prefix . $this->prefix . $this->table_name();\n }", "title": "" }, { "docid": "a3c5e84c429111dc8bcd7364b86f836d", "score": "0.72514707", "text": "abstract protected function getTableName();", "title": "" }, { "docid": "a2c984bc09db8527876c96bc40aabd86", "score": "0.72351074", "text": "public static function getTableName()\n\t{\n\t\tif(static::$tableName != '')\n\t\t{\n\t\t\treturn static::$tableName;\n\t\t}\n\n\t\treturn 'b_tasks_task_dep';\n\t}", "title": "" }, { "docid": "1f4f48364404aafaa10bf359a6b8698c", "score": "0.72278625", "text": "public function getFQTableName()\n {\n return static::FQ_TABLE_NAME;\n }", "title": "" } ]
fcef89dfac51850287a35935a61add76
Get Information about Driver
[ { "docid": "27a65cdc6940de82f82b008681ad088b", "score": "0.0", "text": "public function getInfo() {\n\t\treturn array(\n\t\t\t\"rawName\" => null,\n\t\t\t\"prettyName\" > null,\n\t\t\t\"asteriskSupport\" => null\n\t\t);\n\t}", "title": "" } ]
[ { "docid": "7e9864b3fe05163a3363aa2eca803b50", "score": "0.80287504", "text": "function getDriverInfo()\n\t{\n\t\treturn $this->db->client_info;\n\t}", "title": "" }, { "docid": "5ce068cbd43a0bfadb1f65756166fbf8", "score": "0.7889063", "text": "public function getDriver();", "title": "" }, { "docid": "5ce068cbd43a0bfadb1f65756166fbf8", "score": "0.7889063", "text": "public function getDriver();", "title": "" }, { "docid": "a0fb73455b82e851dfb8a3d7b86a760a", "score": "0.744236", "text": "public function getDriver(): string\n {\n }", "title": "" }, { "docid": "7eaf09bcfebb7f2b2aabf8fd0420b854", "score": "0.73734605", "text": "public abstract static function getDriver();", "title": "" }, { "docid": "6c2cd9fdb3632190de7002e00c1e6e3a", "score": "0.7204281", "text": "public function getDriverName()\n {\n }", "title": "" }, { "docid": "4410e080d0cc240ae66ef47a5f68df55", "score": "0.7200276", "text": "public static function getDriver(): string\n {\n }", "title": "" }, { "docid": "ab6040c4495d072b3f254020f6cb9c6f", "score": "0.7111233", "text": "public static function GetDriver_Details($driver_id)\n\t{\n\t\t\tglobal $config;\n\t\t\t\n\t\t\t$dbconn=db::singleton();\n\t\t\t\n\t\t\t$query = \"SELECT `name` FROM `user` WHERE `user_id`='$driver_id'\";\n\t\t\t\n\t\t\t$dbconn->SetQuery($query);\n\n\t\t\treturn $dbconn->LoadObjectList();\n\t}", "title": "" }, { "docid": "9ab24cc12790863812f12e655916ba0d", "score": "0.7066961", "text": "public function getByDriver()\n {\n }", "title": "" }, { "docid": "04663b9e623eebd1e6e28a39cafd91d9", "score": "0.70321447", "text": "public function getDriver(){\n\t\treturn $this->driver;\n\t}", "title": "" }, { "docid": "1cd51fb0a6fbe8244705149e4ff01ac4", "score": "0.69669807", "text": "public function _getDriver() {\n return $this->getDriver();\n }", "title": "" }, { "docid": "19f0a8b76d41e25a9590a6af5db303f9", "score": "0.6932452", "text": "public function getDriver() {\n return $this->driver;\n }", "title": "" }, { "docid": "6f6df7af306121cba442331a1b3da81c", "score": "0.6821771", "text": "public function getDriver()\n {\n return $this->driver;\n }", "title": "" }, { "docid": "6f6df7af306121cba442331a1b3da81c", "score": "0.6821771", "text": "public function getDriver()\n {\n return $this->driver;\n }", "title": "" }, { "docid": "f4971dff8cf5f04e4996efe74799d752", "score": "0.68108493", "text": "function getDriver() {\n\t\treturn $this->driver;\n\t}", "title": "" }, { "docid": "80727010be9b4c48613ffee690812b5d", "score": "0.67605", "text": "public function getDriver(): string\n {\n return $this->driver->getDriver();\n }", "title": "" }, { "docid": "1c1beb8372b018b21e9dbbfb2efc675c", "score": "0.6751977", "text": "public function getDriver() {\n return $this->driver;\n }", "title": "" }, { "docid": "6175f39841bcf7c2e152269b399d613d", "score": "0.6577383", "text": "public function getDriverName(): string\n {\n return $this->currentDriverName;\n }", "title": "" }, { "docid": "1f9d818b7320ff3705e6d8c3af1d1af2", "score": "0.6562009", "text": "public function getDriver(array $params = null);", "title": "" }, { "docid": "22357484ecf6378223b24384de9cd831", "score": "0.6485364", "text": "public function show(Driver $driver)\n {\n\n }", "title": "" }, { "docid": "fc69826350261344e5799db628ec4ac2", "score": "0.64815706", "text": "public function driver()\n {\n return $this->driver;\n }", "title": "" }, { "docid": "0820afb3498f4b261592d9e787776afb", "score": "0.6438367", "text": "public function public_info(){\n\t\t$info = Arrays::pick($this->connection_info, ['driver', 'database', 'host', 'port']);\n\t\t$info['driver'] = $this->driver;\n\t\t$info['class'] = __CLASS__;\n\t\treturn $info;\n\t}", "title": "" }, { "docid": "c08a4d6ffbaedaf6cfa31ef844f86ba5", "score": "0.6423", "text": "public function getDrivers()\n {\n return Drivers::getDrivers();\n }", "title": "" }, { "docid": "496785dd0766c8fa504bf2778f1a6c17", "score": "0.64011043", "text": "public function getDriverName()\n {\n return $this->getAttribute(parent::ATTR_DRIVER_NAME);\n }", "title": "" }, { "docid": "fb266de42343317c1ec450c7a32ef1dc", "score": "0.6384024", "text": "public function show(Driver $driver)\n {\n //\n }", "title": "" }, { "docid": "fb266de42343317c1ec450c7a32ef1dc", "score": "0.6384024", "text": "public function show(Driver $driver)\n {\n //\n }", "title": "" }, { "docid": "fb266de42343317c1ec450c7a32ef1dc", "score": "0.6384024", "text": "public function show(Driver $driver)\n {\n //\n }", "title": "" }, { "docid": "24a0964f6dcb747d434f14c8a8802ea5", "score": "0.6379324", "text": "final public function getDriverType()\n {\n return static::$driverType;\n }", "title": "" }, { "docid": "3ad41ded5c9b02e53f9447d19007b134", "score": "0.63245076", "text": "public static function getAvailableDrivers () {}", "title": "" }, { "docid": "003c698360131d84e2a7dd0fb70e1cf3", "score": "0.63083965", "text": "protected abstract function driverName();", "title": "" }, { "docid": "5a549e75d72d5cd23244df64d2b10889", "score": "0.62532437", "text": "function driver_get(){\n\t\t$this->load->model('m_driver');\n\t\t$model=$this->m_driver;\n\t\t$result = $model->get_driver();\n\t\t$this->result->status = RESPONSE_STATUS_SUCCESS;\n\t\t$this->result->data = $result;\n\t\t$this->response($this->result, 200);\n\t}", "title": "" }, { "docid": "adf166049678d0b8d94a2aafac128909", "score": "0.6159558", "text": "public function get_driver()\n {\n return $this->getDBH()->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n }", "title": "" }, { "docid": "52ca802f0f1ef54818eedbbe2235437f", "score": "0.61474216", "text": "public function getDrivers()\n {\n return $this->_drivers;\n }", "title": "" }, { "docid": "b6b849dc559cd3fabae40f0843fa8d5f", "score": "0.612093", "text": "public function getDrivers()\n {\n return $this->drivers;\n }", "title": "" }, { "docid": "337ddd6d01b34b929f29d738e6939a1a", "score": "0.6105832", "text": "public function getDriver()\n {\n \\Logger::getLogger(\\get_class($this))\n ->info(\\sprintf(__METHOD__ . \" getted '%s'\",\n $this->driver === null\n ? \"null\"\n : $this->driver));\n return $this->driver;\n }", "title": "" }, { "docid": "82eb87e610d8122917c14c8b78feef1e", "score": "0.6094346", "text": "public function getBasicInfo();", "title": "" }, { "docid": "027a3d010e87dbe8d3bf5fe78a3f3ae9", "score": "0.6092689", "text": "Abstract public function getInfo();", "title": "" }, { "docid": "ce778b50b374e7be0b15b1f7deecf716", "score": "0.60669535", "text": "public function getdriverDetails($drivercode){\n $stmt = $this->sql->Prepare(\"SELECT * FROM pol_drivers WHERE DV_CODE = \".$this->sql->Param('a'));\n $stmt = $this->sql->Execute($stmt,array($drivercode));\n\n if($stmt) {\n return $stmt->FetchNextObject();\n\n }else{return false ;}\n }", "title": "" }, { "docid": "a67eec369c7763c99ae86b0774d29d2b", "score": "0.6040289", "text": "function getDriverDetails($id)\n\t{\n\t\t$this->db->where(\"user_id\",$id);\n\t\t$this->db->where(\"is_active\",'1');\n\t\t$query=$this->db->get(\"tbl_users\");\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "cc2bd3dd7c5cd394d1e33a46be0a2ab6", "score": "0.6008482", "text": "public function driver()\n {\n if ($this->isDriver()) {\n return $this->hasOne(Driver::class);\n }\n }", "title": "" }, { "docid": "2265684542532f54c51b0a88ad80c891", "score": "0.59979725", "text": "public function getDrivers()\n\t{\n\t\treturn $this->drivers;\n\t}", "title": "" }, { "docid": "f373f75a02b6742031a2f3c870b7dc54", "score": "0.5997592", "text": "private function browserInfo()\n {\n // Detect the current visitor's informations.\n return \\BrowserDetect::detect()->toArray();\n }", "title": "" }, { "docid": "a77b07786680c5c427d09dfd5c4a0c78", "score": "0.5981652", "text": "public function FindDriver(){\n\t// \t print_r($query);\n\t\t$data = array(\n\t\t\t'book_id'=>$this->input->post('book_id')\n\t\t);\n\t\t$url = 'http://movers.com.au/Admin/api/User/FindDriver';\n\t\t// $url = 'http://phphosting.osvin.net/Admin/api/User/FindDriver';\n\t\t$options = array(\n\t\t\t'http' => array(\n\t\t\t'header' => \"Content-type: application/x-www-form-urlencoded\\r\\n\",\n\t\t\t'method' => 'POST',\n\t\t\t'content' => http_build_query($data)\n\t\t\t)\n\t\t);\n\t\t$context = stream_context_create($options);\n\t\t$result = file_get_contents($url, false, $context);\n\t\t$output = json_decode($result);\t\n\t\tprint_r($output);\n\t}", "title": "" }, { "docid": "8d78dec7e63ea666d36d4c15fbab5ac8", "score": "0.5979559", "text": "public function getAvailableDrivers(){\n return self::$connection->getAvailableDrivers();\n }", "title": "" }, { "docid": "5c877f339f0970e97f9967abba59becb", "score": "0.5954657", "text": "public function getDriverList() {\n\n $vehicleListQuery = \"SELECT id,driver_name FROM `dlvry_trans_driver_details` where status!='Delete'\";\n $vehicleListData = $this->db->query($vehicleListQuery);\n $vehicleListResult = $vehicleListData->result_array();\n return $vehicleListResult;\n }", "title": "" }, { "docid": "b87537f0d31badb99961594868327d0b", "score": "0.5951835", "text": "public function getinfo() {\n\t\treturn $this->CI->jsonrpcclient->getinfo();\n\t}", "title": "" }, { "docid": "10d6dcbcf704782ae40d544b3a071afe", "score": "0.594089", "text": "public function driverId()\n {\n return $this->driverId;\n }", "title": "" }, { "docid": "ebaff2573175252a3aa197ac6b68ba86", "score": "0.593881", "text": "public function getSpecificInformation() {\n return $this->_prepareSpecificInformation()->getData();\n }", "title": "" }, { "docid": "e413343abe4e5070436a9e356dbfd915", "score": "0.592052", "text": "public function getInfo(){}", "title": "" }, { "docid": "d370d70c3d118d397920e0573a0b99fb", "score": "0.59100914", "text": "public function driver();", "title": "" }, { "docid": "788303314a77cd92ea435a3740740272", "score": "0.5907756", "text": "public function getInfo()\n {\n return $this->get(self::INFO);\n }", "title": "" }, { "docid": "1e9be07fba99ba62c7887490c90838cd", "score": "0.58845884", "text": "function getBusDriver($_id){\n\t\ttry{\n\t\t\t$data = array();\n\t\t\t$stmt = $this->db->prepare(\"SELECT * \n\t\t\t\t\t\t\t\t\t\tFROM bus_driver \n\t\t\t\t\t\t\t\t\t\tWHERE id = :id\");\n\t\t\t$stmt->bindParam(\":id\",$_id,PDO::PARAM_INT);\n\t\t\t$stmt->execute();\n\n\t\t\t$data = $stmt->fetchAll(PDO::FETCH_CLASS,'busDriver');\n\n\t\t\treturn $data;\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo \"getBusDriver - \".$e->getMessage();\n\t\t\tdie();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "bea56c60112bb92582c9b959036f4f16", "score": "0.58689976", "text": "public static function getAvailableDrivers(): array;", "title": "" }, { "docid": "ec9a081232d2bc3208b32d520fe37dea", "score": "0.5857893", "text": "abstract public function getInfo();", "title": "" }, { "docid": "ec9a081232d2bc3208b32d520fe37dea", "score": "0.5857893", "text": "abstract public function getInfo();", "title": "" }, { "docid": "394166ecffbfcaecb6297c85706a8f02", "score": "0.5851401", "text": "private function getInfo() {\n\t\t$this->db = require (dirname(__FILE__).'/../../config/db.php');\n\t\tif ($this->db['dsn'] && $this->db['user'] && $this->db['password']) {\n\t\t\t$this->dsn = $this->db['dsn'];\n\t\t\t$this->user = $this->db['user'];\n\t\t\t$this->pass = $this->db['password'];\n\t\t\t$this->charset = $this->db['charset']?$this->db['charset']:'utf8';\n\t\t\t$this->rightNowDb = 'master';\n\t\t} else {\n\t\t\t$this->err('One of the PDO::DB Parameter is empty!');\n\t\t}\n\t}", "title": "" }, { "docid": "fd5252af6181287d7e60a7feae49aa34", "score": "0.5845682", "text": "public function driver()\n\t{\n\t\treturn $this->pdo->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n\t}", "title": "" }, { "docid": "d608db237a40b8992b40edad67a8d19b", "score": "0.58432955", "text": "public static function getAvailableDrivers()\n {\n return array_keys(self::$driver_map);\n }", "title": "" }, { "docid": "50bd42689635bc300e00cd8a69a6f249", "score": "0.5823745", "text": "public function createDriver();", "title": "" }, { "docid": "4cc9ccb89b49efcc33939ffe8fa3e52c", "score": "0.5821138", "text": "function getConnectionDBDriver()\n {\n $dbdriver = 'undefined';\n if (defined('_PNINSTALLVER')) {\n // we are installing PN right now so we might not have valid db connection yet\n $conn = pnDBGetConn(true);\n // hello database?\n if ($conn !== false && is_object($conn)) {\n $dbdriver = _adodb_getdriver($conn->dataProvider, $conn->databaseType, true);\n }\n } else {\n $dbdriver = DBConnectionStack::getConnectionInfo(null, 'dbdriver');\n }\n return $dbdriver;\n }", "title": "" }, { "docid": "51b02413e3bb709cf02612ea3db0710f", "score": "0.5809493", "text": "public function info()\n\t{\n\t\treturn $this->server->getServerInfo();\n\t}", "title": "" }, { "docid": "c0c713070bf8486fb00dfba8cbd6e36b", "score": "0.5808007", "text": "public function driverName()\n {\n return $this->connection->getAttribute(\\PDO::ATTR_DRIVER_NAME);\n }", "title": "" }, { "docid": "b9499d8ad89f59aa66139829229fffd1", "score": "0.58065385", "text": "public function isDriver();", "title": "" }, { "docid": "e5f6f1c11bb8d59aa51c443b120aa030", "score": "0.5799106", "text": "public function getDriver()\n {\n try {\n return $this->pdo->getAttribute(PDO::ATTR_DRIVER_NAME);\n } catch (PDOException $e) {\n ConnectionException::pdoError($e->getMessage(), $e->getCode());\n }\n }", "title": "" }, { "docid": "bd2a382daf297b81966689c1496cb8e6", "score": "0.5788692", "text": "public function GetInfo()\n\t{\n\t\t$this->Discover();\n\t\t$this->GetActivities();\n\t}", "title": "" }, { "docid": "29855e7cdec269ae491292bd5a081f09", "score": "0.57862306", "text": "public function driver() {\n return $this->belongsTo('Paxifi\\Store\\Repository\\Driver\\EloquentDriverRepository', 'driver_id', 'id');\n }", "title": "" }, { "docid": "1d465bccd4a70151242507a8da74d0f3", "score": "0.5785567", "text": "public function getName(): string\n {\n return $this->getCurrentDriver()->getName();\n }", "title": "" }, { "docid": "e4884a7984861ef4f44609709c54117b", "score": "0.5781695", "text": "public function getInfo()\n {\n }", "title": "" }, { "docid": "1c92ec03410d273051d771b30f107d2f", "score": "0.57697946", "text": "public function describe() {\n $response = $this->execute(\"GET\", \"\");\n return $this->driver->GetJSONValue($response);\n }", "title": "" }, { "docid": "907131eaf2280d3dd368e58db20ce54c", "score": "0.5761248", "text": "public static function getDriverName(): string {\n $driver = self::getBestMatchingDriver();\n\n return apply_filter($driver, 'cache_driver_name');\n }", "title": "" }, { "docid": "f5112895eedfb615b0c67abdfa6551f3", "score": "0.5753697", "text": "function getCapabilityInfo() {\n\t\t\t\n\t\t\t$query = \"select * from tbl_capabilities where is_active=1\";\t\t\t\n\t\t\t$rs = $this->Execute($query);\n\t\t\t$capability = array();\n\t\t\t\n\t\t\twhile($row = $rs->FetchRow())\n\t\t\t{\n\t\t\t\t$capability_id = $row['id'];\n\t\t\t\t$capability_name = htmlspecialchars_decode(stripslashes($row['capability_name']));\n\t\t\t\t$capability[$capability_id] = $capability_name;\n\t\t\t}\n\t\t\t\n\t\t\treturn $capability;\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "8bbf347414fb7981c657f803add79eb1", "score": "0.57518536", "text": "public function getCapabilities();", "title": "" }, { "docid": "ca58b7e5b2f83e60bc93b5bdce73317c", "score": "0.5738967", "text": "public static function driver () {\n\t\t$m = conf ('Database', 'master');\n\t\treturn $m['driver'];\n\t}", "title": "" }, { "docid": "2a481d6759061b6df6f53d861aec787c", "score": "0.57316756", "text": "public function getInformation($name);", "title": "" }, { "docid": "fae26bed9713cca4b6f843340d9c78e8", "score": "0.572484", "text": "abstract public function getCapabilities(): object;", "title": "" }, { "docid": "98ed01679de6e9855cc683b4004e7472", "score": "0.57175624", "text": "function getAllBusDrivers(){\n\t\ttry{\n\t\t\t$data = array();\n\t\t\t$stmt = $this->db->prepare(\"SELECT * \n\t\t\t\t\t\t\t\t\t\tFROM bus_driver\");\n\t\t\t$stmt->execute();\n\n\t\t\t$data = $stmt->fetchAll(PDO::FETCH_CLASS,'busDriver');\n\n\t\t\treturn $data;\n\t\t}\n\t\tcatch(PDOException $e){\n\t\t\techo \"getAllBusDrivers - \".$e->getMessage();\n\t\t\tdie();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "77b7d6688207f460e2fd506b91811b22", "score": "0.57153904", "text": "public function driverName()\n {\n return $this->read('default');\n }", "title": "" }, { "docid": "a038ad55f7de0f0ccd14d2fdc39ffdd2", "score": "0.57007855", "text": "public function get_info(): array\n\t{\n\t\t// Declare\n\t\t$infos = [];\n\n\t\t// Load settings\n\t\t$settings = Configs::get();\n\n\t\t// About Imagick version\n\t\t$imagick = extension_loaded('imagick');\n\t\tif ($imagick === true) {\n\t\t\t$imagickVersion = @Imagick::getVersion();\n\t\t} else {\n\t\t\t// @codeCoverageIgnoreStart\n\t\t\t$imagick = '-';\n\t\t\t// @codeCoverageIgnoreEnd\n\t\t}\n\t\tif (\n\t\t\t!isset($imagickVersion, $imagickVersion['versionNumber'])\n\t\t\t|| $imagickVersion === ''\n\t\t) {\n\t\t\t// @codeCoverageIgnoreStart\n\t\t\t$imagickVersion = '-';\n\t\t// @codeCoverageIgnoreEnd\n\t\t} else {\n\t\t\t$imagickVersion = $imagickVersion['versionNumber'];\n\t\t}\n\n\t\t// About GD version\n\t\tif (function_exists('gd_info')) {\n\t\t\t$gdVersion = gd_info();\n\t\t} else {\n\t\t\t// @codeCoverageIgnoreStart\n\t\t\t$gdVersion = ['GD Version' => '-'];\n\t\t\t// @codeCoverageIgnoreEnd\n\t\t}\n\n\t\t// About SQL version\n\t\t// @codeCoverageIgnoreStart\n\t\ttry {\n\t\t\tswitch (DB::getDriverName()) {\n\t\t\t\tcase 'mysql':\n\t\t\t\t\t$dbtype = 'MySQL';\n\t\t\t\t\t$results = DB::select(DB::raw('select version()'));\n\t\t\t\t\t$dbver = $results[0]->{'version()'};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'sqlite':\n\t\t\t\t\t$dbtype = 'SQLite';\n\t\t\t\t\t$results = DB::select(DB::raw('select sqlite_version()'));\n\t\t\t\t\t$dbver = $results[0]->{'sqlite_version()'};\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'pgsql':\n\t\t\t\t\t$dbtype = 'PostgreSQL';\n\t\t\t\t\t$results = DB::select(DB::raw('select version()'));\n\t\t\t\t\t$dbver = $results[0]->{'version'};\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$dbtype = DB::getDriverName();\n\t\t\t\t\t$results = DB::select(DB::raw('select version()'));\n\t\t\t\t\t$dbver = $results[0]->{'version()'};\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} catch (QueryException $e) {\n\t\t\t$errors[] = 'Error: ' . $e->getMessage();\n\t\t\t$dbtype = 'Unknown SQL';\n\t\t\t$dbver = 'unknown';\n\t\t}\n\n\t\t// @codeCoverageIgnoreEnd\n\n\t\t// Output system information\n\t\t$infos[] = $this->line('Lychee Version (' . $this->versions['channel'] . '):', $this->lycheeVersion->format($this->versions['Lychee']));\n\t\t$infos[] = $this->line('DB Version:', $this->versions['DB']['version']);\n\t\t$infos[] = '';\n\t\t$infos[] = $this->line('composer install:', $this->versions['composer']);\n\t\t$infos[] = $this->line('APP_ENV:', Config::get('app.env')); // check if production\n\t\t$infos[] = $this->line('APP_DEBUG:', Config::get('app.debug') ? 'true' : 'false'); // check if debug is on (will help in case of error 500)\n\t\t$infos[] = '';\n\t\t$infos[] = $this->line('System:', PHP_OS);\n\t\t$infos[] = $this->line('PHP Version:', floatval(phpversion()));\n\t\t$infos[] = $this->line('Max uploaded file size:', ini_get('upload_max_filesize'));\n\t\t$infos[] = $this->line('Max post size:', ini_get('post_max_size'));\n\t\t$infos[] = $this->line($dbtype . ' Version:', $dbver);\n\t\t$infos[] = '';\n\t\t$infos[] = $this->line('Imagick:', $imagick);\n\t\t$infos[] = $this->line('Imagick Active:', $settings['imagick'] ?? 'key not found in settings');\n\t\t$infos[] = $this->line('Imagick Version:', $imagickVersion);\n\t\t$infos[] = $this->line('GD Version:', $gdVersion['GD Version']);\n\n\t\treturn $infos;\n\t}", "title": "" }, { "docid": "7c1423d9a5072fe211da39a3ab5760cd", "score": "0.56907886", "text": "public function getInfo()\n {\n return $this->_request('Info', static::API_PATH, 'getinfo');\n }", "title": "" }, { "docid": "45c3701e75dbd5d2d37736fc26811ec2", "score": "0.5690703", "text": "public function getAvailableDrivers(){\n return Self::$PDOInstance->getAvailableDrivers();\n }", "title": "" }, { "docid": "9c994c17f0cd6b7e8e1ad84f88496248", "score": "0.56901276", "text": "public function model()\n {\n return Driver::class;\n }", "title": "" }, { "docid": "0ff2833b894aac39a06fa86524e71ed0", "score": "0.5689942", "text": "public function getInfo ()\n {\n return $this->info;\n }", "title": "" }, { "docid": "c07fdb2b26257f09bf3af85974270121", "score": "0.56832016", "text": "abstract public function driver();", "title": "" }, { "docid": "28ceb38d2b7612b7586aafeace8a68ed", "score": "0.56741554", "text": "public function info()\n {\n return $this->method('info');\n }", "title": "" }, { "docid": "a4e4b2021f90046e64e8dfe2fd82fd9b", "score": "0.56644124", "text": "public function driverParameters($name)\n {\n return $this->read('drivers'.'.'.$name);\n }", "title": "" }, { "docid": "fe6dc7e608f862f8eb1f95c02bc1fe94", "score": "0.563058", "text": "public function info();", "title": "" }, { "docid": "815999d4cdf6cc9f6757873fd8401220", "score": "0.56241715", "text": "public function test_show_driver()\n {\n $this->actingAs(User::first());\n factory(User::class)->create([\n 'conductor_id'=>factory(Conductor::class)\n ]);\n $response = $this->get('/driver/2');\n $response->assertStatus(200);\n $response->assertViewIs('driver.show');\n $response->assertViewHasAll(['driver']);\n }", "title": "" }, { "docid": "26f4b1f67472445730b1e65795015c65", "score": "0.56230074", "text": "public function getCacheDriverName() : string\n {\n return strtolower($this->driverType);\n }", "title": "" }, { "docid": "a93c1b1c623a30491d5092d593dc6d7f", "score": "0.56187314", "text": "protected function getDriver(): \\Nails\\Currency\\Interfaces\\Driver\n {\n /** @var Driver $oDriverService */\n $oDriverService = Factory::service('CurrencyDriver', Constants::MODULE_SLUG);\n $oDriver = $oDriverService->getEnabled();\n\n if (empty($oDriver)) {\n throw new DriverNotDefinedException(\n 'No currency driver has been defined.'\n );\n }\n\n return $oDriverService->getInstance($oDriver);\n }", "title": "" }, { "docid": "aa92c83e394b8c60135358f319aa7d25", "score": "0.56133544", "text": "public function show(Driver $driver)\n {\n \treturn view('admin.drivers.show')->with( 'driver', $driver );\n }", "title": "" }, { "docid": "f29e78de9954b2d682189ea7428ce8da", "score": "0.55963564", "text": "final public function getInfo(){}", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "680b21480eebc3dd9b334fc88ff28c76", "score": "0.55923814", "text": "public function getInfo()\n {\n return $this->info;\n }", "title": "" }, { "docid": "14199cb63cabd0329f6d239102ad51f0", "score": "0.55833876", "text": "public function getInformation()\n\t{\n\t\treturn $this->information;\n\t}", "title": "" } ]
c373435a0e447fb0d174787017becb93
Convert the hash into the original ID
[ { "docid": "bfd6121b4b5f6978bf706b1c97c53738", "score": "0.0", "text": "public function decode($value)\n {\n return $this->hashids->decode($value);\n }", "title": "" } ]
[ { "docid": "fa9a66abc0d3d6a050b02eb060eaa3f0", "score": "0.72080517", "text": "public function hashid()\n\t{\n\t\treturn $this->buildHashidUsing()->encode($this->getKey());\n\t}", "title": "" }, { "docid": "38ee2ac02032ebd9f55dee73a744de15", "score": "0.6587801", "text": "private function hashMapper($hash) {\n return substr($hash, 0, 2) . '/' . $hash;\n }", "title": "" }, { "docid": "0cecc4b9bfcb51c2d5ef09c693504126", "score": "0.640829", "text": "public function toUserID() {\n if (preg_match('/^STEAM_/', $this->id)) {\n $split = explode(':', $this->id);\n return $split[2] * 2 + $split[1];\n } elseif (preg_match('/^765/', $this->id) && strlen($this->id) > 15) {\n $uid = bcsub($this->id, '76561197960265728');\n if ($uid < 0) {\n $uid += 4294967296;\n }\n return $uid;\n } else {\n return $this->id;\n }\n }", "title": "" }, { "docid": "5501829805595d1e6929124f5745cefa", "score": "0.62513036", "text": "function hashDecode(string $hash): int{\n try {\n $decs = \\Hashids::decode($hash);\n return $decs[0];\n }catch (Exception $exception){\n return 0;\n }\n }", "title": "" }, { "docid": "cc04912eaf16f7426b5ac7c7454f1094", "score": "0.62335634", "text": "private function _generate_new_hash()\n\t{\n\t\t// Set up a new instance of hashids\n\t\t$hashids = new Hashids\\Hashids(HASH_SALT, 1, $this->alphabet);\n\n\t\t// Set the default timezone\n\t\tdate_default_timezone_set(TIMEZONE);\n\n\t\t// Get the daily count\n\t\t$dailycount = $this->_get_daily_count();\n\n\t\t// Let's check if the user passed in an ID to hash\n\t\t$passed_id = $this->_get_param('id');\n\t\tif ( $passed_id ) {\n\t\t\t$id = intval($passed_id . $dailycount);\n\t\t} else {\n\t\t\t// No id passed in?\n\t\t\t// Get the current timestamp as a number that represents YYMMDD\n\t\t\t// We'll append the daily count to it and use it as an ID\n\t\t\t$datestr = date('ymd');\n\t\t\t$id = intval($datestr . $dailycount);\n\t\t}\n\t\t// Generate the hash\n\t\t$hash = $hashids->encrypt($id);\n\n\t\t// Check to see if the hash is already in use\n\t\tif ( $this->_does_hash_exist($hash) ) {\n\t\t\t$this->_increment_daily_count();\n\t\t\t$this->_generate_new_hash();\n\t\t}\n\n\t\treturn $hash;\n\t}", "title": "" }, { "docid": "8d9603c8f074427a13f0b99f406b7c69", "score": "0.61996007", "text": "public function hash() {\n $id = ($this->regatta instanceof FullRegatta) ? $this->regatta->id : $this->regatta;\n return sprintf('%s-%s-%s', $id, $this->activity, $this->argument);\n }", "title": "" }, { "docid": "1b4df9b16c382fb4def3a8a19cf6ce43", "score": "0.6181549", "text": "public function getHashedIdAttribute()\n {\n return static::getEncodedId($this);\n }", "title": "" }, { "docid": "05fc0ca8a55d9054b362f613e91fd527", "score": "0.61615354", "text": "protected function id( $id ) {\n return substr(md5($this->token.strtolower($id)), 0, self::ID_LENGTH);\n }", "title": "" }, { "docid": "5a61690543b1ccd9ba1f90da1dbad483", "score": "0.61562514", "text": "public function getId()\n {\n return $this->number . '_' . $this->sha;\n }", "title": "" }, { "docid": "5afbb95ff66271339874db06e0a0eef7", "score": "0.6128719", "text": "public function get_id($hash = \\false, $fn = 'md5')\n {\n }", "title": "" }, { "docid": "9045907e22ebbb0daebf17429391224a", "score": "0.6106394", "text": "function booktool_epubexport_generate_uuid($hash) {\n $first = substr($hash, 0, 6);\n $second = substr($hash, 6, 4);\n $third = substr($hash, 10, 4);\n $fourth = substr($hash, 14, 4);\n $fifth = substr($hash, 18, 12);\n\n $uuid = \"$first-$second-$third-$fourth-$fifth\";\n\n return $uuid;\n}", "title": "" }, { "docid": "6cac13b159f261a0865ee3e961e79dff", "score": "0.6085874", "text": "private static function convertDigits(&$hash)\n {\n $newHash = '';\n for ($i = 0; $i < strlen($hash); $i++) {\n $symbol = $hash[$i];\n if (!is_numeric($symbol)) {\n $symbol = array_search($symbol, self::$digits);\n }\n $newHash .= $symbol;\n }\n $hash = $newHash;\n }", "title": "" }, { "docid": "96dcb20cca3437389ab8860fe159f5c8", "score": "0.60768974", "text": "function hashid_decode($val = '')\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->library('Cifire_Hashids');\n\t\t$result = $CI->cifire_hashids->decode($val);\n\n\t\tif (count($result) > 0)\n\t\t\treturn $result[0];\n\t\telse\n\t\t\treturn NULL;\n\t}", "title": "" }, { "docid": "25aa9d99007ad58c60b6ed1344d00692", "score": "0.6054339", "text": "public function getIdShoeHash() {\n return base64_encode($this->idShoe);\n }", "title": "" }, { "docid": "5cc48d3d32fa4bbcbb26f3f1003a0616", "score": "0.6040271", "text": "public function makeHash()\n\t{\n\t\t$str = $this->user->id . $this->user->email . $this->created_at->format(\"Y-m-d\") . $this->id;\n\n\t\t// add trailing random chars\n\t\treturn str_random(13) . md5($str) . str_random(rand(12, 20));\n\t}", "title": "" }, { "docid": "9379a6ea6f2298e55489ca1d7d591f2d", "score": "0.603757", "text": "function hashEncode($int){\n return \\Hashids::encode($int);\n }", "title": "" }, { "docid": "018f6a6fff52f358542248f767a3e4aa", "score": "0.60364324", "text": "public function getID()\n {\n return md5(strval($this));\n }", "title": "" }, { "docid": "2e020592899cfb60063477a45cc6988f", "score": "0.60222334", "text": "public static function hash($id)\n {\n return get_called_class() . '_' . $id;\n }", "title": "" }, { "docid": "f235486f319c42d6548c13a28add542d", "score": "0.5998794", "text": "public function toSteamID() {\n if (is_numeric($this->id) && strlen($this->id) >= 16) {\n $this->id = bcsub($this->id, '76561197960265728');\n //If subtraction goes negative, shift value up\n if ($this->id < 0) {\n $this->id += 4294967296;\n }\n $z = bcdiv($this->id, '2');\n } elseif (is_numeric($this->id)) {\n $z = bcdiv($this->id, '2');\n } else {\n return $this->id;\n }\n $y = bcmod($this->id, '2');\n return 'STEAM_0:' . $y . ':' . floor($z);\n }", "title": "" }, { "docid": "e3c52825d43c68d6cec163f396c611cc", "score": "0.5972433", "text": "public function getIdMailboxHash() {\n return base64_encode($this->idMailbox);\n }", "title": "" }, { "docid": "aa1759f3e4d3b3d956cf69ba4b20fc73", "score": "0.59471154", "text": "public function decode($hashed);", "title": "" }, { "docid": "e74d5846c16e876551db6fd0f1c5b597", "score": "0.5944458", "text": "function id_hash($id,$levels) {\n\t\t$hash = \"\" . $id % 10 ;\n\t\t$id /= 10 ;\n\t\t$levels -- ;\n\t\twhile ( $levels > 0 ) {\n\t\t\t$hash .= \"/\" . $id % 10 ;\n\t\t\t$id /= 10 ;\n\t\t\t$levels-- ;\n\t\t}\n\t\treturn $hash;\n\t}", "title": "" }, { "docid": "002c99963b42d6bbd9856dad816647e6", "score": "0.59355545", "text": "public function getOriginalId();", "title": "" }, { "docid": "8282ecc4784494d562bbfac4de2f89f0", "score": "0.5934546", "text": "public function getHashId()\n {\n //return spl_object_hash($this);\n if (is_null($this->hashCode)) {\n $this->hashCode = hash(\"sha256\", rand());\n }\n\n return $this->hashCode;\n }", "title": "" }, { "docid": "dbefd5cc9c712bdb107df63183e9acff", "score": "0.58882093", "text": "public function lookupHash(): string;", "title": "" }, { "docid": "b0c50ed7f54341e3a765953108ddaddd", "score": "0.58853394", "text": "public function getHash(): string;", "title": "" }, { "docid": "1302a16c7486a6a870a17d3c94672435", "score": "0.5881009", "text": "protected function getHash($id)\n {\n return $this->type . ':' . $id;\n }", "title": "" }, { "docid": "affc4c4ed2db64ae218db4a518a5237b", "score": "0.587456", "text": "public function hashIdentifier($identifier)\n {\n }", "title": "" }, { "docid": "1f7d5f34ad19a6f4c99b38966946b520", "score": "0.5873723", "text": "public function make_id($element) {/*{{{*/\n if (isset($element['id'])) {\n return self::hsc($element['id']);\n }\n if (isset($element['name'])) {\n return self::hsc($element['name']);\n }\n return substr(md5(mt_rand()), 0, 4);\n }", "title": "" }, { "docid": "cc3abd5990b66d8069510a497c606ca6", "score": "0.5862865", "text": "function hr_get_training_hash($training_id)\n\t{\n\t\t$hash = '';\n\t\t$CI = & get_instance();\n\t\t$CI->db->where('training_id', $training_id);\n\t\t$training = $CI->db->get(db_prefix().'hr_position_training')->row();\n\n\t\tif($training){\n\t\t\t$hash .= $training->hash;\n\t\t}\n\t\treturn $hash;\n\t}", "title": "" }, { "docid": "0ec7668f8244c1a2e25021e0854d688a", "score": "0.58593315", "text": "public static function hash()\n {\n $hash = substr(bin2hex(openssl_random_pseudo_bytes(8)), 0, 8);\n if (is_null(self::where('hash', '=', $hash)->first())) {\n return $hash;\n } else return self::hash();\n }", "title": "" }, { "docid": "cba5f0597a1852d481962d97a2bf0b47", "score": "0.58483166", "text": "public function getIdentityHash()\n {\n $value = $this->getSystemOption('identity_hash');\n if (is_scalar($value)) {\n return strval($value);\n }\n return '';\n }", "title": "" }, { "docid": "29bde27d7c756ca5dbdb14f6a58cd6e1", "score": "0.58468837", "text": "private function _convertHash($hash)\n\t{\n\t\t$split = explode('/',$hash);\n\t\t$_GET['controller'] = $split[0];\n\t\t$_GET['output'] = $split[1];\n\t\t$_GET['options'] = $split[2];\n\t\t$_GET['options'] = str_replace('e.parameter',$this->_url,$_GET['options']);\n\t}", "title": "" }, { "docid": "684b78fb2f27288f56a0e8f7a715d947", "score": "0.58307904", "text": "protected function formatHash($hash)\n {\n if (strpos(get_class($this->implementation), 'Big') !== false){\n return $this->mode === static::HEXADECIMAL ? $hash->toHex() : $hash->toString();\n }\n \n return $this->mode === static::HEXADECIMAL ? dechex($hash) : $hash;\n }", "title": "" }, { "docid": "eb32967fc47d0ecf788694dc8eb1ae44", "score": "0.576302", "text": "protected function normalizeCid($cid) {\n return Crypt::hashBase64($cid);\n }", "title": "" }, { "docid": "1e9a6f202fdb72a26b482b5c02f27d0b", "score": "0.5759308", "text": "public function toIdentifier();", "title": "" }, { "docid": "69ddf564470654ff3ae8d8ff24e940ff", "score": "0.5755389", "text": "function hashid_encode($val = '')\n\t{\n\t\t$CI =& get_instance();\n\t\t$CI->load->library('Cifire_Hashids');\n\t\t$result = $CI->cifire_hashids->encode($val);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "67b77257b967b5d71c55a6345ffaa3ea", "score": "0.5742499", "text": "public function Id2Url($id)\n {\n $byte1[] = $this->Str2Arr('3go8&$8*3*3h0k(2)2');\n $byte2[] = $this->Str2Arr($id);\n $magic = $byte1[0];\n $song_id = $byte2[0];\n for ($i = 0; $i < count($song_id); $i++) $song_id[$i] = $song_id[$i] ^ $magic[$i % count($magic)];\n $result = base64_encode(md5($this->Arr2Str($song_id), 1));\n $result = str_replace('/', '_', $result);\n $result = str_replace('+', '-', $result);\n return $result;\n }", "title": "" }, { "docid": "76343e43f891da41fc6859167a8783c0", "score": "0.5704037", "text": "public function toCommunityID() {\n if (preg_match('/^STEAM_/', $this->id)) {\n $parts = explode(':', $this->id);\n return bcadd(bcadd(bcmul($parts[2], '2'), '76561197960265728'), $parts[1]);\n } elseif (is_numeric($this->id) && strlen($this->id) < 16) {\n return bcadd($this->id, '76561197960265728');\n } else {\n return $this->id;\n }\n }", "title": "" }, { "docid": "b3dcdd957209211b16fcac3316d53542", "score": "0.5693862", "text": "public function id_decrypt($str) {\n return $str / 55;\n }", "title": "" }, { "docid": "625ada12e18aee7baa9071e369c969be", "score": "0.56894153", "text": "protected function genID($email, $hash) {\n $loop = 0;\n while (true) {\n $time = time();\n $loop++;\n $userid = substr(base_convert(md5($email . $hash . $time . $loop), 16, 10), 0, 10);\n if (!Account::accountExistsId($userid)) {\n return $userid;\n }\n error_log('colision avoided');\n }\n }", "title": "" }, { "docid": "8816dbadd2d981c44b8cfedb97d23ae3", "score": "0.5661615", "text": "public function getID()\n {\n return md5(spl_object_hash($this->listing));\n }", "title": "" }, { "docid": "dbc1a40487c1f1b1be392ec144a1d592", "score": "0.56555706", "text": "function decryptUserIdmail($encryptedId) {\n $id = md5($encryptedId - 1290 * 3);\n return $id;\n}", "title": "" }, { "docid": "e567eac9aca3a2c3193602d3305d2386", "score": "0.5654938", "text": "public function hash() {\n $seed = $this->id . $this->name . $this->owner . $this->status . $this->type . $this->copy_count;\n return hash(\"sha256\", $seed);\n }", "title": "" }, { "docid": "1e517e7be22ea0d768beada4357801ae", "score": "0.564883", "text": "function file2hash($xml) {\n // 2010.04, ahto. for digidoc 1.0, 1.1 ja 1.2 we don't compute the hash,\n // keep it as it is.\n if ($this->format == 'SK-XML'\n || $this->format == 'DIGIDOC-XML'\n && ($this->version == '1.1' || $this->version == '1.2')\n || preg_match(\"'ContentType\\=\\\"HASHCODE\\\"'s\", $xml)) {\n return $xml;\n }\n\n preg_match(\"'Id=\\\"(.*)\\\"'Us\", $xml, $match);\n $Id = $match[1]; // Find out the file's id\n File::saveLocalFile( $this->workPath . $Id, $xml); // save the file\n\n // 2009.09.07, Ahto, improved finding a hashcode over a datafile tag\n return $this->getDataFileBlockHashCoded($xml);\n }", "title": "" }, { "docid": "2b6a9ecf3651dbaa9e8370a4b281f793", "score": "0.56465685", "text": "private function getHash()\n {\n if ($this->_hash === null)\n $this->_hash = Yii::app()->func->hash(Yii::app()->func->serializer($this));\n\n return $this->_hash;\n }", "title": "" }, { "docid": "a6ef974e8751997dfe882c8a1233162e", "score": "0.56261766", "text": "public function decrypt_id($data)\n\t{\n\t\t$data = str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT);\n\t\t$data = base64_decode($data);\n\t\t$data = (double) $data / 4452.81;\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "87ffea3897ce4713731a176a57d8a0a7", "score": "0.5616189", "text": "public function id_encrypt($str) {\n return $str * 55;\n }", "title": "" }, { "docid": "405299fe9706b09929b19eb3ed4b3196", "score": "0.5603534", "text": "function getHash() {\n\t\tif( $this->hash == 0 )\n\t\t\t$this->hash = Hash::hashOfString($this->name);\n\t\treturn $this->hash;\n\t}", "title": "" }, { "docid": "2b8e2cbce5e7aecab6892e6235625707", "score": "0.5592468", "text": "public function get_hash() {\r\n\t\treturn ($this->hash);\r\n\t}", "title": "" }, { "docid": "a0065f0356381e141f2bda35f6b07354", "score": "0.5578714", "text": "public function hashCode() {\n return sprintf('%u', crc32($this->_str));\n }", "title": "" }, { "docid": "dbfe990d0fdd7f484854848c1f1bcc4d", "score": "0.5574164", "text": "function createMongoDbLikeId($timestamp, $hostname, $processId, $id)\r\n{\r\n\t// Building binary data.\r\n\t$bin = sprintf(\r\n\t\t\"%s%s%s%s\",\r\n\t\tpack('N', $timestamp),\r\n\t\tsubstr(md5($hostname), 0, 3),\r\n\t\tpack('n', $processId),\r\n\t\tsubstr(pack('N', $id), 1, 3)\r\n\t);\r\n\r\n\t// Convert binary to hex.\r\n\t$result = '';\r\n\tfor ($i = 0; $i < 12; $i++) {\r\n\t\t$result .= sprintf(\"%02x\", ord($bin[$i]));\r\n\t}\r\n\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "b8ea733e33add8b5233c961ae23e59ec", "score": "0.55732805", "text": "public function getId(string $uri): string\n {\n return hash('sha256', $uri);\n }", "title": "" }, { "docid": "4d906460d344f548d85e46f565ad8e33", "score": "0.5567076", "text": "public function hash()\n {\n return $this->hash;\n }", "title": "" }, { "docid": "e47303688053815ab494108164f015ce", "score": "0.55655915", "text": "public function hash()\n {\n return $this->lastHash ?: serialize($this);\n }", "title": "" }, { "docid": "e47303688053815ab494108164f015ce", "score": "0.55655915", "text": "public function hash()\n {\n return $this->lastHash ?: serialize($this);\n }", "title": "" }, { "docid": "5fb33f79d3b2ee6ac126c071c41c5b09", "score": "0.55637234", "text": "private function convertHashToUrl(string $hash) :string\n {\n $hashHelper = new HashHelper();\n return $hashHelper->compute($hash);\n }", "title": "" }, { "docid": "9fd84eb8ea3f1917640f3de59cbd55b5", "score": "0.5552931", "text": "public function getIdentity()\n {\n return hash(\"sha256\", self::MESSAGE_IDENTITY);\n }", "title": "" }, { "docid": "ca3b68c6050df2fe3133640bd9e15a1e", "score": "0.55373", "text": "public function __toString(){\n\t\treturn '0x'.$this->hash->getHex();\n\t}", "title": "" }, { "docid": "eb93613a6f5c15e49b83679188a5407b", "score": "0.55297554", "text": "private function makeId( $nameId ) {\r\n\r\n //ID wird ausgefiltert\r\n return substr( strstr( $nameId, '#' ), 1 );\r\n }", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.55248576", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.55248576", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.55248576", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.55248576", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.55248576", "text": "public function getHash();", "title": "" }, { "docid": "3844625c46628b0910ba63292e04fd18", "score": "0.55248576", "text": "public function getHash();", "title": "" }, { "docid": "4ca8839999bbaddf4d7da916fb5f2eda", "score": "0.55132085", "text": "public function id(): string\n\t{\n\t\tif ($id = $this->uri->host()) {\n\t\t\treturn $id;\n\t\t}\n\n\t\t// generate a new ID (to be saved in the content file)\n\t\t$id = static::generate();\n\n\t\t// store the new UUID\n\t\t$this->storeId($id);\n\n\t\t// update the Uri object\n\t\t$this->uri->host($id);\n\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "31e80c604c7e3f42a8b28e0cd866b377", "score": "0.55089104", "text": "function hash2file($xml) {\n if( preg_match(\"'ContentType\\=\\\"HASHCODE\\\"'s\", $xml) ) {\n preg_match(\"'Id=\\\"(.*)\\\"'Us\", $xml, $match);\n $Id = $match[1];\n $nXML = File::readLocalFile($this->workPath . $Id);\n return $nXML;\n } else {\n return $xml;\n } //else\n }", "title": "" }, { "docid": "f57a7f14d6f9e43ece897814d93a344d", "score": "0.54973745", "text": "public function newId(): string\n {\n $bytes = random_bytes(16);\n\n /**\n * set MSBs of octet 8 to 10xxxxxx. to indicate rfc4122 compliance\n *\n * @see https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.1\n */\n $bytes[8] = $bytes[8]\n & \"\\x3F\" // 0 the first 2 bits\n | \"\\x80\" // raise 1st bit to 1\n ;\n\n /**\n * set MSBs of octet 6 to 0100xxxx. to indicate v4\n *\n * @see https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.3\n */\n $bytes[6] = $bytes[6]\n & \"\\x0F\" // 0 the first 4 bits\n | \"\\x40\" // raise 2nd bit to 1\n ;\n\n return preg_replace(\n '/^(.{8})(.{4})(.{4})(.{4})(.{12})$/',\n '\\\\1-\\\\2-\\\\3-\\\\4-\\\\5',\n bin2hex($bytes),\n );\n }", "title": "" }, { "docid": "68960e9a4ff0f19f8e5431bfda03bc56", "score": "0.54929334", "text": "public function hashOf($str);", "title": "" }, { "docid": "c9f1739007ffc7094c98f27f4b8020c2", "score": "0.5478885", "text": "private function _get_hash()\n\t{\n\t\t$this->_hash = md5($this->user_data['user_id'] . '-' . md5($this->user_data['user_username'] . '-' . $this->user_data['user_password']));\n\t}", "title": "" }, { "docid": "c4f87a44d2401f40b0a387476bce24aa", "score": "0.5470976", "text": "public function getPrefixedHashIdAttribute()\n {\n return 'variant-' . $this->getHashIdAttribute();\n }", "title": "" }, { "docid": "1f4fb929e8e751d5f58cc4f6b409725e", "score": "0.5469624", "text": "public function hashCode() {\n return $this->__id;\n }", "title": "" }, { "docid": "fe6c53b57073af86e13ed861564f19f2", "score": "0.5465523", "text": "protected function getHash($entity_id) {\n\n if ($hash = db_query(\"SELECT hash FROM {feeds_item} WHERE entity_type = :type AND entity_id = :id\", array(':type' => $this->entityType(), ':id' => $entity_id))->fetchField()) {\n // Return with the hash.\n return $hash;\n }\n return '';\n }", "title": "" }, { "docid": "45ca4096163112047b6761153115c8f2", "score": "0.5463903", "text": "public function getId() {\n\t if ($this->id) {\n\t return $this->id;\n\t }\n\n\t\t$id = serialize($this->callback->__toString());\n\t\t$id .= serialize($this->minute);\n\t\t$id .= serialize($this->hour);\n\t\t$id .= serialize($this->day);\n\t\t$id .= serialize($this->month);\n\t\t$id .= serialize($this->dayOfWeek);\n\t\t$this->id = md5($id);\n\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "76f41a6382707372b59b4dfd0b00207b", "score": "0.5463557", "text": "private function getID($mysqli, $hash_code){\n $sql = \"SELECT id FROM `sheet_code` WHERE hash='$hash_code'\";\n $id = -1;\n if($result = $mysqli->query($sql) ) {\n $row = $result->fetch_assoc();\n $id = $row[\"id\"];\n if(empty($id))\n {\n $id = -1;\n }\n $result->free();\n }\n // print(\"ID: $id .\\n\");\n return $id;\n }", "title": "" }, { "docid": "8fd342e6051bba78c1e66349c32a8689", "score": "0.54611474", "text": "public function hash();", "title": "" }, { "docid": "48eff92c4f2db54f0f8c3e4ae542ab36", "score": "0.5450033", "text": "public static function shortEntityId($entity)\n {\n $id = is_string($entity) ? $entity : spl_object_hash($entity);\n return substr(md5($id), 0, 9);\n }", "title": "" }, { "docid": "39078f202965672133b17c9ad39b74c6", "score": "0.5449559", "text": "function devuelve_id_usuario($link, $hash){\n\t\tif($hash == ''){\n\t\t\treturn 0;\n\t\t}\n\n\t\t$id_usuario = coger_campo_misma_tabla( $link, 'id_usuario', '4887_usuarios', 'hash', $hash);\n\n\t\treturn (int) $id_usuario;\n\n\t}", "title": "" }, { "docid": "a06e06037fc55064b4896f5f80bbe7fe", "score": "0.54325914", "text": "public function getHash(): string\n\t{\n\t\treturn $this->parse( false )['hash'];\n\t}", "title": "" }, { "docid": "4b01b54222fac5026c87590fdc193a8a", "score": "0.5432192", "text": "public function getUniqueId(): string\n\t{\n\t\treturn hash('sha256', $this->getRoute() . round(microtime(true) * 1000));\n\t}", "title": "" }, { "docid": "3bfe0d631f6cf8d7ce92c06703b53ad5", "score": "0.543141", "text": "protected function createPostUniqueId(){\n return hash('sha1',$this->getChatId().time().rand(1000,9999)); \n }", "title": "" }, { "docid": "1fce6c83a528d417952679404bda3716", "score": "0.542797", "text": "private function cache_id() {\n if ($this->_identifier) {\n return $this->_name . '_' . $this->_identifier . '_' . md5(get_class($this) . implode('', $this->_args));\n } else {\n return $this->_name . '_' . md5(get_class($this) . implode('', $this->_args));\n }\n }", "title": "" }, { "docid": "9635d3c98d156a469b9a31a9c078140f", "score": "0.54245496", "text": "public function getHash(): string\n {\n return $this->hash;\n }", "title": "" }, { "docid": "c0a462096c717e207b67b65a0844f033", "score": "0.54218507", "text": "function get_id(): mixed;", "title": "" }, { "docid": "8ae8cd9b91e3deae4944cd8106c0009f", "score": "0.541601", "text": "public static function encodePhotoId($input, $process = 'encode')\n\t{\n\t\t$output = '';\n\t\tif($process == 'encode')\n\t\t{\n\t\t\t$output = ((($input * 112 ) - 231)*13)+7;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$output = ((($input - 7)/13)+231)/112;\n\t\t}\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "5d21bb51f04ef922c23b18c717d35b92", "score": "0.5398423", "text": "public function getUniqueId(): string;", "title": "" }, { "docid": "803bb3c40f774c2705fa2d68f35430f9", "score": "0.53925586", "text": "private function createId()\n {\n return sha1(time() . rand(2298, time()) . md5(microtime() . $this->name . rand(4868, time())) . $this->name);\n }", "title": "" }, { "docid": "4d1f74d1c4ffde59baf1ca709db63c1a", "score": "0.53880364", "text": "private function normalizeIdentifier(string $identifier) : string\n {\n if (strlen($identifier) <= 64) {\n return $identifier;\n }\n\n if (!isset($this->identifierMap[$identifier])) {\n $this->identifierMap[$identifier] = 'fk_' . md5($identifier);\n }\n\n return $this->identifierMap[$identifier];\n }", "title": "" }, { "docid": "4a8ce0cc72e645099ca25f1d01de825c", "score": "0.5386027", "text": "protected function hashLockClause_getHashInt() {\n\t\t$hashStr = '';\n\t\tif (\\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::inList($this->lockHashKeyWords, 'useragent')) {\n\t\t\t$hashStr .= ':' .'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:25.0) Gecko/20100101 Firefox/26.0';\n\t\t}\t\t\n\t\treturn \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::md5int($hashStr);\n\t}", "title": "" }, { "docid": "aa6f3077591c518aa707bc19f95ca00d", "score": "0.537818", "text": "public function decode($hash)\n {\n $results = $this->hashids->decode($hash);\n\n if (count($results) === 0) {\n throw new InvalidHashException;\n }\n\n return (int) $results[0];\n }", "title": "" }, { "docid": "fc1f16282e2ead1fa7acc54d050948b5", "score": "0.5377799", "text": "public function hashIdentifier($identifier)\n {\n $ret = sha1($identifier);\n $this->logger->debug(\"hashIdentifier($identifier): $ret\");\n return $ret;\n }", "title": "" }, { "docid": "af8718408e446e57022fd6d136d656ce", "score": "0.5374051", "text": "public function getHash(): string\n {\n return AbstractEntity::generateUniqueHash($this->getUniqueKeyColumns());\n }", "title": "" }, { "docid": "874c789f53a56957e66b1d3fee95c5a0", "score": "0.53709316", "text": "public function getHash()\n {\n return strtoupper( sha1( $this->info->encode() ) );\n }", "title": "" }, { "docid": "5a16924d43481c73a62780d5c53bf744", "score": "0.53622776", "text": "function hacklib_id($x)\n{\n return $x;\n}", "title": "" }, { "docid": "67a2f2b4825a9d6bae1281455449e8ed", "score": "0.5362277", "text": "function hash($text);", "title": "" }, { "docid": "ce31439d946be821f1582127d553762c", "score": "0.5360938", "text": "public function getAuthIdentifier()\n {\n return $this->getConvertedGuid();\n }", "title": "" }, { "docid": "2aa7ce1350e6823d585ce0756b5b4f3a", "score": "0.5359206", "text": "private function get_instanceHash($hash) {\n if (empty($hash)) {\n $hash = Session::get('hashid', null);\n }\n // get from address suppose to be only out of facebook or for preview porpuse\n $app = App::where('app_user_apps_publish_page_id', '=', $hash)->where('app_apps_application_id', '=', APPSOLUTE_APPID)->first();\n // dd($app);\n if (empty($app->status) or $app->status != 'A')\n return;\n if (!empty($app->app_user_apps_publish_page_id)) {\n // Session::flush();\n Session::put('hashid', $hash);\n Session::put('return_url', URL::base().'/'.$hash);\n Session::put('fbuid', 0);\n Session::put('fbpage', '');\n Session::put('locale', 'en_US');\n Session::put('country', 'us');\n Session::put('age', 13);\n Session::put('liked', true);\n Session::put('isadmin', false);\n return $app->app_user_apps_publish_page_id;\n } \n Session::flush();\n return;\n }", "title": "" }, { "docid": "004f56da706c9db221919633a4a9a61d", "score": "0.5357643", "text": "protected function generateUniqueId() {\n\t\t// There seems to be an error in the gaforflash code, so we take the formula\n\t\t// from http://xahlee.org/js/google_analytics_tracker_2010-07-01_expanded.js line 711\n\t\t// instead (\"&\" instead of \"*\")\n\t\treturn ((Util::generate32bitRandom() ^ $this->generateHash()) & 0x7fffffff);\n\t}", "title": "" }, { "docid": "2bbace011241e9b36a30dc0b233bb8c2", "score": "0.5356077", "text": "public function newHash(){\n $hash = $this->string->rand_string(20);\n $existe = $this->getByHash($hash);\n if(!is_null($existe)){\n $hash = $this->newHash();\n }\n \n return $hash;\n }", "title": "" }, { "docid": "f5ce970da49e05a031162ac3c3f39d9f", "score": "0.5355538", "text": "abstract protected function getIdentifierFromStore();", "title": "" } ]
64ed7c4dcb1ea26a466b6fc28db45ea1
Validate role related fields on input.
[ { "docid": "78afaa43854fbbd186d1fc337674c887", "score": "0.6446802", "text": "public function validateRole(array $input)\n {\n Validator::make(\n $input,\n $this->roleRules->rules()\n )->validate();\n }", "title": "" } ]
[ { "docid": "f08e2a5c6432032aac6709a038b0530f", "score": "0.6727839", "text": "private function _validate_role()\n {\n $this->form_validation->set_rules(\n \"name\",\n \"Названиея роли\",\n \"required|trim|max_length[100]|xss_clean\"\n );\n return $this->form_validation->run();\n }", "title": "" }, { "docid": "186205d9b90b944c559fd2fc5e4059bc", "score": "0.6671514", "text": "public function rules()\n {\n return [\n 'role_id' => 'required|exists:roles,id',\n ];\n }", "title": "" }, { "docid": "4ec96d6024c62601a60ea803b18e3ad3", "score": "0.6382803", "text": "public function rules()\n {\n return [\n 'name' => 'required|unique:roles|min:6|max:20|alpha',\n 'description' => 'required|min:2|max:100',\n ];\n }", "title": "" }, { "docid": "cd93abd0114ca9d92626b27523004089", "score": "0.6354414", "text": "public function rules()\n {\n return [\n 'name' => 'required|unique:roles',\n ];\n }", "title": "" }, { "docid": "9b539854f9cb14ac4c23d0a937fc1dfc", "score": "0.6337134", "text": "public function rules()\n {\n\n return [\n 'name' => 'required|unique:roles,name,' . $this->role->id,\n ];\n }", "title": "" }, { "docid": "7ce48122d8062a4ce9788874a31ef1ee", "score": "0.6332253", "text": "public function rules()\n {\n return [\n 'name' => 'required|unique:roles',\n ];\n }", "title": "" }, { "docid": "1a5b802622d18379f3392905d28804ff", "score": "0.63084614", "text": "public function rules()\n {\n if($this->request->get('role_id') == 1){\n return [\n 'name'=>'required|min:3|max:50',\n 'email'=>'required|email|unique:users',\n 'role_id'=>'required',\n 'is_active'=>'required',\n 'password'=>'required'\n ];\n }\n elseif($this->request->get('role_id') == 2){\n return [\n 'name'=>'required|min:3|max:50',\n 'email'=>'required|email|unique:users',\n 'role_id'=>'required',\n 'phone_no'=>'required|unique:owners',\n 'society_id'=>'required',\n 'is_active'=>'required',\n 'password'=>'required'\n ];\n }\n elseif($this->request->get('role_id') == 3){\n return [\n 'name'=>'required|min:3|max:50',\n 'email'=>'required|email|unique:users',\n 'role_id'=>'required',\n 'phone_no'=>'required|unique:owners',\n 'society_id'=>'required',\n 'flat_no'=>'required',\n 'is_active'=>'required',\n 'password'=>'required'\n ];\n }\n elseif($this->request->get('role_id') == 4){\n return [\n 'name'=>'required|min:3|max:50|regex:/^[a-zA-Z]+$/u',\n 'email'=>'required|email|unique:users',\n 'role_id'=>'required',\n 'phone_no'=>'required|unique:managers',\n 'society_id'=>'required',\n 'is_active'=>'required',\n 'password'=>'required'\n ];\n }\n\n }", "title": "" }, { "docid": "23d766e8ba30562d194b4e28fd7b8878", "score": "0.6266957", "text": "public function rules()\n {\n return [\n 'role_id' => 'required',\n 'status' => 'required',\n ];\n }", "title": "" }, { "docid": "958be0c6b5c2e72cd3545a16a020978c", "score": "0.6192622", "text": "public function rules()\n {\n $id = isset($this->route('roles')->id) ? $this->route('roles')->id : null;\n return [\n 'name' => 'required|unique:roles,name,' . $id,\n 'slug' => 'required|unique:roles,slug,' . $id,\n 'permissions' => 'array'\n ];\n }", "title": "" }, { "docid": "e379008148394d4acf11ac27c237eff3", "score": "0.6136932", "text": "public function rules()\n {\n if ($this->method() == 'PUT') {\n $role_id = $this->segment(4);\n return [ \n 'name' => 'required|max:50|unique:roles,name,'.$role_id, \n 'display_name' => 'required|unique:roles,display_name,'.$role_id,\n ];\n } else {\n return [ \n 'name' => 'required|max:50|unique:roles,name', \n 'display_name' => 'required|unique:roles,display_name',\n ];\n }\n }", "title": "" }, { "docid": "48c45af7051e1741e03d2fcab041e360", "score": "0.6120971", "text": "public function rules()\n {\n return [ \n 'name' => 'required|unique:roles|max:255',\n 'dob' => 'required',\n 'email' => ' required|string|email|max:255|inique:users',\n \n \n //\n ];\n }", "title": "" }, { "docid": "7962ba796252821b7b959fc4e7d183fc", "score": "0.6089877", "text": "public static function validateUserRole()\r\n\t{\r\n\t\treturn array(\r\n\t\t\tnew Main\\Entity\\Validator\\Length(null, 1),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "6032609d9d9e49d2b13ac75b864338f9", "score": "0.60730994", "text": "public function rules()\n {\n\t\t$id = $this->route('role');\n return [\n\t\t\t'permissions' => 'array|nullable',\n\t\t\t'name' => ['required', 'between:2,20', 'unique:admin_roles,name,'.$id, new AllowLetterNumber()],\n\t\t\t'slug' => ['required', 'between:2,20', 'unique:admin_roles,slug,'.$id]\n ];\n }", "title": "" }, { "docid": "b5c73d739bd73f2285ff12be88f82147", "score": "0.60488296", "text": "function validate_user_field( $field ) {\n\n\t\t\t// remove 'all' from roles\n\t\t\tif ( acf_in_array( 'all', $field['role'] ) ) {\n\t\t\t\t$field['role'] = '';\n\t\t\t}\n\n\t\t\t// field_type removed in favour of multiple\n\t\t\tif ( isset( $field['field_type'] ) ) {\n\n\t\t\t\t// extract vars\n\t\t\t\t$field_type = acf_extract_var( $field, 'field_type' );\n\n\t\t\t\t// multiple\n\t\t\t\tif ( $field_type === 'multi_select' ) {\n\t\t\t\t\t$field['multiple'] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// return\n\t\t\treturn $field;\n\t\t}", "title": "" }, { "docid": "f625c7cbe009d60232e96ef7c9cb98ab", "score": "0.60346735", "text": "private function roleValidation(Request $request)\n {\n return Validator::make($request->all(), [\n 'name' => 'required'\n ], [\n 'name.required' => 'عنوان گروه را وارد کنید'\n ]);\n }", "title": "" }, { "docid": "77518c30aa4aa2254614a2ec6e664195", "score": "0.6014481", "text": "public function rules()\n {\n return [\n 'role' => [\n 'required',\n Rule::in(Roles::getAll()),\n ],\n ];\n }", "title": "" }, { "docid": "46da91719366610a66462e1c39d04638", "score": "0.5985392", "text": "public function rules()\n {\n return [\n 'username'=>'required',\n 'fullname'=>'required',\n 'password'=>'required',\n 'repassword'=>'required|same:password',\n 'role'=>'not_in:0'\n ];\n }", "title": "" }, { "docid": "5fd6f271a702a9566a5c864fe208bc55", "score": "0.59703624", "text": "public function rules(): array\n {\n return [\n 'name' => 'required',\n 'phone' => 'required',\n 'role_id' => 'required',\n ];\n }", "title": "" }, { "docid": "096a002723e767dfe2995ac9d1e65f19", "score": "0.59550226", "text": "public function rules()\n {\n return array_merge( Parent::rules(), [\n 'name' => 'required|unique:roles,name,' . $this->input('name'),\n ]);\n }", "title": "" }, { "docid": "992b070182791901e545bed2112053c9", "score": "0.59496546", "text": "public function rules()\n {\n return array(\n array('username, role','required'),\n //username needs to be checked for existence\n array('username','exist','className'=>'User'),\n array('username','verify')\n );\n }", "title": "" }, { "docid": "e9fb77870683dd836e082d62e6e399a3", "score": "0.5949254", "text": "private function validateRole(Request $request)\n {\n return Validator::make($request->all(), [\n 'email' => ['required', 'email', 'exists:users'],\n 'role' => ['required', 'max:15'],\n ]);\n }", "title": "" }, { "docid": "f7c0ee30c941b1b296c7f66484171f57", "score": "0.59305775", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:4',\n 'state' => 'required|integer',\n 'email' => 'required|unique:users|email',\n 'password' => 'required|min:6',\n 'role_ids' => 'array'\n ];\n }", "title": "" }, { "docid": "50424897e2a18266dd75f083258ad61c", "score": "0.59236103", "text": "public function rules()\n {\n return [\n 'id' => 'required|numeric|exists:roles,id',\n 'name' => [\n 'nullable',\n new UniqueJsonParam('resource_groups', 'name'),\n ],\n 'level' => 'nullable|integer|min:0|max:255',\n 'parent_id' => 'nullable|numeric|exists:roles,id',\n ];\n }", "title": "" }, { "docid": "a0c25eef40320c340f3617f54459df20", "score": "0.591623", "text": "public function rules()\n {\n return [\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'email' => 'required|string|email|max:255|unique:users',\n 'department' => 'required',\n 'role_id1' => 'required without:role_id2',\n 'role_id2' => 'required without:role_id1',\n 'password' => 'required|string|confirmed|min:8',\n \n ];\n }", "title": "" }, { "docid": "1df7b3ac55aac55baa88161a738c9d15", "score": "0.58962613", "text": "public function rules()\n {\n return [\n// 'name' => 'bail|required|min:4|max:100',\n// 'email' => 'bail|required|min:4|max:100|unique:users',\n// 'phone' => 'bail|required|digits_between:1,13|numeric|unique:users',\n// 'role' => 'bail|required',\n// 'region' => 'bail|required',\n ];\n }", "title": "" }, { "docid": "37726e4baa213b3423f369587791c23e", "score": "0.5888505", "text": "protected function do_validation() {}", "title": "" }, { "docid": "d99ee0e25862a5c1bd9c0f5751f40398", "score": "0.5872467", "text": "public function rules()\n {\n $permissions = '';\n\n if ($this->associated_permissions != 'all') {\n $permissions = 'required';\n }\n\n return [\n 'name' => 'required|max:191|unique:roles,name',\n 'permissions' => $permissions,\n ];\n }", "title": "" }, { "docid": "9ed51f600a48b929244d256a086f865f", "score": "0.58674985", "text": "public function rules()\n {\n return [\n 'idRol' => ['required','numeric','exists:roles,id_rol'],\n 'idPermiso' => ['required', 'numeric', 'exists:permisos,id_permiso'],\n 'idModelo' => ['required', 'numeric', 'exists:modelos,id_modelo'],\n ];\n }", "title": "" }, { "docid": "6a2edea15785d67b98237aea85809ffb", "score": "0.5862906", "text": "public function validate(){\n /*\n if ($this->actionType == 'CREATE'){\n \n }else if ($this->actionType == 'UPDATE'){\n $keys = explode('.', $this->item['role_permission_id']);\n \n if (empty($keys[0]) || empty($keys[1])) throw new Exception('Invalid User Permission ID');\n \n $this->record['role_id'] = $keys[0];\n $this->record['old_permission_id'] = $keys[1];\n }\n\n $rolePermission = $this->get($this->record['role_id'], $this->record['permission_id']);\n if (!empty($rolePermission['role_id'])) throw new Exception('User sudah memiliki Hak Akses tersebut (ID: '.$this->record['permission_id'].')');\n \n */\n }", "title": "" }, { "docid": "1c9b3c76cbd812df4ac21f730a8918e6", "score": "0.58343494", "text": "protected function validator(array $data)\n {\n \n if($data['role_id'] == '1')\n {\n return Validator::make($data, [\n 'username' => 'required|string|min:3|max:20|unique:users',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n 'role_id' => [\n 'required', \n 'numeric',\n Rule::in(['1']),\n ],\n 'email' => 'required|string|email|max:191',\n\n 'firstName' => 'required|string|max:191',\n 'lastName' => 'required|string|max:191',\n 'guest_address' => 'required|string|max:191',\n 'guest_phone' => 'required|string|max:50',\n ]);\n }\n else if($data['role_id'] == '3'){\n return Validator::make($data, [\n 'username' => 'required|string|min:3|max:20|unique:users',\n 'email' => 'required|string|email|max:255|unique:users',\n 'password' => 'required|string|min:6|confirmed',\n 'role_id' => [\n 'required',\n 'numeric',\n Rule::in(['3']),\n ],\n 'email' => 'required|string|email|max:191',\n\n 'name' => 'required|string|max:191',\n 'hotel_address' => 'required|string|max:191',\n 'county' => 'required|string|max:50',\n 'hotel_phone' => 'required|numeric',\n 'eircode' => 'string|min:7|max:7'\n ]);\n }\n else {\n return Validator::make($data, [\n 'role_id' => ['required', 'numeric', Rule::in(['1','3'])]\n ]);\n }\n }", "title": "" }, { "docid": "d4091cc26b7cef7be9b079e36f7380a6", "score": "0.5815633", "text": "public function rules()\n {\n return [\n 'nama' => 'required|regex:/^[\\pL\\s\\-]+$/u',\n 'email' => 'required|unique:users,email',\n 'phone' => 'required|numeric',\n 'nama_rs' => 'required|regex:/^[\\pL\\s\\-]+$/u',\n 'role' => 'required'\n ];\n }", "title": "" }, { "docid": "6aeaa64c751a317edbcfea0cd8411c93", "score": "0.58122134", "text": "public function rules()\n {\n return [\n 'email' => 'required|email|max:255|unique:users,email',\n 'reg' => 'accepted',\n 'name' => 'required|min:3|max:11',\n 'password' => 'required|min:6',\n 'acc_type' => 'required|in:'.implode(',', UserRoles::returnSafe()),\n ];\n }", "title": "" }, { "docid": "4c4539ad46d8a1ccaa8a9341d8b239f2", "score": "0.58069843", "text": "public function rules()\n {\n return [\n 'name' => 'required|string',\n 'email' => 'required|string|email|unique:users,email'. $this->user_id,\n 'user_id'=>'required|integer|exists:users_id',\n 'role' => 'required|integer',\n ];\n }", "title": "" }, { "docid": "65099d4103d6077974cf0d8117367551", "score": "0.58010846", "text": "public function rules()\n\t{\n\t\t//var_dump($this);\n\t\t//return false;\n\t\t//return [\n // 'name'=> 'exists:gen_role,name,gen_role_id,'.$this->get('gen_role_id'),\n\t\t//];\n\t\treturn [\n // 'room_type_id'=> 'required:room,room_type_id,'.$this->get('id'),\n // 'room_name'=> 'required:room,room_name,'.$this->get('id')\n // 'building_id'=> 'required:room,building_id,'.$this->get('id')\n // 'is_active'=> 'required:room,is_active,'.$this->get('id')\n\t\t];\n\t}", "title": "" }, { "docid": "8e61f34c64c6080815027b4748fcef42", "score": "0.5788413", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:5|max:255',\n 'username' => 'required|max:255|unique:users',\n 'password' => 'required|min:6|confirmed',\n 'branch_office_id' => 'required',\n 'role' => 'nullable|String'\n ];\n }", "title": "" }, { "docid": "07b9da3616586754e051f1be0f937f91", "score": "0.57705593", "text": "public function rules()\r\n {\r\n\r\n $name = $this->route()->getName();\r\n $tbl = ( str_contains($name, 'role') ) ? 'roles' : 'permissions';\r\n\r\n return [\r\n 'name' => 'required|unique:'.$tbl.'|max:255|min:4',\r\n 'slug' => 'required|unique:'.$tbl.'|max:255|min:4',\r\n ];\r\n\r\n }", "title": "" }, { "docid": "ef682047481e0ec5b5061ee715d68d94", "score": "0.5762361", "text": "public function rules()\n {\n return [\n 'id' => 'required|numeric',\n 'password' => 'nullable|min:8|max:100',\n 're_password' => 'nullable|min:8|max:100|same:password',\n 'fullname' => 'nullable|min:6|max:100',\n 'email' => 'nullable|min:6|max:100|email:true',\n 'role' => 'required|numeric'\n ];\n }", "title": "" }, { "docid": "f5e551919d524168143628d9d6d0acc6", "score": "0.575162", "text": "public function rules()\n { \n if(isset($_POST['roleGroup'])){\n return [\n 'roleGroup' => 'required',\n 'roleForGroup' => 'required',\n ];\n }\n return [\n 'name' => 'required|unique:groups,name,'.$this->segment(2),'|max:255',\n 'label' => 'required',\n ];\n }", "title": "" }, { "docid": "900ac5b723298c5cd466cd4a8e3318d3", "score": "0.57513154", "text": "public function rules()\n {\n $id = getRouteId($this, 'user');\n return [\n 'name' => ['required', 'string', 'min:3', 'max:190', 'regex:/^[\\p{Arabic}A-Za-z _-]+$/u'],\n 'email' => ['required', 'email', 'min:3', 'max:190', 'unique:users,email,'.$id],\n 'password' => ['required', 'string', 'min:3', 'max:190', 'confirmed'],\n 'role_id' => ['nullable', 'exists:roles,id']\n ];\n }", "title": "" }, { "docid": "134b2d41d928ea141957cc31a9dcb810", "score": "0.57473636", "text": "public function rules()\n {\n return [\n 'full_name' => 'required|string|max:191',\n 'email' => 'required|max:191|email|unique:users',\n 'password' => 'required|min:8|max:15',\n 'password_confirmation' => 'required_with:password|same:password',\n 'role_id' => 'required',\n 'phone' => 'required|numeric|digits_between:10,15',\n 'address' => 'max:191',\n ];\n }", "title": "" }, { "docid": "bc9d8f3b4e0f42a70c0f857a16df65df", "score": "0.5742647", "text": "public function rules()\n {\n $id = $this->segment(3);\n \n $roles = [\n 'name' => \"required|min:3|max:100|unique:users,name,{$id},id\",\n 'email' => \"required|min:3|max:100|unique:users,email,{$id},id\",\n 'password' => \"required|min:6|max:15|unique:users,password,{$id},id\",\n ];\n \n if($this->isMethod('PUT')):\n $roles['password'] = 'max:15';\n endif;\n \n return $roles;\n }", "title": "" }, { "docid": "6dbed424e73360d8d48e1598526a013b", "score": "0.57385933", "text": "public function rules()\n {\n return [\n 'username' => 'required|unique:user|min:10',\n 'email' => 'required|email|unique:user',\n 'role' => 'required|exists:roles,roles',\n 'password' => 'required|min:6|regex:/^.*(?=.{1,})(?=.*[a-zA-Z])(?=.*[0-9])(?=.*[\\d\\X])(?=.*[!$#%]).*$/|confirmed',\n 'password_confirmation' => 'required',\n 'first_name' => 'required',\n 'last_name' => 'required',\n\n ];\n }", "title": "" }, { "docid": "f49195f4624db8d96cbfaff7341008fe", "score": "0.5734343", "text": "public function rules()\n\t{\n\t\treturn [\n\t\t\t'name'\t=> 'required|min:3|unique:organizers,name',\n\t\t\t'slug' \t=> 'required|alpha_dash|min:3|unique:organizers,slug'\n\t\t];\n\t}", "title": "" }, { "docid": "9d87b3ccfd2c00513083a49d1b73f695", "score": "0.572134", "text": "public function rules()\n {\n return [\n 'app_user_registration' => ['required', 'boolean'],\n 'app_default_role' => ['required', 'exists:user_roles,id'],\n ];\n }", "title": "" }, { "docid": "56a053f0457d8f1e06e14c76ef5f469a", "score": "0.5707213", "text": "public function rules()\n {\n return [\n \"first_name\" => [\n 'required',\n 'max:1oo'\n ],\n\n \"middle_name\" => [\n 'nullable',\n 'max:100'\n ],\n\n \"last_name\" => [\n 'required',\n 'max:100'\n ],\n\n \"role_id\" => [\n \"required\",\n \"integer\"\n ],\n\n \"birthdate\" => [\n 'required',\n 'date'\n ],\n\n \"sex\" => [\n 'required',\n Rule::in(['M','F'])\n ],\n\n \"barangay\" => [\n 'required',\n 'max:100'\n ],\n\n \"city\" => [\n 'required',\n 'max:100'\n ],\n\n \"province\" => [\n 'required',\n 'max:100'\n ],\n\n \"email\" => [\n 'required',\n Rule::unique('roles')->whereNull('deleted_at'),\n 'min:5',\n 'max:100'\n ],\n\n \"password\" => [\n 'required',\n 'min:5'\n ]\n\n ];\n }", "title": "" }, { "docid": "4488079438d8711d297803b7c2c6374a", "score": "0.56921315", "text": "public function rules()\n\t{\n\t\treturn array(\n\t\t\t// username and role are required\n\t\t\tarray('username', 'required'),\n\t\t\t//username needs to be checked for existence \n\t\t\tarray('username', 'exist', 'className'=>'User'),\n\t\t\tarray('username', 'verify'),\n\t\t);\n\t}", "title": "" }, { "docid": "81da7de12c988c30085553984ec52d4c", "score": "0.56860936", "text": "public function rules()\n {\n return [\n 'user.name' => 'required|min:3',\n 'user.email' => 'required|email|unique:users,email,' . $this->user['id'],\n 'user.username' => 'required|min:3|unique:users,username,' . $this->user['id'],\n 'user.password' => 'confirmed',\n 'user.role.id' => 'nullable|exists:roles,id'\n ];\n }", "title": "" }, { "docid": "59ff47ba6b1293ae8337df79ee0d55cb", "score": "0.568442", "text": "public function rules() {\n return [\n 'role_id' => 'required',\n 'designation' => 'required',\n 'firstName' => 'required',\n 'lastName' => 'required',\n 'email' => 'required|email|max:50|unique:users',\n ];\n }", "title": "" }, { "docid": "ffd86d9c6a5dc5262c79370c9ca6238f", "score": "0.5679512", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:5|max:255',\n 'username' => 'required|max:255|unique:users,username,'. $this->user->id,\n 'password' => 'nullable|min:6|confirmed',\n 'branch_office_id' => 'required',\n 'role' => 'nullable|String'\n ];\n }", "title": "" }, { "docid": "20ce319db1885a63f726054165b4cb77", "score": "0.5676262", "text": "function validate_role($role_check) {\n global $errors;\n\n switch($role_check) {\n case 1:\n case 2:\n break; //the above defines the only valid values\n default:\n $errors['role-check'] = \"Please select a role\";\n }\n}", "title": "" }, { "docid": "77db2c9702cc075466d0deaefc84f0ee", "score": "0.56726164", "text": "public function validate(array $input)\n {\n $this->validateUser($input);\n\n $this->validateRole($input);\n }", "title": "" }, { "docid": "a5002c282aa50919e9c0d5be3cf0ca3a", "score": "0.5671107", "text": "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n return [ \n 'role_id' => 'required|integer'\n ];\n }\n\n return [\n 'name' => 'required|string|min:2|max:255',\n 'email' => 'required|unique:users,email|string|email|max:255',\n 'role_id' => 'required|integer',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'required|min:6',\n ];\n }", "title": "" }, { "docid": "916a88c06c73515bef9cc75cc41fe44e", "score": "0.56617093", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:2|max:100',\n 'last_name' => 'required|min:2|max:150',\n 'document_type' => 'required',\n 'document_number' => 'required|min:2|max:20',\n 'email' => 'required|min:10|max:150|unique:users,email',\n 'role' => 'required',\n ];\n }", "title": "" }, { "docid": "3ff8f8ce8477694b8e8346b1fbf0a2c6", "score": "0.5659895", "text": "private function checkRequiredFields()\n {\n $validator = new ConfigurationValidator();\n $validator->validate($this->name);\n $validator->validate($this->namespace);\n }", "title": "" }, { "docid": "79f082652f5b1dad2990e0f5e305296e", "score": "0.5659054", "text": "public function _ValidateFields()\n {\n if (empty($this->data['aInput']['name'])) {\n $this->_oErrors->AddError('name', 'required');\n }\n if (empty($this->data['aInput']['email'])) {\n $this->_oErrors->AddError('email', 'required');\n }\n if (empty($this->data['aInput']['subject'])) {\n $this->_oErrors->AddError('subject', 'required');\n }\n if (empty($this->data['aInput']['body'])) {\n $this->_oErrors->AddError('body', 'required');\n }\n }", "title": "" }, { "docid": "d8ff18eafbf4ee55a8c3fdca3a1213f0", "score": "0.5646678", "text": "public function rules()\n {\n return [\n 'name' => 'required|string:255',\n 'email' => 'sometimes|email|unique:users,email',\n 'password' => 'sometimes|string|min:8',\n 'roles' => 'required'\n ];\n }", "title": "" }, { "docid": "a71908fae74d08190d61df6bd467aada", "score": "0.5622957", "text": "private static function validate_role( $role ) {\n\t\tif ( ! empty( $role ) && is_null( get_role( $role ) ) ) {\n\t\t\tWP_CLI::error( sprintf( \"Role doesn't exist: %s\", $role ) );\n\t\t}\n\t}", "title": "" }, { "docid": "18665467913b7d1bdce9f14287cc8e83", "score": "0.5622306", "text": "public function rules()\n {\n return [\n 'email' => 'required|email|unique:admins,email,'. $this->route('admin')->id,\n 'username' => 'required|min:3|max:20|unique:admins,username,'. $this->route('admin')->id,\n 'roles' => 'required',\n 'password' => 'nullable|confirmed|min:6',\n ];\n }", "title": "" }, { "docid": "f475db119a301d6aeb7818a74e20b77c", "score": "0.5590221", "text": "public function rules()\n {\n return [\n 'nombre_rubro_empresarial' => 'min:4|required|unique:rubros_empresariales,nombre_rubro_empresarial,'.$this->route->getParameter('rubros_empresariales'),\n 'estado'=> 'required|in:activo,inactivo'\n ];\n }", "title": "" }, { "docid": "8a311df27f6313625066b7550bfb9811", "score": "0.55876684", "text": "protected function performValidation()\n {\n $this->requireProperties(['title', 'version']);\n }", "title": "" }, { "docid": "39ba6bdd81f55bc025078b9512f8004d", "score": "0.5582788", "text": "public function valid()\n {\n\n if ($this->container['role_skills'] === null) {\n return false;\n }\n if ($this->container['role_description'] === null) {\n return false;\n }\n if ($this->container['role_id'] === null) {\n return false;\n }\n if ($this->container['actions'] === null) {\n return false;\n }\n if ($this->container['role_users'] === null) {\n return false;\n }\n if ($this->container['role_config'] === null) {\n return false;\n }\n if ($this->container['role_title'] === null) {\n return false;\n }\n if ($this->container['role_status'] === null) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "65ff72397100c94adfb50162a3b52b7a", "score": "0.558108", "text": "public function validate()\n {\n $this->validateName();\n $this->validateType();\n }", "title": "" }, { "docid": "efccd3e0f9cb9af4c58e848a0fe36c1b", "score": "0.55794203", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'name' => [\n 'required',\n 'unique:roles',\n ],\n 'permissions' => 'required',\n ];\n break;\n\n case 'PUT':\n return [\n 'name' => [\n 'required',\n 'unique:roles,name,'.$this->input('id').',id',\n ],\n 'permissions' => 'required',\n ];\n break;\n }\n }", "title": "" }, { "docid": "439a0921ba7bb60e9421bf74a4ab4cb9", "score": "0.5576162", "text": "public function rules()\n {\n return [\n //\n 'name_ar'=>'required|unique:grades,name->ar,'.$this->id,\n 'name_en'=>'required|unique:grades,name->en,'.$this->id,\n \n ];\n }", "title": "" }, { "docid": "cbb37edf2cede6de8b7b0338b7d9add6", "score": "0.55758977", "text": "public function rules()\n {\n return [\n 'name.*' => 'required',\n 'sex.*' => 'required|exists:side_genders,id',\n 'course.*' => 'required|exists:mst_classes,id',\n 'relligion.*' => 'required|in:Islam,Non Muslim',\n 'rs.*' => 'required|in:Orang Tua,Wali,Lainnya',\n 'needed.*' => 'required|exists:mst_disabilities,id',\n 'desc.*' => 'required'\n ];\n }", "title": "" }, { "docid": "7ba1739d3cc9e415cfeab97df06b12b6", "score": "0.55730885", "text": "public function rules()\n {\n return [\n 'firstname' => ['required', 'string', 'max:255'],\n 'lastname' => ['required', 'string', 'max:255'],\n 'nickname' => ['sometimes', 'string', 'max:255'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'password' => ['required', 'string', 'min:6', 'confirmed'],\n 'role' => ['required', Rule::in($this->allRoles())],\n ];\n }", "title": "" }, { "docid": "2b68bf156b7c5be38bef1444b9e14f59", "score": "0.55705935", "text": "public function rules()\n {\n return [\n 'first_name' => 'required',\n 'middle_name' => 'required',\n 'last_name' => 'required',\n 'email' => 'required|email',\n 'username' => 'required',\n 'password' => 'min:6|nullable',\n 'password2' => 'min:6|required_with:password|same:password|nullable',\n 'role_id' => 'required',\n 'pincode' => 'required'\n ];\n }", "title": "" }, { "docid": "96e06a1c176db93d0af6cc87a7eebb8d", "score": "0.55685115", "text": "public function rules(): array\n {\n return [\n 'jss_id' => ['required'],\n 'role_id' => ['required'],\n 'agency_id' => ['required'],\n ];\n }", "title": "" }, { "docid": "d2d8734424053cc5e267dc1d4dffe1ec", "score": "0.55683446", "text": "public function rules()\n {\n return [\n 'name' => 'required|min:3|max:100',\n 'email' => 'required|email|unique:users',\n 'password' => 'required|min:6|max:100',\n 'cf_password' => 'required|min:6|max:100|same:password',\n 'image' => 'required',\n 'phone' => 'required|min:10|numeric',\n 'address' => 'required',\n 'gender' => 'required|in:'.implode(',',config('common.user.gender')) ,\n 'status' => 'required|in:'.implode(',',config('common.user.status')) ,\n 'roles'=> 'required'\n ];\n }", "title": "" }, { "docid": "c40bfbdbc476ea39bf07c1eb927d364b", "score": "0.5558524", "text": "public function rules()\n {\n $user = $this->route()->parameter('user');\n\n return [\n 'name' => 'required|string',\n 'email' => 'required|email|unique:users,email,'.$user->id,\n 'role_id' => 'required|exists:roles,id',\n 'password' => 'required|string|min:6|confirmed',\n ];\n }", "title": "" }, { "docid": "3d7ad66a493ad49f454378d22f2fc2e4", "score": "0.55578697", "text": "public function rules()\n {\n\n return [\n 'name' => 'required|string',\n 'email' => 'required|email',\n 'password' => 'required|string|min: '.Config::get('constants.MIN_PASSWORD_LENGTH').' |max:10',\n 'role' => 'required|in:0,1,2',\n 'cin' =>'required',\n 'phone_number' =>'required',\n ];\n }", "title": "" }, { "docid": "8578cbb59b3b7e8ec104ac2c28843453", "score": "0.55569714", "text": "protected function validation(){\t\t\n\t\t$this->validate(\"InclusionIn\", array(\n\t\t\t\"field\" => \"estado\",\n\t\t\t\"domain\" => array('A', 'V', 'R'),\n\t\t\t\"required\" => true\n\t\t));\n\t\tif($this->validationHasFailed()==true){\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "eba41b8698ef57ec8fb63a9eedd61258", "score": "0.5554333", "text": "public function rules(){\n //verifico si la peticion es post para create o put para update\n switch ($this->method()){\n case 'POST':\n return [\n 'name' => 'required|min:5|max:20|unique:roles',\n 'description' => 'required|min:10|max:200'\n ];\n break;\n\n case 'PATCH':\n case 'PUT':\n return [\n 'name' => ['required', 'min:5', 'max:20', Rule::unique('roles')->ignore($this->request->get(\"name\"),'name')],\n 'description' => 'required|min:10|max:200'\n ];\n break;\n }\n }", "title": "" }, { "docid": "95f7341b14c3978b988878cb53718def", "score": "0.555324", "text": "public function validate() {\n\n \tif ($this->codusuario) {\n $unique_usuario = \"unique:tblusuario,usuario,$this->codusuario,codusuario|required|min:2\";\n } else {\n $unique_usuario = \"unique:tblusuario,usuario|required|min:2\";\n }\n\n $this->_regrasValidacao = [\n 'usuario' => $unique_usuario,\n 'senha' => 'required_if:codusuario,null|min:6',\n 'impressoramatricial' => 'required',\n 'impressoratermica' => 'required',\n ];\n\n $this->_mensagensErro = [\n 'usuario.required' => 'O campo usuário não pode ser vazio',\n 'usuario.min' => 'O campo usuário deve ter mais de 2 caracteres',\n ];\n\n return parent::validate();\n }", "title": "" }, { "docid": "d0424b40d4ba1db9f73159e9e3218558", "score": "0.55392295", "text": "public function rules()\n {\n return [\n 'name'=>'required|max:100',\n 'abbr'=>'required|string|min:2|max:10',\n 'direction'=>'required|in:ltr,rtl',\n\n\n\n ];\n }", "title": "" }, { "docid": "fd2cb3c842af9e1f163b36739504c1ac", "score": "0.5530596", "text": "public function rules()\n { \n $id = null;\n $role = null;\n \n\n if ($role = $this->route('role') instanceof \\CodeEduUser\\Entities\\Permission) {\n $id = $role->id;\n }\n\n if ($role = $this->route('role')) {\n $id = $role;\n }\n\n return [\n // 'permissions' => \"required|array\",\n 'permissions.*' => \"exists:permissions,$id\"\n ];\n }", "title": "" }, { "docid": "c2444268e17f156fd57f30b05fd042ff", "score": "0.5526966", "text": "private function validateForm($request){\n $validFields = [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'email' => 'required|email',\n 'role_id' => 'required',\n 'profile_img' => 'image|mimes:jpeg,png,bmp,jpg',\n ];\n $addField = [];\n if (empty($request->input('id'))) {\n $addField = [\n 'username' => 'required|unique:admin',\n 'password' => 'required|between:8,255|confirmed'\n ];\n } else {\n if (!empty($request->input('password'))) {\n $addField = [\n 'password' => 'required|between:8,255|confirmed'\n ];\n } \n }\n $validFields = $validFields + $addField;\n if ($request->input('actionname') == 'profile') {\n unset($validFields['role_id']); \n }\n return Validator::make($request->all(), $validFields);\n }", "title": "" }, { "docid": "94f3a2af623bbef0dbe0e5e20fabbabf", "score": "0.5526184", "text": "public function rules()\n {\n return [\n 'name' => 'required',\n 'email' => ['required', 'email', 'unique:users'],\n 'password' => ['required', 'min:6'],\n 'roles' => 'required'\n ];\n }", "title": "" }, { "docid": "751d2708129380631bfeb66b2d6f04ed", "score": "0.552181", "text": "public function rules()\n {\n $rules = array(\n 'name' => 'required|min:3|max:255|unique:acl_roles,name',\n 'filter' => 'in:A,D,R',\n );\n\n $input = Request::only('id');\n if($input['id']) {\n $rules['name'] .= ','. $input['id'] .' = id';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "7f6d6c58758d7483e8a2574826d224f1", "score": "0.5519842", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|unique:roles',\n 'permissions' => 'required',\n ];\n\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n\n $role = $this->route()->parameter('role');\n\n $rules['name'] = 'required|unique:roles,id,' . $role->id;\n\n }//end of if\n\n return $rules;\n\n\n }", "title": "" }, { "docid": "88065fc5a7d032c0269525da414b20f9", "score": "0.5519793", "text": "public function rules()\n {\n\n $rules = [\n 'name' => ['required', 'string', 'max:50', 'unique:roles'],\n ];\n\n if($this->id){\n $rules['name'] = 'required|string|unique:roles,name,'.$this->id;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "e9cb24ef7c801aa37df0b55207acffa2", "score": "0.55197155", "text": "public function rules()\n {\n\n return [\n\n //'txtTen' => 'required|unique:products,name',\n 'name' => 'required',\n 'email' => 'required|email|max:255|unique:users',\n 'password' => 'required|min:6',\n 'password_confirm' => 'required|min:6',\n 'role' => 'required',\n ];\n }", "title": "" }, { "docid": "613d07e4aaab583aa13c8aeea52dcdcd", "score": "0.5507208", "text": "public function rules()\n {\n $id = $this->input('id');\n $rules = [\n 'name' => ['required', 'max:255'],\n 'input_pmts' => ['required'],\n ];\n\n //there are edit mode to ignore itself’s name\n $name_unique = Rule::unique('roles');\n if( $id>0 ){\n $name_unique = $name_unique->ignore($id);\n }\n $rules['name'][] = $name_unique;\n return $rules;\n }", "title": "" }, { "docid": "2d79e8d75a12ea1a8ee7952586922d26", "score": "0.550694", "text": "public function rules()\n {\n if (is_null($this->admin_id)) {\n\n return [\n 'role_id' => 'required',\n 'email' => 'required|email|unique:admin',\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'title' => 'required',\n // 'profile_photo' => 'required',\n 'date_of_birth' => 'required',\n 'gender' => 'required',\n 'password' => 'required|min:6|confirmed',\n 'password_confirmation' => 'min:6',\n ];\n }\n\n return [\n //'role_id' => 'required',\n 'email' => 'required|email|unique:admin,email,' . $this->admin_id,\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'title' => 'required',\n 'date_of_birth' => 'required',\n 'gender' => 'required',\n 'password' => 'confirmed',\n ];\n\n }", "title": "" }, { "docid": "bfc9aa62b64b3d898b5ac922a06121b7", "score": "0.5505941", "text": "public function rules()\n {\n return [\n 'first_name' => 'required',\n 'last_name' => 'required',\n 'email' => 'required|email|unique:users,email,' . $this->user->id,\n 'role' => 'required|exists:roles,id|not_in:'.Role::where('name', 'Developer')->first()->id,\n 'password' => 'sometimes|required|confirmed',\n 'current_user_password' => 'required|password_match:' . Auth::user()->password,\n ];\n }", "title": "" }, { "docid": "d1688be3cd80da8aa9fe84c9c5c1bc3c", "score": "0.5504437", "text": "public function rules() {\n return [\n 'member_id' => 'bail|required|integer|exists:members,id',\n 'team_id' => 'bail|required|integer|exists:teams,id',\n 'team_member_role' => 'bail|required|integer|exists:configurations,id',\n ];\n }", "title": "" }, { "docid": "62cce9ecfc40c134421df6da758e820c", "score": "0.5503576", "text": "public function rules()\n {\n $base = [\n 'first_name' => 'required|min:1|max:255',\n 'last_name' => 'required|min:1|max:255',\n 'insertion' => 'min:1|max:255',\n 'role_id' => 'required|exists:roles,id',\n ];\n\n switch ($this->method()) {\n case \"PATCH\":\n return $base + ['email' => 'required|unique:users,email,' . $this->user->id . '|email|min:1|max:255|'];\n case \"POST\":\n return $base + ['email' => 'required|unique:users|email|min:1|max:255|'];\n default:\n return [];\n }\n\n }", "title": "" }, { "docid": "8dd93bf1b9237e202196b5ec60ac469f", "score": "0.5494509", "text": "function validate_form(&$form, &$form_state) {\n // sure defaults are here:\n if (!isset($this->argument->options['validate_user_argument_type'])) {\n $this->argument->options['validate_user_argument_type'] = 'uid';\n $this->argument->options['validate_user_roles'] = array();\n }\n\n $form['validate_user_argument_type'] = array(\n '#type' => 'radios',\n '#title' => t('Type of user argument to allow'),\n '#options' => array(\n 'uid' => t('Only allow numeric UIDs'),\n 'name' => t('Only allow string usernames'),\n 'either' => t('Allow both numeric UIDs and string usernames'),\n ),\n '#default_value' => $this->argument->options['validate_user_argument_type'],\n '#process' => array('expand_radios', 'views_process_dependency'),\n '#dependency' => array('edit-options-validate-type' => array($this->id)),\n '#prefix' => '<div id=\"edit-options-validate-user-argument-type-wrapper\">',\n '#suffix' => '</div>',\n );\n\n $form['validate_user_restrict_roles'] = array(\n '#type' => 'checkbox',\n '#title' => t('Restrict user based on role'),\n '#default_value' => !empty($this->argument->options['validate_user_restrict_roles']),\n '#process' => array('views_process_dependency'),\n '#dependency' => array('edit-options-validate-type' => array($this->id)),\n );\n\n $form['validate_user_roles'] = array(\n '#type' => 'checkboxes',\n '#prefix' => '<div id=\"edit-options-validate-user-roles-wrapper\">',\n '#suffix' => '</div>',\n '#title' => t('Restrict to the selected roles'),\n '#options' => user_roles(TRUE),\n '#default_value' => $this->argument->options['validate_user_roles'],\n '#description' => t('If no roles are selected, users from any role will be allowed.'),\n '#process' => array('expand_checkboxes', 'views_process_dependency'),\n '#dependency' => array(\n 'edit-options-validate-type' => array($this->id),\n 'edit-options-validate-user-restrict-roles' => array(1),\n ),\n '#dependency_count' => 2,\n );\n }", "title": "" }, { "docid": "ec06e75e8a257d24d735de061659dfbb", "score": "0.54825", "text": "public function testValidationDefaultNoRoleId()\r\n { \r\n $data = $this->getCorrectData();\r\n unset($data['role_id']);\r\n $assetRole = $this->AssetRoles->newEntity($data);\r\n $expected = ['role_id' => [\r\n \"_required\" => \"This field is required\"]\r\n ];\r\n $this->assertNotEmpty($assetRole->errors());\r\n $this->assertEquals($expected, $assetRole->errors());\r\n }", "title": "" }, { "docid": "85f6d7e6b0e620d401cedfa12737b80e", "score": "0.54767644", "text": "public function rules()\n {\n return [\n 'is_admin' => 'required|integer|between:0,1',\n 'role_id' => 'sometimes|required|exists:roles,id',\n 'cluster_id' => 'sometimes|required|exists:clusters,id',\n 'first_name' => 'required|string|min:2,max:225|regex:/^[A-Za-z\\s.,-]+$/',\n 'middle_name' => 'required|string|min:2,max:225|regex:/^[A-Za-z\\s.,-]+$/',\n 'last_name' => 'required|string|min:2,max:225|regex:/^[A-Za-z\\s.,-]+$/',\n 'email' => ['required', 'email', 'min:3' ,'max:225',\n 'unique:superadmins,email',\n 'unique:users,email',\n 'unique:faculties,email',\n 'unique:students,email',\n ],\n 'contact_number' => [\n 'required', 'digits:11',\n 'unique:users,contact_number',\n 'unique:faculties,contact_number',\n 'unique:students,contact_number',\n ],\n 'password' => 'required|string|min:8|confirmed',\n ];\n }", "title": "" }, { "docid": "00cbc5b0f6adcb890350e0a0bd315cdb", "score": "0.54691726", "text": "public function rules()\n {\n return [\n 'company_id' => ['required', 'exists:companies,id'],\n 'industry_id' => ['required', 'exists:industries,id'],\n 'rut' => ['required', 'unique:assistances,rut'],\n 'first_name' => ['required'],\n 'male_surname' => ['required'],\n 'female_surname' => ['required'],\n 'is_male' => ['required', 'in:0,1'],\n 'country_id' => ['required', 'exists:countries,id'],\n 'phone' => ['required'],\n 'email' => ['required', 'email', 'unique:assistances,email']\n ];\n }", "title": "" }, { "docid": "4fc605c2b5a31f26fd5177634c1aac17", "score": "0.54670465", "text": "public abstract function validate();", "title": "" }, { "docid": "4e3f01320a6a2e7df0a199ad27e6603c", "score": "0.54657006", "text": "public function rules()\n {\n if (auth()->user()->role == 1) {\n return [\n 'name' => 'required|unique:users,name,' . $this->id,\n 'fullname' => 'required',\n 'email' => 'required|email|unique:users,email,' . $this->id,\n 'phone' => 'required|unique:users,phone,' . $this->id,\n ];\n }\n\n return [\n 'password' => 'required|min:6',\n 'password_confirmation' => 'required_with:password|same:password|min:6',\n 'email' => 'required|email|unique:users,email,' . $this->id,\n 'phone' => 'required|unique:users,phone,' . $this->id,\n ];\n }", "title": "" }, { "docid": "9255f2d0279e5cab80c0bddb516922ef", "score": "0.54619", "text": "public function rules()\n {\n return [\n 'name'=>'required',\n 'username'=>'required|unique:users,username',\n 'password'=>'required',\n 'role'=>'required',\n 'city'=>'required',\n 'status'=>'required',\n ];\n }", "title": "" }, { "docid": "8170e60dc8e3e6a38b441071606ef985", "score": "0.54612166", "text": "public function rules()\n {\n return [ \n 'users_name' => 'required|max:255',\n 'users_email' => 'required|email',\n 'users_user' => 'required',\n 'password' => 'required|min:5',\n 'users_role' => 'required'\n \n ];\n \n }", "title": "" }, { "docid": "e8e5b3929348e92c70e6feec8e53e2d4", "score": "0.5453998", "text": "protected function validator(array $data)\n {\n $estrategicos = Role::find(User::$NIVEL_ESTRATEGICO)->users()->count();\n $validator = ($estrategicos > 0) \n ? Validator::make($data, [\n 'name' => ['required', 'string', 'max:255', 'regex:/^([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\\']+[\\s])+([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\\'])+[\\s]?([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\\'])?$/'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'role' => ['required', 'exists:roles,id', 'integer', Rule::in([User::$ADMINISTRADOR, User::$NIVEL_TACTICO])],\n 'tipo' => ['required', 'integer', Rule::in([User::$EMPLEADO_UES, User::$PRACTICANTE])],\n ], [\n 'name.regex' => 'Se requieren dos nombres sin números ni caracteres especiales',\n 'role.exists' => 'El rol especificado no existe',\n 'role.in' => 'Ya existe un Usuario nivel Gerencial',\n ])\n : Validator::make($data, [\n 'name' => ['required', 'string', 'max:255', 'regex:/^([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\\']+[\\s])+([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\\'])+[\\s]?([A-Za-zÁÉÍÓÚñáéíóúÑ]{0}?[A-Za-zÁÉÍÓÚñáéíóúÑ\\'])?$/'],\n 'email' => ['required', 'string', 'email', 'max:255', 'unique:users'],\n 'role' => ['required', 'exists:roles,id', 'integer'],\n 'tipo' => ['required', 'integer', Rule::in([User::$EMPLEADO_UES, User::$PRACTICANTE])],\n ], [\n 'name.regex' => 'Se requieren dos nombres sin números ni caracteres especiales',\n 'role.exists' => 'El rol especificado no existe'\n ]);\n return $validator;\n }", "title": "" }, { "docid": "0efd62aa7717cff7c82f3995b5fb18ae", "score": "0.54535055", "text": "abstract public function validate();", "title": "" }, { "docid": "0efd62aa7717cff7c82f3995b5fb18ae", "score": "0.54535055", "text": "abstract public function validate();", "title": "" }, { "docid": "9b74af52c5b8af6db506023fb9095bf0", "score": "0.54465115", "text": "public function rules()\n {\n $data = Request::all();\n switch($this->method())\n {\n case 'POST':\n {\n return [\n 'role_id' => 'required',\n 'organization_id' => 'required',\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'email' => 'required|min:3|unique:admins,email',\n 'password' => 'required|min:6|confirmed',\n ];\n }\n case 'PUT':\n {\n return [\n 'role_id' => 'required',\n 'organization_id' => 'required',\n 'firstname' => 'required',\n 'lastname' => 'required',\n 'email' => 'required|min:3|unique:admins,email,'.$data['id'],\n ];\n }\n case 'PATCH':\n {\n return [\n 'password' => 'required|min:6|confirmed',\n ];\n }\n }\n\n }", "title": "" }, { "docid": "9bc573b97a90e63d85cf4b47400e6c2c", "score": "0.54368544", "text": "public function rules()\n {\n return [\n 'name'=>'required',\n 'email'=>'required|email|unique:users,email',\n 'password'=>['required','string','min:6',], \n //-'role'=>'in:admin,user', // en lugar de esto hemos creado una nueva class en App/ llamada Role donde tengo el metodo getList que me da los roles\n // implode convierte el array en una cadena de texto, con lo que el resultado es el mismo\n //'role'=>['nullable','in:'.implode(',',Role::getList())], //pero tambien podemos hacerlo con sintaxis orientada a obejto con la clase Rule\n 'role'=>['nullable',Rule::in(Role::getList()) ],\n // si quiero poner coondiciones a la contraseña uso expresiones regulares.\n // 'password'=>['required','string','min:6','regex:/^(?=\\w*\\d)(?=\\w*[A-Z])(?=\\w*[a-z])\\S{8,16}$/' ], //La contraseña debe tener al entre 8 y 16 caracteres, al menos un dígito, al menos una minúscula y al menos una mayúscula. NO puede tener otros símbolos.\n 'bio'=>'required', //para validar esto hacer una prueba con TDD\n 'twitter'=>['nullable','present','url'], //si pongo 'present' debo quitar array_filter del getValidaData, sino no pasan las pruebas\n // 'twitter'=>['nullable','url'], //para validar esto hacer una prueba con TDD\n //'profession_id'=>'', //si dejo esta linea así cuando ejecuto la prueba da un error de base de datos, pero quiero atajar el error antes así que pongo la siguiente linea\n // 'profession_id'=>'exists:professions,id', // para añadir una condicion de que solo pueda seleccionar profesiones selecccionables siguiente línea con sintaxis nueva para cosas mas complejas\n // indico que quiero que la profession este presente en el campo id la tabla professions\n // y que ademas sea selectable\n // 'profession_id'=>Rule::exists('professions','id')->where('selectable',true), //si no pongo el where falla la prueba only_selectable_professions_are_valid\n // si ademas quiero que solo se puedan seleccionar las que no están borradas con el softDelete\n // 'profession_id'=>[\n // 'nullable', 'present', // si pongo present debo quitar array_filter del getValidaData, sino no pasan las pruebas\n // Rule::exists('professions','id')->where('selectable',true)->whereNull('deleted_at')\n // ], //si no pongo el where falla la prueba only_selectable_professions_are_valid\n 'profession_id'=>[\n 'nullable', \n 'present', // si pongo present debo quitar array_filter del getValidaData, sino no pasan las pruebas\n Rule::exists('professions','id')->where('selectable',true)->whereNull('deleted_at'),\n 'required_if:otraProfesion,==,\"\"'\n ], //si no pongo el where falla la prueba only_selectable_professions_are_valid\n// 'otraProfesion'=>'nullable',\n 'otraProfesion'=>[\n 'nullable', \n 'required_if:profession_id,==,\"\"',\n ],\n 'skills'=>[\n 'array', //como espera un array lo debo marcar\n Rule::exists('skills','id') // sin esta regla falla la prueba the_skills_must_be_valid porque da un error de llave foranea en la bbdd\n ],\n ];\n }", "title": "" } ]
618d695e186d35cc47efdacb9fedbf14
Add new strings the will be replaced with the separator.
[ { "docid": "95f069f7a51aba3446f6df906f521350", "score": "0.0", "text": "public static function add_array_to_separator(array $array, bool $merge = true)\n {\n if ($merge === true) {\n self::$arrayToSeparator = \\array_merge(self::$arrayToSeparator, $array);\n } else {\n self::$arrayToSeparator = $array;\n }\n }", "title": "" } ]
[ { "docid": "7502db5ed08121bca9833592000f85e8", "score": "0.6715669", "text": "public function appendSeparator(): void\n {\n $this->append($this->separator, false);\n }", "title": "" }, { "docid": "a3a4916f95eabec0f1ff6db129c97131", "score": "0.5901176", "text": "public function transform_separator($separator)\n {\n }", "title": "" }, { "docid": "aa5431db3e2da5684e8e2a8ba7d1cf64", "score": "0.5636738", "text": "public function implode(string $separator): string\n {\n return implode($separator, $this->items);\n }", "title": "" }, { "docid": "3a793894a7ef5862667a05d74196ff75", "score": "0.5603788", "text": "public function setTitleSeparator(string $separator);", "title": "" }, { "docid": "8dbeb22aed65dddfa0b72a4729734ea7", "score": "0.55163956", "text": "public function setTitleSeparator($separator);", "title": "" }, { "docid": "cb4f7b46e6760357f5c08c6bfd9bed42", "score": "0.54995435", "text": "public function separator(String $separator) : static\n {\n $this->separator = $separator;\n\n return $this;\n }", "title": "" }, { "docid": "62778492d37046729df16da22bfe7078", "score": "0.5474936", "text": "public function using(string $separator): self;", "title": "" }, { "docid": "64bad28544060a1cc65aa1579daed6df", "score": "0.53607047", "text": "public function setSeparator(string $separator): void\n {\n $this->separator = $separator;\n }", "title": "" }, { "docid": "a724f238d9b1f4ae090f3713976b5eb3", "score": "0.53383577", "text": "function _sqlite_group_concat_step(&$context, $string, $separator = ',') {\n $context['sep'] = $separator;\n $context['data'][] = $string;\n }", "title": "" }, { "docid": "49bfd179906f168eff767cfbf77370ec", "score": "0.53322357", "text": "public function setSeparator($separator) {\n\t\t$this->separator = $separator;\n\t}", "title": "" }, { "docid": "4da7140997fd44e9be5b7ce73c12a105", "score": "0.5309587", "text": "public function setSeparator($separator) {\n $this->_separator = $separator;\n }", "title": "" }, { "docid": "3ffd07d0652eb38e9e701939dfb4fe37", "score": "0.5292435", "text": "abstract public function groupConcat(string $fields, string $separator): string;", "title": "" }, { "docid": "990ac5e182d507730cc8cc11e87f5a1e", "score": "0.5284229", "text": "abstract protected function getSeparator(): string;", "title": "" }, { "docid": "be18d6168e0aa9e09c312bd6398cf4f6", "score": "0.5271722", "text": "public function setSeparator($separator)\n {\n $this->separator = $separator;\n }", "title": "" }, { "docid": "be18d6168e0aa9e09c312bd6398cf4f6", "score": "0.5271722", "text": "public function setSeparator($separator)\n {\n $this->separator = $separator;\n }", "title": "" }, { "docid": "dc73b19c0cc6a0f10e99939296c90561", "score": "0.52503717", "text": "protected function addInsertSpecials($special, $separator = '', $offset = 1) {\n if (count($this->insertspecials) > $offset) $special = $separator . $special;\n $this->insertspecials[] = $special;\n }", "title": "" }, { "docid": "91b14a1a4184b9a4b8b52378a06ee80c", "score": "0.52401716", "text": "abstract public function getSeparator();", "title": "" }, { "docid": "de2dddb5764481b7bce3e3718d493e1d", "score": "0.5202042", "text": "function append (&$string, $append, $separator='') {\n append($string, $append, $separator);\n}", "title": "" }, { "docid": "eb9816d019d91096561cb1df8afb0e3c", "score": "0.5141064", "text": "public function setValueSeparator($separator = '|'){\n\t\t$this->_valueSeparator = $separator;\n\t}", "title": "" }, { "docid": "61d984df168b08ff7756235e750430a9", "score": "0.5134679", "text": "public function addSeparator($token){\n\t\t$this->wikiContent.= $this->wikiContentArr[$this->separatorCount];\n\t\t$this->separatorCount++;\n\t\tif($this->separatorCount > count($this->separators))\n\t\t\t$this->currentSeparator = end($this->separators);\n\t\telse\n\t\t\t$this->currentSeparator = $this->separators[$this->separatorCount-1];\n\t\t$this->wikiContent .= $this->currentSeparator;\n\t\t$this->contents[$this->separatorCount]='';\n\t\t$this->wikiContentArr[$this->separatorCount]='';\n\t}", "title": "" }, { "docid": "5da934fec4b63575b4079a356e4e0d2a", "score": "0.51280916", "text": "public function setSeparator(string $separator) {\n $this->separator = $separator;\n }", "title": "" }, { "docid": "9d709baf28f848e431e5ab09fc913940", "score": "0.51077825", "text": "final public function setCustomSeparator(string $userInput): void\n {\n $this->validate($userInput);\n\n //separators\n if (1 === preg_match(self::PATTERN_DEFAULT, $userInput, $matches)) {\n $separator = $matches[1];\n }\n\n Registry::set(Registry::KEY_SEPARATOR, $separator);\n }", "title": "" }, { "docid": "36577b491a54ae0dde3dbc47a39241e8", "score": "0.5057076", "text": "function join($glue, $separator) {\n $string = array();\n foreach ( $this->storage as $key => $val ) {\n $string[] = \"{$key}{$glue}{$val}\";\n }\n return implode( $separator, $string );\n }", "title": "" }, { "docid": "7c01649eb03e3d39f6219886ded8fa4e", "score": "0.5044858", "text": "public function explodeCustomDelimiter()\n {\n $this->assertSame(['a', 'b', 'c', 'd,e'], Strings::explode('a b c d,e', ' '));\n }", "title": "" }, { "docid": "127ac14d84ade37666a5d93e9a035ef6", "score": "0.5033189", "text": "private static function add_var_delimiter($text)\n {\n }", "title": "" }, { "docid": "42402c2579d05ad03209636a64ab28e2", "score": "0.5033063", "text": "public static function document_title_separator () : void \n {\n add_filter(\"document_title_separator\", function () {\n return \" | \";\n });\n }", "title": "" }, { "docid": "13efcd72ce5781d5fe36fcb516e85b03", "score": "0.50309354", "text": "function pewc_add_on_price_separator( $sep=false, $item=false ) {\n\n\t$separator = get_option( 'pewc_price_separator', false );\n\t$sep = ' ' . $separator . ' ';\n\treturn $sep;\n\n}", "title": "" }, { "docid": "6717cab30fdba4716b8c579c5126f8c4", "score": "0.5003147", "text": "public static function imploded($glue);", "title": "" }, { "docid": "8d9b2429b0f65ed84ba1d220c05067a3", "score": "0.49927002", "text": "public function testSeparator2()\n {\n }", "title": "" }, { "docid": "aa7f42ddf9ee8bc4054c86a4a5f5ed0f", "score": "0.49800834", "text": "function sep()\n {\n return call_user_func([Util::class, 'sep']);\n }", "title": "" }, { "docid": "3c1dbe612f1db9bffc428a3e41b0e6c3", "score": "0.49756515", "text": "public function filter_document_title_separator($separator)\n {\n }", "title": "" }, { "docid": "da6e2a89ea2d3058ac3402b5cd7c5ec2", "score": "0.49721307", "text": "public function getSeparator();", "title": "" }, { "docid": "1434ee403306d954360c9063fe3cd445", "score": "0.4968423", "text": "public function setSeparator($open,$close){\r\n\t\t$this->separator[0] = $open;\r\n\t\t$this->separator[1] = $close;\r\n\t}", "title": "" }, { "docid": "58de7cf5ba01e35270be77e5c722d256", "score": "0.49498096", "text": "public function testSeparator()\n {\n }", "title": "" }, { "docid": "e5f6369a73bc3ce78ef2c61104e4f836", "score": "0.49374023", "text": "function fixsep($sep) {\r\n $sep = trim($sep);\r\n if ($sep == '') return ' ';\r\n else {\r\n $sep = stripslashes($sep);\r\n $sep = str_replace('\\t', \"\\t\", $sep);\r\n $sep = str_replace('\\n', \"\\n\", $sep);\r\n $sep = str_replace('\\r', \"\\r\", $sep);\r\n return $sep;\r\n }\r\n}", "title": "" }, { "docid": "843e8280e43f14c4c9a7af2d7a1cb6f1", "score": "0.49327064", "text": "public function withSeparator(?string $separator): QueryStringRendererInterface;", "title": "" }, { "docid": "b276aa5b864faa47cf9e796a4ad74354", "score": "0.49073488", "text": "private function doInsert() {\n if ($this->last == null || $this->last == ' ')\n return;\n\n $this->parts[] = $this->cur;\n\n $this->cur = '';\n $this->quoted_by = null;\n }", "title": "" }, { "docid": "42004c6bb50f34957ba9912518348da4", "score": "0.4907149", "text": "public function explode_customDelimiter()\n {\n $this->assertSame(['a', 'b', 'c', 'd,e'], S::explode('a b c d,e', ' '));\n }", "title": "" }, { "docid": "668b5a7b6e8c890032ee2b293407e824", "score": "0.49052548", "text": "function wpseo_retrieve_seperator()\n{\n\t$replacement = WPSEO_Options::get_default( 'wpseo_titles', 'separator' );\n\n\t// Get the titles option and the separator options\n\t$titles_options = get_option('wpseo_titles');\n\t$seperator_options = WPSEO_Option_Titles::get_instance()->get_separator_options();\n\n\t// This should always be set, but just to be sure\n\tif ( isset( $seperator_options[ $titles_options['separator'] ] ) ) {\n\t\t// Set the new replacement\n\t\t$replacement = $seperator_options[ $titles_options['separator'] ];\n\t}\n\n\t/**\n\t * Filter: 'wpseo_replacements_filter_sep' - Allow customization of the separator character(s)\n\t *\n\t * @api string $replacement The current separator\n\t */\n\n\treturn apply_filters( 'wpseo_replacements_filter_sep', $replacement );\n}", "title": "" }, { "docid": "c06e397e6c205a5c63024002c8769a02", "score": "0.49049053", "text": "public function afterLastIgnoreCase(string $separator): self\n {\n if ($separator === '') {\n return static::create();\n }\n\n if ($this->str === '') {\n return static::create();\n }\n\n $offset = $this->indexOfLastIgnoreCase($separator);\n if ($offset === false) {\n return static::create('', $this->encoding);\n }\n\n return static::create(\n UTF8::substr(\n $this->str,\n $offset + UTF8::strlen($separator, $this->encoding),\n null,\n $this->encoding\n ),\n $this->encoding\n );\n }", "title": "" }, { "docid": "9a4c95c2f6ca6ff366d18a68ccfe295a", "score": "0.4899088", "text": "public function concatenate($values, $separator = null)\n\t{\n\t\tif ($separator)\n\t\t{\n\t\t\treturn '(' . implode('+' . $this->quote($separator) . '+', $values) . ')';\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn '(' . implode('+', $values) . ')';\n\t\t}\n\t}", "title": "" }, { "docid": "bc2b78d9d4b84652ce2e928579fa071c", "score": "0.48781", "text": "private function breadcrumbs_separator_setting()\n {\n }", "title": "" }, { "docid": "8dd638ecbb66dbad0964299d70506b8e", "score": "0.4869182", "text": "public function add(string ...$tokens);", "title": "" }, { "docid": "10bbb52a0857fd44abbd65b37f1cca89", "score": "0.48677278", "text": "private function retrieve_sep()\n {\n }", "title": "" }, { "docid": "6ae0c03c9101b96b6e8ab9573cacb886", "score": "0.4866683", "text": "public function beforeLastIgnoreCase(string $separator): self\n {\n if ($separator === '') {\n return static::create();\n }\n\n if ($this->str === '') {\n return static::create();\n }\n\n $offset = $this->indexOfLastIgnoreCase($separator);\n if ($offset === false) {\n return static::create('', $this->encoding);\n }\n\n return static::create(\n UTF8::substr(\n $this->str,\n 0,\n $offset,\n $this->encoding\n ),\n $this->encoding\n );\n }", "title": "" }, { "docid": "4696b76e0207a95af76bf5c4b8ce06df", "score": "0.4866144", "text": "public function separator($separator)\n {\n $this->separator = $separator;\n\n return $this;\n }", "title": "" }, { "docid": "1ad534dafd0adc0edd53416f69b60538", "score": "0.48567328", "text": "function insertString($str){\n\t\t$this->backReplace('',$str);\n\t}", "title": "" }, { "docid": "83952b5f5d36a868cb5b13203e11ee54", "score": "0.483703", "text": "protected function resubsituteSeperatorValue($string) {\r\n\t\t$result = str_replace(self::ESACPED_SEPERATOR_VALUE, self::SEPARATOR_VALUE, $string);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "e74226f2871a1fc88b2eaaa65ebd567e", "score": "0.48187166", "text": "public static function resetToDefault()\n {\n static::$separator = ' ';\n }", "title": "" }, { "docid": "bf25ffc3ffeb4356492fc731f8b6688b", "score": "0.48141965", "text": "public function testInsert() {\n $this->assertEquals('Titon is the best PHP framework around!', String::insert('{framework} is the best {lang} framework around!', array(\n 'framework' => 'Titon',\n 'lang' => 'PHP'\n )));\n\n $this->assertEquals('Titon is the best PHP framework around!', String::insert(':framework is the best :lang framework around!', array(\n 'framework' => 'Titon',\n 'lang' => 'PHP'\n ), array(\n 'before' => ':',\n 'after' => ''\n )));\n }", "title": "" }, { "docid": "530d3aa9c7910c6c2b79c8283753c34a", "score": "0.47917297", "text": "public static function reset_array_to_separator()\n {\n self::$arrayToSeparator = [\n '/&quot;|&amp;|&lt;|&gt;|&ndash;|&mdash;/i', // \", &, <, >, –, —\n '/⁻|-|—|_|\"|`|´|\\'/',\n \"#/\\r\\n|\\r|\\n|<br.*/?>#isU\",\n ];\n }", "title": "" }, { "docid": "85b8fae7a7dc3b18151c89d083c678ff", "score": "0.47686112", "text": "public static function implode_quoted( $separator, $values )\n\t{\n\t\tif ( ! is_array( $values ) ) {\n\t\t\t$values = array();\n\t\t}\n\t\t$values = array_map( Method::create( '\\Filmio\\Utils', 'quote_spaced' ), $values );\n\t\treturn implode( $separator, $values );\n\t}", "title": "" }, { "docid": "0d49593cd72dbac4844c81f4f026428c", "score": "0.47650298", "text": "public function setSeparator($separator) {\n\t\t$this->separator = $separator;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a111d5d07972f20460c65ff995ec9020", "score": "0.4751325", "text": "public function testGetSetDelimitersString()\n {\n $delimiter = '%%';\n Breakout::setDelimiters($delimiter);\n\n $this->assertEquals(\n [$delimiter, $delimiter],\n Breakout::getDelimiters()\n );\n }", "title": "" }, { "docid": "9d3883e4012585c79205be34b5df6c0d", "score": "0.47254664", "text": "public function add_where_placeholder($column_name, $separator, $values)\n {\n }", "title": "" }, { "docid": "1c8d95a43b9f644399b5a7d85358d03b", "score": "0.47251248", "text": "function implode(string $delimiter = ''): string\n {\n return implode($delimiter, $this->values);\n }", "title": "" }, { "docid": "d6335e64591eb021985c922075f62e93", "score": "0.4712084", "text": "protected function subsituteSeperatorValue($string) {\r\n\t\t$result = str_replace(self::SEPARATOR_VALUE, self::ESACPED_SEPERATOR_VALUE, $string);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "4728ddb23a371e2209c2b886a1a49c50", "score": "0.47020954", "text": "protected function pImplode(array $nodes, string $glue = ''): string {}", "title": "" }, { "docid": "fcb7931d42080d33af6e46d00e237876", "score": "0.46974468", "text": "function jk_change_breadcrumb_delimiter( $defaults ) {\n\t$defaults['delimiter'] = ' <span class=\"separator\">/</span> ';\n\treturn $defaults;\n}", "title": "" }, { "docid": "e930f90e558d8999c5e42b53efe3b63a", "score": "0.4690746", "text": "public function getSeparator()\n {\n return \"OR\";\n }", "title": "" }, { "docid": "5e4443ae1b8a70799ba723a66690e92e", "score": "0.46615788", "text": "public function beforeLast(string $separator): self\n {\n if ($separator === '') {\n return static::create();\n }\n\n if ($this->str === '') {\n return static::create();\n }\n\n $offset = $this->indexOfLast($separator);\n if ($offset === false) {\n return static::create('', $this->encoding);\n }\n\n return static::create(\n UTF8::substr(\n $this->str,\n 0,\n $offset,\n $this->encoding\n ),\n $this->encoding\n );\n }", "title": "" }, { "docid": "c5aaf2dd32838e483fdc9d3375bc3ce0", "score": "0.46479473", "text": "function referentiel_purge_dernier_separateur($s, $sep){\r\n\tif ($s){\r\n\t\t$s=trim($s);\r\n\t\tif ($sep){\r\n\t\t\t$pos = strrpos($s, $sep);\r\n\t\t\tif ($pos === false) { // note : trois signes égal\r\n\t\t\t\t// pas trouvé\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\t// supprimer le dernier \"/\"\r\n\t\t\t\tif ($pos==strlen($s)-1){\r\n\t\t\t\t\treturn substr($s,0, $pos);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\treturn $s;\r\n}", "title": "" }, { "docid": "16cd85eec26d6bb63d1db094a2acb46c", "score": "0.46314895", "text": "function implode($sSeparator = ',', $sWrapper = \"'\", $aField = null) {\n\t $a = isset($aField) ? $aField : $this->aContainer;\n\t\t$sImplode = implode($sWrapper.$sSeparator.$sWrapper, $a);\n\t\treturn $sWrapper.$sImplode.$sWrapper;\n\t}", "title": "" }, { "docid": "b20ac13b5473db8841ead875831896e5", "score": "0.46305937", "text": "public function append($value)\r\n {\r\n if (strpos($value, self::SEPARATOR) !== false) {\r\n throw new LogicException('A value cannot contain delimiter');\r\n }\r\n\r\n array_push($this->collection, $value);\r\n return $this;\r\n }", "title": "" }, { "docid": "c07ed37f6e247a5995413d6782ae2a36", "score": "0.46272716", "text": "function it_should_accept_return_line_separator()\n {\n $this->add(\"1\\n2,3\")->shouldReturn(6);\n }", "title": "" }, { "docid": "f57cb2ac5cbf1be88b41fa3889b91dcd", "score": "0.46253085", "text": "protected function formatAddValues($request_values)\n {\n // Step 1: Strip the $request_values with the db_dir_ prefix.\n $addValues = stripPrefix(\"db_dir_\", $request_values);\n\n print_r($addValues);\n }", "title": "" }, { "docid": "0cb8806d5ef95e0ae02cc31afc0a423c", "score": "0.461331", "text": "static function split($arrItems, $sepator) {\n\t\tif (is_array($arrItems)) {\n \t\t\t$string = implode($sepator, $arrItems);\n \t\t\treturn $string;\n \t\t} else {\n \t\t\treturn $arrItems;\n \t\t}\n\t}", "title": "" }, { "docid": "eb4923686917de8c52c80717c2c9f921", "score": "0.4604002", "text": "public function afterFirstIgnoreCase(string $separator): self\n {\n if ($separator === '') {\n return static::create();\n }\n\n if ($this->str === '') {\n return static::create();\n }\n\n if (($offset = $this->indexOfIgnoreCase($separator)) === false) {\n return static::create();\n }\n\n return static::create(\n UTF8::substr(\n $this->str,\n $offset + UTF8::strlen($separator, $this->encoding),\n null,\n $this->encoding\n ),\n $this->encoding\n );\n }", "title": "" }, { "docid": "687d05a1fb973c559a6adb4da3adf2d5", "score": "0.45858967", "text": "function _join_paths() {\n $paths = array_filter(func_get_args());\n return preg_replace('#/{2,}#', DIRECTORY_SEPARATOR, implode(DIRECTORY_SEPARATOR, $paths));\n}", "title": "" }, { "docid": "9be1400f0a2ecbdd46ada9207570e80d", "score": "0.45820117", "text": "protected function get_separator_options()\n {\n }", "title": "" }, { "docid": "833dc7735db881b4d5001c04c8c4d1a3", "score": "0.45818168", "text": "public function afterFirst(string $separator): self\n {\n if ($separator === '') {\n return static::create();\n }\n\n if ($this->str === '') {\n return static::create();\n }\n\n if (($offset = $this->indexOf($separator)) === false) {\n return static::create();\n }\n\n return static::create(\n UTF8::substr(\n $this->str,\n $offset + UTF8::strlen($separator, $this->encoding),\n null,\n $this->encoding\n ),\n $this->encoding\n );\n }", "title": "" }, { "docid": "e7adb27a83fa81c11acd4408abef4eeb", "score": "0.4576868", "text": "public function afterLast(string $separator): self\n {\n if ($separator === '') {\n return static::create();\n }\n\n if ($this->str === '') {\n return static::create();\n }\n\n $offset = $this->indexOfLast($separator);\n if ($offset === false) {\n return static::create('', $this->encoding);\n }\n\n return static::create(\n UTF8::substr(\n $this->str,\n $offset + UTF8::strlen($separator, $this->encoding),\n null,\n $this->encoding\n ),\n $this->encoding\n );\n }", "title": "" }, { "docid": "b6d139dbe905de5547db4d7380f79344", "score": "0.45758197", "text": "protected function resubsituteSeperatorParam($string) {\r\n\t\t$result = str_replace(self::ESACPED_SEPERATOR_PARAM, self::SEPARATOR_PARAM, $string);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "70c831d2e6149856879ff51c70726c45", "score": "0.45689085", "text": "public function generate($separator)\n {\n $now = date('Ymd');\n $nowSeparated = date('Y-m-d');\n $explodedDates = explode('-', $nowSeparated);\n\n $result = $separator;\n $result .= $now;\n foreach ($explodedDates as $explodedDate) {\n $result .= $separator;\n $result .= $this->toRoman($explodedDate);\n }\n $result .= $separator;\n return $result;\n }", "title": "" }, { "docid": "2fa6adf0353775b20f8ea4bc89a48565", "score": "0.45674282", "text": "protected static function get_separator_option_list()\n {\n }", "title": "" }, { "docid": "362e6bf44c6db4f0ec44d3ff4da66d43", "score": "0.45599005", "text": "public function setFieldSeparator($separator)\n {\n $this->m_fieldSeparator = $separator;\n }", "title": "" }, { "docid": "fda97ba1744597b21a66aaeac0ac66ca", "score": "0.4558663", "text": "public function setSeparator($separator)\n {\n $this->separator = $separator;\n\n return $this;\n }", "title": "" }, { "docid": "fda97ba1744597b21a66aaeac0ac66ca", "score": "0.4558663", "text": "public function setSeparator($separator)\n {\n $this->separator = $separator;\n\n return $this;\n }", "title": "" }, { "docid": "f5055053b5a370ee2fe53a368aead07e", "score": "0.455482", "text": "public function append_to_title($string, $separator = null)\n\t{\n\t\t// Work out the before separator\n\t\tif ($separator === null) $separator = '-';\n\t\t$before = null;\n\t\tif ($separator !== false) $before = sprintf(' %s ', (string) $separator);\n\t\t\n\t\t$this->title = $this->title . $before . (string) $string;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "64b88b1a8ffded8d1bfeb4c8f99587de", "score": "0.4554221", "text": "public function tagAppendTitleSeparator(UnitTester $I)\n {\n $I->wantToTest('Tag - appendTitle() - separator');\n\n Tag::resetInput();\n\n Tag::setTitle('Title');\n Tag::setTitleSeparator('|');\n\n Tag::appendTitle('Class');\n\n $I->assertEquals(\n 'Title',\n Tag::getTitle(false, false)\n );\n\n $I->assertEquals(\n 'Title|Class',\n Tag::getTitle(false, true)\n );\n\n $I->assertEquals(\n '<title>Title|Class</title>' . PHP_EOL,\n Tag::renderTitle()\n );\n }", "title": "" }, { "docid": "482e8e543c6b70a79b400739246b5cc9", "score": "0.45286834", "text": "protected function _addStrings() {\n parent::_addStrings();\n\n $this->string['Building.title'] = __('Gebäudeverwaltung');\n $this->string['Building.add-text'] = __('Es existieren noch keine Gebäude. Jetzt das erste Gebäude');\n }", "title": "" }, { "docid": "a43d095d506fac36dffdd1412a901e41", "score": "0.45193627", "text": "public function setRecordSeparator($separator = \"\\n\"){\n\t\t$this->_recordSeparator = $separator;\n\t}", "title": "" }, { "docid": "6ffe5d663eec653db5646f3ebea64f9c", "score": "0.45081612", "text": "private function breadcrumbs_separator_setting() {\n\t\t$this->wp_customize->add_setting(\n\t\t\t'wpseo_titles[breadcrumbs-sep]', array(\n\t\t\t\t'default' => '',\n\t\t\t\t'type' => 'option',\n\t\t\t\t'transport' => 'refresh',\n\t\t\t)\n\t\t);\n\n\t\t$this->wp_customize->add_control(\n\t\t\tnew WP_Customize_Control(\n\t\t\t\t$this->wp_customize, 'wpseo-breadcrumbs-separator', array(\n\t\t\t\t\t'label' => __( 'Breadcrumbs separator:', 'wordpress-seo' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'section' => 'wpseo_breadcrumbs_customizer_section',\n\t\t\t\t\t'settings' => 'wpseo_titles[breadcrumbs-sep]',\n\t\t\t\t\t'context' => '',\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "2784bb188cecc7358fe41181338acfd3", "score": "0.45068684", "text": "public function addStatementDelimiter($delimiter) {\n\t\t// existing delimter, skip\n\t\tif (in_array($delimiter, $this->statement_delimiters)) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$this->statement_delimiters[] = $delimiter;\n\t\t\n\t\t// add the first character to the delimters array\n\t\tif (!in_array($delimiter[0], $this->delimiters)) {\n\t\t\t$this->delimiters[] = $delimiter[0];\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7de9db2cc21b96f0c6cb2aeca5ee3ce4", "score": "0.44987774", "text": "public function setCloseSeparator($c){\r\n\t\t$this->separator[1] = $c;\r\n\t}", "title": "" }, { "docid": "36e6be1d6ba04240a8def88962e208db", "score": "0.44952282", "text": "public function testDateRangeModifiedRemovableDelimiters()\n {\n $dateRange = new DateRange(new DateTimeImmutable('6th Feb 18'), new DateTimeImmutable('2018-02-07'));\n $dateRange->changeRemovableDelimiters('~\\\\ ');\n self::assertEquals('06 – 07~Feb~\\ 18', $dateRange->format('d~M~\\\\\\ y'));\n }", "title": "" }, { "docid": "77862094479b87930f407217edfec0a8", "score": "0.4484256", "text": "public function separator($separator = '')\n {\n $this->checkIsString('separator', $separator);\n\n return empty($separator = trim($separator))\n ? $this->getSeparator()\n : $this->setSeparator($separator);\n }", "title": "" }, { "docid": "b7faaf8fbb4c9de6db37ae5a1aacc68e", "score": "0.44760498", "text": "public function testDateRangeModifiedSeparator()\n {\n $dateRange = new DateRange(new DateTimeImmutable('6th Feb 18'), new DateTimeImmutable('2018-02-07'));\n $dateRange->changeSeparator(' to ');\n self::assertEquals('06 to 07/2/18', $dateRange->format('d/n/y'));\n }", "title": "" }, { "docid": "30f641ff12c4ac7b7664032058cf74d6", "score": "0.44718578", "text": "function add_admin_menu_separator( $position ) {\n\n\tglobal $menu;\n\n\t$menu[ $position ] = array(\n\t\t0\t=>\t'',\n\t\t1\t=>\t'read',\n\t\t2\t=>\t'separator' . $position,\n\t\t3\t=>\t'',\n\t\t4\t=>\t'wp-menu-separator'\n\t);\n\n}", "title": "" }, { "docid": "dcf8406cbdcc0c45e0cbdbc2f32c1057", "score": "0.44566536", "text": "private function joinPaths()\n {\n $paths = array();\n foreach (func_get_args() as $arg) {\n if ($arg !== '') {\n $paths[] = $arg;\n }\n }\n $tmp = preg_replace('#/+#', '/', implode('/', $paths));\n // Aditional check to solve double slash if it begins with http or https\n return preg_replace('/(^https?:\\/)([a-zA-Z0-9])/', '${1}/${2}', $tmp);\n }", "title": "" }, { "docid": "54f9f88ffd08f32f5fd3a40fd04d4205", "score": "0.44559065", "text": "public function getTitleSeparator();", "title": "" }, { "docid": "063a8fc54272e1e1de8ce77c014bae90", "score": "0.4449631", "text": "public function testListing() {\n $this->assertEquals('red, blue &amp; green', String::listing(array('red', 'blue', 'green')));\n $this->assertEquals('red &amp; green', String::listing(array('red', 'green')));\n $this->assertEquals('blue', String::listing(array('blue')));\n $this->assertEquals('green', String::listing('green'));\n\n // custom\n $this->assertEquals('red, blue, and green', String::listing(array('red', 'blue', 'green'), ', and '));\n $this->assertEquals('red - blue and green', String::listing(array('red', 'blue', 'green'), ' and ', ' - '));\n }", "title": "" }, { "docid": "a44fa92c4ac691dfa1f841fd4fff7aec", "score": "0.4447138", "text": "abstract public function getLineSeparator();", "title": "" }, { "docid": "a20d10476b4bbab36cf2b40e869da8f3", "score": "0.44403973", "text": "public function joinPaths($paths)\n {\n $paths = array_filter($paths);\n return preg_replace(',/+,','/', join('/', $paths));\n }", "title": "" }, { "docid": "319e4eaeab3aef6ca53bcd67468b25dc", "score": "0.4439092", "text": "private function addOptions($options)\n\t{\n\t\t$options = $this->options . ',' . $options;\n\t\t$this->options = ltrim(rtrim($options, ','), ',');\n\t\treturn $this->options;\n\t}", "title": "" }, { "docid": "08d9f89cff32892ba8ca62f0d338f73b", "score": "0.4435904", "text": "public static function separator_search($search){\n \n \t$portions = explode(\" \", $search);\n \t$union = implode(\"%20\", $portions);\n\n \treturn $union; \n\n }", "title": "" }, { "docid": "fedc656c64905215d96474553f689851", "score": "0.44350022", "text": "public function join($values);", "title": "" }, { "docid": "b306a702c749e0be04fe9297a52ce11a", "score": "0.443393", "text": "protected function subsituteSeperatorParam($string) {\r\n\t\t$result = str_replace(self::SEPARATOR_PARAM, self::ESACPED_SEPERATOR_PARAM, $string);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "3285ad4bbe7dcdb9a94de1b6e2c7f634", "score": "0.4433483", "text": "public function setSeparator($sep)\n {\n $this->separator = $sep;\n return $this;\n }", "title": "" }, { "docid": "049eb87cfff8d51c56b1bf971bc369f1", "score": "0.44295797", "text": "public static function append($str){\n\t\tstatic::$items[] = $str;\n\t}", "title": "" }, { "docid": "0f9834b19c5331d385fa966cc5469c9b", "score": "0.44236347", "text": "public function prepend_to_title($string, $separator = null)\n\t{\n\t\t// Work out the after separator\n\t\tif ($separator === null) $separator = '-';\n\t\t$after = null;\n\t\tif ($separator !== false) $after = sprintf(' %s ', (string) $separator);\n\t\t\n\t\t$this->title = (string) $string . $after . $this->title;\n\t\treturn $this;\n\t}", "title": "" } ]
71d21a3aeb198c5d4f819b6542cb571d
to prevent the same entry being duplicated
[ { "docid": "05592951a8d35fef2dcf2ae156e2512d", "score": "0.0", "text": "function checkCodeExist($conn, $cod_med){\n $query = $conn ->prepare(\"SELECT * FROM medicamente WHERE cod_med=:cod_med\");\n $query ->bindParam(\":cod_med\", $cod_med);\n $query ->execute();\n \n //check\n if($query -> rowCount()== 1 ){ \n return true;\n }\n else{\n return false;\n }\n \n }", "title": "" } ]
[ { "docid": "2b3bf09ab551a027637cbedfc03e9f74", "score": "0.73385066", "text": "public function isDuplicated(){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "620b1fca64cd0fde785d9b0f657c7cdf", "score": "0.6558987", "text": "protected function _duplicateOnRecordNoExsists() {\n \t$message = 'Rekord o podanym kluczu głównym nie istnieje w systemie';\n\t\t$this->_helper->flashMessenger->addMessage($message);\n\t\t$this->_helper->redirector->goToUrlAndExit(getenv('HTTP_REFERER'));\n }", "title": "" }, { "docid": "330147048ba5235029c16a9d96066e20", "score": "0.6467533", "text": "abstract protected function get_duplicate_post_fields();", "title": "" }, { "docid": "a63ffd167ee28d1e4e2b0620a4d452bd", "score": "0.628988", "text": "public function is_duplicate()\n {\n return ($this->size > 1);\n }", "title": "" }, { "docid": "cfa133b797da5b4d3d0a3db3aa5b3550", "score": "0.62744576", "text": "abstract protected function get_duplicate_custom_fields();", "title": "" }, { "docid": "715c8c9e8fffc4bbaf64e2275fba9c3e", "score": "0.6129199", "text": "public function getUniqueToAdd();", "title": "" }, { "docid": "968a6e6e29a400f6987ad72d249b4e37", "score": "0.6089842", "text": "abstract protected function getDuplicateError();", "title": "" }, { "docid": "25b9740deee97cc5b7b14e17d0904a91", "score": "0.5990137", "text": "public function ajax_checkduplicate()\r\n {}", "title": "" }, { "docid": "25b9740deee97cc5b7b14e17d0904a91", "score": "0.5990137", "text": "public function ajax_checkduplicate()\r\n {}", "title": "" }, { "docid": "1d916337b860f8e668ba2c1d3e541bbe", "score": "0.5979937", "text": "protected function insertEntry($entry)\n {\n // Allow only unique values\n if (isset($this->idMap[$entry->id])) {\n return false;\n }\n\n $this->items[] = $entry;\n $this->idMap[$entry->id] = $entry;\n\n return true;\n }", "title": "" }, { "docid": "98e88e0a97b062914c7b93977b204b7f", "score": "0.59778214", "text": "abstract public function deduplicate();", "title": "" }, { "docid": "ccfa4f867262cefd9fca284f12e6d6a2", "score": "0.5969427", "text": "function cspm_duplicate_map(){\r\n\t\t\t\r\n\t\t\tglobal $wpdb;\r\n\t\t\t\r\n\t\t\tif(!(isset($_GET['post']) || isset($_POST['post']) || (isset($_REQUEST['action']) && 'cspm_duplicate_map' == $_REQUEST['action'])))\r\n\t\t\t\twp_die('No map to duplicate has been supplied!');\r\n\t\t \r\n\t\t\t/*\r\n\t\t\t * Nonce verification */\r\n\t\t\t \r\n\t\t\tif(!isset($_GET['duplicate_nonce']) || !wp_verify_nonce($_GET['duplicate_nonce'], basename( __FILE__ )))\r\n\t\t\t\treturn;\r\n\t\t \r\n\t\t\t/*\r\n\t\t\t * Get the original post id */\r\n\t\t\t \r\n\t\t\t$post_id = (isset($_GET['post']) ? absint($_GET['post']) : absint($_POST['post']));\r\n\t\t\t\r\n\t\t\t/*\r\n\t\t\t * Get all the original post data */\r\n\t\t\t \r\n\t\t\t$post = get_post($post_id);\r\n\t\t \r\n\t\t\t/*\r\n\t\t\t * if you don't want current user to be the new post author,\r\n\t\t\t * then change next couple of lines to this: $new_post_author = $post->post_author; */\r\n\t\t\t \r\n\t\t\t$current_user = wp_get_current_user();\r\n\t\t\t$new_post_author = $current_user->ID;\r\n\t\t \r\n\t\t\t/*\r\n\t\t\t * if post data exists, create the post duplicate */\r\n\t\t\t \r\n\t\t\tif(isset($post) && $post != null){\r\n\t\t \r\n\t\t\t\t/*\r\n\t\t\t\t * new post data array */\r\n\t\t\t\t \r\n\t\t\t\t$args = array(\r\n\t\t\t\t\t'comment_status' => $post->comment_status,\r\n\t\t\t\t\t'ping_status' => $post->ping_status,\r\n\t\t\t\t\t'post_author' => $new_post_author,\r\n\t\t\t\t\t'post_content' => $post->post_content,\r\n\t\t\t\t\t'post_excerpt' => $post->post_excerpt,\r\n\t\t\t\t\t'post_name' => $post->post_name,\r\n\t\t\t\t\t'post_parent' => $post->post_parent,\r\n\t\t\t\t\t'post_password' => $post->post_password,\r\n\t\t\t\t\t'post_status' => 'publish',\r\n\t\t\t\t\t'post_title' => 'Duplicate of, \"'.$post->post_title.'\"',\r\n\t\t\t\t\t'post_type' => $post->post_type,\r\n\t\t\t\t\t'to_ping' => $post->to_ping,\r\n\t\t\t\t\t'menu_order' => $post->menu_order\r\n\t\t\t\t);\r\n\t\t \r\n\t\t\t\t/*\r\n\t\t\t\t * Insert the post by wp_insert_post() function */\r\n\t\t\t\t \r\n\t\t\t\t$new_post_id = wp_insert_post( $args );\r\n\t\t \r\n\t\t\t\t/*\r\n\t\t\t\t * Duplicate all post meta just in two SQL queries */\r\n\t\t\t\t \r\n\t\t\t\t$post_meta_infos = $wpdb->get_results(\"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$post_id\");\r\n\t\t\t\t\r\n\t\t\t\tif(count($post_meta_infos) != 0){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$sql_query = \"INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) \";\r\n\t\t\t\t\t\r\n\t\t\t\t\tforeach ($post_meta_infos as $meta_info){\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$meta_key = $meta_info->meta_key;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tif($meta_key == '_wp_old_slug')\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$meta_value = addslashes($meta_info->meta_value);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$sql_query_sel[] = \"SELECT $new_post_id, '$meta_key', '$meta_value'\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t$sql_query .= implode(\" UNION ALL \", $sql_query_sel);\r\n\t\t\t\t\t\r\n\t\t\t\t\t$wpdb->query($sql_query);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t \r\n\t\t\t\t/*\r\n\t\t\t\t * Finally, redirect to the edit map screen */\r\n\t\t\t\t \r\n\t\t\t\twp_redirect(admin_url('post.php?action=edit&post='.$new_post_id));\r\n\t\t\t\t\r\n\t\t\t\texit;\r\n\t\t\t\t\r\n\t\t\t}else wp_die('Map creation failed, could not find the original map: '.$post_id);\r\n\t\t\r\n\t\t}", "title": "" }, { "docid": "5dce22e80d8c6c80912ac8af15256972", "score": "0.5846847", "text": "public function onDuplicateKeyUpdate(){\n \tif($this->getType() == self::INSERT){\n \t \t\t$this->onDuplicateKeyUpdate = true;\n \t}\n \t \t\n \t \treturn $this;\n }", "title": "" }, { "docid": "b68e6cf8b08b53935d5603c8f9fd11f9", "score": "0.5813066", "text": "protected function getUniqeFields()\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "46b714b1a4790a599a067bb643e960a3", "score": "0.58081675", "text": "function add_entry ($entry) { return false; }", "title": "" }, { "docid": "f2a88ebb10e79c5939b47ce1f80ea577", "score": "0.57943475", "text": "function LineDuplicate(){}", "title": "" }, { "docid": "a6d8e9aecbb6836333ed96d467d6b78d", "score": "0.577942", "text": "public function can_be_repetitive() { return true; }", "title": "" }, { "docid": "706157f5347f92b0bfcde3941cb073f9", "score": "0.57671356", "text": "protected function preventDuplicateAbandoned()\n {\n if ($this->is_abandoned) {\n self::isAbandoned()\n ->where('id', '<>', $this->id)\n ->update(['is_abandoned' => false]);\n }\n }", "title": "" }, { "docid": "7931394cf365628993608cece210be6e", "score": "0.57544553", "text": "public function markCardNumberDuplicates() { // do update however is called validate\n DB::table(WORK_TABLE_NAME .' as u1')\n ->join(WORK_TABLE_NAME .' as u2', 'u1.card_number', '=', 'u2.card_number')\n //->where([\n // ['u1.status_id', '=', ENTRY_STATUS_UNKNOWN],\n // ['u2.status_id', '=', ENTRY_STATUS_UNKNOWN],\n //])\n ->whereRaw('u1.id <> u2.id')\n ->update([\n 'u1.status_id' => ENTRY_STATUS_REJECTED,\n 'u1.status_details' => DB::raw(\"CONCAT(u1.status_details, IF(u1.status_id <> \" . ENTRY_STATUS_UNKNOWN . \", '; ', ''),\n 'Card Number duplicate, the same as line ', u2.id)\")\n ]);\n }", "title": "" }, { "docid": "3c151acffc0f91f5dfa6df176d5f097d", "score": "0.5748918", "text": "public function isUnique();", "title": "" }, { "docid": "3c151acffc0f91f5dfa6df176d5f097d", "score": "0.5748918", "text": "public function isUnique();", "title": "" }, { "docid": "1dd80189e299b2efbc084355268319f9", "score": "0.5747607", "text": "function is_dup_add($table,$field,$value,$disp=false)\n\t{\n\t\t$q = \"select \".$field.\" from \".$table.\" where \".$field.\" = '\".$value.\"'\"; \n\t\tif ($disp)\n\t\t\tdie($q);\n\t\t$r = mysql_query($q);\n\t\tif(mysql_num_rows($r) > 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "e672a15268198b18eeca1b3aa6eec418", "score": "0.57372355", "text": "public function duplicate()\n {\n return $this->_SKELETON->insert($this->_DATA);\n }", "title": "" }, { "docid": "f4e90cc395eac0c29edd96bb458af4cc", "score": "0.57063967", "text": "public function ajax_checkduplicate()\r\n {\r\n try\r\n {\r\n $posted=array();\r\n ///is the primary key,used for checking duplicate in edit mode\r\n $posted[\"id\"]= decrypt($this->input->post(\"h_id\"));/*don't change*/\r\n $posted[\"duplicate_value\"]= get_formatted_string($this->input->post(\"h_duplicate_value\"));\r\n \r\n if($posted[\"duplicate_value\"]!=\"\")\r\n {\r\n $qry=\" Where \".(intval($posted[\"id\"])>0 ? \" ut.id!=\".intval($posted[\"id\"]).\" And \" : \"\" )\r\n .\" ut.s_user_type='\".$posted[\"duplicate_value\"].\"'\";\r\n $info=$this->obj_mod->fetch_multi($qry,$start,$limit); /*don't change*/\r\n if(!empty($info))/////Duplicate eists\r\n {\r\n echo \"Duplicate exists\";\r\n }\r\n else\r\n {\r\n echo \"valid\";/*don't change*/\r\n }\r\n unset($qry,$info);\r\n } \r\n }\r\n catch(Exception $err_obj)\r\n {\r\n show_error($err_obj->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "beeab04de1ce4e2a565dfad258985225", "score": "0.5658283", "text": "public function validate_unique_entry($values)\n {\n $hash = implode('|', $values);\n\n if (isset($this->entry_hashes[$hash])) {\n $message = $this->set_error_message('Duplicate entry, same as line: %d', $this->entry_hashes[$hash]);\n throw new Exception($message);\n }\n\n $this->entry_hashes[$hash] = $this->line_number;\n }", "title": "" }, { "docid": "7a43eb193ef59e20a46fa77c9cc6aaa5", "score": "0.5583549", "text": "function duplicate_check($table,$col,$value,$id=\"\"){\n $count = 0 ;\n $value = trim($value) ;\n if( $id != \"\"){\n $result = @mysql_query ('SELECT '.$col.' FROM '.$table.' WHERE '.$col.'=\\''.$value.'\\' and '.self::primarykey($table).'!=\\''.$id.'\\'' );\n }\n else{\n $result = @mysql_query ('SELECT '.$col.' FROM '.$table.' WHERE '.$col.'=\\''.$value.'\\'');\n }\n // fetch rows\n $count = @mysql_num_rows($result);\n if($count>=1){\n return true;\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "ce6f13008bec91924ae5648f561f4407", "score": "0.5565993", "text": "public function checkForDuplicate ()\n {\n $query = \"SELECT id FROM `address` \".\n \"WHERE (IFNULL(location, '') = \".$this->location->escapeSQL($this->mysqli).\") \".\n \"AND (IFNULL(address1, '') = \".$this->address1->escapeSQL($this->mysqli).\") \".\n \"AND (IFNULL(zip, '') = \".$this->zip->escapeSQL($this->mysqli).\") \";\n $rs = $this->fetchRecords($query);\n return (count($rs)>0);\n }", "title": "" }, { "docid": "8698fd2263717d0bff8e9fac01207045", "score": "0.55654603", "text": "public function importDuplicatedEntryItem(string $entryId, array $item): void\n {\n $itemId = $this->generateItemId($entryId, $item);\n if (!$this->isDuplicatedItemId($itemId) && !$this->getItemManager()->get($itemId))\n {\n $importedItem = $this->getNewImportedItem($entryId, $item);\n $importedItem\n ->setStatusId(Item::STATUS_DUPLICATE)\n ->setConfigHash($this->getOptionsHash())\n ->setTarget($this->getManager()->new())\n ;\n $this->saveImportedItem($importedItem);\n }\n }", "title": "" }, { "docid": "00cba5ad61c476d282e2c0a28838b0ef", "score": "0.55607337", "text": "public function testDuplicate()\n {\n $this->duplicate(\n [\n 'menuId' => 1,\n 'parentId' => null,\n 'sectionId' => 1,\n 'icon' => 'fa-user',\n 'sort' => 10,\n ],\n [],\n self::EXCEPTION_MODEL\n );\n }", "title": "" }, { "docid": "62c215ca2bf0335c08c3ddda34f50c3d", "score": "0.5535299", "text": "protected function isDuplicatedEntryId($entryId): bool\n {\n return isset($this->processedEntriesIds[$entryId]);\n }", "title": "" }, { "docid": "1a2b77553e01a3a3f6bc862e2c1647c1", "score": "0.55291", "text": "public function isDuplicate() {\n\t\t\t$duplicate = false;\n\t\t\t$sql = \"SELECT `emailID` FROM `\".$this->table.\"` WHERE `name` = '\".prep($this->get('name')).\"'\";\n\t\t\t$result = $this->dbh->query($sql);\n\t\t\tif ($result->rowCount > 0) {\n\t\t\t\t$id = $this->get('emailID');\n\t\t\t\twhile ($row = $result->fetchRow()) {\n\t\t\t\t\tif ($row['emailID'] != $id) {\n\t\t\t\t\t\t$this->addError('There is an existing email template with the same name', 'duplicate');\n\t\t\t\t\t\t$this->addErrorField('name');\n\t\t\t\t\t\t$duplicate = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $duplicate;\n\t\t}", "title": "" }, { "docid": "9728d9e68eda44040bb20a45c3143316", "score": "0.55158955", "text": "function addEntry($entry) {\n if (!$entry->hasField('key')) {\n throw new Exception('error: a bibliographic entry must have a key '.$entry->getText());\n }\n // we keep its insertion order\n $entry->order = count($this->bibdb);\n $this->bibdb[$entry->getKey()] = $entry;\n }", "title": "" }, { "docid": "69335455fe61f471814f880748f84508", "score": "0.55061835", "text": "public function getUniqueRow(){ }", "title": "" }, { "docid": "83410350a1c2a1dccfada8a1fbef120f", "score": "0.5500787", "text": "public function removeDuplicates(): void {\n $tortoise = $this->head;\n\n while (null !== $tortoise) {\n $hare = $tortoise;\n while (null !== $hare->getNext()) {\n if (Comparator::equals($hare->getNext()->getValue(), $tortoise->getValue())) {\n $hare->setNext($hare->getNext()->getNext());\n } else {\n $hare = $hare->getNext();\n }\n }\n $tortoise = $tortoise->getNext();\n }\n\n }", "title": "" }, { "docid": "e5bc419fbdbc35f21a50e3024c60dc31", "score": "0.5494195", "text": "public function validateDupicateEntry($attribute, $value, $parameters, $validator)\n {\n $is_validated = true;\n $item = [];\n $counter = 0;\n $item[0] = 0;\n foreach ($value as $key => $val) {\n \n if(in_array($val['id'], $item))\n {\n return false;\n }\n $item[$counter++] = $val['id'];\n }\n \n return true;\n }", "title": "" }, { "docid": "0130c2d37dd05f5cdd755265433ca314", "score": "0.54935074", "text": "public function markEntriesWithCardNumbersAlreadyTaken() { // validate what exactly? + what is dup id\n // we'd maybe better go with subquery\n DB::table(WORK_TABLE_NAME .' as u1')\n ->join('customers' .' as u2', 'u1.card_number', '=', 'u2.card_number')\n //->where([['u1.status_id', '=', ENTRY_STATUS_UNKNOWN],])\n ->whereRaw('u1.identifier <> u2.id AND u2.deleted_at IS NULL')\n ->update([\n 'u1.status_id' => ENTRY_STATUS_REJECTED,\n 'u1.status_details' => DB::raw(\"CONCAT(u1.status_details, IF(u1.status_id <> \" . ENTRY_STATUS_UNKNOWN . \", '; ', ''),\n 'Card Number already taken, Customer id ', u2.id)\")\n ]);\n }", "title": "" }, { "docid": "b4b56c97b6c1f1bbfb1c2b3a7f94465a", "score": "0.54909116", "text": "public function duplicate()\n\t{\n\t\t$fields = $this->as_array();\n\n\t\tunset($fields[$this->meta()->primary_key()]);\n\n\t\treturn Jam::build($this->meta()->model(), $fields);\n\t}", "title": "" }, { "docid": "30c7c17b6a9fb4513e4665ea513c4acc", "score": "0.54846823", "text": "function save() {\n // ELIS-3722 -- We need to prevent duplicate records when adding new student LO grade records\n if ($this->_dbfield_id !== parent::$_unset || ($this->_dbfield_id == parent::$_unset && !$this->duplicate_check())) {\n parent::save();\n } else {\n //debugging('student_grade::save() - LO grade already saved!', DEBUG_DEVELOPER);\n }\n\n }", "title": "" }, { "docid": "52bdf359a78a183ae61b4bf1742cddc6", "score": "0.54818153", "text": "function chkDuplicate($fileds,$data){\r\n $filedsArr = @explode(',',$fileds);\r\n for($i=0;$i<count($filedsArr);$i++){\r\n $where.= \" AND \".$filedsArr[$i].\" = '\".$data[$filedsArr[$i]].\"'\";\r\n }\r\n $sql = \"SELECT iOrderLineID as ID FROM \".PRJ_DB_PREFIX.\"_purchase_order_line WHERE 1 $where\";\r\n\t\t$row = $this->_obj->MySqlSelect($sql);\r\n if(count($row) > 0){\r\n $dup = $row[0][ID];\r\n }else{\r\n $dup = 0;\r\n }\r\n return $dup;\r\n }", "title": "" }, { "docid": "47556be388a6001f592accb215a47645", "score": "0.5460188", "text": "function oaipmh_harvester_expose_duplicates()\n{\n $id = item('id');\n $items = get_db()->getTable('Item')->findBy(\n array(\n 'oaipmh_harvester_duplicate_items' => $id,\n )\n );\n if (!count($items)) {\n return;\n }\n\n echo __v()->partial('index/_duplicates.php', array('items' => $items));\n}", "title": "" }, { "docid": "c7b6b1dbcc33bd95965868c6cc293595", "score": "0.5433591", "text": "function check_repeated_row($table, $field_col, $field_value){\t\t//tabla, columna, valor, omitir_repetido .... , $omit_repeat\n\t\t$db=DataBase::getConnect();\n\t\t$select=$db->prepare(\"SELECT \".$field_col.\" FROM \".$table.\" WHERE \".$field_col.\" = :field_value\");\n#\t\t$select->bindValue('table',$table);\n#\t\t$select->bindValue('field',$field);\n\t\t$select->bindValue('field_value',$field_value);\n\t\t$select->execute();\n\t\t$check=$select->fetch();\n\t\t$duplicate = \"\";\n\t\tif($select->rowCount() > 0){\n\t\t\t#return \"Dato duplicado\";\n\t\t\t$duplicate = 1;\n\t\t\t//omit_repeat debe ser NULL cuando hagas un nuevo registro\n\t\t} else {\n\t\t\t#return \"Dato disponible\";\n\t\t\t$duplicate = 0;\n\t\t\t//Dejaremos insertar datos\n\t\t\t//omit_repeat = ingrese el texto que pueda omitir en el caso de que .........................\n\t\t}\n\t\treturn $duplicate;\n\t}", "title": "" }, { "docid": "4a02cc930d46237ecef782e8965bef15", "score": "0.54262483", "text": "public function duplicate(&$pks)\r\n\t{\r\n\t\t// Initialise variables.\r\n\t\t$user = JFactory::getUser();\r\n\t\t$db = $this->getDbo();\r\n\r\n\t\t// Access checks.\r\n\t\tif (!$user->authorise('core.create', 'com_' . $this->component))\r\n\t\t{\r\n\t\t\tthrow new Exception(JText::_('JERROR_CORE_CREATE_NOT_PERMITTED'));\r\n\t\t}\r\n\r\n\t\t$table = $this->getTable();\r\n\r\n\t\tforeach ($pks as $pk)\r\n\t\t{\r\n\t\t\tif ($table->load($pk, true))\r\n\t\t\t{\r\n\t\t\t\t// Reset the id to create a new record.\r\n\t\t\t\t$table->id = 0;\r\n\r\n\t\t\t\t// Alter the title.\r\n\t\t\t\tif (property_exists($table, 'title'))\r\n\t\t\t\t{\r\n\t\t\t\t\t$table->title = $allow_fields['title'] = JString::increment($table->title);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (property_exists($table, 'alias'))\r\n\t\t\t\t{\r\n\t\t\t\t\t$table->alias = $allow_fields['alias'] = JString::increment($table->alias, 'dash');\r\n\t\t\t\t}\r\n\r\n\t\t\t\t// Unpublish duplicate item\r\n\t\t\t\t// $table->published = 0;\r\n\r\n\t\t\t\tif (!$table->check() || !$table->store())\r\n\t\t\t\t{\r\n\t\t\t\t\tthrow new Exception($table->getError());\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tthrow new Exception($table->getError());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Clear modules cache\r\n\t\t$this->cleanCache();\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "c66bd60ac0efb256f382dc67b66c4504", "score": "0.54249877", "text": "function isNewItem() {\n return false;\n }", "title": "" }, { "docid": "52346d5f2d0d68d92e4ef63cb558fcfe", "score": "0.5423781", "text": "function __checkDuplicateTitle() {\r\n\t $duplicate = false;\r\n $field = 'name';\r\n $value = $this->data[$this->name]['name'];\r\n if ($result = $this->find($field . ' = \"' . $value.'\"', $field)){\r\n $duplicate = true;\r\n }\r\n\r\n if ($duplicate == true) {\r\n $this->errorMessage='Duplicate name found. Please change the name of this Simple Evaluation';\r\n return false;\r\n }\r\n else {\r\n return true;\r\n }\r\n\t}", "title": "" }, { "docid": "8867aa1caa369056ad8e759c5d1372fd", "score": "0.5418121", "text": "protected function keyIsNotUnique()\n {\n $this->key = str_slug(\"{$this->request->group} {$this->request->label}\", \"_\");\n\n if ($this->model->where('key', $this->key)->exists()) {\n return back()->withErrors([\n 'Choose different label or group'\n ]);\n }\n\n }", "title": "" }, { "docid": "9c30fb93bea5782894072c1f66628fd9", "score": "0.5413839", "text": "private function duplicate_ansel($ansel_images, $entry_id_of_duplicate, $new_row_id = null)\n\t{\n\t\tforeach($ansel_images->result() as $ansel_object)\n\t\t{\n\t\t\t// Get data as array, set the new entry_id, unset the original id\n\t\t\t$ansel_data = get_object_vars($ansel_object);\n\t\t\t$ansel_data['content_id'] = $entry_id_of_duplicate;\n\n\t\t\tif($new_row_id)\n\t\t\t{\n\t\t\t\t$ansel_data['row_id'] = $new_row_id;\n\t\t\t\t// $ansel_data['col_id'] = ??? * TODO do I need to update/change this?\n\t\t\t}\n\n\t\t\t$original_ansel_id = $ansel_data['id'];\n\t\t\tunset($ansel_data['id']);\n\n\t\t\tee()->db->insert('ansel_images', $ansel_data);\n\t\t\t$new_ansel_id = ee()->db->insert_id();\n\n\t\t\t// Now generate the new ansel image\n\t\t\t$this->generate_new_ansel_image($ansel_data, $original_ansel_id, $new_ansel_id);\n\t\t}\n\t}", "title": "" }, { "docid": "e1fb531b7b622d993aec05db8bc32a12", "score": "0.5408285", "text": "public function upsert() {\n\t\tif(false === $this->row_id):\n\t\t\t$this->grid[] = $this->row;\n\t\telse:\n\t\t\tforeach($this->row as $row_key => $row_val):\n\t\t\t\t$this->grid[$this->row_id][$row_key] = $row_val;\n\t\t\tendforeach;\n\t\tendif;\n\t}", "title": "" }, { "docid": "001e62f2b3e7f4028db4e2b36837f95a", "score": "0.54041886", "text": "function save_requester_data($requester_screen_name, $oauth_token, $oauth_token_secret){\n $query = \"INSERT INTO requesters (screen_name, oauth_token, oauth_token_secret) values ('\" . $requester_screen_name . \"', '\" . $oauth_token . \"', '\" . $oauth_token_secret . \"');\";\n $result = pg_query($GLOBALS['dbconn'], $query);\n if(!$result){\n $error= pg_last_error($GLOBALS['dbconn']);\n if(strstr($error,\"duplicate key value\")){\n //this requester has already checked his blocked contacts\n }\n }\n}", "title": "" }, { "docid": "19da9ed920467af55d398cc608079c9b", "score": "0.5391826", "text": "private function is_content_unique( $entry_id, $content ) {\n\t\tglobal $wpdb;\n\n\t\treturn is_null( $wpdb->get_var(\n\t\t\t$wpdb->prepare(\n\t\t\t\t\"SELECT 1 FROM $wpdb->posts WHERE post_type='blicki-suggestion' AND post_status='pending' AND post_parent=%d AND post_name=%s;\",\n\t\t\t\t$entry_id,\n\t\t\t\tmd5( $content )\n\t\t\t)\n\t\t) );\n\t}", "title": "" }, { "docid": "0352900ae4efa47a7397441c9a9b9bb8", "score": "0.5353417", "text": "public function add($data, $onDuplicateKey=NULL);", "title": "" }, { "docid": "173d2f9724a6d4a1f91323f6a268aa14", "score": "0.53534156", "text": "function setEntry() {\n if(isset($this->entry)) {\n return true;\n } else {\n if(isset($this->id)) {\n $this->entry = new GA_Entry($this->id);\n return true;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "1ece15a8dcf8e035d18e42ec9950de99", "score": "0.5352642", "text": "public function setUnique()\n {\n $this->unique = true;\n }", "title": "" }, { "docid": "c3857a1c6c849d1f74b887d709af28ab", "score": "0.5340748", "text": "function checkDuplicateEntries($table, $column, $value, $db){\n\ttry{\n\t\t$sqlQuery = 'SELECT * FROM ' .$table. ' WHERE ' .$column. '=:column';\n\t\t$stm = $db->prepare($sqlQuery);\n\t\t$stm->execute(array('column' => $value));\n\t\t\n\t\tif($row = $stm->fetch()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t} catch(PDOException $ex){\n\t\t//handle exception\n\t}\n}", "title": "" }, { "docid": "491ee5d9e65cdf15c831832e89939bc7", "score": "0.5339807", "text": "public function duplicate()\n\t{\n\t\t// Check for request forgeries\n\t\tJsession::checkToken() or jexit(Text::_('JINVALID_TOKEN'));\n\n\t\t// Get id(s)\n\t\t$pks = $this->input->post->get('cid', array(), 'array');\n\n\t\ttry\n\t\t{\n\t\t\tif (empty($pks))\n\t\t\t{\n\t\t\t\tthrow new Exception(Text::_('COM_TJUCM_NO_ELEMENT_SELECTED'));\n\t\t\t}\n\n\t\t\tArrayHelper::toInteger($pks);\n\t\t\t$model = $this->getModel();\n\t\t\t$model->duplicate($pks);\n\t\t\t$this->setMessage(Jtext::_('COM_TJUCM_ITEMS_SUCCESS_DUPLICATED'));\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\tFactory::getApplication()->enqueueMessage($e->getMessage(), 'warning');\n\t\t}\n\n\t\t$this->setRedirect('index.php?option=com_tjucm&view=types');\n\t}", "title": "" }, { "docid": "4274a71d11fa5448f15b00eb366c4066", "score": "0.5330532", "text": "public function getOneUnique();", "title": "" }, { "docid": "06b3da7ef750aea183809af6caf1107e", "score": "0.5324535", "text": "function options_duplicate_keys( $parent_id, $meta_key ){\r\n\t\tglobal $wpdb;\r\n\t\t$table_name = $wpdb->prefix . \"ura_fields\";\r\n\t\t$option = 'option';\r\n\t\t$sql = \"SELECT ID FROM $table_name WHERE data_type = %s AND parent_id = %d AND meta_key = %s\";\r\n\t\t$run_query = $wpdb->prepare( $sql, $option, $parent_id, $meta_key );\r\n\t\t$id = $wpdb->get_var( $run_query );\r\n\t\treturn $id;\t\r\n\t}", "title": "" }, { "docid": "c49a1967bb055883c800250d81cb8252", "score": "0.53186077", "text": "protected function _duplicateOnSuccess(Zend_Db_Table_Row_Abstract $row) {\n \t\t$primaryKey = $row->id;\n \t\n \t// tworzenie komunikatu\n \t$message = 'Rekord został zduplikowany';\n\t\t$this->_helper->flashMessenger->addMessage($message);\n\t\t$this->_helper->redirector->goToAndExit('edit',null,null,array('id'=>$primaryKey));\n\t\t\n\t\t$referer = $this->_getParam('referer');\n \tif (null !== $referer) {\n\t\t\t$this->_helper->redirector->goToUrlAndExit($referer);\n\t\t} else {\n\t\t\t$this->_helper->redirector->goToAndExit('edit',null,null,array('id'=>$primaryKey));\n\t\t}\n }", "title": "" }, { "docid": "72ad8c07f940393700625ce0a7b267fe", "score": "0.53145856", "text": "function _unique_pair($field, $other_field = '')\n\t{\n\t\tif ( ! empty($this->{$field}) && ! empty($this->{$other_field}))\n\t\t{\n\t\t\t$query = $this->db->get_where($this->table, array($field => $this->{$field}, $other_field => $this->{$other_field}), 1, 0);\n\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\t$row = $query->row();\n\t\t\t\t\n\t\t\t\t// If unique pair value does not belong to this object\n\t\t\t\tif ($this->id != $row->id)\n\t\t\t\t{\n\t\t\t\t\t// Then it is not a unique pair\n\t\t\t\t\treturn FALSE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// No matches found so is unique\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "fc52af8deb53c442da144b72c342d8f4", "score": "0.5299149", "text": "function tanhit_get_duplicate() {\r\n\t$id = tanhit_get_post_id();\r\n\tif ( null == $id ) {\r\n\t\treturn false;\t\r\n\t}\t\r\n\tglobal $post, $current_user;\r\n\tif ( TANHIT_WEBINAR_PAGE == $post->post_name ) {\r\n\t\t\r\n\t\tif ( ! is_user_logged_in() ) {\r\n\t\t\treturn false; \r\n\t\t}\r\n\r\n\t\t$time = time();\r\n\t\tupdate_user_meta( $current_user->ID, TANHIT_PREVENT_OPEN_KEY, $time );\r\n\t\treturn $time;\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "f7729d0997573ece38b4ed634c57b57f", "score": "0.52972865", "text": "function is_dup_edit($table,$field,$value,$tableid,$id,$disp=false)\n\t{\n\t\t$q = \"select \".$field.\" from \".$table.\" where \".$field.\" = '\".$value.\"' and \".$tableid.\"!= '\".$id.\"'\"; \n\t\tif ($disp)\n\t\t\tdie($q);\n\t\t$r = mysql_query($q);\n\t\tif(!$r)\n\t\t\techo mysql_error();\n\t\tif(mysql_num_rows($r) > 0)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "e81de50e818f475988632cdd44296178", "score": "0.52940845", "text": "private function isNew()\n\t{\n\t\treturn $this->id < 1;\n\t}", "title": "" }, { "docid": "019b90cfe6754d779927a24d7be00622", "score": "0.5290768", "text": "abstract function addData($data, $onduplicateupdate = true);", "title": "" }, { "docid": "1ecf01650cc5b2df6a8a6ec038d6e532", "score": "0.52867657", "text": "function unique_position($value) {\n if(position_exists($value['id'], $value['state_id'], $value['position']) === true) {\n return false;\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "e67167010446aefd1ff028ac9fd88a64", "score": "0.5272968", "text": "public function setUniqueRow($uniqueRow){ }", "title": "" }, { "docid": "b416ba921f77e9c657a66d7c55637c7d", "score": "0.5265527", "text": "protected function onDuplicateKey()\n {\n return '`tariff` = '.$this->quote($this->fields['tariff']).'\n , `comment` = '.$this->quote($this->fields['comment']).'';\n }", "title": "" }, { "docid": "f2d5ff691ee53659fc62214899c34df0", "score": "0.52616507", "text": "public function setDuplicateKeys($fields);", "title": "" }, { "docid": "4b3d0a82635267f85beb232b1335c188", "score": "0.52554196", "text": "function tag_ensure_unique( $p_name ) {\n\tif( !tag_is_unique( $p_name ) ) {\n\t\ttrigger_error( ERROR_TAG_DUPLICATE, ERROR );\n\t}\n}", "title": "" }, { "docid": "e25ecc64ce11ded273ec8f9939ee205d", "score": "0.52530783", "text": "function setUnique()\r\n {\r\n $this->_params['attribs'] = array('unique' => '1'); \r\n }", "title": "" }, { "docid": "cadafecd2e0ca49ff87c55f8ccf686fa", "score": "0.5251807", "text": "function dbDuplicate($_db, $_url) {\n\techo \"<strong>in dbDuplicate<br></strong>\";\n\t$_sql = <<<SQL\n\tSELECT * FROM recommendations\n\tWHERE url='$_url';\nSQL;\necho \"<strong>2<br></strong>\";\n\t$_result = $_db->query($_sql);\n\t$count = 0;\n\tforeach ($_result as $item_s) {\n\t\t$count = $count + 1;\n\t}\n\tif ($count == 0)\n\t\treturn false; \n\treturn true;\n}", "title": "" }, { "docid": "990ea2456d1f2fceab0bebba0d27699d", "score": "0.52426326", "text": "public function isUnique()\n {\n return is_array($this->unique) && isset($this->unique['key']);\n }", "title": "" }, { "docid": "ed86d2f0159a383ac520e0cc7f8507d7", "score": "0.5239422", "text": "function duplicate_check($record=null) {\n if(empty($record)) {\n $record = $this;\n }\n\n $params = array(\n 'classid' => $record->classid,\n 'userid' => $record->userid,\n 'completionid' => $record->completionid\n );\n\n if ($this->_db->record_exists(student_grade::TABLE, $params)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c9168f094ba5a579d1cee7a126a4f2bb", "score": "0.52170867", "text": "function check_for_duplicate_entry($conn,$tabel,$column,$datas){\n$query=\"SELECT * FROM \".$tabel.\" WHERE \".$column.\"=:data; \";\n\n$data=filter_var($datas,FILTER_SANITIZE_EMAIL);\n\n$get=$conn->prepare($query);\n\n\n$get->bindParam(\":data\",$data);\n\n$get->execute();\n\n$row=$get->rowCount();\nif($row==0){return false;}\nelse{return true ;}\n\n}", "title": "" }, { "docid": "e9f3531b1aef09b0cd6f3c91e7fba85c", "score": "0.5212721", "text": "public function upsert() {\n\t\t$sql = \"INSERT INTO \".static::TABLE.\"(\".$this->keys().\") VALUES (\".$this->values().\")\n\t\t\t\tON DUPLICATE KEY UPDATE $this\";\n\t\tself::$pdo->exec($sql);\n\t}", "title": "" }, { "docid": "c4ac29632ce75236334a8bc48fb6a028", "score": "0.5212643", "text": "function checkEditDuplicate( $publicationId , $publicationName )\n\t{\n\t\ttry{\n\t\t\t$objPublication = new Network_Db_Publication();\n\t\t\t$objPublication->set( \"publicationName||$publicationName\" );\n\t\t\tif( $objPublication->getTotalCount() > 0 ){\n\t\t\t\tif( $publicationId == $objPublication->get( \"publicationId\" ) ){\n\t\t\t\t\treturn true;\n\t\t\t\t}else{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} catch( Exception $ex ){\n\t\t\tthrow $ex;\n\t\t}\n\t}", "title": "" }, { "docid": "17ebc262f5fe96bbd8573894db6e0b9a", "score": "0.521154", "text": "public function add($array){\n $this->ADDED = array_filter(array_unique($array));\n }", "title": "" }, { "docid": "9122a7849c42e2085ee4bb2a2f3af1bb", "score": "0.52099764", "text": "public function isUnique(): bool;", "title": "" }, { "docid": "39560cf55763da27bdfccee55ec36c62", "score": "0.52076614", "text": "public function can_duplicate_feed( $id ) {\n\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "0afb361b0e1f8e5ba500ec8e60044e7e", "score": "0.5198472", "text": "public static function validateDuplicateValue($array){\n \n if( (count($array) )!= (count(array_unique($array) )) ){\n Log::error(\"tamaño: \".(count($array)) .\" otro dato: \".(count(array_unique($array) )));\n return true;\n }\n\n return false;\n\n }", "title": "" }, { "docid": "8908cdc3255eb6dd06e2b8a50fd55fe5", "score": "0.5185585", "text": "public function duplicate($postData) {\n\t\treturn parent::_duplicate($postData);\n\t}", "title": "" }, { "docid": "72df3d385aa7210265f69df592409079", "score": "0.51822543", "text": "private function checkDuplicates(array $names) {\n\t\t$db_valuemaps = DB::select('valuemaps', [\n\t\t\t'output' => ['name'],\n\t\t\t'filter' => ['name' => $names],\n\t\t\t'limit' => 1\n\t\t]);\n\n\t\tif ($db_valuemaps) {\n\t\t\tself::exception(ZBX_API_ERROR_PARAMETERS,\n\t\t\t\t_s('Value map \"%1$s\" already exists.', $db_valuemaps[0]['name'])\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "23348ef78028a60e7ffdf651292c738b", "score": "0.5174243", "text": "public function testDuplicate()\n {\n $tabGroupModel = new TabGroupModel();\n $tabId = $tabGroupModel->byId(1)->find()->get('tabId');\n $tabModel = new TabModel();\n $tabModel->byId($tabId);\n $tabModel = $tabModel->find();\n $textId = $tabModel->get('textId');\n\n $this->duplicate(\n [\n 'tabGroupId' => 1,\n 'textInstanceModel' => [\n 'textId' => $textId,\n 'text' => 'text...'\n ],\n 'tabTemplateId' => 1,\n ],\n [\n 'tabGroupId' => 1,\n 'textInstanceModel' => [\n 'textId' => $textId,\n 'text' => 'text...'\n ],\n 'tabTemplateId' => 1,\n ]\n );\n }", "title": "" }, { "docid": "cf84eeee52eb0ba00fdd08e597cf205b", "score": "0.51650214", "text": "function addOnly10Entryies(Entry $e){\n if(count($this->HighScoreTable2) < 10)\n {\n //add it simply\n $this->HighScoreTable2[] = $e;\n }\n else {\n //checkif Entry is greater than last Entry already in sorted List\n $this->getSortedHighScore();\n $lastEntry = $this->HighScoreTable2[9];\n if($lastEntry->getScore() < $e->getScore())\n {\n $this->HighScoreTable2[9] = $e;\n }\n }\n $this->writeJSON();\n }", "title": "" }, { "docid": "f9235ff78e1811d11d9e635d06207c58", "score": "0.51590514", "text": "function duplicatePlayerExists(){\r\n\t\tglobal $sql;\r\n\t\t$name = sql::Escape($this->name);\r\n\t\t$server = sql::Escape($this->server);\r\n\t\t$usertable = dkpUser::tablename;\r\n\t\t$playerid = $sql->QueryItem(\"SELECT id\r\n\t\t\t\t\t\t\t\t\t FROM $usertable\r\n\t\t\t\t\t\t\t\t\t WHERE name='$name'\r\n\t\t\t\t\t\t\t\t\t AND server='$server'\r\n\t\t\t\t\t\t\t\t\t AND id != '$this->id'\r\n\t\t\t\t\t\t\t\t\t LIMIT 1\");\r\n\t\t//player doesn't exist\r\n\t\tif($playerid == \"\")\r\n\t\t\treturn false;\r\n\t\t//player exists\r\n\t\treturn $playerid;\r\n\t}", "title": "" }, { "docid": "8982771b21aa04eb16334c2d4aef93b0", "score": "0.5158503", "text": "public function CheckDuplicate() {\n\t\t\n\t\t$pass = true;\n\t\tforeach ( $this->projects as $project => $data ) {\n\t\t\t\n\t\t\tif ( $data['name'] == $this->name || $data['path'] == $this->path ) {\n\t\t\t\t\n\t\t\t\t$pass = false;\n\t\t\t}\n\t\t}\n\t\treturn $pass;\n\t}", "title": "" }, { "docid": "c94556f41323996e0eed2905a6343e66", "score": "0.5156986", "text": "function duplicateQuestion($question_id)\n\t{\n\t\t$question =& $this->createQuestion(\"\", $question_id);\n\t\t$newtitle = $question->object->getTitle(); \n\t\tif ($question->object->questionTitleExists($this->getId(), $question->object->getTitle()))\n\t\t{\n\t\t\t$counter = 2;\n\t\t\twhile ($question->object->questionTitleExists($this->getId(), $question->object->getTitle() . \" ($counter)\"))\n\t\t\t{\n\t\t\t\t$counter++;\n\t\t\t}\n\t\t\t$newtitle = $question->object->getTitle() . \" ($counter)\";\n\t\t}\n\t\t$new_id = $question->object->duplicate(false, $newtitle);\n\t\t// update question count of question pool\n\t\tilObjQuestionPool::_updateQuestionCount($this->getId());\n return $new_id;\n\t}", "title": "" }, { "docid": "ebbfb33c670e2fd9cfc1135ec3424919", "score": "0.5152375", "text": "function checkForDuplicates($db, $pers_firstname,$pers_lastname,$pers_middlein){\n if($_POST['selectedID'] != \"\"){\n return $pIDResult = $_POST['selectedID'];\n }else{\n $pIDResult = $db->query(\"SELECT PeopleInsert(\n fName := $1::TEXT,\n lName := $2::TEXT,\n mInit := $3::VARCHAR\n );\", [$pers_firstname, $pers_lastname, $pers_middlein]);\n return $pIDResult = pg_fetch_result($pIDResult, 0);\n } \n}", "title": "" }, { "docid": "f507aac04a3a059330bcf14f0c92a85c", "score": "0.51517344", "text": "function duplicate_check($record=null) {\n\n if(empty($record)) {\n $record = $this;\n }\n\n /// Check for an existing enrolment - it can't already exist.\n if ($this->_db->record_exists(student::TABLE, array('classid' => $record->classid, 'userid' => $record->userid))) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "d50471e0b64347236843f1710928990a", "score": "0.51476943", "text": "function _check_product_entry_pair(){\n \t\t$this->EE->load->database();\n \t\t$sql = \"SELECT \n \t\t\t\t\tp.product_id, \n \t\t\t\t\tp.title, \n \t\t\t\t\tp.enabled \n \t\t\t\tFROM \n \t\t\t\t\t\".$this->EE->db->dbprefix.\"br_product p \n \t\t\t\tWHERE \n \t\t\t\t\tp.site_id = \".$this->vars[\"site_id\"].\" \n \t\t\t\tAND \n \t\t\t\t\tp.product_id \n \t\t\t\t\t\tNOT IN \n \t\t\t\t\t\t\t(SELECT product_id FROM \".$this->EE->db->dbprefix.\"br_product_entry)\";\n \t\t$qry = $this->EE->db->query($sql);\n \t\tif($qry->num_rows() >= 0){\n \t\t\t\n \t\t\tforeach($qry->result_array() as $rst){\n \t\t\t\t$data = array(\n \t\t\t\t 'title' => $rst[\"title\"],\n \t\t\t\t 'status'\t\t=> ($rst[\"enabled\"] == 1) ? 'open' : 'closed', \n \t\t\t\t 'entry_date' => time() \n \t\t\t\t);\n \t\t\t\t$this->EE->api_channel_entries->submit_new_entry($this->br_channel_id,$data);\t\n \t\t\t\t$qry = $this->EE->db->query(\"SELECT entry_id FROM exp_channel_titles ORDER BY entry_id DESC LIMIT 1\");\n \t\t\t\t$result = $qry->result_array();\n \n \t\t\t\t$this->EE->db->query(\"\tINSERT INTO \n \t\t\t\t\t\t\t\t\t\t\texp_br_product_entry \n \t\t\t\t\t\t\t\t\t\t(product_id, entry_id) \n \t\t\t\t\t\t\t\t\t\t\tVALUES \n \t\t\t\t\t\t\t\t\t\t(\".$rst[\"product_id\"].\",\".$result[0][\"entry_id\"].\")\");\n \t\t\t\t\n \t\t\t\t// Remove cache file\n \t\t\t\t\tremove_from_cache('product_'.$rst[\"product_id\"]);\n \t\t\t}\n \t\t}\n \t}", "title": "" }, { "docid": "9f30a2be468990df8fecaa2d124c504f", "score": "0.5144851", "text": "public function unique($item,$field)\n {\n return !$this->presenter->getVar('model')->unique($field,$item->value);\n }", "title": "" }, { "docid": "626f6d9cdcf049b103920c41f2d5630c", "score": "0.51389796", "text": "protected function _isObjectDuplicate($hash) {\n return isset($this->_objectList[$hash]);\n }", "title": "" }, { "docid": "438f8b6f8e2a4fed13e3f20d2a7deb29", "score": "0.513123", "text": "private function handleDuplicateID(string $id) {\n $p = $this->model->find([\"NationalID\" => $id]);\n if (count($p) > 0) { // if dup found redirect to page to handle accordingly\n $this->view->registerTemplate(TEMPLATE_DIR . \"/add_dup_template.php\");\n // If active Ask user if they want to view the patient\n // Else Ask the patient if they want to admit this patient\n $this->view->importVar(\"active\", isset($p[\"Active\"]) && $p[\"Active\"] ? true : false);\n $this->view->importVar(\"id\", $id);\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "6b6dba85a827eecd295fa547164d5bd1", "score": "0.5130138", "text": "function unique_code($value) {\n if(code_exists($value['id'], $value['code']) === true) {\n return false;\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "38e9a58250746d14c7cd709b9d5ceef7", "score": "0.51253337", "text": "function setEntry() {\n if(isset($this->entry)) {\n return true;\n } else {\n if(isset($this->id)) {\n $this->entry = new Entry($this->id);\n return true;\n } else {\n return false;\n }\n }\n }", "title": "" }, { "docid": "ac9b94a7af14c465117f5bcdd3093f4a", "score": "0.51145077", "text": "public function isDuplicable()\n {\n return $this->getDuplicable();\n }", "title": "" }, { "docid": "dbb61b6d5a5bf016d57891fe5e1d031e", "score": "0.50951904", "text": "protected function _duplicateOnException(Zend_Exception $e) {\n \t// logowanie wyjatku\n\t\t$logger = Zend_Registry::get('logger');\n\t\t$logger->log($e->getMessage() . \"\\n\" . $e->getTraceAsString(), Zend_Log::ERR);\n\t\t\n\t\t$message = 'Rekord nie został zduplikowany';\n\t\t$this->_helper->flashMessenger->addMessage($message);\n\t\t$this->_helper->redirector->goToUrlAndExit(getenv('HTTP_REFERER'));\n }", "title": "" }, { "docid": "a1079470356f7ca20ae334d734f12c8f", "score": "0.5092901", "text": "public function markEntriesToAdd() {\n // we'd maybe better go with subquery\n DB::table(WORK_TABLE_NAME .' as u1')\n ->leftJoin('customers' .' as u2', 'u1.identifier', '=', 'u2.id')\n ->where([\n ['u1.status_id', '=', ENTRY_STATUS_UNKNOWN],\n ])\n ->whereRaw('u2.id IS NULL')\n ->update(['u1.status_id' => ENTRY_STATUS_TO_ADD]);\n }", "title": "" }, { "docid": "03b206b44ef40acda19ba41c843cfd05", "score": "0.5085383", "text": "private function remove_all_duplications(){\n $remove_dublications_query = $this->conn->prepare(\"DELETE FROM recover_password WHERE email = :email\");\n if($remove_dublications_query->execute(array(':email'=>$this->email))){\n echo \"<i style='color: blue;font-size: x-large'> Email with new password sent</i>\";\n }else{\n echo \"<i style='color: red;font-size: x-large'> Failed to remove duplicate entries from database </i>\";\n return false;\n }\n }", "title": "" }, { "docid": "44f9cf99aa02b4fdb49d56b240795b3a", "score": "0.50839716", "text": "function duplicados($arreglo, $llave)\n {\n $key_array = array();\n $i = 0;\n // echo (gettype($arreglo));\n\n if ($arreglo)\n {\n //echo sizeof($arreglo);\n \n //iniciamos el for para todo el array, los valores unicos se guardan en array temporal\n for($k=0;$k<sizeof($arreglo);$k++)\n {\n \n if (!in_array($arreglo[$k]->$llave, $key_array))\n {\n $key_array[$i] = $arreglo[$k]->$llave;\n // echo ($key_array);\n $array_temporal[$i] = $arreglo[$k]; \n $i++;\n }\n // echo $arreglo[$k]->$llave.'<br>';\n \n } \n \n //var_dump($array_temporal);\n return $array_temporal;\n }; \n }", "title": "" }, { "docid": "e63598c46cd575131903ec8f653649cf", "score": "0.5082448", "text": "function checkForDuplicateHotelLocation($name,$super_location_id,$id=false)\r\n {\r\n try\r\n {\r\n $sql=\"SELECT location_id \r\n\t\t\t FROM \r\n\t\t\t trl_hotel_locations \r\n\t\t\t WHERE location_name='$name' \";\r\n \r\n if($id==false)$sql=$sql.\"\";\r\n else $sql=$sql.\" AND location_id!=$id\";\r\n $result=dbQuery($sql);\r\n \r\n if(dbNumRows($result)>0)\r\n {\r\n $resultArray=dbResultToArray($result);\r\n return $resultArray[0][0];\r\n //duplicate found\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n\r\n }\r\n\r\n catch(Exception $e)\r\n {\r\n }\r\n\r\n }", "title": "" }, { "docid": "2dd352b019b95a308ab588d005cbb789", "score": "0.507939", "text": "public function testValidateRowForUpdateDuplicateRows()\n {\n $behavior = \\Magento\\ImportExport\\Model\\Import::BEHAVIOR_ADD_UPDATE;\n\n $this->_model->setParameters(['behavior' => $behavior]);\n\n $secondRow = $firstRow = [\n '_website' => 'website1',\n '_email' => '[email protected]',\n '_finance_website' => 'website2',\n 'store_credit' => 10.5,\n 'reward_points' => 5,\n ];\n $secondRow['store_credit'] = 20;\n $secondRow['reward_points'] = 30;\n\n $this->assertTrue($this->_model->validateRow($firstRow, 0));\n $this->assertFalse($this->_model->validateRow($secondRow, 1));\n }", "title": "" }, { "docid": "27286993678e8f9167031516f034ad2a", "score": "0.5066853", "text": "function clearDuplicatePosts(){\r\n\tglobal $wpdb;\r\n\t$prefix = $wpdb->prefix;\r\n\t\r\n\t$wpdb->query(\"DELETE bad_rows . * FROM \".$prefix.\"posts AS bad_rows INNER JOIN (\r\n\t\tSELECT \".$prefix.\"posts.post_title, MIN( \".$prefix.\"posts.ID ) AS min_id\r\n\t\tFROM \".$prefix.\"posts\r\n\t\tGROUP BY post_title\r\n\t\tHAVING COUNT( * ) >1\r\n\t\t) AS good_rows ON ( good_rows.post_title = bad_rows.post_title\r\n\t\tAND good_rows.min_id <> bad_rows.ID )\");\r\n}", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "1ace4ef678e504ac1f45ff1f5110d4fd", "score": "0.0", "text": "public function show(Request $request)\n {\n \n }", "title": "" } ]
[ { "docid": "cc12628aa1525caac0bf08e767bd6cb4", "score": "0.7593588", "text": "public function view(ResourceInterface $resource);", "title": "" }, { "docid": "d57b314bf807713f346bc35fb937529e", "score": "0.6845395", "text": "public function render() {\n $this->_template->display($this->resource_name);\n }", "title": "" }, { "docid": "87649d98f1656cc542e5e570f7f9fd1f", "score": "0.66155934", "text": "public function display($resource_name, $cache_id = null, $compile_id = null) {\n\t\t\t$this->setHeaderData();\n\t\t\tparent::display($resource_name, $cache_id, $compile_id);\n\t\t}", "title": "" }, { "docid": "9579e337a5325a82370abb431f646b6f", "score": "0.6490586", "text": "public function show($id)\n\t{\n\t\t//\n\t\t$resource = \\App\\Resource::find($id);\n\t\treturn view('deleteResource', array( 'resource' => $resource) );\n\t}", "title": "" }, { "docid": "989918b39caf8ede67ab11ef4dc4a651", "score": "0.6347163", "text": "public function editresourceAction() {\n\t\t$resourceid = $this->_request->getParam('resourceid');\n\t\t$srlink = new StudentResourceLink();\n\t\t$select = $srlink->select()->where($srlink->getAdapter()->quoteInto('auto_id = ?', $resourceid));\n\t\t$rows = $srlink->fetchAll($select);\n\t\t$therow = null;\n\t\tforeach ($rows as $row) {\n\t\t\t$therow=$row;\n\t\t}\n\t\t//print_r($therow);\n\t\t$this->view->resourcelink = $therow;\n\t\t\n\t\t$mediabankUtility = new MediabankUtility();\n\t\tob_start();\n\t\t$mediabankUtility->curlDownloadResource($therow['mid'],false);\n\t\t$content = ob_get_contents();\n\t\tob_end_clean();\n\t\t$this->view->content = $content;\t\t\n\t\t$this->view->redirect_to = $_SERVER[\"HTTP_REFERER\"];\n\t\tStudentResourceService::prepStudentResourceView($this, $this->_request, $therow->loid);\n\t\tif($therow['category']=='Summary') //summary has been stripped out since a summary exists; add it back in if this one is a summary\n\t\t\t$this->view->studentResourceCategories[6]='Summary';\n\t}", "title": "" }, { "docid": "d6d98993d2a40a3cba09832ef9953f69", "score": "0.6218096", "text": "public function lookup($resource);", "title": "" }, { "docid": "6244aaaaf59fb15467858bc417084ebc", "score": "0.62113243", "text": "protected function makeDisplayFromResource()\n\t{\n\t\tif($this->activeResource instanceof SimpleXMLElement)\n\t\t{\n\t\t\treturn $this->activeResource->asXml();\n\t\t}else{\n\t\t\treturn $this->activeResource;\n\t\t}\n\t}", "title": "" }, { "docid": "3ee4a64030fd6d594c526bf49945971f", "score": "0.6198377", "text": "public function show($id)\n {\n $res = Resource::find($id);\n return view('resource.show')->withResource($res);\n }", "title": "" }, { "docid": "48b723515995fb4178256251ea323c04", "score": "0.61823267", "text": "public function show($id) {\n $resource = static::$resource::findOrFail($id);\n return view($this->getView('show'), [static::$varName[0] ?? $this->getResourceName() => $resource]);\n }", "title": "" }, { "docid": "cbf3bf22b6453f9015dd8d3552392655", "score": "0.6155698", "text": "protected function showResourceView($id)\n\t{\n\n\t\t$element = $this->getElements($id);\n\t\treturn Response::view('adm/IAS/element', array('data' => $element));\n\n\t}", "title": "" }, { "docid": "b6106194998deb4acb00d89d1984bf4b", "score": "0.6154439", "text": "public function displayAction()\n {\n $params = $this->router->getParams();\n if (isset($params[0]) && $firewall = Firewalls::findFirst(intval($params[0]) ? $params[0] : ['name=:name:', 'bind' => ['name' => $params[0]]])) {\n $this->tag->setTitle(__('Firewalls') . ' / ' . __('Display'));\n $this->view->setVars([\n 'firewall' => $firewall,\n 'content' => Las::display($firewall->name)\n ]);\n\n // Highlight <pre> tag\n $this->assets->addCss('css/highlightjs/arta.css');\n $this->assets->addJs('js/plugins/highlight.pack.js');\n $this->scripts = ['$(document).ready(function() { $(\"pre\").each(function(i, e) {hljs.highlightBlock(e)}); });'];\n }\n }", "title": "" }, { "docid": "c232a532d32e3f8e5c41e20db4331be5", "score": "0.6063656", "text": "function display($aTemplate = null) {\r\n\t\t$this->fetch ( $aTemplate, true );\r\n\t}", "title": "" }, { "docid": "88951f8df99fd6c0e333e72b145dfb04", "score": "0.60633683", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n ); \n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Square_Model_Item i')\n ->leftJoin('i.Square_Model_Country c')\n ->leftJoin('i.Square_Model_Grade g')\n ->leftJoin('i.Square_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0]; \n } else {\n throw new Zend_Controller_Action_Exception('Page not found', 404); \n }\n } else {\n throw new Zend_Controller_Action_Exception('Invalid input'); \n }\n }", "title": "" }, { "docid": "3fb44335bf5e5dca76ae4c41be3fee5d", "score": "0.59952855", "text": "public function action_show()\n\t{\n\t\t$id = Coder::instance()->short_url($this->request->param('id'), TRUE);\n\n\t\tif (is_numeric($id) === FALSE)\n\t\t{\n\t\t\tHTTP::redirect(Route::get('default')->uri());\n\t\t}\n\t\t\n\t\t$user = ORM::factory('User', $id);\n\t\t$manager = Manager::factory('User', $user);\n\t\t\n\t\t$manager->show();\n\n\t\t$this->view_container = $manager->get_views_result('container');\n\t\t$this->view_content = $manager->get_views_result('content');\n\t}", "title": "" }, { "docid": "9a28e42aa633511a42cb70db3b7fcc26", "score": "0.5985783", "text": "public function show($id)\n\t{\n\t\ttry {\n\t\t if ( \\Auth::check() && \\Auth::user()->hasPaid() )\n {\n $resource = \\Resource::find($id);\n $path_to_image = app('path.protected_images') .'/'.$resource->image;\n //Read image path, convert to base64 encoding\n $imgData = base64_encode(file_get_contents($path_to_image));\n //Format the image SRC: data:{mime};base64,{data};\n $src = 'data: '.mime_content_type($path_to_image).';base64,'.$imgData;\n\n return \\View::make('resources.view')->with([\n 'resource' => $resource,\n 'img' => $src\n ]);\n\n } else {\n\n \\App::abort(404);\n }\n\n } catch (\\Exception $e) {\n\n \\Log::warning( $e->getMessage() );\n }\n\t}", "title": "" }, { "docid": "66bedfeb611b91813c98a7e106a95902", "score": "0.5965739", "text": "private function displayImageResource($image) {\n if($image) {\n if($image->getExtension() == 'jpg' || $image->getExtension() == 'jpeg') {\n header('Content-Type: image/jpeg');\n imagejpeg($image->getResource(), null, 100);\n }\n else if($image->getExtension() == 'png') {\n header('Content-Type: image/png');\n imagepng($image->getResource(), null, 9);\n }\n else if($image->getExtension() == 'gif') {\n header('Content-Type: image/gif');\n imagegif($image->getResource(), null, 100);\n }\n }\n }", "title": "" }, { "docid": "41ab5aeaf4ec45d330f185763e2d3cee", "score": "0.59621084", "text": "public function show()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "df778faf9f0b4d88cab1a7ccf83e7502", "score": "0.5908281", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n $url = $em->getRepository('KtIoWebInterfaceBundle:Url')->find($id);\n\n if (!$url)\n throw $this->createNotFoundException();\n\n // TODO check we own this url\n return $this->render(\n 'KtIoWebInterfaceBundle:Url:show.html.twig',\n array('url' => $url)\n );\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.5903327", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "ecdc5dd9611d1734404c92d923029a39", "score": "0.58814424", "text": "public function show($id)\n {\n echo self::routeNamed();\n }", "title": "" }, { "docid": "461e196dfe64422deb4a744c50eb5d8d", "score": "0.5878836", "text": "public function show($id) {\n //view/edit page referred to as one entity in spec\n }", "title": "" }, { "docid": "f004693e692e26b7ab9f8de37189afc1", "score": "0.5870806", "text": "private function displayResources()\n\t\t{\n\t\t\t$html = '';\n\t\t\t$html .= '<div class=\"resources\" >'.\"\\n\";\n\t\t\t$html .= '\t<h4>Resources ~ '.$this->challenge['challengeResourceHeading'].'</h4>'.\"\\n\";\n\t\t\tforeach($this->resources as $resource)\n\t\t\t{\n\t\t\t\t$html .= '\t<p class=\"resource-link\"><a href=\"http://'.$resource['resourceLink'].'\">'.$resource['resourceTitle'].'</a></p>'.\"\\n\";\n\t\t\t}\n\t\t\n\t\t\treturn $html;\n\t\t}", "title": "" }, { "docid": "4294ddbd744676190ac0b1e7d92632e0", "score": "0.5862386", "text": "public function show() {\r\n echo $this->init()->getView();\r\n }", "title": "" }, { "docid": "d138cb59b6d8df8768f135975e4445ad", "score": "0.584066", "text": "public function show()\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ad2fe33fedb796826d1b96c32859495c", "score": "0.5838728", "text": "public function resourceDesktop()\n {\n $resourceTypes = $this->em->getRepository('ClarolineCoreBundle:Resource\\ResourceType')->findAll();\n\n return $this->templating->render(\n 'ClarolineCoreBundle:Tool\\desktop\\resource_manager:resources.html.twig',\n array('resourceTypes' => $resourceTypes, 'maxPostSize' => ini_get('post_max_size'))\n );\n }", "title": "" }, { "docid": "2f33e89741ba0a19b898dc9a1f9026fc", "score": "0.58116716", "text": "public function showResource($value, bool $justOne = false);", "title": "" }, { "docid": "6e1ccfc29048f24d0efc88d6b8257171", "score": "0.58106446", "text": "public function show($name)\n\t{\n\t\t//\n\n\t}", "title": "" }, { "docid": "ef3fb32b359d85e91687f25572082d98", "score": "0.57937366", "text": "public function display()\r\n {\r\n\r\n echo $this->get_display();\r\n\r\n }", "title": "" }, { "docid": "f7584132221ad89383b2964e2bd53fe5", "score": "0.57909745", "text": "public function show(Request $request, $id)\n {\n \n if($request->session()->exists('resources') && isset($request->session()->get('resources')[$id])){\n $resource = $request->session()->get('resources')[$id];\n \n $data = [];\n $data['resource']= $resource;\n return view('resource.show', $data);\n }\n return redirect('resource');\n }", "title": "" }, { "docid": "7dd625db5c11766539ede97b10e391c8", "score": "0.5788525", "text": "public function viewAction($resourceId)\n {\n try {\n // Call to the resource service to get the resource\n $resourceResource = $this->get(\n 'asker.exercise.exercise_resource'\n )->getContentFullResource($resourceId, $this->getUserId());\n\n return new ApiGotResponse($resourceResource, array(\"details\", 'Default'));\n\n } catch (NonExistingObjectException $neoe) {\n throw new ApiNotFoundException(ResourceResource::RESOURCE_NAME);\n }\n }", "title": "" }, { "docid": "e871bf67c885c4b595a1f5cc980d032e", "score": "0.5786727", "text": "public function show()\n {\n \n \n }", "title": "" }, { "docid": "ea3e059853b58df5488fa70a7fd54c3b", "score": "0.57814896", "text": "protected function addResourceShow($name, $base, $controller)\n {\n $uri = $this->getResourceUri($name) . '/{' . $base . '}';\n return $this->get($uri, $this->getResourceAction($name, $controller, 'show'));\n }", "title": "" }, { "docid": "59b26eccbeb80415b27d312ada1ffed8", "score": "0.57814395", "text": "public function show($id)\n {\n $this->title .= ' show';\n $this->one($id);\n }", "title": "" }, { "docid": "39114f16312ac4920577af8887aaf740", "score": "0.57736045", "text": "public function display()\r\n {\r\n echo $this->fetch();\r\n }", "title": "" }, { "docid": "b5cf19a61f4df8b352f4c5245148ed8c", "score": "0.5773524", "text": "public function show()\n\t{\n\t\t// Set user states\n\t\t$this->setUserStates();\n\n\t\t// Set pagination\n\t\t$this->setPagination();\n\n\t\t// Set rows\n\t\t$this->setRows();\n\n\t\t// Set filters\n\t\t$this->setFilters();\n\n\t\t// Set toolbar\n\t\t$this->setToolbar();\n\n\t\t// Set menu\n\t\t$this->setMenu();\n\n\t\t// Set Actions\n\t\t$this->setListActions();\n\n\t\t// Render\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "fcc9864a64202f3261f4537601857f07", "score": "0.57706666", "text": "public function show($nombre, $resourceType, $resourceName)\n {\n //gets the resource\n switch ($resourceType) {\n case (\"manga\"):\n $resource = Manga::where(\"name\", $resourceName)->first();\n break;\n case (\"novel\");\n $resource = Novel::where(\"name\", $resourceName)->first();\n break;\n default:\n abort(404);\n break;\n }\n //gets the comments for the resource\n $commentsFound = $resource->comments()->get();\n $commented = !is_null(Auth::user()->comments()->where(\"commentable_id\", $resource->id)->first());\n //creates a register of the interaction\n $resource->users()->attach(Auth::user());\n return view(\"user.show\", compact(\"resource\", \"commentsFound\", \"commented\", \"resourceType\"));\n }", "title": "" }, { "docid": "4be578329f20a5696732db0fd60d5d80", "score": "0.57681847", "text": "public function executeShow()\n {\n $this->headline = HeadlinePeer::getHeadlineFromStripTitle($this->getRequestParameter('headlinestriptitle'));\n $this->forward404Unless($this->headline);\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57557684", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "a3e57330d7cd59896b945f16d0e12a89", "score": "0.57557684", "text": "public function display()\n {\n echo $this->render();\n }", "title": "" }, { "docid": "f18ebc5f8b08ddef340fa4f0d3eeea2f", "score": "0.5750162", "text": "public static function show() {\n\t\treturn static::$instance->display();\n\t}", "title": "" }, { "docid": "e3b51ebfe04703c114ab39fc729ba43b", "score": "0.5748668", "text": "public function show(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "e6492f335ada5179a4fe15779fa54555", "score": "0.5746409", "text": "public function show($id)\n\t{\n\t\t//\t\n\t}", "title": "" }, { "docid": "fd30d754eb9c55abae27d57dff32abdc", "score": "0.5741121", "text": "public function resourcethumbnailAction()\r\n {\r\n $request = $this->getRequest();\r\n $response = $this->getResponse();\r\n\r\n $id = (int) $request->getQuery('id');\r\n $w = (int) $request->getQuery('w');\r\n $h = (int) $request->getQuery('h');\r\n $hash = $request->getQuery('hash');\r\n\r\n $realHash = DatabaseObject_ResourceImage::GetImageHash($id, $w, $h);\r\n\r\n // disable autorendering since we're outputting an image\r\n $this->_helper->viewRenderer->setNoRender();\r\n\r\n $image = new DatabaseObject_ResourceImage($this->db);\r\n if ($hash != $realHash || !$image->load($id)) {\r\n // image not found\r\n $response->setHttpResponseCode(404);\r\n return;\r\n }\r\n\r\n try {\r\n $fullpath = $image->createResourceThumbnail($w, $h);\r\n }\r\n catch (Exception $ex) {\r\n $fullpath = $image->getFullPath();\r\n }\r\n\r\n $info = getImageSize($fullpath);\r\n\r\n $response->setHeader('content-type', $info['mime']);\r\n $response->setHeader('content-length', filesize($fullpath));\r\n echo file_get_contents($fullpath);\r\n }", "title": "" }, { "docid": "a7cd1d7ce30dda2ea0273ce031cff516", "score": "0.5725187", "text": "public function displayReferenceAction()\n {\n \t$reference_id = Extended\\reference_request::displayReference( Auth_UserAdapter::getIdentity ()->getId (), $this->getRequest()->getparam('reference_req_id'), \\Extended\\feedback_requests::VISIBILITY_CRITERIA_DISPLAYED);\n \tif($reference_id)\n \t{\n \t\n \t\t$this->view->reference_visible=$reference_id;\n \t\techo Zend_Json::encode( 1 );\n \t}\n \tdie;\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.57247883", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722566", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "8f565ce0db5c2b58c1bd4bea7cb05683", "score": "0.572048", "text": "public function showAction(Ressource $ressource, SessionConcours $session = null)\n {\n $deleteForm = $this->createDeleteForm($ressource);\n return $this->render('ressource/show.html.twig', array(\n 'ressource' => $ressource,\n 'session' => $session,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "47171b843665ac85f7c5da2618a7ae0e", "score": "0.57188773", "text": "public function show($id) {}", "title": "" }, { "docid": "cfff8a1202fcfae7e44ab0c4fb351586", "score": "0.5708448", "text": "public function showAction()\n {\n $em = $this->getDoctrine()->getManager();\n $id = $_GET['id'];\n $entity = $em->getRepository('BackendBundle:Concepto')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Concepto entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('BackendBundle:Concepto:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5705372", "text": "public abstract function display();", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.5705372", "text": "public abstract function display();", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "12bf7179b06b190879842d1f1945365c", "score": "0.5702628", "text": "public function show( $id ) {\n\t\t//\n\t}", "title": "" }, { "docid": "560ae0fd472bad5f1d21beeed5dfbbdd", "score": "0.57009894", "text": "public function show(){}", "title": "" }, { "docid": "b19fae7378b33f825e4ee1e7d8aef94a", "score": "0.5698812", "text": "public function display($templateName=null)\n {\n echo $this->get($templateName);\n }", "title": "" }, { "docid": "7b283ba1c0546a155efc95a44dd0f9cf", "score": "0.5698205", "text": "public function show(Response $response)\n {\n //\n }", "title": "" }, { "docid": "0465b5fe008a3153a8a032fca67abfed", "score": "0.5693743", "text": "public function show() { }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56853133", "text": "abstract public function show($id);", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56853133", "text": "abstract public function show($id);", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "cb37955e47b2d1c708a039b4bfa190e0", "score": "0.5684881", "text": "public function show($id)\n\t{\n\t\t//\n\t}", "title": "" } ]
73d5e0f5349b5df4aba9043fdf0268f6
Handles the file creation and saving
[ { "docid": "60f13a321fa52bd5e8da9aed87e44da5", "score": "0.0", "text": "function SetupFile($file)\n{\n\t\n\t$fileName = $file['name'];\n\t$fileType = \"\";\n\t$keepGoing = true;\n\t\n\t//loops thorugh the filename to get the file extention. Stops after a \".\" is found\n\tfor ($i = strlen($fileName); $i != 0 && $keepGoing;)\n\t{\n\t\t--$i;\n\t\tif ($fileName[$i] != \".\")\n\t\t{\n\t\t\t$fileType .= $fileName[$i];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$keepGoing = false;\n\t\t}\n\t}\n\t\n\t//If no filename was found\n\tif ($keepGoing)\n\t{\n\t\treturn false;\n\t}\n\t$check = array(\"gnp\", \"gpj\", \"gepj\", \"pmb\");\n\t$type = false;\n\tfor ($i = 0; $i < 4 && !$type; ++$i)\n\t{\n\t\tif ($fileType == $check[$i])\n\t\t{\n\t\t\t$type = strrev($check[$i]);\n\t\t}\n\t}\n\tif (!$type)\n\t{\n\t\treturn false;\n\t}\n\t$tempFile = file_get_contents($file['tmp_name']);\n\t$filePath = \"pic/\" . $fileName;\n\t$writeToo = fopen(__DIR__ . \"/\" . $filePath, \"w\");\n\tfwrite($writeToo, $tempFile);\n\tfclose($writeToo);\n\treturn $filePath;\n}", "title": "" } ]
[ { "docid": "38b6fe1429a8412e26d8cd1e3855e679", "score": "0.6957644", "text": "public function createFileEnd();", "title": "" }, { "docid": "9d5e3f338b4e2ef27f2201f041736651", "score": "0.65858793", "text": "function write()\n\t{\n\t\t$this->isNewFile = $this->obj->getVersion() == 0;\n\t\tif ($this->isNewFile)\n\t\t{\n\t\t\t$this->obj->setVersion(1);\n\t\t}\n\t\tparent::write();\n\t\t/*\n\t\tilHistory::_createEntry($this->getObjectId(), 'update', '', '','', true);\n\t\t*/\n\t}", "title": "" }, { "docid": "6da78ffb04ee775711de07dbf3863533", "score": "0.64413685", "text": "public function save()\n {\n $filePath = $this->checkPath();\n if (file_exists($filePath)) {\n throw new \\Exception($this->namespace . '\\\\' . $this->modelName . ' already exists');\n }\n $model = new \\SplFileObject($filePath, 'w+');\n $model->fwrite($this->template());\n }", "title": "" }, { "docid": "0318e68289144b65ba6a42691b30309e", "score": "0.64292467", "text": "public function save($file)\n {\n\n }", "title": "" }, { "docid": "4498a8c4a2a802900ae61e587991c040", "score": "0.64220715", "text": "public function writeFile()\r {\r\r }", "title": "" }, { "docid": "a6ab7775cf92dfa315419221b5434966", "score": "0.64213574", "text": "abstract public function save($file = null);", "title": "" }, { "docid": "3c76d6bb2f31c0d91b5cd1ff38849653", "score": "0.64020824", "text": "private function MakeFile(){\n $file = '/../' . $this->file;\n if ($this->CheckConnection($_POST) == true){\n $this->WriteUTF8File(realpath(__DIR__) . $file, $this->ReplaceASCIIFwrite($this->FileGenerate($_POST)));\n // defines the permission to 666\n chmod(realpath(__DIR__) . $file, 0666);\n $try = array(); // try 25 times\n for ($i = 0; $i <= 25; $i++) {\n if (file_exists(realpath(__DIR__) . $file) && file_exists(realpath(__DIR__) . $this->sql)) {\n $try[] = true;\n break;\n }\n $try[] = false;\n }\n // makes a final check, if the file was created\n if (in_array(true, $try))\n print $this->HTMLSucessCreatedFileConfig();\n else\n print $this->HTMLErroUnknow();\n }else{\n print $this->HTMLErroConnection();\n }\n }", "title": "" }, { "docid": "ac3c4ceda752ba4bb103c4a1b27e2344", "score": "0.63938254", "text": "public function saveFile($filename);", "title": "" }, { "docid": "8bbf0529fd70b0a6c56351c4cf662870", "score": "0.6369727", "text": "public function create()\n {\n // ps($_FILES);\n $file = $_FILES[\"mytest\"][\"name\"];\n $objectName = time() . \"_\" . $file;\n $this->disk->put($objectName, $_FILES[\"mytest\"]['tmp_name']); //上传文件\n // ps($this->disk->get($objectName));\n $downloadUrl = $this->disk->downloadUrl($objectName);\n ps($downloadUrl);\n }", "title": "" }, { "docid": "bbcbac1d8163050d0ebc080169a9da20", "score": "0.6363391", "text": "public function saveToFile()\n {\n $this->writeFile($this->getContents());\n }", "title": "" }, { "docid": "6a47020bf5abd4d91d63d4c4c6dd4634", "score": "0.6345518", "text": "public function saveFile($fileName);", "title": "" }, { "docid": "d5402195d5e776498cf28d8c8737b048", "score": "0.6340402", "text": "public function createFileStart();", "title": "" }, { "docid": "db559777ac42515ed30756aaf1d17271", "score": "0.6298841", "text": "private function saveFile(): void\n {\n $sourceCode = Helpers::tabsToSpaces((string) $this->entityFile);\n $entityPath = dirname(__DIR__, 7) . '/src/' . $this->entityData['namespace'] . '/';\n\n $handle = fopen($entityPath . $this->entityData['class'] . '.php', 'w');\n fwrite($handle, $sourceCode);\n fclose($handle);\n }", "title": "" }, { "docid": "3fc1e24b0fb96faa533a4827cd917b00", "score": "0.62528783", "text": "public function afterFileSave()\n {\n if ($this->createThumbsOnSave == true)\n $this->createThumbs();\n }", "title": "" }, { "docid": "d1116363bb6069f596974105913a094b", "score": "0.622446", "text": "function putFile() {\n\t\t\n\t}", "title": "" }, { "docid": "7d31e3fa89c7af721b3fce375756322c", "score": "0.62179244", "text": "public function postInsert()\n {\n // fclose($myfile);\n }", "title": "" }, { "docid": "4c5c19b83a1e04c867969935e465f601", "score": "0.62014294", "text": "private function createFiles() {\n file_put_contents(\"../cache/views/\".$this->uniqid.\".php\", file_get_contents(\"../app/Views/\".$this->templateName));\n $this->changeTemplateValuesWithView();\n }", "title": "" }, { "docid": "e85d0afe084e73d0aae1bb4157101c18", "score": "0.61824197", "text": "public function createFiles(){\n //Para cada estructura pasada genera los archivos\n foreach ($this->structs as $struct){\n //Genera y escribe la clase en archivo\n $class=$this->generateClass($struct);\n $this->writeFile('class/'.$struct->getClass().'.php',$class);\n print_r(\"Clase generada: class/\".$struct->getClass().'.php<br/>');\n //Genera y escribe el dao de la clase en archivo\n $dao=$this->generateDao($struct);\n $this->writeFile('dao/Dao'.$struct->getClass().'.php',$dao);\n print_r(\"DAO de Clase generado: dao/Dao\".$struct->getClass().'.php<br/>');\n //Genera y escribe la estructura en archivo\n $stringStruct=$this->genetrateStruct($struct);\n $this->writeFile('struct/struct'.$struct->getClass().'.php',$stringStruct);\n print_r(\"Estructura de Clase generada: struct/struct\".$struct->getClass().'.php<br/>');\n print_r(\"---------------------------------------------------<br/>\");\n }\n }", "title": "" }, { "docid": "16aac8c88b0454fd52e7cce66b087ec0", "score": "0.6181657", "text": "public function save(File $file);", "title": "" }, { "docid": "cf30b2efdb18c3d40fb838ab20db21a7", "score": "0.6171071", "text": "public function saveFile(File $file);", "title": "" }, { "docid": "f27e0ad62956ca4377e6456af2983a19", "score": "0.6129851", "text": "private function doUpload() {\n $name = $this->helper->getGet('name', strval(time()));\n $filename = $this->helper->generatePathFromFilename($name);\n $url = $this->helper->generateURLFromPath($filename);\n\n try {\n $size = $this->helper->saveFile($filename);\n } catch (Exception $e) {\n $this->helper->respondWithError($e->getMessage(), Helper::HTTP_STATUS_SERVER_ERROR);\n }\n\n // If the input was empty, delete the file and return an error\n if ($size == 0) {\n $this->helper->deleteFile($filename);\n $this->helper->respondWithError(\"Input file was empty\",\n Helper::HTTP_STATUS_BAD_REQUEST);\n }\n\n // Make sure the input wasn't too large\n if ($size >= Helper::MAX_UPLOAD_SIZE) {\n // Delete the file because we didn't save the whole thing\n $this->helper->deleteFile($filename);\n $this->helper->respondWithError(\"Input file too large. Must be smaller than \" . Helper::MAX_UPLOAD_SIZE . \" bytes\",\n Helper::HTTP_STATUS_REQUEST_TOO_LARGE);\n }\n\n $this->helper->setStatus(Helper::HTTP_STATUS_CREATED);\n $this->helper->setHeader(Helper::HEADER_CONTENT_TYPE, 'text/plain; charset=utf-8');\n $this->helper->setHeader(Helper::HEADER_CONTENT_LENGTH, strlen($url));\n echo $url;\n }", "title": "" }, { "docid": "b938eb8637a23e11b052881c331a515b", "score": "0.61293864", "text": "public function save()\n {\n // Grab the directory and create it if needed\n $info = pathinfo($this->fname);\n $dir = $info['dirname'];\n\n if (!is_dir($dir)) {\n // dir doesn't exist, make it\n mkdir($dir, 0777, true);\n }\n\n\n return file_put_contents($this->fname, json_encode($this->data));\n }", "title": "" }, { "docid": "a640ddc40adec4a363cb693b3a5d5acc", "score": "0.6125", "text": "protected function doSave($con = null)\n {\n $file = $this->getValue('file');\n if (null !== $file)\n {\n $filename = sha1(date('U') . $file->getOriginalName()) . $file->getExtension($file->getOriginalExtension());\n\n $this->values['file'] = $filename;\n\n if ($this->getObject()->isNew() || !array_key_exists('title', $this->values) || in_array($this->values['title'], array(null, ''), true))\n {\n $title = substr($file->getOriginalName(), 0, strrpos($file->getOriginalName(), '.'));\n $this->values['title'] = $title;\n if (0 !== Doctrine::getTable('Document')->createQuery('d')->where('d.title = ?', $this->values['title'])->count())\n {\n $document = Doctrine::getTable('Document')->createQuery('d')->where('d.title = ?', $this->values['title'])->fetchOne();\n $this->values['id'] = $document->id;\n }\n }\n $this->getObject()->mime_type = $file->getType();\n $this->getObject()->size = $file->getSize();\n\n }\n\n parent::doSave($con);\n\n if (null !== $file)\n {\n $path = dirname($this->getObject()->getFilePath());\n if (! is_dir($path))\n {\n mkdir($path, 0777, true);\n }\n\n if (! is_writable($path))\n {\n throw new sfException(\"Write directory access denied\");\n }\n\n $file->save($path . '/' . $filename);\n\n if (in_array($file->getType(), array('image/jpeg', 'image/png', 'image/gif', 'application/pdf')))\n {\n if (!is_dir($this->getObject()->getThumbnailDirectory()))\n {\n mkdir($this->getObject()->getThumbnailDirectory(), 0777, true);\n }\n\n if (! is_writable($path))\n {\n throw new sfException(\"Write directory access denied\");\n }\n\n $adapterOptions = array();\n if (in_array($file->getType(), array('application/pdf')))\n {\n $adapterOptions['extract'] = 1;\n }\n //$maxWidth = null, $maxHeight = null, $scale = true, $inflate = true, $quality = 75, $adapterClass = null, $adapterOptions = array()\n try {\n $thumbnail = new sfThumbnail(125, 125, true, true, 75, 'sfImageMagickAdapter', $adapterOptions);\n $thumbnail->loadFile($path . '/' . $filename);\n $thumbnail->save(sfConfig::get('sf_web_dir') . $this->getObject()->getThumbnailUrl(125, 125, true), 'image/png');\n }\n catch (Exception $exception)\n {\n \tsfContext::getInstance()->getLogger()->err(sprintf('Image %s could not be identified.', $path . '/' . $filename));\n }\n }\n }\n }", "title": "" }, { "docid": "2a740de5de09054cdbb989f77d333576", "score": "0.6111016", "text": "function SaveFile($filename){}", "title": "" }, { "docid": "9525efb7dc18891726d01904a65b9a33", "score": "0.6067074", "text": "public function saveToFile($filename)\n {\n }", "title": "" }, { "docid": "f507ec8c51514e4069a72277d209b8f2", "score": "0.60642254", "text": "public function run()\n {\n\n\t\t\t\t$file = new File();\n\n\t\t\t\t$file->route = '/views/users/images/default/default.jpg';\n\n\t\t\t\t$file->name = 'default';\n\n\t\t\t\t$file->type = 'jpg';\n\n\t\t\t\t$file->original_name = 'default';\n\n\t\t\t\t$file->save();\n\n }", "title": "" }, { "docid": "9de2269cdd382bebfdfed329bef55a05", "score": "0.6016081", "text": "function Create($fileName, $isResource=false){}", "title": "" }, { "docid": "a992e330a18506b07f525fbd2678213a", "score": "0.5998223", "text": "public function processSave()\n {\n }", "title": "" }, { "docid": "ae647c1c5c223dcfe4c25fbd3d6680b8", "score": "0.598298", "text": "public function createNewFile() {\n\t\tif ($this->exists()) {\n\t\t\treturn FALSE;\n\t\t}\n\t\tif ($this->getParentFile() != NULL && !$this->getParentFile()->canWrite()) {\n\t\t\tthrow new IOException(\"The file can not be created.\", self::ERROR_SECURITY);\n\t\t}\n\t\t// Create a new file\n\t\tTools::tryError();\n\t\t$file = fopen($this->getPath(), \"w+\");\n\t\tif (Tools::catchError($msg)) {\n\t\t\tthrow new IOException($msg, self::ERROR_OPEN);\n\t\t}\n\t\t// Close the file\n\t\tTools::tryError();\n\t\tfclose($file);\n\t\tif (Tools::catchError($msg)) {\n\t\t\tthrow new IOException($msg, self::ERROR_OPEN);\n\t\t}\n\t}", "title": "" }, { "docid": "20e9aca710620b91062241cf2e3bb974", "score": "0.59812653", "text": "public function createNewFile(){\n\t\tif($this->isFile() || $this->exists()){\n\t\t\treturn true;\n\t\t}\n\t\tif(!$this->exists()){\n\t\t\tfclose(fopen($this->name,\"w\"));\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "2c2e099bdbbd6d3c141f872bb8124870", "score": "0.59763134", "text": "public function SaveFile() {\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//\n \t\t$this->autorender = false;\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//\n \t\t$this->layout = null;\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\t//\n \t $this->render('ajax');\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\t//\n\t $fileURL=$this->request->data('thisFileID');\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//\n\t $partData=$this->request->data('partData');\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//\n\t \t$DirInfo=$this->Get_FolderID($fileURL);\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//\n \t$editPerm=$this->Get_Permissions('edit', $this->Auth->user('id'), $fileURL);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\n\t\tif ($editPerm=='1')\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\t\t//\n\t\t{\tController::loadModel('Workspace');\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//\n\t\t $this->Workspace->id=$DirInfo['ID'];\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// \n\t\t\t$this->Workspace->saveField('partTree', $partData);\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// \n\t\t\techo('11'); \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\t\t//\n\t\t}else { echo('00'); }\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\t//\n\t}", "title": "" }, { "docid": "1a32f3486d9973cc06e447d0b92228cb", "score": "0.59548026", "text": "protected function createExport()\n {\n\n $this->openFileStream();\n\n /** Set Column Headings Of File */\n $this->heading ? $this->setColumnHeadings() : null ;\n\n /** Insert Data In The File */\n $this->addCells();\n\n }", "title": "" }, { "docid": "ad8209786cc2e9d9bf286467cfa2d8a1", "score": "0.5949255", "text": "public function newFile() {\n\t//\t$this->currentAdd = [];\n\t}", "title": "" }, { "docid": "ac3198b972118568533a3a2b3dbe4156", "score": "0.5940093", "text": "public function save(Request $request)\n {\n //Valites the data\n $this->validate($request, [\n 'file_name' => 'required|max:255',\n 'description' => 'required|min:10',\n 'file' => 'required',\n ]);\n\n /**\n *Valid data, now we save it.\n */\n if ($request->hasFile('file'))\n {\n //File is valid\n if ($request->file('file')->isValid())\n {\n $file = $request->file('file');\n }\n }\n\n //File name\n $file_original_name = $file->getClientOriginalName();\n\n //File extension\n $extension = $file->getClientOriginalExtension();\n\n //Storaga destination\n $destinationPath ='storage/public/uploads/';\n\n //moves the file to local storage\n $file->move($destinationPath, $file_original_name);\n\n //Inserts the file attributes and link to the file into the database\n $template_file = TrainingMaterial::Create([\n 'file_name' => $request['file_name'],\n 'description' => $request['description'],\n 'file' => $destinationPath . $file_original_name,\n 'user_id' => Auth::user()->id,\n 'uploaded_by' => Auth::user()->user_name,\n 'upload_date' => date(\"Y-m-d H:i:s\"),\n ]);\n\n //Success message after saving\n Session::flash('success', 'File saved successfully!');\n\n //Redictes to training material page\n return redirect('training_material');\n }", "title": "" }, { "docid": "f7a19a3196207dabfb43e8bd5124e977", "score": "0.5937883", "text": "protected function import_file_save($title , $file_name){\n\t\t\t\tSession::flash('success',' File upload successfully!');\n\t\t\t\t$attendanceFile = new AttendanceFile();\n\t\t\t\t$attendanceFile->title = $title;\n\t\t\t\t$attendanceFile->name = $file_name;\n\t\t\t\t$attendanceFile->save(); \n\t}", "title": "" }, { "docid": "7b37c02e037fea9c293d85aa867e9a92", "score": "0.5922554", "text": "public function saveFromFilename()\n\t{\n\t\tlist($siw, $jenis, $cabang, $divisi, $username) = explode('_',$this->file_name);\n\t\t\n\t\t$this->jenis = $jenis;\n\t\t// change from jenis text taken from file name to integer field\n\t\t$this->changeJenisFromFile();\n\t\t\n\t\t$this->cabang_id = $cabang;\n\t\t\n\t\t// change from cabang text to cabang id\n\t\t$this->changeCabangFromFile();\n\t\t\n\t\t$this->divisi = $divisi;\n\t\t$this->user = $username;\t\n\t\t\n\t\t//save change to save the id of cabang\n\t\t$this->save();\n\t\t$this->createWithConvertDataFromFile();\n\t}", "title": "" }, { "docid": "00c31c4854b987d474e3564c6a023e00", "score": "0.5913353", "text": "public function handleCreate() {\n $create = $this->getStub('create');\n $create = $this->replaceTextVariables(['{{ modelKebab }}', '{{ modelCamelCase }}'], [$this->modelKebab, $this->modelCamelCase], $create);\n $this->createPath($this->laravel->resourcePath('/views/'.$this->modelCamelCase));\n $this->createFile($this->laravel->resourcePath('/views/'.$this->modelCamelCase.'/create.blade.php'), $create);\n\n $this->info('Create creado correctamente');\n }", "title": "" }, { "docid": "a152f3a52c4a0df0dac966d9af725063", "score": "0.5883929", "text": "public function createFile(){\n $date = new DateTime();\n $fileCreateDate = $date->getTimestamp();\n return \"you_stud_$fileCreateDate.xlsx\";\n }", "title": "" }, { "docid": "052903be56a0d79edbf92fd8d9a6913c", "score": "0.5878857", "text": "public function save(){\n\t\tif(isset($this->id)){\n\t\t\t// Really just to update the caption\n\t\t\t$this->update();\n\t\t} else {\n\t\t\t//make sure there are no errors\n\t\t\tif(!empty($this->errors)){ return false;}\n\n\t\t\t//make sure the caption is not too long for DB\n\t\t\tif(strlen($this->caption) > 255){\n\t\t\t\t$this->errors[] = \"The caption can only be 255 charaters long.\";\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//can't save without filename and temp location\n\t\t\tif(empty($this->filename) || empty($this->temp_path)){\n\t\t\t\t$this->errors[] = \"The file location was not avilable.\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//Determine the target_path\n\t\t\t$target_path = SITE_ROOT.DS. 'public' .DS. $this->upload_dir .DS. $this->filename;\n\n\t\t\t//Make sure the file doesn't esxist in the target location\n\t\t\tif(file_exists($target_path)){\n\t\t\t\t$this->errors[] = \"The file {$this->filename} already exists.\";\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//attempt to move the file\n\t\t\tif(move_uploaded_file($this->temp_path, $target_path)){\n\t\t\t\t//success\n\t\t\t\tif($this->create()){\n\t\t\t\t\tunset($this->temp_path);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t//failure\n\t\t\t\t$this->errors[] = \"The file upload failed, possibly due to incorrect permissions on the upload folder.\";\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t//save a corresponding entry to the database\n\t\t\t$this->create();\n\t\t}\n\t}", "title": "" }, { "docid": "6f3eecfe6d9a90e5f59f81e81f7779b0", "score": "0.5870113", "text": "public function createFile($key);", "title": "" }, { "docid": "e2fdc41e8a1dae092d0e2813ebecafc9", "score": "0.5861311", "text": "abstract function saveFile($key, $file, $class = null);", "title": "" }, { "docid": "4ffb0e7c7949ba698dd808f13d5856ba", "score": "0.5835086", "text": "protected function createOutputFile()\n {\n $this->outputFilePath = $this->getOutputFilePath();\n $this->experimentLogger->output_path = $this->outputFilePath;\n $header = $this->generateLogHeaderContents();\n\n if (!File::exists($this->outputFilePath)) {\n File::put($this->outputFilePath, $header);\n }\n }", "title": "" }, { "docid": "e5f8d331aa711e79693ed292008d9def", "score": "0.58304745", "text": "function save() {\r\n // TODO\r\n }", "title": "" }, { "docid": "2585cd7dcee739c0cb75308962e43c8d", "score": "0.5825328", "text": "protected function save_into_file() {\n\n if (empty($this->stageserialized)) {\n throw new coding_exception('Stage not prepared before saving the file');\n }\n\n $filename = $this->get_storage_filename();\n\n if (!is_dir(dirname($filename))) {\n mkdir(dirname($filename), 0755, true);\n }\n\n file_put_contents($filename, $this->stageserialized);\n }", "title": "" }, { "docid": "2585cd7dcee739c0cb75308962e43c8d", "score": "0.5825328", "text": "protected function save_into_file() {\n\n if (empty($this->stageserialized)) {\n throw new coding_exception('Stage not prepared before saving the file');\n }\n\n $filename = $this->get_storage_filename();\n\n if (!is_dir(dirname($filename))) {\n mkdir(dirname($filename), 0755, true);\n }\n\n file_put_contents($filename, $this->stageserialized);\n }", "title": "" }, { "docid": "9e9388df6db6688f02424f6a5981653c", "score": "0.58183694", "text": "public function upload() {\n $this->checkUpload();\n $name = $this->getNameFromUpload();\n $about = $this->getDescriptionFromUpload();\n $filename = $this->moveUpload();\n $phpGenerator = new Generator($filename, $this->dbConnection);\n $fn = $phpGenerator->generateEvaluationFile();\n $this->addToDatabase($fn, $name, $about);\n }", "title": "" }, { "docid": "370ab948447200b25d5d103394e81fd6", "score": "0.58068484", "text": "public function create_file($data)\n {\n $insert_data = array(\n 'sce_id' => $data['sce_id'],\n 'path' => $data['path'],\n 'text' => $data['text']\n );\n\n if( loop_model::$loopID !== false && loop_model::$loopI !== false ) {\n $insert_data['loop_id'] = loop_model::$loopID;\n $insert_data['loop_row'] = loop_model::$loopI;\n }\n\n $insert = $this->db->insert(file_table, $insert_data);\n\n if( $insert ) {\n return $this->db->insert_id();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c69e4f368e5f9f08307fb3118d0bc629", "score": "0.5799804", "text": "public function generate()\n {\n $oMetaDataFile = new MetaData($this->getModule()->getId());\n $oMetaDataFile->setFiles($this->loadFilesOfModule());\n $oMetaDataFile->setExtensions($this->getModule()->getExtensions());\n\n $oFile = new File($this->getMetaDataPath());\n $oFile->setContent($oMetaDataFile->getContent());\n $oFile->save();\n }", "title": "" }, { "docid": "f1d985f5e0c84f95e4a326271ad0e10e", "score": "0.5798291", "text": "public function postCreate(array $scriptProperties = array()) {\n $this->modx->log(\\modX::LOG_LEVEL_DEBUG,'API: '.print_r($scriptProperties,true),'',__CLASS__,__FUNCTION__,__LINE__);\n $this->modx->log(\\modX::LOG_LEVEL_DEBUG,'API $_FILES: '.print_r($_FILES,true),'',__CLASS__,__FUNCTION__,__LINE__);\n $fieldname = $this->modx->getOption('fieldname', $scriptProperties,'file');\n $page_id = $this->modx->getOption('page_id', $scriptProperties); // Optionally associate it with a product\n\n // Error checking\n if (empty($_FILES)) {\n return $this->sendFail(array('errors'=> 'No FILE data detected.'));\n }\n if (!isset($_FILES[$fieldname])){\n return $this->sendFail(array('errors'=> 'FILE data empty for field: '.$fieldname));\n }\n if (!empty($_FILES[$fieldname]['error'])) {\n return $this->sendFail(array('errors'=> 'Error uploading file: '.$_FILES[$filename]['error']));\n } \n \n try {\n $Model = $this->modx->newObject('Asset');\n $Asset = $Model->fromFile($_FILES[$fieldname]);\n if ($Asset->save()) {\n return $this->sendSuccess(array(\n 'msg' => sprintf('%s created successfully.',$this->model),\n 'class' => $this->model,\n 'fields' => $Asset->toArray()\n )); \n } \n $this->modx->log(\\modX::LOG_LEVEL_ERROR,'Error saving Asset '.print_r($_FILES[$fieldname],true).' '.print_r($Model->errors,true),'',__CLASS__,__FUNCTION__,__LINE__);\n return $this->sendFail(array('errors'=> $Model->errors));\n }\n catch (\\Exception $e) {\n return $this->sendFail(array('msg'=> $e->getMessage())); \n } \n }", "title": "" }, { "docid": "8298f775dfde42f92491f230ee5a7027", "score": "0.57917565", "text": "public function save_document()\n {\n switch($this->action_to_take)\n {\n case 'new':\n $this->new_document();\n break;\n case 'edit':\n /* Must make sure document already exists */\n $this->edit_document();\n break;\n default:\n header(\"Location: index.php?a=7\");\n exit();\n }\n }", "title": "" }, { "docid": "74761bf7b741b70a804aaaa3dc43bf16", "score": "0.5790763", "text": "public function save()\n {\n if (!$this->getResource(true)) {\n return $this;\n }\n\n $fileformat = $this->getVar('fileformat');\n\n\n\t\t\t\t/***\n\t\t\t\t**** Code if format is xls or xlsx\n\t\t\t\t***/\n if($fileformat=='xls' || $fileformat=='xlsx')\n {\n \t\treturn $this;\n }\n \n\n $batchModel = Mage::getSingleton('dataflow/batch');\n\n $dataFile = $batchModel->getIoAdapter()->getFile(true);\n\n $path = 'httpexport';\n\n //create path if not exist\n\t\t\t\tif (!file_exists($path)) {\n\t\t\t\t\t\tmkdir($path, 0777, true);\n\t\t\t\t}\n\n\t\t\t\t$profile = Mage::registry('current_convert_profile');//current profile \n\n $filename = $path.'/export_'.$this->getVar('entitytype').'_'.$profile->getId().'.'.$fileformat;\n\n $result = $this->getResource()->write($filename, $dataFile, 0777);\n\n if (false === $result) {\n $message = Mage::helper('dataflow')->__('Could not save file: %s.', $filename);\n Mage::throwException($message);\n } else {\n $message = Mage::helper('dataflow')->__('Saved successfully: \"%s\" [%d byte(s)].', $filename, $batchModel->getIoAdapter()->getFileSize());\n if ($this->getVar('link')) {\n $message .= Mage::helper('dataflow')->__('<a href=\"%s\" target=\"_blank\">Link</a>', $this->getVar('link'));\n }\n $this->addException($message);\n }\n return $this;\n }", "title": "" }, { "docid": "1aa04f8f87034adde252dcbd78f474b2", "score": "0.57896256", "text": "protected function makeFile()\n {\n return $this->finder->put($this->getDestinationFile(), $this->getStubContent());\n }", "title": "" }, { "docid": "7ee6861c9b81b75b191e3f22f1fd0434", "score": "0.57848054", "text": "function Create($filename, $overwrite=false, $access=wxS_DEFAULT){}", "title": "" }, { "docid": "108c4ec8bd7b17f2a1c544e6e6077507", "score": "0.578305", "text": "public function save()\n {\n\n if (!$this->dirty()) {\n return true;\n }\n\n $validTypes = array(1, 2, 3, 10, 11, 12, 13, 14, 21, 22);\n if (!in_array($this->Type, $validTypes)) {\n throw new Exception('Invalid file type!');\n }\n\n $userID = -1;\n if (Auth::user()) {\n $userID = Auth::user()->UserID;\n }\n\n if ((int)$this->StatisticID == 0) {\n $this->DateCreated = new DateTime();\n $this->ProcessTypeID = eProcessTypes::Insert;\n $this->CreatorUserID = $userID;\n $this->StatusID = eStatus::Active;\n } else {\n $this->ProcessTypeID = eProcessTypes::Update;\n }\n $this->ProcessUserID = $userID;\n $this->ProcessDate = new DateTime();\n parent::save();\n }", "title": "" }, { "docid": "4f4bc4ab7e94d5f79c7b6fa429164ca0", "score": "0.5781925", "text": "function create_file() {\n\n return wp_upload_bits( $this->filename, null, '' );\n }", "title": "" }, { "docid": "4f72729e865a97f4db533a159d9afeac", "score": "0.57812417", "text": "public function save(){\n\t\t//attach the photo to the flyer\n\t\t$photo = $this->flyer->addPhoto($this->makePhoto());\n\t\t//move the photo to the images folder\n\t\t$this->file->move($photo->baseDir(), $photo->name);\n\t\t//generate a thumbnail\n\t\t$this->thumbnail->make($photo->path, $photo->thumbnail_path);\n\t}", "title": "" }, { "docid": "1ef18a87c451258ce81a0cc99bf84f7b", "score": "0.5779091", "text": "function save_new_file($filename, $content) {\n file_put_contents($filename, $content);\n}", "title": "" }, { "docid": "eb36c4b6b349eaa4c1a59b0ce68bfe86", "score": "0.5773789", "text": "public function save() {\n\t\t$this->zip->close();\n\t}", "title": "" }, { "docid": "0058beb26367c1c119354df170fe8ba6", "score": "0.5773219", "text": "public function save() {\n if(isset($this->id)) {\n // Really just to updatet the caption\n $this->update();\n } else {\n // Can't save if there are pre-existing errors\n if(!empty($this->errors)) { return false; }\n\n // Make sure the caption is not too long for the DB\n if(strlen($this->caption) > 255) {\n $this->errors[] = \"Описание не должно превышать 255 символов.\";\n return false;\n }\n\n // Can't save without filename and temp location\n if(empty($this->filename) || empty($this->temp_path)) {\n $this->errors[] = \"Местоположение файла недоступно.\";\n return false;\n } \n\n if(($this->type != \"image/jpeg\") && ($this->type != \"image/png\") && ($this->type != \"image/gif\")) {\n $this->errors[] = \"Формат изображения {$this->type} не подходит\";\n return false;\n }\n \n \n // Determine the target_path\n $target_path = SITE_ROOT.DS.'public'.DS.$this->upload_dir.DS.$this->filename;\n \n // Make sure a file doesn't already exist in the target location\n if(file_exists($target_path)) {\n $this->errors[] = \"Файл с именем {$this->filename} уже есть.\";\n return false;\n }\n\n // Attempt to move the file\n if(move_uploaded_file($this->temp_path, $target_path)) {\n // Success\n // Save a corresponding entry to the database\n if($this->create()) {\n unset($this->temp_path);// Удаляем временный путь, потому что файла там больше нет.\n return true;\n } \n } else {\n // File was not moved.\n $this->errors[] = \"Не удалось загрузить файл.\";\n return false;\n }\n }\n }", "title": "" }, { "docid": "f8263e6f229a4560e1d7fde49d28fb76", "score": "0.5764722", "text": "final public function save() {}", "title": "" }, { "docid": "e41c284067b4d7b853c5a4c9470653b2", "score": "0.5762994", "text": "public function postCreate(array $scriptProperties = array()) {\n $this->modx->log(\\modX::LOG_LEVEL_DEBUG,'API: '.print_r($scriptProperties,true),'',__CLASS__,__FUNCTION__,__LINE__);\n $this->modx->log(\\modX::LOG_LEVEL_DEBUG,'API $_FILES: '.print_r($_FILES,true),'',__CLASS__,__FUNCTION__,__LINE__);\n $fieldname = $this->modx->getOption('fieldname', $scriptProperties,'file');\n $page_id = $this->modx->getOption('page_id', $scriptProperties); // Optionally associate it with a product\n\n // Error checking\n if (empty($_FILES)) {\n return $this->sendFail(array('errors'=> 'No FILE data detected.'));\n }\n if (!isset($_FILES[$fieldname])){\n return $this->sendFail(array('errors'=> 'FILE data empty for field: '.$fieldname));\n }\n if (!empty($_FILES[$fieldname]['error'])) {\n return $this->sendFail(array('errors'=> 'Error uploading file: '.$_FILES[$filename]['error']));\n } \n \n try {\n $Model = $this->modx->newObject('Asset');\n $Asset = $Model->fromFile($_FILES[$fieldname]);\n \n if ($Asset->save()) {\n return $this->sendSuccess(array(\n 'msg' => sprintf('%s created successfully.',$this->model),\n 'class' => $this->model,\n 'fields' => $Asset->toArray()\n ));\n }\n $this->modx->log(\\modX::LOG_LEVEL_ERROR,'Error saving Asset '.print_r($_FILES[$fieldname],true).' '.print_r($Model->errors,true),'',__CLASS__,__FUNCTION__,__LINE__); \n return $this->sendFail(array('errors'=> $Model->errors)); \n }\n catch (\\Exception $e) {\n return $this->sendFail(array('msg'=> $e->getMessage())); \n } \n }", "title": "" }, { "docid": "66e1b8bcb47d81eb1b67dce317dd8682", "score": "0.57600796", "text": "public function onSave()\r\n {\r\n // first, use the default onSave()\r\n $object = parent::onSave();\r\n \r\n // if the object has been saved\r\n if ($object instanceof Experimento)\r\n {\r\n $source_file = 'tmp/'.$object->exp_imagem;\r\n $target_file = 'images/'.$object->exp_imagem;\r\n $finfo = new finfo(FILEINFO_MIME_TYPE);\r\n \r\n // if the user uploaded a source file\r\n if (file_exists($source_file) AND ($finfo->file($source_file) == 'image/png' OR $finfo->file($source_file) == 'image/jpeg'))\r\n {\r\n // move to the target directory\r\n rename($source_file, $target_file);\r\n try\r\n {\r\n TTransaction::open('webrural');\r\n // update the photo_path\r\n $object->exp_imagem = 'images/'.$object->exp_imagem;\r\n $object->store();\r\n \r\n TTransaction::close();\r\n }\r\n catch (Exception $e) // in case of exception\r\n {\r\n new TMessage('error', $e->getMessage());\r\n TTransaction::rollback();\r\n }\r\n }\r\n $image = new TImage($object->exp_imagem);\r\n $image->style = 'width: 100%';\r\n $this->frame->add( $image );\r\n }\r\n }", "title": "" }, { "docid": "b8caa1b74a3e0d3b3a2a2a9591df8005", "score": "0.57596016", "text": "public function createFile ($file) {\n\t\n\t\t$path = $this->path;\n\t\t\n\t\t// if there is a folder in the file path\n\t\tif (strpos($file, \"/\") !== false) {\n\t\t\t\n\t\t\t// get the folder path\n\t\t\t$exFile = explode(\"/\", $file);\n\t\t\tarray_pop($exFile);\n\t\t\t$folder = implode(\"/\", $exFile);\n\t\t\t\n\t\t\t// check to make sure the folder is already created\n\t\t\t$this->createDir($_SERVER[\"DOCUMENT_ROOT\"].$path.$folder);\n\t\t}\n\t\t\n\t\t// create file\n\t\t$result = fopen($_SERVER[\"DOCUMENT_ROOT\"].$path.$file, \"w\");\n\t\t\n\t\t$pathinfo = pathinfo($file);\n\t\t$filetype = $pathinfo[\"extension\"];\n\t\t\n\t\t// if the file was create successfully\n\t\tif ($result) {\n\t\t\t\n\t\t\techo \"<div>Successfully created file [\".$_SERVER[\"DOCUMENT_ROOT\"].$path.$file.\"]</div>\";\n\t\t\t\n\t\t\t// create the file based on type\n\t\t\tswitch ($filetype) {\n\t\t\t\t\n\t\t\t\tcase \"php\":\n\t\t\t\t\n\t\t\t\t\t// should return string\n\t\t\t\t\t$php = $this->generatePHP();\n\t\t\t\t\n\t\t\t\t\t// write to the file\n\t\t\t\t\tfwrite($result, $php);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\n\t\t\t\t\t// write to the file\n\t\t\t\t\tfwrite($result, \"\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfclose($result);\n\t\t}\n\t\telse echo \"<div class='ui-state-error'>Failed to create file [\".$_SERVER[\"DOCUMENT_ROOT\"].$path.$file.\"]</div>\";\n\t}", "title": "" }, { "docid": "800312861f8314b923a02bcf8c7cd46e", "score": "0.5752572", "text": "function pre_save()\n {\n // define: $this->dest_suffix, $this->dest_dir, $this->dest_ext, $this->dest_name, $this->dest_file, $this->dest_jpeg_file\n // $suffix will be appended to the destination filename, just before the extension\n //if ( !$this->dest_suffix )\n\n $res_sufix = '';\n if ($this->dest_w != 0 && $this->dest_h != 0) $res_sufix = $this->dest_w . \"x\" . $this->dest_h;\n\n $this->dest_suffix = $this->dest_suffix . $this->add_suffix . $res_sufix;\n //if (substr($this->dest_suffix,0,1)=='-') $this->dest_suffix=substr($this->dest_suffix,1);\n\n $slash = \"/\";\n if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') $slash = \"\\\\\";\n\n $info = pathinfo($this->orig_file);\n $this->dest_dir = $info['dirname'];\n $this->dest_ext = '';\n if (isset($info['extension'])) $this->dest_ext = strtolower($info['extension']);\n if (isset($GLOBALS['wp'])) $this->dest_name = wp_basename($this->orig_file, \".\" . $this->dest_ext);\n else $this->dest_name = basename($this->orig_file, \".\" . $this->dest_ext);\n\n if (!empty($this->dest_path) and $_dest_path = realpath($this->dest_path))\n $this->dest_dir = $_dest_path;\n\n $this->dest_file = $this->dest_dir . $slash . $this->dest_name . '-' . $this->dest_suffix . '.' . $this->dest_ext;\n\n $this->dest_jpeg_file = $this->dest_dir . $slash . $this->dest_name . \"-\" . $this->dest_suffix . \".jpg\";\n\n\n //echo 'predicted_file = '.$this->dest_file; exit;\n }", "title": "" }, { "docid": "4503d408641abb7999c4d87e52deffde", "score": "0.5747851", "text": "public function save()\n\t{\n\t\t$converter = $this->extracter->converter();\n\t\t$data = $converter->toNative($this->params);\n\n\t\t$this->fs->dumpFile($this->file, $data);\n\t}", "title": "" }, { "docid": "8935e9dbce0ee8e96a16d3252bf68e0b", "score": "0.5743884", "text": "public function save(){\r\n\t\t//add header/footer to each page\r\n\t\t$i=1;\r\n\t\tforeach ($this->pages as $page) {\n\t\t\t$this->_drawFooter($page,$i);\r\n\t\t\t$this->_drawHeader($page,$i);\r\n\t\t\t$i++;\n\t\t}\n\r\n\t\tparent::save(\"{$this->_path}/{$this->_filename}\");\r\n\t}", "title": "" }, { "docid": "339cbe18559236e9cf38e3d6807a98c0", "score": "0.5731598", "text": "public function handle()\n {\n $data = User::with(['hashes.word:id,word', 'hashes.algorithm:id,name', 'hashes.word.similar'])->get()->keyBy(function ($item) {\n return 'user_' . $item['id'];\n })->toArray();\n\n $xmlData = ArrayToXml::convert($data);\n\n $this->_preparePath();\n\n $dateTime = date(self::FILENAME_DATE_FORMAT);\n\n $fullPathToFile = $this->_getBackupsPath() . $dateTime . '.' . self::FILE_FORMAT;\n\n if(File::put($fullPathToFile, $xmlData))\n {\n $this->info('Backup was saved' . ' ('. $fullPathToFile . ')');\n }\n else $this->error('Something went wrong while saving file!');\n }", "title": "" }, { "docid": "90a09a4c66d2f1c712ff1ac5f8c73047", "score": "0.57277584", "text": "public function save() {\n\t\t$this->form_validation->set_rules('title', 'title', 'trim|xss_clean');\n\n\t\t$this->form_validation->set_error_delimiters('<span class=\"error\">', '</span>');\n\n\t\tif ($this->form_validation->run() == FALSE) {\n\t\t\t$this->session->set_tempdata(\"msg\", \"<span class='error'>\" . exception() . \"</span>\", 5);\n\t\t} else {\n\t\t\t$this->master_model->do_upload($this->file_path, time()); // Call file upload function\n\n\t\t\tif ($this->master_model->upload->do_upload('userfile')) {\n\t\t\t\t$file_name = $this->upload->data('file_name');\n\t\t\t\tif ($this->upload->data('image_width') > 1024 || $this->upload->data('image_height') > 768) {\n\t\t\t\t\t$this->master_model->img_resize($this->file_path, $file_name, 1024, 768); // Resize image after upload\n\t\t\t\t}\n\t\t\t\t$data = array(\n\t\t\t\t\t'title' => $this->input->post('title'),\n\t\t\t\t\t'file_name' => $file_name\n\t\t\t\t);\n\n\t\t\t\tif ($this->photos_model->save($data)) {\n\t\t\t\t\t$this->form_validation->resetForm();\n\t\t\t\t\t$this->session->set_tempdata(\"msg\", \"<span class='success'>\" . saved_success() . \"</span>\", 5);\n\t\t\t\t} else {\n\t\t\t\t\t$this->session->set_tempdata(\"msg\", \"<span class='error'>\" . exception() . \"</span>\", 5);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->session->set_tempdata(\"msg\", \"<span class='error'>\" . exception() . \"</span>\", 5);\n\t\t\t}\n\t\t}\n\t\t$this->add();\n\t}", "title": "" }, { "docid": "004c9469975800228fc3181b49e9da7f", "score": "0.57242364", "text": "function saveAllFiles(){\r\n\r\n\t\t// get ajax data\r\n\t\t$phpData = file_get_contents('php://input');\r\n\t\t$obj = json_decode( $phpData );\r\n\r\n\t\tif (!is_dir('../code/' . $obj->dir)) {\r\n\t\t mkdir('../code/' . $obj->dir, 0777, true);\t\t \r\n\t\t}\r\n\r\n\t\t$phpfile = fopen('../code/' . $obj->fileNamePath,'w');\r\n\r\n\t\tif ($phpfile != null) {\r\n\t\t fwrite($phpfile, $obj->data);\r\n\t\t fclose($phpfile);\t\t \t \t\r\n\t\t} else{\r\n\t\t\tfclose($phpfile);\r\n\t\t echo '<script type=\"text/javascript\">alert(\"write error!...\");</script>';\r\n\t\t}\t\r\n\r\n\t}", "title": "" }, { "docid": "3219052b110e3dc6fd8e34c6554b9cdd", "score": "0.57212543", "text": "protected function createFileName()\n {\n $nameParts = pathinfo($this->originalFile);\n $this->originalFile = $nameParts['dirname'] . '/' . $nameParts['filename'] . '_tn' . '.' . $this->extension;\n }", "title": "" }, { "docid": "0d6e7925530ff07240102b8449142a49", "score": "0.57212347", "text": "public function postCreate(FileUploadRequest $request)\n {\n\n $uid = Sentinel::getUser()->id;\n $content = Site::where('uid', '=', $uid)->firstOrFail();\n $sid = $content->id;\n\n $destinationPath = public_path() . '/uploads/files/' . $sid . '/';\n\n $file_temp = $request->file('file');\n $extension = $file_temp->getClientOriginalExtension() ?: 'raw';\n// $safeName = str_random(10).'.'.$extension;\n $safeName = $request->suburl.'-'.camel_case(preg_replace('/\\\\.[^.\\\\s]{3,4}$/', '', $file_temp->getClientOriginalName())).'.'.$extension;\n\n $fileItem = new File();\n $fileItem->filename = $safeName;\n $fileItem->mime = $file_temp->getMimeType();\n\n// $fileItem->description = file('file')->getClientOriginalName();\n $fileItem->sid = $request->sid;\n $fileItem->description = preg_replace('/\\\\.[^.\\\\s]{3,4}$/', '', $file_temp->getClientOriginalName());\n $fileItem->status = \"Ανενεργό\";\n $fileItem->order = \"1\";\n\n $fileItem->save();\n\n// Thumbnail::generate_image_thumbnail($destinationPath . $safeName, $destinationPath . 'thumb_' . $safeName);\n\n $file_temp->move($destinationPath, $safeName);\n\n return $fileItem->toJson();\n }", "title": "" }, { "docid": "f42ccec03e8c77a19ca8b1f11ffddb87", "score": "0.57150996", "text": "function toFile()\r\n {\r\n }", "title": "" }, { "docid": "2be7b55fe3a3b93a8b409a19ce67f5d3", "score": "0.57119524", "text": "protected function prepareWrite() {\n\t\tif ($this->file === null) {\n\t\t\tif (empty($this->filePath)) {\n\t\t\t\tthrow new \\Exception($GLOBALS['LANG']->getLL('storage.exception.badFileFormat'));\n\t\t\t}\n\t\t\t$this->file = fopen($this->filePath, $this->writeMode);\n\n\t\t\tif ($this->file === FALSE) {\n\t\t\t\t$this->file = null;\n\t\t\t\tthrow new \\Exception($GLOBALS['LANG']->getLL('storage.exception.badFile'));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e7fe95e08f94d852f39e2e16b74d1e78", "score": "0.57097775", "text": "public function store(Request $request)\n {\n $file = $request->file('file');\n\n $extension = $file->getClientOriginalExtension();\n\n $data['file'] = $file;\n $data['extension'] = $extension;\n $data['name'] = $request->name;\n $data['project_id'] = $request->project_id;\n $data['description'] = $request->description;\n\n $this->service->createFile($data);\n }", "title": "" }, { "docid": "e84dd5e6f8ed4df48c2456df9d5c4438", "score": "0.5707021", "text": "public function store(Request $request)\n {\n /**\n * Folder for source of files\n */\n $source_folder = '';\n switch ($request->source === '0') {\n case 0:\n $source_folder = 'user_files';\n break;\n case 1:\n $source_folder = 'invoices_files';\n break;\n case 2:\n $source_folder = 'sellers';\n break;\n }\n\n /**\n * Target user id\n */\n $source_id = $request->source_id;\n\n /**\n * Type of source\n */\n $source_type = '';\n\n switch ($request->type) {\n case 0:\n $source_type = 'timesheets';\n break;\n case 1:\n $source_type = 'confimrations';\n break;\n case 2:\n $source_type = 'travels';\n break;\n case 3:\n $source_type = 'others';\n break;\n case 4:\n $source_type = 'company';\n break;\n case 5:\n $source_type = 'certs';\n break;\n case 6:\n $source_type = 'order';\n break;\n case 7:\n $source_type = 'seller_logo';\n break;\n }\n\n /* path to file */\n\n $originalName = $request->file('file')->getClientOriginalName();\n $fileNameForSave = uniqid('seargin.', true) . '.' . $request->file('file')->getClientOriginalName();\n\n $path = $request->file->storeAs('public/documents/' . $source_id . '/' . $source_folder . '/' . $source_type, $fileNameForSave);\n\n $url = Storage::url($path);\n\n /* create db record*/\n $fileupload = new Fileupload();\n $fileupload->original_name = $originalName;\n $fileupload->type = $request->type;\n $fileupload->filename = $url;\n $fileupload->path = $path;\n $fileupload->source = $request->source;\n $fileupload->source_id = $request->source_id;\n $fileupload->save();\n return response()->json(array('id' => $fileupload->id, 'original_name' => $originalName, 'filename' => $url), 200);\n }", "title": "" }, { "docid": "e09a01e0efd4a4e5387f21ef22b3b8fe", "score": "0.5705324", "text": "public function saveMapping()\n {\n // $this->plugin->setFile($type, $identifier, $file);\n }", "title": "" }, { "docid": "067e9e4eea7fe652129cfb6c2b4111b8", "score": "0.5705024", "text": "private function createFile($fcontent)\r\n {\r\n $submitDate = Date('Y-m-d-H-i-s');\r\n $submitDate .= \"__\";\r\n $submitDate .= $_SERVER['REMOTE_ADDR'];\r\n $myfile = fopen(\"model/fileCreations/$submitDate.txt\", \"w\") or die(\"Unable to open file!\");\r\n $fcontent = strip_tags($fcontent); //Make sure no code is injected into created file\r\n\t\tfwrite($myfile, $fcontent);\r\n fclose($myfile);\r\n echo \"<br /><br />File created with the following text: \".$fcontent;\r\n }", "title": "" }, { "docid": "510a0ea7878415270d2a735f900b08bf", "score": "0.57027125", "text": "protected function makeFile()\n {\n return $this->finder->put(\n $this->getDestinationFile(),\n $this->getStubContent()\n );\n }", "title": "" }, { "docid": "db4ebe9d550ca99e1d7690cda29a6e13", "score": "0.5696718", "text": "public function store()\n {\n $request = new Request();\n $this->makeFile($request->file('file'));\n\n URL::redirect('/admin/developer');\n exit();\n }", "title": "" }, { "docid": "f48c016494e3637b8b0d4d2fb8956465", "score": "0.56914467", "text": "public function create_file($params)\n\t{\n\t\t$defaults = array(\n\t\t\t'overwrite' => NULL, // sets a paramter to either overwrite or create a new file if one already exists on the server\n\t\t\t'display_overwrite' => TRUE, // displays the overwrite checkbox\n\t\t\t'accept' => '', // specifies which files are acceptable to upload\n\t\t\t'upload_path' => NULL, // the server path to upload the file to\n\t\t\t'folder' => NULL, // the folder name relative to the assets folder to upload the file\n\t\t\t'file_name' => NULL, // for file uploading\n\t\t\t'encrypt_name' => NULL, // determines whether to encrypt the uploaded file name to give it a unique value\n\t\t);\n\n\t\t$params = $this->normalize_params($params, $defaults);\n\t\n\t\t$attrs = array(\n\t\t\t'id' => $params['id'],\n\t\t\t'class' => $params['class'], \n\t\t\t'readonly' => $params['readonly'], \n\t\t\t'disabled' => $params['disabled'],\n\t\t\t'required' => (!empty($params['required']) ? TRUE : NULL),\n\t\t\t'accept' => !is_array($params['accept']) ? str_replace('|', ', .', str_replace('|.', '|', $params['accept'])) : $params['accept'],\n\t\t\t'tabindex' => $params['tabindex'],\n\t\t\t'attributes' => $params['attributes'],\n\t\t);\n\t\t\n\t\tif (is_array($this->form_attrs))\n\t\t{\n\t\t\t$this->form_attrs['enctype'] = 'multipart/form-data';\n\t\t}\n\t\telse if (is_string($this->form_attrs) AND strpos($this->form_attrs, 'enctype') === FALSE)\n\t\t{\n\t\t\t$this->form_attrs .= ' enctype=\"multipart/form-data\"';\n\t\t}\n\t\t\n\t\t$file = $this->form->file($params['name'], $attrs);\n\t\tif (isset($params['overwrite']))\n\t\t{\n\t\t\t$overwrite = ($params['overwrite'] == 1 OR $params['overwrite'] === TRUE OR $params['overwrite'] === 'yes' OR $params['overwrite'] === 'y') ? '1' : '0';\n\t\t\tif (!empty($params['display_overwrite']))\n\t\t\t{\n\t\t\t\t$file .= ' &nbsp; <span class=\"overwrite_field\">'.$this->form->checkbox($params['name'].'_overwrite', 1, Form::do_checked($overwrite));\n\t\t\t\t$file .= ' '. $this->create_label($this->label_lang('overwrite')).'</span>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$file .= $this->form->hidden($params['name'].'_overwrite', $overwrite);\n\t\t\t}\n\t\t}\n\t\tif (isset($params['upload_path']) OR isset($params['folder']))\n\t\t{\n\t\t\tif (isset($params['folder']))\n\t\t\t{\n\t\t\t\t$upload_path = $this->CI->encryption->encrypt(assets_server_path($params['folder']));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$upload_path = $this->CI->encryption->encrypt($params['upload_path']);\n\t\t\t}\n\t\t\t$file .= $this->form->hidden($params['name'].'_upload_path', $upload_path, 'class=\"noclear\"');\n\t\t}\n\t\tif (isset($params['file_name']) OR isset($params['filename']))\n\t\t{\n\t\t\t$file_name = (isset($params['file_name'])) ? $params['file_name'] : $params['filename'];\n\t\t\t$file .= $this->form->hidden($params['name'].'_file_name', $file_name, 'class=\"noclear\"');\n\t\t}\n\t\tif (isset($params['encrypt']) OR isset($params['encrypt_name']))\n\t\t{\n\t\t\t$encrypt_name = (isset($params['encrypt_name'])) ? $params['encrypt_name'] : $params['encrypt'];\n\t\t\t$file .= $this->form->hidden($params['name'].'_encrypt_name', $encrypt_name, 'class=\"noclear\"');\n\t\t}\n\t\treturn $file;\n\t}", "title": "" }, { "docid": "64aaf3eb9ff2bb551b14e20c3c3a34e2", "score": "0.5683408", "text": "public function upload()\n {\n if (empty($this->user)) {\n header(\"Location: /401\");\n exit();\n }\n\n $errors = [];\n if (!empty($_FILES) && !empty($_FILES['book'])) {\n $bookFile = new BookFile($_FILES['book']);\n $validation = $bookFile->validate();\n if (empty($validation['success'])) {\n $errors[] = $validation['message'] ?? 'Wrong file';\n }\n try {\n $result = $bookFile->save();\n if (!$result) $errors[] = 'Error while saving file';\n } catch (Exception $e) {\n $errors[] = 'Critical error while saving file';\n }\n if (empty($errors)) {\n $exists = Book::where('name', $bookFile->getName())->count();\n $name = $bookFile->getName();\n if ($exists) $name .= ' (' . Carbon::now()->format('Y-m-d H:i:s') . ')';\n Book::firstOrCreate([\n 'user_id' => $this->user['id'],\n 'name' => $name,\n 'filename' => $bookFile->getFileName(),\n 'status' => Book::BOOK_STATUS_WAITING_START,\n ]);\n }\n }\n\n if (!empty($errors)) {\n $_SESSION['errors'] = implode(',', $errors);\n }\n View::render('upload');\n }", "title": "" }, { "docid": "98560be2c5c2af16c7bee1f0b3a2730d", "score": "0.56830865", "text": "public function createFile(array $data)\n\t\t{\n\t\t\t$project = $this->repository->skipPresenter()->find($data['project_id']);\n\t\t\t$projectFile = $project->files()->create($data);\n\n\t\t\t$this->storage->put($projectFile->id .\".\". $data['extension'], $this->filesystem->get($data['file']));\n\t\t}", "title": "" }, { "docid": "83efcd259a24cf74ef81b6fa2eaaef78", "score": "0.56802875", "text": "public function processFileUpload() {\n\t\tif(isset($_FILES['choose_file'])) {\n\t\t\t// Gather all required data\n\t\t\t$doc_title \t = $_POST['doc_title'];\n \t$doc_desc \t = $_POST['doc_desc'];\n \t$doc_category = $_POST['doc_category'];\n\t\t\t$file \t\t = $_FILES['choose_file'];\n \t$file_name \t = $file['name'];\n \t$file_type = $file['type'];\n \t$file_size \t = $file['size'];\n\n \t// Create the file's new name and destination if there were no errors. Append a unique identifier to name.\n\t\t\t$tmp_name = sha1($file['name']) . uniqid('', true);\n\t\t\t$dest = USER_DOC_DIR.$tmp_name.'_tmp';\n\t\t\t//echo 'dest: '.$dest;\n\t\t\t//echo 'tmp_name: '.$tmp_name;\n\n\t\t\t// Create $params[] array list for db insert\n\t\t\t$params = array();\n\t\t\t$params[] = $doc_title;\n\t\t\t$params[] = $doc_desc;\n\t\t\t$params[] = $doc_category;\n\t\t\t$params[] = $tmp_name;\n\t\t\t$params[] = $file_name;\n\t\t\t$params[] = $file_type;\n\t\t\t$params[] = $file_size;\n\t\t\t$params[] = $_SESSION['user']['user_id'];\n\t\t\t$params[] = $_SESSION['user']['user_name'];\n\t\t\t$params[] = date(\"Y-m-d H:i:s\");\n\n\t\t\t// Move the file\n\t\t\tif (move_uploaded_file($file['tmp_name'], $dest)) {\n\n\t\t\t\t// Make file name available in feedback message\n\t\t\t\t$feedback_file = $file['name'];\n\n\t\t\t\t// Prepare and execute file INSERT action\n\t\t\t\t$stmt = \"INSERT INTO online_rep_files (doc_title, doc_desc, doc_cat_id, tmp_name, file_name, file_type, file_size, user_id, user_name, create_date)\n\t\t\t\t\t\t VALUES (?,?,?,?,?,?,?,?,?,?)\";\n\n\t\t\t\tif(!($stmt = $this->dbo->prepare($stmt))) {\n\t\t\t\t\tsendErrorNew($this->dbo->errorInfo(), __LINE__, __FILE__);\n\t\t\t\t}\n\t\t\t\tif(!($stmt->execute($params))) {\n\t\t\t\t\tsendErrorNew($stmt->errorInfo(), __LINE__, __FILE__);\n\t\t\t\t\t// Delete the file so that in the case of a query error there will not be a file on the server without a corresponding database reference\n\t\t\t\t\tunlink ($dest);\n\t\t\t\t} else {\n\t\t\t\t\t// Rename the file and have the _tmp removed from the name so as to distinuish successful from unsuccessful uploads\n\t\t\t\t\t$original = USER_DOC_DIR.$tmp_name.'_tmp';\n\t\t\t\t\t$dest\t = USER_DOC_DIR.$tmp_name;\n\t\t\t\t\trename ($original, $dest);\n\t\t\t\t\treturn $feedback_file;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Remove from the directory if INSERT unsuccessful so as not to clutter\n\t\t\t\tunlink(USER_DOC_DIR.$file['tmp_name']);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "68b713e26cd93452b94d2e16580e1ffc", "score": "0.5679741", "text": "protected abstract function save();", "title": "" }, { "docid": "16ae31b1cba8d77d52e406810392e22f", "score": "0.5671656", "text": "private function initFile()\n {\n clearstatcache();\n $dirname = $this->dirname . DIRECTORY_SEPARATOR . \n ($this->split_per_month ? date(\"Y-m\") : '');\n !is_dir($dirname) && mkdir($dirname, 0755, true);\n $this->filename = $dirname . DIRECTORY_SEPARATOR . $this->basename . \n ($this->split_per_day ? date(\"_Y-m-d\") : '') . '.' . $this->suffix;\n ini_set('error_log', $this->filename);\n }", "title": "" }, { "docid": "10a5854daaf4a89f66bb983879a67670", "score": "0.56701547", "text": "public function uploadAction() {\n\t\t\t\n\t\ttry{\n\t\t\t\n\t\t\t$this->_helper->viewRenderer->setNoRender(true);\n\t $this->_helper->layout->disableLayout();\n\t \n\t // check documentid present in session or not\n\t // if present create folder folder+documentId\n\t // else use exiting one\n\t // upload document\n\t // on successs append meta data as data id\n\t\t\tif(isset($this->_session->documentId))\n\t\t\t\t$documentId = $this->_session->documentId;\n\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t$docT = new Application_Model_DbTable_Documents();\n\t\t\t\t$data['CreatedOn'] = new Zend_Db_Expr('NOW()');\n\t\t\t\t$data['CreatedBy'] = $this->auth->getStorage()->read()->uid;\n\t\t\t\t$data['Flag'] = '-1';\n\t\t\t\t$documentId = $docT->insert($data);\t\t\n\t\t\t\t$this->_session->documentId = $documentId;\t\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->_session->attachment = $documentId;\n\t \t\n\t\t\t $foldername = 'folder'.$documentId;\n\t $uploadFolder = $this->_config->attUploadPath.$foldername;\n\t\t\t \n\t \n\t //echo $uploadFolder;\n\t if( !is_dir ( $uploadFolder)){\n\t \t\n\t \tif (!mkdir($uploadFolder, 0777, true)) {\n\t\t\t\t die('Failed to create folders...');\n\t\t\t\t}\n\t \t\n\t }\n\t \n\t\t\tif( @is_uploaded_file($_FILES['filename']['tmp_name']) )\n\t\t\t{\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t if( is_dir ( $uploadFolder)){\n\t\t\t\t\t \t\n\t\t\t\t\t//get uplaoded file detail\n\t\t\t\t\t$originalFilename = pathinfo($_FILES['filename']['name']);\n\t\t\t\t\t//print_r($originalFilename);\n\t\t\t\t\t$ext = strtolower($originalFilename['extension']); \n\t\t\t\t\t\n\t\t\t\t\t// looking for format and size validity\n\t\t\t\t\tif (array_key_exists($ext, $this->exts)){\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t//store file in orginal name\n\t\t\t\t\t\t$uploadPath = $uploadFolder .'/'. $originalFilename['basename']; \n\t\t\t\t\t\t$viewPath = $this->_config->attViewPath.$foldername.'/'. $originalFilename['basename']; \n\t\t\t\t\t\t\n\t\t\t\t\t\t// move uploaded file from temp to uploads directory\n\t\t\t\t\t\tif (move_uploaded_file($_FILES['filename']['tmp_name'], $uploadPath))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$status = 'success';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(in_array($ext, $this->img_exts)){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$file = '<img src=\"'.$viewPath.'\"/>';\n\t\t\t\t\t\t\t\t$this->_resize('960', '870','auto',$uploadPath,$uploadPath);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse { \n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//echo $_POST['metaData'];\n\t\t\t\t\t\t\t\t//$insertMeta = true;\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$file ='<a href=\"'.$viewPath.'\" target=\"_blank\"><span style=\"display:none; position: absolute; width: 0px; height: 0px; overflow: hidden;\">'.$_POST['metaData'].'</span><img src=\"'.$this->_config->iconPath.$this->exts[$ext].'\" width=\"30\" height=\"30\" />'.$originalFilename['basename'].'</a>';\t\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse \n\t\t\t\t\t\t\t$status = 'Upload Fail: Unknown error occurred!';\n\t\n\t\t\t\t\t}\n\t\t\t\t\telse \n\t\t\t\t\t\t$status = 'Upload Fail: Unsupported file format or It is too large to upload!';\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t\t$status = 'Upload Fail: File not uploaded!';\t\t\t\t\n\t\t\t}\n\t\t\telse \n\t\t\t\t$status = 'Bad request!';\n\t\t\t\n\t\t\techo $file; die();\n\t\t\t//echo Zend_Json::encode(array('status' => $status, 'file' => $file));\n\t\t\t\n\t\t}catch(Exception $e) {\t\t\t\t\n\t\t\tPp_Logger::getInstance()->err(__METHOD__ . \" - \" . $e);\n\t\t}\n }", "title": "" }, { "docid": "68b9c956a69783f00b40481ab9c109b9", "score": "0.56690854", "text": "function agenda () //Esto es el constructor\n \t{\n \t\tif (!file_exists($this->nombre_fichero)){\n \t\t\t$id_fichero=@fopen($this->nombre_fichero,\"w\") \n \t\t\t\tor die(\"<B>El fichero '$this->nombre_fichero' no se ha podido \n \t\t\t\t\t\t\t\tcrear.</B><P>\");\n \t\t\tfclose($id_fichero);\n \t\t}\n \t}", "title": "" }, { "docid": "e34756513ccfbd30e50d7a709e967d06", "score": "0.56609774", "text": "public function save_user_and_image(){\n if(!empty($this->errors)){\n return false;\n }\n\n\n // this checks for if the file name or the path is empty \n if(empty($this->user_image) || empty($this->tmp_path)){\n $this->errors[] = \"The file was not available\";\n return false;\n }\n\n // this is the current target path, wrote the rest of the code in init.php \n $target_path = SITE_ROOT . DS . 'admin'. DS . $this->upload_directory . DS . $this->user_image;\n\n // this checksif the path exists\n if(file_exists($target_path)){\n $this->errors[] = \"the file {$this->user_image} already exists\";\n return false;\n }\n\n // this moves the file if there were no errors \n if(move_uploaded_file($this->tmp_path, $target_path)){\n\n // if it is created, it will unset the temporary path and return true \n if($this->create()){\n\n unset($this->tmp_path);\n return true;\n\n }\n // if there where no errors but the file won't upload, it's most likely the folder permissions \n } else {\n\n $this->errors[] = \"The file directory probably does not have permission\";\n\n }\n\n\n $this->create();\n \n }", "title": "" }, { "docid": "5094134a19fc2581ad86bc770466d60e", "score": "0.5659759", "text": "function openArquivo(){\n $this->arquivo = fopen($this->path, \"w\");\n }", "title": "" }, { "docid": "609a15f7dba5a61953aae1cee32e3da9", "score": "0.5652241", "text": "function save($fileName = '') {\r\n if ($fileName === '') {\r\n $fileName = $this->name();\r\n }\r\n if (strpos($fileName, '.') === false) {\r\n $fileName = $fileName . '.' . $this->ext();\r\n }\r\n file_put_contents($fileName, $this->data());\r\n }", "title": "" }, { "docid": "e0b67ab069b9ce2c956ca0a4a5af2efe", "score": "0.56489336", "text": "public function store(FileCreateRequest $request)\n {\n $filename = str_replace(' ','',request('name'));\n $ext = $request->file_link->extension();\n $finalname = $filename.'_'.time().'.'.$request->file_link->extension();\n $request->file_link->move(public_path('uploads/files/'),$finalname);\n\n $file = new FileModel;\n $file->name = $request->name;\n $file->link = $finalname;\n $file->ext = $ext;\n\n $file->save();\n\n return redirect('file')->with('message','File Uploaded Successfully.');\n }", "title": "" }, { "docid": "a6494cda2af45587a8ecf0c18ad25b60", "score": "0.5645716", "text": "function create_attachment($data =null)\n{\n\tif($data==null) return;\n//\t$file_extention =\".doc\";\n\t// Грузим готовый шаблон \n\t$template = $this->home.\"/templates/resume2.rtf\";\n\tif(file_exists($template))\n\t$fp= fopen($template ,\"r\");\n\t$file_content = fread($fp, filesize( $template ));\n\tfclose ($fp);\n\n\t$file_extention =\".rtf\";\n\t$file_name =\"\".$this->translitIt( preg_replace('/\\s/','_', trim($data['name'])));\n//\t$file_name = preg_replace('/\\s/','_', trim($data['name']));\n\t$file_path =$this->home.self::PATH_TO_SAVE_FILE;\t\t\n\t\n\tif (is_writable(dirname($file_path))) {\n\t\tif ( file_exists($file_path)){\n\t\t\tif(file_exists($file_path.$file_name.$file_extention)) {\n\t\t\t\t\t$file_name.=\"_\".date(\"d_n_Y_H_m_s\",strtotime(\"now\"));\n\t\t\t}\n\t\t\t\n\t\t\t//$n=$this->add_resume_to_db(self::PATH_TO_SAVE_FILE.$file_name.$file_extention , $data ['name'],$data);\n\t\t\tarray_push($this->form_fields,array(\"id\"=>'N', \"field_in_file\"=>'номер'));\n\t\t\t$data['N']=$n;\n\t\t\t// записываем в шаблон пользовательские данные\n\t\t\tforeach ($this->form_fields as $i=>$field)\n\t\t\t{\n\t\t\t\t$value=\"\";\n\t\t\t\t$value = $data[ $field['id'] ];\n\t\t\t\t$value=$this->encode_for_rtf_with_unicode($value);// приводим данные в вид формата rtf\n\t\t\t\t$pattern= '\"'.$this->encode_for_rtf_with_unicode($field['field_in_file']).'\"';// готовим шаблон для замены в файле rtf\n\t\t\t\t$file_content= str_replace ($pattern,$value, $file_content);\n\t\t\t}\t\t\t\n\t\t\t//и сохраняем файл с пользовательскими данными\n\t\t\t$fp = fopen($file_path.$file_name.$file_extention, \"w\"); \n\t\t\tfwrite($fp, $file_content);\n\t\t\tfclose ($fp);\n\t\t\treturn $file_path.$file_name.$file_extention;\n\t\t}\n\t\telse{\n\t\t\techo \"Directory not exist!!\";\n\t\t}\n\t}\n\telse\n\t{\n\t\t\techo \"<br/>\".$file_path.$file_name.$file_extention.\"<br/>\";\n\t\t\techo \"File not writable!!\";\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "3d86df89dd74fcbdf4d59ba073b76ec2", "score": "0.56388456", "text": "public function custom_save() {\n $path = storage_path('app/attachments');\n $filename = $this->token();\n $path = substr($path, -1) == DIRECTORY_SEPARATOR ? $path : $path.DIRECTORY_SEPARATOR;\n\n $file = File::put($path.$filename, $this->getContent()) !== false;\n\n $emailAttachment = new EmailAttachment();\n\n $emailAttachment->uid = $this->getMessage()->getUid();\n $emailAttachment->attachmentid = $this->id;\n $emailAttachment->filename = $filename = $this->token();\n $emailAttachment->original = $this->name;\n $emailAttachment->mime = \\Storage::disk('attachments')->mimeType($filename);\n\n $emailAttachment->save();\n }", "title": "" }, { "docid": "0a5f51c2a54bb27eabe7717d71d18c2d", "score": "0.5636192", "text": "public function createFromFile(Request $request) {\n\t\tif ($request->isMethod('post')) {\n\n\t\t\t//validate form\n\t\t\t$messages = [\n\t\t\t\t'file.max' => 'The :attribute size must be under 1mb.',\n\t\t\t];\n\t\t\t$rules = [\n\t\t\t\t'file' => 'mimetypes:text/plain|max:1024',\n\n\t\t\t];\n\n\t\t\t$this->validate($request, $rules, $messages);\n\n\t\t\t$clientFileName = $request->file('file')->getClientOriginalName();\n\n\t\t\t// again check for file extention manually\n\t\t\t$ext = strtolower($request->file('file')->getClientOriginalExtension());\n\t\t\tif ($ext != 'txt') {\n\t\t\t\treturn redirect()->back()->with('error', 'File must be a .txt file');\n\t\t\t}\n\n\t\t\ttry {\n\t\t\t\t$storagepath = $request->file('file')->store('student-attendance');\n\t\t\t\t$fileName = basename($storagepath);\n\n\t\t\t\t$fullPath = storage_path('app/') . $storagepath;\n\n\t\t\t\t//check file content\n\t\t\t\t$linecount = 0;\n\t\t\t\t$isValidFormat = 0;\n\t\t\t\t$handle = fopen($fullPath, \"r\");\n\t\t\t\twhile (!feof($handle)) {\n\t\t\t\t\t$line = fgets($handle, 4096);\n\t\t\t\t\t$linecount = $linecount + substr_count($line, PHP_EOL);\n\n\t\t\t\t\tif ($linecount == 1) {\n\t\t\t\t\t\t$isValidFormat = AppHelper::isLineValid($line);\n\t\t\t\t\t\tif (!$isValidFormat) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfclose($handle);\n\n\t\t\t\tif (!$linecount) {\n\t\t\t\t\tthrow new Exception(\"File is empty.\");\n\t\t\t\t}\n\n\t\t\t\tif (!$isValidFormat) {\n\t\t\t\t\tthrow new Exception(\"File content format is not valid.\");\n\t\t\t\t}\n\n\t\t\t\tAttendanceFileQueue::create([\n\t\t\t\t\t'file_name' => $fileName,\n\t\t\t\t\t'client_file_name' => $clientFileName,\n\t\t\t\t\t'file_format' => $isValidFormat,\n\t\t\t\t\t'total_rows' => 0,\n\t\t\t\t\t'imported_rows' => 0,\n\t\t\t\t\t'attendance_type' => 1,\n\t\t\t\t]);\n\n\t\t\t\t// now start the command to proccess data\n\t\t\t\t$command = \"php \" . base_path() . \"/artisan attendance:seedStudent\";\n\n\t\t\t\t$process = new Process($command);\n\t\t\t\t$process->start();\n\n\t\t\t\t// debug code\n\t\t\t\t// $process->wait();\n\t\t\t\t// echo $process->getOutput();\n\t\t\t\t// echo $process->getErrorOutput();\n\n\t\t\t} catch (\\Exception $e) {\n\t\t\t\treturn redirect()->back()->with('error', $e->getMessage());\n\t\t\t}\n\n\t\t\treturn redirect()->back();\n\t\t}\n\n\t\t$isProcessingFile = false;\n\t\t$pendingFile = AttendanceFileQueue::where('attendance_type', 1)\n\t\t\t->where('is_imported', '=', 0)\n\t\t\t->orderBy('created_at', 'DESC')\n\t\t\t->count();\n\n\t\tif ($pendingFile) {\n\t\t\t$isProcessingFile = true;\n\n\t\t}\n\n\t\t$queueFireUrl = route('student_attendance_seeder', ['code' => 'hr799']);\n\t\treturn view('backend.attendance.student.upload', compact(\n\t\t\t'isProcessingFile',\n\t\t\t'queueFireUrl'\n\t\t));\n\t}", "title": "" }, { "docid": "e50125c00e8bc86094093651e0c0af57", "score": "0.56343246", "text": "public function process(): void{\n if (file_exists($this->to) && !Client::confirm('The Template-File already exists. Do you want to replace it?')) {\n throw new \\Exception('Target file does exist already');\n }\n $this->content = file_get_contents($this->from);\n $content = self::replaceData($this->content, $this->fields);\n file_put_contents($this->to, $content);\n }", "title": "" }, { "docid": "c9b3e3a2bfdbd2cec914b763a2065893", "score": "0.56335074", "text": "function on_btnSave_clicked(){\n\t\t\t$this->filename = $this->dialog_export->get_filename();\n\t\t\t$this->dialog_export->destroy();\n\t\t\t\n\t\t\tif (file_exists($this->filename)){\n\t\t\t\tif (msgbox(gtext(\"Question\"), gtext(\"Do you want to replace the file?\"), \"yesno\") != \"yes\"){\n\t\t\t\t\t$this->cancel = true;\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "655d3244868aad4c3994f1dc4817e182", "score": "0.56188923", "text": "public function store(Request $request)\n {\n $user = auth()->user();\n // Validation\n $request->validate([\n 'moduleid' => 'required',\n 'about' => 'required',\n 'mark' => 'required | Numeric',\n 'gridCheck' => 'required',\n 'academic' => 'required',\n ]);\n $title = Module::findOrFail($request->input('moduleid'));\n $title = $title->title . ' - ' . $user->student_number;\n\n\n $file = File::create([\n 'user_id' => $user->id,\n 'module_id' => $request->input('moduleid'),\n 'title' => $title,\n 'about' => $request->input('about'),\n 'keywords' => $title,\n 'mark' => $request->input('mark'),\n 'price' => 10,\n 'live' => false,\n 'approved' => false,\n 'finished' => false,\n 'owner' => true,\n ]);\n\n\n return view('File.create_upload',compact('file'));\n // return redirect()->route('upload.create', $file);\n }", "title": "" }, { "docid": "68f3c5ea97c6acc5567510e85cdb1600", "score": "0.5618165", "text": "abstract public function Save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5618162", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5618162", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.5618162", "text": "abstract public function save();", "title": "" } ]
b3d288c0602de630327a45e9c631bd64
/ CHECK CMS EXIST OR NOT
[ { "docid": "59f8c506fb9baadb53a3d653cb89e853", "score": "0.5974021", "text": "function cmsExistsDB($condition_arr=array()) {\r\n\t\t$this->db->select('*');\r\n\t\t$this->db->from('dipp_cms');\r\n\t\t$this->db->where($condition_arr);\r\n\t\t$query = $this->db->get();\r\n\t\t$num = $query->num_rows();\r\n\t\treturn ($num > 0) ? TRUE : FALSE;\r\n\t}", "title": "" } ]
[ { "docid": "4218c6b11f5cc98a0996ca03195251c4", "score": "0.650236", "text": "function check_content_file_exists() {\n\t\t$project_name_true = $this->template_parser->unclean_project_name($this->project_name);\n\t\tif($this->project_name) return file_exists(\"../content/projects/$project_name_true/information.txt\");\n\t\telse return (file_exists(\"../content/$this->page.txt\") || file_exists(\"../content/$this->page/information.txt\"));\n\t}", "title": "" }, { "docid": "4a34135ca57c6aa5949f0bac78cdac9d", "score": "0.62487805", "text": "public function isExists();", "title": "" }, { "docid": "3441562a71c83189627f1243b44364f0", "score": "0.62370807", "text": "function checkExist()\n{\n}", "title": "" }, { "docid": "fb0521e4058531af8580ec6aa3b2994c", "score": "0.61561793", "text": "public function ifNotExists();", "title": "" }, { "docid": "dc6543a7078d5d040abb4f1ac5455b87", "score": "0.5990953", "text": "public function exists();", "title": "" }, { "docid": "dc6543a7078d5d040abb4f1ac5455b87", "score": "0.5990953", "text": "public function exists();", "title": "" }, { "docid": "dc6543a7078d5d040abb4f1ac5455b87", "score": "0.5990953", "text": "public function exists();", "title": "" }, { "docid": "dc6543a7078d5d040abb4f1ac5455b87", "score": "0.5990953", "text": "public function exists();", "title": "" }, { "docid": "51295d449d7498efbab9e4fe03951406", "score": "0.5968627", "text": "public function hasContent();", "title": "" }, { "docid": "ecfa64007fffb085f2274a6b1c39599e", "score": "0.5951892", "text": "abstract public function exists();", "title": "" }, { "docid": "7783618934cc331723ac9feb6934fc8c", "score": "0.5915527", "text": "public function hasCreateIfNotFound()\n {\n return $this->create_if_not_found !== null;\n }", "title": "" }, { "docid": "7778666bc0478e4a3dec7aa7fa98046f", "score": "0.5868204", "text": "function CheckInstallation() {\r\n\t\tif (file_exists($_SERVER['DOCUMENT_ROOT'].'/data/installed.token') == false) {\r\n\t\t\tif (isPageActive('install') == false) {\r\n\t\t\t\tif (isPageActive('register?ref=install') == false) {\r\n\t\t\t\t\theader('Location: '.'/install.php');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "206be545c1e305877525f5b84b8483c6", "score": "0.5859476", "text": "function isValid(){\n\t\t$cacheFilename = self::cacheIdToFilename($this->language);\n\t\treturn file_exists($cacheFilename) && is_file($cacheFilename);\n\t}", "title": "" }, { "docid": "f344b3bfb881ea04cec41ba7d8cb34d9", "score": "0.58320636", "text": "private function pageExists() {\n global $database;\n\n if (substr($this->url, -1) == \"/\") {\n $this->url = substr($this->url, 0, -1);\n }\n\n $items = array(':url' => $this->url);\n $link = $database\n ->query(\"SELECT pages.*, menus.menu FROM \".TBL_PAGES.\" INNER JOIN menus ON menus.pid = pages.id WHERE pages.link = :url\", $items)\n ->fetchObject();\n\n if (is_object($link) && $this->checkFileExists($link->menu, $link->file)) return $link;\n\n return false;\n }", "title": "" }, { "docid": "24b2678344e17cbcfc8391ca6e932cee", "score": "0.5821237", "text": "private function _contentIsInstalled()\n {\n $content = Upage_Data_Mappers::get('content');\n\n if (($ids = $this->_getDataIds()) !== '') {\n foreach ($ids as $id) {\n $contentList = $content->find(array('id' => $id));\n if (0 != count($contentList)) {\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "6ab852e5d487236c470dc6c710c6a9d3", "score": "0.58157635", "text": "private function _check() {\r\n /** Check if the 'posts' directory exists, if not, create it\r\n with 744 rights */\r\n if (@file_exists($this->config->get('postsDir'))) {\r\n $this->isOK = true;\r\n } else if (@mkdir($this->config->get('postsDir'), 0744)) {\r\n $this->isOK = true;\r\n } else {\r\n $this->isOK = false;\r\n }\r\n /** Check if the 'media' directory exists, if not, create it\r\n with 744 rights */\r\n if ($this->config->get('enableUpload') == true &&\r\n @file_exists($this->config->get('mediaDir'))) {\r\n $this->isOK = true;\r\n } else if ($this->config->get('enableUpload') == true &&\r\n @mkdir($this->config->get('mediaDir'), 0744)) {\r\n $this->isOK = true;\r\n } else {\r\n $this->isOK = false;\r\n }\r\n /** Check if the 'pages' directory exists, if not, create it\r\n with 744 rights */\r\n if ($this->config->get('enablePages') == true &&\r\n @file_exists($this->config->get('pagesDir'))) {\r\n $this->isOK = true;\r\n } else if ($this->config->get('enablePages') == true &&\r\n @mkdir($this->config->get('pagesDir'), 0744)) {\r\n $this->isOK = true;\r\n } else {\r\n $this->isOK = false;\r\n }\r\n return $this->isOK;\r\n }", "title": "" }, { "docid": "6be2861a55dd2a442bcda7fab8355549", "score": "0.58132553", "text": "public function staticCheck() {\r\n\r\n if($this->request->getData('title') != '') {\r\n if($this->request->getData('id') != '') {\r\n $conditions = [\r\n 'id !=' => $this->request->getData('id'),\r\n 'title' => $this->request->getData('title'),\r\n 'delete_status' => 'N'\r\n ];\r\n }else {\r\n $conditions = [\r\n 'title' => $this->request->getData('title'),\r\n 'delete_status' => 'N'\r\n ];\r\n }\r\n\r\n $staticpageCount = $this->Staticpages->find('all', [\r\n 'conditions' => $conditions\r\n ])->count();\r\n\r\n if($staticpageCount == 0) {\r\n echo '0';\r\n }else {\r\n echo '1';\r\n }\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "48edd40dd7e38ddd44b9425c13770bb2", "score": "0.579575", "text": "function db_getDoesPageExist($in) { cleanup($in);\n\t\treturn db_MAIN(\"\n\t\t\tSELECT `id`\n\t\t\tFROM `migrate_content`\n\t\t\tWHERE `site` = {$in['site']}\n\t\t\tAND `page` = {$in['page']}\n\t\t\");\n\t}", "title": "" }, { "docid": "4c7d7e2f0e8645d882dc8a34cd2abf4e", "score": "0.5757554", "text": "public function admin_check() {\n // Model Search - CachePath\n $ngxcccheck = $this->Nginxcacheclear->find('first');\n $ngxpathcheck = $ngxcccheck['Nginxcacheclear']['cachepath'] . $ngxcccheck['Nginxcacheclear']['cachedir'];\n if (file_exists($ngxpathcheck)) {\n $this->setMessage('設定したディレクトリは存在します。');\n } else {\n $this->setMessage('設定したディレクトリが存在しません。');\n }\n $this->redirect(array('plugin'=>'nginxcacheclear', 'controller'=>'nginxcacheclear', 'action'=>'index'));\n }", "title": "" }, { "docid": "82b4b8fe4cc03e8c6a2283fdb6bda467", "score": "0.5707241", "text": "function Exists()\n {\n // If no id specify return false\n if(!$this->Id && !$this->Name)\n {\n return false;\n }\n\n if($this->Id)\n {\n $query = pdo_query(\"SELECT count(*) AS c FROM site WHERE id=\".qnum($this->Id));\n $query_array = pdo_fetch_array($query);\n if($query_array['c']>0)\n {\n return true;\n }\n }\n if($this->Name)\n {\n $query = pdo_query(\"SELECT id FROM site WHERE name='\".$this->Name.\"'\");\n if(pdo_num_rows($query)>0)\n {\n $query_array = pdo_fetch_array($query);\n $this->Id = $query_array['id'];\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "6f172a22e393c8c5909c10f021751217", "score": "0.56940323", "text": "public function check_my_story_exist(){\n\t\t$select = 'SELECT id as count \n\t\t\t\t\t\t\tFROM my_story \n\t\t\t\t\t\t\tWHERE mp_id = ?';\n\t\t$mp_id = $this->_mp_id()->id;\n\t\t$query = $this->db->query($select,$mp_id);\n\t\t// echo $this->db->last_query();die();\n\t\treturn $query->num_rows() > 0 ? TRUE : FALSE;\n\t}", "title": "" }, { "docid": "a629bdd7b28ec7a37f85e858062f0907", "score": "0.56879926", "text": "abstract public function check();", "title": "" }, { "docid": "356daf20938fcf79b4683e94286ca2be", "score": "0.568756", "text": "function moduleExists($mod_title){\r\r\n if (!(PHPWS_Text::isValidInput($mod_title)))\r\r\n return FALSE;\r\r\n\r\r\n if (!($this->getModuleInfo($mod_title)))\r\r\n return FALSE;\r\r\n\r\r\n return TRUE;\r\r\n }", "title": "" }, { "docid": "5faf8ba99ce9fd1c4e9d35d0ad905a31", "score": "0.56847686", "text": "function module_exist($module_name)\n{\n return \\app\\core\\util\\MhcmsModules::module_exist($module_name);\n}", "title": "" }, { "docid": "036a13c67e16cb6c0ba3c898c82fabf8", "score": "0.5672053", "text": "function check_authors() {\n return true;\n}", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "e45374ea9d59640b0a5494b636a26c32", "score": "0.56705225", "text": "public function check();", "title": "" }, { "docid": "82194e912c92ca88575aff7b32397f5b", "score": "0.56688845", "text": "public function checkdata_exist()\n\t{\n$categories=DB::select('select *from categories');\n\t\t$data_exist=DB::select('select *from categories where id=1');\n\t\tif(!$data_exist)\n\t\t{\n\t\t\t$this->autosavecategory();\n\t\t\treturn view('publish')->withCategories($categories);\n\t\t}\n\t\telse{\n\t\t\t\n\t\t\treturn view('publish')->withCategories($categories);\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "d7f6f8e8c96afc827a6fce093d50f412", "score": "0.56607497", "text": "function linkExists( $url ) {\n global $con;\n\n $query = $con->prepare(\"SELECT * FROM sites WHERE url = :url\");\n \n $query->bindParam(\":url\", $url);\n $query->execute();\n\n return $query->rowCount() != 0;\n}", "title": "" }, { "docid": "1b4d2030274a2e5d3f234b662e9796c1", "score": "0.5658888", "text": "function fn_check_addon_exists($addon_name)\n{\n return (bool) db_get_field('SELECT addon FROM ?:addons WHERE addon = ?s', $addon_name);\n}", "title": "" }, { "docid": "f636bb8c2cfb61ad0a3d92295cf5d36a", "score": "0.5652518", "text": "function category_exists($conditions) {\n global $DB;\n\n if ($DB->count_records('lips_category', $conditions) > 0) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "b6ebabd4a364fb3f3a62cf1b17b9345f", "score": "0.56253296", "text": "function check_modcategory($values)\n{\n\tglobal $mdb2, $locale;\n\n\t$errors = array();\n\t$name = $mdb2->escape($values['name']);\n\n\t$query = \"\n\t\tSELECT category_id \n\t\tFROM iShark_Shop_Category \n\t\tWHERE category_name = '\".$name.\"' AND parent = \".$values['par'].\" AND category_id != \".$values['cid'].\"\n\t\";\n\t$result = $mdb2->query($query);\n\tif ($result->numRows() > 0) {\n\t\t$errors['name'] = $locale->get('admin_shop', 'functions_error_category_exists');\n\t}\n\n\treturn empty($errors) ? true: $errors;\n}", "title": "" }, { "docid": "5b396638efe981ba8fa926764e13aea1", "score": "0.56186074", "text": "function install_verify_drupal() {\n $result = @db_query(\"SELECT name FROM {system} WHERE name = 'system'\");\n return $result && db_result($result) == 'system';\n}", "title": "" }, { "docid": "f93fd28242cc9cc965e4fbe4f699b2be", "score": "0.559239", "text": "public function isNotFound(): bool;", "title": "" }, { "docid": "b9ce367d2a1b7264514a8c63c3419fa2", "score": "0.5578787", "text": "public function OldFileExists() {\n\t\t$path = trailingslashit(get_home_path());\n\t\treturn (file_exists($path . \"sitemap.xml\") || file_exists($path . \"sitemap.xml.gz\"));\n\t}", "title": "" }, { "docid": "6dd39a45875e053d7ee7e7f036f6b68f", "score": "0.55780685", "text": "public function access()\n {\n // Checks for pages with stylesheets\n $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n 'uid,pid,crdate,tstamp,title,doktype,tx_cssselect_stylesheets', 'pages', 'tx_cssselect_stylesheets != \"\" AND tx_cssselect_stylesheets NOT LIKE \"%/%\"', '', 'title'\n );\n\n // Checks the SQL result set\n if (!$res) {\n\n // No update needed\n return false;\n }\n\n // Stores the SQL result set\n self::$_res = $res;\n\n // Returns true if pages were found\n return ( $GLOBALS['TYPO3_DB']->sql_num_rows($res) ) ? true : false;\n }", "title": "" }, { "docid": "d9dd872e18e45687096e9d94b089e60c", "score": "0.55757236", "text": "function check()\r\n {\r\n\t\t$db = JFactory::getDBO();\r\n\t\t\r\n\t\t/**\r\n * get the rule id\r\n */\r\n\t\t$query_get_id = \"SELECT id FROM #__noixacl_rules WHERE aco_section = '\". $this->aco_section .\"' AND aco_value = '\". $this->aco_value .\"' AND aro_section = 'users' AND aro_value = '\". $this->aro_value .\"' AND axo_section = '\". $this->axo_section .\"' AND axo_value = '\". $this->axo_value .\"'\";\r\n\t\t$db->setQuery( $query_get_id );\r\n\t\t$this->id = intval( $db->loadResult() );\r\n\t\t\r\n\t\t/**\r\n * check if exist aro_value( GROUP )\r\n */\r\n\t\t$query_check_group = \"SELECT id FROM #__core_acl_aro_groups WHERE name = '\". $this->aro_value .\"'\";\r\n\t\t$db->setQuery( $query_check_group );\r\n\t\t$group_exists = $db->loadResult();\r\n\t\t\r\n\t\tif( empty($group_exists) ){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "016c6d2be068b658a37d641b593c843f", "score": "0.5567879", "text": "public function site_exist($sitename){\n\t \t$this->load->model('download_model');\t\n\n\t\t\t$query = $this\n\t\t\t\t\t\t->download_model\n\t\t\t\t\t\t->get_site_credentials();\n\n\t\t\t$host = $query[0]->admin_host;\n\t\t\t$user = $query[0]->admin_user;\n\t\t\t$pass = $query[0]->admin_password;\t\t\t\n\n\t\t\t# Load database so I can check that the install has been completed\n\t\t\t$config['hostname'] = $host;\n\t\t\t$config['username'] = $user;\n\t\t\t$config['password'] = $pass;\n\t\t\t$config['database'] = $sitename;\n\t\t\t$config['dbdriver'] = \"mysql\";\n\t\t\t$config['dbprefix'] = \"\";\n\t\t\t$config['pconnect'] = FALSE;\n\t\t\t$config['db_debug'] = TRUE;\n\t\t\t$config['cache_on'] = FALSE;\n\t\t\t$config['cachedir'] = \"\";\n\t\t\t$config['char_set'] = \"utf8\";\n\t\t\t$config['dbcollat'] = \"utf8_general_ci\";\n\n\t\t\t$DB3 = $this->load->database($config, true);\n\n\t\t\t# Check if the wp_option table exist\n\t\t\tif ($DB3->table_exists('wp_options')){\n\n\t\t\t \t//$query = $DB3\n\t\t\t\t\t\t\t//->get_where($sitename . '.wp_options', array('option_name' => 'template'));\n\t\t\t\t$query = 'not_empty';\n\n\t\t\t}\telse {\n\n\t\t\t\t$query = 'empty';\n\t\t\t}\t\t\t\n\n\t\t\treturn $query;\n\n\t\t}", "title": "" }, { "docid": "3c08afa1156ab14df1022ef714be6460", "score": "0.55603683", "text": "function cmsPublishCheck($page_version_id) {\n\tglobal $ikiosk, $database_ikiosk, $SYSTEM, $SITE, $PAGE, $APPLICATION, $USER;\n\t\n\tmysql_select_db($database_ikiosk, $ikiosk);\n\t$query_getRecords = \"SELECT * FROM cms_page_versions WHERE deleted = '0' AND status = 'Published' AND site_id = '\".$SITE['site_id'].\"' AND page_version_id = '\".$page_version_id.\"'\";\n\t$getRecords = mysql_query($query_getRecords, $ikiosk) or sqlError(mysql_error());\n\t$row_getRecords = mysql_fetch_assoc($getRecords);\n\t$totalRows_getRecords = mysql_num_rows($getRecords);\t\n\t\n\t$currentDate = time();\n\t$displayPage = \"Yes\";\n\t\t\n\t//Publish Date\n\tif ((empty($_GET['page'])) && (!empty($row_getRecords['publish_date']))) {\n\t\t$publishDate = strtotime($row_getRecords['publish_date']);\t\n\t\tif ($currentDate < $publishDate) { $displayPage = \"No\"; }\n\t}\n\t\n\t//Auto Expire\n\tif ((empty($_GET['page'])) && (!empty($row_getRecords['expiration_date'])) && ($row_getRecords['auto_expire'] == \"Yes\")) {\n\t\t$expireDate = strtotime($row_getRecords['expiration_date']);\t\n\t\tif ($currentDate > $expireDate) { $displayPage = \"No\"; }\n\t}\n\t\n\treturn $displayPage;\n\t\t\t\n\n}", "title": "" }, { "docid": "b9a1955656efac65cd6b8c9581ab9922", "score": "0.5556333", "text": "abstract public function exist($name);", "title": "" }, { "docid": "76154fe698a0939862b3333416b56e40", "score": "0.5554595", "text": "function is_team_exist($url_team_logo)\n\t{\n\t\t$return = false;\n\t\t$query = $this->db->query('SELECT * FROM spt_team WHERE url_logo = ?'\n\t\t\t,array($url_team_logo));\n\t\t$results = $query->result();\n\t\tforeach ($results as $result)\n\t\t{\n\t\t\t$return = true;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "48bce0e70b0739d1544161eb89e649fb", "score": "0.555357", "text": "function page_exists($page)\n{\n\t$dummy_pages=Array('303','404','redirect');\n\t\n\tif($page==\"./\")\n\t\t$page=\"index\";\n\tif($page==\"\")\n\t\t$page=\"index\";\n\tglobal $_EP,$_BASE_PATH,$_SITE,$_MODULES;\n\t$_module='';\n\t$tail='';\n\t\n\tif(get_module($page,$_module,$tail))\n\t{\n\t\t\n\t\tif(!empty($_MODULES[$_module]) || in_array($_module,$_MODULES))\n\t\t{\n\t\t//echo \">> $page ? $_module : $tail>>\";\n\t\t\t$_FILEPATH_HEAD=$_BASE_PATH.\"/modules/$_module/ep/$_EP\"; // ���� � ����� ������ � ������\n\t\t\t$page=$tail;\n\t\t\t\n\t\t}\n\t\telse\n\t\t\t$_FILEPATH_HEAD=$_BASE_PATH.\"/sites/$_SITE/ep/$_EP\"; // ���� � ����� ������\n\t}\n\telse\n\t{\n\t\t$_FILEPATH_HEAD=$_BASE_PATH.\"/sites/$_SITE/ep/$_EP\"; // ���� � ����� ������\n\t}\n\tif(in_array($page, $dummy_pages))\n\t\treturn true;\n\t// echo \">> $_FILEPATH_HEAD/pages/$page.php >>\";\n\tif(folder_exists(\"$_FILEPATH_HEAD/pages/$page\"))\n\t{\n\t\tif(file_exists(\"$_FILEPATH_HEAD/pages/$page/index.php\"))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}\n\telseif(file_exists(\"$_FILEPATH_HEAD/pages/$page.php\")) \n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "0d17102ed6dd81684035134206ed48fa", "score": "0.5534157", "text": "protected function _check()\r\n {\r\n if (Configure::read('Install.installed') && Configure::read('Install.secured')) {\r\n $this->Session->setFlash('Already Installed');\r\n $this->redirect('/');\r\n }\r\n }", "title": "" }, { "docid": "c087b610b4ffba223d93aceceb2dd973", "score": "0.55311185", "text": "function cmsCategoryCheck($article_id, $category_id) {\n\tglobal $ikiosk, $database_ikiosk, $SYSTEM, $SITE, $PAGE, $APPLICATION, $USER, $row_getPage;\n\t\n\tmysql_select_db($database_ikiosk, $ikiosk);\n\t$query_getRecord = \"SELECT * FROM cms_blog_links WHERE article_id = '\".$article_id.\"' AND category_id = '\".$category_id.\"' AND deleted = '0' AND site_id = '\".$row_getPage['site_id'].\"' AND team_id = '1'\";\n\t$getRecord = mysql_query($query_getRecord, $ikiosk) or sqlError(mysql_error());\n\t$row_getRecord = mysql_fetch_assoc($getRecord);\n\t$totalRows_getRecord = mysql_num_rows($getRecord);\t\n\t\n\t$match = \"No\";\n\t\n\tif ($totalRows_getRecord != \"0\") {\n\t\t$match = \"Yes\";\t\n\t}\n\t\n\treturn $match;\n}", "title": "" }, { "docid": "c0a54c14285556197a8afce9b78990cb", "score": "0.5522744", "text": "protected function _isCms() {\n return $this->_cms = $this->getRequest()->getRequestedRouteName() == 'cms';\n }", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.55203223", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.55203223", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.55203223", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.55203223", "text": "public function exists(): bool;", "title": "" }, { "docid": "18b55cdd1ae7623338769839118956ee", "score": "0.55203223", "text": "public function exists(): bool;", "title": "" }, { "docid": "698290734173e07072111d095e9aca6e", "score": "0.5517528", "text": "public function doesntExists(): void;", "title": "" }, { "docid": "b5d219a745fce08accbc13c9e3eb7adf", "score": "0.5516781", "text": "function chkpage($id) {\r\n\t$findpagecontents = mysql_query ( \"SELECT * FROM cms_contentsinfo WHERE content_id=\" . $id . \" LIMIT 0, 1\" );\r\n\tif (mysql_num_rows ( $findpagecontents )) {\r\n\t\t$thispagecurrent = true;\r\n\t} else {\r\n\t\t$thispagecurrent = false;\r\n\t}\r\n\treturn $thispagecurrent;\r\n}", "title": "" }, { "docid": "85f015490eb0d0e1fc3d370b06680cae", "score": "0.550965", "text": "function check_blog_exist_by_title($str){\n\t\tif($this->blog_model->check_blog_exist(\"title\",$str)) {\n\t\t\t$this->form_validation->set_message('check_blog_exist_by_title','The %s '. $str.' is existed. Try another title');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse {\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "06df2d2fc0871b438b18777d239f9e67", "score": "0.54980636", "text": "function check_if_admin(){\r\n return FALSE;\r\n }", "title": "" }, { "docid": "82f94052148f3852d137a70148e3acce", "score": "0.54980505", "text": "public function exists()\n {\n return false;\n }", "title": "" }, { "docid": "695d2303ca2a64f513460fa8ebed4979", "score": "0.5496869", "text": "function checkExistance($row) {\n $recordExists = TRUE;\t// Always expect that page content exists\n\n if ($row['item_type']) { // External media:\n if (!is_file($row['data_filename']) || !file_exists($row['data_filename'])) {\n $recordExists = FALSE;\n }\n\n if (strpos($row['data_filename'],'ID=dam_frontend_push') >= 1) {\n $urlHeaders = $this->getUrlHeaders($GLOBALS['TSFE']->tmpl->setup['config.']['baseURL'].$row['data_filename']);\n if (stristr($urlHeaders['Content-Type'],'application/force-download'))\t{\n $recordExists = TRUE;\n }\n }\n }\n\n return $recordExists;\n }", "title": "" }, { "docid": "ce07e9dd6eeda4f4c7be0912a599a8ea", "score": "0.5490329", "text": "public static function sanityCheck(){\n\t\tif(!SNECoreConfig::tableExists('smwq_query')||!SNECoreConfig::tableExists('smwq_select')||!SNECoreConfig::tableExists('smwq_constraint')){\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "dafa6e214cffceda9b746536ba1393bf", "score": "0.5480489", "text": "function testInstallDirectoryExists() {\r\n\r\n if(file_exists('install')) {\r\n echo \"<h2>Install-directory still present.</h2> This is a massive security issue (<a href='\".confGet('STREBER_WIKI_URL').\"installation'>read more</a>).\";\r\n echo '<ul><li><a href=\"install/remove_install_dir.php\">remove install directory now.</a></ul>';\r\n return false;\r\n }\r\n return true;\r\n}", "title": "" }, { "docid": "03fb2d9c5b81211759e3847d82d89386", "score": "0.5456732", "text": "private static function checkFileExists() {\n return is_file(self::$path . self::$fileName);\n }", "title": "" }, { "docid": "c568c31d347c9d917e5fd92cf19a7201", "score": "0.5451656", "text": "private function exists()\n {\n return file_exists($this->url);\n }", "title": "" }, { "docid": "cd7bad8b4e3ef779748c949876c7c131", "score": "0.5435806", "text": "private function checkExistLocale()\n {\n if (!file_exists($this->source)){\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "25644080483b12882e39dfca37009761", "score": "0.5434983", "text": "public static function check();", "title": "" }, { "docid": "6f5d5b0673ec4cebbac1e5f6d39c58a4", "score": "0.5432047", "text": "private function _checkSlugExists($slug){\n\t\t\t$exist = true;\n\t\t\t$filter = array(\n\t\t\t\t'where' => 'slug = \"' . $slug . '\"',\n\t\t\t\t'limit' => 1\n\t\t\t);\n\t\t\t$result = Page::find($filter);\n\t\t\tif($result == false){\n\t\t\t\techo \"on insere\";\n\t\t\t\t$exist = false;\n\t\t\t}\n\t\t\treturn $exist;\n\t\t}", "title": "" }, { "docid": "a975ce9500f21575bf65d473173de1ec", "score": "0.5426578", "text": "function _checkValidCategories(){\n\t\t$component_name = \"com_jevents\";\n\n\t\t$db\t=& JFactory::getDBO();\n\t\tif (JVersion::isCompatible(\"1.6.0\")) $query = \"SELECT COUNT(*) AS count FROM #__categories WHERE extension = '$component_name' AND `published` = 1;\"; // RSH 9/28/10 added check for valid published, J!1.6 sets deleted categoris to published = -2\n\t\telse $query = \"SELECT COUNT(*) AS count FROM #__categories WHERE section='$component_name'\";\n\t\t$db->setQuery($query);\n\t\t$count = intval($db->loadResult());\n\t\tif ($count<=0){\n\t\t\t// RSH 9/28/10 - Added check for J!1.6 to use different URL for reroute\n\t\t\t$redirectURL = (JVersion::isCompatible(\"1.6.0\")) ? \"index.php?option=com_categories&extension=\" . JEV_COM_COMPONENT : \"index.php?option=\" . JEV_COM_COMPONENT . \"&task=categories.list\";\n\t\t\t$this->setRedirect($redirectURL, \"You must first create at least one category\");\n\t\t\t$this->redirect();\n\t\t}\n\t}", "title": "" }, { "docid": "7b654f3e635563cab5bcb76d5fb2b85c", "score": "0.5425619", "text": "function checkInstance()\n\t{ \t\n\t\t$args = new safe_args();\n\t\t$args->set( 'company_id',NOTSET, 'any');\t\t\t\t\n\t\t$args->set( 'company_alias',NOTSET, 'any');\t\t\t\t\n\t\t$args = $args->get(func_get_args());\t\n\n\t\t// no id or alias so the instance isn't created\n\t\t$company = getOneAssocArray('select company_status from '.BACKOFFICE_DB.\n\t\t'.customers where company_id = \"'.$args['company_id'].'\" or company_alias = \"'.$args['company_alias'].'\"');\n\n\t\treturn ( in_array($company['company_status'], array('ACT','CLO')) ? true : false) ;\n\t}", "title": "" }, { "docid": "ffacaf317c6efc8d7b68aa6475d1949c", "score": "0.54216504", "text": "Public function cache_check()\n\t\t{\n\t\t\t$cachefile = $this->cache_filename();\n\t\t\tif (file_exists($cachefile)) {return true;}\n\t\t\telse { return false;}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "9712d869d70b6c8cd0727d682ef9cfb5", "score": "0.54069066", "text": "public function isStudyCenterExist($sc_name) {\n\n $is_exist = $this->common_model->isduplicate('study_center','sc_name',$sc_name);\n if ($is_exist)\n {\n $this->form_validation->set_message('isStudyCenterExist', 'Study Center ' . $sc_name .' already exist.');\n return false;\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "e50d8588689f7c4a4329e47c7b6feafa", "score": "0.54044664", "text": "function checkResult(&$item)\r\n {\r\n $ok = (SecurityUtil::checkPermission('News::', \"$item[cr_uid]::$item[sid]\", ACCESS_OVERVIEW));\r\n if ($this->enablecategorization && $this->enablecategorybasedpermissions) {\r\n ObjectUtil::expandObjectWithCategories($item, 'news', 'sid');\r\n $ok = $ok && CategoryUtil::hasCategoryAccess($item['__CATEGORIES__'], 'News');\r\n }\r\n return $ok;\r\n }", "title": "" }, { "docid": "50a6315e8e722cf32ca4e741424214d4", "score": "0.5401738", "text": "public function testExists()\n {\n }", "title": "" }, { "docid": "2038e5840458f1fa2a31f6ea16cb6367", "score": "0.54006916", "text": "private function verifyInstalled()\n {\n $installmode = false;\n\n if (isset($this::$config['users']['user']) && $this::$config['users']['user']) {\n $installmode['response_message'] = 'Go into the config.php and change the node values to your liking. Also setup some user(s)\naccording to the example.';\n $installmode['mode'] = true;\n }\n\n $uri = $_SERVER['REQUEST_URI'];\n $parts = explode('/', $uri);\n if (in_array('public', $parts)) {\n if (!file_exists('.htaccess')) {\n $installmode['response_message'] = 'For added security, setup your vhost so that the visible root directory is public.\nIf you don\\'t have that possibility copy the .htaccess file located under core/.htaccess to the\nroot directory.';\n $installmode['mode'] = true;\n }\n }\n\n if ($installmode['mode']) {\n $installmode['menus'] = array();\n $installmode['title'] = 'Installation';\n $installmode['content'] = '';\n self::$viewport->render('page', $installmode, false);\n self::$viewport->createPage();\n exit;\n }\n }", "title": "" }, { "docid": "53bd4162b3d63c8e56a42e4367357e25", "score": "0.5397605", "text": "function mc_key_exists( $key ) {\n\t// Keys are md5 hashed, so should always be 32 chars.\n\tif ( 32 != strlen( $key ) ) {\n\t\treturn false;\n\t}\n\n\tif ( 'missing' != get_option( \"mc_ctemplate_$key\", 'missing' ) ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "bfc1add0237fb6a4ddcfb4b391c50171", "score": "0.53945273", "text": "protected function checkIfWizardIsRequired(): bool\n {\n /** @var $conn Connection */\n $conn = $this->connectionPool->getConnectionForTable($this->table);\n\n $numberOfEntries = $conn->executeQuery('\n SELECT count(*) as c\n FROM tt_news n \n LEFT JOIN sys_file_reference r \n ON r.uid_foreign = n.uid AND r.tablenames = \\'tt_news\\' AND r.fieldname = \\'news_files\\'\n \n WHERE n.news_files != \\'\\'\n AND n.deleted = 0\n AND r.uid IS NULL\n '\n )->fetch();\n\n return $numberOfEntries['c'] > 0;\n }", "title": "" }, { "docid": "8388a9d0408cd900e89c59867c3a24e2", "score": "0.5391123", "text": "function group_url_exists($url)\n\t{\n\t\tglobal $cbgroup;\n\t\treturn $cbgroup->group_url_exists($url);\n\t}", "title": "" }, { "docid": "8e1bb3a18c6fe7e0d6a45af6ae9afeca", "score": "0.5389768", "text": "function mashsb_check_active_addons(){\n\n $content = apply_filters('mashsb_settings_licenses', array());\n if (count($content) > 0){\n return true;\n }\n}", "title": "" }, { "docid": "346bc3928458479865319303a316928e", "score": "0.538763", "text": "public function url_key_check($url_key)\n {\n $cms_id = $this->input->post('cms_id'); //die;\n if(!empty($cms_id)){\n $res = $this->Cms_model->check_url_key_in_edit($url_key, $cms_id);\n if($res == 1) {\n $this->form_validation->set_message('url_key_check', 'Entered {field} already in use.');\n return false;\n }\n else{\n return true;\n }\n\n }else{\n $res = $this->Cms_model->check_url_key($url_key);\n if($res == 1) {\n $this->form_validation->set_message('url_key_check', 'Entered {field} already in use.');\n return false;\n }\n else{\n return true;\n }\n }\n\n }", "title": "" }, { "docid": "561b09329dd8c66e1631c0ea518c4f9c", "score": "0.5387573", "text": "function checkAllowed($item){\n\t// Check access level\n\t// Check page\n\treturn true;\n}", "title": "" }, { "docid": "a0f59bb9595f5039db051312c6d3d4a1", "score": "0.5384233", "text": "function block_exists($block)\n{\n\tglobal $_BASE_PATH,$_SITE,$_EP,$_MODULES;\n\tif($page==\"./\")\n\t\t$page=\"index\";\t\n\t$_module='';\n\t$tail='';\n\tif(get_module($block,$_module,$tail))\n\t{\n\t\tif(!empty($_MODULES[$_module]) || in_array($_module,$_MODULES))\n\t\t{\n\t\t\t$_FILEPATH_HEAD=$_BASE_PATH.\"/modules/$_module/ep/$_EP\"; // ���� � ����� ������ � ������\n\t\t\t$block=$tail;\n\t\t}\n\t\telse\n\t\t\t$_FILEPATH_HEAD=$_BASE_PATH.\"/sites/$_SITE/ep/$_EP\"; // ���� � ����� ������\n\t}\n\telse\n\t{\n\t\t$_FILEPATH_HEAD=$_BASE_PATH.\"/sites/$_SITE/ep/$_EP\"; // ���� � ����� ������\n\t}\n\t\n\tif(folder_exists(\"$_FILEPATH_HEAD/blocks/$block\"))\n\t{\n\t\tif(file_exists(\"$_FILEPATH_HEAD/blocks/$block/index.php\"))\n\t\t\treturn true;\n\t\telse \n\t\t\treturn false;\n\t}\n\telseif(file_exists(\"$_FILEPATH_HEAD/blocks/$block.php\")) \n\t{\n\t\treturn true;\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "f9174b12cc17b86aadb29709ecd9da1d", "score": "0.5383635", "text": "public function translate_exists_chk(Validation $post)\n {\n // If add->rules validation found any errors, get me out of here!\n if (array_key_exists('locale', $post->errors()))\n return;\n\n $iid = $_GET['iid'];\n if (empty($iid)) {\n $iid = 0;\n }\n $translate = ORM::factory('incident_lang')->where('incident_id',$iid)->where('locale',$post->locale)->find();\n if ($translate->loaded == true) {\n $post->add_error( 'locale', 'exists');\n // Not found\n } else {\n return;\n }\n }", "title": "" }, { "docid": "de611f60677e21d6894b7048875af681", "score": "0.53802896", "text": "function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM users WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested user (\". $this->id .\") does not exist - possibly the user has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "5ef2ad62c4e214bbfaab0792ca86d00d", "score": "0.5379338", "text": "function check_project_exists( $p_project_id ) {\r\n\t\tglobal $g_mantis_project_table, $g_main_page;\r\n\r\n\t\t$query = \"SELECT COUNT(*)\r\n\t\t\t\tFROM $g_mantis_project_table\r\n\t\t\t\tWHERE id='$p_project_id'\";\r\n\t\t$result = db_query( $query );\r\n\t\tif ( 0 == db_result( $result, 0, 0 ) ) {\r\n\t\t\tprint_header_redirect( $g_main_page );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "9368084e0b384bc2b05da977e309bb0b", "score": "0.5376139", "text": "function module_exist(){\n \n}", "title": "" }, { "docid": "9739e2ea5c1cdd2cf837ef7efabfe495", "score": "0.5372412", "text": "function isMaster()\n{\n\n // find ssl client email id\n //print '<p> ERROR you are not allowed to enter this page.<br>';\n //foreach ($_SERVER as $key_name => $key_value) {\n // print $key_name . \" = \" . $key_value . \"<br>\";\n //}\n //$email = strtolower(strtolower($_SERVER['SSL_CLIENT_S_DN_Email']));\n\n $email = strtolower(strtolower($_SERVER['eppn']));\n\n // initialize to no access\n $level = -1;\n\n // get admins from database\n $admins = Admins::fromDb();\n if (array_key_exists($email,$admins->list))\n $level = $admins->list[$email]->level;\n\n if ($level > 0) {\n return true;\n }\t \n\n return false;\n}", "title": "" }, { "docid": "f59ef7bb2aa2f8c94749feb655ba717d", "score": "0.5363042", "text": "function isValid() {\n\t\treturn( $this->verifyId( $this->mContentId ) );\n\t}", "title": "" }, { "docid": "b720ee44a2ae9e4bce94cbc02db517a1", "score": "0.53546923", "text": "function checkTranslation( $trans ){\n require 'config.php';\n return isset($translations[$trans]);\n }", "title": "" }, { "docid": "eb294c24ab89a22ad57e501499b1086e", "score": "0.5352729", "text": "private function langNameFromUrlDoesNotExist(): bool\n {\n $aLangs = $this->file->getDirList(PH7_PATH_APP_LANG);\n\n return !in_array(\n substr($this->httpRequest->currentUrl(), -Lang::LANG_FOLDER_LENGTH),\n $aLangs,\n true\n );\n }", "title": "" }, { "docid": "be7fd24d6ef8ece0215fd3d8e5a5c987", "score": "0.53506607", "text": "protected function _check() {\n\t\tif (Configure::read('Application.status')) {\n\t\t\t$this->Session->setFlash(__('Already Installed'),'flash_success');\n\t\t\t$this->redirect('/');\n\t\t}\n\t}", "title": "" }, { "docid": "949ad4d8ad9289c2909cc4c8fce44c5a", "score": "0.5350496", "text": "public static function has_ccss_cache()\n\t{\n\t\treturn is_dir( LSCWP_CONTENT_DIR . '/cache/ccss' ) ;\n\t}", "title": "" }, { "docid": "d653b9546acc5d1b9d38968563798f63", "score": "0.534891", "text": "public function verify()\n\t{\n\t\t$parent = file_exists($this->imageLocation . $this->storedName);\n\t\t$thumb = file_exists($this->thumbnailLocation . $this->storedName);\n\t\t\n\t\treturn $parent && $thumb ? true : false;\n\t}", "title": "" }, { "docid": "733e76a258f4d2b99d3817553620cf8a", "score": "0.53459567", "text": "private static function initializeContent(){\n\t\tif(self::$dbcheck){\n\t\t\t$possible_controllers = self::checkContentStructure();\n\t\t\tif(is_array($possible_controllers)){\n\t\t\t\tself::buildContentStructure($possible_controllers);\n\t\t\t\tUserManager::refreshInitialContent();\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f6e6003bea36968928fa1db0e5eabf57", "score": "0.5344833", "text": "public function isValid()\n {\n return $this->getPlugin() && null !== $this->getSysLanguageUid();\n }", "title": "" }, { "docid": "0fdccc7717b6c1a5914aef19b35e3493", "score": "0.5342169", "text": "public function check_category_exist_edit() {\n $category_id = $this->input->post('category_id');\n $present_cat_name = $this->input->post('cat_name', true);\n $result = $this->category_model->get_category_details_name($present_cat_name);\n if (count($result) === 0) {\n $response = true;\n } else {\n if ($result[0]['id'] === $category_id) {\n $response = true;\n } else {\n $response = false;\n }\n }\n return $response;\n }", "title": "" }, { "docid": "96861aa00abb9447ae0f593422decb34", "score": "0.5341756", "text": "public function check_page_exist($id)\n {\n // $arg_lastes_post = ['post_type' => 'page', 'order' => 'DESC', 'posts_per_page' => 1];\n $get_last_page = get_post($id);\n $slug = $get_last_page->post_name;\n\n $filename = ECOMMERCE_DIR_PATH . '/page-' . $slug . '.php';\n if (file_exists($filename) && is_home() && is_single()) {\n return false;\n } else {\n return $this->create_file_page($slug);\n }\n }", "title": "" }, { "docid": "a2c03e6e19403462fc9ddf65f414ccac", "score": "0.5336979", "text": "public function check(){\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "2306225862fde00a4bc4cda28af98b11", "score": "0.533621", "text": "function isContentManager(): bool\n{\n\treturn isAuth() && Sys::$app->user->identity->role->isContentManager();\n}", "title": "" } ]
c3aa39819456119fbd37eab5aa64afe7
Returns the error message with parsed parameters
[ { "docid": "a5e1929aa01e9163153e0cd6eabe38e3", "score": "0.6316596", "text": "public function getParsedMessage(): ?string {\r\n\r\n $message = $this -> getRawMessage();\r\n\r\n foreach($this -> getParameters() as $name => $value) {\r\n\r\n if(true === is_array($value)) {\r\n $value = implode(', ', $value);\r\n }\r\n\r\n $message = str_replace(':' . $name, $value, $message);\r\n }\r\n\r\n return $message;\r\n }", "title": "" } ]
[ { "docid": "b4cc8e84a794bbc9012dbbb8ac6b8e74", "score": "0.73403805", "text": "function getErrorParams() ;", "title": "" }, { "docid": "1f6e09c91fc08099376a8e44f57ce37e", "score": "0.7336925", "text": "abstract protected function get_error_message();", "title": "" }, { "docid": "155c271dbbff288d6c85afa7ed961d45", "score": "0.72082466", "text": "public function getErrorParams() {}", "title": "" }, { "docid": "aeac2c24fd37e710d726ce31f997d59d", "score": "0.7164359", "text": "public function getErrorMsg()\n\t{\n\t\tif (strpos($this->params['errorMsg'], '{') === false) {\n\t\t\t// no template replacement {tags} in string\n\t\t\treturn $this->params['errorMsg'];\n\t\t} else {\n\t\t\t// replace template {tags} in string\n\t\t\t$errorMsg = $this->params['errorMsg'];\n\t\t\tforeach ($this->params as $key => $value) {\n\t\t\t\t$errorMsg = str_replace('{'.$key.'}', $value, $errorMsg);\n\t\t\t}\n\t\t\treturn $errorMsg;\n\t\t}\n\t}", "title": "" }, { "docid": "e26eefacfce660f098c730af9ae2583f", "score": "0.701267", "text": "public function get_error_message(){\n\t\treturn $this->has_error && $this->error != '' ? $this->error : $this->message;\n\t}", "title": "" }, { "docid": "9be1046e5a477dcaa47a1a05cf11d787", "score": "0.7009342", "text": "public function _get_message_error(){\n\n\t\t\treturn $this->error_msg;\n\t\t}", "title": "" }, { "docid": "5878338eeb1bdd16205d779703df0df2", "score": "0.6957522", "text": "public function getErrorMessage();", "title": "" }, { "docid": "5878338eeb1bdd16205d779703df0df2", "score": "0.6957522", "text": "public function getErrorMessage();", "title": "" }, { "docid": "5878338eeb1bdd16205d779703df0df2", "score": "0.6957522", "text": "public function getErrorMessage();", "title": "" }, { "docid": "ee66404098b987923d63f6f73595180f", "score": "0.6943104", "text": "public function getMsgError(){}", "title": "" }, { "docid": "ae5b36b180fab40640e25acccb74fd8e", "score": "0.6935999", "text": "function get_error_message() {\n\t\treturn $this -> error;\n\t}", "title": "" }, { "docid": "1c4c43ab5aa7f43d9c7c7461b52929da", "score": "0.68180597", "text": "function get_error_message()\n\t{\n\t\treturn $this->error;\n\t}", "title": "" }, { "docid": "fb9e98fec3dcfd5cc12d4cda6485e0b3", "score": "0.6801956", "text": "function get_error_message_str ()\r\n {\r\n return $this->error_message_str;\r\n }", "title": "" }, { "docid": "35737ede593682ce43463c5e96783b26", "score": "0.67741036", "text": "private function error()\n\t{\n\t\tif ($this->error)\n\t\t{\n\t\t\t$search = '/{error_msg_class}/';\n\t\t\t$replace = $this->error_msg_class;\n\t\t\t\n\t\t\treturn preg_replace($search, $replace, $this->error_open)\n\t\t\t .$this->error\n\t\t\t .$this->error_close;\n\t\t\t\n\t\t\t$message = preg_replace('/{error_msg_class}/', $this->error_msg_class, $this->open);\n\t\t\t$message.= $this->error_msg;\n\t\t\t$message.= $this->error_close;\n\t\t\treturn $message;\n\t\t}\n\t}", "title": "" }, { "docid": "d8e0287a22d1b013d5f91786d2c9631b", "score": "0.67347544", "text": "public function msg() {\n\t\tswitch($this->code) {\n\t\t\t//Error messages for GET requests\n\t\t\tcase 1000 : $msg = \"Required parameter is missing\"; break;\n\t\t\tcase 1100 : $msg = \"Parameter not recognized\"; break;\n\t\t\tcase 1200 : $msg = \"Currency type not recognized\"; break;\n\t\t\tcase 1300 : $msg = \"Currency amount must be a decimal number\"; break;\n\t\t\tcase 1400 : $msg = \"Format must be xml or json\"; break;\n\t\t\tcase 1500 : $msg = \"Error in service\"; break;\n\t\t\t\n\t\t\t//Error messages for POST, PUT and DELETE requests\n\t\t\tcase 2000 : $msg = \"Method not recognized or is missing\"; break;\n\t\t\tcase 2100 : $msg = \"Rate in wrong format or is missing\"; break;\n\t\t\tcase 2200 : $msg = \"Currency code in wrong format or is missing\"; break;\n\t\t\tcase 2300 : $msg = \"Country name in wrong format or is missing\"; break;\n\t\t\tcase 2400 : $msg = \"Currency code not found for update\"; break;\n\t\t\tcase 2500 : $msg = \"Error in service\"; break;\n\t\t\t\n\t\t\tdefault : $msg = \"Unknown error\"; break;\n\t\t}\n\t\t\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "fafb106b4693e09afebbae7fd4265027", "score": "0.6729867", "text": "public function errorMessage();", "title": "" }, { "docid": "fafb106b4693e09afebbae7fd4265027", "score": "0.6729867", "text": "public function errorMessage();", "title": "" }, { "docid": "075441343046f14d906ad780076d6eb6", "score": "0.6641624", "text": "private function errorMsg()\n\t{\n\t\t// Input error\n\t\tif ($this->error_type==1) {\n\t\t\tif ($this->lang=='en') {\n\t\t\t\treturn 'Numbers, operators +-*/^, parentheses, specified constants and functions only.';\n\t\t\t} elseif ($this->lang=='ru') {\n\t\t\t\treturn 'Только цифры, операторы +-*/^, скобки, определенные константы и функции.';\n\t\t\t} elseif ($this->lang=='es') {\n\t\t\t\treturn 'Sólo cifras, operadores +-*/^, paréntesis, ciertas constantes y funciones.';\n\t\t\t}\n\t\t// Empty string\n\t\t} elseif ($this->error_type==2) {\n\t\t\tif ($this->lang=='en') {\n\t\t\t\treturn 'You have not entered the formula.';\n\t\t\t} elseif ($this->lang=='ru') {\n\t\t\t\treturn 'Вы не ввели формулу.';\n\t\t\t} elseif ($this->lang=='es') {\n\t\t\t\treturn 'Usted no ha entrado en la fórmula.';\n\t\t\t}\n\t\t// Mismatched parentheses\n\t\t} elseif ($this->error_type==3) {\n\t\t\tif ($this->lang=='en') {\n\t\t\t\treturn 'Number of opening and closing parenthesis must be equal.';\n\t\t\t} elseif ($this->lang=='ru') {\n\t\t\t\treturn 'Количество открывающих и закрывающих скобок должно быть равно.';\n\t\t\t} elseif ($this->lang=='es') {\n\t\t\t\treturn 'Número de apertura y cierre paréntesis debe ser igual.';\n\t\t\t}\n\t\t// Unexpected error\n\t\t} else {\n\t\t\tif ($this->lang=='en') {\n\t\t\t\treturn 'Syntax error.';\n\t\t\t} elseif ($this->lang=='ru') {\n\t\t\t\treturn 'Ошибка синтаксиса.';\n\t\t\t} elseif ($this->lang=='es') {\n\t\t\t\treturn 'Error de sintaxis.';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "74161a84d4a82819815cb30398f5f1e8", "score": "0.6624214", "text": "public function message()\n {\n return $this->errorMessage[$this->lastErrorType];\n //return 'The validation error message.';\n }", "title": "" }, { "docid": "bf4c60b405f7313b9aa5eba57df3e47b", "score": "0.66143316", "text": "public function getErrorMessage()\n {\n return $this->getErrorArrayKey('message');\n }", "title": "" }, { "docid": "bf4c60b405f7313b9aa5eba57df3e47b", "score": "0.66143316", "text": "public function getErrorMessage()\n {\n return $this->getErrorArrayKey('message');\n }", "title": "" }, { "docid": "5286b59a1b435c4e638cd91b4b23c49f", "score": "0.6607587", "text": "function getMessage(){\n\t\treturn $this->errormsg;\n\t}", "title": "" }, { "docid": "438281c36e1e6a91f43430ecd9f1db89", "score": "0.6606635", "text": "public function errorMessage() {\n\t\treturn $this->error->getMessage();\n\t}", "title": "" }, { "docid": "25cf5e3789476780a52bd75001a910f1", "score": "0.65852803", "text": "function ErrorMessage($errid = null) {\n\tglobal $kErrors, $kELevel;\n\n\tif (is_null($errid)) {\n\t\t$errid = GetMostSevere();\n\t}\n\n\treturn vsprintf($kErrors[$errid]['errstr'], $kErrors[$errid]['args']);\n}", "title": "" }, { "docid": "ea122fd7347097b501671a3cbab7b1a0", "score": "0.6580478", "text": "public function error() {\n $error = NULL;\n if (stristr($this->error, \"source\"))\n $error[] = \"no selected file\";\n if (stristr($this->error, \"dimension\"))\n $error[] = \"dimensions too large\";\n if (stristr($this->error, \"extension\"))\n $error[] = \"invalid extension\";\n if (stristr($this->error, \"size\"))\n $error[] = \"size too large\";\n return $error;\n }", "title": "" }, { "docid": "4e435c3de324eae04f0f5aebdfe437ef", "score": "0.6569703", "text": "public function get_error_msg() {\n\t\t\tif ( !empty( $this->_field_data['error_msg'] ) )\n\t\t\t\treturn __( $this->_field_data['error_msg'] );\n\t\t\telse if ( !empty( $this->_field_data['label'] ) )\n\t\t\t\treturn sprintf( __( 'Could not validate %s' ), $this->_field_data['label'] );\n\t\t\telse \n\t\t\t\treturn sprintf( __( 'Could not validate %s' ), $this->_field_data['id'] );\n\t\t}", "title": "" }, { "docid": "050cc1113d99f21e0265a6e3be88bd0a", "score": "0.65594876", "text": "public function getError()/*# : string */;", "title": "" }, { "docid": "0aa481f1d6eba94ee8ad7aae2fa61f8a", "score": "0.6533801", "text": "public function getErrorMessage() {\n $messages = $this->getMessage();\n $critical = $this->getCritical();\n $msgError = \"\";\n $i = 0;\n foreach ($messages as $message) {\n if ($critical[$i++]) {\n $msgError .= \"{$message}\\n\";\n }\n }\n\n return $msgError;\n\n }", "title": "" }, { "docid": "68c1181f5823e989559a3cf535970311", "score": "0.65306216", "text": "function error_message() {\n if( isset( $this->error_message ) ) {\n return $this->error_message;\n } else {\n return \"\";\n }\n }", "title": "" }, { "docid": "8d314322523361c3bf19a20f8ac84019", "score": "0.65129346", "text": "private function get_error_message() {\n\n global $filelogger, $session;\n\n // get and check the exception's error id\n $eid = $this->get_eid($this->exception);\n if(!Validator::matches($eid,\"/[0-9]{4}/\")) $eid = \"0000\";\n\n // try to get the error message configured\n try {\n\n // determine session and default language\n $ls = (!Validator::isa($session,\"null\") && $session->has(\"language\") \n ? $session->get(\"language\") : \"\");\n $ld = (!Validator::isa(@constant(\"LANG_DEFAULT\"),\"null\") \n ? LANG_DEFAULT : \"en\");\n \n // get the error message\n $x = new XMLDocument(PATH_CONF.\"/data/errors.xml\",\n PATH_DTD.\"/data/errors.dtd\",true);\n $xp = \"string(//error[@eid=\\\"\".$eid.\"\\\"]/\".\n (!Validator::isempty($ls) ? $ls : $ld).\")\";\n if(!Validator::isa($filelogger,\"null\")) \n $filelogger->debug(\"sesslang=%, deflang=%, xp=%\",array($ls,$ld,$xp));\n \n return $x->xpath($xp);\n\n // in case something went wrong getting the message from xml e.g. due to\n // validation errors or similar\n } catch(XMLNotValidException $e) {\n } catch(XMLNoValidDTDException $e) {\n } catch(InvalidXPathExpressionException $e) {\n } catch(UnresolvedXPathException $e) {\n }\n\n if(!Validator::isa($filelogger,\"null\")) \n $filelogger->err(\"Getting error message for id=% failed.\",array($eid));\n\n // if getting the error message failed use a default one\n return \"Sorry. This should not have happened.&lt;br/&gt;\\n\";\n\n }", "title": "" }, { "docid": "bdd59c7f7e2fe2b90d8a217b058e8923", "score": "0.65056974", "text": "function getMessage()\n {\n return $this->_errors;\n }", "title": "" }, { "docid": "24e7ff561e7fe59811b8ddebce9d17d9", "score": "0.6505078", "text": "public function error_message()\n\t{\n\t\t$code = $this->error_code();\n\t\tif (isset($this->_messages[$code]))\n\t\t\treturn $this->_messages[$code];\n\t\t\n\t\treturn 'Unknown error';\n\t}", "title": "" }, { "docid": "58ee93df3c78845c199780c0334af95a", "score": "0.65022373", "text": "function getError() {\r\r\n\t\treturn $this->error_msg;\r\r\n\t}", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6496749", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6496749", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6496749", "text": "public function getError();", "title": "" }, { "docid": "bd3dda0eda9e3ccad0b743110b8b691e", "score": "0.6496749", "text": "public function getError();", "title": "" }, { "docid": "e4ff16bf968fd66c06a853dfcacb683a", "score": "0.64470476", "text": "public function error() {\n\t\t$errors = array();\n\n\t\tforeach (func_get_args() as $msg) {\n\t\t\tif (is_array($msg)) {\n\t\t\t\t$errors = array_merge($errors, $msg);\n\t\t\t} else {\n\t\t\t\t$errors[] = $msg;\n\t\t\t}\n\t\t}\n\n\t\tif (!count($errors)) {\n\t\t\treturn self::$errors[self::ERROR_UNKNOWN];\n\t\t}\n\n\t\tforeach ($errors as $i => $msg) {\n\t\t\tif (is_int($msg) && !empty(self::$errors[$msg])) {\n\t\t\t\t$errors[$i] = self::$errors[$msg];\n\t\t\t} elseif ($i == 0) {\n\t\t\t\t$errors[$i] = self::$errors[self::ERROR_UNKNOWN];\n\t\t\t}\n\t\t}\n\n\t\treturn $errors;\n\t}", "title": "" }, { "docid": "cd12ba58ed08fbfb46871ad9066bc68b", "score": "0.64466107", "text": "public function getMessage() {\n\t\tif (array_key_exists($this->currentError,$this->errors)) {\n\t\t\treturn $this->errors[$this->currentError];\n\t\t} else {\n\t\t\treturn 'No error message to display.';\n\t\t}\n\t}", "title": "" }, { "docid": "23fa4fc6614578c9ba3ac0200564d1bb", "score": "0.64320886", "text": "public function get_error() {\n\t\t$message = $this->error;\n\t\t$this->error = null;\n\t\treturn $message;\n\t}", "title": "" }, { "docid": "826a2473782c61d4a8b4ae87a5b490f9", "score": "0.6430242", "text": "function cwpl_error_message() {\n\treturn 'Well, that was not it!';\n}", "title": "" }, { "docid": "a158ededbd1d82009ea8f9a2d8713c37", "score": "0.6428946", "text": "protected function get_error()\n {\n return 'Error Number (' . $this->res->status_code . '): ' . $this->res->status_txt;\n }", "title": "" }, { "docid": "558cdac91057ed1dfd2e448cdbfad3c0", "score": "0.6418564", "text": "private function createMessage(): string\n {\n $message = '';\n foreach (libxml_get_errors() as $error) {\n $message .= trim($error->message) . (($error->file) ? (' in file ' . $error->file) : ('')) . ' on line ' . $error->line . ' in column ' . $error->column . \"\\n\";\n }\n\n libxml_clear_errors();\n if (strlen($message) === 0) {\n return 'Transformation failed: unknown error.';\n }\n\n return $message;\n }", "title": "" }, { "docid": "00f1fa88da6690095db45b87e54d06dc", "score": "0.64149463", "text": "function error_dict($error){\r\n\t$error_msg = \"\";\r\n\tswitch ($error) {\r\n\t\tcase \"1000\":\r\n\t\t\t$error_msg = \"unknown error\";\r\n\t\t\tbreak;\r\n\t\tcase \"1100\":\r\n\t\t\t$error_msg = \"user recently deleted\";\r\n\t\t\tbreak;\r\n\t\tcase \"1101\":\r\n\t\t\t$error_msg = \"suspended user\";\r\n\t\t\tbreak;\r\n\t\tcase \"1200\":\r\n\t\t\t$error_msg = \"domain limit exceeded\";\r\n\t\t\tbreak;\r\n\t\tcase \"1201\":\r\n\t\t\t$error_msg = \"domain alias exceeded\";\r\n\t\t\tbreak;\r\n\t\tcase \"1202\":\r\n\t\t\t$error_msg = \"domain suspended\";\r\n\t\t\tbreak;\r\n\t\tcase \"1203\":\r\n\t\t\t$error_msg = \"feauture unavailable\";\r\n\t\t\tbreak;\r\n\t\tcase \"1300\":\r\n\t\t\t$error_msg = \"duplicate entity\";\r\n\t\t\tbreak;\r\n\t\tcase \"1301\":\r\n\t\t\t$error_msg = \"nonexistant entity\";\r\n\t\t\tbreak;\r\n\t\tcase \"1302\":\r\n\t\t\t$error_msg = \"reserved entity\";\r\n\t\t\tbreak;\r\n\t\tcase \"1303\":\r\n\t\t\t$error_msg = \"invalid entity\";\r\n\t\t\tbreak;\r\n\t\tcase \"1400\":\r\n\t\t\t$error_msg = \"invalid name\";\r\n\t\t\tbreak;\r\n\t\tcase \"1401\":\r\n\t\t\t$error_msg = \"invalid family name\";\r\n\t\t\tbreak;\r\n\t\tcase \"1402\":\r\n\t\t\t$error_msg = \"invalid password\";\r\n\t\t\tbreak;\r\n\t\tcase \"1403\":\r\n\t\t\t$error_msg = \"invalid username\";\r\n\t\t\tbreak;\r\n\t\tcase \"1404\":\r\n\t\t\t$error_msg = \"invalid hash function\";\r\n\t\t\tbreak;\r\n\t\tcase \"1405\":\r\n\t\t\t$error_msg = \"invalid digest length\";\r\n\t\t\tbreak;\r\n\t\tcase \"1406\":\r\n\t\t\t$error_msg = \"invalid email address\";\r\n\t\t\tbreak;\r\n\t\tcase \"1407\":\r\n\t\t\t$error_msg = \"invalid query parameter\";\r\n\t\t\tbreak;\r\n\t\tcase \"1500\":\r\n\t\t\t$error_msg = \"too many recipients\";\r\n\t\t\tbreak;\r\n\t\tdefault:\r\n\t\t\t$error_msg = \"unknown error\";\r\n\t\t\tbreak;\r\n\t\t}\r\n\treturn \" - <a href=\\\"http://code.google.com/apis/apps/gdata_provisioning_api_v2.0_reference.html#appendix_d\\\" target=\\\"_blank\\\">$error_msg</a>\";\r\n}", "title": "" }, { "docid": "0b789e3c9b97675a76f1f8b83a842b6b", "score": "0.6374942", "text": "public function getErrorMessage()\n {\n return $this->error_message;\n }", "title": "" }, { "docid": "b5d7ca05714bdc2cd8c9bba3b38a03dc", "score": "0.63699913", "text": "public function GetErrorMessage() {\n\t\treturn $this->error_message;\n\t}", "title": "" }, { "docid": "cf9ed1d5f4e4a643221ce0476c809618", "score": "0.6367136", "text": "public static function error() { \n return self::__get_routing('error','error',func_get_args());\n }", "title": "" }, { "docid": "8df0dc7641007894d16dbc3b93c12126", "score": "0.63659817", "text": "function _getErrorMsg($errcode, $param = '', $message=''){\n\t\tswitch($errcode){\n\t\t\tcase 0:\n\t\t\t\treturn array(\"code\" => \"0\", \"message\" => \"No Error.\");\n\t\t\tcase 001:\n\t\t\t\treturn array(\"code\" => \"001\", \"message\" => \"Missing Parameter - $param.\");\n\t\t\tcase 002:\n\t\t\t\treturn array(\"code\" => \"002\", \"message\" => \"Invalid Parameter\");\n\t\t\tcase 003:\n\t\t\t\treturn array(\"code\" => \"003\", \"message\" => $message );\n\t\t\tcase 004:\n\t\t\t\treturn array(\"code\" => \"004\", \"message\" => \"Data was not sent by post method.\");\n\t\t\tcase 005:\n\t\t\t\treturn array(\"code\" => \"005\", \"message\" => \"Access denied. Either your credentials are not valid or your request has been refused. \");\n\t\t\tcase 006:\n\t\t\t\treturn array(\"code\" => \"006\", \"message\" => \"Access denied. Your request has been understood, \n\t\t\t\t\tbut denied due to access limits like time. Try Back Later\");\t\t\t\n\t\t\tdefault:\n\t\t\t\treturn array(\"code\" => \"999\", \"message\" => \"Not Found.\");\n\t\t}\n }", "title": "" }, { "docid": "99144aed2b6c13e0031d5790a7d8b6fb", "score": "0.6361864", "text": "public function message() {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "f3674066498e1b7634fe9c32c3ae45a0", "score": "0.63547033", "text": "public function getFullMessage() {\n return 'Error Code ' . $this->getCode() . ': ' . $this->getMessage();\n }", "title": "" }, { "docid": "0a3de2322493bd8f36df78466d7fa04e", "score": "0.6351829", "text": "public function errorInfo();", "title": "" }, { "docid": "0a3de2322493bd8f36df78466d7fa04e", "score": "0.6351829", "text": "public function errorInfo();", "title": "" }, { "docid": "0a3de2322493bd8f36df78466d7fa04e", "score": "0.6351829", "text": "public function errorInfo();", "title": "" }, { "docid": "d331e65a7ffd22f9a5a4113942365406", "score": "0.63474196", "text": "abstract public function getError();", "title": "" }, { "docid": "91aa556917fb157106762bc0d3a34918", "score": "0.63462263", "text": "function error() {\n\t\treturn $this->error_msg;\n\t}", "title": "" }, { "docid": "0f084f2e14991bbc1263af36bd8aaefe", "score": "0.6324072", "text": "public function error_message()\n {\n return $this->_errormsg;\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.63227636", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.63227636", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.63227636", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.63227636", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "196f9160318cb216daacc1e23b4a833e", "score": "0.63227636", "text": "public function message()\n {\n return 'The validation error message.';\n }", "title": "" }, { "docid": "0617956e8fa541efd2c33bebb0d260f8", "score": "0.632268", "text": "public function getErrorMsg()\n {\n return $this->api->getErrorMsg();\n }", "title": "" }, { "docid": "6bb84a86d9b6d33c8deb1439c32a4f4e", "score": "0.6310325", "text": "public static function error()\n\t{\n\t\tstatic::prepare();\n\n\t\t$args = func_get_args();\n\n\t\tsyslog( LOG_ERR, $msg = call_user_func_array( 'sprintf', $args ) );\n\n\t\treturn $msg;\n\t}", "title": "" }, { "docid": "b05d6c61c5c9ca72084182c90780990f", "score": "0.63007504", "text": "public function get_error_message()\n {\n return $this->_error_message !== null ? $this->_error_message : '';\n }", "title": "" }, { "docid": "ed7fc28a2678a45ab3cb8433b67e1874", "score": "0.6292393", "text": "public function getErrorMessage()\n {\n return $this->_error_message;\n }", "title": "" }, { "docid": "24f1e06e09637544d161d31392674ce4", "score": "0.6291961", "text": "public function getParsedException();", "title": "" }, { "docid": "6766c2c9d322be0a3143467da56b6b5b", "score": "0.6276759", "text": "public function error()\r\n {\r\n return $this->error_message;\r\n }", "title": "" }, { "docid": "ef06f662d8001f0e48ea9da0349c8ba0", "score": "0.62739414", "text": "public function getError()\n {\n if($this->isWorking()) {\n //cron were mot validated or there is no error\n return '';\n }\n $message = Mage::helper('aitoc_common')->__($this->_errorMessage, $this->_updateString);\n $message .= '<br />'.Mage::helper('aitoc_common')->__('Some module function may not work properly if cron hasn\\'t been setup and is not working properly.');\n $message .= '<br />'.Mage::helper('aitoc_common')->__('For proper cron setup please refer to the <a href=\"%s\" target=\"_blank\">magento official guide</a>.', 'http://devdocs.magento.com/guides/m1x/install/installing_install.html#install-cron');\n return $message;\n\n }", "title": "" }, { "docid": "2928f69013383b4f7499498346a40fd7", "score": "0.62729216", "text": "public function message() //沒通過的話錯誤訊息放在這裡\n {\n // return \"The validation for $this->name is failed\";\n return $this->msg;\n }", "title": "" }, { "docid": "1ae363d961ab293ca9cff9b667096b91", "score": "0.62616295", "text": "public function getFailureMessage();", "title": "" }, { "docid": "f19946cf08a72563ee9f9cdd58dc7a7c", "score": "0.6260504", "text": "public function getValidationError()\n {\n $message = false;\n\n try {\n $this->assert();\n } catch (ValidationException $e) {\n $customErrors = $e->findMessages($this->getCustomErrors());\n $customError = reset($customErrors);\n $message = $customError ? $customError : $e->getMessages()[0];\n $message = str_replace('\"', \"'\", $message);\n $message = 'Invalid parameter ' . $this->getName() . ': ' . $message;\n } finally {\n return $message;\n }\n }", "title": "" }, { "docid": "9734965fa4afd2360430fe7a33a265c8", "score": "0.62531185", "text": "public abstract function getError();", "title": "" }, { "docid": "35f950d3d73ebe87a0bfc6c8d20b9001", "score": "0.6246835", "text": "function get_error_str ()\r\n {\r\n return $this->error_str;\r\n }", "title": "" }, { "docid": "1bcbd648c2f54adcce39ac63f7e89cf6", "score": "0.6240093", "text": "public function getErrorMessage(): string\n {\n return $this->method->getErrorMessage();\n }", "title": "" }, { "docid": "c1ec56aabeedeabb708fdded3056d0bf", "score": "0.6227674", "text": "public function getError() {}", "title": "" }, { "docid": "f7d591a03c62a47236130d699b302f63", "score": "0.622652", "text": "public function errorMessage()\n {\n if (isset($this->ErrorResponse) && is_array($this->ErrorResponse) && isset($this->ErrorResponse['message'])) {\n return $this->ErrorResponse['message'];\n }\n\n return '';\n }", "title": "" }, { "docid": "a43538cf391c361f763a792ac025b020", "score": "0.6223964", "text": "function errorMessage()\n {\n $error = <<<ERROR\n<html>\n <head>\n <title>Exception:</title>\n <style>\n html, body{\n margin: 0;\n padding: 0;\n }\n\n body\n {\n background-color: #fff;\n padding: 10px;\n color: #212121;\n }\n\n .container\n {\n width: 80%;\n margin: auto;\n }\n\n .box\n {\n display: inline-block;\n border: 1px solid rgba(0, 0, 0, 0.4);\n border-radius: 4px;\n padding: 4px;\n margin-bottom: 10px;\n }\n </style>\n </head>\n <body>\n <div class=\"container\">\n <div class=\"box\" style=\"width: 100%\">\n Error on line $this->getLine() in $this->getFile(): <b> $this->getMessage() </b>\n </div>\n </div>\n <div class=\"container\">\n <div class=\"box\">\n asdsad\n </div>\n <div class=\"box\">\n asdsad\n </div>\n </div>\n </body>\n</html>\nERROR;\n\n return $error;\n //return 'Error on line '.$this->getLine().' in '.$this->getFile() .': <b>'.$this->getMessage().'</b>';\n }", "title": "" }, { "docid": "51e71f580b91426eff27a9a221c27d35", "score": "0.6203135", "text": "public function getErrorMessage()\n\t{\n\t\treturn $this->errorMessage; \n\n\t}", "title": "" }, { "docid": "2d1dc4f68037f7e65d915445248322e2", "score": "0.6198522", "text": "protected function createValidationErrorMessage() {}", "title": "" }, { "docid": "8d01c55f91810f9a3ce7f6286a829a31", "score": "0.61958337", "text": "public function last_error_message();", "title": "" }, { "docid": "71719a9a1ca6cdd8b97e47b11dcd58e9", "score": "0.61906916", "text": "public function getMessageError(){\r\n\t\treturn $this->_messagesError;\r\n\t}", "title": "" }, { "docid": "a52a34248c2c1c5a86295681177e73c4", "score": "0.6176371", "text": "public function getErrorMesssage() {\n if ($this->isError()) {\n return $this->error->getMessage();\n } else {\n return \"No error has occurred\";\n }\n }", "title": "" }, { "docid": "19b8cb4d8f4482db597afe1e48b74255", "score": "0.6168422", "text": "public function getErrorMessage()\n {\n $error = $this->hash['error'];\n\n // error messages for normal users.\n switch( $error ) {\n case UPLOAD_ERR_OK:\n return _(\"No Error\");\n case UPLOAD_ERR_INI_SIZE || UPLOAD_ERR_FORM_SIZE:\n return _(\"The upload file exceeds the limit.\");\n case UPLOAD_ERR_PARTIAL:\n return _(\"The uploaded file was only partially uploaded.\");\n case UPLOAD_ERR_NO_FILE:\n return _(\"No file was uploaded.\");\n case UPLOAD_ERR_CANT_WRITE:\n return _(\"Failed to write file to disk.\");\n case UPLOAD_ERR_EXTENSION:\n return _(\"A PHP extension stopped the file upload.\");\n default:\n return _(\"Unknown Error.\");\n }\n\n // built-in php error description\n switch( $error ) {\n case UPLOAD_ERR_OK:\n return _(\"There is no error, the file uploaded with success.\");\n case UPLOAD_ERR_INI_SIZE:\n return _(\"The uploaded file exceeds the upload_max_filesize directive in php.ini.\");\n case UPLOAD_ERR_FORM_SIZE:\n return _(\"The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.\");\n case UPLOAD_ERR_PARTIAL:\n return _(\"The uploaded file was only partially uploaded.\");\n case UPLOAD_ERR_NO_FILE:\n return _(\"No file was uploaded.\");\n case UPLOAD_ERR_NO_TMP_DIR:\n return _(\"Missing a temporary folder. Introduced in PHP 4.3.10 and PHP 5.0.3.\");\n case UPLOAD_ERR_CANT_WRITE:\n return _(\"Failed to write file to disk. Introduced in PHP 5.1.0.\");\n case UPLOAD_ERR_EXTENSION:\n return _(\"A PHP extension stopped the file upload. PHP does not provide a way to ascertain which extension caused the file upload to stop; examining the list of loaded extensions with phpinfo() may help. Introduced in PHP 5.2.0.\");\n default:\n return _(\"Unknown Error.\");\n }\n\n }", "title": "" }, { "docid": "5b378cce692a3227db080d29de3f76f4", "score": "0.6167612", "text": "public function message()\n {\n if(!$this->number) {\n return 'The :attribute must have at least 1 number';\n }\n if(!$this->specialCharacter) {\n return 'The :attribute must have at least 1 special character.';\n }\n }", "title": "" }, { "docid": "3d649dc19248af301b088360e11ca14b", "score": "0.6157347", "text": "public function message()\n {\n return 'The volunteer position have some invalid information.';\n }", "title": "" }, { "docid": "abdc01ecee02865dc0ee1f37e4546f89", "score": "0.6157241", "text": "public function getErrorMessage() {\n\t\treturn self::$requestErrorMessage;\n\t}", "title": "" }, { "docid": "1ec79b99eed90acf8608b36d8dd653e3", "score": "0.6149069", "text": "public function message()\n {\n return $this->errorMessage;\n }", "title": "" }, { "docid": "b0e50cc75a8087ebc9991860effde27a", "score": "0.61426234", "text": "public function message()\n {\n return $this->message ?: 'Missing required route parameter {' . $this->missing . '}.';\n }", "title": "" }, { "docid": "a205f264043590b71f272e2dfd501830", "score": "0.6137015", "text": "public function error() {\n\t\treturn $this->body['error'];\n\t}", "title": "" }, { "docid": "5a34ee8bc7e7952de656c48b9788bdf4", "score": "0.613532", "text": "function getErrorMessage(){\r\n\t\treturn $this->errorMessage;\r\n\t}", "title": "" }, { "docid": "5c583ec4a927f0e1dcd77d9b49411df5", "score": "0.61337876", "text": "private function getErrorMsg($expected, $actual) {\n return 'Error on line '.$this->lineNum.': Expected '.$expected.', got \"'.$actual.'\".';\n }", "title": "" }, { "docid": "333a51400267334e8d4159939ac53e76", "score": "0.6132941", "text": "public function error_info() {\n\t\treturn empty($this->error_info[2]) ? '' : $this->error_info[2];\n\t}", "title": "" }, { "docid": "06143aa17dabf2b6f507352112741cbc", "score": "0.61280733", "text": "function getErrorMessage(string $key, string $rule) :string{ \n return 'Message Non Définie.';\n }", "title": "" }, { "docid": "e4d5ab4bf9a1af7808c0b4d2322a46d4", "score": "0.61165506", "text": "public function getError(): string {\n if ($this->_error !== '') {\n return Output::getClean($this->_error);\n }\n\n if ($this->_response === null) {\n return '$this->_response is null';\n }\n\n return '';\n }", "title": "" }, { "docid": "1ddaf4254beee86e59a68997b6c0c0c0", "score": "0.61161405", "text": "public function error(string|array $message);", "title": "" }, { "docid": "6c45562598a99c81a024c863d5038952", "score": "0.61157274", "text": "function getErrorMessage($error, $object = '') {\n\n if (empty($object)) {\n $object = $this->getLink();\n }\n switch ($error) {\n case ERROR_NOT_FOUND :\n return sprintf(__('%1$s: %2$s'), $object, __('Unable to get item'));\n\n case ERROR_RIGHT :\n return sprintf(__('%1$s: %2$s'), $object, __('Authorization error'));\n\n case ERROR_COMPAT :\n return sprintf(__('%1$s: %2$s'), $object, __('Incompatible items'));\n\n case ERROR_ON_ACTION :\n return sprintf(__('%1$s: %2$s'), $object, __('Error on executing the action'));\n\n case ERROR_ALREADY_DEFINED :\n return sprintf(__('%1$s: %2$s'), $object, __('Item already defined'));\n }\n }", "title": "" }, { "docid": "47a439e5a579491a6da35383d2b92e88", "score": "0.61101294", "text": "private function errorMsgDetailed()\n\n\t{\n\n\t\t$message = \"<div class='errbox'>\";\n\n\t\t$message .= \"<pre style='color:red;'>\\n\\n\";\n\n\t\t//$message .= \"File: \".print_r( $this->errfile, true).\"\\n\";\n\n\t\t//$message .= \"Line: \".print_r( $this->errline, true).\"\\n\\n\";\n\n\t\t//$message .= \"Error Type: \".print_r( $this->errorNumbers[$this->errno], true).\"\\n\";\n\n\t\t//$message .= \"Message: \".print_r( $this->errstr, true).\"\\n\\n\";\n\n\t\t$message .= \"File: \". $this->errfile. \"\\n\";\n\n\t\t$message .= \"Line: \". $this->errline. \"\\n\\n\";\n\n\t\t$message .= \"Error Type: \". $this->errorNumbers[$this->errno]. \"\\n\";\n\n\t\t$message .= \"Message: \" .$this->errstr. \"\\n\\n\";\n\n\t\t$message .= \"</pre>\\n\";\n\n\t\t$message .= \"</div>\";\n\n\t\techo $message;\n\n\t}", "title": "" }, { "docid": "b2735dada6e5a448bca31dc8b26ab652", "score": "0.6105262", "text": "public function error($message);", "title": "" }, { "docid": "e3998de48e4ed8342d4cc242c743366e", "score": "0.609767", "text": "public function message(){\n return str_replace(\n\t\t\t[':delimiter', ':enclosure', ':line'], \n\t\t\t[$this->delimiter, $this->enclosure, $this->errorLine], \n\t\t\ttrans('validation.csvRFC4180'));\n }", "title": "" }, { "docid": "281624d0468e691285d97c940af7bdef", "score": "0.60963285", "text": "protected function msg() : string\n {\n // encapsulate and return error message\n return '<h2>Message</h2><p>'.$this->message.'</p>'; \n \n }", "title": "" } ]
633feccc75a8d25c36221eeca3a5c32e
Retrieve the shortcode tag
[ { "docid": "7631f8515d4019d501e7772ef2a4d35b", "score": "0.0", "text": "public function getTag()\n\t{\n\t\treturn 'spotify';\n\t}", "title": "" } ]
[ { "docid": "0a76c9ecd40d5e4bad487aebcb39bf21", "score": "0.82117313", "text": "public function get_tag() {\r\n\t\treturn (string) $this->shortcode_tag;\r\n\t}", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.7357414", "text": "public function getTag();", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.7357414", "text": "public function getTag();", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.7357414", "text": "public function getTag();", "title": "" }, { "docid": "7d92ace1c44eb0c6336759fd576c835d", "score": "0.7086531", "text": "protected function get_tag() {\n return $this->tag;\n }", "title": "" }, { "docid": "6c8682df385c057752498350af7c79cb", "score": "0.7031864", "text": "public function tag(): string;", "title": "" }, { "docid": "e997ed87ac6a0b61467c02c9053d94f5", "score": "0.7006486", "text": "public function getTag() : string\n {\n return $this->tag;\n }", "title": "" }, { "docid": "e355e38c5b735d1db801245ec0fc004e", "score": "0.69886005", "text": "public function tag() { return $this->_m_tag; }", "title": "" }, { "docid": "2e5f2eca4ae2aab55edd41c45ab072ad", "score": "0.6963585", "text": "public function getFullTag();", "title": "" }, { "docid": "580724b59ede65b9eb78b4577c0ef88d", "score": "0.6951463", "text": "function getTag() {\r\n\t\t\treturn $this->_metadata['tag'];\r\n\t\t}", "title": "" }, { "docid": "731d3125064ae3538b6b6162321b8eb9", "score": "0.6938625", "text": "public function getTag($tag);", "title": "" }, { "docid": "812a5892e933f6a25fa6523e94581157", "score": "0.6894099", "text": "function getShortcode(){ return $this->shortcode; }", "title": "" }, { "docid": "f88453ad728a9498e31212ccdd2da9eb", "score": "0.6886855", "text": "public function tag()\n\t{\n\t\treturn $this->tag;\n\t}", "title": "" }, { "docid": "13b409038b9af38f12e11a7e0097e549", "score": "0.68584716", "text": "public function getTag(){\n return $this->tag;\n }", "title": "" }, { "docid": "ccda06b7e58d9cd3dd000b20839bc867", "score": "0.67858255", "text": "public function getTag()\n {\n return $this->tag;\n }", "title": "" }, { "docid": "ccda06b7e58d9cd3dd000b20839bc867", "score": "0.67858255", "text": "public function getTag()\n {\n return $this->tag;\n }", "title": "" }, { "docid": "ccda06b7e58d9cd3dd000b20839bc867", "score": "0.67858255", "text": "public function getTag()\n {\n return $this->tag;\n }", "title": "" }, { "docid": "ccda06b7e58d9cd3dd000b20839bc867", "score": "0.67858255", "text": "public function getTag()\n {\n return $this->tag;\n }", "title": "" }, { "docid": "ccda06b7e58d9cd3dd000b20839bc867", "score": "0.67858255", "text": "public function getTag()\n {\n return $this->tag;\n }", "title": "" }, { "docid": "19a785e2cee873c38ab01246ed6fe22e", "score": "0.6745006", "text": "function shortcode () {\n\t\t\n\t\t$tag = 'h4';\n\t\t\n\t\t$title = '<' . $tag . '>' . $this->shortcode_title . '</' . $tag . '>' . \"\\n\";\n\t\t\n\t\t$shortcode = $title;\n\t\t\n\t\treturn $shortcode;\n\t\t\n\t}", "title": "" }, { "docid": "62870170b412d7eefdd5198e9f7845ae", "score": "0.67449284", "text": "public function getTag()\n {\n return $this->_tag;\n }", "title": "" }, { "docid": "03a1589b0e9edb4006c33f93e23c5593", "score": "0.6717739", "text": "public function getTAG()\n {\n return $this->_tag;\n }", "title": "" }, { "docid": "1a646dbab6710505c761d5a3d5f5192d", "score": "0.67066836", "text": "public function getTag() {\n return $this->tag;\n }", "title": "" }, { "docid": "877fd76d39da1eeb271bc2d305f38447", "score": "0.6698893", "text": "public function getTag()\n\t{\n\t\treturn $this->tag;\n\t}", "title": "" }, { "docid": "877fd76d39da1eeb271bc2d305f38447", "score": "0.6698893", "text": "public function getTag()\n\t{\n\t\treturn $this->tag;\n\t}", "title": "" }, { "docid": "e5b406acdf9624bf0dcdbd8759a271b5", "score": "0.6687173", "text": "public function getTag() {\n\t\treturn $this->tag;\n\t}", "title": "" }, { "docid": "b7fb091bd164a7fa6aed77faf1df4bf5", "score": "0.66863173", "text": "function getTag()\n\n {\n\n return \"div\";\n\n }", "title": "" }, { "docid": "3c9a4997d03224fac8796ebe02f34832", "score": "0.6636066", "text": "public function getShortcode();", "title": "" }, { "docid": "9f8326f35733293bf5b63b117742a8dd", "score": "0.65973574", "text": "public function getTag()\n {\n return $this->maybeTag;\n }", "title": "" }, { "docid": "280ebbaa4727c197e433dfb854a3ff87", "score": "0.65311944", "text": "public function getTag() {\n return $this->tag;\n }", "title": "" }, { "docid": "93fe420c9d9c445098c8402de673073b", "score": "0.6506928", "text": "public function getMetaTag();", "title": "" }, { "docid": "0a0b69426638a211b0cd744fd083e965", "score": "0.6493467", "text": "public function getShortCode();", "title": "" }, { "docid": "19156111ba3b5272fabeea88c33d4048", "score": "0.64887756", "text": "public function __getTag()\n{\n return $this ->tag;\n }", "title": "" }, { "docid": "2dc4b4fa0aee566666b19c424000d43d", "score": "0.64264923", "text": "public function getTag(): ?string\n {\n return $this->tag;\n }", "title": "" }, { "docid": "5306d6e7f41837122979934e6a38631f", "score": "0.6422095", "text": "function getTag($contents) {\n\t\treturn $this -> startTag . $contents . $this -> endTag;\n\t}", "title": "" }, { "docid": "f4b3b3c3a08eaac81326ac654d69de24", "score": "0.64117384", "text": "public function getTag()\n {\n return 'gimme';\n }", "title": "" }, { "docid": "66f9fbd6407740dd65f53a1a9c3e5787", "score": "0.6348906", "text": "function getTagName();", "title": "" }, { "docid": "ec643f28eaa998ca319e56507a10f464", "score": "0.62932396", "text": "public function getCurrentTag() {\r\n\t\t$tag = $this->request->param(\"Tag\");\r\n\t\tif($tag) {\r\n\t\t\treturn $this->dataRecord->Tags()\r\n\t\t\t\t->filter(\"URLSegment\", $tag)\r\n\t\t\t\t->first();\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "title": "" }, { "docid": "3574a82a9e5274770c0ac7f2a7006367", "score": "0.62322545", "text": "public function tag() : string\n {\n if(! $this->tag ) {\n $this->setTag($this->generateTag());\n }\n\n return $this->tag;\n }", "title": "" }, { "docid": "53985525fb74b0030d11e803d4f8a0aa", "score": "0.6182362", "text": "public function getTag()\n {\n return $this->functionName;\n }", "title": "" }, { "docid": "7478c84c0e7265f60800c1085efb30af", "score": "0.6174049", "text": "public function getSource()\r\n {\r\n return 'tag';\r\n }", "title": "" }, { "docid": "2921d0c9492e81fb9ad5c18eb53eb41f", "score": "0.61467266", "text": "public function getTagname() {\n return $this->tagname;\n }", "title": "" }, { "docid": "469d77a4970b93d34a62e3b654b0bf26", "score": "0.6146499", "text": "private function __doShortcodeTag( $m) {\n\n // allow [[foo]] syntax for escaping a tag\n if ( $m[1] == '[' && $m[6] == ']' ) {\n return substr($m[0], 1, -1);\n }\n\n $tag = $m[2];\n if(strpos($tag, '.') === false)\n return false;\n\n //-----------------------------\n // load plugin shortcodes class\n list($plugin, $action) = explode('.', $tag);\n $shortcodeClass = $plugin.'Shortcodes';\n $shortcodeFile = CakePlugin::path($plugin).'Shortcodes'.DS.$shortcodeClass.'.php';\n if(!file_exists($shortcodeFile)){\n return $m[0];\n }\n include_once $shortcodeFile;\n $shortcodeInstance = new $shortcodeClass();\n if(!method_exists($shortcodeInstance, $action)){\n return $m[0];\n }\n //-----------------------------\n\n $attr = $this->shortcodeParseAtts( $m[3] );\n\n if ( isset( $m[5] ) ) {\n // enclosing tag - extra parameter\n return $m[1] . call_user_func( array($shortcodeInstance, $action), $attr, $m[5], $tag, $this->__instance ) . $m[6];\n } else {\n // self-closing tag\n return $m[1] . call_user_func( array($shortcodeInstance, $action), $attr, null, $tag, $this->__instance ) . $m[6];\n }\n }", "title": "" }, { "docid": "36c07b807474bc464d430f56293c4016", "score": "0.6136659", "text": "public function getTag() {\n\t\treturn $this->extension->getName() . '_theme';\n\t}", "title": "" }, { "docid": "765521c0051987b82b2598dd19666065", "score": "0.6102807", "text": "public function shortcode(){\n return \"add your image and html here...\";\n }", "title": "" }, { "docid": "ec74a609d587bf7b0dda8dde46a0b9e8", "score": "0.6085458", "text": "public function get_cb( $tag ) {\n\n\t\t\tglobal $shortcode_tags;\n\n\t\t\tif ( ! isset( $shortcode_tags[ $tag ] ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\treturn $shortcode_tags[ $tag ];\n\n\t\t}", "title": "" }, { "docid": "0f0e89e17242466f3180f35f646e0c51", "score": "0.6056389", "text": "function gauli_shortcode($atts = [], $content = null, $tag = '')\n{\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n \n // override default attributes with user attributes\n $gauli_atts = shortcode_atts([\n 'id' => 'onta',\n ], $atts, $tag);\n \n\n $id=$gauli_atts['id'];\n //print \"<br>kambing <br>\";\n $coursename=get_course_name(\"$id\");\n print $coursename;\n //print \"<br>kambing <br>\";\n\n}", "title": "" }, { "docid": "25e520017e3699c34071c8a7f911d131", "score": "0.60269624", "text": "function getTag( $theIdentifier )\n\t{\n\t\tglobal $wrapper;\n\t\t\n\t\treturn $wrapper->getSerial( $theIdentifier, TRUE );\t\t\t\t\t\t\t// ==>\n\n\t}", "title": "" }, { "docid": "849e50541f7e29cceb5ba29c080a0efb", "score": "0.6002439", "text": "public function getTag($name) {\nreturn $this->_makeCall('tags/'.$name);\n}", "title": "" }, { "docid": "f6cea78ed9f9f96578db5f124440debc", "score": "0.5994134", "text": "public function getTagName() {\n return $this->tag;\n }", "title": "" }, { "docid": "d7e7627ddcea3b6115f5f9c9211f66b0", "score": "0.5981665", "text": "public static function shortcode( $atts, $content, $name );", "title": "" }, { "docid": "bcf1e90575f2769debd455f2fcabf99b", "score": "0.5953302", "text": "function getStartTag() {\n\t\treturn $this -> startTag;\n\t}", "title": "" }, { "docid": "1175b184860bc20436dc49f1b2f9a30b", "score": "0.59462935", "text": "public function getTag()\n\t{\n\t\treturn $this->select_tag;\n\t}", "title": "" }, { "docid": "323096ce4fe66d2ce3c66adcef9e4e3f", "score": "0.5922446", "text": "protected function getTagName ()\n\t{\n\t\tif ($this->getUrl()===null )//|| ($this->getCode() && $this->getParent()->getManager()->getCode() == $this->getCode()))\n\t\t\treturn 'span';\n\t\telse\n\t\t\treturn 'a';\n\t}", "title": "" }, { "docid": "03519f1018207cf14144a4ed47685fe3", "score": "0.590752", "text": "function get_tag_template($key)\n{\n return get_value('template', $key);\n}", "title": "" }, { "docid": "e5cfec5506caa3b895d48c88fcb1839b", "score": "0.58957255", "text": "private function _getTag($command)\n\t{\n\t\treturn $this->element[$command]['m'];\n\t}", "title": "" }, { "docid": "aa832d50f13a11a53ae7ffcf4e6df87c", "score": "0.5886773", "text": "public function get_token($tag) {\n\t\t$tag = trim($tag);\n\n if (substr($tag,0,2)=='[[') {\n $this->modx->log(xPDO::LOG_LEVEL_DEBUG,'Bloodline: nested tag detected '.$tag);\n return '';\n }\n // Get token\n\t\tpreg_match('/^[^@?:&`]+/i', $tag, $matches);\n\t\tif (!empty($matches)){\n\t\t\treturn trim($matches[0]);\n\t\t}\n $this->modx->log(xPDO::LOG_LEVEL_ERROR,'Bloodline: could not find valid token in tag '.$tag);\n return '';\n\t}", "title": "" }, { "docid": "57075a00cb4116e783ef0424d0fadc00", "score": "0.5885683", "text": "public function __get($tag) {\r\n\t\t\treturn self::$instance->$tag;\r\n\t\t}", "title": "" }, { "docid": "d283279b660519f9bc6f3def06d5a224", "score": "0.5882105", "text": "function pavi_video_category_edit_form_fields($taxonomy){\n $tag_id = $_GET['tag_ID'];\n ?>\n <tr>\n <th scope=\"row\" valign=\"top\"><label for=\"shortcode\"><?php _e('Shortcode','pressapps-video');?></label></th>\n <td>[video category=<?php echo $tag_id; ?>]</td>\n </tr>\n <?php\n}", "title": "" }, { "docid": "aa8f315016d8f953c7d34f19552d8b39", "score": "0.5879035", "text": "function shortcode( $atts ) {\n\t\t\techo static::get_wishlist_html();\n\t\t}", "title": "" }, { "docid": "47a7d0d92e8e92f175fc59195695d78e", "score": "0.58617735", "text": "function getTag($tag, $arg_list = array())\n {\n global $application;\n $value = null;\n $Category_Descr = &$application->getInstance('CCategoryInfo', $this->_CatID);\n switch ($tag)\n {\n \tcase 'Local_Items':\n \t\t$value = $this->getSubcategoriesList();\n \t\tbreak;\n\n \t default:\n \t list($entity, $tag) = getTagName($tag);\n \t if ($entity == 'category' && is_object($this->_Subcategory_Info))\n \t {\n \t $value = $this->_Subcategory_Info->getCategoryTagValue($tag);\n \t }\n \t\tbreak;\n }\n return $value;\n }", "title": "" }, { "docid": "cbb63185ae33b871db2eb7bdd189a2fe", "score": "0.58450127", "text": "public function GetName()\n\t{\n\t\treturn 'tag';\n\t}", "title": "" }, { "docid": "054e45f107ece5357e5133de5337b5a8", "score": "0.58365774", "text": "public function getCurrentTag()\n {\n if (count($this->tagStack) > 0)\n return $this->tagStack[count($this->tagStack) - 1];\n \n return null;\n }", "title": "" }, { "docid": "8270f4ab059db2331e72835b092510ba", "score": "0.583468", "text": "public function get_newsletter_tag() {\n\n\t\tif ( $newsletter_tag = $this->get_fm_field( 'newsletter_tags' ) ) {\n\t\t\treturn $newsletter_tag;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "93f32b67727556148085c4fe55aadc86", "score": "0.5833821", "text": "function pzdc_tag_name($echo = TRUE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('tag', 'name', $echo);\n}", "title": "" }, { "docid": "26b93db4432bd9360b1c37797ad9eaee", "score": "0.5827743", "text": "function getStartTag() \n\t{\n\t\treturn $this->start_tag;\n\t}", "title": "" }, { "docid": "0e6c0a94d44f8f480ff872cff1420b06", "score": "0.58225286", "text": "function getTagCodeValue($codeLine){\n $code = explode(\" \", trim($codeLine));\n return $code[0];\n}", "title": "" }, { "docid": "3dbf22f40799af631d47ab9d776145fc", "score": "0.58084655", "text": "public function name()\n\t{\n\t\treturn $this->tag->name;\n\t}", "title": "" }, { "docid": "9d9275d768b56e474d7cffd21452bb73", "score": "0.5789747", "text": "public function toString(): string\n {\n return 'is registered as shortcode';\n }", "title": "" }, { "docid": "4ed292fd8ed755b243d5064cf9237bbd", "score": "0.57829773", "text": "abstract protected function getElementTag();", "title": "" }, { "docid": "6d9bb0bbfc68839d33cf1bc1e9049897", "score": "0.5777027", "text": "public function shortcode_callback( $attr, $content = '' ) {\n\n \n wp_enqueue_style('GHPRT_CSS_CIRCLE', $this->plugin_url( 'css/circle.css' ) );\n wp_enqueue_style('GHPRT_CSS_PST', $this->plugin_url( 'css/practice_studio_timer.css' ) );\n\n wp_enqueue_script('GHPRT_HOWLER', $this->plugin_url( 'js/howler.min.js' ) );\n wp_enqueue_script('GHPRT_ICONIFY', $this->plugin_url( 'js/iconify.min.js' ) );\n wp_enqueue_script('GHPRT_PST', $this->plugin_url( 'js/guitar_practice_routine_timer.js' ) );\n wp_enqueue_script('GHPRT_METRONOME', $this->plugin_url( 'js/metronome.js' ) );\n \n $attr = shortcode_atts( array(\n\t\t\t'id' => '9mmBjRtJ'\n\t\t), $attr );\n\n if ( is_feed() )\n return '';\n\n $baseURL = $this->plugin_url();\n ob_start();\n include('guitar_practice_routine_tracker.phtml');\n //assign the file output to $content variable and clean buffer\n $content = ob_get_clean();\n return $content;\n }", "title": "" }, { "docid": "4e0cb7e7cdf3a75ed3e2fb55505ae4ae", "score": "0.5775531", "text": "function rioexp_select_shortcode() {\n ob_start();\n\n esc_html(rioexp_select_markup());\n\n return ob_get_clean();\n}", "title": "" }, { "docid": "31fbd21474960f88ca143917e5c55f48", "score": "0.57625484", "text": "public function shortcode( $atts, $content=null ) \n {\n \textract(shortcode_atts(array(\n\t\t\t'style' =>'default',\n \"bgcolor\"\t\t\t=>'',\n \"el_class\" \t\t=>''\n\t\t), $atts));\n\n\t\t$css_class = trim( $el_class );\n\t\t$inline = '';\n\n\t\tswitch ($style) {\n\t\t\tcase 'square':\n\t\t\t\t$cap_class = 'cap-square ';\n\t\t\t\tif (!empty($bgcolor))\n\t\t\t\t\t$inline = ' style=\"background_color:'.$bgcolor.';\"';\n\t\t\t\tbreak;\n\t\t\tcase 'circle':\n\t\t\t\t$cap_class = 'cap-circle ';\n\t\t\t\tif (!empty($bgcolor))\t\n\t\t\t\t\t$inline = ' style=\"background-color:'.$bgcolor.';\"';\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$cap_class = 'cap-default ';\n\t\t\t\t$inline = '';\n\t\t\t\tbreak;\n\t\t}\n\n \t// left trim $content\n\t\t$shortcoded_content = ltrim ( $content );\n\n\t\t// select first letter of shortcoded $content\n\t\t$first_letter_of_shortcoded_content = mb_substr( $shortcoded_content, 0, 1 );\n\n\t\t// select remaining letters of shortcoded content\n\t\t$remaining_letters_of_shortcoded_content = mb_substr( $shortcoded_content, 1 );\n\n\t\t// add <span class=\"wpsdc\"> to the first letter for shortcoded content\n\t\t$spanned_first_letter = '<span class=\"owlab-drop-cap '.$cap_class.$css_class.'\" '.$inline.'>' . $first_letter_of_shortcoded_content . '</span>';\n\n\t\t// return the spanned first letter and remaining letters\n\t\treturn $spanned_first_letter . $remaining_letters_of_shortcoded_content;\n\n }", "title": "" }, { "docid": "3c8d0c18e3729e879fc003517a463e81", "score": "0.5762224", "text": "public function get_tag()\n {\n return array(\n 'tag_title' => 'Encrypt',\n 'tag_description' => 'Store the contents of the tag as encrypted in the database.',\n 'tag_example' => '[encrypt]Text to encrypt[/encrypt]',\n 'tag_tag' => 'encrypt',\n 'tag_replace' => file_get_contents(get_file_base() . '/themes/default/templates_custom/COMCODE_ENCRYPT.tpl'),\n 'tag_parameters' => '',\n 'tag_block_tag' => 1,\n 'tag_textual_tag' => 1,\n 'tag_dangerous_tag' => 0,\n );\n }", "title": "" }, { "docid": "65c3526c97aec69e82f5730a2a53f41e", "score": "0.5760819", "text": "public function getStartContainerTag()\n {\n return $this->startTag ? $this->startTag: '';\n }", "title": "" }, { "docid": "7036f833c35ad0858cb2d5e64853ae77", "score": "0.57400614", "text": "function ods_shortcode( $ods_shortcode )\n{\n\n if ( shortcode_exists( $ods_shortcode ) ) {\n $pattern = get_shortcode_regex();\n preg_match( '/' . $pattern . '/s', get_the_content(), $matches );\n\n if ( !empty( $matches ) ) {\n if ( is_array( $matches ) && $matches[ 2 ] == $ods_shortcode ) {\n $shortcode = $matches[ 0 ];\n echo do_shortcode( $shortcode );\n }\n }\n\n }\n\n}", "title": "" }, { "docid": "081f9d3b5b1410dc084161381efb6dd7", "score": "0.5730255", "text": "public function getTag()\n {\n return 'minifyhtml';\n }", "title": "" }, { "docid": "7163b13a97f5d5157c0727e6a62f9f9e", "score": "0.5727678", "text": "function the_tag( $echo = true ) {\r\n\t$tag = htmlentities(stripslashes($GLOBALS['nr_tag']));\r\n\tif ( $echo )\r\n\t\techo $tag;\r\n\treturn $tag;\r\n}", "title": "" }, { "docid": "7e049d4a2448ec647e5c8478ef8e7a1c", "score": "0.57239693", "text": "public function tag()\n {\n $myservice = \\Drupal::service('blindd8.default');\n $tagline = $myservice->getTagline();\n\n // Send it forth!\n $output = array(\n '#markup' => $this->t('Hey, this is @tagline', array('@tagline' => $tagline)),\n );\n return $output;\n }", "title": "" }, { "docid": "c7a2a8eedd0714b4be4cb9e27b8761c3", "score": "0.5722307", "text": "function getTag(): string\n\t{\n\t\treturn $this->username.\"#\".$this->discriminator;\n\t}", "title": "" }, { "docid": "1ca621d74d8bb317e58c1ff54c21631c", "score": "0.5720395", "text": "public function getChannelTag()\n {\n return $this->channel_tag;\n }", "title": "" }, { "docid": "82dc1af0a8a974224e6387ab2173992e", "score": "0.57180965", "text": "public function __toString()\n\t{\n\t\treturn $this->tag;\n\t}", "title": "" }, { "docid": "3956358f0ca32b9c8144502323fcba17", "score": "0.57172704", "text": "abstract public function tag();", "title": "" }, { "docid": "082f09abef84dd79d7d3fc0137d66175", "score": "0.56998265", "text": "public static function shortcode( $atts ) {\n\t\t$atts = parent::get_attributes( $atts );\n\n\t\t$output = '';\n\t\t// Show teaser for Premium only shortcode in Template editor.\n\t\tif ( $atts['is_template_editor_preview'] ) {\n\t\t\t$output = '<div class=\"wprm-template-editor-premium-only\">Custom Fields are only available in the <a href=\"https://bootstrapped.ventures/wp-recipe-maker/get-the-plugin/\">WP Recipe Maker Pro Bundle</a>.</div>';\n\t\t}\n\n\t\t$recipe = WPRM_Template_Shortcodes::get_recipe( $atts['id'] );\n\n\t\treturn apply_filters( parent::get_hook(), $output, $atts, $recipe );\n\t}", "title": "" }, { "docid": "25fdf4afe0bf538eef616bd8e6840f21", "score": "0.5692573", "text": "function signature( $atts, $content = null ) {\r\n\r\n\t// Handling default attributes\r\n\t$a = shortcode_atts( array(\r\n \t'text' \t\t=> 'This is a shortcode !',\r\n\t\t'before'\t=> '<h3>',\r\n\t\t'after'\t\t=> '</h3>',\r\n\t), $atts );\r\n\r\n\t// Returning the result with allowed nesting\r\n\treturn $a['before']. '' .$a['text']. '' . do_shortcode($content) . '' .$a['after'];\r\n\r\n}", "title": "" }, { "docid": "6117c820b63d686a963a782472735e46", "score": "0.5688411", "text": "protected function registerTag(): string\n {\n return 'version';\n }", "title": "" }, { "docid": "8523d41a44b96a8f37d5bff6e99a21d8", "score": "0.5680369", "text": "function homepage_cat_shortcode( $atts ) {\n\n$a = shortcode_atts( array(\n\n'image_id' => 'Image',\n\n'text_heading' => 'Default Text HEading'\n\n\n\n), $atts );\n\n/* Visual Composer will return an image ID when you use image blocks. One approach to getting the URL for the image using the image ID is querying the database for a matching image ID. This will return an image object, so we’ll be able to work with it easily */\n\n$raw_image = new WP_Query( array( 'post_type' => 'attachment', 'attachment_id' => $a['image_id'] ));\n\n/* Let’s get the URL from that image */\n\n$image_url = $raw_image->posts[0]->guid;\n\n/* This is going to be our output */\n\nreturn '\n\n<h2 class=\"home_header\">' . $a['text_heading'] . '</h2>\n\n<img src=\"' . $image_url .'\">\n\n';\n\n}", "title": "" }, { "docid": "91800b636bd538cea7784427f04856df", "score": "0.5671411", "text": "public function getImageTagTagId() {\n\t\treturn ($this->imageTagTagId);\n\t}", "title": "" }, { "docid": "6bfce4455a74efd89a82318d60c83641", "score": "0.5671298", "text": "function pzdc_tag_link($echo = TRUE) {\n global $PraizedCommunity;\n if ( $tag = pzdc_tag_name(FALSE) ) {\n $out = $PraizedCommunity->link_helper(\"/category/$tag\", 'merchant');\n if ( $echo )\n echo $out;\n }\n return $out;\n}", "title": "" }, { "docid": "14d47eac3b7af9a8e307a31ea4ddf4a7", "score": "0.562588", "text": "function prh_hey( $atts ){\n $ar = shortcode_atts( array(\n 'name' => 'whatsyourname',\n ), $atts );\n\n return \"<p>Hey \".$ar['name'].\"!</p>\";\n}", "title": "" }, { "docid": "107ff699c83f6e38637d8370a25e2f60", "score": "0.56232715", "text": "public function getTagId()\r\n\r\n\t{\r\n\r\n\t\treturn $this->tagId;\r\n\r\n \t}", "title": "" }, { "docid": "93164574240970c0899e45f527e8a9ca", "score": "0.5619647", "text": "public function getTagType() { return $this->tagType; }", "title": "" }, { "docid": "620f044894c9ecec03cf7620ff6cf179", "score": "0.56146306", "text": "public function getTags()\n {\n return $this->crawleList('.main-content-container .row .col-md-12 > .well a');\n }", "title": "" }, { "docid": "4a03b6e338c800646889c7b8c3d8ea8c", "score": "0.5614045", "text": "function html5_shortcode_demo($atts, $content = null)\n{\n return '<div class=\"shortcode-demo\">' . do_shortcode($content) . '</div>'; // do_shortcode allows for nested Shortcodes\n}", "title": "" }, { "docid": "2c272cfc22161d42138409baf0c74030", "score": "0.56132376", "text": "function get_tag( $xml ) {\r\n\r\n $tag_regex = '/<ul class=\"ajaxGrab\"[^>]*>(.*?)<\\\\/ul>/si';\r\n // Grab div tag and its contents with the class name ajaxGrab\r\n\r\n preg_match($tag_regex,\r\n $xml,\r\n $matches);\r\n return $matches[1];\r\n }", "title": "" }, { "docid": "80eae622749bbcc773623aae3167baf3", "score": "0.5612786", "text": "public function getConsumerTag(): ?string;", "title": "" }, { "docid": "b654bbd7225519a9f7a9bbe18df97370", "score": "0.56122005", "text": "function saasland_get_html_tag( $tag = 'blockquote', $content = '' ) {\n $dom = new DOMDocument();\n $dom->loadHTML( $content );\n $divs = $dom->getElementsByTagName( $tag );\n $i = 0;\n foreach ( $divs as $div ) {\n if ( $i == 1 ) {\n break;\n }\n echo \"<p>{$div->nodeValue}</p>\";\n ++$i;\n }\n}", "title": "" }, { "docid": "78e1265ee1e349e56c1073ca1cf163ac", "score": "0.5610476", "text": "function add_shortcode( $atts, $content, $name ) {\n\t\tif ( ! $this->validate_shortcode( $atts, $content, $name ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$options = $this->set_options( $atts );\n\n\t\t$content = do_shortcode( $content );\n\t\t$content = oxygen_vsb_filter_shortcode_content_decode($content);\n\n\t\tob_start();\n\n\t\t$editable_attribute = $content;\n\t\tif( class_exists( 'Oxygen_Gutenberg' ) ) $editable_attribute = Oxygen_Gutenberg::decorate_attribute( $options, $editable_attribute, 'string' );\n\n\t\techo \"<\".esc_attr($options['tag']).\" id=\\\"\".esc_attr($options['selector']).\"\\\" class=\\\"\".esc_attr($options['classes']).\"\\\"\";do_action(\"oxygen_vsb_component_attr\", $options, $this->options['tag']); echo \">\" . $editable_attribute . \"</\".esc_attr($options['tag']).\">\";\n\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "44e3a2e190e8d77fb0681fe5adb79a2f", "score": "0.5608824", "text": "public function getTag($id) {\n\n return $this->tagMapper->getTag($id);\n\n }", "title": "" }, { "docid": "5c3286e8a4eb33870913f331a4d1c014", "score": "0.5601422", "text": "public function startTag(): ?string\n {\n return $this->renderStartTag();\n }", "title": "" }, { "docid": "153b9f4d4f482cf666fc3d3566db22c3", "score": "0.55947894", "text": "function displaySearchedTag($tag){\r\n\t\treturn $this->tag = $tag;\r\n\t}", "title": "" } ]
5d1c185f41cbddaa001c5abdfea12982
function to delete an paint entry
[ { "docid": "b31f6740e4739d5a2421e7765a1e1d30", "score": "0.69399256", "text": "function delete_paint_entry_byId($id)\n {\n $query_string = \"DELETE FROM paint WHERE id = '$id ' \";\n $query_result = $this->db->query( $query_string );\n \n return ( 1 == $this->db->affected_rows ); //returns true if delete was successful\n }", "title": "" } ]
[ { "docid": "888040cfbda4a6d737a74163c1c1f562", "score": "0.6115717", "text": "public function destroy(Entry $entry)\n {\n //\n }", "title": "" }, { "docid": "618202104b51d6482f507bdfd162a5de", "score": "0.59132594", "text": "function deleteEntry($entryid) {\n mysql_query(\"DELETE FROM entryinfo WHERE entryid = '\". $entryid .\"';\");\n }", "title": "" }, { "docid": "2142ceba1aa414dc121030b0c5adf1e9", "score": "0.5856654", "text": "public static function deleteold(array $entry) {\n db_delete('simple_popup_blocks')\n ->condition('pid', $entry['pid'])\n ->execute();\n }", "title": "" }, { "docid": "9cb5e9bbb681b955be9ae318ec3f348a", "score": "0.57299066", "text": "public function erase()\n {\n if ($this->permiButton != null) {\n $this->permiButton->destroy();\n }\n\n if ($this->deleteButton != null) {\n $this->deleteButton->destroy();\n }\n\n if ($this->plistButton != null) {\n $this->plistButton->destroy();\n }\n\n $this->permiButton = null;\n $this->plistButton = null;\n $this->deleteButton = null;\n $this->destroyComponents();\n \\ManiaLive\\Gui\\ActionHandler::getInstance()->deleteAction($this->action_deleteGroupf);\n \\ManiaLive\\Gui\\ActionHandler::getInstance()->deleteAction($this->action_deleteGroup);\n\n parent::destroy();\n }", "title": "" }, { "docid": "a46ff5946fe4c1fc05c3bde1fc900c3f", "score": "0.56952906", "text": "public function delEntry($params);", "title": "" }, { "docid": "139dd9206bf62729b6334f919349e945", "score": "0.568238", "text": "public function deleted(Font $font)\n {\n //\n }", "title": "" }, { "docid": "cb5262eeae8fb0b4dc31db1f8c689127", "score": "0.56634295", "text": "function destory();", "title": "" }, { "docid": "a2cc11c83e3545f27717ee97bf642142", "score": "0.5653193", "text": "public function destroy(Entry $entry)\n {\n $entry->delete();\n }", "title": "" }, { "docid": "a10db6dbc2d6eb55ca9e2612f845160a", "score": "0.55825084", "text": "public function delete(MailAuth_Entry $entry)\n {\n $state = $this->db->prepare(\n \"DELETE FROM `mailmap` WHERE `mail` = :mail OR `hashkey` = :hashkey\");\n $state->execute(array(\n 'mail' => $entry->mail(),\n 'hashkey' => $entry->key(),\n ));\n }", "title": "" }, { "docid": "503d00abeaff363b6561d880e0e553a2", "score": "0.5578241", "text": "function deleteClothes(){\n\t\t\t\t \n\t\t\t }", "title": "" }, { "docid": "2b0bc529a8b221767ef97456bbf8a069", "score": "0.55466926", "text": "public function erase()\n {\n ActionHandler::getInstance()->deleteAction($this->deleteAction);\n $this->frame->clearComponents();\n $this->frame->destroy();\n $this->addButton->destroy();\n $this->deleteButton->destroy();\n\n $this->destroyComponents();\n\n $this->destroy();\n parent::destroy();\n }", "title": "" }, { "docid": "8948e94078f0e975318f336fb82fa46e", "score": "0.553972", "text": "public function deleteTex()\n {\n file_exists($this->filename) && unlink($this->filename);\n }", "title": "" }, { "docid": "b9c5718dc16d22e2fc2943873c912c4c", "score": "0.5535503", "text": "abstract public function delEdge( $theIdentifier );", "title": "" }, { "docid": "77ed257f179ebfbe7c03889115d9c5dc", "score": "0.5452958", "text": "public function erase()\n {\n $this->moreButton->destroy();\n $this->destroyComponents();\n parent::destroy();\n }", "title": "" }, { "docid": "16ecc822540151d31970fc25b71e553a", "score": "0.5418747", "text": "function delete_set( $design_set , $option_row )\n\t{\n\t\n\t\t$theme_design_data = get_dwh_option( $design_set );\n\t\t$theme_design_styles = $theme_design_data['design_styles'];\n\t\t$theme_design_styles_new = array();\n\t\tif( $theme_design_styles[$option_row] ) unset( $theme_design_styles[$option_row] );\n\n\t\tforeach ($theme_design_styles as $key => $value) {\n\t\t\t$theme_design_styles_new[] = $value;\n\t\t}\n\t\t$theme_design_data['design_styles'] = $theme_design_styles_new;\n\t\t$theme_design_data = $theme_design_data;\n\t\treturn update_option( $design_set , $theme_design_data );\n\n\t}", "title": "" }, { "docid": "dca412d0f75ad8c23cb60b746a1eaa57", "score": "0.5397766", "text": "public function destroy(RadiologySectionEntry $radiologySectionEntry)\n {\n //\n }", "title": "" }, { "docid": "db423b4cd57ede3f747d9806ea09bc70", "score": "0.5397383", "text": "function clear ($entry)\n {\n unset ($this->_data[$entry]);\n $this->_write ();\n }", "title": "" }, { "docid": "1045eb49b832f653ef2be91a9e7f91d8", "score": "0.5375947", "text": "function deletePaste($pasteid)\n{\n // Delete the paste itself\n unlink(dataid2path($pasteid).$pasteid);\n\n \n}", "title": "" }, { "docid": "99181a81a3325af7cb2c4c5c61491fc2", "score": "0.53408146", "text": "function timeentryDelete($timeentry_id){\r\n\t\t$method='time_entry.delete';\r\n\t\t$tags=array(\r\n\t\t\t'time_entry_id'=>$timeentry_id\r\n\t\t);\r\n\t\t$response=$this->prepare_xml($method,$tags);\r\n\t\t$obj=$this->xml_obj($response);\r\n\t\treturn $obj;\r\n\t}", "title": "" }, { "docid": "239287136ce040f884fbfd3b2381ffdb", "score": "0.5329607", "text": "function delete()\n {\n }", "title": "" }, { "docid": "239287136ce040f884fbfd3b2381ffdb", "score": "0.5329607", "text": "function delete()\n {\n }", "title": "" }, { "docid": "239287136ce040f884fbfd3b2381ffdb", "score": "0.5329607", "text": "function delete()\n {\n }", "title": "" }, { "docid": "239287136ce040f884fbfd3b2381ffdb", "score": "0.5329607", "text": "function delete()\n {\n }", "title": "" }, { "docid": "6903936ab1c9d557989339b7518dd957", "score": "0.53037643", "text": "public function erase()\n {\n $this->button->destroy();\n $this->frame->destroyComponents();\n $this->frame->destroy();\n $this->destroyComponents();\n parent::destroy();\n }", "title": "" }, { "docid": "0cb7b92277e5f0a0e892d35afd2849e6", "score": "0.5293428", "text": "public function deleteById($entry_id)\n {\n $table = $this->_getTable();\n $table->delete('id=' . $entry_id);\n }", "title": "" }, { "docid": "05c398f3ee79009d13084e916c5a5bbe", "score": "0.5274966", "text": "function Deletetour_highlight($id){\n $query = \"delete from tour_highlight where id = $id\";\n $result = mysql_query($query);\n if($result){\n return 1;\n }else{\n die(\"error in mysql query\" . mysql_error());\n }\n }", "title": "" }, { "docid": "8e9c3b2f36129cb5ad599c59f770f66a", "score": "0.526017", "text": "public function postDelete(Model $model, $entry) {\n\n }", "title": "" }, { "docid": "e1ce7e1fe4a60251969da0693e27df00", "score": "0.5255329", "text": "public static function delete_entry( $entry_id ) {\n\t\t\tglobal $wpdb;\n\t\t\tif ( $entry_id != '' ) {\n\t\t\t\t$wpdb->delete( TFB_ENTRY_TABLE, array( 'entry_id' => $entry_id ), array( '%d' ) );\n\t\t\t\tdie( 'success' );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e5f205e4143448796422b3daf4af2f17", "score": "0.52097964", "text": "function delete(){\n }", "title": "" }, { "docid": "7554d7098f62b1e839e2672a4fa6f9f4", "score": "0.52067536", "text": "public function deleteSize()\n\t{\n\t$id=$this->uri->segment(3);\n\t$this->AdminModel->deleteSize($id);\n\t$this->load->getSizechart();\n\t}", "title": "" }, { "docid": "263eb10fe1f67f2c605d7c0359c59ee4", "score": "0.5186548", "text": "public function deleteFont($font){\n $font->delete();\n }", "title": "" }, { "docid": "732081b5f19a18d8ccd61380b84f3d0c", "score": "0.51655495", "text": "public function preDelete(Model $model, $entry) {\n\n }", "title": "" }, { "docid": "a95abbd5867189694b09571a70388cdd", "score": "0.5165483", "text": "public function delete_entry_record($entry_id) {\n\n if($cal_events = $this->dbc-> get_calevent_reportfield_id($entry_id))\n {\n $event\t=\t$this->dbc->get_calendar_events($entry_id, $cal_events->reportfield_id);\n\n if (!empty($event))\t{\n foreach($event as $ev) {\n $this->dbc->delete_event_entry($ev->id);\n }\n }\n // call to the parent delete_entry_record to delete an entry record\n return parent::delete_entry_record($entry_id);\n }\n return 0;\n }", "title": "" }, { "docid": "36bbc8997455cc20ce238d3bf1b4c1a3", "score": "0.51638424", "text": "public function testNewClearDrawingLayer()\n {\n $link = $this->webDriver->findElement(WebDriverBy::linkText('Drawings'));\n $link->click();\n $this->webDriver->findElement(WebDriverBy::xpath(\"//button[text()='Add a drawing']\"))->click();\n sleep(3);\n\n $layer_id = 3;\n $this->_setLayerContent($layer_id);\n\n $this->assertEquals($this->title->getAttribute('value'), 'My Layer');\n $this->assertEquals($this->data->getAttribute('value'), 'POLYGON((-70 63,-70 48,-106 48,-106 63,-70 63))');\n $this->assertEquals($this->color->getAttribute('value'), '10 10 10');\n $this->assertTrue($this->border->isSelected());\n $this->assertTrue($this->hatch->isSelected());\n\n $this->webDriver->findElements(WebDriverBy::xpath(\"//div[@id='fieldSetsWKT']//button[text()='Clear']\"))[$layer_id]->click();\n\n $this->assertEquals($this->title->getAttribute('value'), '');\n $this->assertEquals($this->data->getAttribute('value'), '');\n $this->assertEquals($this->color->getAttribute('value'), '150 150 150');\n $this->assertFalse($this->border->isSelected());\n $this->assertFalse($this->hatch->isSelected());\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.51484233", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.51484233", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.51484233", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.51484233", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.51484233", "text": "public function remove();", "title": "" }, { "docid": "a9c1950299bcff808f6d01b28c04fbbf", "score": "0.51404357", "text": "public function delete_single_area_data()\n {\n $data_id = $_REQUEST['data_id'];\n $this->home->delsinglearea($data_id);\n }", "title": "" }, { "docid": "32274e94af0f517eb2a357d9b2f8bc41", "score": "0.512054", "text": "function delete_entry($entry_id) {\n include('dbconnect.php');\n \n $sql = 'DELETE FROM entries WHERE id = ?';\n \n try {\n $results = $db->prepare($sql);\n $results->bindValue(1,$entry_id,PDO::PARAM_INT);\n $results->execute();\n // activate use of foreign key constraints\n $db->exec( 'PRAGMA foreign_keys = ON;' );\n } catch (Exception $e) {\n echo $e->getMessage();\n return false;\n }\n return $results->fetch();\n}", "title": "" }, { "docid": "68e4a1acba6b1fbee6b147432cdfeb30", "score": "0.5091295", "text": "function deleteRectangle($id) {\n $sql = \"DELETE FROM \". DBNAME . '.' . 'rectangles' . ' WHERE ' . 'id=' . $id . ';' ;\n $this->dao->fetch($sql);\n }", "title": "" }, { "docid": "507ab2cdc286896d447fb737727dac1a", "score": "0.50835687", "text": "function\n delete()\n {\n db_delete(\"printer\", $this->id);\n $this->clear();\n }", "title": "" }, { "docid": "e6fec84cf74d5e4e7c18104b3436d960", "score": "0.5078639", "text": "public function delete()\n {\n // Look for link rel=\"edit\" in the entry object.\n $deleteUri = $this->link('edit');\n if (!$deleteUri) {\n throw new Horde_Feed_Exception('Cannot delete entry; no link rel=\"edit\" is present.');\n }\n\n // DELETE\n do {\n $response = $this->_httpClient->delete($deleteUri);\n switch ((int)$response->code / 100) {\n // Success\n case 2:\n return true;\n\n // Redirect\n case 3:\n $deleteUri = $response->getHeader('Location');\n continue;\n\n // Error\n default:\n throw new Horde_Feed_Exception('Expected response code 2xx, got ' . $response->code);\n }\n } while (true);\n }", "title": "" }, { "docid": "a8a3c05f90ee78796c0f0df973b53fa9", "score": "0.50726604", "text": "public function delete_link_put(){}", "title": "" }, { "docid": "407fd1098f0de34018a28db127bd88a5", "score": "0.5067491", "text": "function delete()\r\n {\r\n require_once('region.class.php');\r\n require_once('snippet.class.php');\r\n $tbl = new Region;\r\n $tbl->delete_all('where grid_id=?', array($this->id()));\r\n $tbl = new Snippet;\r\n $tbl->delete_all('where snippet_key like \\'grid_%\\' and snippet_seq=? and is_internal', array($this->id()));\r\n @unlink($this->path());\r\n @unlink($this->path(true));\r\n parent::delete();\r\n }", "title": "" }, { "docid": "b148416ebd11fea19ad424ceaebd3308", "score": "0.506701", "text": "function destroy() {\n global $db;\n\n $raceentryid = $this->param('raceentryid');\n\n //TODO: Query to DELETE a race entry record here:\n //\n $query = <<<_DESTROY_RACE_ENTRY_QUERY\n\n // Your SQL query here.\n\n_DESTROY_RACE_ENTRY_QUERY;\n //\n //END TODO\n\n // Run the SQL query:\n //\n $result = $db->query($query);\n\n $output = \"\";\n\n if($result) {\n $output .= \"Delete Success\";\n }\n else {\n $output .= \"Delete Failed\";\n }\n\n $output .= \"<br><a href=\\\"{$this->path()}\\\">Back to race listing</a>\";\n\n $this->view->render(\"Delete TRA Entry\",$output);\n }", "title": "" }, { "docid": "e74051543ae10dc9d0f06e953c90c116", "score": "0.5066772", "text": "function dbDeleteHours($HID)\n{\n return dbRemoveEntry(\"hourCounting\", 'HID', $HID);\n}", "title": "" }, { "docid": "76c7f4208e3b0cc5f3870a4044bed5ba", "score": "0.50615424", "text": "public function delete_entry($where,$table)\n {\n $this->db->where($where);\n $this->db->delete($table);\n }", "title": "" }, { "docid": "77f0c0bf1bbc5e4a32b171dec18f4dfb", "score": "0.5052353", "text": "function deleteItem(){\n\t}", "title": "" }, { "docid": "687147f4469b466ff5408db6dd411ee9", "score": "0.50507027", "text": "function delete_thumb_cli($primary_key)\n\t{\n\t$image = $this->db->get_where('clientes', array('id_cli_beh'=>$primary_key), 1)->row_array();\n\tif\n\t(\n\tunlink($your_path.'assets/uploads/files/Clientes/'.$image['img_cli_beh'])\t\n\t//echo 'assets/uploads/files/Usuarios/'.$image['name']\n\t)\n{\n\treturn true;\n}\t\nelse{\n\treturn false;\n}\t\n\t }", "title": "" }, { "docid": "9fc91868894d9284c7b40304098c3eac", "score": "0.5045639", "text": "public function kapee_delete_attribute_swatch_size($attribute_id){\n\t\t\t$prefix = $this->prefix; // Taking metabox prefix\n\t\t\t$attribute_id = (int)$attribute_id;\n\t\t\tdelete_option( $prefix.'pa_' . $attribute_id .'_swatch_display_size');\t\t\n\t\t\tdelete_option( $prefix.'pa_' . $attribute_id .'_enable_swatch');\t\t\n\t\t\tdelete_option( $prefix.'pa_' . $attribute_id .'_swatch_display_style');\t\t\n\t\t\tdelete_option( $prefix.'pa_' . $attribute_id .'_swatch_display_type');\t\t\n\t\t}", "title": "" }, { "docid": "8946214e11707e136660f02014a766c5", "score": "0.5044768", "text": "public function destroy($id)\n {\n $artguideline = Artguideline::find($id);\n $artguideline->delete();\n }", "title": "" }, { "docid": "b1e80bb58d6402e1d6e254ddaeb8f066", "score": "0.5035741", "text": "function delete() {\n\t \t\n\t \t$sql = \"DELETE FROM evs_database.evs_grade_history\n\t \t\t\tWHERE ghr_id=?\";\n\t \t$this->db->query($sql, array($this->ghr_id));\n\t\t\n\t }", "title": "" }, { "docid": "769647cc8361a627a515946b29f0b19b", "score": "0.50276387", "text": "function deleteEntry(&$request, $rowId) {\n\t\t$divisionDao =& DAORegistry::getDAO('DivisionDAO');\n\t\t$press =& $this->getPress();\n\t\t$divisionDao->deleteById($rowId['title'], $press->getId());\n\t\treturn true;\n\t}", "title": "" }, { "docid": "24fe4178cad8f5ade664193a38ce09ed", "score": "0.50249916", "text": "public function destroy(Marks $mark)\n {\n //\n }", "title": "" }, { "docid": "3ded8101e389b42cc8ff22cd704ba7e9", "score": "0.5018696", "text": "public function delete()\n {\n $this->foods()->detach();\n parent::delete();\n }", "title": "" }, { "docid": "bda4a7e74dd1a78e9eb2982b0cfc4d96", "score": "0.50172323", "text": "public function deleteElement(OpenDocument_Element $element) {\n\t\t$this->cursor->removeChild($element->getNode());\n\t\tunset($element);\n\t}", "title": "" }, { "docid": "1ff5345e6117936a376f916c0ab0da88", "score": "0.5004994", "text": "public function delete()\n {\n $this->destroyImage();\n return parent::delete();\n }", "title": "" }, { "docid": "019a672a77006f82bd36c55b907f1b88", "score": "0.5002973", "text": "public function delete(){\n try{\n unlink(self::getImageParentFolderPath().$this->path);\n }catch (\\Exception $exception){\n //log\n }\n\n parent::delete();\n }", "title": "" }, { "docid": "f11602475bbf8a8c3a2505875639f27f", "score": "0.50028676", "text": "protected function deleteControl($name) {\n\t\t$this->panel->deleteControl ($name);\n\t}", "title": "" }, { "docid": "07ae8bd1255ad9b74d0a11cccef9b0a1", "score": "0.5000162", "text": "public static function deleteEntry() {\n $result = array();\n $deleted = lC_Whos_online_Admin::delete($_GET['sid']);\n if ($deleted) {\n $result['rpcStatus'] = RPC_STATUS_SUCCESS;\n }\n\n echo json_encode($result);\n }", "title": "" }, { "docid": "9dad1ed4fbf59dd1272d6ef2f05dffd8", "score": "0.4987538", "text": "function list_delete($label, $look) {\n\n return array(\"label\" => $label, \"style\" => $look);\n}", "title": "" }, { "docid": "4c462531d262e1883919b81180e3c379", "score": "0.49764025", "text": "public function destroy(Tile $tile)\n {\n //\n }", "title": "" }, { "docid": "3b18dea192cb938d0cd24a4f3ce875cf", "score": "0.49697334", "text": "public function forceDeleted(Font $font)\n {\n //\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.49633306", "text": "public function delete();", "title": "" }, { "docid": "fed3aed690ca482efe229100f4dcb1ba", "score": "0.49580595", "text": "function delete_artist_entry_byId($id)\n {\n $query_string = \"DELETE FROM artist WHERE id = '$id ' \";\n $query_result = $this->db->query( $query_string );\n \n return ( 1 == $this->db->affected_rows ); //returns true if delete was successful\n }", "title": "" }, { "docid": "2635ac2d42751300ee8f2fb6fea81a8e", "score": "0.49569845", "text": "public function onInstanceDelete();", "title": "" }, { "docid": "b1728a234da8779caf5a77693aafa6d3", "score": "0.49536496", "text": "public function deleteFormEntry($form_id, $set_id){\r\n \t\t\r\n \t\tif (empty($form_id) || !is_numeric($form_id))\r\n\t \t\tsetErrMsg($this->file_name.\" Line : \".__LINE__.\" <br /> Method: \".__METHOD__.\" <br /> Msg: form id is empty\");\r\n\t \t\t\r\n\t \tif (empty($set_id) || !is_numeric($set_id))\r\n\t \t\tsetErrMsg($this->file_name.\" Line : \".__LINE__.\" <br /> Method: \".__METHOD__.\" <br /> Msg: set id is empty\");\r\n\r\n\t \t\t\r\n\t \t$sql = \" UPDATE \";\r\n\t\t$sql .= \" form_entry_tab \";\r\n\t\t$sql .= \" SET \";\r\n\t\t$sql .= \" display_flg = '0', \";\r\n\t\t$sql .= \" delete_flg = '1', \";\r\n\t\t$sql .= \" WHERE \";\r\n\t\t$sql .= \" form_id='\".$form_id.\"' \";\r\n\t\t$sql .= \" AND \";\r\n\t\t$sql .= \" set_id = '\".$set_id.\"'\";\r\n\t\t\r\n\t\t$this->DB->refer($sql);\r\n\t\t\r\n \t}", "title": "" }, { "docid": "ea6c8018062f9bc64c51295dfe0acc6b", "score": "0.4949818", "text": "function _wsmc_image_delete($id) {\n\tnode_delete($id);\n \treturn 'delete';\n}", "title": "" }, { "docid": "40a68801b73e247ab139de143c591a4f", "score": "0.49467704", "text": "public function destroy(DetailPenjualanSparepart $detailPenjualanSparepart)\n {\n //\n }", "title": "" }, { "docid": "7cf9f0fd1d98993c5dc761f21d7b2107", "score": "0.49455082", "text": "public function onRemove( )\r\n {\r\n }", "title": "" }, { "docid": "7f2661d214c247a52ed28030b0c8dd96", "score": "0.4933516", "text": "function delete() {\n\t\t$cids = JRequest::getVar('cid', array(0), 'post', 'array');\n\t\t$destpath = JPATH_ROOT . '/' . 'components' . '/' . 'com_templateck' . '/' . 'fonts';\n\n\t\t$row = & $this->getTable();\n\t\tif (count($cids)) {\n\t\t\tforeach ($cids as $cid) {\n\t\t\t\t$query = ' SELECT name '\n\t\t\t\t\t\t. ' FROM #__templateck_fonts WHERE id=' . $cid;\n\n\t\t\t\t// retrieves the data\n\t\t\t\t$this->_db->setQuery($query);\n\t\t\t\t$fontname = $this->_db->loadResult();\n\n\t\t\t\t// delete the folder\n\t\t\t\tif (!JFolder::delete($destpath . '/' . $fontname)) {\n\t\t\t\t\t$this->setError('CK_ERROR_DELETING_FONT');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t// delete the records from the db\n\t\t\t\tif (!$row->delete($cid)) {\n\t\t\t\t\t$this->setError($row->getErrorMsg());\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "53afaecbb45793dddc25d673ff1fc007", "score": "0.4931526", "text": "public function testClearDrawingLayer()\n {\n $link = $this->webDriver->findElement(WebDriverBy::linkText('Drawings'));\n $link->click();\n\n $layer_id = 0;\n $this->_setLayerContent($layer_id);\n\n $this->assertEquals($this->title->getAttribute('value'), 'My Layer');\n $this->assertEquals($this->data->getAttribute('value'), 'POLYGON((-70 63,-70 48,-106 48,-106 63,-70 63))');\n $this->assertEquals($this->color->getAttribute('value'), '10 10 10');\n $this->assertTrue($this->border->isSelected());\n $this->assertTrue($this->hatch->isSelected());\n\n $this->webDriver->findElements(WebDriverBy::xpath(\"//div[@id='fieldSetsWKT']//button[text()='Clear']\"))[$layer_id]->click();\n\n $this->assertEquals($this->title->getAttribute('value'), '');\n $this->assertEquals($this->data->getAttribute('value'), '');\n $this->assertEquals($this->color->getAttribute('value'), '150 150 150');\n $this->assertFalse($this->border->isSelected());\n $this->assertFalse($this->hatch->isSelected());\n }", "title": "" }, { "docid": "12558c90c5d11e9c652b7de17c9d8174", "score": "0.49315172", "text": "public function delete() {\r\n\r\n $this->db->delete(\"custom_layouts\", $this->db->quoteInto(\"id = ?\", $this->model->getId()));\r\n\r\n @unlink(PIMCORE_CUSTOMLAYOUT_DIRECTORY.\"/custom_definition_\". $this->model->getId() .\".psf\");\r\n }", "title": "" }, { "docid": "54e2860b427a2f47d836302dbd500338", "score": "0.49284986", "text": "public function entryDataCleanup($entry_id, $data=NULL){\n\t\t}", "title": "" }, { "docid": "a38b0c256d3cecc25e3568a51a460856", "score": "0.49152115", "text": "public function delete($row) {\n unset($this->data[$row['index']]);\n }", "title": "" }, { "docid": "ee1e46fbcf0a510f2a914cb4fb63c326", "score": "0.49095547", "text": "public function delete_point()\n {\n $sql = \"DELETE FROM pefs_database.pef_point_form WHERE ptf_date=? AND ptf_emp_id=?\";\n $this->db->query(\n $sql,\n array($this->ptf_date, $this->ptf_emp_id)\n );\n }", "title": "" }, { "docid": "e473a757e240dfcec9bf2b94fa93114a", "score": "0.48998874", "text": "public function delete(){\n $record = infoHeader::find($this->selectedId);\n $record->delete($validateInfo);\n\n /* update image file */\n Storage::delete('public/header_info/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/header_info/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'Info entete modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "title": "" }, { "docid": "49aa63a66b82b0200940c8b830fd6b05", "score": "0.489691", "text": "function destruir(){\n\n\t\tImageDestroy($this->img);\n\n\t}", "title": "" }, { "docid": "225db56581c01a93b0e25ca723367250", "score": "0.48961845", "text": "public function remove_widget()\n\t{\n\t\t$col = $this->_EE->input->get('col');\n\t\t$wgt = $this->_EE->input->get('wgt');\n\n\t\tif(isset($col) AND isset($wgt))\n\t\t{\n\t\t\tunset($this->_settings['widgets'][$col][$wgt]);\n\t\t\t$this->_update_member(FALSE);\n\t\t}\n\t}", "title": "" }, { "docid": "f4db37e7458c3c6de00b4014450afb0e", "score": "0.4886368", "text": "public function delete(){\n $record = temoignage::find($this->selectedId);\n $record->delete();\n\n /* update image file */\n Storage::delete('public/temoignage/'.$this->selectedId.'.png');\n /* $this->photo->storePubliclyAs('public/_temoignage/'.$this->selectedId.'.png'); */\n\n session()->flash('message', 'temoignage modifié avec succès');\n $this->emit('Deleted');\n $this->dispatchBrowserEvent('Deleted');\n $this->resetFields();\n }", "title": "" }, { "docid": "39ab1a214d4812899117e4eecb3b0f5e", "score": "0.48836046", "text": "function DEL()\n{\n\tif ($this->isError()) return;\n\n\t$id_facture = $this->id_facture;\n\n\t$sql = \" DELETE FROM \".$GLOBALS['prefix'].\"factures\n\t\t\t\tWHERE id_facture = $id_facture\";\n\n\tif (!Db_execSql($sql)) $this->setError(ERROR);\n\tif (!$this->isError()) Lib_sqlLog($sql);\n\n\treturn;\n}", "title": "" }, { "docid": "3474855f4173b5f0dd21b6859c106ca6", "score": "0.48691678", "text": "public function deleteSelf() {\n if (!empty($this->uid)) {\n $imgAcc = tx_ptgsashop_articleImageAccessor::getInstance();\n $imgAcc->deleteImageByUid($this->uid); \n } else {\n throw new tx_pttools_exception('No uid set');\n }\n }", "title": "" }, { "docid": "00e43ed1e5fcedfa20b9d8051b4c485d", "score": "0.48667", "text": "public function delete(MinerSummary $minerSummary)\n {\n //\n }", "title": "" }, { "docid": "32de79a004f3abc1d5eb16eec073f636", "score": "0.48571163", "text": "function send_button_remove() {\r\n\tdelete_option('send_button_colorscheme');\r\n\tdelete_option('send_button_font');\r\n}", "title": "" }, { "docid": "268f06d8ae155a1e069c6eadd48a04d5", "score": "0.48542693", "text": "public function deleting(EntryInterface $entry)\n {\n $this->dispatch(new DeleteFile($entry));\n\n parent::deleting($entry);\n }", "title": "" }, { "docid": "f8ee1634a9d6f5026ba82a317c014490", "score": "0.4850852", "text": "public function deleteCacheData($pCoord);", "title": "" }, { "docid": "26f2b10e2b42651fd711ade26701cecd", "score": "0.4844734", "text": "function deleteAction() {\n }", "title": "" } ]
b403bf78ef8c5ec9a8b7590778783903
Gets the solved snippets of a group for a rallye.
[ { "docid": "c03e97d42da320395dc188eb4aca811c", "score": "0.7170525", "text": "function qr_getSolvedSnippets($rID, $gHash){\n\tif( $rID && $gHash && ($gID = qr_getGroupID($gHash)) > 0 ){\n\t\t// get all solved items\n\t\t$vSolvedItems = qr_dbSQL(\"SELECT * FROM qr_groups_solved_items \"\n\t\t\t\t.\"JOIN qr_rallyes_has_items \"\n\t\t\t\t.\"ON qr_groups_solved_items.qr_items_iID = qr_rallyes_has_items.qr_items_iID \".\n\t\t\t\t\"WHERE qr_groups_solved_items.qr_groups_gID = \".$gID.\" \"\n\t\t\t\t.\"ORDER BY qr_groups_solved_items.giSolvedAt DESC\");\n\t\tif( $vSolvedItems )\n\t\t\treturn $vSolvedItems;\n\t}\n\t\n\treturn array();\n}", "title": "" } ]
[ { "docid": "81fb24e72d18695cf06f264a050cb6cb", "score": "0.58233744", "text": "function qr_getSolvedItems($rID, $gHash){\n\tif( $rID && $gHash && ($gID = qr_getGroupID($gHash)) > 0 )\n\t\treturn qr_dbSQL(\"SELECT * FROM qr_groups_solved_items \"\n\t\t\t\t.\"JOIN qr_rallyes_has_items \"\n\t\t\t\t.\"ON qr_groups_solved_items.qr_items_iID = qr_rallyes_has_items.qr_items_iID \"\n\t\t\t\t.\"WHERE qr_rallyes_has_items.qr_rallyes_rID = \".$rID.\" \"\n\t\t\t\t.\"AND qr_groups_solved_items.qr_groups_gID = \".$gID);\n}", "title": "" }, { "docid": "493e5b376fbd855dbe1deefb552b149a", "score": "0.500404", "text": "protected function get_snippets()\n\t{\n\t\t//initialize the snippet array\n\t\t$snippets = array();\n\n\t\t//query the snippets\n\t\t$temp = $this->EE->db->query( 'SELECT snippet_id, snippet_name FROM exp_snippets' );\n\n\t\t//process the snippets\n\t\tif ( $temp->num_rows() > 0 )\n\t\t{\n\t\t\tforeach ( $temp->result_array() as $row )\n\t\t\t{\n\t\t\t\t$snippets[] = array(\n\t\t\t\t\t'snippet_id' => $row[ 'snippet_id' ],\n\t\t\t\t\t'snippet_name' => $row[ 'snippet_name' ],\n\t\t\t\t\t'snippet_link' => BASE . AMP . 'C=design' . AMP . 'M=snippets_edit' . AMP . 'snippet=' . $row[ 'snippet_name' ]\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\n\t\t//sort the snippets\n\t\tusort( $snippets, array( $this, 'snippet_sort' ) );\n\n\t\treturn $snippets;\n\t}", "title": "" }, { "docid": "5781dd838903003cce2ccaab92c0b707", "score": "0.4957993", "text": "public static function get_snippets() {\n\n\t\tif ( empty( self::$snippets ) ) {\n\n\t\t\t$snippet_posts = get_posts( array( 'post_type' => self::$post_type_name, 'numberposts' => -1 ) );\n\n\t\t\tforeach ( $snippet_posts as $key => $snippet ) {\n\n\t\t\t\tself::$snippets[$snippet->post_name] = $snippet;\n\n\t\t\t\tself::$snippets[$snippet->post_name]->variables = get_post_meta( $snippet->ID, '_snippet_variables', true );\n\t\t\t\tself::$snippets[$snippet->post_name]->is_shortcode = get_post_meta( $snippet->ID, '_snippet_is_shortcode', true );\n\t\t\t\tself::$snippets[$snippet->post_name]->use_content = get_post_meta( $snippet->ID, '_snippet_use_content', true );\n\t\t\t}\n\n\t\t}\n\n\t\treturn self::$snippets;\n\t}", "title": "" }, { "docid": "73b740aa4a0506b006296030b930810d", "score": "0.47983104", "text": "function qr_getPendingItem($rID, $gID){\n\tif( $rID && $gID ){\n\t\t// select item of group in rallye that is not solved\n\t\t$vResult = qr_dbSQL(\"SELECT qr_rallyes_has_items.qr_items_iID FROM qr_rallyes_has_items \"\n\t\t\t\t.\"LEFT OUTER JOIN qr_groups_solved_items \"\n\t\t\t\t.\"ON (qr_rallyes_has_items.qr_items_iID = qr_groups_solved_items.qr_items_iID) \"\n\t\t\t\t.\"WHERE qr_groups_solved_items.qr_items_iID IS NULL \"\n\t\t\t\t.\"AND qr_rallyes_has_items.qr_rallyes_rID = \".$rID.\" \"\n\t\t\t\t.\"ORDER BY qr_rallyes_has_items.qr_items_iID ASC\");\n\t\tif( $vResult ) return $vResult[0];\n\t}\n}", "title": "" }, { "docid": "4145e87d343e6b89ea72b3734c510664", "score": "0.46827725", "text": "public function getGroupFindings()\n {\n return $this->group_findings;\n }", "title": "" }, { "docid": "ff8a192f1e1d0e55afdf52f872832c10", "score": "0.46446347", "text": "public function get_quests()\r\n\t{\r\n if ($this->group == self::PROFESSIONAL_GROUP_ID) {\r\n $user_ids = array($this->id);\r\n foreach ($this->getProfessionalModel()->getClients() as $client) {\r\n $user_ids[] = $client->user_id;\r\n } // foreach\r\n\r\n } else {\r\n $user_ids = $this->id;\r\n } // if\r\n\t\treturn Model_Quest::get_user_quests($user_ids);\r\n\t}", "title": "" }, { "docid": "c0cb8e47f5c42a35dcc9eaea501b7d29", "score": "0.46185136", "text": "public function _get_group_sitting($details=array())\r\n\t {\r\n\r\n\t\t$details = $this->decryptArray($details);\r\n\t\tif(isset($details['group_sitting_id']))\r\n {\r\n \t$id=$details['group_sitting_id'];\r\n $results = $this->standard_model->selectAllWhr('tbl_group_sitting','group_sitting_id',$id);\r\n }\r\n else if(isset($details['all'])){\r\n $results = $this->standard_model->selectAll('tbl_group_sitting');\r\n }\r\n else {\r\n\t $results = $this->standard_model->selectAll('tbl_group_sitting','in_use','Y'); \t\r\n \r\n\t\t}\r\n\t\t if($results)\r\n {\r\n \t$data=array();\r\n foreach ($results as $result)\r\n {\r\n $data[] = (array)$result; \r\n }\r\n if(isset($data) && is_array($data)){\r\n $result = $this->encryptArray($data);\r\n }\r\n\r\n return array(\r\n 'msg'=>'Record Found!',\r\n 'state'=>true,\r\n 'details'=>$result\r\n\t\t\t);\r\n\t\t\t$result= $this->encryptArray($details);\r\n }\r\n else\r\n {\r\n return array(\r\n 'msg'=>'Record not Found!',\r\n 'state'=>false,\r\n 'details'=>$details['group_sitting_id']\r\n );\r\n }\r\n\t}", "title": "" }, { "docid": "f747cc068998b93dec290b890084a9dc", "score": "0.45972812", "text": "public function getSiteGroup();", "title": "" }, { "docid": "961413d4dfd8971b24e538a0f8498e40", "score": "0.45753795", "text": "public function getSlidesByGroup($id_group)\n\t{\n\t\treturn Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS('\n SELECT lsll.`id_lang`, lsl.`id_leosliderlayer_slides` as id,\n lsl.*,lsll.*\n FROM ' . _DB_PREFIX_ . 'leosliderlayer_slides lsl\n LEFT JOIN ' . _DB_PREFIX_ . 'leosliderlayer_slides_lang lsll ON (lsl.id_leosliderlayer_slides = lsll.id_leosliderlayer_slides)\n WHERE lsl.id_group = ' . (int) $id_group . '\n ORDER BY lsl.position');\n\t}", "title": "" }, { "docid": "3c2b6cf6e5b4c77211f20a46eb25e94b", "score": "0.45672193", "text": "function nice_get_entries()\n\t{\n\t\t$only_owned=has_specific_permission(get_member(),'edit_midrange_content','cms_polls')?NULL:get_member();\n\t\t$poll_list=nice_get_polls(NULL,$only_owned);\n\t\treturn $poll_list;\n\t}", "title": "" }, { "docid": "5179b5bbdde0092ef888872a3a636a2c", "score": "0.45505702", "text": "function getFullSummary($group) {\n\t\t//get group's dates and duration\n\t\t$date_info = getDateInfo($group);\n\t\t\n\t\t//get the number of subjects in the group\n\t\t$num_subjects = getNumSubjects($group);\n\t\t\n\t\t//get the existing exercise data\n\t\t$res = mysql_query('\n\t\t\t\t\t\t\tSELECT tr1.daydate as date, date_format(daydate,\\'%W\\') as dotw, tr1.student_id as id,s1.first as first,s1.last as last, \n\t\t\t\t\t\t\t\t\tcount(daydate) as activities, sum(mets* tr1.duration) as total_mets, sum(tr1.duration) as duration\n\t\t\t\t\t\t\tFROM training_records1 tr1,compcodes,student s1 \n\t\t\t\t\t\t\tWHERE compcodes.compcode = tr1.compcode \n\t\t\t\t\t\t\tAND tr1.class=\"'.$group.'\" \n\t\t\t\t\t\t\tAND daydate<=\"'.$date_info[1].'\" \n\t\t\t\t\t\t\tAND s1.id=tr1.student_id \n\t\t\t\t\t\t\tGROUP BY tr1.daydate,tr1.student_id \n\t\t\t\t\t\t\tORDER BY tr1.daydate,tr1.student_id');\n\t\t$row = mysql_fetch_array($res);\n\t\t\n\t\t//get the existing rating item data\n\t\t$res2 = mysql_query('\n\t\t\t\t\t\t\tSELECT tr2.daydate as date, tr2.student_id as id , tr2.heart_rate as heart_rate, tr2.sleep as sleep, tr2.health as health, tr2.ratings as ratings\n\t\t\t\t\t\t\tFROM training_records2 tr2\n\t\t\t\t\t\t\tWHERE tr2.class = \"'.$group.'\"\n\t\t\t\t\t\t\tORDER BY daydate,student_id');\n\t\t$row2 = mysql_fetch_array($res2);\n\t\t\n\t\t//get the array of sorted subject information\n\t\t$subject_ids = getSubjectIDS($group);\n\t\t\n\t\t//create the array of all data\n\t\t//loop through days\n\t\tfor($i = 0; $i < $date_info[2]; $i++) {\n\t\t\t//increment the date\n\t\t\t$date = date('Y-m-d',strtotime('+ '.$i.' day',strtotime($date_info[0])) );\n\t\t\t$day = date('D',strtotime($date));\n\t\t\t$week = getWeek($date,$date_info[0]);\n\t\t\t\t\n\t\t\t//loop through subjects\n\t\t\tfor($j = 0; $j < $num_subjects; $j++) {\n\t\t\t\t//add time and subject profile data\n\t\t\t\t$data[$i][$j] = $date.','.$day.','.($i+1).','.$week.','.$subject_ids[$j][0].',\"'.$subject_ids[$j][1].'\",\"'.$subject_ids[$j][2]. '\",\"'.\n\t\t\t\t\t\t\t\t$subject_ids[$j][3].'\",\"'.$subject_ids[$j][4].'\",\"'.$subject_ids[$j][5].'\",\"'.$subject_ids[$j][6].'\",\"'.$subject_ids[$j][7].'\"';\n\t\t\t\t\t\t\t\n\t\t\t\t//handle the exercise data\n\t\t\t\tif($row['date'] == $date && $subject_ids[$j][0] == $row['id']) {\n\t\t\t\t\t\t$data[$i][$j] .= ','.$row[5] .','. $row[6] .','. $row[7];\n\t\t\t\t\t\t$row = mysql_fetch_array($res);\n\t\t\t\t}else {\n\t\t\t\t\t\t$data[$i][$j] .= ',0,0,0';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//handle the rating item data\n\t\t\t\tif($row2['date'] == $date && $subject_ids[$j][0] == $row2['id']) {\n\t\t\t\t\t$data[$i][$j] .= ',' . $row2['heart_rate'] . ',' . $row2['sleep'] .','. $row2['health'];\n\t\t\t\t\t$data[$i][$j] .= ',' . $row2['ratings'] . \"\\n\";\n\t\t\t\t\t$row2 = mysql_fetch_array($res2);\n\t\t\t\t}else {\n\t\t\t\t\t$data[$i][$j] .= \"\\n\";\n\t\t\t\t} \n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "687dd289ff69a5a82da2d9bae8c5f77f", "score": "0.45404997", "text": "public function getSnippets()\n {\n if ($provider = $this->getSnippetProvider()) {\n $params = (array)json_decode($this->SnippetParams, true);\n return $provider->getSnippets($params);\n }\n\n return [];\n }", "title": "" }, { "docid": "9cdd5e34cdd99e1683606ef94825e7b9", "score": "0.45277184", "text": "public function GetJournal() {\n\t\t\treturn GroupAssessmentList::GetJournalForId($this->intId);\n\t\t}", "title": "" }, { "docid": "79316c02f0f687f507b24b8dbf0379ed", "score": "0.45205167", "text": "function get_the_summaries_by_summary_group($summary_group) {\n\t\tglobal $wpdb;\n\t\tif (!$this->languages) return array();\n\t\tif ($summaries = $wpdb->get_results(\"SELECT language_id, summary_id, summary, summary_group FROM $this->summary_table WHERE summary_group = $summary_group\", ARRAY_A)) {\n\t\t\treturn $summaries;\n\t\t}\n\t\treturn array();\n\t}", "title": "" }, { "docid": "80512bb1988959a0c06805e74a3d5cbf", "score": "0.45144078", "text": "public function getSnippet();", "title": "" }, { "docid": "f277c917a3d08c7882de7ce521b902d5", "score": "0.44947618", "text": "public function getItemGroupLines()\n\t{\n\t\treturn $this->getList('ItemGroupLine');\n\t}", "title": "" }, { "docid": "42b2608c843e3662d4a35903178371ef", "score": "0.44642657", "text": "public abstract function get_group();", "title": "" }, { "docid": "f9470ba8f7d6ca1c7449dc19e28388ff", "score": "0.44518742", "text": "public function getSnippets()\n {\n $snippets = array();\n \n if (isset($this->app['np.typekit_id'])) {\n $snippets[DomManipulator::END_HEAD] = function($app) {\n return $app['twig']->render('@ThemeEngineExtension/_typeKit.twig', array('typekit_id' => $app['np.typekit_id']));\n };\n }\n \n return $snippets;\n }", "title": "" }, { "docid": "84f97d905e5cdeca4d2f8d74ea28a67e", "score": "0.44426957", "text": "public static function get_group();", "title": "" }, { "docid": "334deef086623aaf2a0bdd14bfe7483e", "score": "0.44187775", "text": "public function getLookupsGroup($group)\n {\n $query = $this->createQueryBuilder('l')\n ->where('l.group = :group')\n ->setParameter(':group', $group)\n ->orderBy('l.name');\n\n return $query;\n }", "title": "" }, { "docid": "6a1693819ba1fba9018f1048f3b1b8e2", "score": "0.4413648", "text": "public function get_experiment_groups(): array {\n\t\treturn [\n\t\t\t'general' => __( 'General', 'web-stories' ),\n\t\t\t'dashboard' => __( 'Dashboard', 'web-stories' ),\n\t\t\t'editor' => __( 'Editor', 'web-stories' ),\n\t\t];\n\t}", "title": "" }, { "docid": "f50f79debad7a5265fae9231777a9c0c", "score": "0.43893588", "text": "public function getDiscussionGroupDiscussions();", "title": "" }, { "docid": "3cf88794a1b218aab9652b7bdd5e1d28", "score": "0.43721384", "text": "public function GetSectionGroup()\n\t{\t\n\t\t$sql = \"\n\t\t\t\tselect section_name \n\t\t\t\tfrom er.er_section \n\t\t\t\tgroup by section_name\n\t\t\t\";\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "03d22f8881142a6e17edd7fe8dd759ee", "score": "0.43550333", "text": "public function snippets()\n {\n return $this->hasMany(Snippet::class)->with('slug')->latest();\n }", "title": "" }, { "docid": "155ac14b316cc4d2a7a8fedefb815aeb", "score": "0.43403667", "text": "public function read_groups(){\n\t\t$results = $this->wp_db->get_results( 'SELECT id,name,description FROM '.$this->table_groups, OBJECT );\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "fe54a0d2eabdfc83f0dbbf1ba92c3656", "score": "0.43403187", "text": "function find_submissions($is_group_assignment, $uid, $id, $gids) {\n\n if ($is_group_assignment AND count($gids)) {\n $groups_sql = join(', ', array_keys($gids));\n $res = Database::get()->queryArray(\"SELECT id, uid, group_id, submission_date,\n file_path, file_name, comments, grade, grade_comments, grade_submission_date\n FROM assignment_submit\n WHERE assignment_id = ?d AND\n group_id IN ($groups_sql)\", $id);\n if (!$res) {\n return [];\n } else {\n return array_filter($res, function ($item) {\n static $seen = [];\n\n $return = !isset($seen[$item->group_id]);\n $seen[$item->group_id] = true;\n return $return;\n });\n }\n\n } else {\n $res = Database::get()->querySingle(\"SELECT id, grade\n FROM assignment_submit\n WHERE assignment_id = ?d AND uid = ?d\n ORDER BY id LIMIT 1\", $id, $uid);\n if (!$res) {\n return [];\n } else {\n return [$res];\n }\n }\n}", "title": "" }, { "docid": "d4e59eb3f111de36cb7f858f42694ea0", "score": "0.43390977", "text": "function issue_escalation_groups($issueid) {\n\t$egroups = array();\n\t$groups = issue_groups($issueid);\n\tforeach ($groups as $group) {\n\t\t$e = escalation_groups($group['gid']);\n\t\tforeach ($e as $gid => $name) {\n\t\t\tif (!in_array($gid,$egroups)) {\n\t\t\t\t$egroups[$gid] = $name;\n\t\t\t}\n\t\t}\n\t}\n\treturn $egroups;\n}", "title": "" }, { "docid": "9bf5b525125b66960d9ba0992a791e0d", "score": "0.43177631", "text": "private function _getSolutionInormation($idSolution)\n { \n $_ret = array('solution'=>NULL, 'items'=>NULL);\n \n // fetch solution info \n $query = SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->get_where('gtrwebsite_solution', array('idSolution' => $idSolution));\n foreach ($query->result_array() as $row)\n {\n $_ret['solution'] = $row;\n }\n $query->free_result();\n \n // fetch all iditems\n $__tmp_arr = array();\n $query = SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->get_where('gtrwebsite_solutionitem', array('idSolution' => $idSolution));\n foreach ($query->result_array() as $row)\n {\n array_push($__tmp_arr, $row['idItem']);\n }\n $query->free_result();\n \n // fetch all items information\n SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->where_in('idItem', $__tmp_arr);\n $query = SHIN_Core::$_db[SHIN_Core::$_shdb->active_group]->get('gtrwebsite_items');\n \n foreach ($query->result_array() as $row)\n {\n $_ret['items'][] = $row;\n }\n \n $query->free_result();\n\n return $_ret;\n }", "title": "" }, { "docid": "606adbc2b453fadac7b6ecf87781f31d", "score": "0.43153623", "text": "public function get_qid_per_area() {\n global $DB;\n\n $qid1area = array(); // Array of id of items referring to the trend 1.\n $qid2area = array(); // Array of id of items referring to the trend 2.\n $sql = 'SELECT i.id, i.sortindex, i.plugin\n FROM {surveypro_item} i\n WHERE i.surveyproid = :surveyproid\n AND i.plugin = :plugin\n ORDER BY i.sortindex';\n\n $where = ['surveyproid' => $this->surveypro->id, 'plugin' => $this->templateuseritem];\n $itemseeds = $DB->get_recordset_sql($sql, $where);\n\n if ($this->template == 'collesactualpreferred') {\n $id1 = array(); // Id of items referring to preferred trend.\n $id2 = array(); // Id of items referring to actual trend.\n $i = 0;\n foreach ($itemseeds as $itemseed) {\n $i++;\n if ($i % 2) {\n $id1[] = $itemseed->id;\n } else {\n $id2[] = $itemseed->id;\n }\n if (count($id1) == 4) {\n $qid1area[] = $id1;\n $id1 = array();\n }\n if (count($id2) == 4) {\n $qid2area[] = $id2;\n $id2 = array();\n }\n }\n } else {\n $id1 = array(); // Id of items referring to the trend 1 (it may be preferred such as actual).\n foreach ($itemseeds as $itemseed) {\n $id1[] = $itemseed->id;\n if (count($id1) == 4) {\n $qid1area[] = $id1;\n $id1 = array();\n }\n }\n }\n $itemseeds->close();\n\n return [$qid1area, $qid2area];\n }", "title": "" }, { "docid": "19b14cd9ec6297899eeb7761539377a2", "score": "0.431391", "text": "public function getDiscussionGroupList();", "title": "" }, { "docid": "b92a963055d8f362b487c1a63d172027", "score": "0.43133807", "text": "public function getEditableVariables(int $egg): Collection;", "title": "" }, { "docid": "5c0c3cacd337fcc68405c6c25db6b8c2", "score": "0.42652068", "text": "public function getIdsFromProblemsMandatories($section_id) { \n $sql = \"SELECT problem_id \t\t \n \t\t FROM problems\n \t\t WHERE section_id = :section_id AND problem_extra = :problem_extra\";\n $query = $this->db->prepare($sql);\n $query->execute(array( \n ':section_id' => $section_id,\n ':problem_extra' => 0,\n ));\n \n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }", "title": "" }, { "docid": "8416d334959c6193f665ca4b94d1d910", "score": "0.4263742", "text": "public function inspection($group='date'){\n\t\t$cond = array(\n\t\t\t'conditions' => $this->searchCriteria()\n\t\t);\n\t\tswitch($group){\n\t\t\tcase 'suburb':\n\t\t\t\t$cond['order'] = array('Listing.suburb_name');\n\t\t\t\tbreak;\n\t\t\tcase 'date':\n\t\t\tdefault:\n\t\t\t\t$cond['order'] = array('LtInsp.insp_start');\n\t\t}\n\t\t$lt = $this->LtInsp->find('all', $cond);\n\t\t$this->set('listings', $lt);\n\t\t$this->set('bodyClass', 'inspections');\n\t\n\t\tswitch($group){\n\t\t\tcase 'suburb':\n\t\t\t\t$this->render('inspection_suburb');\n\t\t\t\tbreak;\n\t\t\tcase 'date':\n\t\t\tdefault:\n\t\t\t\t$this->render('inspection');\n\t\t}\n\t}", "title": "" }, { "docid": "25b5a11b82f1ec090791f733a00ed1a0", "score": "0.42555973", "text": "public function getGroup()\n {\n return $this->hasOne(GroupAssessment::className(), ['id' => 'group_id']);\n }", "title": "" }, { "docid": "4ce9fbeb66d44e97bb5636141f6883d7", "score": "0.4248581", "text": "public function getQuests();", "title": "" }, { "docid": "23d50697b0ae910512cf5ddd9395186e", "score": "0.42465708", "text": "public function detailGroup($id)\n {\n $group = Group::find($id);\n \n $requests = $group->requests->where('accepted',false);\n foreach ($requests as $request) {\n $request->user;\n }\n\n $owner = User::find($group->user_id);\n $current_date = Carbon::now();\n //get last day of week\n $sundayOfLastWeek = Carbon::now()->previous(Carbon::SUNDAY)->format('Y-m-d H:i:s');\n //get the first day of the last week, in this case always will be monday\n if ($current_date->dayOfWeek == 1) {\n $mondayOfLastWeek = Carbon::now()->previous(Carbon::MONDAY)->format('Y-m-d H:i:s');\n\n }else{\n $mondayOfLastWeek = Carbon::now()->previous(Carbon::MONDAY)->previous(Carbon::MONDAY)->format('Y-m-d H:i:s');\n }\n\n $startOfWeek = Carbon::now()->startOfWeek()->format('Y-m-d H:i:s');\n $endOfWeek = Carbon::now()->endOfWeek()->format('Y-m-d H:i:s');\n //get the question of week\n $theWinner = Question::where([\n\n ['created_at','>=',$mondayOfLastWeek],\n ['created_at','<=',$sundayOfLastWeek],\n ['group_id','=',$id]\n ])\n ->orderBy('votes','DESC')->first();\n if ($theWinner != null) {\n $theWinner->user;\n $theWinner->answers;\n if ($theWinner->state == \"propuesta\") {\n $theWinner->state = \"ganadora\";\n $theWinner->save();\n }\n //the user already answered the the question of week?\n $theWinner->alreadyAnswered = $theWinner->AlreadyAnswered;\n }\n //get the questions of the current week\n $questions = Question::where([\n\n ['created_at','>=',$startOfWeek],\n ['created_at','<=',$endOfWeek],\n ['group_id', '=', $id]\n ])\n ->orderBy('votes','DESC')->get();\n //retrieve votes of each question\n foreach ($questions as $question) {\n $question->alreadyVote = $question->AlreadyVote;\n $question->user;\n }\n return response()->json(['group' => $group, 'questions' => $questions, 'questionWeek' => $theWinner, 'owner' => $owner,'requests' => $requests],200);\n }", "title": "" }, { "docid": "5db85393c077ba13826f8910d9c28915", "score": "0.42454237", "text": "public function getGroup(): int;", "title": "" }, { "docid": "217afaf36661742c41890904eeba019e", "score": "0.42404926", "text": "public function getSolvedGrid()\n {\n return $this->grid;\n }", "title": "" }, { "docid": "4f0b4970639dcf9300111ef534a70709", "score": "0.42346734", "text": "public function getGroup();", "title": "" }, { "docid": "4f0b4970639dcf9300111ef534a70709", "score": "0.42346734", "text": "public function getGroup();", "title": "" }, { "docid": "4f0b4970639dcf9300111ef534a70709", "score": "0.42346734", "text": "public function getGroup();", "title": "" }, { "docid": "e4934cb50a68e46f5af98aa810d884ec", "score": "0.4227604", "text": "public function get_procedure_groups()\n {\n $this->db->select('*')\n ->from('rplgroups');\n $this->db->order_by(\"group_name\", \"asc\");\n $query = $this->db->get();\n $result = $query->result();\n return $result;\n }", "title": "" }, { "docid": "0fec9278ec08736df0f933eea49acf08", "score": "0.42265192", "text": "function getGroup();", "title": "" }, { "docid": "34f3dfea70043ee985ac0540df5a0fe8", "score": "0.4223676", "text": "public function getProblemsFromSection($section_id) { \n $sql = \"SELECT problem_id,\n \t\t problem_extra,\n \t\t problem_name, \t\t \n \t\t problem_level,\n \t\t problem_year,\n \t\t problem_phase\n \t\t FROM problems WHERE section_id = :section_id ORDER BY problem_name\";\n $query = $this->db->prepare($sql);\n $query->execute(array( \n ':section_id' => $section_id\n ));\n \n // fetchAll() is the PDO method that gets all result rows\n return $query->fetchAll();\n }", "title": "" }, { "docid": "4f5da18bb83cddb4d7d2bd63d82302e7", "score": "0.42142627", "text": "function gr_get_skillgroups()\n{\n $franchise_id = Auth::getPayload()->get('franchise_id');\n $club_id = Auth::getPayload()->get('club_id');\n\n $skillgroups = Team::where('franchise_id', $franchise_id)\n ->where('club_id', $club_id)\n ->where('type', 'skill-group')\n ->select('team_id AS key', 'title AS value')\n ->get();\n return $skillgroups;\n}", "title": "" }, { "docid": "ec50ed4282132b8c2b9458345e0c7aba", "score": "0.4205355", "text": "public static function getEventGroup($groupId){\n $events=array();\n $group=Groups::find($groupId);\n if(! $group['assignsForHomeworks'] ==null){\n foreach ($group['assignsForHomeworks'] as $homework){\n\n $events[]=[\n 'title'=>'Homework:- '.$homework->homework['title'],\n 'url'=> '/'.App::getLocale().'/homework/'.$homework->id_homework,\n 'start'=>$homework->startdate,\n 'end'=>$homework->enddate,\n ];\n }\n }\n\n if(! $group['assignsForQuiz'] ==null){\n foreach ($group['assignsForQuiz'] as $quiz){\n $events[]=[\n 'title'=>'Quiz:- ' .$quiz->quizInfo['title'],\n 'url'=> '/'.App::getLocale().'/quiz/'.$quiz->id_quiz,\n 'start'=>$quiz->startdate,\n 'end'=>$quiz->enddate,\n ];\n }\n }\n $lessons=DB::table('lessonassigns')\n ->select('lessonassigns.*','lessons.*')\n ->join('lessons','lessons.id','=','lessonassigns.id_lesson')\n ->where('lessonassigns.id_target','=',$groupId)\n ->where('lessonassigns.assigntype','=','group')\n ->get();\n\n\n foreach ($lessons as $lesson){\n $events[]=[\n 'title'=>'lesson:- '.$lesson->title,\n 'url'=> '/'.App::getLocale().'/lessonsviewer/'.$lesson->id_lesson,\n 'start'=>$lesson->startdate,\n 'end'=>$lesson->enddate,\n ];\n }\n\n return $events;\n }", "title": "" }, { "docid": "c3afcb165e58c407cbc17239b4c4555e", "score": "0.42046875", "text": "protected function get_experiment( string $name ) {\n\t\t$experiment = wp_list_filter( $this->get_experiments(), [ 'name' => $name ] );\n\t\treturn ! empty( $experiment ) ? array_shift( $experiment ) : null;\n\t}", "title": "" }, { "docid": "6148b737a20c567195d71d563b9adc70", "score": "0.41892284", "text": "public function getRichContent()\n {\n $view = Zend_Registry::get('Zend_View');\n $view = clone $view;\n $view->clearVars();\n $view->addScriptPath('application/modules/Grouppoll/views/scripts/');\n $tmpBody = $this->getDescription();\n\t\t$poll_description = Engine_String::strlen($tmpBody) > 70 ? Engine_String::substr($tmpBody, 0, 70) . '...' : $tmpBody;\n $content = '';\n $content .= '\n <div class=\"feed_grouppoll_rich_content\">\n <div class=\"feed_item_link_title\">\n ' . $view->htmlLink($this->getHref(), $this->getTitle()) . '\n </div>\n <div class=\"feed_item_link_desc\">\n ' . $view->viewMore($poll_description) . '\n </div>\n ';\n\t\n\t\t//RENDER THE THINGY\n $view->grouppoll = $this;\n $view->owner = $owner = $this->getOwner();\n $view->viewer = $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$viewer_id = $viewer->getIdentity();\n $view->grouppollOptions = $this->getOptions();\n $view->hasVoted = $this->viewerVoted();\n $view->showPieChart = Engine_Api::_()->getApi('settings', 'core')->getSetting('grouppoll.showPieChart', false);\n $view->canVote = $this->authorization()->isAllowed(null, 'vote');\n $view->canChangeVote = Engine_Api::_()->getApi('settings', 'core')->getSetting('grouppoll.canchangevote', false);\n $view->hideLinks = true;\n\n\t\t//SET GROUP SUBJECT\n\t\t$subject = null;\n\n\t\t$id = $this->group_id;\n\t\t$subject = $group_subject = Engine_Api::_()->getItem('group', $id);\n\n\t\t$gp_auth_vote = $this->gp_auth_vote;\n\t\tif ( !$group_subject->membership()->isMember($viewer) ) {\n $group_member = 0; \n }\n else {\n $group_member = 1;\n }\n\n\t\t//CHECK THAT VIEWER IS OFFICER OR NOT\n\t\t$list = $group_subject->getOfficerList();\n\t\t$listItem = $list->get($viewer);\n $isOfficer = ( null !== $listItem );\n\n if (($gp_auth_vote == 1 && $viewer_id != 0) || ($gp_auth_vote == 2 && $group_member == 1) || ($gp_auth_vote == 3 && $this->group_owner_id == $viewer_id) || ($gp_auth_vote == 3 && $isOfficer == 1)) {\n $can_vote = 1;\n\t\t}\n else { \n $can_vote = 0;\n }\n\n\t\tif ($can_vote == 1 && $this->approved == 1) {\n\t\t\t$view->can_vote = 1;\n\t\t}\n\t\telse {\n\t\t\t$view->can_vote = 0;\n\t\t}\n\n $content .= $view->render('_grouppoll.tpl');\n\n $content .= '\n </div>\n ';\n return $content;\n }", "title": "" }, { "docid": "cf5bab7e78bbe7fdb502af2d39ea5800", "score": "0.4186679", "text": "public function getTags()\n {\n $tags = $this->db->fetchAll('SELECT tag.* \n FROM tag \n INNER JOIN snippet_has_tag \n ON tag.id = snippet_has_tag.tag_id \n WHERE snippet_has_tag.snippet_id = ?\n ORDER BY tag.name', array((int)$this->id));\n\n return $tags;\n }", "title": "" }, { "docid": "145d4bf6ae37105cc30060e84b3b7d49", "score": "0.41689202", "text": "public function getMyResourceGroupIDS() {\n $uid = user()->getPersonID();\n $rows = db(\"oim\")->query(\"SELECT resource_group_id FROM resource JOIN resource_contact rc ON rc.resource_id = resource.id WHERE rc.contact_id = $uid\");\n $ids = array();\n foreach($rows as $row) {\n $rgid = (int)$row->resource_group_id;\n if(!in_array($rgid, $ids)) {\n $ids[] = $rgid;\n }\n }\n return $ids;\n }", "title": "" }, { "docid": "af98a167555b7508f2f16a86ab1c07e5", "score": "0.41668543", "text": "protected function findChunks($patch) {\n\t\t$chunks = array();\n\t\t$matchesChunks = array();\n\t\tpreg_match_all(self::PATTERN_CHUNKS, $patch, $matchesChunks);\n\t\tfor ($i = 0; $i < count($matchesChunks['start1']); $i++) {\n\t\t\t$chunks[$matchesChunks['start1'][$i]] = array(\n\t\t\t\t'start1' => $matchesChunks['start1'][$i],\n\t\t\t\t'start2' => $matchesChunks['start2'][$i],\n\t\t\t\t'content' => $this->explodeLines($matchesChunks['content'][$i])\n\t\t\t);\n\t\t}\n\t\treturn $chunks;\n\t}", "title": "" }, { "docid": "afb16735f24e9a36feb4a739d1586617", "score": "0.4162441", "text": "public function getQuestgroupsForSeminary($seminaryId)\n {\n return $this->db->query(\n 'SELECT id, title, url, questgroupspicture_id, achievable_xps '.\n 'FROM questgroups '.\n 'WHERE seminary_id = ? '.\n 'ORDER BY title ASC',\n 'i',\n $seminaryId\n );\n }", "title": "" }, { "docid": "7ba7878eea11916346d2036cc1899371", "score": "0.41550425", "text": "function learndash_notifications_get_group_leaders( $group_id ) {\n\t$group_leaders = wp_cache_get( 'group_leaders_' . $group_id, 'learndash_notifications' );\n\n\tif ( false === $group_leaders ) {\n\t\tglobal $wpdb;\n\t\t$query = \"SELECT user_id FROM {$wpdb->prefix}usermeta WHERE meta_key = 'learndash_group_leaders_%d'\";\n\n\t\t$group_leaders = $wpdb->get_col( $wpdb->prepare( $query, $group_id ) );\n\n\t\twp_cache_set( 'group_leaders_' . $group_id, $group_leaders, 'learndash_notifications', HOUR_IN_SECONDS );\n\t}\n\n\treturn $group_leaders ?? array();\n}", "title": "" }, { "docid": "2e5ef26d6048fe8b40401412d7a077fe", "score": "0.41453472", "text": "abstract public function getGroups();", "title": "" }, { "docid": "43e3f88e122e8788350f962a2704aff5", "score": "0.41314626", "text": "function getMatchsTie($tieId, $teamL, $teamR, $hide, $aOrder=false)\r\n\t{\r\n\t\t// Select the definition of the group\r\n\t\t$fields = array('tie_nbms', 'tie_nbws', 'tie_nbmd',\r\n\t\t 'tie_nbwd', 'tie_nbxd', 'tie_nbas', 'tie_nbad');\r\n\t\t$tables[] = 'ties';\r\n\t\t$where = \"tie_id=$tieId\";\r\n\t\t$res = $this->_select($tables, $fields, $where);\r\n\r\n\t\t$data = $res->fetchRow(DB_FETCHMODE_ORDERED);\r\n\t\t$defTie[WBS_MS] = $data[0];\r\n\t\t$defTie[WBS_LS] = $data[1];\r\n\t\t$defTie[WBS_MD] = $data[2];\r\n\t\t$defTie[WBS_LD] = $data[3];\r\n\t\t$defTie[WBS_MX] = $data[4];\r\n\t\t$defTie[WBS_AS] = $data[5];\n\t\t$defTie[WBS_AD] = $data[6];\n\r\n\t\t// Select the matchs of the tie\r\n\t\t$fields = array('mtch_id', 'mtch_rank', 'mtch_discipline', 'mtch_order',\r\n\t\t 'mtch_tieId', 'mtch_status', 'mtch_court', 'mtch_begin',\r\n\t\t 'mtch_end', 'mtch_score');\r\n\t\t$tables = array('matchs');\r\n\t\t$where = \"mtch_del != \".WBS_DATA_DELETE.\r\n\t\" AND mtch_tieId = $tieId\";\r\n\t\tif (! $hide)\r\n\t\t$where .= \" AND mtch_status <\".WBS_MATCH_CLOSED;\r\n\t\tif ($aOrder) $order = \"mtch_rank, mtch_discipline, mtch_order\";\n\t\telse $order = \"mtch_rank, mtch_discipline, mtch_order\";\n\t\t$order = \"mtch_rank, mtch_discipline, mtch_order\";\r\n\t\t$res = $this->_select($tables, $fields, $where, $order);\r\n\r\n\t\t// Construc a table with the match\r\n\t\t$utd = new utdate();\r\n\t\t$ut = new utils();\r\n\t\t$matches = array();\r\n\t\twhile ($match = $res->fetchRow(DB_FETCHMODE_ORDERED))\r\n\t\t{\r\n\t $discipline = $match[2];\r\n\t if ($discipline < 6) $match[2] = $ut->getSmaLabel($discipline);\n\t else $match[2] = 'SP';\n\t if ($defTie[$discipline]>1) $match[2] .= \" \".$match[3];\r\n\n\t $utd->setIsoDateTime($match[7]);\r\n\t $match[7]= $utd->getTime();\r\n\t $utd->setIsoDateTime($match[8]);\r\n\t $match[8]= $utd->getTime();\r\n\t $full = array_pad($match,13, \"\");\r\n\t $full[12] = $match[5];\r\n\t $full[3] = '';\r\n\t $full[4] = '';\r\n\t $full[5] = '';\r\n\t //\t print_r($full);echo\"<br>---------------------\";\r\n\t $matches[$match[0]] = $full;\r\n\t $status[$match[0]] = $match[5];\r\n\t\t}\r\n\r\n\t\t// Select the players of the matchs of the tie\r\n\t\t$fields = array('mtch_id', 'p2m_result', 'regi_longName',\r\n\t\t 'regi_teamId', 'i2p_pairId', 'rkdf_label', \r\n\t\t 'regi_rest', 'regi_court', 'regi_present',\r\n\t\t 'regi_delay', 'regi_wo', 'regi_id');\r\n\t\t$tables = array('matchs', 'p2m', 'i2p', 'registration',\r\n\t\t 'ranks', 'rankdef', 'members');\r\n\t\t$where = \"mtch_del != \".WBS_DATA_DELETE.\r\n\t\" AND mtch_tieId = $tieId\".\r\n\t\" AND mtch_id = p2m_matchId\".\r\n\t\" AND p2m_pairId = i2p_pairId\".\r\n\t\" AND i2p_regiId = regi_id\".\r\n\t\" AND rank_regiId = regi_id\".\r\n\t\" AND rank_rankdefId = rkdf_id\".\r\n\t\" AND rank_discipline = mtch_disci\".\r\n\t\" AND mber_id = regi_memberId\";\r\n\t\tif (! $hide) $where .= \" AND mtch_status <\".WBS_MATCH_CLOSED;\r\n\t\t$order = \"1, regi_teamId, mber_sexe, regi_longName\";\r\n\t\t$res = $this->_select($tables, $fields, $where, $order);\r\n\r\n\t\t// Construc a table with the match\r\n\t\t$uts = new utscore();\r\n\t\t$teamId=-1;\r\n\t\t$delay = $ut->getPref('cur_rest', 20);\n\t\twhile ($player = $res->fetchRow(DB_FETCHMODE_ASSOC))\r\n\t\t{\n\t $match = $matches[$player['mtch_id']];\r\n\t $uts->setScore($match[9]);\r\n\t $rest = '';\r\n\t $utd->setIsoDateTime($player['regi_rest']);\r\n\t if ($utd->elaps() > 0 && $utd->elaps() < $delay)\r\n\t {\r\n\t \t$utd->addMinute($delay);\r\n\t \t$rest = $utd->getTime();\r\n\t }\r\n\t // Prepare the name of the player\r\n\t $value = \"\";\r\n\t $class = \"\";\r\n\t $oldStatus = $status[$player['mtch_id']];\r\n\t $newStatus = $oldStatus;\r\n\t if ($oldStatus < WBS_MATCH_LIVE)\r\n\t {\r\n\t \t$newStatus = WBS_MATCH_READY;\r\n\t \tif ($player['regi_wo'] == WBS_YES)\r\n\t \t{\r\n\t \t\t$class = 'wo';\r\n\t \t\t$value .= \"[WO] \";\r\n\t \t}\r\n\t \telse if ($player['regi_present'] == WBS_NO)\r\n\t \t{\r\n\t \t\t$newStatus = WBS_MATCH_BUSY;\r\n\t \t\t$class = 'absent';\r\n\t \t\tif ($player['regi_delay'] != '')\r\n\t \t\t{\r\n\t \t\t\t$utd->setIsoDateTime($player['regi_delay']);\r\n\t \t\t\t$delay = $utd->getTime();\r\n\t \t\t\t$value .= \"[$delay] \";\r\n\t \t\t}\r\n\t \t}\r\n\t \telse if ($player['regi_court'] != 0)\r\n\t \t{\r\n\t \t\t$value .= \"[\".abs($player['regi_court']).\"]\";\r\n\t \t\t$class = $player['regi_court'] > 0 ? 'busy':'umpire';\r\n\t \t\t$newStatus = WBS_MATCH_BUSY;\r\n\t \t}\r\n\t \telse if ($rest != '')\r\n\t \t{\r\n\t \t\t$value .= \"[$rest] \";\r\n\t \t\t$class = \"rest\";\r\n\t \t\t$newStatus = WBS_MATCH_REST;\r\n\t \t}\r\n\t }\r\n\t else if ($oldStatus == WBS_MATCH_LIVE)\r\n\t {\r\n\t \t$class = \"live\";\r\n\t }\r\n\r\n\t $line['class'] = $class;\r\n\t $value .= $player['regi_longName']. \"-\".\r\n\t $player['rkdf_label'];\r\n\t $line['value'] = $value;\r\n\t $line['action'] = array(KAF_NEWWIN, 'resu', KID_EDIT,\r\n\t $player['regi_id'], 400,200);\r\n\r\n\t // Left team\r\n\t if ($player['regi_teamId'] == $teamL)\r\n\t {\r\n\t \t$teamId = $player['regi_teamId'];\r\n\t \t$match[4][] = $line;\n\t \tif ($newStatus > WBS_MATCH_LIVE)\n\t \t$match[10] = utimg::getIcon($player['p2m_result']);\r\n\t \tswitch ($player['p2m_result'])\r\n\t \t{\r\n\t \t\tcase WBS_RES_LOOSE:\r\n\t \t\tcase WBS_RES_LOOSEAB:\r\n\t \t\tcase WBS_RES_LOOSEWO:\r\n\t \t\t\t$match[9] = $uts->getLoosScore();\r\n\t \t\t\tbreak;\r\n\t \t\tdefault:\r\n\t \t\t\tbreak;\r\n\t \t}\r\n\t }\r\n\t // right team\r\n\t else\r\n\t {\r\n\t \t$teamId=-1;\r\n\t \t$match[5][] = $line;\r\n\t \tif ($newStatus > WBS_MATCH_LIVE)\n\t \t$match[11] = utimg::getIcon($player['p2m_result']);\r\n\t }\r\n\r\n\t $match[12] = utimg::getIcon($oldStatus);\r\n\t if ($newStatus < $oldStatus)\r\n\t {\r\n\t \t$status[$player['mtch_id']] = $newStatus;\r\n\t \t$match[12] = utimg::getIcon($newStatus);\r\n\t }\r\n\r\n\t // Court of the match\n\t if ($status[$player['mtch_id']] > WBS_MATCH_BUSY &&\r\n\t $status[$player['mtch_id']] < WBS_MATCH_ENDED)\r\n\t {\r\n\t \t$listCourt['action'] = array(KAF_NEWWIN, 'live', LIVE_DISPLAY_STATUS,0,400,200);\r\n\t \t//array(KAF_UPLOAD, 'live', WBS_ACT_LIVE, $match[0]);\r\n\t \t$select = array();\r\n\t \t$nbCourt = $ut->getPref('cur_nbcourt', 5);\n\t \tfor ($i = 0; $i <= $nbCourt; $i++)\r\n\t \t{\r\n\t \t\t$key = $match[0].\";$i\";\r\n\t \t\t$option = array('key'=>$key, 'value'=>$i);\r\n\t \t\tif ($match[6] == $i)\r\n\t \t\t$option['select'] = true;\r\n\t \t\t$select[] = $option;\r\n\t \t}\r\n\t \t$listCourt['select'] = $select;\r\n\t \tif (!is_array($match[6]))\r\n\t \t$match[6] = $listCourt;\r\n\t }\r\n\r\n\t $matches[$player['mtch_id']] = $match;\r\n\t\t}\r\n\r\n\t\t// prepare the list\r\n\t\t/* $matchsList = array();\r\n\t\t foreach ($matches as $matchId=>$match)\r\n\t\t {\r\n\t $match[12] = utimg::getIcon($match[12]);\r\n\t $matchsList[] = $match;\r\n\t }*/\r\n\t\treturn $matches;\r\n\r\n\t}", "title": "" }, { "docid": "825da7bc35dee79d63179bff41a15fe2", "score": "0.41301057", "text": "function cohortResidents() {\n\tob_start();\n\t\tget_template_part('includes/loops/loop-cohort');\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "db10bcf57c5080a967221b59072d45a8", "score": "0.4129286", "text": "public function findGroups(): array;", "title": "" }, { "docid": "bc4faadb2a29a9049cfbe387a4f69a1b", "score": "0.41233286", "text": "function get_groups_with_chips($game_id,$round) {\n\t\t$this->db->from('games_groups');\n\t\t$this->db->where('game_id',$game_id);\n\t\t$groups = $this->db->get()->result();\n\n\t\tforeach($groups as $group) {\n\t\t\tif($round < 4) {\n\t\t\t\t$group->free_chips = $this->count_free_chips($game_id,$group->number,$round);\n\t\t\t}\n\t\t\t$group->areas = $this->gameboard->get_areas();\n\t\t\tforeach($group->areas as $area) {\n\t\t\t\t$area->chips = $this->count_chips_in_area($game_id,$group->number,$area->id,$round);\n\t\t\t\t$area->status = $this->area_status($game_id,$group->number,$area->id);\n\t\t\t\tforeach($area->focuses as $focus) {\n\t\t\t\t\t$focus->chips = $this->count_chips_in_focus($game_id,$group->number,$focus->id,$round);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $groups;\n\t}", "title": "" }, { "docid": "abbe844389cedca82c9361003d674bc9", "score": "0.4123266", "text": "public function questionnaireGroupDataAction($id, $lightbox)\n {\n $em = $this->getDoctrine()->getManager();\n $group = $em->getRepository('WBQbankBundle:QuestionnaireGroups')\n ->find($id);\n\n // find questionnaires attached to group\n $questionnairesForMainGroup = array();\n foreach ($group->getQuestionnaireGroupRelModules() as $rel) {\n $questionnairesForMainGroup[] = $rel->getQuestModuleId();\n }\n\n // find child groups\n $childGroups = $em->getRepository('WBQbankBundle:QuestionnaireGroups')\n ->findBy(array('pid' => $id));\n\n // make array of subgroups and their questionnaires\n $childGroupsTree = array();\n\n foreach ($childGroups as $childGroup) {\n\n $childGroupId = $childGroup->getId();\n\n $questionnairesForGroup = array();\n foreach ($childGroup->getQuestionnaireGroupRelModules() as $rel) {\n $questionnairesForGroup[] = $rel->getQuestModuleId();\n }\n\n $childGroupQuestionnaires = array();\n\n foreach ($questionnairesForGroup as $que) {\n\n $childGroupQuestionnaires[] = array(\n 'questionnaireId' => $que->getId(),\n 'questionnaireName' => $que->getName(),\n );\n }\n\n if ($childGroup->getPublished()) {\n $childGroupsTree[] = array(\n 'id' => $childGroup->getId(),\n 'name' => $childGroup->getName(),\n 'desc' => $childGroup->getDescription(),\n 'questionnaires' => $childGroupQuestionnaires\n );\n }\n }\n\n \n //get array of resources types\n $resources_doctypes = $this->getDoctrine()\n ->getRepository('WBQbankBundle:DocTypes')\n ->createQueryBuilder('doctypes')\n ->select('doctypes')\n ->getQuery()\n ->getResult(\\Doctrine\\ORM\\Query::HYDRATE_ARRAY);\n \n \n //get resources\n $resources = array();\n\n // get resources\n $resourcesRel = $group->getQuestionnaireGroupRelResources();\n \n //group resources by type\n foreach ($resourcesRel as $cr) {\n $resourceModel = $this->getDoctrine()->getManager()\n ->getRepository('WBQbankBundle:Resources')\n ->find($cr->getResourceId());\n \n $resource_doc_type=$resourceModel->getDocType()->getTitle(); \n \n if (!$resource_doc_type){\n $resource_doc_type='Other'; \n }\n \n $resources[$resource_doc_type][]=$resourceModel;\n }\n \n //sources\n $sourcesRel = $group->getQuestionnaireGroupRelSources();\n $sources = array();\n foreach ($sourcesRel as $cr) {\n $sources[] = $this->getDoctrine()->getManager()\n ->getRepository('WBQbankBundle:Resources')\n ->find($cr->getResourceId());\n }\n\n // get organizations\n $organizationsRel = $group->getQuestionnaireGroupRelCustodians();\n $organizations = array();\n foreach ($organizationsRel as $or) {\n $organizations[] = $this->getDoctrine()->getManager()\n ->getRepository('WBQbankBundle:Organizations')\n ->find($or->getOrganizationId());\n }\n\n\n return $this->render('WBQbankBundle:Default:questionnaireGroupData.html.twig', array(\n 'group' => $group,\n 'questionnaires' => $questionnairesForMainGroup,\n 'childGroupsTree' => $childGroupsTree,\n 'resources' => $resources,\n 'sources'=>$sources,\n 'organizations' => $organizations,\n 'lightbox' => $lightbox\n ));\n }", "title": "" }, { "docid": "1579a2b48c03126990eba04dd3cb532d", "score": "0.41203994", "text": "public function getRelatedQuestsgroupsOfQuestgroup($questgroupId)\n {\n return $this->db->query(\n 'SELECT DISTINCT questgroups_questtexts.questgroup_id AS id '.\n 'FROM questgroups '.\n 'INNER JOIN quests ON quests.questgroup_id = questgroups.id '.\n 'INNER JOIN questtexts ON questtexts.quest_id = quests.id '.\n 'INNER JOIN questgroups_questtexts ON questgroups_questtexts.questtext_id = questtexts.id '.\n 'WHERE questgroups.id = ?',\n 'i',\n $questgroupId\n );\n }", "title": "" }, { "docid": "adb5670deb1043159e63c9d2d4a03ca7", "score": "0.41195107", "text": "function get_nominee_by_group()\n { //check User_login and Pass_login in database\n $sql = \"SELECT *\n\t\t\tFROM pefs_database.pef_group_nominee AS nom INNER JOIN dbmc.employee AS emp \n ON emp.Emp_ID=nom.grn_emp_id\n INNER JOIN dbmc.sectioncode AS sec\n ON emp.Sectioncode_ID=sec.Sectioncode\n INNER JOIN dbmc.position AS pos\n ON pos.Position_ID = nom.grn_promote_to\n WHERE grn_grp_id =? \n\t\t\t\";\n $query = $this->db->query($sql, array($this->grn_grp_id));\n return $query;\n }", "title": "" }, { "docid": "85b1d5489902bed3bf262b5bd9b06bbb", "score": "0.41193563", "text": "public function getRichsnippetType()\n {\n return Mage::getStoreConfig('targetbay_tracking/tracking_groups/richsnippets_type');\n }", "title": "" }, { "docid": "acefe42f05835a1c627625b9876bfc71", "score": "0.4115374", "text": "public function solutionById($id){\n return Solution::where('question_id', $id)->get()->first();\n }", "title": "" }, { "docid": "ea20d2c9d3bc49fee82bdda5bfcbe0ce", "score": "0.41145477", "text": "public function workgroupDetails(){\n return $this->hasMany(Workgroup::class, 'id');\n }", "title": "" }, { "docid": "c3587155f152d701dbd2d1b56b285c65", "score": "0.41143656", "text": "public function getGroupArr () {\n $commonwords = CommonWordDao::getListByOwnertypeOwneridTypestr(\"PatientRemarkTpl\", $this->id, $this->typestr);\n\n $arr = array();\n foreach ($commonwords as $commonword) {\n $arr[\"{$commonword->groupstr}\"][] = $commonword;\n }\n\n return $arr;\n }", "title": "" }, { "docid": "f71a2fee4242429355a3e1d743848706", "score": "0.41134328", "text": "public function workgroupComments(){\n return $this->hasMany(WorkgroupComment::class, 'post_id');\n }", "title": "" }, { "docid": "cbdb4c06db4e5f7f6f07ab181964514a", "score": "0.4103274", "text": "public function getGroupings();", "title": "" }, { "docid": "8fe6330ae38e50ffac0e05ac2ef5dc8f", "score": "0.40910453", "text": "function get_section_shorting($task,$sectonid){\n\t$CI = & get_instance();\n\tif($task=='section_shortid'){\t\n\t$query1 = $CI->db->query(\"SELECT section_id,section_grouping from ft_sections_master WHERE section_id='\".$sectonid.\"'\");\n return $recods= $query1->row_array();\n\t}\n}", "title": "" }, { "docid": "0aa440937ca0e988467f5d60d1169b1d", "score": "0.40893343", "text": "public function get_procedure_subgroups()\n {\n $this->db->select('*')\n ->from('rplsubgroups');\n $query = $this->db->get();\n $result = $query->result();\n return $result;\n }", "title": "" }, { "docid": "7eb48f4ae436bd5638549c8c6336c039", "score": "0.40872315", "text": "public function getAllGroupContentBundleIds();", "title": "" }, { "docid": "bbe4df35015eec6c6757e7809101475e", "score": "0.40853927", "text": "public function rejudge()\n {\n return Model_Solution::rejudge_problem($this->problem_id);\n }", "title": "" }, { "docid": "e4212235d1b45f02f06e39a9c2f18727", "score": "0.4074569", "text": "function getPreviousAttemptedGroupID($userID,$selectedGroupID=null){\n\t\t$limit = \"4\"; // 3+1(To know the 3 questions skill and 4th questions skill)\n\t\t$attemptedGroupQns=0;\n\t\tif($selectedGroupID > 0)\n\t\t\t$limit =\"8\"; // 7+1(To know the 7 group skill and 8th group skill)\n\t\t$getPreviousAttGroupDetSql=$this->dbEnglish->query(\"select q.skillID,p.qcode from \".$this->questionAttemptClassTbl.\" p,questions q where p.userId=\".$userID.\" and p.passageId=0 and p.qcode=q.qcode order by p.lastModified desc LIMIT \".$limit);\n\t\tif($getPreviousAttGroupDetSql->num_rows() > 0){\n\t\t\t$groupArr=array();\n\t\t\tforeach($getPreviousAttGroupDetSql->result_array() as $row){\n\t\t\t\t$skillIDArr=array();\n\t\t\t\t$skillIDArr=explode(',', $row['skillID']);\n\t\t\t\t$getGroupSkillIDSql=$this->dbEnglish->query(\"select groupSkillID,skilID from groupSkillMaster where find_in_set('\".$skillIDArr[0].\"',skilID) <> 0\");\n\t\t\t\t$groupSkillIDData = $getGroupSkillIDSql->row();\n\t\t\t\t$groupSkills=$groupSkillIDData->skilID;\n\t\t\t\t$qcodeArr[$groupSkillIDData->groupSkillID]++;\n\t\t\t\tarray_push($groupArr,$groupSkillIDData->groupSkillID);\n\t\t\t}\n\t\t\t\n\t\t\tif($selectedGroupID > 0){\n\t\t\t\t//$groupArr=array_reverse($groupArr);\n\n\t\t\t\t//arrayfilter() added by nivedita as this array was containing empty elements as well so it was getting stuck for freeQuestions\n\t\t\t\t$groupArr=array_reverse(array_filter($groupArr));\n\t\t\t\t$qcodeArr=array();\n\t\t\t\t$j=0;\n\t\t\t\tfor($i=count($groupArr)-1;$i>=0;$i--)\n\t\t\t\t{\n\t\t\t\t\t\tif($j==0 || $j==1)\n\t\t\t\t\t\t\t$final[$groupArr[$i]] += 1;\t\n\t\t\t\t\t\tif($groupArr[$i] != $groupArr[$i-1])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($j==0)\n\t\t\t\t\t\t\t\t$j=1;\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$j=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tforeach($final as $key=>$val)\n\t\t\t\t{\n\t\t\t\t\t$qcodeArr[$key]=$final[$key];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$qcodeArr=array();\n\t\t\t}\n\t\t\t\n\t\t\treturn $qcodeArr;\n\t\t}\n\t}", "title": "" }, { "docid": "8db4a623ce597acc4c21cb165f6a1203", "score": "0.40721926", "text": "public function rows()\n {\n return $this->hasmany('App\\WMS\\Segregation\\SSegregationRow', 'segregation_id', 'id_segregation');\n }", "title": "" }, { "docid": "f0afcfda474f9630c396e1e914135255", "score": "0.40614334", "text": "public function SeeGroupID() {\n try {\n\n $select = $this->connexion->prepare(\"SELECT A.group_id \n FROM \" . PREFIX . \"group A, \" . PREFIX . \"event B, \" . PREFIX . \"event_has_group C\n WHERE A.group_valid = 1\n AND B.event_end >= \" . date(\"Y-m-d\") . \"\n GROUP BY A.group_id\");\n\n $select->execute();\n $select->setFetchMode(PDO::FETCH_ASSOC);\n $gID = $select->FetchAll();\n $select->closeCursor(); \n\n $array = '';\n $i = 0;\n foreach ($gID as $key => $value) {\n\n $select2 = $this->connexion->prepare(\"SELECT sum(donate_amount) as group_needed\n FROM \" . PREFIX . \"donate \n WHERE group_group_id = :groupID\");\n\n $select2->bindValue(':groupID', $value['group_id'], PDO::PARAM_INT);\n $select2->execute();\n $select2->setFetchMode(PDO::FETCH_ASSOC);\n $Needed = $select2->FetchAll();\n $select2->closeCursor();\n\n if($Needed[0]['group_needed'] == null){\n $Needed[0]['group_needed'] = '0';\n }\n\n $array[$i] = array_merge($gID[$i], $Needed[0]);\n\n $i ++;\n }\n return $array;\n\n } catch (Exception $e) {\n echo 'Message:' . $e->getMessage();\n } \n }", "title": "" }, { "docid": "15ccf5f64a04d95a3e7a5daf034d1312", "score": "0.4055431", "text": "public function getOptionalGroupList($rollNo) {\r\n \r\n\t\tglobal $sessionHandler;\r\n\t\t$instituteId = $sessionHandler->getSessionVariable('InstituteId');\r\n\t\t$sessionId = $sessionHandler->getSessionVariable('SessionId');\r\n\r\n $query = \"\tSELECT\tsub.subjectCode,\r\n\t\t\t\t\t\t\tsub.subjectId,\r\n\t\t\t\t\t\t\tgr.groupName,\r\n\t\t\t\t\t\t\tgr.groupId\r\n\t\t\t\t\tFROM\t`group` gr,\r\n\t\t\t\t\t\t\tsubject sub,\r\n\t\t\t\t\t\t\tstudent_optional_subject sos,\r\n\t\t\t\t\t\t\tstudent st,\r\n\t\t\t\t\t\t\tclass cl\r\n\t\t\t\t\tWHERE\tsos.studentId = st.studentId\r\n\t\t\t\t\tAND\t\tsos.subjectId = sub.subjectId\r\n\t\t\t\t\tAND\t\tsos.groupId = gr.groupId\r\n\t\t\t\t\tAND\t\tsos.classId = cl.classId\r\n\t\t\t\t\tAND\t\tcl.isActive = 1\r\n\t\t\t\t\tAND\t\tcl.sessionId = \".$sessionId.\"\r\n\t\t\t\t\tAND\t\tcl.instituteId = \".$instituteId.\"\r\n\t\t\t\t\tAND\t\tst.rollNo = '\".$rollNo.\"' \";\r\n return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\r\n }", "title": "" }, { "docid": "7e6d790b9526b9e2ad4674d494e6d384", "score": "0.40550098", "text": "public function viewPool()\n\t{\n\t\t$currentUserEmail = Sentinel::getUser()[\"email\"];\n\t\t\n\t\t/*getting name for the email*/\n\t\t$leaderName= Grouping::where('email','=',$currentUserEmail)->pluck('name');\n\t\t\n\t\t/*getting current users batch from ID*/\n\t\t$id = Grouping::where('email','=',$currentUserEmail)->pluck('regId');\n\n\t\t/*concatenating the batch from ID array*/\n\t\t$batch = $id[2].$id[3];\n\n\t\t/*filtering student pool according to current user*/\n\t\t$students = DB::select(\"SELECT DISTINCT name, email, regId\n\t\t FROM students\n\t\t WHERE courseField = (select courseField from students where email = '$currentUserEmail')\n\t\t AND regId LIKE '__$batch%'\n\t\t AND grouped IS NULL\n\t\t AND Email NOT IN (\n\t\t SELECT DISTINCT memberMail\n\t\t FROM invitings\n\t\t where leaderMail='$currentUserEmail')\n\t\t AND email!='$currentUserEmail' \t\t \n \");\n\t\t$invitations = DB::select(\"SELECT DISTINCT i.id,s.name,s.email,i.status,i.notification_id\n\t\t\t\t\t\tFROM students s, invitings i\n\t\t\t\t\t\tWHERE s.email = i.memberMail\n\t\t\t\t\t\tAND leaderMail='$currentUserEmail'\t\t\n\t\t\t\t\t\t\");\n\n\t\t$memberNamesAvl = ResearchGroups::where('mails','Like',$currentUserEmail.'%')->get();\n\t\t$invCount = Invitations::where('leaderMail', '=', $currentUserEmail)->count();\n\t\t$role = Grouping::where('email','=',$currentUserEmail)->pluck('role');\n\n\t\t$isMember = Grouping::where('email','=',$currentUserEmail)->pluck('grouped');\n\n\t\t$grpStatus = ResearchGroups::where('mails','Like',$currentUserEmail.'%')->pluck('status');\n\n\t\tif (!$memberNamesAvl->isEmpty()){\n\t\t\t$memberNames = ResearchGroups::where('mails','Like',$currentUserEmail.'%')->pluck('mails');\n\n\t\t\t$string_version_names = preg_split(\"/\\//\", $memberNames);\n\n\t\t\t$memberCount = sizeof($string_version_names);\n\n\n\t\t}else{\n\t\t\t$memberCount = 0;\n\t\t}\n\n\t\tif($isMember != NULL && $role == \"leader\" && $grpStatus == \"Closed\"){\n\n\t\t\t$groupId = ResearchGroups::where('mails','Like',$currentUserEmail.'%')->pluck('groupID');\n\t\t\t$groupMembers = DB::select(\" SELECT *\n\t\t\tFROM students\n\t\t\tWHERE grouped = '$groupId'\n\t\t\tAND role = 'member'\n\t\t\tAND email!= '$currentUserEmail'\n\t\t\t\");\n\n\t\t\t$leaderMail = Grouping::where('grouped','=',$groupId)\n\t\t\t\t->where('role','=','leader')\n\t\t\t\t->first();\n\n\n\t\t\t$projectAvl = Project::where('studentId','=',$leaderMail->id)\n\t\t\t\t->where('groupID','=',$groupId)\n\t\t\t\t->orderBy('id', 'desc')->get();\n\n\t\t\tif (!$projectAvl->isEmpty()){\n\t\t\t\t$project = $projectAvl->first();\n\t\t\t\t$supervisorID = Project::where('groupID','=',$groupId)->pluck('supervisorId');\n\t\t\t\tif($supervisorID!=NULL){\n\t\t\t\t\t$supervisor = PanelMember::where('id','=',$supervisorID)->first();\n\t\t\t\t}else{\n\t\t\t\t\t$supervisor =NULL;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$project = NULL;\n\t\t\t\t$supervisor = NULL;\n\t\t\t}\n\t\t\t$user = Grouping::where('email','=',$currentUserEmail)->first();\n\n\t\t\treturn view('grouping.groupLeader',compact('groupMembers','leaderMail','memberCount','groupId','project','supervisor','user'));\n\t\t}elseif ($isMember != NULL && $role == \"member\"){\n\t\t\t$groupId = Grouping::where('email','=',$currentUserEmail)->pluck('grouped');\n\n\t\t\t$leaderMail = Grouping::where('grouped','=',$groupId)\n\t\t\t\t->where('role','=','leader')\n\t\t\t\t->first();\n\n\t\t\t$groupMembers = DB::select(\" SELECT *\n\t\t\tFROM students\n\t\t\tWHERE grouped = '$groupId'\n\t\t\tAND email != '$currentUserEmail'\t\n\t\t\t\t\t\t\t\t\n\t\t\t\");\n\n\t\t\t$projectAvl = Project::where('studentId','=',$leaderMail->id)\n\t\t\t\t->where('groupID','=',$groupId)\n\t\t\t\t->orderBy('id', 'desc')->get();\n\n\t\t\tif ($projectAvl->isEmpty()){\n\t\t\t\t$project = $projectAvl->first();\n\t\t\t\t$supervisorID = $project->supervisorId;\n\t\t\t\tif($supervisorID!=NULL){\n\t\t\t\t\t$supervisor = PanelMember::where('id','=',$supervisorID)->first();\n\t\t\t\t}else{\n\t\t\t\t\t$supervisor =NULL;\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$project = NULL;\n\t\t\t\t$supervisor = NULL;\n\t\t\t}\n\n\t\t\t$user = Grouping::where('email','=',$currentUserEmail)->first();\n\n\t\t\treturn view('grouping.groupMember',compact('groupMembers','leaderMail','memberCount','groupId','project','supervisor','user'));\n\t\t}\n\n\t\telse{\n\t\t\treturn view('grouping.grouping',compact('students','leaderName','invitations','invCount','memberCount'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "67e6535c575535cbf4af258735340dcb", "score": "0.40476596", "text": "function getBodyGroups($dataWeightTraining){\r\n\t\t$aBodyGroupsMostRecent = $dataWeightTraining->grabHistoricDataFromBodyPartList();\r\n\t\t\r\n\t\t//Output HTML list items for each Body Group\r\n\t\tfor($c = 0; $c < count($dataWeightTraining->a_body_groups); $c++){\r\n\t\t\techo \"<li id='option\".($c + 1).\"'><div class='label'><span class='label_value'>\".$dataWeightTraining->a_body_groups[$c].\"</span><div class='sublabel'>Last Exercise: \".$aBodyGroupsMostRecent[$c].\"</div></div><div class='add_btn'><img src='/images/spacer.png' width='30' height='30' /></div></li>\";\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "6991135f4bc92fab5df2f2ae4536b489", "score": "0.40406492", "text": "public function getDynamicSnippets() {return $this->dynamic;}", "title": "" }, { "docid": "9c50e1aaa3b12edec08af0cbe60aa4cb", "score": "0.4037383", "text": "function sel_arr_prog_rgl_by_prog_rgl_grp_id($prog_rgl_grp){\r\n\t\t$query_str = \"select \";\r\n\t\t$query_str .= \"\tt_prog_rgl.prog_id \";\r\n\t\t$query_str .= \"from \";\r\n\t\t$query_str .= \"\tt_prog_rgl \";\r\n\t\t$query_str .= \"where \";\r\n\t\t$query_str .= \"\tt_prog_rgl.prog_rgl_grp_id = :prog_rgl_grp_id and \";\r\n\t\tif(isset($prog_rgl_grp->client_id)){\r\n\t\t\t$query_str .= \"\tt_prog_rgl.client_id = :client_id and \";\r\n\t\t}\r\n\t\t$query_str .= \" t_prog_rgl.del_flag = 0 \";\r\n\t\t\r\n\t\t$arr_bind_param = array();\r\n\t\t$arr_bind_param[\":prog_rgl_grp_id\"] = $prog_rgl_grp->prog_rgl_grp_id;\r\n\t\tif(isset($prog_rgl_grp->client_id)){\r\n\t\t\t$arr_bind_param[\":client_id\"] = $prog_rgl_grp->client_id;\r\n\t\t}\r\n\t\t$query = DB::query(Database::SELECT, $query_str);\r\n\t\t$query->parameters($arr_bind_param);\r\n\t\t\r\n\t\treturn $query->execute($this->db, true);\r\n\t}", "title": "" }, { "docid": "992b35596e084cf3ee627bae5e93733f", "score": "0.40344948", "text": "public function getGroupDetails()\n {\n\n $whereArray = [\n [\"group_id\", '=', $this->request->input(\"group_id\")]\n ];\n $this->groupModel->setWhere($whereArray);\n $group = $this->groupModel->getData();\n\n return $group;\n }", "title": "" }, { "docid": "53fc5f20dd5fc80fa04ca17256102537", "score": "0.4029822", "text": "public function getReviewedItems()\n\t{\n\t\tif (empty($this->_pub->version_id))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t$review = array();\n\n\t\tif (!isset($this->_tbl))\n\t\t{\n\t\t\t$this->_tbl = new Tables\\Curation($this->_db);\n\t\t}\n\t\t$results = $this->_tbl->getRecords($this->_pub->version_id);\n\n\t\tif ($results)\n\t\t{\n\t\t\tforeach ($results as $result)\n\t\t\t{\n\t\t\t\t$prop = $result->block . '-' . $result->step;\n\t\t\t\t$prop .= $result->element ? '-' . $result->element : '';\n\t\t\t\t$review[$prop] = $result;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $review;\n\t}", "title": "" }, { "docid": "c2bf958a5d05db6e7e4693f14899e33c", "score": "0.402918", "text": "public function problems()\n {\n return $this->belongsToMany(\n Problem::class,\n Constants::TBL_PROBLEM_TAGS,\n Constants::FLD_PROBLEM_TAGS_TAG_ID,\n Constants::FLD_PROBLEM_TAGS_PROBLEM_ID\n );\n }", "title": "" }, { "docid": "868410a36d6fe2d0a0c56b3d19123484", "score": "0.4027453", "text": "function getTrackersInfo($group_id) {\n\n\t$arrTrackersInfo = array();\n\n\t$strQuery = 'SELECT group_artifact_id, name, simtk_is_public, simtk_allow_anon ' .\n\t\t'FROM artifact_group_list WHERE group_id=$1';\n\t$resTracker = db_query_params($strQuery, array($group_id));\n\twhile ($theRow = db_fetch_array($resTracker)) {\n\t\t$arrInfo = array();\n\t\t$name = $theRow['name'];\n\t\t$arrInfo['atid'] = $theRow['group_artifact_id'];\n\t\t$arrInfo['is_public'] = $theRow['simtk_is_public'];\n\t\t$arrInfo['allow_anon'] = $theRow['simtk_allow_anon'];\n\t\t$arrTrackersInfo[$name] = $arrInfo;\n\t}\n\n\treturn $arrTrackersInfo;\n}", "title": "" }, { "docid": "6763152287718046b6f00468571633af", "score": "0.40271622", "text": "function qr_getRallyeItems($rID){\n\tif( $rID )\n\t\treturn qr_dbSQL(\"SELECT qr_items_iID FROM qr_rallyes_has_items WHERE qr_rallyes_rID = \".$rID);\n}", "title": "" }, { "docid": "2bd6cfcd7eb5afa693f1a254adf657e9", "score": "0.4026413", "text": "public function group() {\n\t\treturn self::sectionGroups($this->_group);\n\t}", "title": "" }, { "docid": "ad9d2d736754ed955c1f42ecb825d03d", "score": "0.40248355", "text": "public static function getExtendScholarshipReasons(){\n return ScholarshipReason::where('extend', 1)->get();\n }", "title": "" }, { "docid": "375b9786097ad1cb24565ba24c1e7b12", "score": "0.40226123", "text": "public function getGroupUri($groupname) //group name have prepended by GROUP_\n\t{\n\n\t\t\t$subgroups = explode('/',$groupname);\n\t\t$subgroup_size = sizeof($subgroups);\n\t//echo $subgroup_size;\n\t\n\t$sql = 'SELECT\n\tSUBJECT \nFROM\n\tstatements\nWHERE\n\tSUBJECT IN (\n\t\tSELECT\n\t\t\tSUBJECT\n\t\tFROM\n\t\t\tstatements\n\t\tWHERE\n\t\t\tobject IN (\n\t\t\t\n\t\t\t\tSELECT\n\t\t\t\t\tSUBJECT \n\t\t\t\tFROM\n\t\t\t\t\tstatements\n\t\t\t\tWHERE\n\t\t\t\t\tSUBJECT IN (\n\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\tSUBJECT\n\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\tstatements\n\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\tobject IN (\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\tSUBJECT \n\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\tstatements\n\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\tSUBJECT IN (\n\t\t\t\t\t\t\t\t\t\tSELECT\n\t\t\t\t\t\t\t\t\t\t\tSUBJECT\n\t\t\t\t\t\t\t\t\t\tFROM\n\t\t\t\t\t\t\t\t\t\t\tstatements\n\t\t\t\t\t\t\t\t\t\tWHERE\n\t\t\t\t\t\t\t\t\t\t\tpredicate = \"http://www.w3.org/2000/01/rdf-schema#subClassOf\"\n\t\t\t\t\t\t\t\t\t\tAND object = \"http://www.tao.lu/Ontologies/TAOGroup.rdf#Group\"\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\tAND predicate = \"http://www.w3.org/2000/01/rdf-schema#label\"\n\t\t\t\t\t\t\t\tAND object = \"'.$subgroups[0].'\" #==========================================================\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\tAND predicate = \"http://www.w3.org/2000/01/rdf-schema#subClassOf\"\n\t\t\t\t\t)\n\t\t\t\tAND predicate = \"http://www.w3.org/2000/01/rdf-schema#label\"\n\t\t\t\tAND object = \"'.$subgroups[1].'\" #++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n\t\t\t)\n\t\tAND predicate = \"http://www.w3.org/1999/02/22-rdf-syntax-ns#type\"\n\t)\nAND object = \"'.$subgroups[2].'\"';\n\n\t\t$result = mysqli_query($this->tao_con,$sql);\n\t\t$row = mysqli_fetch_array($result);\n\t\treturn $row;\n\n\t}", "title": "" }, { "docid": "2bcf3124962417c4c0a0fd1bb7dc6a08", "score": "0.40216315", "text": "public function SeeDoneGroup($eID) {\n\n try {\n /* * * * * * * * * * * * * * * * * * * * * * * * *\n * GET GROUPS ID\n */\n $array = array();\n $i = 0;\n foreach ($eID as $key => $eID) {\n $select = $this->connexion->prepare(\"SELECT A.*, SUM(B.donate_amount) as total, C.group_group_id, C.event_event_id\n FROM \" . PREFIX . \"group A, \" . PREFIX . \"donate B, \" . PREFIX . \"event_has_group C\n WHERE A.group_id = C.group_group_id \n AND B.group_group_id = A.group_id \n AND A.group_valid = 1\n AND C.event_event_id = :id\n GROUP BY B.group_group_id \n HAVING total >= A.group_money\");\n\n $select->bindValue(':id', $eID['event_id'], PDO::PARAM_INT);\n $select->execute();\n $select->setFetchMode(PDO::FETCH_ASSOC); \n $group = $select->fetchAll();\n $select->closeCursor();\n\n $eID['event_nb_team'] = count($group);\n $array[$i] = $eID;\n \n $i ++;\n }\n\n return $group;\n } catch (Exception $e) {\n echo 'Message:' . $e->getMessage();\n } \n }", "title": "" }, { "docid": "5fd38195e8b169835b58c85826be92a3", "score": "0.4020155", "text": "public function get_group_suggestions_for_feed($limit)\r\n\t{\r\n\t\t$all_suggested_groups = $this->get_public_groups_where_student_is_not_member();\r\n\t\t$number_of_suggestions = count($all_suggested_groups);\r\n\t\tif($number_of_suggestions > $limit)\r\n\t\t{\r\n\t\t\t$random_suggestions = array_rand($all_suggested_groups, $limit);\r\n\t\t\t$suggestions = array();\r\n\t\t\tfor($i = 0; $i < $limit; $i++)\r\n\t\t\t{\r\n\t\t\t\t$suggestions[] = $all_suggested_groups[$random_suggestions[$i]];\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$suggestions = $all_suggested_groups;\r\n\t\t}\r\n\t\treturn $suggestions;\r\n\t}", "title": "" }, { "docid": "b8cc68a6f1eaba1ff75b70030d96cca1", "score": "0.40192252", "text": "public function getskillCategoriesByExercisesets() {\n $topics = Topic::where('approve_status', '=', 'approved')->paginate(25);\n $exercisets_ids = explode(\",\", request('exercises'));\n \n $exercisets = Exerciseset::whereIn('id', $exercisets_ids)->groupBy('grade_id')->get();\n\n $disciplineIds = [];\n\n foreach($exercisets as $exercise){\n $skill_category = Skillcategory::where('discipline_id','=', $exercise->discipline_id)\n ->where('approve_status','=','approved')->where('publish_status','=','published')\n ->with(['skill' => function($skill) use($exercise){\n $skill->where('grade_id','=', $exercise->grade_id)\n ->where('approve_status','=','approved')->where('publish_status','=','published')\n ->groupby('skill_category_id')->get();\n }])->get();\n \n if(!in_array($exercise->discipline_id,$disciplineIds)){\n array_push($disciplineIds,$exercise->discipline_id);\n }\n\n $exercise['skill_category'] = $skill_category;\n \n }\n\n $skillExercisets = Discipline::whereIn('id', $disciplineIds)->with(['skillcategories' => function ($skillcategories) {\n $skillcategories->with(['skill' => function ($skill) {\n $skill->with(['grade','skillQuestion']);\n }\n ])->get();\n }\n ])->get();\n \n return view('topics.skill')->with(['topics' => $topics, 'exercisets' => $exercisets, 'exercisets_ids' => request('exercises'), 'skillExercisets' => $skillExercisets ]);\n }", "title": "" }, { "docid": "bc48af6471acc1beb89faf4d49ea6fe6", "score": "0.4015701", "text": "public function summary()\n {\n return Model_Solution::summary_for_problem($this->problem_id);\n }", "title": "" }, { "docid": "ba51ce7887b2a381b9230b27787dfa66", "score": "0.40144476", "text": "public function getExternalGroupIds();", "title": "" }, { "docid": "0adf0d4e5ba2723f3565afd49192e7f0", "score": "0.4013653", "text": "function getFullList()\n {\n $where = \" WHERE lecture_id=\" . $this->lecture_id . \" AND year=\" . $this->schoolyear;\n return $this->getList('*', $where, 'group_id');\n }", "title": "" }, { "docid": "9db699c2123fa45945566f1faabc4d1b", "score": "0.40108055", "text": "public function getSnippet()\n {\n return $this->snippet;\n }", "title": "" }, { "docid": "b9a8884bbe109b114b58725e8b303194", "score": "0.40107915", "text": "public function getQuestgroupById($questgroupId)\n {\n $data = $this->db->query(\n 'SELECT id, title, url, questgroupspicture_id, achievable_xps '.\n 'FROM questgroups '.\n 'WHERE questgroups.id = ?',\n 'i',\n $questgroupId\n );\n if(empty($data)) {\n throw new \\nre\\exceptions\\IdNotFoundException($questgroupId);\n }\n\n\n return $data[0];\n }", "title": "" }, { "docid": "3c41452560194f8d8b149513d182c835", "score": "0.40094557", "text": "public function getQuestionaires() {\n \t$qry = sprintf(\"SELECT itemID, label FROM tblQuestionnaires WHERE hrUserID = '%d' AND sysOpen = '1' AND sysActive = '1'\", (int)$this->userID);\n \t$res = $this->db->query($qry);\n \t\n \t$questionaires = array();\n \tif ($this->db->valid($res)) {\n \twhile ($q = $this->db->fetch_assoc($res)) {\n \t$questionaires[$q['itemID']] = $q['label'];\n \t}\n \t}\n \treturn $questionaires;\n }", "title": "" }, { "docid": "0a6ed7aaba3b061f5c6d5f0ea6c42b25", "score": "0.40086266", "text": "function recipesupplies_get(){\n $key = $this->get('id');\n \n $result = $this->recipes->getIngredients($key);\n if ($result != null){\n $this->response($result, 200);\n } else{\n $this->response(array('error' => 'Recipes for item not found!'), 404);\n }\n }", "title": "" }, { "docid": "7202082561ef891a40c6496257793680", "score": "0.4007403", "text": "function getGroupTemplate($name){\n\t\t//$name = $this->_formatFieldName($name);\n\t\t$group = $this->_parentTable->getTableField($name);\n\t\t\n\t\t//$group = $this->_parentTable->getField($name);\n\t\t$context = array( 'group'=>&$group, 'content'=>'{content}');\n\t\t$skinTool =& Dataface_SkinTool::getInstance();\n\t\tob_start();\n\t\t$skinTool->display($context, 'Dataface_Quickform_group.html');\n\t\t$o = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\treturn $o;\n\t}", "title": "" }, { "docid": "57ee23e1b629fdce65bdab79498180f4", "score": "0.40061203", "text": "private function get_buddy_ids_for_group_that_can_be_invited($group_id)\r\n\t{\r\n\t\t$possible_buddy_ids = array();\r\n\t\t$buddy_ids = $this->get_all_buddy_ids();\r\n\t\tforeach ($buddy_ids as $buddy_id)\r\n\t\t{\r\n\t\t\tif ($this->check_if_buddy_is_part_of_group($buddy_id, $group_id) === FALSE)\r\n\t\t\t{\r\n\t\t\t\t$possible_buddy_ids[] = $buddy_id;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $possible_buddy_ids;\r\n\t}", "title": "" }, { "docid": "7880c3ae0d58e968e2a737bca6a11d08", "score": "0.40031493", "text": "public function get($group)\n {\n // See if the group has been registered directly.\n $pool = $this->getGroup($group);\n\n // Lookup alias if not found.\n if (null === $pool) {\n // Check if alias is present.\n try {\n $pool = $this->getGroup($this->groupManager->get($group));\n } catch (\\LogicException $exception) {\n }\n }\n\n if (null === $pool) {\n $pool = $this->getGroup('');\n }\n\n if (null === $pool) {\n $pool = $this->factory->getFallbackPool();\n }\n\n return $pool;\n }", "title": "" } ]
b730eca958b3120636890c6e3e724dc4
echo ""; print_r( $data ); echo "";exit;
[ { "docid": "62d76c8b56fddfda257a73c092ff10ad", "score": "0.0", "text": "public function form_mapForm($form,$data){\r\n $name = $data['name'];\r\n $key = $data['shortcode'];\r\n $oriKey = $data['oriKey'];\r\n if(!$key)$key = Util::inflect($name,'u');\r\n\r\n $type = $data['type'];\r\n\r\n $allMaps = Util::toArray($this->setting(\"mappings.$type\"));\r\n unset($data['typeOfMapping'],$data['type'],$data['shortcode'],$data['oriKey']);\r\n $allMaps[$key] = $data;\r\n //see if key has changed\r\n if($oriKey && $oriKey !== $key){\r\n //need to delete old key\r\n unset($allMaps[$oriKey]);\r\n }\r\n $this->setting(\"mappings.$type\",$allMaps);\r\n $block = $form->screen()->element(\"blockGrid.top.$type\");\r\n $table = $block->element(\"table$type\");\r\n $this->__addMapsTable($table,$type);\r\n return $block->render(array('who'=>$type));\r\n }", "title": "" } ]
[ { "docid": "98c738a6bc8945b9eaaff923c66266ff", "score": "0.8011932", "text": "function pr($data){\n\t\techo \"<pre>\"; print_r($data); \n\t\texit;\n\t}", "title": "" }, { "docid": "b7864e44449bb471811dcb12c18c981b", "score": "0.78087866", "text": "function print_data($data, $exit = false)\n{\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n if ($exit) {\n exit;\n }\n}", "title": "" }, { "docid": "558e0b74a055d643f47b6190d2ecffab", "score": "0.77951944", "text": "private function printe($data){\n print_r($data);\n return;\n }", "title": "" }, { "docid": "467812b68cbe600e0eb70e9fc0694a86", "score": "0.77768564", "text": "function out($data){\n\techo '<pre>'.print_r($data, true).'</pre>';\n}", "title": "" }, { "docid": "f598265ef79b0f186460f84e0308a50d", "score": "0.7776844", "text": "function pr( $data ) { \n\techo \"<pre>\";\n\tprint_r($data);\n\techo \"</pre>\";\n}", "title": "" }, { "docid": "d2f262a7635dc225e90447d39b5c150d", "score": "0.7514144", "text": "function pr($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "title": "" }, { "docid": "be478fed27614decdb807b1c43494631", "score": "0.7497609", "text": "function dump($data)\n {\n echo '<pre>' . var_export($data, true) . '</pre>';\n }", "title": "" }, { "docid": "6667a931fef1d9f1d8cc42755a4d166d", "score": "0.7399132", "text": "function print_array($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "title": "" }, { "docid": "3eb8bd2d75becfaa00330af527f256c7", "score": "0.7352815", "text": "function ppd($data)\n {\n $output = '<pre>';\n $output .= print_r($data, true);\n $output .= '</pre>';\n\n echo $output;\n die;\n }", "title": "" }, { "docid": "bd1adb50bf95fabdfbce945c5b3ed1d2", "score": "0.7346058", "text": "function debug($data)\n{\n\techo '<pre>';\n\techo print_r($data);\n\techo exit();\n}", "title": "" }, { "docid": "64ae77e2e29403e441aa3275024145fc", "score": "0.73231435", "text": "function pr($data) {\n\treturn '<pre>' . print_r($data, true) . '</pre>';\n}", "title": "" }, { "docid": "984f7f3351d0210e54b174dad9b621ce", "score": "0.7275232", "text": "function debug($data){\n echo '<pre>'.print_r($data, true).'</pre>';\n}", "title": "" }, { "docid": "8167c3e85fcfb510911e9152c6e81a68", "score": "0.71465033", "text": "function debug($data){\n\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n\n}", "title": "" }, { "docid": "35523b426d513ff9a18042e7c9ee1be1", "score": "0.71313125", "text": "function showArray($data)\n{\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "title": "" }, { "docid": "57ecdcd32b9317c86286eb0022d973f7", "score": "0.7074393", "text": "function pr($data = null){\n\techo \"<pre>\";\n\tprint_r($data);\n\techo \"</pre>\";\n}", "title": "" }, { "docid": "39464070e779e05b1fd7d3354511072f", "score": "0.69976157", "text": "function sh_pr($data){\n //check\n if(is_array($data) || is_object($data)) {\n echo \"<pre>\";\n print_r($data);\n echo \"</pre>\";\n }else{\n print $data;\n }\n}", "title": "" }, { "docid": "ec8aeeee6c504c7ebfb4c07f87cf6f2a", "score": "0.6982325", "text": "function imprimir($data){\n echo \"<pre>\";\n var_dump($data);\n echo \"</pre>\";\n}", "title": "" }, { "docid": "970b6d9e81e1a287185489cec5acd936", "score": "0.68966025", "text": "function p($data){\n\t\tdump($data, 1, '<pre>', 0);\n\t}", "title": "" }, { "docid": "ae1c7af3eb02f988a56b36f90abe2f09", "score": "0.68340135", "text": "function dd($data)\n\t{\n\t\t$elem='<pre>';\n\t\t$elem.=print_r($data);\n\t\t$elem.=die;\n\t\t$elem.='</pre>';\n\t\treturn $elem;\n\t}", "title": "" }, { "docid": "d01e153cfe36b8353e0462d77f76e2e7", "score": "0.68264896", "text": "function web_debug ($data) {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n}", "title": "" }, { "docid": "65a68ec0776890823d193427df222e5a", "score": "0.67707133", "text": "public function debuging(){\n echo \"<pre>\";\n print_r($this->data);\n echo \"</pre>\";\n }", "title": "" }, { "docid": "3acec936f7a28f2a679247972a0d68b3", "score": "0.67433083", "text": "function dnd($data)\n{\n echo \"<pre>\";\n var_dump($data);\n echo \"</pre>\";\n die;\n}", "title": "" }, { "docid": "f842e5fb1c471716ace04c3f981a48e4", "score": "0.67407614", "text": "function wp_print_r( $args, $die = true ) { \n\t\n $echo = '<pre>' . print_r( $args, true ) . '</pre>';\n\t\t\n if ( $die ) die( $echo );\n \telse echo $echo;\n\t\t\n }", "title": "" }, { "docid": "4b333d1d167e1aac71f34b05defca3f9", "score": "0.67200756", "text": "public function print_r(){\n \techo $this->as_string().\"<br />\\n\".\"<br />\\n\";\n }", "title": "" }, { "docid": "918dada7aae65abe2fb7b2e527e3a8a8", "score": "0.67072725", "text": "function s_print_r($info, $pre = false) {\r\n\t\tob_start();\r\n\t\tif ($pre)\r\n\t\t\techo '<pre>';\r\n\t\tprint_r($info);\r\n\t\tif ($pre)\r\n\t\t\techo \"</pre>\";\r\n\t\t$txt = ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\treturn $txt;\r\n\t}", "title": "" }, { "docid": "d90ab081135acc1239d22467b51b62c1", "score": "0.6700602", "text": "function print_r($var,$flag=FALSE)\r\n{\r\n $ret = '<pre>';\r\n $ret.= \\print_r($var,TRUE);\r\n $ret.= '</pre>';\r\n if ($flag) echo $ret;\r\n else return $ret;\r\n}", "title": "" }, { "docid": "fde075df0db02b540c1171b326775878", "score": "0.6662294", "text": "function pre($data){\n\techo '<pre>';\n\tvar_dump($data);\n\techo '</pre>';\n\n}", "title": "" }, { "docid": "9b61b3a8900d8575a0e819fc744641cc", "score": "0.6653363", "text": "function pre_r ($array){\r\n echo '<pre>';\r\n print_r($array);\r\n echo '</pre>';\r\n}", "title": "" }, { "docid": "96b0ae275fb051c56d3fb88d5cb9307b", "score": "0.66450447", "text": "function dd($data)\n {\n echo '<pre>' . var_export($data, true) . '</pre>';\n die(1);\n }", "title": "" }, { "docid": "ccc0f1847c21fd919a639c119e30af9d", "score": "0.66315615", "text": "public static function printData($data,$exit=true)\r\n {\r\n if(!headers_sent())\r\n header('Content-type: application/json');\r\n echo json_encode($data,true);\r\n if($exit) exit();\r\n }", "title": "" }, { "docid": "4d6ffd08af5a4e3a7136604638ff3427", "score": "0.6614734", "text": "function dump($value) // to be deleted soon\n\n{\n echo \"<pre>\", print_r($value, true), \"</pre>\";\n die();\n}", "title": "" }, { "docid": "43f9b74f246a1f02c2fc7c60b8a3a1b8", "score": "0.6580242", "text": "function print_pre($mixed) { \r\n echo '<pre>'; \r\n print_r($mixed);\r\n echo '</pre>';\r\n\tob_flush(); flush();\r\n}", "title": "" }, { "docid": "e7f8d6d1d89d80d34ac466783714476f", "score": "0.6568114", "text": "function print_r2($val){\n echo '<pre style=\"color:white !important;\">';\n print_r($val);\n echo '</pre>';\n}", "title": "" }, { "docid": "a1e9106cd3d8fbfefdf0265f96356590", "score": "0.65666986", "text": "function dumpJson($mData)\n {\n header('Content-Type: application/json');\n echo json_encode($mData, JSON_PRETTY_PRINT);\n die();\n }", "title": "" }, { "docid": "6202359f0cb5f5a14e89af87ab5fc3df", "score": "0.6561383", "text": "public function debug($data){\n\t\n\t\tif(is_array($data)) {\n\t\t\tprint \"<pre>-----------------------\\n\";\n\t\t\tprint_r($data);\n\t\t\tprint \"-----------------------</pre>\";\n\t\t}elseif(is_object($data)){\n\t\t\tprint \"<pre>==========================\\n\";\n\t\t\tvar_dump($data);\n\t\t\tprint \"===========================</pre>\";\n\t\t}else{\n\t\t\tprint \"=========&gt; \";\n\t\t\tvar_dump($data);\n\t\t\tprint \" &lt;=========\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "5ba7491b1d19fd18fdadbf8da21ab296", "score": "0.65460825", "text": "function print_r2($val) {\n echo '<pre>';\n print_r($val);\n echo '</pre>';\n}", "title": "" }, { "docid": "a3a8c846cdf2b81d04dd417ce08433e8", "score": "0.6481364", "text": "function e($amData,$bFlag = 1)\n{\n if(is_array($amData) || is_object($amData))\n {\n echo \"<PRE>\";\n print_r($amData);\n echo \"</PRE>\";\n\n if($bFlag)\n exit;\n }\n else\n {\n echo \"<PRE>\";\n echo $amData;\n echo \"</PRE>\";\n if($bFlag)\n exit;\n }\n}", "title": "" }, { "docid": "1cb40124d098fbfb9ca24e75aa48c6b5", "score": "0.6461447", "text": "function out($data){\n\tif(is_object($data))$data = get_object_vars($data);\n\tif(is_array($data)){\n\t\techo '<table border=\"1\" style=\"border:solid 2px black;border-collapse: collapse;margin-left:5px;\" bgcolor=\"#ffffff\">';\n\t\techo '<tr style=\"background-color:#ffffaa\"><th style=\"background-color:#ffffaa\">key</th><th style=\"background-color:#ffffaa\">value</th></tr>';\n\t\tforeach($data as $key => $value){\n\t\t\techo '<tr style=\"background-color:#ffffff\"><td style=\"background-color:#ffffff\">';\n\t\t\techo $key;\n\t\t\techo '</td><td>';\n\t\t\tif($key !== 'GLOBALS'){\n\t\t\t\tout($value);\n\t\t\t}\n\t\t\techo '</td></tr>';\n\t\t}\n\t\techo '</table>';\n\t}else{\n\t\techo '<div>';\n\t\tif(is_string($data)){\n\t\t\techo h($data);\n\t\t}else{\n\t\t\tvar_dump($data);\n\t\t}\n\t\techo '</div>';\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "4cda747e259d78d2b3224750653d4af3", "score": "0.64486414", "text": "function dameDato($dato){\n echo '<pre>';\n print_r($dato);\n echo '</pre>';\n die();\n}", "title": "" }, { "docid": "fbb3e9253052fcc2082905a90e03d6c6", "score": "0.6446544", "text": "function pr($data)\n{\n if (!isTraining()) {\n return;\n }\n\n echo '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n\n // is array, object\n if (is_object($data) || is_array($data)) {\n echo '<pre style=\"background-color:#def;color:#000;text-align:left; font-size: 8px; font-family: Hack,dina\">';\n print_r($data);\n echo '</pre>';\n return;\n }\n\n // is json\n if (is_string($data)\n && is_array(json_decode($data, true))\n && (json_last_error() == JSON_ERROR_NONE)\n ) {\n echo '<pre style=\"background-color:#def;color:#000;text-align:left; font-size: 8px; font-family: Hack,dina\">';\n print_r( json_encode($data, JSON_PRETTY_PRINT) );\n echo '</pre>';\n return;\n }\n\n echo '<pre style=\"background-color:#def;color:#000;text-align:left; font-size: 8px; font-family: Hack,dina\">';\n echo $data;\n echo '</pre>';\n}", "title": "" }, { "docid": "5207db41f05c4d26d657556e3a19330a", "score": "0.641066", "text": "function printr($a_str)\r\n{\r\n echo \"<pre>\";\r\n print_r($a_str);\r\n echo \"</pre>\";\r\n}", "title": "" }, { "docid": "d4854624c6be83e89362cdbb37d4b796", "score": "0.63936526", "text": "function dd( $data ) {\n\n\techo '<pre>';\n\tdie( var_dump( $data ) );\n\techo '</pre>';\n}", "title": "" }, { "docid": "bb3b534ebd58c427c1a0e5df7fe7bff1", "score": "0.63803184", "text": "function dump($data, $pre=FALSE) {return Ashtree_Common_Debug::dump($data, $pre);}", "title": "" }, { "docid": "ab2dfae64a9a7e7238859261b0795630", "score": "0.63720196", "text": "public static function pp($data){\n\t\techo '<pre>';print_r($data);die();\n\t}", "title": "" }, { "docid": "006845bb9efc61a8f8c168571396dd94", "score": "0.6370701", "text": "public function dumpd()\n {\n array_map('var_dump', $this->get());\n die();\n }", "title": "" }, { "docid": "f529dd762304ced427bc90ae0ce8efb4", "score": "0.6360561", "text": "function dump($input)\n{\n printf('<pre>%s</pre>', print_r($input, true));\n}", "title": "" }, { "docid": "5e4e6f3027c3760d26b47dd602ea3685", "score": "0.6350514", "text": "function dumpit($v)\n{\n echo \"<pre>\";\n print_r($v);\n echo \"</pre><br>\";\n}", "title": "" }, { "docid": "09daab7af57d0e5d03e2c0de73f37da6", "score": "0.63307136", "text": "function debug_r($arr)\n\t{\n\t\techo '<pre>';\n\t\tprint_r($arr);\n\t\techo '</pre>';\n\t}", "title": "" }, { "docid": "d38212478681a0cd072e5c4c78523b66", "score": "0.6320149", "text": "public function printr()\n {\n echo '<pre>';\n array_map('print_r', $this->get());\n echo '</pre>';\n }", "title": "" }, { "docid": "ef38748c7fd583b27f27ba357d0ce8d4", "score": "0.63157225", "text": "function dd($data){\n\techo '<pre>';\n\tvar_dump($data);\n\techo '</pre>';\n\tdie;\n}", "title": "" }, { "docid": "2b2d2be68d926ce5fe5ede9aff931e1d", "score": "0.6313186", "text": "function formatData($data){\n $format = print_r('<pre>');\n $format .= print_r($data);\n $format .= print_r('</pre>');\n return $format;\n }", "title": "" }, { "docid": "3c15bb896ae98bc1c8c00ad40ea663e9", "score": "0.6304963", "text": "function dumparray($array) {\n\techo '<pre style=\"text-align: left;\">' . print_r($array, true) . '</pre>';\n}", "title": "" }, { "docid": "7fd401d3cc4364233af0a44b4e011a3e", "score": "0.6293106", "text": "function prd($var){\n\techo '<pre>';\n\tprint_r($var);\n\techo '</pre>';\n\texit;\n}", "title": "" }, { "docid": "fda2492b785881f0c66f33353c91f5d2", "score": "0.6290742", "text": "function debug_to_console( $data ) \n\t\t{\n\t\t\tif ( is_array( $data ) )\n\t\t\t\t$output = \"<script>console.log( 'Debug Objects: \" . implode( ',', $data) . \"' );</script>\";\n\t\t\telse\n\t\t\t\t$output = \"<script>console.log( 'Debug Objects: \" . $data . \"' );</script>\";\n\n\t\t\techo $output;\n\t\t}", "title": "" }, { "docid": "ee3bd21bd475ef1b083b7d313c9d3658", "score": "0.629063", "text": "function Console($data) {\n\t$data = print_r($data, true);\n\t$backtrace = \"\";\n\tforeach(debug_backtrace() as $_trace) {\n\t\t$backtrace[] = basename($_trace['file']) . \":\" . $_trace['line'];\n\t}\n\t$backtrace = join(\" < \", $backtrace);\n\t$data = $backtrace . \"\\n\" . $data;\n\tprint($data);\n\tflush();\n}", "title": "" }, { "docid": "6663038d37b098f1fda49227b2f2d115", "score": "0.62723774", "text": "function coresurvey_debug($object) {\n echo '<pre class=\"tleft\">';\n\n print_r($object);\n\n echo '</pre>';\n}", "title": "" }, { "docid": "fdb698ed3e6b4db458180667316cd794", "score": "0.6255025", "text": "function logArray($d){\r\n echo \"<pre>\";\r\n //print_r($d);\r\n var_dump($d);\r\n echo \"</pre>\";\r\n}", "title": "" }, { "docid": "59172a54741894f38a3e1ff634d956e5", "score": "0.6249403", "text": "function debug($arr){\n echo '<pre>' . print_r($arr, true) . '</pre>';\n\n}", "title": "" }, { "docid": "3ec1a178c6686199c661a36e7260ca7c", "score": "0.6248408", "text": "public function dump()\n\t{\n\t\treturn;\n\t}", "title": "" }, { "docid": "36b288444827f9a73de29b48d184959a", "score": "0.624821", "text": "function print_r_pre($array) {\n\t$array = (array) $array;\n\techo '<pre>';\n\tprint_r($array);\n\techo '</pre>' . \"\\n\";\n}", "title": "" }, { "docid": "24ef186f8614a562a54d2c6226ade56f", "score": "0.62335205", "text": "function bug($var = false)\n{ \n echo '<pre>' . htmlspecialchars(print_r($var, true)) . '</pre>'; \n die(); \n}", "title": "" }, { "docid": "17fbb3cde73929f7b9fe091775ed2365", "score": "0.6228869", "text": "function print_arr($in_arr){\n echo \"<pre>\";\n print_r($in_arr);\n echo \"</pre>\";\n return None;\n}", "title": "" }, { "docid": "ac1c7c321ba17fd10e13f57ea912391b", "score": "0.62273884", "text": "public function var_dump_ret($mixed = null) {\n\tob_start();\n\tvar_dump($mixed);\n\t$content = ob_get_contents();\n\tob_end_clean();\n\treturn \"<pre>\".$content.\"</pre>\";\n }", "title": "" }, { "docid": "9059cd0fd7bce6027d882b9a97aae276", "score": "0.62260324", "text": "function preShow( $arr, $returnAsString=false ) {\r\n $ret = '<pre>' . print_r($arr, true) . '</pre>';\r\n if ($returnAsString)\r\n return $ret;\r\n else \r\n echo $ret; \r\n}", "title": "" }, { "docid": "ff9f89d993a392d59f6a836f7b87ad6b", "score": "0.62249005", "text": "function dump($array) {\n return \"<pre>\" . htmlentities(print_r($array, 1)) . \"</pre>\";\n}", "title": "" }, { "docid": "a89a233ed7abbe910417d3092a7f2399", "score": "0.6220317", "text": "protected function _printData($data) {\n echo \"Data\\n\";\n echo \"====\\n\";\n foreach ($data as $key => $value) {\n if (is_array($value)) {\n echo ucfirst($key) . \"\\n\";\n echo str_repeat('-', strlen($key)) . \"\\n\";\n $this->_printDataArray($value);\n echo \"\\n\";\n } else {\n echo \" - \" . $key . \":\\t\\t\" . $value . \"\\n\";\n }\n }\n echo \"\\n\";\n }", "title": "" }, { "docid": "e7f1c6b48254825a00005d9811fd08a2", "score": "0.6212087", "text": "function debug($x) { \n echo \"<pre style='border: 1px solid black'>\"; \n print_r($x); \n echo '</pre>'; \n}", "title": "" }, { "docid": "32674cd09cb7d18cdde2c77c3677257d", "score": "0.6206654", "text": "function s_var_dump($info, $pre = false) {\r\n\t\tob_start();\r\n\t\tif ($pre)\r\n\t\t\techo '<pre>';\r\n\t\tvar_dump($info);\r\n\t\tif ($pre)\r\n\t\t\techo \"</pre>\";\r\n\t\t$txt = ob_get_contents();\r\n\t\tob_end_clean();\r\n\t\treturn $txt;\r\n\t}", "title": "" }, { "docid": "31de7b2b7353fc8baa383ed869720455", "score": "0.61908334", "text": "function bd_var_dump( $vars, $exit = false ) {\n\n\techo \"<pre>\";\n\tvar_dump($vars);\n\techo \"</pre>\";\n\n\tif ( $exit ) exit;\n}", "title": "" }, { "docid": "613f76f569304f6725457268d3cd51e1", "score": "0.6183765", "text": "function preprint()\r\n\t{\r\n\t\techo \"<pre>\";\r\n\t\tprint_r($this->row);\r\n\t\techo \"</pre>\";\r\n\t}", "title": "" }, { "docid": "1b72556c62132e9c274d5a485f7388c9", "score": "0.6175075", "text": "public function displayData()\n {\n var_dump($this->getData());\n }", "title": "" }, { "docid": "5b864cab29a20d659e24e2edce15edd3", "score": "0.6170436", "text": "function dnd($data)\n{\n echo '<pre class=\"bg-light\">';\n var_dump($data);\n echo '</pre>';\n die(\"Test or debugging mode\");\n}", "title": "" }, { "docid": "556934b678a5d9d9329246a31f2f2619", "score": "0.61564153", "text": "public static function dump($data, $exit = true) {\r\n print(\"<pre>\");\r\n\r\n if(is_object($data) || is_array($data))\r\n print_r($data);\r\n else\r\n print($data);\r\n\r\n if($exit)\r\n die;\r\n }", "title": "" }, { "docid": "971a7d2787c004328b71f79f5e15917b", "score": "0.61542946", "text": "function printArray(array $array) {\n echo '<pre>' . print_r($array, true) . '</pre>';\n}", "title": "" }, { "docid": "af3c7150a92dbdb42073c554de542cc7", "score": "0.6149023", "text": "function print_r2($val)\r\n{\r\n\techo '<pre><font color=\"red\"><b>'; print_r($val); echo '</b></font></pre>';\r\n}", "title": "" }, { "docid": "871cebddd6f3b349d219dc4ebdd35fb8", "score": "0.61356467", "text": "function show_array($array)\n{ \n\techo \"<pre>\";\n\tprint_r($array);\n\techo \"</pre>\";\n}", "title": "" }, { "docid": "fc0473e58eaf137af216bbf8d9c647f2", "score": "0.61312604", "text": "function debug($arr){\n echo '<pre>' . print_r($arr, true) . '</pre>';\n}", "title": "" }, { "docid": "8c219741afe4b0a12010726b2854f4e7", "score": "0.61075866", "text": "function _d($value)\n{\n die('<pre>' . print_r($value, true) . '</pre>');\n}", "title": "" }, { "docid": "b147f8762c4d098c3d5cbf70bdc1ea05", "score": "0.610138", "text": "function pr($val) {\n echo '<pre>';\n print_r($val);\n echo '</pre>';\n}", "title": "" }, { "docid": "112220b26a8ac423b236af253e97ba5a", "score": "0.60977036", "text": "function xdump($arr,$stop=false) {\n\t$arr=(array) $arr; \n\td($arr);\n\tif($stop) {die();}\n}", "title": "" }, { "docid": "d4251a70b2af5ceb2ee2b16ac463ca81", "score": "0.6066394", "text": "function dumpInnhold($var){\n\techo '<pre>';\n\tprint_r($var);\n\techo '</pre>';\n}", "title": "" }, { "docid": "0043a66a7d58f2c1d6cf6feea10fab11", "score": "0.60546464", "text": "function show($data, $writeLog=false)\n{\n if (is_object($data) || is_array($data)) {\n print_r($data);\n\n if ($writeLog) {\n di('log')->record(\n print_r($data, true)\n );\n }\n }\n else {\n echo $data;\n echo \"\\n\";\n\n if ($writeLog) {\n di('log')->record($data);\n }\n }\n}", "title": "" }, { "docid": "551478c0e0e98ab04da9f0668fbf2e29", "score": "0.60491437", "text": "function d($arr) { \n print_r('<pre>');\n print_r($arr);\n print_r('</pre>');\n}", "title": "" }, { "docid": "b5dde83ae244eb9a37c0e7a85a5eab81", "score": "0.60480547", "text": "function show($arr) {\n\n echo '<pre>';\n print_r($arr);\n echo '</pre>';\n\n}", "title": "" }, { "docid": "042226c220c9cee7f88f0397b84bb928", "score": "0.60478824", "text": "function d($obj, $end=true) {\n echo '<p>';\n print_r($obj);\n echo '</p><p>';\n var_dump($obj);\n echo '</p>';\n if ($end) {\n die('dumped');\n }\n }", "title": "" }, { "docid": "00b1b92d612f5570de518ff4ef068e56", "score": "0.6041855", "text": "function dump($arg) {\n echo \"<pre>\";\n print_r($arg);\n echo \"</pre>\";\n }", "title": "" }, { "docid": "918d1a101a02d2f5aff2c58e1ef8da9c", "score": "0.6036735", "text": "function dd($data): void\n {\n echo '<pre>';\n print_r($data);\n echo '</pre>';\n die;\n }", "title": "" }, { "docid": "1f2f10dfe02d6e370a909063d9c8f098", "score": "0.60362", "text": "function pre($array) {\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n}", "title": "" }, { "docid": "b19523bee07468620f7cf84ef7736e21", "score": "0.6030691", "text": "function p($v){echo'<pre>';print_r($v);echo'</pre>';}", "title": "" }, { "docid": "35642155cb14dda7f37516a9b14fbab7", "score": "0.60265964", "text": "function displayArray($val)\r\n{\r\n echo \"<pre>\";\r\n print_r($val);\r\n echo \"</pre>\";\r\n return;\r\n}", "title": "" }, { "docid": "16c107b60b3f88358df412abd9f444b2", "score": "0.60256696", "text": "function print_p($lista) {\n print(\"<pre>\" . print_r($lista, true) . \"</pre>\");\n}", "title": "" }, { "docid": "15928b4e0cf6fe6c7b0d56c7552d05ae", "score": "0.6023606", "text": "function debug_to_console($data) {\n if(is_array($data) || is_object($data))\n\t{\n\t\techo(\"<script>console.log('PHP1=\".json_encode($data).\"=');</script>\");\n\t} else {\n\t\techo(\"<script>console.log('PHP2: =\".$data.\"=');</script>\");\n\t}\n}", "title": "" }, { "docid": "126a990c676c20bdf46c7f7992c12ada", "score": "0.6003507", "text": "function zarray($array)\r\n{\r\n echo '<pre>';\r\n if (is_array($array))\r\n {\r\n print_r($array);\r\n }\r\n else\r\n {\r\n var_dump($array);\r\n }\r\n echo '</pre>';\r\n}", "title": "" }, { "docid": "45e330133cc74ab0f7d473f0e5da91fe", "score": "0.6002299", "text": "function debug_to_console($data) {\n\tif(is_array($data) || is_object($data))\n\t{\n\t\techo(\"<script>console.log('PHP: \".json_encode($data).\"');</script>\");\n\t} else {\n\t\techo(\"<script>console.log('PHP: \".$data.\"');</script>\");\n\t}\n}", "title": "" }, { "docid": "834d7d9ad2ebbac9b00a1c43b3923869", "score": "0.599941", "text": "function pre_r( $array ){\n}", "title": "" }, { "docid": "b96d0012b1937df250610b4e572ab945", "score": "0.5989248", "text": "function debug_to_console( $data ) {\n if ( is_array( $data ) )\n $output = \"<script>console.log( 'Debug Objects: \" . implode( ',', $data) . \"' );</script>\";\n else\n $output = \"<script>console.log( 'Debug Objects: \" . $data . \"' );</script>\";\n echo $output;\n }", "title": "" }, { "docid": "f3c6c166252c9abf590e7891ce573c77", "score": "0.5987447", "text": "function d($x) {\n echo \"<pre>\".print_r($x,1).\"</pre>\";\n}", "title": "" }, { "docid": "42d79a4942f5f122e7f3c6ce076563ae", "score": "0.5981233", "text": "function bd($data) {\n bdump($data);\n}", "title": "" }, { "docid": "bba77ca002a73f951e7b404817f8bd8f", "score": "0.598117", "text": "function printVars($array) {\n echo \"<pre>\";\n print_r($array);\n echo \"</pre>\";\n}", "title": "" }, { "docid": "09faec59f72f3c83985a14bcd92780e0", "score": "0.5969573", "text": "function print_ar(array $x){\n\t\t\t\t\t\t\t\t\t\t\techo \"<pre>\";\n\t\t\t\t\t\t\t\t\t\t\tprint_r($x);\n\t\t\t\t\t\t\t\t\t\t\techo \"</pre></br>\";\n\t\t\t\t\t\t\t\t\t\t}", "title": "" }, { "docid": "4c9d39cfcf7c067327b728cff647d767", "score": "0.5968529", "text": "function _ep($value)\n{\n echo('<pre>' . print_r($value, true) . '</pre>');\n}", "title": "" } ]
c09096787dd470112e29da9b4d84fcc4
Sets up access to resources for a module
[ { "docid": "c106c7a835abaaf1d99aab8fcf03f68f", "score": "0.0", "text": "private static function setupAclAccess (AppAclModel $acl)\n {\n // Hardware Admin\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_INDEX_INDEX, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_QUOTEINDEX_INDEX, AppAclModel::PRIVILEGE_VIEW);\n\n\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_DEVICES_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_COMPUTERS_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_PERIPHERALS_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_SERVICES_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_SKU_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_SUPPLY_MAPPING_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_PRICING_AND_HARDWARE_ADMINISTRATOR, self::RESOURCE_HARDWARE_LIBRARY_MANAGE_DEVICES_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n\n /**\n * Normal user\n */\n $acl->allow(AppAclModel::ROLE_AUTHENTICATED_USER, self::RESOURCE_HARDWARE_LIBRARY_INDEX_INDEX, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_AUTHENTICATED_USER, self::RESOURCE_HARDWARE_LIBRARY_OPTION_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_AUTHENTICATED_USER, self::RESOURCE_HARDWARE_LIBRARY_TONER_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n $acl->allow(AppAclModel::ROLE_AUTHENTICATED_USER, self::RESOURCE_HARDWARE_LIBRARY_TONERS_WILDCARD, AppAclModel::PRIVILEGE_VIEW);\n }", "title": "" } ]
[ { "docid": "9ba0326cae0d8d4485ef6a0209d0b49a", "score": "0.6895562", "text": "function __construct() {\n\n $this->addRole(new Zend_Acl_Role('guests'));\n $this->addRole(new Zend_Acl_Role('admins'), 'guests');\n\n // >>>>>>>>>>>> Adding Resources <<<<<<<<<<<<<<<\n \n // **** Resources for module Default *****\n\n $this->add(new Zend_Acl_Resource('default'));\n $this->add(new Zend_Acl_Resource('default:index'), 'default');\n \n\n // **** Resources for module Admin *****\n\n $this->add(new Zend_Acl_Resource('admin'));\n $this->add(new Zend_Acl_Resource('admin:index'), 'admin');\n $this->add(new Zend_Acl_Resource('admin:devis'), 'admin');\n\n // >>>>>>>>>>>> Affecting Resources <<<<<<<<<<<<<<<\n \n // ------- >> module Default << -------\n $this->allow('guests', 'default:index');\n \n \n // ------- >> module Admin << -------\n $this->allow('guests', 'admin:index');\n $this->allow('guests', 'admin:devis');\n \n \n }", "title": "" }, { "docid": "1c0bff1ca83c409749412c029f87cf8e", "score": "0.6648941", "text": "private function setupResources()\n {\n $this->resources = array(\n 'bits' => new Bits($this),\n 'feed' => new ChannelFeed($this),\n 'channels' => new Channels($this),\n 'chat' => new Chat($this),\n 'clips' => new Clips($this),\n 'collections' => new Collections($this),\n 'communites' => new Communities($this),\n 'games' => new Games($this),\n 'ingests' => new Ingests($this),\n 'search' => new Search($this),\n 'streams' => new Streams($this),\n 'teams' => new Teams($this),\n 'users' => new Users($this),\n 'vhs' => new VHS($this),\n 'videos' => new Videos($this),\n );\n }", "title": "" }, { "docid": "0adcfac2275030bca2cb8f097ac18185", "score": "0.6282418", "text": "protected function init() {\n if (!$this->configModule) {\n $this->configModule = $this->id;\n }\n $moduleData = $this->getModuleData();\n\n if ($moduleData['disabled']) {\n $this->moduleDisabled();\n }\n\n if (($this->getSiteVar('SECURE_REQUIRED', 0, Config::SUPRESS_ERRORS) || $moduleData['secure']) && \n (!isset($_SERVER['HTTPS']) || ($_SERVER['HTTPS'] !='on'))) { \n $this->secureModule();\n }\n \n if ($this->getSiteVar('AUTHENTICATION_ENABLED')) {\n includePackage('Authentication');\n if ($moduleData['protected']) {\n if (!$this->isLoggedIn()) {\n $this->unauthorizedAccess();\n }\n }\n \n if (!$this->evaluateACLS(self::ACL_USER)) {\n $this->unauthorizedAccess();\n }\n }\n }", "title": "" }, { "docid": "81bc04399725348eba3604e623e88b21", "score": "0.62403667", "text": "public function setResources()\n\t{\n\t\t\n\t\t$menus_obj\t\t= Point_Object_Menus::getInstance();\n\t\t\n\t\t$top_pages\t\t= $menus_obj->getTopMenus();\n\t\t\n//\t\techo '<pre>', print_r($top_pages, true),'</pre>';exit;\n\n\t\t/*--------------------------\n\t\t * Basic ones!!!\n\t\t * -------------------------\n\t\t */\n\t\t$this->addResource(new Zend_Acl_Resource('index'));\n\t\t$this->addResource(new Zend_Acl_Resource('error'));\n\t\t$this->addResource(new Zend_Acl_Resource('churchpoint'));\n\t\t$this->addResource(new Zend_Acl_Resource('administration'));\n\t\t\n\t\t$this->addResource(new Zend_Acl_Resource('xpage'));\n\t\t$this->addResource(new Zend_Acl_Resource('rteam'));\n\t\t$this->addResource(new Zend_Acl_Resource('articles'));\n\t\t$this->addResource(new Zend_Acl_Resource('events'));\n\t\t$this->addResource(new Zend_Acl_Resource('biblestudy'));\n\t\t$this->addResource(new Zend_Acl_Resource('c-groups'));\n\t\t$this->addResource(new Zend_Acl_Resource('dpoint'));\n\t\t$this->addResource(new Zend_Acl_Resource('account'));\n\t\t$this->addResource(new Zend_Acl_Resource('user'));\n\t\t$this->addResource(new Zend_Acl_Resource('images'));\n\t\t$this->addResource(new Zend_Acl_Resource('photonews'));\n\t\t$this->addResource(new Zend_Acl_Resource('ajax'));\n\t\t$this->addResource(new Zend_Acl_Resource('rss'));\n\t\t$this->addResource(new Zend_Acl_Resource('content-groups'));\n\t\t$this->addResource(new Zend_Acl_Resource('messages'));\n\t\t$this->addResource(new Zend_Acl_Resource('sermons'));\n\t\t$this->addResource(new Zend_Acl_Resource('slider'));\n\t\t$this->addResource(new Zend_Acl_Resource('word'));\n\t\t\n\t\t/*\n\t\t * =========================\n\t\t * Others\n\t\t * -------------------------\n\t\t */\n\t\tforeach ($top_pages as $top_page)\n\t\t{\n\t\t\tif ($top_page['page_published'] && !$this->has($top_page['page_controller']))\n\t\t\t\t$this->addResource(new Zend_Acl_Resource($top_page['page_controller']));\n\t\t}\n\t\t\n\t\t/*\n\t\t$this->addResource(new Zend_Acl_Resource('about'));\n\t\t$this->addResource(new Zend_Acl_Resource('account'));\n\t\t$this->addResource(new Zend_Acl_Resource('app-config'));\n\t\t$this->addResource(new Zend_Acl_Resource('ajax'));\n\t\t$this->addResource(new Zend_Acl_Resource('articles'));\n\t\t$this->addResource(new Zend_Acl_Resource('c-groups'));\n\t\t$this->addResource(new Zend_Acl_Resource('content-groups'));\n\t\t$this->addResource(new Zend_Acl_Resource('dpoint'));\n\t\t$this->addResource(new Zend_Acl_Resource('error'));\n\t\t$this->addResource(new Zend_Acl_Resource('events'));\n\t\t$this->addResource(new Zend_Acl_Resource('index'));\n\t\t$this->addResource(new Zend_Acl_Resource('images'));\n\t\t$this->addResource(new Zend_Acl_Resource('messages'));\n\t\t$this->addResource(new Zend_Acl_Resource('rteam'));\n\t\t$this->addResource(new Zend_Acl_Resource('sermons'));\n\t\t$this->addResource(new Zend_Acl_Resource('user'));\n\t\t$this->addResource(new Zend_Acl_Resource('xpage'));\n\t\t$this->addResource(new Zend_Acl_Resource('word'));\n\t\t*/\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "b5af5ea9c5b754baa96f0fd94a49380c", "score": "0.6213407", "text": "public function init() {\n\t\t$readActions = array('index', 'students','view', 'photoupload', 'managephotos', 'deletephoto', \n\t\t\t'actuallydeletephoto', 'setdefaultphoto', 'viewdefaultphoto', 'pblgroups', 'group','blockchairs',\n\t\t\t'teachingstaff', 'stafflist', 'editdetails', 'doeditdetails');\n\t\t$this->_helper->_acl->allow('student', $readActions);\n\t\t$writeActions = array('setofficialphoto','viewofficialphoto');\n\t\t$this->_helper->_acl->allow('staff', $writeActions);\n\t\t$this->_helper->_acl->allow('admin', array('cohortgroup'));\n\t}", "title": "" }, { "docid": "5eccf8c88238d270826991c6207831fa", "score": "0.60971206", "text": "public static function init() {\n\t\tglobal $wgResourceModules;\n\t\t\n\t\t// Install skin modules\n\t\t$moduleInfo = array(\n\t\t\t\t'localBasePath' => $GLOBALS['wgStyleDirectory'],\n\t\t\t\t'remoteBasePath' => $GLOBALS['wgStylePath'],\n\t\t\t\t#'remoteExtPath' => 'XBMCSkin/modules',\n\t\t);\n\t\t\n\t\t$wgResourceModules['skins.xbmc'] = array(\n\t\t\t\t'styles' => array( 'xbmc/css/xbmc.css' => array( 'media' => 'screen' ) ),\n\t\t\t\t'scripts' => 'xbmc/js/xbmc.js',\n\t\t) + $moduleInfo;\n\t\t\n\t\t$wgResourceModules['paradise.styles'] = array(\n\t\t\t\t'styles' => array( 'xbmc/css/styles.css' => array( 'media' => 'screen' ) ),\n\t\t) + $moduleInfo;\n\t\t\n\t\t$wgResourceModules['paradise.dark'] = array(\n\t\t\t\t'styles' => array( 'xbmc/css/dark.css' => array( 'media' => 'screen' ) ),\n\t\t) + $moduleInfo;\n\t\t\n\t\t$wgResourceModules['paradise.custom'] = array(\n\t\t\t\t'styles' => array( 'xbmc/css/custom.css' => array( 'media' => 'screen' ) ),\n\t\t) + $moduleInfo;\n\t}", "title": "" }, { "docid": "c9d9cd3956bf44385f12203503730753", "score": "0.6069463", "text": "static private function init_modules() {\n\n\t\t\t/* Admin */\n\t\t\tRed_Security_Package_Admin::init();\n\n\t\t\t/* Plugin History */\n\t\t\tPlugin_History::init();\n\t\t\tPlugin_History_Rest::init();\n\t\t}", "title": "" }, { "docid": "fd752e2d28a1cc44c6469f94bcf0e529", "score": "0.6000992", "text": "abstract protected function initResource();", "title": "" }, { "docid": "17cfd110192125ce46ce6635751fbc2b", "score": "0.5997056", "text": "protected function defineResources()\n {\n $this->loadViewsFrom(BC_PATH.'/resources/views', 'bc');\n $this->loadTranslationsFrom(BC_PATH.'/resources/lang', 'bc');\n\n if ($this->app->runningInConsole())\n {\n $this->defineViewPublishing();\n $this->defineTranslationsPublishing();\n $this->defineAssetPublishing();\n }\n }", "title": "" }, { "docid": "dc87a9522b6390ef3e6ae0b584538fdf", "score": "0.5979537", "text": "protected function initialize() {\n\t\t$this->resource = \"actions\";\n\t}", "title": "" }, { "docid": "e178c5b5bd3e860172504ac4a43188f0", "score": "0.59163845", "text": "public function init() {\n // you may place code here to customize the module or the application\n // import the module-level models and components\n $this->setImport(array(\n 'assetHandler.models.*',\n 'assetHandler.components.*',\n 'assetHandler.components.api.*',\n 'assetHandler.traits.*',\n 'assetHandler.components.storage.*',\n ));\n }", "title": "" }, { "docid": "cc20e6ea7460f891e7be86135a221b54", "score": "0.59113425", "text": "function __construct() {\n\t\t$this->MODULE_ID = \"citrus.rewriteurls\"; // NOTE for showing module in /bitrix/admin/partner_modules.php?lang=ru\n\n\t\t$arModuleVersion = array();\n\t\tinclude __DIR__ . \"/version.php\";\n\n\t\tif (!empty($arModuleVersion[\"VERSION\"])) {\n\t\t\t$this->MODULE_VERSION = $arModuleVersion[\"VERSION\"];\n\t\t\t$this->MODULE_VERSION_DATE = $arModuleVersion[\"VERSION_DATE\"];\n\t\t}\n\n\t\t$this->MODULE_NAME = Loc::getMessage(\"CITRUS_REWRITEURLS_MODULE_NAME\");\n\t\t$this->MODULE_DESCRIPTION = Loc::getMessage(\"CITRUS_REWRITEURLS_MODULE_DESCRIPTION\");\n\t\t$this->MODULE_GROUP_RIGHTS = \"N\";\n\n\t\t$this->PARTNER_NAME = \"Citrus\";\n\t\t$this->PARTNER_URI = \"http://citrus-soft.ru/\";\n\t}", "title": "" }, { "docid": "9090ac94b437a1fd1dd75d52a51320e0", "score": "0.5904659", "text": "public function init()\n {\n $this->modules = [\n 'stage' => 'nad\\engineering\\electricity\\stage\\Module',\n 'device' => 'nad\\engineering\\electricity\\device\\Module',\n 'location' => 'nad\\engineering\\electricity\\location\\Module',\n 'document' => 'nad\\engineering\\electricity\\document\\Module',\n // 'site' => 'nad\\engineering\\electricity\\site\\Module',\n ];\n parent::init();\n }", "title": "" }, { "docid": "75f013e675a5ecb61cc447a4c19b0f67", "score": "0.59035534", "text": "public function __construct() {\r\n // Each module will have a client with the same name as module, for example the blog module with have a BlogClient.\r\n // This helps improve security since anyone can simply try to guess combinations in the browser bar.\r\n // This way there is a default client for each module with the publicly available methods.\r\n\r\n // Grab the server request string\r\n if (!empty($_SERVER[\"REQUEST_URI\"])) {\r\n $this->url = $_SERVER[\"REQUEST_URI\"];\r\n }\r\n $this->segments = explode('/', $this->url);\r\n array_shift($this->segments);\r\n\r\n // Set controller\r\n if (!empty($this->segments[0])) {\r\n $this->controller = \"\\\\modules\\\\\" . $this->segments[0] . \"\\\\\" . ucfirst($this->segments[0]) . \"Controller\";\r\n } else {\r\n $this->controller = \"PublicController\";\r\n }\r\n\r\n // Set method\r\n if (!empty($this->segments[1])) {\r\n $this->method = $this->segments[1];\r\n } else {\r\n $this->method = \"default\";\r\n }\r\n\r\n // Set params\r\n $x = 0;\r\n if (!empty($this->segments[2])) {\r\n $arr = array_slice($this->segments, 2);\r\n foreach ($arr as $value) {\r\n $this->params[$x] = $value;\r\n $x++;\r\n }\r\n } else {\r\n $this->params = \"\";\r\n }\r\n\r\n // Dispatch the request\r\n $this->dispatch();\r\n\r\n }", "title": "" }, { "docid": "1fe32651744c57b853e290be5cce9ffa", "score": "0.5901193", "text": "public function init()\n {\n parent::init();\n // подключение дочернего модуля\n $this->modules = [\n 'equipment' => [\n 'class' => 'app\\modules\\tehdoc\\modules\\equipment\\EquipmentModule',\n ],\n 'to' => [\n 'class' => 'app\\modules\\tehdoc\\modules\\to\\ToModule',\n ],\n ];\n }", "title": "" }, { "docid": "7015d77bbe9ccf278f3a177d4cf8ec76", "score": "0.5888625", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'reports.models.*',\n\t\t\t'reports.components.*',\n\t\t));\n\n /*\n * Author: Mike\n * Date: 25.06.19\n * Fix 404 error when link from module\n */\n\t\t$url = explode('/',Yii::app()->request->getUrl());\n\t\t$controller = Yii::app()->createController($url[2]);\n\t\tif (isset($controller)){\n Yii::app()->request->redirect(str_ireplace('/reports','',Yii::app()->request->getUrl()));\n }\n\t}", "title": "" }, { "docid": "2a46a0ed838a491f8e6fa5a3d37d209d", "score": "0.5881719", "text": "public function init()\r\n {\r\n $this->admin = Shopware()->Modules()->Admin();\r\n $this->basket = Shopware()->Modules()->Basket();\r\n $this->session = Shopware()->Session();\r\n $this->db = Shopware()->Db();\r\n $this->moduleManager = Shopware()->Modules();\r\n $this->eventManager = Shopware()->Events();\r\n }", "title": "" }, { "docid": "3c59ac8b8995781f22d78d9f3f3f95c5", "score": "0.5869177", "text": "function role_resources() {\n $resource = array(\n 'retrieve' => array(\n 'callback' => '_role_resource_retrieve',\n 'args' => array(\n array(\n 'name' => 'rid',\n 'optional' => FALSE,\n 'source' => array('path' => 0),\n 'type' => 'int',\n 'description' => 'The rid of the node to get',\n ),\n ),\n 'access callback' => '_role_resource_access',\n 'access arguments' => array('view'),\n 'access arguments append' => TRUE,\n ),\n 'create' => array(\n 'callback' => '_role_resource_create',\n 'args' => array(\n array(\n 'name' => 'role',\n 'optional' => FALSE,\n 'source' => 'data',\n 'description' => 'The role data to create',\n 'type' => 'array',\n ),\n ),\n 'access callback' => '_role_resource_access',\n 'access arguments' => array('create'),\n 'access arguments append' => TRUE,\n ),\n 'update' => array(\n 'callback' => '_role_resource_update',\n 'args' => array(\n array(\n 'name' => 'rid',\n 'optional' => FALSE,\n 'source' => array('path' => 0),\n 'type' => 'int',\n 'description' => 'The rid of the node to get',\n ),\n array(\n 'name' => 'data',\n 'optional' => FALSE,\n 'source' => 'data',\n 'description' => 'The role data to update',\n 'type' => 'string',\n ),\n ),\n 'access callback' => '_role_resource_access',\n 'access arguments' => array('update'),\n 'access arguments append' => TRUE,\n ),\n 'delete' => array(\n 'callback' => '_role_resource_delete',\n 'args' => array(\n array(\n 'name' => 'rid',\n 'optional' => FALSE,\n 'type' => 'int',\n 'source' => array('path' => 0),\n ),\n ),\n 'access callback' => '_role_resource_access',\n 'access arguments' => array('delete'),\n 'access arguments append' => TRUE,\n ),\n 'index' => array(\n 'callback' => '_role_resource_index',\n 'args' => array(\n array(\n 'name' => 'page',\n 'optional' => TRUE,\n 'type' => 'int',\n 'description' => 'The zero-based index of the page to get, defaults to 0.',\n 'default value' => 0,\n 'source' => array('param' => 'page'),\n ),\n array(\n 'name' => 'fields',\n 'optional' => TRUE,\n 'type' => 'string',\n 'description' => 'The fields to get.',\n 'default value' => '*',\n 'source' => array('param' => 'fields'),\n ),\n array(\n 'name' => 'parameters',\n 'optional' => TRUE,\n 'type' => 'array',\n 'description' => 'Parameters array',\n 'default value' => array(),\n 'source' => array('param' => 'parameters'),\n ),\n array(\n 'name' => 'pagesize',\n 'optional' => TRUE,\n 'type' => 'init',\n 'description' => 'Number of records to get per page.',\n 'default value' => variable_get('services_node_index_page_size', 20),\n 'source' => array('param' => 'pagesize'),\n ),\n ),\n 'access arguments' => array('administer users'),\n 'access arguments append' => FALSE,\n ),\n );\n return $resource;\n}", "title": "" }, { "docid": "d68e7872318a7b8177c4921c9bf1cc17", "score": "0.58687603", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'admin_manage.models.*',\n\t\t\t'admin_manage.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "788af00f7b7a8cf56231ab686a03a544", "score": "0.58544356", "text": "protected function _initResource(){\r\n\t\t$this->_resource\t=\tMage::getSingleton('core/resource');\r\n\t}", "title": "" }, { "docid": "02c4b91f362f778413b5f26dba8f417f", "score": "0.58543426", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'admin.models.*',\n\t\t\t'admin.components.*',\n\t\t\t'admin.classes.*',\n\t\t));\n\t}", "title": "" }, { "docid": "d5172bfaf5077fe0c665e5f390d52073", "score": "0.5842245", "text": "public function setModules()\n\t{\n \t//Zend_Registry::set('modules', $modules->getList());\n\t}", "title": "" }, { "docid": "e53b00edb4b9c2765ad74612a7cca2c9", "score": "0.58382314", "text": "function initialise(){\n\t\t/**\n\t\t* request the client identifier once we use this variable often\n\t\t*/\n\t\t$this->client_identifier = $this->parent->client_identifier;\n\t\t/**\n\t\t* define some access functionality\n\t\t*/\n\t\t$this->module_display_options[0]\t= array($this->module_command.\"RETRIEVE\",\"LOCALE_MIRROR_CHANNEL_OPEN\");\n\t\t$this->module_admin_options\t\t\t= array(\n\t\t\tarray($this->module_command.\"FORM\",$this->module_label)\n\t\t);\n\t\t$this->module_admin_user_access\t\t= array(\n\t\t\tarray($this->module_command.\"ALL\",\"COMPLETE_ACCESS\")\n\t\t);\n\t}", "title": "" }, { "docid": "45f40f3d3a97dcb47371ed2130d9f7c8", "score": "0.58326024", "text": "private function init()\n\t\t{\n\t\t\t(new Assets())->init();\n\t\t\t(new SystemEmails())->init();\n\n\t\t\t// Bring our rest interface online, example only.\n\t\t\t// new Rest();\n\t\t}", "title": "" }, { "docid": "20c85ed945787ea53d903c961e9dc88a", "score": "0.58324206", "text": "public function init()\n {\n $this->modules = [\n 'stage' => 'nad\\engineering\\geotechnics\\stage\\Module',\n // 'device' => 'nad\\engineering\\geotechnics\\device\\Module',\n 'location' => 'nad\\engineering\\geotechnics\\location\\Module',\n 'document' => 'nad\\engineering\\geotechnics\\document\\Module',\n // 'site' => 'nad\\engineering\\geotechnics\\site\\Module',\n ];\n parent::init();\n }", "title": "" }, { "docid": "38f6594529aae0d9c7fdee20f38daa53", "score": "0.58315307", "text": "public function setRegistry()\n {\n $reg = controllers\\Registry::getInstance();\n foreach ($this->config as $key => $value)\n {\n $reg->setResource($key, $value, true);\n }\n\n\n }", "title": "" }, { "docid": "fe9e98addcfcf3493fe9983e8e245076", "score": "0.5829706", "text": "public function initialize()\n {\n $this->setSource('resources');\n\n $this->hasMany(\n 'id',\n 'Canvas\\Models\\ResourcesAccesses',\n 'resources_id',\n [\n 'alias' => 'accesses',\n 'params' => [\n 'conditions' => 'apps_id = ' . $this->di->getApp()->getId()\n ]\n ]\n );\n }", "title": "" }, { "docid": "68ca089c086fe588aaeb0813eefd25cc", "score": "0.58282864", "text": "function adleex_resource_define_cap() {\n\t$admin = get_role('administrator');\n\t$admin->add_cap('delete_resources');\n\t$admin->add_cap('edit_resources');\n\t$admin->add_cap('publish_resources');\n\t$admin->add_cap('edit_published_resources');\n\t$admin->add_cap('delete_published_resources');\n\t$admin->add_cap('read_private_resources');\n\t$admin->add_cap('edit_private_resources');\n\t$admin->add_cap('delete_private_resources');\n\t$admin->add_cap('edit_others_resources');\n\t$admin->add_cap('delete_others_resources');\n}", "title": "" }, { "docid": "ebd58f65780f837ddde0b8177353be93", "score": "0.58208567", "text": "public function __construct() {\n\t\t$config = ['config_student', 'config_course'];\n\t\t$models = ['courses_model', 'lessons_model'];\n\t\t$this->common_model->autoload_resources($config, $models);\n\t}", "title": "" }, { "docid": "afc81036881d7fef6dd364f50ca70ff8", "score": "0.5817157", "text": "public function actionInit()\n {\n $this->initRoles($this->roles);\n $this->initPermissions($this->permissions);\n $this->initDependencies($this->dependencies);\n }", "title": "" }, { "docid": "955e5d64cfff2de2807d9cb084ba0fb4", "score": "0.58138144", "text": "public function init()\n {\n require_once(__DIR__.'/controllers/AbstractAuthorizedApiController.php');\n }", "title": "" }, { "docid": "5773d7d0fa9d50d8157e1ce638f6302b", "score": "0.58126515", "text": "protected function _initResources () {\r\n\r\n\t\t$bFreshData = false;\r\n\r\n\t\tif (self::$_bUseCache) {\r\n\t\t\t$oCacheManager = Kwgl_Cache::getManager();\r\n\t\t\t$oAclCache = $oCacheManager->getCache('acl');\r\n\r\n\t\t\tif (($aResourceListing = $oAclCache->load(self::CACHE_IDENTIFIER_RESOURCES)) === false) {\r\n\t\t\t\t// Not Cached or Expired\r\n\r\n\t\t\t\t$bFreshData = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$bFreshData = true;\r\n\t\t}\r\n\r\n\t\tif ($bFreshData) {\r\n\t\t\t// Get Resources from the Database\r\n\t\t\t$oDaoResource = Kwgl_Db_Table::factory('System_Resource'); /* @var $oDaoResource Dao_System_Resource */\r\n\t\t\t//$aResourceListing = $oDaoResource->fetchAll();\r\n\t\t\t$aResourceListing = $oDaoResource->getResources();\r\n\r\n\t\t\tif (self::$_bUseCache) {\r\n\t\t\t\t$oAclCache->save($aResourceListing, self::CACHE_IDENTIFIER_RESOURCES);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tforeach ($aResourceListing as $aResourceDetail) {\r\n\t\t\t$sResourceName = $aResourceDetail['name'];\r\n\t\t\tif (is_null($aResourceDetail['parent'])) {\r\n\t\t\t\t// Add the Resource if it hasn't been defined yet\r\n\t\t\t\tif (!$this->has($sResourceName)) {\r\n\t\t\t\t\t$this->addResource(new Zend_Acl_Resource($sResourceName));\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// Parent Resource assigned\r\n\t\t\t\t$sResourceParentName = $aResourceDetail['parent'];\r\n\t\t\t\t// Add the Parent Role if the Parent Role hasn't been defined yet\r\n\t\t\t\tif (!$this->has($sResourceParentName)) {\r\n\t\t\t\t\t$this->addResource(new Zend_Acl_Resource($sResourceParentName));\r\n\t\t\t\t}\r\n\t\t\t\t$this->addResource(new Zend_Acl_Resource($sResourceName), $sResourceParentName);\r\n\t\t\t}\r\n\r\n\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b74acbd2d60d69e26238ad8304d71606", "score": "0.58113295", "text": "public function __construct()\r\n {\r\n parent::__construct(); //$subject, $config = array()\r\n ApiResource::addIncludePath(dirname(__FILE__).'/rtsusers');\r\n\r\n // Set the login resource to be public\r\n //$this->setResourceAccess('login', 'public','get');\r\n $this->setResourceAccess('getuser', 'public','post');\r\n //$this->setResourceAccess('users', 'public', 'post');\r\n }", "title": "" }, { "docid": "c8098f181acd5c316a3b2ba2cdec19fa", "score": "0.5800497", "text": "public function __construct() {\n\t\tparent::__construct(FALSE, array(), array(), array('resources'));\n\t\t$this->resources = array();\n\t\t$this->_restrict_write_access();\n\n\t}", "title": "" }, { "docid": "acc35c49e8450581e739c3c853997930", "score": "0.57689", "text": "public function init()\n\t{\n\t\t$this->setComponents(array(\n\t\t\t'request' => array(\n\t\t\t\t'class' => 'HttpRequest',\n\t\t\t\t'enableCsrfValidation' => false,\n\t\t\t),\n\t\t));\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'sample.models.*',\n\t\t\t'sample.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "0b7066786b708090eb82b6e73aefdcdc", "score": "0.5759555", "text": "public function _initModules()\n {\n //Create new cache\n $cache = ZCache::getCore();\n\n CoreOptions::initOptions();\n\n //Load module\n $registerModules = $cache->get(ZCMS_CACHE_MODULES);\n if ($registerModules === null) {\n /**\n * @var \\Phalcon\\Db\\Adapter\\Pdo\\Postgresql $db\n */\n $db = $this->di->get('db');\n $query = 'SELECT base_name, namespace FROM core_modules WHERE published = 1';\n $modules = $db->fetchAll($query);\n $registerModules = [];\n foreach ($modules as $module) {\n $registerModules[$module['base_name']] = [\n 'baseName' => $module['base_name'],\n 'namespace' => $module['namespace'],\n 'className' => $module['namespace'] . '\\\\Module',\n 'path' => ROOT_PATH . '/app/modules/Module.php'\n ];\n }\n $cache->save(ZCMS_CACHE_MODULES, $registerModules);\n }\n global $_modules;\n $_modules = $registerModules;\n $this->registerModules($registerModules);\n }", "title": "" }, { "docid": "e0ab6e940e588a2bbae9ef70089a6116", "score": "0.5722209", "text": "public function init() {\n $config_array = $this->config->toArray();\n $prev_role = null;\n\n foreach ($config_array as $role => $permissions) {\n $prev_role = $this->addUserRole($role, $prev_role);\n \n if(empty($permissions) || !is_array($permissions)) {\n continue;\n }\n \n foreach($permissions as $controller => $actionList) {\n $controller = $this->addController($controller);\n $priviliges = $this->getPriviliges($actionList);\n \n $this->allow($role, $controller, $priviliges);\n } \n }\n }", "title": "" }, { "docid": "9dbcd47463e37ecee6ee51148f571280", "score": "0.5716049", "text": "public function loadUrls()\n {\n \n // get the modules list\n $modulesNames = \\Mumux\\Configuration::get(\"Modules\");\n \n // load each modules\n foreach ($modulesNames as $moduleName) {\n \n // get the routing class\n $routingFile = \"Modules/\" . $moduleName . \"/ServerRoutes.json\";\n if (file_exists($routingFile)) {\n $this->addRoutsToDatabase($moduleName, $routingFile);\n } else {\n throw new \\Exception(\"The module '$moduleName' has a no routing file\");\n }\n }\n }", "title": "" }, { "docid": "c28bbe08786e5a7f17db8986a034ad17", "score": "0.5712576", "text": "protected function __construct() {\r\n\r\n\t\tself::$_bUseCache = (Kwgl_Config::get(array('mode', 'cache', 'acl')) == 1);\r\n\r\n\t\t$this->_initRoles();\r\n\t\t$this->_initResources();\r\n\t\t$this->_initPermissions();\r\n\t}", "title": "" }, { "docid": "fdcf7ddbffd9dd40ea5bab9617e3bfc5", "score": "0.57117665", "text": "public function init()\n {\n parent::init();\n\n $module = ModuleLoader::getModule('element-layout-admin');\n Requirements::javascript($module->getRelativeResourcePath(\"client/dist/js/bundle.js\"));\n Requirements::css($module->getRelativeResourcePath(\"client/dist/styles/bundle.css\"));\n\n }", "title": "" }, { "docid": "f076f4e4dddb8ee8fee1bc73bb47c131", "score": "0.5709224", "text": "public function init() {\n $this->setImport(array(\n 'application.modules.install.controllers.*',\n 'application.modules.install.forms.*'\n ));\n }", "title": "" }, { "docid": "29db6c167e7a2b691a6f8fb03e9ad864", "score": "0.5708037", "text": "protected function _initRestRoute()\n {\n $front = Zend_Controller_Front::getInstance();\n $router = $front->getRouter();\n\n // Specifying all controllers as RESTful:\n //$restRoute = new Zend_Rest_Route($front);\n //$router->addRoute('default', $restRoute);\n\n\n // Specifying the \\\"api\\\" module only as RESTful:\n $restRoute = new Zend_Rest_Route($front, array(), array(\n 'api',\n ));\n $router->addRoute('rest', $restRoute);\n\n\n // Specifying the \\\"mymodule\\\" module as RESTful, and the \\\"customer\\\" controller of the\n // \\\"api\\\" module as RESTful:\n /*$restRoute = new Zend_Rest_Route($front, array(), array(\n 'mymodule',\n 'api' => array('customer'),\n ));\n $router->addRoute('rest', $restRoute);*/\n }", "title": "" }, { "docid": "9224b9c1db1f201cd2203440ab791b15", "score": "0.57034606", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\t\n\t\t\t'VForum.models.*',\n\t\t\t'VForum.models.forms.*',\n\t\t\t'VForum.components.*',\n\t\t\t'VForum.controllers.*',\n 'VForum.helpers.*',\n\t\t\t'VForum.views.*',\n\t\t));\n\n $this->assetsPath = dirname(__FILE__).DIRECTORY_SEPARATOR.'assets';\n $this->assetsUrl = $this->staticUrl.Yii::app()->assetManager->publish($this->assetsPath, false, -1, YII_DEBUG);\n\t}", "title": "" }, { "docid": "9be6defe4ec10c06f8517cf411b4fd3b", "score": "0.57008743", "text": "public function __construct( $dt_mapping ) {\n $this->namespace = \"dt/v1\";\n $this->public_namespace = \"dt-public/v1\";\n $this->endpoints = apply_filters( 'dt_mapping_module_endpoints', $this->default_endpoints() );\n add_action( 'rest_api_init', [ $this, 'add_api_routes' ] );\n /** End LOAD REST ENDPOINTS */\n\n /**\n * PERMISSION CHECK\n *\n * Themes or plugins implementing the module need to add a simple filter to check\n * permissions and control access to the mapping module resource. By default the module is disabled.\n *\n * For targeted use. Give only the 'view_mapping' permission\n *\n * Governing filter living inside\n * @link mapping-module-config.php\n *\n *\n * Example:\n * add_filter( 'dt_mapping_module_has_permissions', function() {\n * if ( current_user_can( 'view_any_contacts' ) ) {\n * return true;\n * }\n * return false;\n * });\n */\n $this->permissions = apply_filters( 'dt_mapping_module_has_permissions', false );\n if ( ! $this->permissions ) {\n if ( current_user_can( 'view_any_contacts' )\n || current_user_can( 'view_project_metrics' )\n || current_user_can( 'view_mapping' ) ) {\n $this->permissions = true;\n }\n return;\n }\n /** END PERMISSION CHECK */\n\n\n\n /**\n * SET FILE LOCATIONS\n */\n $this->module_path = $dt_mapping['path'];\n $this->module_url = $dt_mapping['url'];\n /** END SET FILE LOCATIONS */\n\n\n /**\n * DEFAULT MAPPING NAVIGATION\n *\n * This default navigation can be disabled and a custom navigation can replace it.\n * 1. Default. The url /mapping/, the top nav are created, and scripts are loaded for that url.\n * 2. Custom URL supplied. The new base name is used to filter when scripts are loaded.\n * 3. Disabling all. You can disable even the script loading by supplying the filter a false return.\n * This would allow you to load the scripts yourself in the plugin or theme.\n *\n * Example for adding custom url:\n * add_filter( 'dt_mapping_module_url_base', function( $base_url ) {\n * $base_url = 'new_base_name';\n * return $base_url;\n * });\n *\n * Example for disabling all:\n * add_filter( 'dt_mapping_module_url_base', function( $base_url ) {\n * return false;\n * });\n *\n */\n $url_base = apply_filters( 'dt_mapping_module_url_base', 'mapping' );\n $url_base_length = (int) strlen( $url_base );\n if ( isset( $_SERVER[\"SERVER_NAME\"] ) ) {\n $url = ( !isset( $_SERVER[\"HTTPS\"] ) || @( $_SERVER[\"HTTPS\"] != 'on' ) )\n ? 'http://'. sanitize_text_field( wp_unslash( $_SERVER[\"SERVER_NAME\"] ) )\n : 'https://'. sanitize_text_field( wp_unslash( $_SERVER[\"SERVER_NAME\"] ) );\n if ( isset( $_SERVER[\"REQUEST_URI\"] ) ) {\n $url .= sanitize_text_field( wp_unslash( $_SERVER[\"REQUEST_URI\"] ) );\n }\n }\n\n $url_path = trim( str_replace( get_site_url(), \"\", $url ), '/' );\n\n if ( 'metrics' === substr( $url_path, '0', 7 ) ) {\n add_filter( 'dt_templates_for_urls', [ $this, 'add_url' ] ); // add custom URL\n add_filter( 'dt_metrics_menu', [ $this, 'menu' ], 99 );\n\n if ( 'metrics/mapping' === $url_path ){\n add_action( 'wp_enqueue_scripts', [ $this, 'drilldown_script' ], 89 );\n add_action( 'wp_enqueue_scripts', [ $this, 'scripts' ], 99 );\n }\n }\n if ( 'mapping' === $url_base ) {\n if ( 'mapping' === substr( $url_path, '0', $url_base_length ) ) {\n add_filter( 'dt_templates_for_urls', [ $this, 'add_url' ] ); // add custom URL\n add_filter( 'dt_metrics_menu', [ $this, 'menu' ], 99 );\n add_action( 'wp_enqueue_scripts', [ $this, 'drilldown_script' ], 89 );\n add_action( 'wp_enqueue_scripts', [ $this, 'scripts' ], 99 );\n }\n }\n else if ( $url_base === substr( $url_path, '0', $url_base_length ) ) {\n add_action( 'wp_enqueue_scripts', [ $this, 'drilldown_script' ], 89 );\n }\n /* End DEFAULT MAPPING DEFINITION */\n\n }", "title": "" }, { "docid": "6039d0946de2933021f87b824dd7ee93", "score": "0.5700783", "text": "function init() {\n parent::init();\n /// Set own core attributes\n $this->can_subaction = ACTION_NONE;\n //$this->can_subaction = ACTION_HAVE_SUBACTIONS;\n\n /// Set own custom attributes\n\n /// Get needed strings\n $this->loadStrings(array(\n /// 'key' => 'module',\n ));\n }", "title": "" }, { "docid": "f966dde63d63277f4dc3f9ad0065a3f1", "score": "0.568886", "text": "public function __construct()\n {\n if (! $this->authorized()) {\n die('Authenticate first.'); // Todo: return json?\n }\n\n // Store module path\n $this->module_path = dirname(__FILE__) .'/';\n $this->view_path = $this->module_path . 'views/';\n }", "title": "" }, { "docid": "eae872e37fdf496773b4dc7a4b734d54", "score": "0.5667236", "text": "function hook_restapi_resources() {\n\n // Dynamic paths can be captured with the '%' character, much like the Drupal\n // menu system.\n $items['resources/%'] = [\n 'class' => 'Drupal\\mymodule\\MyResource',\n ];\n $items['custom/authed/resource'] = [\n 'class' => 'Drupal\\mymodule\\OtherResource',\n 'auth' => 'Drupal\\mymodule\\CustomAuthenticationService',\n ];\n $items['custom/own_config/resource'] = [\n 'class' => 'Drupal\\mymodule\\OtherResource',\n 'config' => 'Drupal\\mymodule\\CustomConfiguration',\n ];\n\n return $items;\n\n}", "title": "" }, { "docid": "43a0b0cc15458ec89cd07a7f2a49d749", "score": "0.5665603", "text": "public function init()\n {\n $this->ctrlActionModel = new Admin_Model_Acl_ControllersActions();\n $this->dbController = new Admin_Model_DbTable_Acl_ModuleController();\n $this->dbAction = new Admin_Model_DbTable_Acl_Action();\n }", "title": "" }, { "docid": "097e71a02b6fd7be288e86b1b342781f", "score": "0.56434125", "text": "protected function _initFrontControllerSettings()\n\t{\n\t\t$this->_logger->info('Bootstrap '.__METHOD__);\n\t\t\n\t\t$this->bootstrap('frontController');\n\t\t$this->bootstrap('modules');\n\t\t$this->frontController->setResponse(new Zend_Controller_Response_Http());\n\t\t$this->frontController->setRequest(new Zend_Controller_Request_Http());\n\t\t$this->frontController->addControllerDirectory(APPLICATION_PATH.'/modules/admin/controllers', 'admin');\n\t\t//$this->frontController->addModuleDirectory(APPLICATION_PATH.'/modules/admin');\t\t\n\t}", "title": "" }, { "docid": "bf08fceed160327fb48fbae04acfc091", "score": "0.5635148", "text": "public function _construct()\r\n {\r\n $this->moduleHelper->setModuleName(self::MODULE_NAME_CONFIG_PATH);\r\n }", "title": "" }, { "docid": "3d24d149f2a5bab8106578e1cb9628f6", "score": "0.5631708", "text": "protected function init(){\n $this->setAuth(new SugarOAuthController());\n $this->setEndpointProvider(new SugarEndpointProvider());\n $Auth = $this->getAuth();\n $Auth->setActionEndpoint('authenticate',$this->EndpointProvider->getEndpoint('oauth2Token'));\n $Auth->setActionEndpoint('refresh',$this->EndpointProvider->getEndpoint('oauth2Refresh'));\n $Auth->setActionEndpoint('logout',$this->EndpointProvider->getEndpoint('oauth2Logout'));\n $Auth->setActionEndpoint('sudo',$this->EndpointProvider->getEndpoint('oauth2Sudo'));\n $Auth->setStorageController(new SugarStaticStorage());\n }", "title": "" }, { "docid": "6815749889709074fe0c2d0ed6fe15f1", "score": "0.5631029", "text": "public static function initModule() {\n\t}", "title": "" }, { "docid": "a63a5656d99e2cb544dfbec0a9354e5b", "score": "0.56184256", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'Install.models.*',\n\t\t\t'Install.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "a83f2b86d2d98c227f72fa6f1483c22c", "score": "0.56179535", "text": "public function initModules() {\n\t\t\n\t\t/* first load all files to prevent missing requirements */\n\t\tforeach ($this->modules as $name => &$module) {\n\t\t\tif (!class_exists($name)) {\n\t\t\t\trequire_once($this->configDir.$name.'.php');\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* init objects */\n\t\tforeach ($this->modules as $name => &$module) {\n\t\t\t/* initialize module */\n\t\t\t$module = new $name($this);\n\t\t\t/* fetch settings from module */\n\t\t\t$this->set($module->settings());\n\t\t\t/* switch designs */\n\t\t\tif ($module instanceof LonelyDesign) {\n\t\t\t\t$this->design = $module;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->modulesInitialized = true;\n\t\t\n\t}", "title": "" }, { "docid": "c325ac7a46ce2839a8d4602e0a074566", "score": "0.5615073", "text": "public function init()\n\t{\n\t\t$this->_loadResources();\n\t\t$this->_loadRoles();\n\t\t$this->_loadPrivileges();\n\t\t\n\t\t// cleanup\n\t\t$this->_temp['roles'] = array();\n\t\t$this->_temp['resources'] = array();\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "178515e94f92cdcef4484c586c746029", "score": "0.56056833", "text": "private function __construct()\n\t{\n\t\t// Set up the access list\n\t\t$this->setRoles()->setResources()->setPrivilages();\n\t}", "title": "" }, { "docid": "5deceee1cbb18a27bbdd35aa2a4fa333", "score": "0.5605388", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'admin.models.*',\n\t\t\t'admin.components.*',\n\t\t));\n\n\t\t$this->_initBootstrap();\n\t\t$this->_initJsCss();\n\t}", "title": "" }, { "docid": "4242a81030a7a626d46a713d05e424f1", "score": "0.5594614", "text": "public function __construct()\n {\n if ($module = Registry::get('request')->getModules()) {\n $path = Micro::getInstance()->config['AppDir'] . $module . '/' . ucfirst(basename($module)) . 'Module.php';\n\n if (file_exists($path)) {\n $path = substr(basename($path), 0, -4);\n self::$module = new $path();\n }\n }\n }", "title": "" }, { "docid": "324d83714a7f16784c396e14cc3c289e", "score": "0.5587571", "text": "public function init(){\n\t\tadd_action( 'rest_api_init', array( $this, 'register_routes' ) );\n\t}", "title": "" }, { "docid": "9a7ea2d1aed47e4bf80aca45fd9ac694", "score": "0.5580844", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'auditTrail.models.*',\n\t\t\t'auditTrail.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "7e420960b2a137e6d31bfe3f194f4c1c", "score": "0.55789244", "text": "private function installActions($module)\n {\n $moduleClassName = $this->camelize($module).\"Actions\";\n $s = '<?php\n/******************************\n * filename: '.$module.'.php\n * description:\n */\n\nclass '.$moduleClassName.' extends SkinnyActions {\n\n public function __construct()\n {\n }\n\n /**\n * The actions index method\n * @param array $request\n * @return array\n */\n public function executeIndex($request)\n {\n // return an array of name value pairs to send data to the template\n $data = array();\n return $data;\n }\n\n}';\n\n @file_put_contents('modules/'.$module.'/actions/actions.php', $s);\n }", "title": "" }, { "docid": "a6b70926195c462027c7845d2f56d56c", "score": "0.5574991", "text": "public function __construct()\n {\n $this->currencyDao = ResourceHolder::getResource('CurrencyDao');\n $this->exchange = ResourceHolder::getResource('RatesService');\n }", "title": "" }, { "docid": "dd1d192d4c49caa22c047d527b897f8d", "score": "0.5566292", "text": "public function __construct() {\n $this->modules = array (\n\t array('name' => 'MarketingData', 'displayName' => $this->l('All marketing data by source'), 'active' => true),\t \n\t array('name' => 'CampaignData', 'displayName' => $this->l('Campaign data by source'), 'active' => true),\t \n\t array('name' => 'DisplayFunnelData', 'displayName' => $this->l('Funnel data'), 'active' => true),\t \n\t array('name' => 'Coupons', 'displayName' => $this->l('Coupons'), 'active' => true),\t \n\t array('name' => 'CouponsToday', 'displayName' => $this->l('CouponsToday'), 'active' => true),\t \n\t array('name' => 'ProductbyDate', 'displayName' => $this->l('ProductbyDate'), 'active' => true),\t \n\t array('name' => 'ProductSaleSearch', 'displayName' => $this->l('ProductSaleSearch'), 'active' => true),\t \n\n\t );\t \n\t \n\t $this->name = 'andiocontrolling';\n\t $this->bootstrap = true;\n\t \t\t\t\n parent::__construct();\t\t\t\n }", "title": "" }, { "docid": "3e8d22bb5d6c1f2be03704ba737af9b3", "score": "0.55557203", "text": "public function actionInit()\n {\n $auth = Yii::$app->authManager;\n\n // add \"updateQuestion\" permission\n $updateQuestion = $auth->createPermission('updateQuestion');\n $updateQuestion->description = 'Update question';\n $auth->add($updateQuestion);\n\n // add \"createQuestion\" permission\n $createQuestion = $auth->createPermission('createQuestion');\n $createQuestion->description = 'Create question';\n $auth->add($createQuestion);\n\n // add \"author\" role and give this role the \"createQuestion\" permission\n $author = $auth->createRole('author');\n $auth->add($author);\n $auth->addChild($author, $createQuestion);\n\n // add \"admin\" role and give this role the \"updateQuestion\" permission\n // as well as the permissions of the \"author\" role\n $admin = $auth->createRole('admin');\n $auth->add($admin);\n $auth->addChild($admin, $updateQuestion);\n $auth->addChild($admin, $author);\n\n $auth->assign($author, 101);\n $auth->assign($admin, 100);\n }", "title": "" }, { "docid": "603c4c5dede78aa08ecdcd39837fc1ab", "score": "0.5554538", "text": "protected function _initApi() {\n\t$this->bootstrap('Zend');\n\t$this->bootstrap('ApiRoutes');\n }", "title": "" }, { "docid": "2c3c6201d09d8740fd372b21f8ea0628", "score": "0.5554536", "text": "public function __construct()\n {\n $CSO = new Api_Resources_CSO();\n $CSO->authenticate('timojong', 'FG4d%!k3hU');\n $this->addResource('CSO', $CSO);\n\n $OpenOnderwijs = new Api_Resources_OpenOnderwijs();\n $this->addResource('OpenOnderwijs', $OpenOnderwijs);\n }", "title": "" }, { "docid": "33c90a7732d37738c1095a84e558763f", "score": "0.55507404", "text": "private static function createModuleRoute()\n {\n self::$Router->map('GET|POST', '/[a:version]/[**:path]', function(string $version, string $path){\n $version = strtolower($version);\n $path = strtolower($path);\n\n if(isset(self::$PathRoutes[$version][$path]))\n {\n /** @var VersionConfiguration $VersionConfiguration */\n $VersionConfiguration = self::$MainConfiguration->VersionConfigurations[$version];\n\n /** @var ModuleConfiguration $ModuleConfiguration */\n $ModuleConfiguration = $VersionConfiguration->Modules[self::$PathRoutes[$version][$path]];\n\n if($VersionConfiguration->Available == false)\n {\n ResourceNotAvailable::executeResponse($VersionConfiguration->UnavailableMessage);\n exit();\n }\n\n if($ModuleConfiguration->Available == false)\n {\n ResourceNotAvailable::executeResponse($ModuleConfiguration->UnavailableMessage);\n exit();\n }\n\n self::verifyRequest();\n\n $AccessRecord = new AccessRecord();\n $AccessRecord->ID = 0;\n $AccessRecord->ApplicationID = 0;\n\n if($ModuleConfiguration->AuthenticationRequired)\n {\n $AccessRecord = self::authenticateUser();\n }\n\n /** @var Module $ModuleObject */\n $ModuleObject = self::getModuleObject($version, $ModuleConfiguration);\n $ModuleObject->access_record = $AccessRecord;\n\n // Process the request\n self::startTimer();\n\n $ModuleException = null;\n\n try\n {\n $ModuleObject->processRequest();\n\n header('Content-Type: ' . $ModuleObject->getContentType());\n header('Content-Size: ' . $ModuleObject->getContentLength());\n http_response_code($ModuleObject->getResponseCode());\n\n // Create the response\n if($ModuleObject->isFile())\n {\n header(\"Content-disposition: attachment; filename=\\\"\" . basename($ModuleObject->getFileName()) . \"\\\"\");\n }\n }\n catch(Exception $exception)\n {\n $ModuleException = $exception;\n //InternalServerError::executeResponse($exception);\n //exit();\n }\n\n $ExecutionTime = self::stopTimer();\n self::logRequest($AccessRecord, $version, $ModuleObject, $ExecutionTime);\n self::setHeaders();;\n\n // Update the last used state\n $AccessRecord->LastActivity = (int)time();\n $IntellivoidAPI = self::getIntellivoidAPI();\n $IntellivoidAPI->getAccessKeyManager()->updateAccessRecord($AccessRecord);\n\n if($ModuleException == null)\n {\n print($ModuleObject->getBodyContent());\n }\n else\n {\n $RequestRecordObject = $IntellivoidAPI->getRequestRecordManager()->getRequestRecord(\n RequestRecordSearchMethod::byReferenceId, self::$ReferenceCode\n );\n\n $IntellivoidAPI->getExceptionRecordManager()->recordException(\n $RequestRecordObject->ID, $AccessRecord, $ModuleException\n );\n\n InternalServerError::executeResponse($ModuleException);\n }\n\n exit();\n }\n else\n {\n ResourceNotFound::executeResponse();\n exit();\n }\n\n });\n }", "title": "" }, { "docid": "18ccc91f9a30132290723e46982f75bf", "score": "0.5549653", "text": "public function set_up() {\n\n\t\t$this::base_set_up();\n\t\tdo_action( 'rest_api_init' );\n\t\t$this->server = rest_get_server();\n\n\t}", "title": "" }, { "docid": "8df566fc1db2b8afcd8065d3b81263c1", "score": "0.5548934", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'clinics.models.*',\n\t\t\t'clinics.components.*',\n\t\t));\n\t}", "title": "" }, { "docid": "db7a51a45ee1c2b6b6b7597373c26f3c", "score": "0.5546807", "text": "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::role('admin', __('Administrator'), [\n 'create',\n 'read',\n 'update',\n 'delete',\n ])->description(__('Administrator users can perform any action.'));\n\n Jetstream::role('editor', __('Editor'), [\n 'read',\n 'create',\n 'update',\n ])->description(__('Editor users have the ability to read, create, and update.'));\n }", "title": "" }, { "docid": "dde9bffbbdbe8bee8dea43fdcbb79293", "score": "0.55422235", "text": "function module_init () {\n global $core_stylesheets;\n global $core_scripts;\n \n foreach (module_list() as $module) {\n $style_func = $module . '_stylesheets';\n if (function_exists($style_func)) {\n $stylesheets = call_user_func($style_func);\n foreach ($stylesheets as $sheet) {\n $core_stylesheets[] = \"include/$module/$sheet\";\n }\n }\n $style_func = $module . '_scripts';\n if (function_exists($style_func)) {\n $scripts = call_user_func($scripts_func);\n foreach ($scripts as $script) {\n $core_scripts[] = \"include/$module/$script\";\n }\n }\n }\n}", "title": "" }, { "docid": "0aee2ca52f9c05bb634e4934b8802852", "score": "0.55346185", "text": "protected function _initResourcePaths() {\n// Zend_Loader_Autoloader::autoload('Media_Resource_Elfinder');\n// $this->getPluginLoader()->load('elfinder');\n }", "title": "" }, { "docid": "1dfee06641bfdd3e936078d857f7b257", "score": "0.5532879", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'forum.models.*',\n\t\t\t'forum.components.*',\n 'forum.controllers.*',\n\t\t));\n\t}", "title": "" }, { "docid": "498369ce39cdea51cddba73b1cf02bd4", "score": "0.55277866", "text": "public function __construct()\n {\n $this->authorizeResource(Project::class);\n }", "title": "" }, { "docid": "2b5cb72dfc03a78ca7181813e7e022d3", "score": "0.55231625", "text": "function _setResourceMenu() {\n\t\t$this->loadModel('Content');\n\t\t$resources = $this->Content->find('all', array('conditions' => array('ctid' => 3), 'limit' => 10));\n\t\t$this->set('resource_list', $resources);\n\t}", "title": "" }, { "docid": "5e66ada1d145564e3f16be22613aaaaf", "score": "0.5519969", "text": "public function init() {\n\t\t$modulesMapper = new Admin_Model_Mapper_Module ();\n\t\t$module = $modulesMapper->fetchAll ( \"name ='module-cms'\" );\n\t\tif (is_array ( $module )) {\n\t\t\t$this->_module_id = $module [0]->getModuleId ();\n\t\t}\n\t}", "title": "" }, { "docid": "1878892d66103091c547b132112329d0", "score": "0.55118126", "text": "public function actionInit()\n {\n // get authManager\n $authManager = new DbManager();\n\n // clear current structure\n $authManager->removeAllPermissions();\n $authManager->removeAllRoles();\n $authManager->removeAllRules();\n\n // create roles\n $roleBasic = $authManager->createRole(User::ROLE_BASIC);\n $rolePremium = $authManager->createRole(User::ROLE_PREMIUM);\n $roleAdmin = $authManager->createRole(User::ROLE_ADMIN);\n\n // add roles\n $authManager->add($roleBasic);\n $authManager->add($rolePremium);\n $authManager->add($roleAdmin);\n\n // create permissions\n $permissionOperateSelf = $authManager->createPermission('operateSelf');\n $permissionOperateAll = $authManager->createPermission('operateAll');\n\n // add permissions\n $authManager->add($permissionOperateSelf);\n $authManager->add($permissionOperateAll);\n\n // GENERATE RBAC RELATIONS\n\n // role \"Basic\" has permission to operate whit own objects\n $authManager->addChild($roleBasic, $permissionOperateSelf);\n\n // role \"Premium\" has all permissions of role \"Basic\"\n $authManager->addChild($rolePremium, $roleBasic);\n\n // role \"Admin\" has all permissions of role \"Premium\" and can operate with all objects\n $authManager->addChild($roleAdmin, $rolePremium);\n $authManager->addChild($roleAdmin, $permissionOperateAll);\n\n // assing role \"Admin\" to user with ID 1\n // $authManager->assign($roleAdmin, 1);\n }", "title": "" }, { "docid": "30b46a80423670044ea16d0dc1a3eedb", "score": "0.5507532", "text": "function rest_api_init()\n {\n }", "title": "" }, { "docid": "32415c4f499eb8c5a395b44cdfc26fd5", "score": "0.5500188", "text": "protected function _initModuleAutoloader()\n { \n $this->_resourceLoader = new Zend_Application_Module_Autoloader(array(\n 'namespace' => 'App',\n 'basePath' => APPLICATION_PATH . '/modules/app',\n )); \n }", "title": "" }, { "docid": "ee485d52f9b77ff3cd5d4dd353558f2b", "score": "0.54995143", "text": "public function __construct($resourceName)\n {\n $config = Mage::getConfig();\n $this->_resourceName = $resourceName;\n $this->_resourceConfig = $config->getResourceConfig($resourceName);\n $connection = $config->getResourceConnectionConfig($resourceName);\n if ($connection) {\n $this->_connectionConfig = $connection;\n } else {\n $this->_connectionConfig = $config->getResourceConnectionConfig(self::DEFAULT_SETUP_CONNECTION);\n }\n\n $modName = (string)$this->_resourceConfig->setup->module;\n $this->_moduleConfig = $config->getModuleConfig($modName);\n $connection = Mage::getSingleton('core/resource')->getConnection($this->_resourceName);\n /**\n * If module setup configuration wasn't loaded\n */\n if (!$connection) {\n $connection = Mage::getSingleton('core/resource')->getConnection($this->_resourceName);\n }\n $this->_conn = $connection;\n }", "title": "" }, { "docid": "500e1dd381360f449a8e4deec3249011", "score": "0.54951763", "text": "public function init() {\r\n // you may place code here to customize the module or the application\r\n // import the module-level models and components\r\n $this->setImport(array(\r\n 'application.modules.amfGateway.models.*',\r\n 'application.modules.amfGateway.components.*',\r\n ));\r\n }", "title": "" }, { "docid": "4b41ea7796cd5b18b814fa98030a8f90", "score": "0.5488081", "text": "public function __construct() {\n //parent::__construct();\n\n $model = new AclModel();\n //$sections = new Sections();\n $privileges = new PrivilegesModel();\n $roles = new Roles();\n\n $this->recursiveRolesFill($roles->getTree());\n\n foreach($privileges->getResourcesArray() as $name)\n {\n $this->addResource($name);\n }\n\n foreach($model->getRules() as $rule)\n {\n $this->allow($rule->role, $rule->resource, $rule->privilege);\n }\n }", "title": "" }, { "docid": "062920f6715bac77a1203448118927eb", "score": "0.54798114", "text": "public function __construct()\n {\n global $API_AUTHORIZATIONS;\n\n //Construct generic API handler\n parent::__construct();\n\n //Define authorizations for current API module\n $this->AUTH = $API_AUTHORIZATIONS[self::MODULE];\n }", "title": "" }, { "docid": "062920f6715bac77a1203448118927eb", "score": "0.54798114", "text": "public function __construct()\n {\n global $API_AUTHORIZATIONS;\n\n //Construct generic API handler\n parent::__construct();\n\n //Define authorizations for current API module\n $this->AUTH = $API_AUTHORIZATIONS[self::MODULE];\n }", "title": "" }, { "docid": "be26a800cc2e15938bdba5c11997c733", "score": "0.54787546", "text": "public function init()\n {\n // you may place code here to customize the module or the application\n // import the module-level models and components\n $this->setImport(array(\n 'assetsManagementRestClient.models.*',\n 'assetsManagementRestClient.components.*',\n //'assetsManagementRestClient.components.*',\n 'application.modules.batchConvert.models.*',\n 'application.modules.batchConvert.components.*',\n 'application.modules.project.components.*',\n ));\n\n Yii::app()->getClientScript()->registerCssFile(AssetsHelper::getAssetUrl(dirname(__FILE__) . '/assets/') . '/css/dashboard.css');\n Yii::app()->getClientScript()->registerCssFile(AssetsHelper::getAssetUrl(dirname(__FILE__) . '/assets/') . '/css/addFiles.css');\n Yii::app()->getClientScript()->registerCssFile(AssetsHelper::getAssetUrl(dirname(__FILE__) . '/assets/') . '/css/titleAssets.css');\n Yii::app()->getClientScript()->registerCssFile(AssetsHelper::getAssetUrl(dirname(__FILE__) . '/assets/') . '/css/jquery.contextMenu.css');\n\n\n parent::init();\n }", "title": "" }, { "docid": "306d874873a77e20f44d771150852cd4", "score": "0.54787236", "text": "protected function initialize() {\n\t\t$this->resource = \"users\"; // Set resource type\n\t}", "title": "" }, { "docid": "fe1569839d10f10901c31f5397a5e62c", "score": "0.5467564", "text": "public function run()\n {\n foreach (config('welkome.modules') as $module) {\n Permission::insert([\n [\n 'name' => $module . '.index',\n 'guard_name' => config('auth.defaults.guard')\n ],\n [\n 'name' => $module . '.create',\n 'guard_name' => config('auth.defaults.guard')\n ],\n [\n 'name' => $module . '.edit',\n 'guard_name' => config('auth.defaults.guard')\n ],\n [\n 'name' => $module . '.destroy',\n 'guard_name' => config('auth.defaults.guard')\n ],\n [\n 'name' => $module . '.show',\n 'guard_name' => config('auth.defaults.guard')\n ],\n ]);\n }\n\n Permission::create([\n 'name' => 'invoices.payment.close',\n 'guard_name' => config('auth.defaults.guard')\n ]);\n\n Permission::create([\n 'name' => 'invoices.close',\n 'guard_name' => config('auth.defaults.guard')\n ]);\n\n Permission::create([\n 'name' => 'invoices.open',\n 'guard_name' => config('auth.defaults.guard')\n ]);\n\n Permission::create([\n 'name' => 'invoices.losses',\n 'guard_name' => config('auth.defaults.guard')\n ]);\n\n // Permission::create([\n // 'name' => 'rooms.pool',\n // 'guard_name' => config('auth.defaults.guard')\n // ]);\n\n // Permission::create([\n // 'name' => 'rooms.assign',\n // 'guard_name' => config('auth.defaults.guard')\n // ]);\n }", "title": "" }, { "docid": "dc34030751d41abdb2c344ae1d6c9b99", "score": "0.546711", "text": "public function init() {\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitUsers.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroups.php');\n\t\trequire(__DIR__ . '/../setup-scripts/createExplicitGroupsDifferentOU.php');\n\t\tparent::init();\n\t}", "title": "" }, { "docid": "9aace63357553959f277721ffc4d3b5f", "score": "0.5463993", "text": "protected function setStartupModule() {}", "title": "" }, { "docid": "c822df7ed314cf2ea8008dc8c00fc932", "score": "0.5456018", "text": "public function setModuleUsage()\n {\n foreach ($this->result as $moduleName => $moduleInfo) {\n $this->result[$moduleName]['InUse'] = 2;\n $this->determineDataObjectUsage($moduleName, $moduleInfo);\n $this->determineDataExtensionUsage($moduleName, $moduleInfo);\n }\n }", "title": "" }, { "docid": "c58a4a2845096db1bcf764e169204794", "score": "0.5455632", "text": "public function init() {\n // you may place code here to customize the module or the application\n // import the module-level models and components\n $this->setImport(array(\n 'admin.models.*',\n 'admin.components.*',\n ));\n\n // set theme\n $theme_name = 'admin';\n Yii::app()->themeManager->setBaseUrl(Yii::app()->request->baseUrl . '/' . 'module-assets/');\n $theme_path = 'application.modules.admin.themes';\n Yii::app()->themeManager->basePath = Yii::getPathOfAlias($theme_path);\n Yii::app()->theme = $theme_name;\n\n\n // set view path\n $vPath = Yii::getPathOfAlias($theme_path . '.' . $theme_name . '.views');\n $this->setViewPath($vPath);\n\n Yii::app()->errorHandler->errorAction = 'admin/account/error';\n }", "title": "" }, { "docid": "23b5dfd26b368d8ffdfae5e36834199e", "score": "0.5453447", "text": "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['view']);\n\n Jetstream::role(\n 'admin',\n 'Administrator',\n [\n 'create',\n 'view',\n 'update',\n 'delete',\n ]\n )->description('Administratoren können alles.');\n\n Jetstream::role(\n 'editor',\n 'Editor',\n [\n 'view',\n 'create',\n 'update',\n ]\n )->description(\n 'Editor können Bankkonten und Kontostände sehen, neue Kontostände erfassen und neue Bankkonten erstellen.'\n );\n\n Jetstream::role(\n 'viewer',\n 'Viewer',\n [\n 'view'\n ]\n )->description(\n 'Viewer können nur Bankkonten und die Kontostände sehen. Sie können nichts bearbeiten oder löschen.'\n );\n }", "title": "" }, { "docid": "fb887de46408d6ea55878b3acc24e8f8", "score": "0.5446596", "text": "public function rest_api_init() {\n register_rest_route('h5p/v1', '/post/(?P<id>\\d+)', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'rest_api_post'),\n 'args' => array(\n 'id' => array(\n 'validate_callback' => function ($param, $request, $key) {\n return $param == intval($param);\n }\n ),\n ),\n 'permission_callback' => array($this, 'rest_api_permission')\n ));\n\n register_rest_route('h5p/v1', 'all', array(\n 'methods' => 'GET',\n 'callback' => array($this, 'rest_api_all'),\n 'permission_callback' => array($this, 'rest_api_permission')\n ));\n }", "title": "" }, { "docid": "2599d8d83214bf7c579f3e2c60ede617", "score": "0.543856", "text": "protected function configurePermissions()\n {\n Jetstream::defaultApiTokenPermissions(['read']);\n\n Jetstream::permissions([\n 'create',\n 'read',\n 'update',\n 'delete',\n ]);\n }", "title": "" }, { "docid": "6a90a857b59249ee215affceeb64de03", "score": "0.5427437", "text": "public function init()\n\t{\n\t\t// you may place code here to customize the module or the application\n\n\t\t// import the module-level models and components\n\t\t$this->setImport(array(\n\t\t\t'perawatanIntensif.models.*',\n\t\t\t'perawatanIntensif.components.*',\n 'rawatInap.models.*',\n\t\t\t'rawatInap.components.*',\n\t\t));\n \n if(!empty($_REQUEST['modul_id']))\n Yii::app()->session['modul_id'] = $_REQUEST['modul_id'];\n\t}", "title": "" }, { "docid": "017d78f9919602e67e8957419c409ca1", "score": "0.54228115", "text": "protected function mapModules()\n {\n Route::middleware('web')\n ->namespace($this->namespace)\n ->group(base_path('routes/admin/modules.php'));\n }", "title": "" }, { "docid": "d03affcfbc1c3e1dc90f688cdba2652a", "score": "0.54226446", "text": "public function initContent()\n {\n parent::initContent();\n\n if (Module::isInstalled('ps_mbo')) {\n $selectionModulePage = $this->context->link->getAdminLink('AdminPsMboModule');\n } else {\n $selectionModulePage = $this->context->link->getAdminLink('AdminModulesCatalog');\n }\n $installedModulePage = $this->context->link->getAdminLink('AdminModulesManage');\n\n $homepageListToConfigure = $this->getHomepageListConfiguration();\n $categoryListToConfigure = $this->getCategoryListConfiguration();\n $productListToConfigure = $this->getProductListConfiguration();\n\n $this->context->smarty->assign([\n 'enable' => $this->getModule()->active,\n 'moduleName' => $this->getModule()->displayName,\n 'bootstrap' => 1,\n 'configure_type' => $this->controller_quick_name,\n 'iconConfiguration' => $this->getModule()->img_path . '/controllers/configuration/icon_configurator.png',\n 'listCategories' => $this->categoryList,\n 'homePageList' => $this->setFinalList($homepageListToConfigure),\n 'categoryPageList' => $this->setFinalList($categoryListToConfigure),\n 'productPageList' => $this->setFinalList($productListToConfigure),\n 'selectionModulePage' => $selectionModulePage,\n 'installedModulePage' => $installedModulePage,\n 'moduleImgUri' => $this->getModule()->img_path . '/controllers/configuration/',\n 'moduleActions' => $this->aModuleActions,\n 'moduleActionsNames' => $this->moduleActionsNames,\n 'themeConfiguratorUrl' => $this->context->link->getAdminLink(\n 'AdminModules',\n true,\n [],\n ['configure' => 'ps_themeconfigurator']\n ),\n 'ps_uri' => $this->getModule()->ps_uri,\n ]);\n\n $aJsDef = [\n 'admin_module_controller_psthemecusto' => $this->getModule()->controller_name[1],\n 'admin_module_ajax_url_psthemecusto' => $this->getModule()->front_controller[1],\n 'module_action_sucess' => $this->trans('Action on the module successfully completed', [], 'Modules.PsThemeCusto.Admin'),\n 'module_action_failed' => $this->trans('Action on module failed', [], 'Modules.PsThemeCusto.Admin'),\n ];\n $jsPath = [$this->getModule()->js_path . '/controllers/' . $this->controller_quick_name . '/back.js'];\n $cssPath = [$this->getModule()->css_path . '/controllers/' . $this->controller_quick_name . '/back.css'];\n\n $this->getModule()->setMedia($aJsDef, $jsPath, $cssPath);\n $this->setTemplate($this->getModule()->template_dir . 'page.tpl');\n }", "title": "" }, { "docid": "a9327d46c47157bfe6df5452e35dc14f", "score": "0.5418758", "text": "public function setup()\n {\n CRUD::setModel(\\App\\Models\\User::class);\n $this->crud->addClause('where', 'is_provider', '=', '1');\n CRUD::setRoute(config('backpack.base.route_prefix') . '/provider');\n CRUD::setEntityNameStrings('provider', 'Providers list');\n }", "title": "" }, { "docid": "9f847d535259ff0bf2660cf1fe21ef91", "score": "0.5407972", "text": "public function init() \n\t{\n\t\t\\Aurora\\System\\Router::getInstance()->registerArray(\n\t\t\tself::GetName(),\n\t\t\t[\n\t\t\t\t'api' => [$this, 'EntryApi'],\n\t\t\t\t'ping' => [$this, 'EntryPing'],\n\t\t\t\t'pull' => [$this, 'EntryPull'],\n\t\t\t\t'plugins' => [$this, 'EntryPlugins'],\n\t\t\t\t'mobile' => [$this, 'EntryMobile'],\n\t\t\t\t'sso' => [$this, 'EntrySso'],\n\t\t\t\t'postlogin' => [$this, 'EntryPostlogin'],\n\t\t\t\t'file-cache' => [$this, 'EntryFileCache']\n\t\t\t]\n\t\t);\n\n\t\t\\Aurora\\System\\EventEmitter::getInstance()->onArray(\n\t\t\t[\n\t\t\t\t['CreateAccount', [$this, 'onCreateAccount'], 100],\n\t\t\t\t['Core::GetCompatibilities::after', [$this, 'onAfterGetCompatibilities']],\n\t\t\t\t['AdminPanelWebclient::GetEntityList::before', [$this, 'onBeforeGetEntityList']],\n\t\t\t\t['ChangePassword::after', [$this, 'onAfterChangePassword']]\n\t\t\t]\n\t\t);\n\n\t\t$this->denyMethodsCallByWebApi([\n\t\t\t'UpdateUserObject',\n\t\t\t'GetUserByUUID',\n\t\t\t'GetUserByPublicId',\n\t\t\t'GetAdminUser',\n\t\t\t'GetTenantById',\n\t\t\t'GetDefaultGlobalTenant',\n\t\t\t'GetUser',\n\t\t\t'UpdateTokensValidFromTimestamp'\n\t\t]);\n\t}", "title": "" }, { "docid": "21e00c5bdfcc8816d94e46bb2e3db793", "score": "0.5406077", "text": "public function init() {\n\t\t// @todo replace with a setTemplate() in t41\\Exception\n\t\tView::setTemplate('default.html');\n\t\t\n\t\t// get page identifiers (module, controller and action)\n\t\tLayout::$module\t\t= $this->_getParam('module');\n\t\tLayout::$controller\t= $this->_getParam('controller');\n\t\tLayout::$action\t\t= $this->_getParam('action');\n\t\t\n\t\t// provide controller with basic information about the current module\n\t\tforeach (Module::getConfig() as $vendor => $modules) {\n\t\t\t\n\t\t\tforeach ($modules as $key => $module) {\n\t\t\t\t\n\t\t\t\tif (isset($module['controller']) && Layout::$module == $module['controller']['base']) {\n\t\t\t\t\t$this->_module = 'app/' . $vendor . '/' . $key;\n\t\t\t\t\tLayout::$vendor = $vendor;\n\t\t\t\t\tLayout::$moduleKey = $key;\n\n\t\t\t\t\t$resource = Layout::$controller;\n\t\t\t\t\tif (Layout::$action) $resource .= '/' . Layout::$action;\n\t\t\t\t\tif (isset($module['controller']['items'])) {\n\t\t\t\t\t\tforeach ($module['controller']['items'] as $controller) {\n\t\t\t\t\t\t\tif ($this->_getCurrentItem($resource, $controller) == true) break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (isset($module['controllers_extends'])) {\n\t\t\t\t\t\tforeach ($module['controllers_extends'] as $controller) {\n\t\t\t\t\t\t\tif ($this->_getCurrentItem($resource, $controller['items']) == true) break;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "293abf87d77008b3b4c61978a1c488b9", "score": "0.53954506", "text": "function __construct()\n {\n $this->middleware('permission:list-module');\n $this->middleware('permission:create-module', ['only' => ['create','store']]);\n $this->middleware('permission:edit-module', ['only' => ['edit','update']]);\n $this->middleware('permission:delete-module', ['only' => ['destroy']]);\n }", "title": "" } ]
6c3065a0edef85c29d915f999249782b
returns the crud actions on a resource
[ { "docid": "2c5d6e3c5f238cdd8fbccc5af9a16715", "score": "0.0", "text": "protected function getSupportedAttributes()\n {\n return [\n ResourceActions::CREATE,\n ResourceActions::DELETE,\n ResourceActions::INDEX,\n ResourceActions::SHOW,\n ResourceActions::UPDATE,\n ];\n }", "title": "" } ]
[ { "docid": "e7ff92063568c4bd4be3451c0424b397", "score": "0.72834766", "text": "static protected function get_resource_actions(): array\n\t{\n\t\treturn [\n\n\t\t\tself::ACTION_INDEX => [ '/{name}', Request::METHOD_GET ],\n\t\t\tself::ACTION_NEW => [ '/{name}/new', Request::METHOD_GET ],\n\t\t\tself::ACTION_CREATE => [ '/{name}', Request::METHOD_POST ],\n\t\t\tself::ACTION_SHOW => [ '/{name}/{id}', Request::METHOD_GET ],\n\t\t\tself::ACTION_EDIT => [ '/{name}/{id}/edit', Request::METHOD_GET ],\n\t\t\tself::ACTION_UPDATE => [ '/{name}/{id}', [ Request::METHOD_PUT, Request::METHOD_PATCH ] ],\n\t\t\tself::ACTION_DELETE => [ '/{name}/{id}', Request::METHOD_DELETE ]\n\n\t\t];\n\t}", "title": "" }, { "docid": "83d2f6542a18fe988818beb15b94d275", "score": "0.68955827", "text": "protected function getActions() {}", "title": "" }, { "docid": "3a3862dac1805655e323f843cea91967", "score": "0.68064725", "text": "public function get_actions(): array;", "title": "" }, { "docid": "c685dbf138c8f0b2ff43d5b47e994c78", "score": "0.67608064", "text": "public function getResourceActions()\n {\n if (array_key_exists(\"resourceActions\", $this->_propDict)) {\n return $this->_propDict[\"resourceActions\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "83a36616a9d0499a1d06686bfea11d09", "score": "0.673514", "text": "public function getActions() {\n\n\t}", "title": "" }, { "docid": "ac59dfe8d05a6078f6db80ad92550cc8", "score": "0.67220956", "text": "public function getActions();", "title": "" }, { "docid": "ac59dfe8d05a6078f6db80ad92550cc8", "score": "0.67220956", "text": "public function getActions();", "title": "" }, { "docid": "cd17c67ac67404bc2793b640ad892314", "score": "0.6557004", "text": "public function getFrontEndActions();", "title": "" }, { "docid": "82023777d8f4ec37f40a6faa4b467776", "score": "0.6522709", "text": "public function discoverAction()\n\t{\n\t\t$resourceEntryPoints = [];\n\t\t$actionMethodNames = static::getPublicActionMethods($this->objectManager);\n\t\t$actionMethodParameters = static::getActionMethodParameters($this->objectManager);\n\t\tforeach ($actionMethodNames as $actionMethodName => $isPublic) {\n\t\t\tif (in_array($actionMethodName, ['discoverAction', 'optionsAction'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$actionName = str_replace('Action', '', $actionMethodName);\n\n\t\t\t$arguments = [];\n\t\t\tif (isset($actionMethodParameters[$actionMethodName][static::$RESOURCE_ARGUMENT_NAME])) {\n\t\t\t\tif ($actionMethodParameters[$actionMethodName][static::$RESOURCE_ARGUMENT_NAME]['optional'] === false) {\n\t\t\t\t\t$arguments = [static::$RESOURCE_ARGUMENT_NAME => ['__identity' => '{identifier}']];\n\t\t\t\t} else {\n\t\t\t\t\t$arguments = [static::$RESOURCE_ARGUMENT_NAME => ['__identity' => '({identifier})']];\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Map CRUD actions back to generic URI action\n\t\t\t$uriActionName = in_array($actionName, ['show', 'list', 'create', 'update', 'remove']) ? 'index' : $actionName;\n\t\t\t$actionUri = $this->uriBuilder->setCreateAbsoluteUri($this->useAbsoluteUris)->setFormat($this->request->getFormat())->uriFor($uriActionName, $arguments);\n\t\t\t$actionReflection = new MethodReflection($this, $actionMethodName);\n\n\t\t\t$parameterDescriptions = [];\n\t\t\tif ($actionReflection->isTaggedWith('param')) {\n\t\t\t\tforeach ($actionReflection->getTagValues('param') as $parameterDescription) {\n\t\t\t\t\t$descriptionParts = preg_split('/\\s/', $parameterDescription, 3);\n\t\t\t\t\tif (isset($descriptionParts[2])) {\n\t\t\t\t\t\t$parameterName = ltrim($descriptionParts[1], '$');\n\t\t\t\t\t\t$parameterDescriptions[$parameterName] = $descriptionParts[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$parameters = array_map(static function($parameterInfo) {\n\t\t\t\treturn [\n\t\t\t\t\t'required' => !$parameterInfo['optional'],\n\t\t\t\t\t'type' => $this->normalizeResourceTypes ? ResourceTypeHelper::normalize($parameterInfo['type']) : $parameterInfo['type'],\n\t\t\t\t\t'default' => $parameterInfo['defaultValue']\n\t\t\t\t];\n\t\t\t}, $actionMethodParameters[$actionMethodName]);\n\t\t\t// PHPSadness.com: array_walk operates in place\n\t\t\tarray_walk($parameters, static function(&$parameterInfo, $parameterName) use ($parameterDescriptions) {\n\t\t\t\t$parameterInfo['description'] = $parameterDescriptions[$parameterName] ?? '';\n\t\t\t});\n\n\t\t\t$return = '';\n\t\t\tif ($actionReflection->isTaggedWith('return')) {\n\t\t\t\t$returnTags = $actionReflection->getTagValues('return');\n\t\t\t\t$returnParts = preg_split('/\\s/', reset($returnTags), 2);\n\t\t\t\t$return = $returnParts[1] ?? '';\n\t\t\t}\n\t\t\t$resourceEntryPoints[$actionName] = [\n\t\t\t\t'uri' => rawurldecode($actionUri),\n\t\t\t\t'parameters' => $parameters,\n\t\t\t\t'description' => $actionReflection->getDescription(),\n\t\t\t\t'return' => $return,\n\t\t\t];\n\t\t}\n\t\t$this->view->assign('description', $resourceEntryPoints);\n\t\tif ($this->view instanceof JsonView) {\n\t\t\t$this->view->setVariablesToRender(['description']);\n\t\t}\n\t}", "title": "" }, { "docid": "ff2322c77652ce3fdfebbe76bf8c9724", "score": "0.6516721", "text": "public function actions(): array;", "title": "" }, { "docid": "895923b74219dc8ded01385e89cff22f", "score": "0.6424994", "text": "public function getBatchActions()\n {\n $actions = parent::getBatchActions();\n\n // PS : https://sonata-project.org/bundles/admin/2-0/doc/reference/batch_actions.html\n\n // check user permissions\n if($this->isGranted('EDIT') && $this->isGranted('DELETE')){\n $originalActions = $actions; // on copie les actions et les réinitialise pour mettre les actiosn 'valider' & 'dévalider' en premier\n $actions = array(); // on réinitilaise le tableau\n $actions['valider']=array(\n 'label' => 'Valider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions['devalider']=array(\n 'label' => 'Dévalider',\n 'ask_confirmation' => true // If true, a confirmation will be asked before performing the action\n );\n\n $actions = array_merge($actions, $originalActions);\n }\n\n return $actions;\n }", "title": "" }, { "docid": "8b5864a94123be45aa36e12ec42f3ccd", "score": "0.6424348", "text": "public function get_by_resource($resource)\r\n\t{\r\n\t\t$where = array();\r\n\t\t$where['resource'] = $resource;\r\n\t\t$action = ORM::factory('action')->where($where)->find();\r\n\t\treturn $action->as_array();\r\n\t}", "title": "" }, { "docid": "ac740f32cdaac7307536036323cb972f", "score": "0.64226186", "text": "public function action()\n {\n return $this->_actions;\n }", "title": "" }, { "docid": "6078d5a68b2d53574c05decaf96bc5a1", "score": "0.64155006", "text": "function get_bulk_actions() {\n\n\t\treturn $actions = array(\n\t\t\t'delete'\t=> 'Delete'\n\t\t);\n\t}", "title": "" }, { "docid": "c42a3e6b1e0de35634b0254543172fdd", "score": "0.6401638", "text": "public function getActions(): array;", "title": "" }, { "docid": "95b47992648af7cdd541be5629a9adc2", "score": "0.6382231", "text": "protected function get_bulk_actions()\n {\n }", "title": "" }, { "docid": "95b47992648af7cdd541be5629a9adc2", "score": "0.6381466", "text": "protected function get_bulk_actions()\n {\n }", "title": "" }, { "docid": "9217f7af4060191d1b0e3c15800498c5", "score": "0.63767266", "text": "function get_bulk_actions()\n {\n $actions = array(\n\n 'delete' => 'Delete',\n );\n return $actions;\n }", "title": "" }, { "docid": "1ce440aed43bc602deb8d618ada0df21", "score": "0.6367665", "text": "protected static function getActions()\n {\n return [\n CrudController::ACTION_ADD => 'created',\n CrudController::ACTION_DELETE => 'removed',\n CrudController::ACTION_DETAILS => 'displayed',\n CrudController::ACTION_EDIT => 'updated',\n CrudController::ACTION_HIDE => 'hidden',\n CrudController::ACTION_VIEW => 'displayed',\n CrudController::ACTION_UNHIDE => 'made visible',\n CrudController::ACTION_ENABLE => 'enabled',\n CrudController::ACTION_DISABLE => 'disabled',\n ];\n }", "title": "" }, { "docid": "64e8fbbcd74beb0c0c9fcfc95a91f883", "score": "0.6367368", "text": "function get_bulk_actions()\n {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "title": "" }, { "docid": "85cbefe7b9b626c4caf41060b9b48e51", "score": "0.63643986", "text": "function get_bulk_actions() {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "title": "" }, { "docid": "50e4d8ac5b73ba10fbd0e340707acf6d", "score": "0.6349927", "text": "function get_bulk_actions() {\n $actions = array(\n 'delete' => 'Delete'\n );\n return $actions;\n }", "title": "" }, { "docid": "c1abd194680ed14e7d6a32b226a69655", "score": "0.6325511", "text": "public function actions()\r\n {\r\n return array(\r\n 'index' => array(\r\n 'class' => \\nizsheanez\\jsonRpc\\Action::class,\r\n ),\r\n );\r\n }", "title": "" }, { "docid": "b7049dcf5e117646ce90732d07b4d3d0", "score": "0.6323043", "text": "public function getActionforACL() {\n\t \t$action = strtolower($this->getRequest()->getActionName()); \n\t\tif($action == \"add\" || $action == \"other\" || $action == \"processother\" || $action == \"processadd\" ) {\n\t\t\treturn ACTION_CREATE; \n\t\t}\n\t\tif($action == \"resetpassword\" || $action == \"inviteuser\"){\n\t\t\treturn ACTION_EDIT; \n\t\t}\n\t\tif($action == \"view\" || $action == \"picture\" || $action == \"processpicture\" || $action == \"uploadpicture\" || $action == \"croppicture\" || $action == \"changepassword\" || $action == \"processchangepassword\" || $action == \"changeusername\" || \n\t\t\t$action == \"processchangeusername\" || $action == \"changeemail\" || $action == \"processchangeemail\"){\n\t\t\treturn ACTION_VIEW;\n\t\t}\n\t\treturn parent::getActionforACL();\n }", "title": "" }, { "docid": "024bb1aa0bb3eff7ae05380b13904c89", "score": "0.631191", "text": "public Function getActions(){\n\t\treturn $this->actions;\n\t}", "title": "" }, { "docid": "6d999561735343eb5c8d4cb754f35696", "score": "0.6310834", "text": "public function actions();", "title": "" }, { "docid": "324c9f37696876d634a4f4b9ef5e6f2a", "score": "0.6293054", "text": "private function getRecordActions()\n {\n return array_filter($this->actions, function($item) {\n return in_array($item, array('show', 'edit'));\n });\n }", "title": "" }, { "docid": "1fd6d58fd85896b46167f1eaf9bdc5f5", "score": "0.62651324", "text": "public function get_bulk_actions() {\n\t\t $actions = [\n\t\t \t'bulk-delete' => 'Delete',\n\t\t ];\n\n\t\t //return $actions;\n\t}", "title": "" }, { "docid": "eade94102e1cb47cc026cf49f575f0a5", "score": "0.62571543", "text": "public function getActions(){\r\n\t\t\r\n\t\t\treturn $this->_actions;\r\n\t\t}", "title": "" }, { "docid": "90035280c8fdbbc7ad3ed96af9c49f6d", "score": "0.62212336", "text": "function actions()\n {\n return[];\n }", "title": "" }, { "docid": "65ecd133e566ee7eec3fa7837fe33322", "score": "0.62164116", "text": "public function retrieveUserActions()\n {\n return $this->start()->uri(\"/api/user-action\")\n ->get()\n ->go();\n }", "title": "" }, { "docid": "5150af17b2fb393f7893575010002033", "score": "0.6210807", "text": "public function getAdditionalActions() {}", "title": "" }, { "docid": "5150af17b2fb393f7893575010002033", "score": "0.6210807", "text": "public function getAdditionalActions() {}", "title": "" }, { "docid": "5150af17b2fb393f7893575010002033", "score": "0.6210807", "text": "public function getAdditionalActions() {}", "title": "" }, { "docid": "5150af17b2fb393f7893575010002033", "score": "0.6210807", "text": "public function getAdditionalActions() {}", "title": "" }, { "docid": "5150af17b2fb393f7893575010002033", "score": "0.6210807", "text": "public function getAdditionalActions() {}", "title": "" }, { "docid": "5150af17b2fb393f7893575010002033", "score": "0.6210807", "text": "public function getAdditionalActions() {}", "title": "" }, { "docid": "36b626060c55ef9f18f4a634aa5c7d94", "score": "0.6203472", "text": "public function get_bulk_actions() {\n\n\t\t\t$actions = [\n\n\t\t\t\t'bulk-delete' => 'Delete'\n\n\t\t\t];\n\n\n\n\t\t\treturn $actions;\n\n\t\t}", "title": "" }, { "docid": "98884abb3de8d86bb0501071584aa7fb", "score": "0.61902916", "text": "function actionsForDeleteMethod()\n {\n if (isset($this->id)) {\n $info = $this->api->get($this->id);\n\n if (count($info) == 0) {\n $this->print_json(404, \"Not Found\", null);\n } else {\n $this->api->id = $this->id;\n $data = $this->api->delete();\n\n if ($data) {\n array_pop($info);\n if (count($info) == 0) {\n $this->print_json(404, \"Not Found\", null);\n } else {\n $this->print_json(200, \"Item deleted\", $info);\n }\n } else {\n $this->print_json(200, false, null);\n }\n }\n\n } else {\n $this->print_json(405, \"Method Not Allowed\", null);\n }\n }", "title": "" }, { "docid": "53eaf880633c3e2263d1beadbad634ee", "score": "0.61883724", "text": "public static function getAcl()\n {\n return self::getActions();\n }", "title": "" }, { "docid": "03ace453cb7e6ec92a745acafcbf71ce", "score": "0.6171704", "text": "protected function get_bulk_actions() {\n\t\t// We don't want bulk actions, we have our own UI\n\t\treturn array();\n\t}", "title": "" }, { "docid": "a53d99db956fb7e5c291d4e8c03c6146", "score": "0.61463416", "text": "function get_actions() {\n\t\tglobal $db;\n\t\tstatic $actions = null;\n\t\tif ( is_null($actions) ) {\n\t\t\tfor ( $info = $db->Execute(\"SELECT * FROM `actions` ORDER BY `title` ASC\"); !$info->EOF; $info->moveNext() ) {\n\t\t\t\t$actions[$info->fields['id']] = (object)array(\"id\" => $info->fields['id'], \"title\" => $info->fields['title'], \"visible\" => $info->fields['visible'] == \"true\" ? true : false);\n\t\t\t}\n\t\t} return $actions;\n\t}", "title": "" }, { "docid": "8b8609ed05d36c53b3ee37a9b018ad32", "score": "0.61414295", "text": "function creatableResources(){\n\n return $this->resourcesByPermission('create');\n }", "title": "" }, { "docid": "4b0e6a3faba17767ceb613cfb07c4110", "score": "0.613846", "text": "function actions() {\n return array(\n 'delete' => array(\n 'class' => 'DeleteAction',\n 'modelClass' => 'User'\n )\n );\n }", "title": "" }, { "docid": "7728a0031b0377cb6f596f267fbad2d2", "score": "0.61217684", "text": "protected function resourceAbilityMap()\n {\n return [\n 'edit' => 'update',\n 'update' => 'update',\n 'destroy' => 'delete',\n ];\n }", "title": "" }, { "docid": "6c0e2f955b0133d1f82a8b7efe6fa2b2", "score": "0.6108508", "text": "public function getActions()\n {\n return $this->actions;\n }", "title": "" }, { "docid": "6c0e2f955b0133d1f82a8b7efe6fa2b2", "score": "0.6108508", "text": "public function getActions()\n {\n return $this->actions;\n }", "title": "" }, { "docid": "6c0e2f955b0133d1f82a8b7efe6fa2b2", "score": "0.6108508", "text": "public function getActions()\n {\n return $this->actions;\n }", "title": "" }, { "docid": "e263ff6162dbda66f48c5a258592fc8a", "score": "0.6107522", "text": "public function getAllActionsAttribute()\n\t{\n\t\t$output = array();\n\t\t//check if model has default permissions. if so, lets add them.\n\t\tif($defaults = config('alpacajs.model-permissions.'. class_basename($this), false)){\n\t\t\t$output = $defaults;\n\t\t} \n\t\t//check if model exist, if it does then check if it has actions.\n\t\tif($this->exists && $modelActions = $this->actions)\n\t\t{\n\t\t\t$output = array_merge($output, $modelActions);\n\t\t}\n\t\t\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "d859f7cdf3670a7ac9b49db8d0bc228e", "score": "0.6099775", "text": "public function getActionsAttribute()\n {\n return [\n 'id' => $this->id,\n 'cancel' => $this->concept == 'PENDIENTE',\n 'approved' => $this->concept == 'APROBADO',\n 'next' => __('app.selects.project.concept_next.' . $this->concept),\n ];\n }", "title": "" }, { "docid": "6187b341d6efb347cc09393cd91c5ab0", "score": "0.6093022", "text": "protected function getActions()\n {\n $actions = [];\n\n if (method_exists($this, 'editAction')) {\n $actions['edit'] = [\n 'label' => 'bigfoot_core.crud.actions.edit.label',\n 'route' => $this->getRouteNameForAction('edit'),\n 'icon' => 'edit',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'duplicateAction')) {\n $actions['duplicate'] = [\n 'label' => 'bigfoot_core.crud.actions.duplicate.label',\n 'route' => $this->getRouteNameForAction('duplicate'),\n 'icon' => 'copy',\n 'color' => 'green',\n ];\n }\n\n if (method_exists($this, 'deleteAction')) {\n $actions['delete'] = [\n 'label' => 'bigfoot_core.crud.actions.delete.label',\n 'route' => $this->getRouteNameForAction('delete'),\n 'icon' => 'trash',\n 'color' => 'red',\n 'class' => 'confirm-action',\n 'attributes' => [\n 'data-confirm-message' => $this->getTranslator()->trans(\n 'bigfoot_core.crud.actions.delete.confirm',\n ['%entity%' => $this->getEntityLabel()]\n ),\n ],\n ];\n }\n\n return $actions;\n }", "title": "" }, { "docid": "39d28ae32acfd129d6b65ff193c343f0", "score": "0.6091571", "text": "public function get_bulk_actions() {\r\n\t\t$actions = [\r\n\t\t\t'bulk-delete' => 'Delete'\r\n\t\t];\r\n\r\n\t\treturn $actions;\r\n\t}", "title": "" }, { "docid": "c48f3971f3587e03db04dd86477bc78f", "score": "0.6074407", "text": "public function actions()\n {\n return $this->hasMany('App\\Models\\Misc\\Action', 'table_id')->where('table', $this->table);\n }", "title": "" }, { "docid": "faf4170b952a1648a55d132eff396485", "score": "0.6070483", "text": "public function action() {\n\t\tif( ! $this->request_method )\n\t\t\treturn false;\n\t\tswitch ($this->request_method) {\n\t\t\tcase 'read':\n\t\t\t\t$this->read();\t\t\t\t\t\n\t\t\tbreak;\t\t\t\t\n\t\t\tcase 'create':\t\n\t\t\t\t$this->create();\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'update':\n\t\t\t\t$this->update();\t\t\t\t\t\n\t\t\tbreak;\n\t\t\tcase 'delete':\n\t\t\t\t$this->delete();\t\t\t\t\t\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "76e03794df300c002cdb4e2027e2c86c", "score": "0.6068951", "text": "public function get_bulk_actions() {\n\t\t$actions = [\n\t\t\t'bulk-delete' => 'Delete'\n\t\t];\n\n\t\treturn $actions;\n\t}", "title": "" }, { "docid": "9221e68f7a5693cfe381e0329907144c", "score": "0.60676813", "text": "public function actions(){\n $actions = parent::actions();\n unset($actions['index']);\n unset($actions['view']);\n unset($actions['create']);\n unset($actions['update']);\n unset($actions['delete']);\n return $actions;\n }", "title": "" }, { "docid": "64ab25790f295a99c0e5040ef3157836", "score": "0.60656554", "text": "public function getActions()\n\t{\n\t\treturn $this->actions;\n\t}", "title": "" }, { "docid": "e20955ed9e759dfc22394df7c763e638", "score": "0.6039936", "text": "public function actions(): array\n {\n return [\n new RateItAction(),\n // new Actions\\ChangePosAction(),\n new Actions\\Article\\CreateAction(),\n new Actions\\Article\\EditAction(),\n ];\n }", "title": "" }, { "docid": "323656603963ba322135350809c01847", "score": "0.6024287", "text": "public static function getActions()\n\t{\n\t\t$user = Factory::getUser();\n\t\t$result = new JObject;\n\n\t\t$assetName = 'com_dnabold';\n\n\t\t$actions = array(\n\t\t\t'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n\t\t);\n\n\t\tforeach ($actions as $action)\n\t\t{\n\t\t\t$result->set($action, $user->authorise($action, $assetName));\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "d3f6165758c89d5f127f56c83fca37fa", "score": "0.60231835", "text": "public function getRightActions(){\n return [\n /** EDIT IN CP **/\n [\n 'title' => $this->app->lang->translate('admin_bar_edit_in_cp'),\n 'link' => $this->app->urlFor('cp.listings_edit', ['id' => $this->listing->getId(), 'set_domain'=>true]),\n 'class' => 'btn btn-default btn-edit',\n 'target' => '_blank'\n ]\n ];\n }", "title": "" }, { "docid": "8a0cb74e848e00fc4038eddcdb60ae5b", "score": "0.60197365", "text": "public function filters()\r\n\t{\r\n\t\treturn array(\r\n\t\t\t'rights', // perform access control for CRUD operations\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "86564ae15d92a922466d6bd2dc427c21", "score": "0.60162103", "text": "public function getActions()\n {\n $em = $this->getEntityManager();\n $query = $em->createQuery(\n \"SELECT p\n FROM Vlreleases\\UserBundle\\Entity\\Actions p\n WHERE p.screenStatus = '1'\"\n \n );\n $result = $query->getResult();\n \n return $result;\n }", "title": "" }, { "docid": "445e7612bcaa8989b2af4412c03ff5de", "score": "0.6011218", "text": "protected function get_available_actions()\n {\n }", "title": "" }, { "docid": "445e7612bcaa8989b2af4412c03ff5de", "score": "0.6011218", "text": "protected function get_available_actions()\n {\n }", "title": "" }, { "docid": "4e84c8a5973fd99ff77850eb4fa7e680", "score": "0.6005358", "text": "public function getActions()\n {\n return self::$actionList;\n }", "title": "" }, { "docid": "e359502db8ef762d2b39d85e78489550", "score": "0.60001457", "text": "abstract public function getActionsInstance();", "title": "" }, { "docid": "58a34ef82ae6f6e151da801dbb0f9322", "score": "0.59990364", "text": "public function getActions() {\n $translator = $this->getTranslator();\n\n $actions = array();\n if (!$this->isReadOnly) {\n $actions[self::ACTION_ADD] = $translator->translate($this->translationAdd);\n }\n $actions[''] = $translator->translate($this->translationOverview);\n\n return $actions;\n }", "title": "" }, { "docid": "8a1e7249b35fd3f7ca6e2bfb54a81adc", "score": "0.59989685", "text": "function get_bulk_actions()\n {\n $actions = array(\n 'delete_selected' => 'Delete Selected',\n );\n return $actions;\n }", "title": "" }, { "docid": "580ab01c3e8521e58eaf3b694ae4ea57", "score": "0.59936786", "text": "public static function getActions()\n\t{\n\t\tif (empty(self::$actions))\n\t\t{\n\t\t\tself::$actions = new Obj;\n\n\t\t\t$path = dirname(__DIR__) . '/config/access.xml';\n\n\t\t\t$actions = \\Hubzero\\Access\\Access::getActionsFromFile($path);\n\t\t\t$actions ?: array();\n\n\t\t\tforeach ($actions as $action)\n\t\t\t{\n\t\t\t\tself::$actions->set($action->name, User::authorise($action->name, 'com_members'));\n\t\t\t}\n\t\t}\n\n\t\treturn self::$actions;\n\t}", "title": "" }, { "docid": "e901910aa98bca4b71a50e7c8553e931", "score": "0.5992451", "text": "public function actions()\n {\n return $this->morphMany('App\\Action', 'action_able');\n }", "title": "" }, { "docid": "20ba207d11a49ffef7e4e9904c0f6c53", "score": "0.5988449", "text": "function aspirelists_get_view_actions() {\n return array('view', 'view all');\n}", "title": "" }, { "docid": "1cc5438f7dc3a1a4c3f8c2dcb878dee0", "score": "0.5985025", "text": "public function get(): array\n {\n return $this->actions->toArray();\n }", "title": "" }, { "docid": "050452f3286496413f148165d03826e0", "score": "0.5960102", "text": "public function actions()\n {\n $pivotTable = config('permission.database.action_permissions_table');\n\n $relatedModel = config('permission.database.actions_model');\n\n return $this->belongsToMany($relatedModel, $pivotTable, 'permission_id', 'action_id')->withTimestamps();\n }", "title": "" }, { "docid": "21e30c799dc608dbfc7780847d04f884", "score": "0.5958345", "text": "public function filters()\n\t{\n\t\treturn array(\n\t\t\t'rights', // perform access control for CRUD operations\n\t\t);\n\t}", "title": "" }, { "docid": "3bd8e9bfc059183b95944fc27ee61389", "score": "0.59513235", "text": "public function get_bulk_actions() \n\t{\n\t\treturn $this->bulkActions;\n\t}", "title": "" }, { "docid": "40e5d6f517f3d85d6977a98be19d5d00", "score": "0.59442437", "text": "public function getDashboardActions(): array;", "title": "" }, { "docid": "62606489242cbcf10b1fb10e343fa5a4", "score": "0.5937767", "text": "public function get_bulk_actions() {\n\t\t$actions = [\n\t\t\t'redirect' => esc_html__( 'Redirect', 'rank-math' ),\n\t\t\t'delete' => esc_html__( 'Delete', 'rank-math' ),\n\t\t];\n\n\t\tif ( ! Helper::get_module( 'redirections' ) ) {\n\t\t\tunset( $actions['redirect'] );\n\t\t}\n\n\t\treturn $actions;\n\t}", "title": "" }, { "docid": "d9d4e145c2515e8913004b5035c9bfe7", "score": "0.5936163", "text": "public function actions(){\n\t\treturn $this->morphMany(Action::class,'action');\n\t}", "title": "" }, { "docid": "7df1746b2a0b432f2548b414af6ac651", "score": "0.5936084", "text": "public function Actions()\n {\n return $this->actions;\n }", "title": "" }, { "docid": "8341d33a893cc230ba64a8fef45ce7c6", "score": "0.59332466", "text": "function get_bulk_actions() {\n\t\t$actions = array(\n\t\t\t\t\t\t\t'delete' => __('Delete', 'blog-designer-pack')\n\t\t\t\t\t\t);\n\t\treturn apply_filters('bdpp_style_bulk_act', $actions);\n\t}", "title": "" }, { "docid": "9cff07bc699aa77edd33e486fa818725", "score": "0.59139985", "text": "public function getActions(): array\n {\n return $this->actions;\n }", "title": "" }, { "docid": "047e7a7b26c5025a37d991040eda21a1", "score": "0.5911576", "text": "public function actions()\n {\n return [\n 'subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\SubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n 'check_subscribe' => [\n 'class' => 'backend\\modules\\subscribe\\actions\\CheckSubscribeAction',\n 'checkAccess' => [$this, 'checkAccess']\n ],\n \n ];\n }", "title": "" }, { "docid": "39e95d65c6a89fcdc206b28cfdd486e7", "score": "0.5898642", "text": "public static function returnActions() {\n return array(\n 'view' => 'Просмотр',\n 'moderate' => 'Доступ к модерированию',\n 'clear' => 'Полная очистка БД',\n );\n }", "title": "" }, { "docid": "ffcaf666edbb87a78f8d136ae2e8559a", "score": "0.58774143", "text": "public static function bulkActions() {\n return [\n static::BULK_ACTION_SETREAD => ['title' => \\Yii::t('app', 'خوانده شده')],\n static::BULK_ACTION_SETNOTREAD => ['title' => \\Yii::t('app', 'خوانده نشده')],\n static::BULK_ACTION_DELETE => ['title' => \\Yii::t('app', 'حذف')],\n ];\n }", "title": "" }, { "docid": "6d66dbfd3ca174ab2250f111cc19c94e", "score": "0.5871729", "text": "function get_bulk_actions( ) {\r\n\t\t$actions = array();\r\n\r\n\t\tif ( $this->is_trash ) {\r\n\t\t\t$actions['restore'] = __( 'Restore', 'media-library-assistant' );\r\n\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t} else {\r\n\t\t\t$actions['edit'] = __( 'Edit', 'media-library-assistant' );\r\n\r\n\t\t\tif ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {\r\n\t\t\t\t$actions['trash'] = __( 'Move to Trash', 'media-library-assistant' );\r\n\t\t\t} else {\r\n\t\t\t\t$actions['delete'] = __( 'Delete Permanently', 'media-library-assistant' );\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn apply_filters( 'mla_list_table_get_bulk_actions', $actions );\r\n\t}", "title": "" }, { "docid": "969f166b11023c4c665ea3613bb3384c", "score": "0.5860906", "text": "public function __actionIndex($resource_type)\n {\n $manager = ResourceManager::getManagerFromType($resource_type);\n $resource_name = str_replace('Manager', '', $manager);\n $delegate_path = strtolower($resource_name);\n $checked = (is_array($_POST['items'])) ? array_keys($_POST['items']) : null;\n $context = Administration::instance()->getPageCallback();\n\n if (isset($_POST['action']) && is_array($_POST['action'])) {\n /**\n * Extensions can listen for any custom actions that were added\n * through `AddCustomPreferenceFieldsets` or `AddCustomActions`\n * delegates.\n *\n * @delegate CustomActions\n * @since Symphony 2.3.2\n * @param string $context\n * '/blueprints/datasources/' or '/blueprints/events/'\n * @param array $checked\n * An array of the selected rows. The value is usually the ID of the\n * the associated object.\n */\n Symphony::ExtensionManager()->notifyMembers('CustomActions', $context['pageroot'], array(\n 'checked' => $checked\n ));\n\n if (is_array($checked) && !empty($checked)) {\n if ($_POST['with-selected'] == 'delete') {\n $canProceed = true;\n\n foreach ($checked as $handle) {\n $path = call_user_func(array($manager, '__getDriverPath'), $handle);\n\n // Don't allow Extension resources to be deleted. RE: #2027\n if (stripos($path, EXTENSIONS) === 0) {\n continue;\n }\n \n /**\n * Prior to deleting the Resource file. Target file path is provided.\n *\n * @since Symphony 3.0.0\n * @param string $context\n * '/blueprints/{$resource_name}/'\n * @param string $file\n * The path to the Resource file\n * @param string $handle\n * The handle of the Resource\n */\n Symphony::ExtensionManager()->notifyMembers(\n \"{$resource_name}PreDelete\",\n $context['pageroot'],\n array(\n 'file' => $path,\n 'handle' => $handle,\n )\n );\n\n if (!General::deleteFile($path)) {\n $folder = str_replace(DOCROOT, '', $path);\n $folder = str_replace('/' . basename($path), '', $folder);\n\n $this->pageAlert(\n __('Failed to delete %s.', array('<code>' . basename($path) . '</code>'))\n . ' ' . __('Please check permissions on %s', array('<code>' . $folder . '</code>')),\n Alert::ERROR\n );\n $canProceed = false;\n } else {\n $pages = ResourceManager::getAttachedPages($resource_type, $handle);\n\n foreach ($pages as $page) {\n ResourceManager::detach($resource_type, $handle, $page['id']);\n }\n\n /**\n * After deleting the Resource file. Target file path is provided.\n *\n * @since Symphony 3.0.0\n * @param string $context\n * '/blueprints/{$resource_name}/'\n * @param string $file\n * The path to the Resource file\n * @param string $handle\n * The handle of the Resource\n */\n Symphony::ExtensionManager()->notifyMembers(\n \"{$resource_name}PostDelete\",\n \"/blueprints/{$delegate_path}/\",\n array(\n 'file' => $path,\n 'handle' => $handle,\n )\n );\n }\n }\n\n if ($canProceed) {\n redirect(Administration::instance()->getCurrentPageURL());\n }\n } elseif (preg_match('/^(at|de)?tach-(to|from)-page-/', $_POST['with-selected'])) {\n if (substr($_POST['with-selected'], 0, 6) == 'detach') {\n $page = str_replace('detach-from-page-', '', $_POST['with-selected']);\n\n foreach ($checked as $handle) {\n ResourceManager::detach($resource_type, $handle, $page);\n }\n } else {\n $page = str_replace('attach-to-page-', '', $_POST['with-selected']);\n\n foreach ($checked as $handle) {\n ResourceManager::attach($resource_type, $handle, $page);\n }\n }\n\n redirect(Administration::instance()->getCurrentPageURL());\n } elseif (preg_match('/^(at|de)?tach-all-pages$/', $_POST['with-selected'])) {\n $pages = (new PageManager)->select(['id'])->execute()->rows();\n\n if (substr($_POST['with-selected'], 0, 6) == 'detach') {\n foreach ($checked as $handle) {\n foreach ($pages as $page) {\n ResourceManager::detach($resource_type, $handle, $page['id']);\n }\n }\n } else {\n foreach ($checked as $handle) {\n foreach ($pages as $page) {\n ResourceManager::attach($resource_type, $handle, $page['id']);\n }\n }\n }\n\n redirect(Administration::instance()->getCurrentPageURL());\n }\n }\n }\n }", "title": "" }, { "docid": "01150f05e244c653b67eedc2c971bac1", "score": "0.5855412", "text": "public function all()\n {\n return $this->actionCollections;\n }", "title": "" }, { "docid": "73bceffc49d7baba0eace1fab5fd1214", "score": "0.5851351", "text": "protected function getAction() {\n return Wsu_Auditing_Helper_Data::ACTION_DELETE;\n }", "title": "" }, { "docid": "a17e7061dc59d9e5e5533577d67f4a3e", "score": "0.5842367", "text": "protected function get_bulk_actions() {\n\n\t\t// Make a basic array of the actions we wanna include.\n\t\t$setup = array(\n\t\t\t'wbr_bulk_approve' => __( 'Approve Pending', 'woo-better-reviews' ),\n\t\t\t'wbr_bulk_delete' => __( 'Delete Selected', 'woo-better-reviews' ),\n\t\t);\n\n\t\t// Return it filtered.\n\t\treturn apply_filters( Core\\HOOK_PREFIX . 'review_table_bulk_actions', $setup );\n\t}", "title": "" }, { "docid": "8523a0f4d48e9da14d5620cdd4ae4318", "score": "0.5832048", "text": "public function behaviors()\n {\n return \\app\\models\\Action::getAccess($this->id);\n }", "title": "" }, { "docid": "d638791ff9abdd0ad05c06694a9c1211", "score": "0.5831965", "text": "public static function getActions() {\n $user = JFactory::getUser();\n $result = new JObject;\n\n $assetName = 'com_labgeneagrogene';\n\n $actions = array(\n 'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete'\n );\n\n foreach ($actions as $action) {\n $result->set($action, $user->authorise($action, $assetName));\n }\n\n return $result;\n }", "title": "" }, { "docid": "baccae6560a49958c65c3c85ea10de6d", "score": "0.5825699", "text": "public function createAction()\r\n\t{\r\n\t\treturn $this->_crud();\r\n\t}", "title": "" }, { "docid": "d762da990d7e3195aa14a33e0ef3f746", "score": "0.5817932", "text": "public function getActionButtonUrls($record)\n {\n $indexes = array();\n foreach ($this->indexes as $index) {\n list($table, $column) = explode(\".\", $index);\n if ($this->type == \"resource\") {\n $indexes[] = $record[$column];\n } else {\n $indexes[$index] = $record[$column];\n }\n }\n // Set url for action buttons\n $uri = $this->Route->uri();\n $parameters = array(\n 'action' => 'view',\n 'indexes' => $indexes,\n );\n $parameters = $this->addingExtraParameters($parameters);\n $queryString = http_build_query($parameters);\n $urlView = url($uri . \"?\" . $queryString);\n $parameters['action'] = 'edit';\n $queryString = http_build_query($parameters);\n $urlEdit = url($uri . \"?\" . $queryString);\n $parameters['action'] = 'delete';\n $queryString = http_build_query($parameters);\n $urlDelete = url($uri . \"?\" . $queryString);\n return array(\n 'view' => $urlView,\n 'edit' => $urlEdit,\n 'delete' => $urlDelete,\n );\n }", "title": "" }, { "docid": "d87402c4e3cb90be456d1f45ebfc6802", "score": "0.58085126", "text": "public static function getActions()\n\t{\n\t\tif (empty(self::$actions))\n\t\t{\n\t\t\t$user = JFactory::getUser();\n\t\t\tself::$actions = new JObject;\n\n\t\t\t$actions = array(\n\t\t\t\t'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.state', 'core.delete'\n\t\t\t);\n\n\t\t\tforeach ($actions as $action)\n\t\t\t{\n\t\t\t\tself::$actions->set($action, $user->authorise($action, 'com_realtor'));\n\t\t\t}\n\t\t}\n\n\t\treturn self::$actions;\n\t}", "title": "" }, { "docid": "40276b64b5289b9c4c81ba214775a1c1", "score": "0.58039355", "text": "public function getBatchActions(): array;", "title": "" }, { "docid": "5045988fb8e5a57f7fbe52e79d964684", "score": "0.5794152", "text": "function questionnaire_get_view_actions() {\n return array('view', 'view all');\n}", "title": "" }, { "docid": "455aa686cce7c9f1a731d739b904334b", "score": "0.5791274", "text": "public function listAction(){\n\n\t}", "title": "" }, { "docid": "e57f85cdd35bb3ef746768fa321d6806", "score": "0.5789161", "text": "public static function getActions()\n\t{\n\t\t$result\t= new Obj;\n\n\t\t$actions = Access::getActionsFromFile(dirname(__DIR__) . DS . 'config' . DS . 'access.xml');\n\n\t\tforeach ($actions as $action)\n\t\t{\n\t\t\t$result->set($action->name, User::authorise($action->name, 'com_messages'));\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "fb0928bb320fec2e9219b05bb54ab88f", "score": "0.57885325", "text": "function getActions($params=array(), $actions=null){\n\t\tif ( !is_array($params) ){\n\t\t\ttrigger_error(\"In Dataface_ActionTool::getActions(), expected parameter to be an array but received a scalar: \".$params.\".\".Dataface_Error::printStackTrace(), E_USER_ERROR);\n\t\t}\n\t\t$app =& Dataface_Application::getInstance();\n\t\t\n\t\t$out = array();\n\t\t\n\t\t$tablename = null;\n\t\tif ( isset($params['table']) ) $tablename = $params['table'];\n\t\tif ( isset($params['record']) and is_a($params['record'], 'Dataface_Record') ) $tablename = $params['record']->_table->tablename;\n\t\telse if ( isset($params['record']) and is_a($params['record'], 'Dataface_RelatedRecord')) $tablename = $params['record']->_record->_table->tablename;\n\t\t\n\t\tif ( isset( $params['record'] ) && is_a($params['record'], 'Dataface_Record') ){\n\t\t\t\t// we have received a record as a parameter... we can infer the table information\n\t\t\t$params['table'] = $params['record']->_table->tablename;\n\t\t} else if ( isset($params['record']) && is_a($params['record'], 'Dataface_RelatedRecord') ){\n\t\t\t// we have recieved a related record object... we can infer both the table and relationship information.\n\t\t\t$temp =& $params['record']->getParent();\n\t\t\t$params['table'] = $temp->_table->tablename;\n\t\t\tunset($temp);\n\t\t\t\n\t\t\t$params['relationship'] = $params['record']->_relationshipName;\n\t\t}\n\t\t\n\t\tif ( @$params['relationship']){\n\t\t\tif ( strpos($params['relationship'], '.') !== false ){\n\t\t\t\t// if the relationship is specified in the form 'Tablename.RElationshipname' parse it.\n\t\t\t\tlist($params['table'],$params['relationship']) = explode('.', $params['relationship']);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( $tablename !== null ){\n\t\t\t// Some actions are loaded from the table's actions.ini file and must be loaded before we return the actions.\n\t\t\t$table =& Dataface_Table::loadTable($tablename);\n\t\t\tif ( !$table->_actionsLoaded ){\n\t\t\t\t$tparams = array();\n\t\t\t\t$table->getActions($tparams, true);\n\t\t\t}\n\t\t\tunset($table);\n\t\t}\n\t\t\n\t\t\n\t\tif ( $actions === null ) $actions = $this->actions;\n\t\tforeach ( array_keys($actions) as $key ){\n\t\t\tif ( isset($action) ) unset($action);\n\t\t\t$action =& $actions[$key];\n\t\t\t\n\t\t\tif ( @$params['name'] and @$params['name'] !== @$action['name']) continue;\n\t\t\tif ( @$params['id'] and @$params['id'] !== @$action['id']) continue;\n\t\t\t\n\t\t\tif ( isset($params['category']) and $params['category'] !== @$action['category']) continue;\n\t\t\t\t// make sure that the category matches\n\t\t\t\n\t\t\tif ( @$params['table'] /*&& @$action['table']*/ && !(@$action['table'] == @$params['table'] or @in_array(@$params['table'], @$action['table']) )) continue;\n\t\t\t\t// Filter actions by table\n\t\t\t\t\n\t\t\tif ( @$params['relationship'] && @$action['relationship'] && @$action['relationship'] != @$params['relationship']) continue;\n\t\t\t\t// Filter actions by relationship.\n\t\t\t\t\n\t\t\tif ( @$action['condition'] and !$app->testCondition($action['condition'], $params) ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( isset($params['record']) ){\n\t\t\t\tif ( isset($action['permission']) and !$params['record']->checkPermission($action['permission']) ){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isset( $action['permission'] ) and !$app->checkPermission($action['permission'])){\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( @$action['selected_condition'] ) $action['selected'] = $app->testCondition($action['selected_condition'], $params);\n\t\t\t\n\t\t\tif ( isset($action['visible']) and !$action['visible']) continue;\n\t\t\t\t// Filter based on a condition\n\t\t\tforeach (array_keys($action) as $attribute){\n\t\t\t\t// Some entries may have variables that need to be evaluated. We use Dataface_Application::eval()\n\t\t\t\t// to evaluate these entries. The eval method will replace variables such as $site_url, $site_href\n\t\t\t\t// $dataface_url with the appropriate real values. Also if $params['record'] contains a \n\t\t\t\t// Record object or a related record object its values are treated as php variables that can be \n\t\t\t\t// replaced. For example if a Profile record has fields 'ProfileID' and 'ProfileName' with\n\t\t\t\t// ProfileID=10 and ProfileName = 'John Smith', then:\n\t\t\t\t// $app->parseString('ID is ${ProfileID} and Name is ${ProfileName}') === 'ID is 10 and Name is John Smith'\n\t\t\t\t//if ( strpos($attribute, 'condition') !== false) continue;\n\t\t\t\tif ( eregi('condition',$attribute) ) continue;\n\t\t\t\t\n\t\t\t\t//if ( isset($action[$attribute.'_condition']) and !$app->testCondition($action[$attribute.'_condition'], $params) ){\n\n\t\t\t\t\t//$action[$attribute] = null;\n\t\t\t\t//} else {\n\t\t\t\t\t$action[$attribute] = $app->parseString($action[$attribute], $params);\n\t\t\t\t//}\n\t\t\t}\n\t\t\t\n\t\t\t$out[$key] =& $action;\n\t\t\t\n\t\t\tunset($action);\n\t\t}\n\t\t\n\t\tuasort($out, array(&$this, '_compareActions'));\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "9cd2ac215d5fddba19880e8b26b9cd8f", "score": "0.5786788", "text": "public function getActionLists()\n {\n return $this->action_lists;\n }", "title": "" }, { "docid": "1fb731ce5ed8808ac7bd4b32a0bbd98d", "score": "0.5783581", "text": "public static function actionsType()\n\t{\n\t\treturn array(\n\t\t\t'backend' => array('index', 'classRegister', 'deleteRegister', 'view', 'create', 'update', 'admin', 'delete', 'order', 'getCategories',\n\t\t\t\t'recycleBin', 'restore')\n\t\t);\n\t}", "title": "" } ]
f9c5f4926c4a0d194d5730c2be8717b2
Replace list from external system e.g. MS CRM Marketing List The method reschedules a 'transferList' for an existing list
[ { "docid": "6ffd52870cd3debf41ca5e8b7af1b5f5", "score": "0.6136614", "text": "public function replaceListExternal($listName)\n\t{\n\t\t$processInput = array();\n\t\t$processInput[\"listName\"] = $listName;\n\n\t\t$outputData = $this->call(\"replaceListExternal\", null, $processInput);\n\n\t\treturn $outputData;\n\t}", "title": "" } ]
[ { "docid": "96cb7d5e5b4dcfe4c276e0c06a58a5b3", "score": "0.55568624", "text": "public function updateListObject()\n {\n // Bail Early (if not draft):\n \n if (Versioned::get_stage() !== Versioned::DRAFT) {\n return; \n }\n \n // Obtain List Object:\n \n $object = $this->owner->findOrMakeListObject();\n \n // Verify List Object Exists:\n \n if ($object->isInDB()) {\n \n // Obtain List Object Class:\n \n $class = $this->owner->getListComponentClass();\n \n // Mutate List Object (if required):\n \n if ($object->ClassName != $class) {\n $object = $object->newClassInstance($class);\n }\n \n // Define List Object:\n \n if ($request = Controller::curr()->getRequest()) {\n \n if ($config = $request->postVar(self::FIELD_WRAPPER)) {\n \n foreach ($config as $name => $value) {\n $object->$name = $value;\n }\n \n }\n \n }\n \n // Update List Title:\n \n if ($object->Title === $this->getNewTitle()) {\n $object->Title = $this->owner->Title;\n }\n \n // Record List Object:\n \n $object->write();\n \n // Associate with Owner:\n \n $this->owner->ListObjectID = $object->ID;\n \n }\n }", "title": "" }, { "docid": "0867665befe075aeff365d2bef24877b", "score": "0.5469144", "text": "protected function lstCommunicationListEntries_Update() {\n\t\t\tif ($this->lstCommunicationListEntries) {\n\t\t\t\t$this->objCommunicationList->UnassociateAllCommunicationListEntries();\n\t\t\t\t$objSelectedListItems = $this->lstCommunicationListEntries->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objCommunicationList->AssociateCommunicationListEntry(CommunicationListEntry::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "69468dfc5b31c2d38b0701365b66a657", "score": "0.5362267", "text": "function update($list_details) {\n return $this->put_request(trim($this->_lists_base_route, '/').'.json', $list_details);\n }", "title": "" }, { "docid": "bc8ffe66d5161bea5be47326f2bf6b1f", "score": "0.52998227", "text": "public function updateListAction()\n {\n if ($this->request->hasArgument('data')) {\n $ordenstyplist = $this->request->getArgument('data');\n }\n if (empty($ordenstyplist)) {\n $this->throwStatus(400, 'Required data arguemnts not provided', null);\n }\n foreach ($ordenstyplist as $uuid => $ordenstyp) {\n $ordenstypObj = $this->ordenstypRepository->findByIdentifier($uuid);\n $ordenstypObj->setOrdenstyp($ordenstyp['ordenstyp']);\n $this->ordenstypRepository->update($ordenstypObj);\n }\n $this->persistenceManager->persistAll();\n $this->throwStatus(200, null, null);\n }", "title": "" }, { "docid": "5b54d724d7d26d69371968bfc0e709e3", "score": "0.5265221", "text": "public function setList($list)\n {\n $this->list = $list;\n }", "title": "" }, { "docid": "5c68c302be89533b7fd6675954a4094a", "score": "0.5221043", "text": "final protected function &setList(array $list){}", "title": "" }, { "docid": "c9c6bd535ce8a0e3aebf57c5493a50f7", "score": "0.5217547", "text": "function schedule()\n {\n $this->currentTcb = $this->list;\n\n while($this->currentTcb !== NULL)\n {\n if($this->currentTcb->isHeldOrSuspended())\n {\n $this->currentTcb = $this->currentTcb->link;\n }\n else\n {\n $this->currentId = $this->currentTcb->id;\n $this->currentTcb = $this->currentTcb->run();\n }\n }\n }", "title": "" }, { "docid": "9b1d9e6e6458c6bfd5ffea419ee14170", "score": "0.51567817", "text": "public function forceList()\n\t{\n\t\t$this->_forceList = true;\n\t}", "title": "" }, { "docid": "af312ee0cf08db380219ada8294fe49f", "score": "0.5156742", "text": "function showTransferList() {\n global $DB, $CFG_GLPI;\n\n if (isset($_SESSION['glpitransfer_list']) && count($_SESSION['glpitransfer_list'])) {\n echo \"<div class='center b'>\".\n __('You can continue to add elements to be transferred or execute the transfer now');\n echo \"<br>\".__('Think of making a backup before transferring items.').\"</div>\";\n echo \"<table class='tab_cadre_fixe' >\";\n echo '<tr><th>'.__('Items to transfer').'</th><th>'.__('Transfer mode').\"&nbsp;\";\n $rand = Transfer::dropdown(['name' => 'id',\n 'comments' => false,\n 'toupdate' => ['value_fieldname'\n => 'id',\n 'to_update' => \"transfer_form\",\n 'url' => $CFG_GLPI[\"root_doc\"].\n \"/ajax/transfers.php\"]]);\n echo '</th></tr>';\n\n echo \"<tr><td class='tab_bg_1 top'>\";\n foreach ($_SESSION['glpitransfer_list'] as $itemtype => $tab) {\n if (count($tab)) {\n if (!($item = getItemForItemtype($itemtype))) {\n continue;\n }\n $table = getTableForItemType($itemtype);\n\n $iterator = $DB->request([\n 'SELECT' => [\n \"$table.id\",\n \"$table.name\",\n 'entities.completename AS locname',\n 'entities.id AS entID'\n ],\n 'FROM' => $table,\n 'LEFT JOIN' => [\n 'glpi_entities AS entities' => [\n 'ON' => [\n 'entities' => 'id',\n $table => 'entities_id'\n ]\n ]\n ],\n 'WHERE' => [\"$table.id\" => $tab],\n 'ORDERBY' => ['locname', \"$table.name\"]\n ]);\n $entID = -1;\n\n if (count($iterator)) {\n echo '<h3>'.$item->getTypeName().'</h3>';\n while ($data = $iterator->next()) {\n if ($entID != $data['entID']) {\n if ($entID != -1) {\n echo '<br>';\n }\n $entID = $data['entID'];\n echo \"<span class='b spaced'>\".$data['locname'].\"</span><br>\";\n }\n echo ($data['name'] ? $data['name'] : \"(\".$data['id'].\")\").\"<br>\";\n }\n }\n }\n }\n echo \"</td><td class='tab_bg_2 top'>\";\n\n if (countElementsInTable('glpi_transfers') == 0) {\n echo __('No item found');\n } else {\n $params = ['id' => '__VALUE__'];\n Ajax::updateItemOnSelectEvent(\"dropdown_id$rand\", \"transfer_form\",\n $CFG_GLPI[\"root_doc\"].\"/ajax/transfers.php\", $params);\n }\n\n echo \"<div class='center' id='transfer_form'><br>\";\n Html::showSimpleForm($CFG_GLPI[\"root_doc\"].\"/front/transfer.action.php\", 'clear',\n __('To empty the list of elements to be transferred'));\n echo \"</div>\";\n echo '</td></tr>';\n echo '</table>';\n\n } else {\n echo __('No selected element or badly defined operation');\n }\n }", "title": "" }, { "docid": "3ee4a63296eb1f025cceddd898e827d6", "score": "0.5154315", "text": "protected function loadTempLists()\n {\n $objFileList = new File($this->objSyncCtoHelper->standardizePath($GLOBALS['SYC_PATH']['tmp'],\n \"syncfilelist-ID-\" . $this->intClientID . \".txt\"));\n $strContent = $objFileList->getContent();\n if (strlen($strContent) == 0) {\n $this->arrListFile = [];\n } else {\n $this->arrListFile = \\Contao\\StringUtil::deserialize($strContent);\n }\n\n $objCompareList = new File($this->objSyncCtoHelper->standardizePath($GLOBALS['SYC_PATH']['tmp'],\n \"synccomparelist-ID-\" . $this->intClientID . \".txt\"));\n $strContent = $objCompareList->getContent();\n if (strlen($strContent) == 0) {\n $this->arrListCompare = [];\n } else {\n $this->arrListCompare = \\Contao\\StringUtil::deserialize($strContent);\n }\n }", "title": "" }, { "docid": "99c30eb97f3cc8a2ea3d3da983c7ba8d", "score": "0.5150792", "text": "public function update(UpdateTaskListRequest $request)\n {\n try\n {\n $task_list = TaskList::find($request->tl_id);\n\n $task_list->update([\n 'tl_title' => $request->tl_title,\n 'tl_description' => $request->tl_description\n ]);\n\n return response()->json([\n 'task_list' => $task_list,\n 'status' => 200\n ], 200);\n }\n catch(Exception $e)\n {\n return response()->json([\n 'error' => $e->getMessage(),\n 'status' => 400\n ], 400);\n }\n }", "title": "" }, { "docid": "11b6e7313b66a51699efc5f162eae69b", "score": "0.5127836", "text": "public function updateMailing()\n {\n $apiKey = Config::inst()->get(FoxyStripeMailChimpExtension::class, 'apikey');\n $mailChimp = new MailChimp($apiKey);\n\n\n $lists = $mailChimp->get('lists')['lists'];\n foreach ($lists as $list) {\n $listID = $list['id'];\n $current = MailChimpList::get()->where(array(\n 'MCID' => $listID\n ))->first();\n\n if ($current == null || !$current->exists()) {\n $current = MailChimpList::create();\n $current->MCID = $listID;\n $current->Title = $list['name'];\n $current->write();\n } else {\n $current->Title = $list['name'];\n $current->write();\n }\n\n $segments = $mailChimp->get(\"lists/$listID/segments\")['segments'];\n foreach ($segments as $segment) {\n // skip if not static\n if ($segment['type'] != 'static') {\n continue;\n }\n\n $segmentID = $segment['id'];\n\n $currentSegment = MailChimpSegment::get()->where(array(\n 'MCID' => $segmentID\n ))->first();\n\n if ($currentSegment == null || !$currentSegment->exists()) {\n $currentSegment = MailChimpSegment::create();\n $currentSegment->MCID = $segmentID;\n $currentSegment->Title = $segment['name'];\n $currentSegment->MailingListID = $current->ID;\n $currentSegment->write();\n } else {\n $currentSegment->Title = $segment['name'];\n $currentSegment->write();\n }\n }\n }\n }", "title": "" }, { "docid": "cf4890b2b043fc45836f2b06c146b2e9", "score": "0.5110127", "text": "function fix_bList(){\n $only_see = False;\n if ($only_see){\n $q = myPear_db()->query(\"SELECT * FROM zzz_list_members \".\n\t\t\t \" LEFT JOIN zzz_lists ON l_id = lm_lid \".\n\t\t\t \" WHERE ( lm_key = '' OR lm_key IS NULL ) AND ( lm_value = '' OR lm_value IS NULL ) \".\n\t\t\t \" ORDER BY l_id \");\n while($r = myPear_db()->next_record($q)) b_debug::print_r($r);\n }else{\n // just delete\n $q = myPear_db()->qquery(\"DELETE FROM zzz_list_members \"\n\t\t\t .\" WHERE ( lm_key = '' OR lm_key IS NULL )\"\n\t\t\t .\" AND ( lm_value = '' OR lm_value IS NULL ) \"\n\t\t\t .\" AND ( lm_option= '' OR lm_option IS NULL ) \"\n\t\t\t //.\" AND ( lm_lid = '' OR lm_lid IS NULL OR lm_lid = 0) \"\n\t\t\t ,1);\n }\n}", "title": "" }, { "docid": "2a49643679fdcc21b41182e23278c0f6", "score": "0.5091194", "text": "public function syncLocal(){\n\n $now = new \\Datetime('now');\n $this->data['last_refresh'] = $now->format('c');\n $this->data['video_list'] = serialize(array_unique($this->videos));\n $this->conn->update($this->tables['playlists'], $this->data, array('ytid'=>$this->data['ytid']));\n }", "title": "" }, { "docid": "301bff5a476793676373de554d812e45", "score": "0.50861984", "text": "function syncList($list_id, $count = 100, $vid_offset = 0)\n {\n $updated = 0;\n\n do {\n $list = $this->getList($list_id, $count, $vid_offset);\n $vid_offset = $list->{'vid-offset'};\n $updated += $this->syncContacts($list->contacts);\n } while ($list->{'has-more'});\n\n return $updated;\n }", "title": "" }, { "docid": "758416b298fe9ea729cc7aba92b0d3de", "score": "0.5067983", "text": "function add2list($contact,$list,array $existing=null)\n\t{\n\t\tif (!$this->check_list($list,EGW_ACL_EDIT)) return false;\n\n\t\tunset(self::$list_cache[$list]);\n\n\t\treturn parent::add2list($contact,$list,$existing);\n\t}", "title": "" }, { "docid": "b479567e49af19aae5c989d625d0103e", "score": "0.50338036", "text": "function mailman_newlist( $pParamHash ) {\n\t$error = NULL;\n\tif( !($error = mailman_verify_list( $pParamHash['listname'] )) ) {\n\t\t$options = \"\";\n\t\tif( !empty( $pParamHash['listhost'] ) ) {\n\t\t $options .= ' -e '.escapeshellarg( $pParamHash['listhost'] );\n\t\t}\n\t\t$options .= ' -q '.escapeshellarg( $pParamHash['listname'] );\n\t\t$options .= ' '.escapeshellarg( $pParamHash['listadmin-addr'] ).' ';\n\t\t$options .= ' '.escapeshellarg( $pParamHash['admin-password'] ).' ';\n\t\t\n\t\tif( $ret = mailman_command( 'newlist', $output, $options ) ) {\n\t\t\treturn (tra('Unable to create list: ').$pParamHash['listname'].\":\".$ret);\n\t\t}\n\n\t\t$options = ' -i '.escapeshellarg(UTIL_PKG_INCLUDE_PATH.'mailman.cfg');\n\t\t$options .= ' '.escapeshellarg( $pParamHash['listname'] );\n\t\tif( $ret = mailman_command( 'config_list', $output, $options) ) {\n\t\t\t// @TODO if this fails we should roll back the newlist created\n\t\t\treturn (tra('Unable to configure list: ').$pParamHash['listname'].\":\".$ret);\n\t\t}\n\n\t\t$newList = $pParamHash['listname'];\n\t\t$mailman = mailman_get_mailman_command();\n\t\t$newAliases = \"\n## $newList mailing list\n$newList: \\\"|$mailman post $newList\\\"\n$newList-admin: \\\"|$mailman admin $newList\\\"\n$newList-bounces: \\\"|$mailman bounces $newList\\\"\n$newList-confirm: \\\"|$mailman confirm $newList\\\"\n$newList-join: \\\"|$mailman join $newList\\\"\n$newList-leave: \\\"|$mailman leave $newList\\\"\n$newList-owner: \\\"|$mailman owner $newList\\\"\n$newList-request: \\\"|$mailman request $newList\\\"\n$newList-subscribe: \\\"|$mailman subscribe $newList\\\"\n$newList-unsubscribe: \\\"|$mailman unsubscribe $newList\\\"\";\n\n\t\t// Make sure we unlock the semaphore\n\t\tignore_user_abort(true);\n\t\t// Get a lock. flock is not reliable (NFS, FAT, etc)\n\t\t// so we use a semaphore instead.\n\t\t$sem_key = ftok(mailman_get_aliases_file(), 'm');\n\t\tif( $sem_key != -1 ) {\n\t\t\t// Get the semaphore\n\t\t\t$sem = sem_get($sem_key);\n\t\t\tif( $sem ) {\n\t\t\t\tif( sem_acquire($sem) ) {\n\t\t\t\t\tif( $fh = fopen( mailman_get_aliases_file(), 'a' ) ) {\n\t\t\t\t\t\tfwrite( $fh, $newAliases );\n\t\t\t\t\t\tfclose( $fh );\n\t\t\t\t\t\tmailman_newalias();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$error = \"Could not open /etc/aliases for appending.\";\n\t\t\t\t\t}\n\t\t\t\t\tif( !sem_release($sem) ) {\n\t\t\t\t\t\t$error = \"Error releasing a sempahore.\";\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$error = \"Unable to aquire a semaphore.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$error = \"Unable to get a semaphore.\";\n\t\t\t}\n\t\t} else {\n\t\t\t$error = \"Couldn't create semaphore key.\";\n\t\t}\n\t\t// Let the user cancel again\n\t\tignore_user_abort(false);\n\t}\n\treturn $error;\n}", "title": "" }, { "docid": "98512833ed47b4af8a26c8a9436682d3", "score": "0.5013452", "text": "public function set_t_list($t_list){\n\t\t$this->t_list = $t_list;\n\t}", "title": "" }, { "docid": "be3bcad8cabfb8fcb04eb8dcbd0ce59d", "score": "0.500275", "text": "function scheduleDeployment($name, $listId, $live=false) {\n $client = new EloquaServiceClient(WSDL, USERNAME, PASSWORD);\n global $test_mode;\n \n /** FOR TESTING **/\n if($test_mode) {\n $name = 'TEST-Newsig-' . $name;\n $listID = 543;\n }\n $live = false;\n /*****************/\n \n try {\n $result = $client->SearchEmail($name);\n } catch (SoapFault $soapFault) {\n return \"<span class=\\\"err\\\">Email {$name} not found</span>\";\n }\n if (empty($result->SearchEmailResult->Email)) {\n return \"<span class=\\\"err\\\">Email {$name} not found</span>\"; \n } elseif (is_array($result->SearchEmailResult->Email)) {\n return \"<span class=\\\"err\\\">Multiple copies of {$name} found</span>\";\n }\n $emailId = $result->SearchEmailResult->Email->Id;\n $suffix = $live ? '_live' : '_test';\n \n $settings = new DeploymentSettings(array(\n 'Name' => str_replace(array(' ','-'), '_', $name) . $suffix,\n 'EmailId' => $emailId,\n 'DeploymentDate' => strtotime('+2 mins'),\n 'DistributionListId' => $listId,\n ));\n\n try {\n $deploy = $client->Deploy($settings);\n } catch (SoapFault $soapFault) {\n return('<span class=\"error\">Unable to schedule the deployment</span>');\n }\n $deployId = $deploy->DeployResult->Id;\n $date = $deploy->DeployResult->Options->DeploymentDate;\n return \"{$name} successfully scheduled to send to list {$listId} on {$date} ({$deployId})\";\n}", "title": "" }, { "docid": "23d8a8b33497680f398afd76139bba92", "score": "0.5001881", "text": "function setListContent(&$listContent) {\n\t\t$this->_listContent =& $listContent;\n\t}", "title": "" }, { "docid": "aa9c69ac6720cbb1f8e717623c5c8285", "score": "0.4981645", "text": "public function update(Request $request, Lists $lists)\n {\n //\n }", "title": "" }, { "docid": "67e8c4d5fdca57b0ffcfd534c4492a75", "score": "0.49674457", "text": "public function start_resharding($source_machine_list, $destination_machine_list){\n\t\t\n\t\t$fh = fopen(RESHARD_SCRIPT_FOLDER.\"/source_list\", 'w'); \n\t\t$source_list_contents = implode(\"\\n\", $source_machine_list);\n\t\tfwrite($fh, $source_list_contents);\n\t\tfclose($fh);\n\n\t\t$fh = fopen(RESHARD_SCRIPT_FOLDER.\"/destination_list\", 'w'); \n\t\t$source_list_contents = implode(\":11211\\n\", $destination_machine_list).\":11211\";\n\t\tfwrite($fh, $source_list_contents);\n\t\tfclose($fh);\n\t\n\t\tlog_function::debug_log(shell_exec(RESHARD_SCRIPT_FOLDER.\"/reshard_zbase.sh start \".RESHARD_SCRIPT_FOLDER.\"/source_list \".RESHARD_SCRIPT_FOLDER.\"/destination_list\"));\n\t\tsleep(5);\n\t}", "title": "" }, { "docid": "f979fe764ebf681dc06b330c579108b5", "score": "0.49673563", "text": "#[\\ReturnTypeWillChange]\n public function updateListDetails( $listId, $list_name )\n {\n return $this->updateListNameById($listId, $list_name);\n }", "title": "" }, { "docid": "c90d9037f20855a7bc025dd6c08f5f48", "score": "0.49586716", "text": "public function changeToList(RelationList $list)\n {\n foreach ($this->items as $key => $item) {\n $list->add($item, $this->extraFields[$key]);\n }\n }", "title": "" }, { "docid": "e9979be782765e96add362293c8bb2ec", "score": "0.49501902", "text": "function update_list( $lid, $data )\n {\n $set = '';\n $comma = '';\n \n foreach($data as $key => $val)\n {\n $set .= $comma.$key.'='.$val;\n $comma = ',';\n }\n \n $sql = '\n UPDATE \n '.$GLOBALS['B']->sys['db']['table_prefix'].'earchive_lists\n SET\n '.$set.'\n WHERE\n lid='.$lid;\n \n $result = $GLOBALS['B']->db->query($sql);\n \n if (DB::isError($result)) \n {\n trigger_error($result->getMessage().\"\\n\\nINFO: \".$result->userinfo.\"\\n\\nFILE: \".__FILE__.\"\\nLINE: \".__LINE__, E_USER_ERROR);\n return FALSE;\n } \n \n return $result; \n }", "title": "" }, { "docid": "39cf9f64408ff28a7f772b6849215641", "score": "0.49419385", "text": "public function setLists($lists)\n {\n $this->lists=$lists;\n // update the storage, else we are out of sync\n $this->storage->updateLists($this->lists);\n }", "title": "" }, { "docid": "4ddb50628078a2c464fa2b00ecfb32cd", "score": "0.4935511", "text": "public function trans()\n\t{\n\t\t$this->_makeList([\n\t\t\t'title' => lang('title_list_trans'),\n\t\t\t'services' => $this->listInvoiceServices([\n\t\t\t\tServiceType::DEPOSIT,\n\t\t\t\tServiceType::WITHDRAW,\n\t\t\t\tServiceType::TRANSFER_SEND,\n\t\t\t\tServiceType::TRANSFER_RECEIVE,\n\t\t\t]),\n\t\t]);\n\t}", "title": "" }, { "docid": "9b840b332925db82829c811fe4bee4a0", "score": "0.49271065", "text": "public function testListRemoval () {\n TestingAuxLib::loadControllerMock ();\n $contact = $this->contacts ('testUser');\n $list = $this->lists ('testUser');\n $this->assertTrue ($list->hasRecord ($contact));\n\n $params = array (\n 'model' => $contact,\n 'modelClass' => 'Contacts',\n );\n $retVal = $this->executeFlow ($this->x2flow ('flow1'), $params);\n\n X2_TEST_DEBUG_LEVEL > 1 && print_r ($retVal['trace']);\n\n // assert flow executed without errors\n $this->assertTrue ($this->checkTrace ($retVal['trace']));\n\n $this->assertFalse ($list->hasRecord ($contact));\n }", "title": "" }, { "docid": "04cae2cfd9d906efc83be5e1f38a6914", "score": "0.48990285", "text": "public static function someoneDemandToBecomeAdmin( $organization, $newPendingAdmin, $listofAdminsEmail ) {\n \n foreach ($listofAdminsEmail as $currentAdminEmail) {\n $params = array (\n \"type\" => Cron::TYPE_MAIL,\n \"tpl\"=>'askToBecomeAdmin',\n \"subject\" => \"[\".Yii::app()->name.\"]\".Yii::t(\"organization\",\"A citizen ask to become an admin of one of your organization\"),\n \"from\"=>Yii::app()->params['adminEmail'],\n \"to\" => $currentAdminEmail,\n \"tplParams\" => array( \"newPendingAdmin\"=> $newPendingAdmin ,\n \"title\" => Yii::app()->name ,\n \"organization\" => $organization)\n ); \n Mail::schedule($params);\n }\n }", "title": "" }, { "docid": "a24d49d65971ddccbe40a64503c69675", "score": "0.489823", "text": "function set_list_id($list_id) {\n $this->_lists_base_route = $this->_base_route.'lists/'.$list_id.'/';\n }", "title": "" }, { "docid": "5918f9e6449590f593e129704a80e5a1", "score": "0.48958322", "text": "function getServiceList(&$partylist, $ucn) {\r\n $psl = getPortalServiceList($ucn);\r\n \r\n //Try again?\r\n if($psl == 'Error'){\r\n \tsleep(3);\r\n \t$psl = getPortalServiceList($ucn);\r\n \t\r\n \t//Still an error... just set it to an empty array\r\n \tif($psl == 'Error'){\r\n \t\t$psl = array();\r\n \t}\r\n }\r\n \r\n // Then, get the e-Service list from our system, merging with $psl as needed\r\n getEServiceList($partylist, $ucn, $psl);\r\n \r\n if(is_array($partylist['Attorneys'])){\r\n\t\tforeach ($partylist['Attorneys'] as &$attorney) {\r\n\t\t\t$barnum = $attorney['BarNumber'];\r\n\t\t\t\r\n\t\t\tforeach($psl['Attorneys'] as $key => $a){\r\n\t\t\t\tif($barnum == $key) {\r\n\t\t\t\t\tforeach($a['Addresses'] as $aAdd){\r\n\t\t\t\t\t\tif(isset($attorney['ServiceList'])){\r\n\t\t\t\t\t\t\tif(!in_array($aAdd, $attorney['ServiceList'])){\r\n\t\t\t\t\t\t\t\t$attorney['ServiceList'][] = strtolower($aAdd);\r\n\t\t\t\t\t\t\t\tunset($psl['Attorneys'][$key]);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n \r\n\t\t$attCount = count($partylist['Attorneys']);\r\n\t\tif(!empty($psl['Attorneys'])){\r\n\t\t\tforeach($psl['Attorneys'] as $key => $a){\r\n\t\t\t\t$partylist['Attorneys'][$attCount]['FullName'] = trim(strtoupper($a['Name']));\r\n\t\t\t\t$partylist['Attorneys'][$attCount]['ServiceList'] = $a['Addresses'];\r\n\t\t\t\t$partylist['Attorneys'][$attCount]['BarNumber'] = $key;\r\n\t\t\t\t$partylist['Attorneys'][$attCount]['check'] = 1;\r\n\t\t\t\tunset($psl['Attorneys'][$key]);\r\n\t\t\t\t$attCount++;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n \r\n\tif(is_array($partylist['Parties'])){\r\n\t\t$count = count($partylist['Parties']);\r\n if(key_exists('Parties', $psl) && is_array($psl['Parties'])){\r\n foreach($psl['Parties'] as $key => $p){\r\n $partylist['Parties'][$count]['FullName'] = trim(strtoupper($p['Name']));\r\n $partylist['Parties'][$count]['ServiceList'] = $p['Addresses'];\r\n $partylist['Parties'][$count]['check'] = 1;\r\n unset($psl['Parties'][$key]);\r\n $count++;\r\n }\r\n }\r\n\t}\r\n\t\r\n\t$oldArray = $partylist;\r\n\t$partylist = array();\r\n\t\r\n\t$count = 0;\r\n\tforeach($oldArray['Parties'] as $p){\r\n\t\t$partylist['Parties'][$count] = $p;\r\n\t\t$count++;\r\n\t}\r\n\t\r\n\tforeach($oldArray['Attorneys'] as $a){\r\n\t\t$partylist['Parties'][$count] = $a;\r\n\t\t$count++;\r\n\t}\r\n\t\r\n\t$partylist['Parties'] = array_sort($partylist['Parties'], \"FullName\");\r\n\t$partylist['Parties'] = array_values($partylist['Parties']);\r\n\t\r\n\tforeach($partylist['Parties'] as &$p){\r\n\t\tif(count($p['ServiceList']) > 1){\r\n\t\t\t$existingEmails = array();\r\n\t\t\tforeach($p['ServiceList'] as $s){\r\n\t\t\t\t$search_array = array_map('strtolower', $existingEmails);\r\n\t\t\t\tif (!in_array(strtolower($s), $search_array)){ \r\n\t\t\t\t\t$existingEmails[] = $s;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\t\r\n\t\t\t$p['ServiceList'] = $existingEmails;\r\n\t\t}\r\n\t}\r\n\t\r\n}", "title": "" }, { "docid": "449d82f77848d6f3a470db892957c8ed", "score": "0.48915806", "text": "public function updateListItems( \\Aimeos\\MShop\\Common\\Item\\ListRef\\Iface $item, array $map, $domain, $type );", "title": "" }, { "docid": "b751ee79acf823c88fa54f74413b9d9a", "score": "0.48827273", "text": "function UpdateActionList($account, $errList) {\n\tglobal $actionConnection;\n\t$query = null;\n\tif ($errList == null)\n\t\t$query = \"Update $dbTable Set ActionList=null, checkedOut = 0 Where UserName = '\" . $account . \"'\";\n\telse\n\t\t$query = \"Update $dbTable Set ActionList='$errList', checkedOut = -1 Where UserName = '$account'\";\n\t$result = odbc_exec($actionConnection, $query);\n\treturn $result;\n}", "title": "" }, { "docid": "58c1f4f5d662283fd907a1949be67a07", "score": "0.4877817", "text": "function update($id, $list)\n {\n $endpoint = \"https://api.hubapi.com/contacts/v1/lists/{$id}\";\n\n $options['json'] = $list;\n\n return $this->client->request('post', $endpoint, $options);\n }", "title": "" }, { "docid": "64369d9e0b7c31e2b6f9d38a71a7d42e", "score": "0.48757806", "text": "function RemoveSpecialItems($listName, $tformNo){\n\t\t\n\t\t$result = \"\";\n\t\t$query = mysql_query(\"SELECT specialItems FROM makerlistcontents WHERE listName = '$listName'\");\n\t\twhile ($r = mysql_fetch_assoc($query)){\n\t\t\t$result = $r['specialItems'];\n\t\t}\n\t\t\n\t\t$updateFlag = false;\n\t\t\n\t\t// Remove whitespace from the set array and special item array\n\t\t$explode = explode(',', preg_replace('/\\s+/', '', $result));\n\t\t$cleanArray = array();\n\t\t\n\t\tfor($i = 0; $i < count($explode); $i++){\n\t\t\t\n\t\t\tif($explode[$i] == $tformNo){\n\t\t\t\t$updateFlag = true;\n\t\t\t} else {\n\t\t\t\t// add items to the clean array\n\t\t\t\t$cleanArray[] = $explode[$i];\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t$implode = implode(',', $cleanArray);\n\t\t\n\t\t// check the flag and update the specialItems list with the new array, removing the sent tformNo\n\t\tif($updateFlag){\n\t\t\t\n\t\t\t// Update the database here\n\t\t\t$result = mysql_query(\"UPDATE makerlistcontents SET `specialItems` = '$implode' WHERE `listName` = '$listName'\") or die(mysql_error());\n\t\t\t\n\t\t\techo json_encode(\"UPDATED\");\n\t\t} else {\n\t\t\t// SEND RESUTLS\n\t\t\techo json_encode(\"NOT UPDATED\");\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7ec7a35cccce7e6857662cc9ff19e575", "score": "0.48703867", "text": "public function replaceList($data){\n\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "b91ca5b1b2a97c084a20a40e55705ca3", "score": "0.4855471", "text": "protected function lstReferenciasAsUniao_Update() {\n\t\t\tif ($this->lstReferenciasAsUniao) {\n\t\t\t\t$this->objReferenciaRendimento->UnassociateAllReferenciasAsUniao();\n\t\t\t\t$objSelectedListItems = $this->lstReferenciasAsUniao->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objReferenciaRendimento->AssociateReferenciaAsUniao(Referencia::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "0c4b880b13319e06de8888380eb51398", "score": "0.48409265", "text": "public function admin_list_edit($task_list_id) {\n $this->load->config('user_tasks');\n $data['task_list'] = $this->user_task_list_model->get($task_list_id);\n $data['available_templates'] = $this->user_task_template_model->get_available_templates($task_list_id);\n $data['current_templates'] = $this->user_task_template_model->get_list_templates($task_list_id);\n $data['view'] = 'admin/tasks/edit_task_list';\n\n $this->load->view('admin/template', $data);\n\n }", "title": "" }, { "docid": "b6c08a0108a08b84e30b6caebdc98054", "score": "0.48272875", "text": "public function onAfterRevertToLive()\n {\n $this->owner->getListObject()->doRevertToLive();\n }", "title": "" }, { "docid": "6ce44f6efd56a7635b6538625eb5992f", "score": "0.481943", "text": "public function admin_task_list_update($task_list_id) {\n\n if ($_SERVER['REQUEST_METHOD'] == 'POST') {\n $task_data = [\n 'name' => $this->input->post('name'),\n ];\n\n $update_result = $this->user_task_list_model->update($task_list_id, $task_data);\n\n if ($update_result) {\n $this->session->set_flashdata('message', 'The task List has been successfully updated!');\n } else {\n $this->session->set_flashdata('error', 'There was a promlem attempting to update this task list! Please try again..');\n }\n\n redirect('/admin/user_tasks/lists/' . $task_list_id . '/edit');\n } else {\n exit('Invalid Request Method');\n }\n\n }", "title": "" }, { "docid": "4d1cdef54e1df8701a2a7da5341a8f22", "score": "0.48172203", "text": "function storeLockList($list)\n {\n global $g_sessionManager;\n $g_sessionManager->globalVar(\"atklock\", $list, TRUE);\n }", "title": "" }, { "docid": "bf665bcc3b707c23f65b92d7ebae63a6", "score": "0.480673", "text": "function rename_list($list, $newname) {\n\tif (!is_string($newname) || preg_match('/[^a-zA-Z0-9 ]/', $newname) || strlen($newname) > 50\n\t\t\t|| strlen(trim($newname)) < 1) {\n\t\treturn false;\n\t}\n\n\t$file = __DIR__ . '/data/lists.json';\n\t$data = json_decode(file_get_contents($file));\n\t$new_data = array();\n\tforeach ($data as $json) {\n\t\tforeach ($json as $key => $val) {\n\t\t\tif (strval($val) === strval($list)) {\n\t\t\t\t$new_data[] = array(trim($newname) => $val);\n\t\t\t} else {\n\t\t\t\t$new_data[] = array($key => $val);\n\t\t\t}\n\t\t}\n\t}\n\n\tfile_put_contents($file, json_encode($new_data, JSON_PRETTY_PRINT));\n\n\treturn true;\n}", "title": "" }, { "docid": "851d80017a3067076bfaf19ad4be99bf", "score": "0.47964686", "text": "private function FilterCorporateList($clist, $list)\n {\n if(count($clist) == 0)\n return $list;\n\n $fullList = [];\n $finalList = array_replace_recursive($list, $clist);\n /*foreach ($clist as $ckey => $cvalue) {\n // Look at each product id from the corporate table\n foreach ($cvalue as $ck => $cv) {\n if($ck == 'id')\n {\n // Search for a matching product id in the individual list.\n foreach ($list as $key => $value) {\n $match = array_search($cv, $value);\n\n // Replace the corporate value with the individual value.\n if($match && $value['LicensesRemaining'] != 0)\n {\n array_push($fullList, $value);\n }\n }\n }\n }\n }*/\n\n //$finalList = array_unique(array_merge($fullList,$clist), SORT_REGULAR);\n return $finalList;\n }", "title": "" }, { "docid": "427fb96d0897305fdb0302b5f9bec659", "score": "0.4771675", "text": "public function SaveCommunicationList() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->lstEmailBroadcastType) $this->objCommunicationList->EmailBroadcastTypeId = $this->lstEmailBroadcastType->SelectedValue;\n\t\t\t\tif ($this->lstMinistry) $this->objCommunicationList->MinistryId = $this->lstMinistry->SelectedValue;\n\t\t\t\tif ($this->txtName) $this->objCommunicationList->Name = $this->txtName->Text;\n\t\t\t\tif ($this->txtToken) $this->objCommunicationList->Token = $this->txtToken->Text;\n\t\t\t\tif ($this->txtDescription) $this->objCommunicationList->Description = $this->txtDescription->Text;\n\t\t\t\tif ($this->chkSubscribable) $this->objCommunicationList->Subscribable = $this->chkSubscribable->Checked;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the CommunicationList object\n\t\t\t\t$this->objCommunicationList->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t\t$this->lstCommunicationListEntries_Update();\n\t\t\t\t$this->lstPeople_Update();\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "13db6f21a1c417a18046334ab1a530c1", "score": "0.47552606", "text": "public function onBeforeWrite()\n {\n $this->owner->updateListObject();\n }", "title": "" }, { "docid": "98cb7dd452cf224c7a43b9c07ddfd122", "score": "0.47523016", "text": "public function definitionList(...$list): void;", "title": "" }, { "docid": "9e9e6880e6978238709536829c5106e0", "score": "0.47492066", "text": "function managePlayerList() {\n\tglobal $_debug,$_use_cb,$_old_PlayerList,$_PlayerList,$_PlayerInfo,$_SystemInfo,$_relays,$_master,$_is_relay;\n\n\t//debugPrint(\"managePlayerList - old_PlayerList\",$_old_PlayerList);\n\t//debugPrint(\"managePlayerList - PlayerList\",$_PlayerList);\n\n\t$addplayers = array();\n\t$renumber = false;\n\t// test players status changes \n\tfor($i = 0; $i < sizeof($_PlayerList); $i++){\n\t\tif(isset($_PlayerList[$i]['Flags']) && \n\t\t\t (floor($_PlayerList[$i]['Flags']/100000) % 10) > 0){\n\t\t\t// server : remove entry\n\t\t\tunset($_PlayerList[$i]);\n\t\t\t$renumber = true;\n\t\t\tcontinue;\n\t\t}\n\n\t\t$found = false;\n\t\t$_PlayerList[$i]['Login'] = ''.$_PlayerList[$i]['Login'];\n\t\t$login = ''.$_PlayerList[$i]['Login'];\n\t\tfor($n = 0; $n < sizeof($_old_PlayerList); $n++){\n\t\t\tif($login == $_old_PlayerList[$n]['Login']){\n\t\t\t\t$found = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif($found){\n\t\t\t// player update ?\n\t\t\tif($_PlayerList[$i] != $_old_PlayerList[$n]){\n\t\t\t\t$player = array();\n\t\t\t\tforeach($_PlayerList[$i] as $key => $val){\n\t\t\t\t\tif(!isset($_old_PlayerList[$n][$key]) || \n\t\t\t\t\t\t $_PlayerList[$i][$key] != $_old_PlayerList[$n][$key])\n\t\t\t\t\t\t$player[$key] = $_PlayerList[$i][$key];\n\t\t\t\t}\n\t\t\t\t//debugPrint(\"managePlayerList - old_PlayerList[$n]\",$_old_PlayerList[$n]);\n\t\t\t\t//debugPrint(\"managePlayerList - PlayerList[$i]\",$_PlayerList[$i]);\n\t\t\t\t//debugPrint(\"managePlayerList - $login - player\",$player);\n\t\t\t\taddEvent('PlayerUpdate',$login,$player); // addEvent('PlayerUpdate',login,player)\n\t\t\t}\n\n\t\t}else{\n\t\t\t// new player\n\t\t\t$addplayers[$login] = $_PlayerList[$i];\n\t\t}\n\t}\n\tif($renumber)\n\t\t$_PlayerList = array_values($_PlayerList);\n\n\t// player disconnect ?\n\t$remplayers = array();\n\t$renumber = false;\n\tfor($i = 0; $i < sizeof($_old_PlayerList); $i++){\n\t\t$login = ''.$_old_PlayerList[$i]['Login'];\n\t\t$found = false;\n\t\tfor($n = 0; $n < sizeof($_PlayerList); $n++){\n\t\t\tif($login == $_PlayerList[$n]['Login']){\n\t\t\t\t$found = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif(!$found){\n\t\t\tif($_debug>2) console('managePlayerListChanges - PlayerDisconnect - '.$_old_PlayerList[$i]['Login']);\n\t\t\t$remplayers[] = $login;\n\t\t}\n\t}\n\t$_old_PlayerList = $_PlayerList;\n\n\t// connect new player\n\tforeach($addplayers as $login => $playerinfo){\n\t\tif(isset($_PlayerInfo[$login]))\n\t\t\tunset($_PlayerInfo[$login]);\n\t\tif($_debug>2) console('managePlayerList - PlayerConnect - '.$login);\n\t\tplayerConnect(''.$login,'List',$playerinfo);\n\n\t\tif(count($addplayers) > 10){\n\t\t\t// mostly for startup with many players, avoid to stress too much the dedicated connection\n\t\t\tcallMulti();\n\t\t\tusleep(2000);\n\t\t}\n\t}\n\t// disconnect old players\n\tforeach($remplayers as $login){\n\t\tif($_debug>2) console('managePlayerList - PlayerDisconnect - '.$login);\n\t\tplayerDisconnect($login,'List');\n\t}\n}", "title": "" }, { "docid": "00b800f2a866f3858434484d0168d122", "score": "0.47313228", "text": "public function edit_list($id,$data)\n\t{\n\t\t//Get the old xml from get_list() and then post after replacing values that need replacing\n\t\t$url = $this->api['url'].'lists/'.$id;\n \t$post = '';\n\t\t$post = $this->fetch($url,$post,'xml');\n\t\t\n\t\tforeach ($data as $key => $val)\n\t\t\t$post = preg_replace(\"/<$key>.*?<\\/{$key}>/s\",\"<$key>$val</$key>\",$post);\n\t\t\n\t\t$this->fetch($url,$post,'array','PUT');\n\t\t\n\t\tif ($this->debug['last_response'] <= 204)\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t}", "title": "" }, { "docid": "a5165a3dc7952d0d7f6c67f6ec0819d0", "score": "0.47312662", "text": "public function save_to_list($list_type) {\r\n if(!isset($_SESSION['user']['username']) && !isset($_SESSION['user']['roles'])) {\r\n $return_data = ['error' => \"Permission Denied. Please Contact Admin\"];\r\n print_r(json_encode($return_data));\r\n }\r\n else {\r\n if(isset($_SESSION['laundry']['new_order']['client']['phone_number'])) {\r\n # Loading Model \r\n $this->load->model('globals/model_retrieval');\r\n /****** Retrieve Service Code *******/\r\n $dbres = self::$_Default_DB; $tablename = 'laundry_services';\r\n $return_dataType=\"php_object\"; $select = \"code\";\r\n $where_condition = ['id' => $this->input->post('service_id')];\r\n\r\n $query_result = $this->model_retrieval->select_where_returnRow($dbres,$tablename,$return_dataType,$select,$where_condition);\r\n\r\n if($query_result)\r\n $service_code = $query_result->code;\r\n else\r\n $service_code = \"N/A\";\r\n\r\n $arr_keys = array_keys($_SESSION['laundry']['new_order']['orders']);\r\n if(!isset($_SESSION['laundry']['new_order']['orders'][0]))\r\n $next_array_key = 0;\r\n else\r\n $next_array_key = end($arr_keys) + 1;\r\n\r\n if(!isset($_SESSION['laundry']['new_order']['orders'][0]) && !empty(end($arr_keys)))\r\n $next_array_key = end($arr_keys) + 1;\r\n /****** Retrieve Service Code *******/\r\n\r\n if($list_type == \"washing_only\") {\r\n $this->form_validation->set_rules('service_id','Service ID','trim|required');\r\n $this->form_validation->set_rules('service_name','Service Name','trim|required');\r\n $this->form_validation->set_rules('weight_id','Weight','trim|required');\r\n $this->form_validation->set_rules('weight_name','Weight','trim|required');\r\n $this->form_validation->set_rules('price','Price','trim|required');\r\n $this->form_validation->set_rules('pricelist_id','Price','trim|required');\r\n $this->form_validation->set_rules('description','Description','trim|required');\r\n $this->form_validation->set_rules('quantity','Item Total Quantity','trim|required');\r\n\r\n if($this->form_validation->run() === FALSE) {\r\n $return_data = ['error' => \"All Fields Required\"];\r\n print_r(json_encode($return_data));\r\n }\r\n else {\r\n # Assigning to session variable\r\n $_SESSION['laundry']['new_order']['orders'][] = [\r\n 'service_id' => $this->input->post('service_id'),\r\n 'service_name' => $this->input->post('service_name'),\r\n 'weight_id' => $this->input->post('weight_id'),\r\n 'weight_name' => $this->input->post('weight_name'),\r\n 'price' => $this->input->post('price'),\r\n 'pricelist_id' => $this->input->post('pricelist_id'),\r\n 'description' => $this->input->post('description'),\r\n 'quantity' => $this->input->post('quantity'),\r\n 'service_code' => $service_code,\r\n 'array_index' => $next_array_key,\r\n 'total_cost' => $this->input->post('price')\r\n ];\r\n @$_SESSION['laundry']['new_order']['cart_total_amount'] += $this->input->post('price');\r\n $return_data = ['success' => \"Adding To List Successful\"];\r\n print_r(json_encode($return_data));\r\n }\r\n }\r\n else if($list_type == \"others\") {\r\n $this->form_validation->set_rules('service_id','Service Type','trim|required');\r\n $this->form_validation->set_rules('service_name','Service Type','trim|required');\r\n $this->form_validation->set_rules('garment_id','Garment ID','trim');\r\n $this->form_validation->set_rules('garment','Garment','trim');\r\n $this->form_validation->set_rules('price','Price','trim|required');\r\n $this->form_validation->set_rules('pricelist_id','Price','trim|required');\r\n $this->form_validation->set_rules('item_quantity','Item Total Quantity','trim|required');\r\n\r\n if($this->form_validation->run() === FALSE) {\r\n $return_data = ['error' => \"All Fields Required\"];\r\n print_r(json_encode($return_data));\r\n }\r\n else {\r\n # Loading model\r\n $this->load->model('globals/model_retrieval');\r\n\r\n # Assigning to session variable\r\n $_SESSION['laundry']['new_order']['orders'][] = [\r\n 'service_id' => $this->input->post('service_id'),\r\n 'service_name' => $this->input->post('service_name'),\r\n 'garment_id' => $this->input->post('garment_id'),\r\n 'garment_name' => $this->input->post('garment_name'),\r\n 'price' => $this->input->post('price'),\r\n 'pricelist_id' => $this->input->post('pricelist_id'),\r\n 'description' => $this->input->post('description'),\r\n 'quantity' => $this->input->post('item_quantity'),\r\n 'service_code' => $service_code,\r\n 'array_index' => $next_array_key,\r\n 'total_cost' => $this->input->post('price') * $this->input->post('item_quantity')\r\n ];\r\n @$_SESSION['laundry']['new_order']['cart_total_amount'] += ($this->input->post('price') * $this->input->post('item_quantity'));\r\n $return_data = ['success' => \"Adding To List Successful\"];\r\n print_r(json_encode($return_data));\r\n }\r\n }\r\n }\r\n else {\r\n $return_data = ['error' => \"No Client Selected\"];\r\n print_r(json_encode($return_data));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "e5cd35671ef94e82bcae3ed4312b0272", "score": "0.47258613", "text": "public function updateContactsList(){\r\n // Receiving user input data\r\n $inputUserData = \\Input::all();\r\n // Validating user input data\r\n $validation = $this->EnterpriseGateway->validateupdateContactsList($inputUserData);\r\n if($validation['status'] == 'success') {\r\n $response = $this->EnterpriseGateway->updateContactsList($inputUserData);\r\n return \\Response::json($response);\r\n } else {\r\n // returning validation failure\r\n return \\Response::json($validation);\r\n }\r\n \r\n }", "title": "" }, { "docid": "8269aaac2762dc8180c4b9c1bcb51ec2", "score": "0.47220695", "text": "function action_mailsubscribers_synchro_lists_dist() {\n\n\tif (!autoriser('creer', 'mailsubscribinglist')) {\n\t\tinclude_spip('inc/minipres');\n\t\techo minipres();\n\t\texit;\n\t}\n\n\t// lancer le genie de synchro\n\t$mailsubscribers_synchro_lists = charger_fonction(\"mailsubscribers_synchro_lists\", \"genie\");\n\tif ($mailsubscribers_synchro_lists AND function_exists($mailsubscribers_synchro_lists)) {\n\t\t$mailsubscribers_synchro_lists(0);\n\t}\n}", "title": "" }, { "docid": "f7a6819d8f7395cbb89ace8217413282", "score": "0.47182462", "text": "function db_change_list($cid,$oldlid,$newlid){\n $return=FALSE;\n // Add assignment to the new list\n $new = db_new_assign($cid,\"\",$newlid);\n $old = db_remove_assign($cid,$oldlid);\n if($new && $old){\n $return=TRUE;\n }\n return $return;\n}", "title": "" }, { "docid": "95fb7bb471be2243d5f10cf34c4abe2c", "score": "0.47112134", "text": "function Save()\n\t{\n\t\tif ($this->listid <= 0) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$query = \"UPDATE \" . SENDSTUDIO_TABLEPREFIX . \"lists SET name='\" . $this->Db->Quote($this->name) . \"', ownername='\" . $this->Db->Quote($this->ownername) . \"', owneremail='\" . $this->Db->Quote($this->owneremail) . \"', bounceemail='\" . $this->Db->Quote($this->bounceemail) . \"', replytoemail='\" . $this->Db->Quote($this->replytoemail) . \"', notifyowner='\" . $this->Db->Quote($this->notifyowner) . \"', imapaccount='\" . $this->Db->Quote($this->imapaccount) . \"', format='\" . $this->Db->Quote($this->format) . \"', bounceserver='\" . $this->Db->Quote($this->bounceserver) . \"', bounceusername='\" . $this->Db->Quote($this->bounceusername) . \"', bouncepassword='\" . $this->Db->Quote(base64_encode($this->bouncepassword)) . \"', extramailsettings='\" . $this->Db->Quote($this->extramailsettings) . \"' WHERE listid='\" . $this->Db->Quote($this->listid) . \"'\";\n\t\t$result = $this->Db->Query($query);\n\t\tif (!$result) {\n\t\t\tlist($error, $level) = $this->Db->GetError();\n\t\t\ttrigger_error($error, $level);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "718cc5c1bf4d0ff99b99278c9b34989b", "score": "0.46880057", "text": "function perform()\n {\n // get all available lists\n $this->B->M( MOD_EARCHIVE, \n 'get_lists', \n array( 'var' => 'all_lists', \n 'fields' => array('lid','status','email','name','description'))); \n \n return TRUE;\n }", "title": "" }, { "docid": "c857319f4304ff9bfdd57126c0751069", "score": "0.4683123", "text": "public function run($list, $priceChange)\n {\n self::$list = $list;\n\n $listOnFile = 'Импорт груз.';\n\n // Get array $file2array with all rows from excel file\n $this->file2array = $this->loadExcelFile(App::$pathToLoadFiles, $listOnFile);\n\n // Get prices before replace them\n $this->oldPrice = $this->getOldPrice();\n\n // Remove from database all rows for current price list\n $this->deleteCurrentList();\n\n // Remove rows with header\n $this->deleteUnusedRows(8);\n\n $this->goHandler($priceChange);\n }", "title": "" }, { "docid": "74c4cf8d651761eb54a164d8b928b055", "score": "0.4679336", "text": "protected function populateOldDomains()\n\t{\n\t\t$this->oldDomains = array();\n\n\t\t$list = $this->cparams->getValue('migratelist', '');\n\n\t\t// Do not run if we don't have anything\n\t\tif (!$list)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t// Sanitize input\n\t\t$list = str_replace(\"\\r\", \"\", $list);\n\n\t\t$temp = explode(\"\\n\", $list);\n\n\t\tif (!empty($temp))\n\t\t{\n\t\t\tforeach ($temp as $entry)\n\t\t\t{\n\t\t\t\t// Skip empty lines\n\t\t\t\tif (!$entry)\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif (substr($entry, -1) == '/')\n\t\t\t\t{\n\t\t\t\t\t$entry = substr($entry, 0, -1);\n\t\t\t\t}\n\n\t\t\t\tif (substr($entry, 0, 7) == 'http://')\n\t\t\t\t{\n\t\t\t\t\t$entry = substr($entry, 7);\n\t\t\t\t}\n\n\t\t\t\tif (substr($entry, 0, 8) == 'https://')\n\t\t\t\t{\n\t\t\t\t\t$entry = substr($entry, 8);\n\t\t\t\t}\n\n\t\t\t\t$this->oldDomains[] = $entry;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3b9e086b1aca0924c043dc4bc7636dea", "score": "0.46745527", "text": "function eve_api_admin_list_corporations_form_submit($form, &$form_state) {\n $deleted_corporations = array();\n $deleted = array_filter((array) $form_state['values']['corporations']);\n\n foreach ($deleted as $corporation_id) {\n $deleted_corporations[] = (int) $corporation_id;\n }\n\n if (!empty($deleted_corporations)) {\n $result = db_query('SELECT corporationID FROM {eve_api_alliance_list_corporations} WHERE manual = 0 AND corporationID IN (:corporationIDs)', array(\n ':corporationIDs' => $deleted_corporations,\n ));\n\n if ($result->rowCount()) {\n drupal_set_message(t('Deleted Corporations will get re-added if not removed from your EVE Alliance during the next daily cron job.'), 'warning');\n }\n\n $result = db_query('SELECT corporationName FROM {eve_api_alliance_list_corporations} WHERE corporationID IN (:corporationIDs)', array(\n ':corporationIDs' => $deleted_corporations,\n ));\n\n if ($result->rowCount()) {\n foreach ($result->fetchAll() as $corp_data) {\n if (user_role_load_by_name($corp_data->corporationName) == TRUE) {\n user_role_delete($corp_data->corporationName);\n }\n }\n }\n\n db_delete('eve_api_alliance_list_corporations')->condition('corporationID', $deleted_corporations, 'IN')->execute();\n\n $queue = DrupalQueue::get('eve_api_cron_api_user_sync');\n $result = db_query('SELECT DISTINCT uid FROM {eve_api_characters} WHERE deleted = 0 AND corporationID IN (:corporationIDs)', array(\n ':corporationIDs' => $deleted_corporations,\n ));\n\n if ($result->rowCount()) {\n foreach ($result->fetchAll() as $item) {\n $queue->createItem(array(\n 'uid' => $item->uid,\n 'runs' => 1,\n ));\n }\n }\n\n drupal_set_message(t('The Alliance Corporations have been updated, the users have been manually added to the cron queue to check standings. This can take a while to process.'));\n }\n else {\n drupal_set_message(t('Nothing changed.'), 'warning');\n }\n}", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "e77f5d43019270b20d5e45db0189efd5", "score": "0.46734908", "text": "public function replaceList($data)\n {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "172e0029bcd40ace79ed626876a8351a", "score": "0.46701026", "text": "function round_update_task_list($round_id, $old_tasks, $tasks,\n $force_update_security = false, $force_check_common_tasks = false) {\n log_assert(is_round_id($round_id));\n\n $old_tasks_count = count($old_tasks);\n\n // Do nothing with common tasks, be smart.\n $common_tasks = array_intersect($old_tasks, $tasks);\n $old_tasks = array_diff($old_tasks, $common_tasks);\n $tasks = array_diff($tasks, $common_tasks);\n\n // Either succeed or do nothing at all\n db_query('START TRANSACTION');\n\n // delete round-task relations\n if (count($old_tasks) > 0) {\n $query = sprintf(\"DELETE FROM ia_round_task\n WHERE round_id = %s AND task_id IN (%s)\",\n db_quote($round_id),\n implode(',', array_map(\"db_quote\", $old_tasks)));\n db_query($query);\n }\n\n foreach ($old_tasks as $task) {\n // Update parent round cache for old tasks\n task_get_parent_rounds($task, true);\n if ($force_update_security) {\n task_update_security($task, 'check');\n }\n }\n\n // Also check common tasks when forced to\n if ($force_update_security && $force_check_common_tasks\n && count($common_tasks) > 0) {\n foreach ($common_tasks as $task) {\n task_update_security($task, 'check');\n }\n }\n\n $result = true;\n if (count($tasks) > 0) {\n // insert new relations\n $values = array();\n $order_id = $old_tasks_count;\n foreach ($tasks as $task_id) {\n $order_id += 1;\n $values[] = \"('\".db_escape($round_id).\"', '\".\n db_escape($task_id).\"', '\".db_escape($order_id).\"')\";\n }\n\n $query = \"INSERT INTO ia_round_task (round_id, task_id, order_id)\n VALUES \". implode(', ', $values);\n // This query fails pretty often for some reason\n $result = db_query_retry($query, 1);\n }\n\n // Commit transaction\n if ($result) {\n foreach ($tasks as $task) {\n // Update parent round cache for new tasks\n task_get_parent_rounds($task, true);\n if ($force_update_security) {\n task_update_security($task, 'check');\n }\n }\n\n round_task_recompute_order($round_id);\n\n db_query('COMMIT');\n } else {\n db_query('ROLLBACK');\n }\n\n return $result;\n}", "title": "" }, { "docid": "fb8feb74d1382cd3703716153465da2f", "score": "0.4663075", "text": "public function run($list, $priceChange)\n {\n self::$list = $list;\n\n // Get array $file2array with all rows from excel file\n $this->file2array = $this->loadExcelFile(App::$pathToLoadFiles);\n\n if (! strstr($this->file2array[2][0], 'БЕЛШИНА') and ! strstr($this->file2array[9][0], 'БЕЛШИНА')) {\n App::redirect(['site/error', 'e' => \"Возникла ошибка. Обратитесь к системному администратору.\"]);\n }\n\n // Get prices before replace them\n $this->oldPrice = $this->getOldPrice();\n\n // Remove from database all rows for current price list\n $this->deleteCurrentList();\n\n // Remove rows with header\n $this->deleteUnusedRows(10);\n\n $this->goHandler($priceChange);\n }", "title": "" }, { "docid": "2a267726dd39b2c9bba563ce7a17ac4b", "score": "0.46573105", "text": "public function replaceList($data) {\n return new ApiProblem(405, 'The PUT method has not been defined for collections');\n }", "title": "" }, { "docid": "f6fb523fbcf5f9f194b64403903df8e9", "score": "0.46526158", "text": "public function truncateInxmailList()\n {\n try {\n $session = $this->openInxmailSession(false);\n } catch (Exception $e) {\n Mage::helper('dndinxmail_subscriber/log')->logExceptionMessage($e, __FUNCTION__);\n\n throw new Exception('Inxmail session does not exist');\n }\n\n if (!$listid = (int)$this->getSynchronizeListId()) {\n Mage::helper('dndinxmail_subscriber/log')->logExceptionData('## No list defined in configuration', __FUNCTION__);\n throw new Exception('No list defined in configuration');\n }\n\n $listContextManager = $session->getListContextManager();\n $inxmailList = $listContextManager->get($listid);\n $recipientContext = $this->getRecipientContext();\n $recipientMetaData = $recipientContext->getMetaData();\n $emailAttribute = $recipientMetaData->getEmailAttribute();\n $subscriptionAttribute = $recipientMetaData->getSubscriptionAttribute($inxmailList);\n\n $batchChannel = $recipientContext->createBatchChannel();\n\n $recipientRowSetUns = $recipientContext->selectUnsubscriber($inxmailList, null, null, $emailAttribute, Inx_Api_Order::ASC);\n while ($recipientRowSetUns->next()) {\n $recipientRowSetUns->resubscribe(null);\n $recipientRowSetUns->commitRowUpdate();\n }\n\n $recipientRowSet = $recipientContext->select($inxmailList, null, null, $emailAttribute, Inx_Api_Order::ASC);\n while ($recipientRowSet->next()) {\n $batchChannel->selectRecipient($recipientRowSet->getString($emailAttribute));\n $batchChannel->write($subscriptionAttribute, null);\n }\n\n $batchChannel->executeBatch();\n\n $recipientRowSet->close();\n $recipientContext->close();\n $this->closeInxmailSession();\n\n return true;\n }", "title": "" }, { "docid": "a3159c7396d1278912472952f3eabee5", "score": "0.46518567", "text": "public function setList( $list )\n\t{\n\t\t$this->setAttribute( \"list\", $list );\n\t}", "title": "" }, { "docid": "c6bed1ac498780576d5471626652cc76", "score": "0.4650551", "text": "public function UpdateList($listID, $listName, $listDescription, $folderID) {\n\n $params = array(\n 'GroupID' => $listID,\n 'FolderID' => $FolderID,\n 'GroupName' => $listName,\n 'GroupDescription' => $listDescription\n );\n return parent::execute('group/' . $listID, $params, 'PUT');\n }", "title": "" }, { "docid": "652e69095fd39bd2709a26924608b429", "score": "0.46502146", "text": "public function UpdateParamsList($oldList , $newList){\n $q = $this->createQueryBuilder('u')\n ->update()\n ->set('u.listparams' , '?1')\n ->where('u.listparams = ?2')\n ->setParameter(1 , $newList)\n ->setParameter(2 , $oldList)\n ->getQuery()\n ->execute();\n return $q;\n }", "title": "" }, { "docid": "3ca1053acdb7f6cc059999cae84978f6", "score": "0.46493006", "text": "protected function UpdateWishlist()\n {\n $aInput = $this->global->GetUserData(TdbPkgShopWishlist::URL_PARAMETER_FILTER_DATA);\n $sWishListDescription = '';\n if (array_key_exists('description', $aInput)) {\n $sWishListDescription = $aInput['description'];\n }\n $oMsgManager = TCMSMessageManager::GetInstance();\n\n $oUser = TdbDataExtranetUser::GetInstance();\n if ($oUser->IsLoggedIn()) {\n $oWishlist = $oUser->GetWishlist(true);\n $aTmp = $oWishlist->sqlData;\n $aTmp['description'] = $sWishListDescription;\n if (array_key_exists('is_public', $aInput)) {\n $aTmp['is_public'] = $aInput['is_public'];\n }\n\n $oWishlist->LoadFromRow($aTmp);\n $oWishlist->Save();\n\n $aItems = array();\n if (array_key_exists('aItem', $aInput) && is_array($aInput['aItem'])) {\n $aItems = $aInput['aItem'];\n foreach ($aItems as $sWishlistItemId => $aItemData) {\n $oWishlistItem = TdbPkgShopWishlistArticle::GetNewInstance();\n /** @var $oWishlistItem TdbPkgShopWishlistArticle */\n if ($oWishlistItem->LoadFromFields(array('pkg_shop_wishlist_id' => $oWishlist->id, 'id' => $sWishlistItemId))) {\n $atmpData = $oWishlistItem->sqlData;\n if (array_key_exists('comment', $aItemData)) {\n $atmpData['comment'] = $aItemData['comment'];\n }\n if (array_key_exists('amount', $aItemData)) {\n $atmpData['amount'] = $aItemData['amount'];\n }\n $oWishlistItem->LoadFromRow($atmpData);\n $oWishlistItem->AllowEditByAll(true);\n $oWishlistItem->Save();\n }\n }\n }\n\n $oMsgManager->AddMessage($oWishlist->GetMsgConsumerName(), 'WISHLIST-UPDATED-INFOS');\n }\n }", "title": "" }, { "docid": "ad108206b85f2d779a712d1651008051", "score": "0.46491513", "text": "public function move(ListId $newListId): void\n {\n $this->listId = $newListId;\n\n $this->record(new TaskMoved(\n (string) $this->id,\n (string) $newListId\n ));\n }", "title": "" }, { "docid": "46274860f08c010fb36b1bc1f117648c", "score": "0.46457267", "text": "function separator($factureId,$list){\n\t\t$facture=$this->Vente->Facture->find('first',array('conditions'=>array('Facture.id'=>$factureId),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('Facture.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'recursive'=> -1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t//update the old bill by putting the linked id\n\t\t $facture['Facture']['linked']=$factureId;\n\t\t if(!$this->Vente->Facture->save($facture))\n\t\t \texit(json_encode(array('success'=>false,'msg'=>\"The old invoice has not been saved.\")));\n\t\tunset($this->Vente->Facture->id);\n\t\t\n\t\t//creating the new bill\n\t\t$newFacture=$facture;\n\t\t$newFacture['Facture']['id']=null;\n\t\t$newFacture['Facture']['linked']=$factureId;\n\t\t$newFacture['Facture']['original']=$newFacture['Facture']['montant']=0;\n\t\t$newFacture['Facture']['reste']=$newFacture['Facture']['tva']=$newFacture['Facture']['pyts']=0;\n\t\tif(!$this->Vente->Facture->save($newFacture))\n\t\t\texit(json_encode(array('success'=>false,'msg'=>\"The new invoice has not been saved.\")));\n\t\t\n\t\t$newFactureId=$this->Vente->Facture->id;\n\t\tunset($this->Vente->Facture->id);\n\n\t\t//setting up the display number\n\t\t$newfacture['Facture']['numero']=$this->Product->facture_number($newFactureId,'Vente',$newFacture['Facture']['date']);\n\t\t\t\n\t\t//moving consos to the new bill\n\t\t$list=explode(',',$list);\n\t\t$fields= array('Vente.*');\n\t\t$ventes=$this->Vente->find('all',array('recursive'=>-1,\n\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('Vente.id'=>$list),\n\t\t\t\t\t\t\t\t\t\t\t'fields'=> $fields\n\t\t\t\t\t\t\t\t\t\t\t));\n\t\t$failureMsg=\"One of the products has not been saved.\";\n\t\tforeach($ventes as $vente){\n\t\t\t$vente['Vente']['facture_id']=$newFactureId;\n\t\t\tif($vente['Vente']['acc']){\n\t\t\t\t$acc = $this->Vente->find('first',array('recursive'=>-1,\n\t\t\t\t\t\t\t\t\t\t\t'conditions'=>array('Vente.id'=>$vente['Vente']['acc']),\n\t\t\t\t\t\t\t\t\t\t\t'fields'=>$fields\n\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\t\t$acc['Vente']['facture_id']=$newFactureId;\n\t\t\t\tif(!$this->Vente->save($acc))\n\t\t\t\t\texit(json_encode(array('success'=>false,'msg'=>\"One of the garnish has not been saved.\")));\n\t\t\t}\n\t\t\tif(!$this->Vente->save($vente))\n\t\t\t\texit(json_encode(array('success'=>false,'msg'=>$failureMsg)));\n\t\t}\n\t\t//updating the old bill for the new bill\n\t\t$this->Vente->Facture->updateMontant($facture['Facture']);\n\n\t\t//fetching the info of the old bill\n\t\t$oldFacture=$this->Vente->Facture->find('first',array('conditions'=>array('Facture.id'=>$factureId),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('Facture.original',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Facture.montant',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'Facture.reste'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'recursive'=> -1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\n\t\t//$old_totals=$this->Product->bill_total($factureId, $newfacture['Facture']['reduction']);\n\t\t//fetching the info of the new bill\n\t\t$newFacture=$this->Vente->Facture->find('first',array('conditions'=>array('Facture.id'=>$newFactureId),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'fields'=>array('Facture.*',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t'recursive'=> -1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t));\n\t\t\n\t\texit(json_encode(array('success'=>true,'Facture'=>$newFacture['Facture'],'old'=>$oldFacture['Facture'])));\n\t}", "title": "" }, { "docid": "1d0751ab2a1179c894f74215eb2a89c7", "score": "0.46422884", "text": "public function staticDuplicate(){\n $dup = new X2List();\n $dup->attributes = $this->attributes;\n $dup->id = null;\n $dup->nameId = null;\n $dup->type = 'static';\n $dup->createDate = $dup->lastUpdated = time();\n $dup->isNewRecord = true;\n if(!$dup->save())\n return;\n\n $count = 0;\n $listItemRecords = array();\n $params = array();\n if($this->type == 'dynamic'){\n $itemIds = $this->queryCommand(true)->select('id')->queryColumn();\n foreach($itemIds as $id){\n $listItemRecords[] = '(NULL,:contactId'.$count.',:listId'.$count.',0)';\n $params[':contactId'.$count] = $id;\n $params[':listId'.$count] = $dup->id;\n $count++;\n }\n }else{ //static type lists\n //generate sql to replicate list items\n \n foreach($this->listItems as $listItem){\n if(!empty($listItem->emailAddress)){\n $itemSql = '(:email'.$count;\n $params[':email'.$count] = $listItem->emailAddress;\n }else{\n $itemSql = '(NULL';\n }\n if(!empty($listItem->contactId)){\n $itemSql .= ',:contactId'.$count;\n $params[':contactId'.$count] = $listItem->contactId;\n }else{\n $itemSql .= ',NULL';\n }\n $itemSql .= ',:listId'.$count.',:unsubd'.$count.')';\n $params[':listId'.$count] = $dup->id;\n $params[':unsubd'.$count] = $listItem->unsubscribed;\n $listItemRecords[] = $itemSql;\n $count++;\n }\n }\n if(count($listItemRecords) == 0)\n return;\n $sql = 'INSERT into x2_list_items\n (emailAddress, contactId, listId, unsubscribed)\n VALUES '\n .implode(',', $listItemRecords).';';\n $dup->count = $count;\n\n $transaction = Yii::app()->db->beginTransaction();\n try{\n Yii::app()->db->createCommand($sql)->execute($params);\n $transaction->commit();\n }catch(Exception $e){\n $transaction->rollBack();\n $dup->delete();\n Yii::log($e->getMessage(), 'error', 'application');\n $dup = null;\n }\n return $dup;\n }", "title": "" }, { "docid": "c538f51da0caf4580774480d555027f1", "score": "0.46407732", "text": "function reloadFieldsList() {\r\n\r\n if ($this->post('mg_list')) {\r\n $mg_list = $this->post('mg_list');\r\n unset($this->options['mg_fields']);\r\n $this->options['mg_fields_list'] = $mg_list;\r\n update_option('mailigen_options', $this->options);\r\n $this->addFieldsToSections();\r\n do_settings_sections('sect_mg_fields');\r\n }\r\n die();\r\n }", "title": "" }, { "docid": "9bc7217830f03a7a48e3f4d9a8677144", "score": "0.46386462", "text": "public function ticketsToCancel($receipt_list)\n {\n $new_order_list = [];\n foreach($receipt_list as $item) {\n $new_row = $item;\n $order_flow_data = null;\n // change this from the config file\n // use the order flow model\n $order_flows = OrderFlow::get();\n foreach($order_flows as $order_flow) {\n $flow_arr = explode(',',$order_flow->flow);\n if($item->total_item_number_flow == $flow_arr){\n $order_flow_data = $order_flow;\n }\n }\n /*foreach($order_flows as $order_flow) {\n if($item->total_item_number_flow == $order_flow['flow']){\n $order_flow_data = $order_flow;\n }\n }*/\n if($order_flow_data == null){\n continue;\n } else {\n $ordered_receipts = $item->ordered_receipts;\n //$which_item = $order_flow_data['which_item'];\n $which_item = $order_flow_data->item_to_process;\n $ticket_to_be_modified = $ordered_receipts->{$which_item};\n $new_row->ticket_to_be_modified = $ticket_to_be_modified;\n //$new_row->cncl_or_rfnd = $order_flow_data['cncl_or_rfnd'];\n $new_row->cncl_or_rfnd = $order_flow_data->process_type;\n }\n $new_order_list[] = $new_row;\n }\n return $new_order_list;\n }", "title": "" }, { "docid": "87125912f348052d2e0195a7f72a518c", "score": "0.4638256", "text": "public function executeAdaptMailinglist(sfWebRequest $request) {\n $mailinglist = new Mailinglist();\n $docuObj = new Documenttemplate();\n $mailinglistdata = MailinglistTemplateTable::instance()->getMailinglistByVersionTemplateId($request->getParameter('id'))->toArray();\n $currentdocumenttemplateversion = DocumentTemplateVersionTable::instance()->getActiveVersionById($mailinglistdata[0]['documenttemplatetemplate_id'])->toArray();\n $slots = $docuObj->buildSlots($currentdocumenttemplateversion[0]['id'], 'SLOTSONLY');\n $mailinglistversiondata = MailinglistVersionTable::instance()->getActiveVersionById($request->getParameter('id'))->toArray();\n MailinglistVersionTable::instance()->setMailinglistInactiveById($mailinglistversiondata[0]['mailinglist_template_id']);\n $mailinglist_version_id = $mailinglist->storeVersion($mailinglistversiondata[0]['mailinglist_template_id'],$mailinglistversiondata[0]['version']+1, $currentdocumenttemplateversion[0]['id']);\n $userdata = MailinglistAllowedSenderTable::instance()->getAllowedSenderById($mailinglistversiondata[0]['id']);\n $users = $mailinglist->buildAllowedUser($userdata);\n $mailinglist->saveUser($mailinglist_version_id, isset($users) ? $users: array());\n $authdata = MailinglistAuthorizationSettingTable::instance()->getAuthorizationById($mailinglistversiondata[0]['id'])->toArray();\n $mailinglist->adaptAuthorizationEntry($authdata, $mailinglist_version_id);\n $mailinglist->storeMailinglist($slots, $mailinglist_version_id);\n return sfView::NONE;\n }", "title": "" }, { "docid": "01498b6c00439d5b3e08ae7b64a300a9", "score": "0.46339172", "text": "function AddSpecialItems($listName, $tformNo){\n\t\t\n\t\t// Select the specialItems column from makerlistcontents\n\t\t// check if the $tformNo is already in list or not\n\t\t// check if being used by something in the list already\n\t\t// if not then insert into the $listName\n\t\t\n\t\t$empty = \"FULL?\";\n\t\t\n\t\t$result = \"\";\n\t\t$query = mysql_query(\"SELECT specialItems FROM makerlistcontents WHERE listName = '$listName'\");\n\t\twhile ($r = mysql_fetch_assoc($query)){\n\t\t\t$result = $r['specialItems'];\n\t\t}\n\t\t\n\t\t// dont do anything if its empty...\n\t\tif($result == \"\"){\n\t\t\t// insert\n\t\t\t// Update the database here\n\t\t\t$r = mysql_query(\"UPDATE makerlistcontents SET `specialItems` = '$tformNo' WHERE `listName` = '$listName'\") or die(mysql_error());\n\n\t\t\techo json_encode(\"UPDATED \");\n\t\t\t\n\t\t} else {\n\t\t\t$updateFlag = false;\n\n\t\t\t// Remove whitespace from the set array and special item array\n\t\t\t$explode = explode(',', preg_replace('/\\s+/', '', $result));\n\n\n\t\t\t// check if tformNo is in results\n\t\t\tif(!in_array($tformNo, $explode)){\n\t\t\t\t$updateFlag = true;\n\t\t\t}\n\n\t\t\t// check the flag and update the specialItems list with the new array, adding the sent tformNo\n\t\t\tif($updateFlag){\n\n\t\t\t\tarray_push($explode, $tformNo); // add the tformNo to the end of the array\n\t\t\t\t$implode = implode(',', $explode); // implode the array to prepar for database update\n\n\t\t\t\t// Update the database here\n\t\t\t\t$result = mysql_query(\"UPDATE makerlistcontents SET `specialItems` = '$implode' WHERE `listName` = '$listName'\") or die(mysql_error());\n\n\t\t\t\techo json_encode(\"UPDATED \");\n\n\t\t\t} else {\n\n\t\t\t\t// SEND RESUTLS\n\t\t\t\techo json_encode(\"NOT UPDATED \");\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "100475d6052d6b4c18f6ebc97c43f120", "score": "0.4622712", "text": "public function setListID($listId)\n {\n $this->listId = $listId;\n }", "title": "" }, { "docid": "805a14de29e982040f0533103c63f362", "score": "0.46220267", "text": "function switchItems( $serviceType, $item1, $item2){\n\n\t\t$serviceType->tasks()->where('id', $item1->id)\n\t\t\t\t\t\t\t\t\t\t\t\t ->first()\n\t\t \t\t\t\t ->update(['order' => $item2->order ] );\n\n\t\t$serviceType->tasks()->where('id', $item2->id)\n\t\t ->first()\n\t\t ->update(['order' => $item1->order ] );\n\n\t}", "title": "" }, { "docid": "5d021efd265ca09ae5d5471c92e79b82", "score": "0.46166626", "text": "public function actionUpdateList()\n {\n self::runCommand();\n \\Yii::$app->session->setFlash('warning', \"Запущено полное обновление орфографических ошибок\");\n return $this->redirect(Yii::$app->request->referrer);\n }", "title": "" }, { "docid": "b5b987ee149b1413cd91aed0392459a3", "score": "0.45935443", "text": "public function syncActiveListAction (){\r\n\t global $appID,$devID,$certID,$RuName,$serverUrl, $userToken,$compatabilityLevel, $siteID;\r\n\t initKeys();\r\n // \r\n\t session_start();\r\n\t $ebay = new Ebay($appID,$devID,$certID,$RuName,$serverUrl, $userToken,$compatabilityLevel, $siteID);\r\n\t $ebay->getActiveStuff();\r\n\t\r\n\t\r\n\t $this->disableAction(); // DISABLE \r\n\t $time = microtime(true);\r\n\r\n\t $doubles = $this->getDoublesAndRemoveInArray($ebay->skus);\r\n\t \r\n\t $missing = 0;\r\n\t $activated = 0;\r\n\t $ssskus = array();\r\n\t \r\n\t \r\n\t\t\r\n\t foreach ( $ebay->skus as $sku ){ // UPDATE \r\n $prod = Mage::getModel('catalog/product')->loadByAttribute('sku',$sku);\r\n\t\tif( !$prod ){\r\n\t\t\tarray_push($ssskus , $sku );\r\n\t\t\t$missing++;\t\t\t\r\n\t\t}else{\r\n\t\t\t$prod->setData('activity_product' , 1);\r\n\t\t\t$prod->getResource()->saveAttribute($prod, 'activity_product'); \r\n\t\t\t$activated++;\r\n\t\t}\r\n\t }\r\n\t $dt = microtime(true) - $time;\r\n\t \r\n\t $this->deleteInactiveAction(); // DELETE \r\n\t \r\n\t //print_r($ssskus);\r\n\t echo \"Size :\" . sizeof($ebay->skus) . \"<BR>\";\r\n\t echo \"Activated :\" . $activated . \"<BR>\";\r\n\t echo \"Missing:\" . $missing . \"<BR>\";\r\n\t echo \"Time needed:\" . $dt. \"<BR>\";\r\n\t echo \"<BR> Doubles :\".sizeof( $doubles ) . \" <BR> \" .implode(\",\" , $doubles).\"<BR>\";\r\n\t \r\n }", "title": "" }, { "docid": "4d88dd66375f6bb6a5368f130f174730", "score": "0.4593303", "text": "function ImportSendList()\n {\n $tmp = $this->CatchRemoteCommand(\"data\");\n $anzahl = 0;\n for($i=0;$i<count($tmp);$i++)\n {\n $artikel = $tmp[$i][artikel];\n\n if($artikel!=\"ignore\")\n {\n\t$tmpid = $this->app->DB->Select(\"SELECT id FROM artikel WHERE artikel='$artikel' LIMIT 1\");\n\tif(!is_numeric($tmpid)) $this->app->DB->Insert(\"INSERT INTO artikel (id,artikel) VALUES ('','$artikel')\");\n\n\tforeach($tmp[$i] as $key=>$value)\n\t{\n\t $this->app->DB->Update(\"UPDATE artikel SET $key='$value' WHERE artikel='$artikel' LIMIT 1\");\n\t}\n\t$anzahl++; \n }\n }\n\n // anzahl erfolgreicher updates\n echo $this->SendResponse($anzahl);\n exit;\n }", "title": "" }, { "docid": "20322c05269ce914de31bde32e2a8301", "score": "0.4593186", "text": "public static function alter($altplaylist) {\n $idp = intval($altplaylist['idpl']);\n $db = Db::getInstance();\n if(isset($altplaylist['NewName'])) {\n $req = $db->prepare(\"UPDATE Playlist SET Nome = :name WHERE IdPlaylist = :idp\");\n $req->execute(array(\"name\" => $altplaylist['NewName'], \"idp\" => $idp));\n }\n if(isset($altplaylist['song'])) {\n $req = $db->prepare(\"DELETE FROM BraniPlaylist WHERE IdPlaylist = :idp\");\n $req->execute(array(\"idp\" => $idp));\n $i = 0;\n foreach($altplaylist['song'] as $song) {\n $req = $db->prepare(\"INSERT INTO BraniPlaylist (IdPlaylist, IdBrano, Posizione) VALUES(:idp, :idb, :pos)\");\n $req->execute(array(\"idp\" => $idp, \"idb\" => $song, \"pos\" => $i));\n $i++;\n }\n }\n if(!isset($altplaylist['Private'])) {\n $altplaylist['Private'] = 'Pubblica';\n } else {\n $altplaylist['Private'] = 'Privata';\n }\n $req = $db->prepare('UPDATE Playlist SET Tipo = :type WHERE IdPlaylist = :idp');\n $req->execute(array(\"type\" => $altplaylist['Private'], \"idp\" => $idp));\n }", "title": "" }, { "docid": "7ce17ab3583d3ada15b66ab5283827e4", "score": "0.45860338", "text": "public function putToList($listName, $subject, $body, $type = \"text/html\")\n {\n Yii::app()->getDb()->createCommand()->insert(\"{{mail_sender_queue}}\", array(\n \"mail_to\" => self::NOBODY,\n \"mail_subject\" => $subject,\n \"mail_body\" => $body,\n \"mail_type\" => $type,\n \"list\" => $listName\n ));\n }", "title": "" }, { "docid": "88acdeb0d5d3a21fb19e338c25e3263c", "score": "0.45820287", "text": "public function testEditListNoAction()\n {\n $this->setRequestParameter('deleteList', null);\n\n /** @var oxSession|PHPUnit_Framework_MockObject_MockObject $oSession */\n $oSession = $this->getMock(\\OxidEsales\\Eshop\\Core\\Session::class, array('checkSessionChallenge'));\n $oSession->expects($this->once())->method('checkSessionChallenge')->will($this->returnValue(true));\n \\OxidEsales\\Eshop\\Core\\Registry::set(\\OxidEsales\\Eshop\\Core\\Session::class, $oSession);\n\n /** @var Account_Recommlist|PHPUnit_Framework_MockObject_MockObject $oRecomm */\n $oRecomm = $this->getMock(\\OxidEsales\\Eshop\\Application\\Controller\\AccountRecommlistController::class, array(\"getActiveRecommList\", \"setActiveRecommList\"));\n $oRecomm->expects($this->never())->method('getActiveRecommList');\n $oRecomm->expects($this->never())->method('setActiveRecommList');\n $oRecomm->editList();\n }", "title": "" }, { "docid": "dd15b02849b3b524ca7a5f321cfdf6ae", "score": "0.45787257", "text": "public function updateList($listId, $options = array()) {\n // Make sure that list is loaded.\n if (!$this->getListDetails($listId)) {\n $this->addError(t('Could not retrieve update list information for @listID.', array('@listID' => $listId)));\n return FALSE;\n }\n\n // Get list object and update the list.\n if ($obj = $this->createListObj($listId)) {\n // @todo: check that the options are correct.\n $result = $obj->update($options);\n if ($result->was_successful()) {\n\n // Update local list cache.\n $this->lists[$listId]['name'] = $options['Title'];\n $this->lists[$listId]['details']['UnsubscribePage'] = $options['UnsubscribePage'];\n $this->lists[$listId]['details']['ConfirmedOptIn'] = $options['ConfirmedOptIn'];\n $this->lists[$listId]['details']['ConfirmationSuccessPage'] = $options['ConfirmationSuccessPage'];\n\n // Update the cache.\n \\Drupal::cache()->set('campaignmonitor_lists', $this->lists);\n return TRUE;\n }\n else {\n $this->addError($result->response->Message, $result->http_status_code);\n }\n }\n return FALSE;\n }", "title": "" }, { "docid": "f31d488da831e1b52ba741b1125c453d", "score": "0.4573593", "text": "public function leaveBatchApprove($list)\n\t{\n\t //pr($list);\n\t\t$conn = oci_connect(\"hcp\",\"hcp\",\"cthcp\",\"UTF8\");\t\n\t\t\n\t $request_no = $this->_getReqSeqNo();\n\t //$this->_addBatchReq($request_no,'leave_approve');\n\t\techo '<br/>$request_no='.$request_no;\n\t // insert detail\n\t $n = count($list['workflow_seqno']);\n\t // $this->_dbConn->StartTrans();\n\t \n\t for ($i=0; $i<$n; $i++)\n\t {\n\t $_workflow_info['company_id'] = $list['company_id'][$i];\n\t $_workflow_info['workflow_seqno'] = $list['workflow_seqno'][$i];\n\t $_workflow_info['apply_type'] = $list['apply_type'][$i];\n\t $_workflow_info['approver_emp_seqno'] = $list['approver_emp_seqno'][$i];\n\t $_workflow_info['approver_user_seqno'] = $_SESSION['user']['user_seq_no']; // 因为有从邮件签核,所以有把 userseqno放到画面上\n\t $_workflow_info['approve_seqno'] = $list['approve_seqno'][$i];\n\t if (isset($list['approve_action'.$list['approve_seqno'][$i]]) && $list['approve_action'.$list['approve_seqno'][$i]] != \"\") \n\t \t{$_workflow_info['is_approved'] = $list['approve_action'.$list['approve_seqno'][$i]];}\n\t \telse\n\t \t $_workflow_info['is_approved'] ='';\n\t echo '<br/> $list[approve_action'.$list['approve_seqno'][$i].'='.$list['approve_action'.$list['approve_seqno'][$i]];\n\t\t\techo '<br>gakki 2342='.$list['approve_action2342'];\n\t\t\t$_workflow_info['reject_reason']\t = $_workflow_info['is_approved'] == 'N' ?\n\t\t\t\t (is_array($list['reject_reason']) &&\n \t\t\t\t isset($list['reject_reason'][$i]) &&\n \t\t\t\t !empty($list['reject_reason'][$i]) ?\n\t\t\t\t $list['reject_reason'][$i]:\n\t\t\t\t (isset($list['all_reject_reason'])? \n\t\t\t\t $list['all_reject_reason'] : null)):null;\n\t\t\t\t \t \n\t if (!empty($_workflow_info['is_approved']))\n\t {\n\t\t\t\t$rowCount = Array();\n \t // change to replace method for improve the performance by dennis 2013/09/24\n \t $sql= <<<eof\n \t select count(1) cnt\n \t from ehr_concurrent_request_detail\n \t where approver_emp_seqno = :appr_emp_seqno\n \t and workflow_seqno = :wf_seqno\n \t and po_success is null\neof;\n\t\t\t\t$stid = oci_parse($conn, $sql);\n\t\t\t\t oci_bind_by_name($stid, ':appr_emp_seqno', $appr_emp_seqno);\n\t\t\t\t oci_bind_by_name($stid, ':wf_seqno', $wf_seqno); \n oci_execute($stid);\n\t\t while (($row = oci_fetch_array($stid, OCI_BOTH)) != false) {\n\t\t\t $rowCount['ROWCOUNTS'] = $row['ROWCOUNTS'];\n\t\t } \n \n \tif($rowCount['ROWCOUNTS'] >0) continue; ///有重复提交的不处理\n \n \t$sql = <<<eof\n \t\tinsert into ehr_concurrent_request_detail\n\t\t\t\t\t (request_no,\n\t\t\t\t\t approve_seqno,\n\t\t\t\t\t company_id,\n\t\t\t\t\t workflow_seqno,\n\t\t\t\t\t apply_type,\n\t\t\t\t\t approver_emp_seqno,\n\t\t\t\t\t approver_user_seqno,\n\t\t\t\t\t is_approved,\n\t\t\t\t\t reject_reason)\n\t\t\t\t values(:req_no,\n\t\t\t\t\t :approve_seqno,\n\t\t\t\t\t :company_id,\n\t\t\t\t\t :wf_seqno,\n\t\t\t\t\t :apply_type,\n\t\t\t\t\t :appr_emp_seqno,\n\t\t\t\t\t :appr_user_seqno,\n\t\t\t\t\t :is_approve,\n\t\t\t\t\t :rejcet_reason)\neof;\n\t\t\t\t\t\t$stid = oci_parse($conn, $sql);\n\t\t\t\t\t\toci_bind_by_name($stid, ':req_no', $request_no);\n\t\t\t\t\t\toci_bind_by_name($stid, ':approve_seqno', $_workflow_info['approve_seqno']);\t\n\t\t\t\t\t\toci_bind_by_name($stid, ':company_id', $_workflow_info['company_id']);\t\n\t\t\t\t\t\toci_bind_by_name($stid, ':wf_seqno', $_workflow_info['wf_seqno']);\n\t\t\t\t\t\toci_bind_by_name($stid, ':apply_type', $_workflow_info['apply_type']);\n\t\t\t\t\t\toci_bind_by_name($stid, ':appr_emp_seqno', $_workflow_info['appr_emp_seqno']);\t\n\t\t\t\t\t\toci_bind_by_name($stid, ':appr_user_seqno', $_workflow_info['appr_user_seqno']);\t\n\t\t\t\t\t\toci_bind_by_name($stid, ':is_approve', $_workflow_info['is_approve']);\n\t\t\t\t\t\toci_bind_by_name($stid, ':rejcet_reason', $_workflow_info['rejcet_reason']);\n\t\t\t\t\t\t// pre-input without immediately for test\n\t\t\t\t\t\t$r = oci_execute($stid, OCI_NO_AUTO_COMMIT);\n\t\t\t\t\t\tif (!$r) { \n\t\t\t\t\t\t\t$e = oci_error($stid);\n\t\t\t\t\t\t\ttrigger_error(htmlentities($e['message']), E_USER_ERROR);\n\t\t\t\t\t\t}\n \n\t\t\t\t\t}\n }echo '<br/>';\n\t\tvar_dump($_POST['workflow_seqno'] ); \n\tfor($i=0;$i<count($_POST['workflow_seqno']);$i++)\n\t{ \n // echo '<br/> $_workflow_info[workflow_seqno]['.$i.']='.$_workflow_info['workflow_seqno'][$i].' $_workflow_info[is_approved]='.$_workflow_info['is_approved'];\n\t echo '<br/> $_workflow_info[workflow_seqno]['.$i.']='.$_POST['workflow_seqno'][$i].' $_workflow_info[is_approved]='.$_workflow_info['is_approved'];\n }exit;\n // last modify by dennis 2012-01-05 change v_job to v_job_no binary_integer\n //MAARK BY DEBBIE 20150205 ISSUE9129 $sql=\"declare v_job_no binary_integer; begin dbms_job.submit(v_job_no,'begin pkg_concurrent_request.p_leave_approve_batch(pi_batch_no=>\".$request_no.\"); end;',sysdate,null,false);commit;end;\";\n $sql=\"begin pkg_concurrent_request.p_jobs(pi_seg_segment_no => '\".$_workflow_info['company_id'].\"', pi_comments => 'WF-BATCH-ABS_APPROVE', pi_username => '\".$_workflow_info['approver_user_seqno'].\"', pi_batch_no => '\".$request_no.\"', pi_job_script => 'begin pkg_concurrent_request.p_leave_approve_batch(pi_batch_no=>\".$request_no.\"); end;'); end;\"; //ADD BY DEBBIE 20150205 ISSUE9129\n\t\t$r = oci_execute($stid, OCI_NO_AUTO_COMMIT);\n\t\tif (!$r) { \n\t\t\t$e = oci_error($stid);\n\t\t\ttrigger_error(htmlentities($e['message']), E_USER_ERROR);\n\t\t}\n\t\t\n\t\t// Commit\n\t\t$r = oci_commit($conn);\n\t\tif (!$r) {\n\t\t\t$e = oci_error($conn);\n\t\t\ttrigger_error(htmlentities($e['message']), E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\t }", "title": "" }, { "docid": "ba322beb93e167a2b292c15abeb74344", "score": "0.45676532", "text": "static function updateChangedPlaylists() {\n\n $unique_changed_playlist = array_unique(self::$changed);\n\n foreach ($unique_changed_playlist as $changed_pl) {\n $elements_to_compact = $result = ElemPlaylist::where(\"playlist_id\",$changed_pl)->orderBy(\"ordine\")->get();\n $order = 1;\n foreach ($elements_to_compact as $elem) {\n $elem->ordine = $order++;\n $elem->save();\n }\n }\n\n self::$changed = array();\n }", "title": "" }, { "docid": "623b9b2aca87591ba711a0c234d588d4", "score": "0.4553263", "text": "public function getListsListByType($type = 0, $with_shared = true, $with_watched = false)\r\n {\r\n throw new Warecorp_Exception('OBSOLETE USED. Use class Warecorp_List_List');\r\n// $select = $this->_db->select();\r\n// $fields = array('vli.id', 'vli.share', 'vli.watch');\r\n// \r\n// if ($with_shared) {\r\n// $shared_in = array(0,1);\r\n// } else {\r\n// $shared_in = array(0);\r\n// }\r\n// if ($with_watched) {\r\n// $watched_in = array(0,1);\r\n// if ($this->owner_type == 'user'){\r\n// $select->joinLeft(array('zli' => 'zanby_lists__imported'), \r\n// $this->_db->quoteInto(\"zli.target_list_id = vli.id AND zli.source_list_id = vli.id AND zli.import_type='watch' AND user_id =?\",$this->owner->getId())\r\n// );\r\n// $fields[] = 'zli.view_date';\r\n// }\r\n// } else {\r\n// $watched_in = array(0);\r\n// }\r\n//\r\n// $select ->from(array('vli' => 'view_lists__list'), $fields)\r\n// ->where('vli.owner_type = ?', $this->owner_type)\r\n// ->where('vli.owner_id = ?', $this->owner->getId())\r\n// ->where('vli.share IN (?)', $shared_in)\r\n// ->where('vli.watch IN (?)', $watched_in)\r\n// ->order('vli.type_id');\r\n// $res = array();\r\n// \r\n// if ($type != 0) {\r\n// $select->where('type_id = ?', $type);\r\n// $lists = $this->_db->fetchAll($select);\r\n// foreach ($lists as $list) {\r\n// $_share = $list['share'];\r\n// $_watch = $list['watch'];\r\n// $_viewDate = isset($list['view_date']) ? $list['view_date'] : '';\r\n// $list = new Warecorp_List_Item($list['id']);\r\n// $list->setIsWatched($_watch)->setIsShared($_share)->setViewDate($_viewDate);\r\n// $res[] = $list;\r\n// }\r\n// } else {\r\n// $lists = $this->_db->fetchAll($select);\r\n// foreach ($lists as $list) {\r\n// $_share = $list['share'];\r\n// $_watch = $list['watch'];\r\n// $_viewDate = isset($list['view_date']) ? $list['view_date'] : '';\r\n// $list = new Warecorp_List_Item($list['id']);\r\n// $list->setIsWatched($_watch)->setIsShared($_share)->setViewDate($_viewDate);\r\n// $res[$list->getListType()][] = $list;\r\n// }\r\n// }\r\n// return $res;\r\n }", "title": "" } ]
c4fee7d512a28a08feb096a893bf1d07
TODO: Your mock expectations here
[ { "docid": "9209ce53f1fe78f20b10ca2a369aefcc", "score": "0.0", "text": "public function testAjax_insert_auto_draft_post0()\n{\n\n // Traversed conditions\n // if (!\\check_ajax_referer('customize-menus', 'customize-menus-nonce', \\false)) == false (line 881)\n // if (!\\current_user_can('customize')) == false (line 885)\n // if (empty($_POST['params']) || !\\is_array($_POST['params'])) == false (line 889)\n // if (!empty($illegal_params)) == false (line 895)\n // if (empty($params['post_type']) || !\\post_type_exists($params['post_type'])) == false (line 907)\n // if (!\\current_user_can($post_type_object->cap->create_posts) || !\\current_user_can($post_type_object->cap->publish_posts)) == false (line 913)\n // if ('' === $params['post_title']) == false (line 919)\n // if (\\is_wp_error($r)) == false (line 925)\n\n $actual = $this->wP_Customize_Nav_Menus->ajax_insert_auto_draft_post();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" } ]
[ { "docid": "d86fcd1451bda0a4bc92d13204f6bbc1", "score": "0.65137875", "text": "protected function stub()\n {\n }", "title": "" }, { "docid": "ada9b0b5a93d3441558f36e1413c84be", "score": "0.63116264", "text": "public function testRecordingsGet()\n {\n }", "title": "" }, { "docid": "c9f501c1523ccfa6ff6e16b4af7c6957", "score": "0.61427385", "text": "public function testServiceOrdersCompleteWorkOrders()\n {\n }", "title": "" }, { "docid": "f09dfa206c8a88382c01e550edb38b02", "score": "0.6126799", "text": "public function testCheckDocumentIdentitiesIdGet()\n {\n }", "title": "" }, { "docid": "6836ea9c37da54e8eaa7ce45567f8798", "score": "0.6090719", "text": "public function testServiceOrdersGetServiceOrder()\n {\n }", "title": "" }, { "docid": "843fb4c288b43fbb0f2c48ee01735a79", "score": "0.6031826", "text": "public function test_getDuplicateBillOfLadingById() {\n\n }", "title": "" }, { "docid": "f40371cee663b92d3b5505e735a2c895", "score": "0.60213524", "text": "public function test5069Get()\n {\n }", "title": "" }, { "docid": "edc878320e25b0443a3a5839bef49f9f", "score": "0.60154253", "text": "public function test_getDuplicateSubstitutionById() {\n\n }", "title": "" }, { "docid": "2b61e5ad1cde754f813f35e8b134f8eb", "score": "0.5999527", "text": "public function testCheckDocumentBankAccountsIdGet()\n {\n }", "title": "" }, { "docid": "f62935417c61e76b7d56c8454e2dfaec", "score": "0.5989293", "text": "public function testBuildsGetCollection()\n {\n }", "title": "" }, { "docid": "aff3b07fba0728ba712f51a71f03de96", "score": "0.5978359", "text": "public function testReportGet()\n {\n }", "title": "" }, { "docid": "408e6aa7c2958fdf6d0f0ab7b7518386", "score": "0.5977732", "text": "public function testPostMeasurements()\n {\n }", "title": "" }, { "docid": "aecaac1cab593e5407bcd6325d88e3bb", "score": "0.59621656", "text": "public function testBuildsGetInstance()\n {\n }", "title": "" }, { "docid": "b3b189b1a5c19fef4a8a9f37fc46b582", "score": "0.59558606", "text": "public function testGetOrderCredits()\n {\n }", "title": "" }, { "docid": "c6d37f75b3001aa25941471bc068eab6", "score": "0.5940384", "text": "public function testBuildsUpdateInstance()\n {\n }", "title": "" }, { "docid": "e04b8a01c8af84ca2d6a683168656872", "score": "0.5939662", "text": "public function testAddItemAudit()\n {\n }", "title": "" }, { "docid": "212691f7c8602a6e7f406f296b4a6ae0", "score": "0.59335935", "text": "public function testStrategiesStrategyIdZipListsGet()\n {\n }", "title": "" }, { "docid": "61564a21620189dc3ebc00607c2be16d", "score": "0.591943", "text": "public function testStrategiesSpendInfoGet()\n {\n }", "title": "" }, { "docid": "2e694567117379ef00908513800d8eef", "score": "0.58935624", "text": "public function testGetMetadata3()\n {\n }", "title": "" }, { "docid": "82564b0af983c61abbc538b4bccd6982", "score": "0.58803934", "text": "public function test_getBillOfLadingTags() {\n\n }", "title": "" }, { "docid": "93dfbc2696d205cd65155862379a77cf", "score": "0.5870057", "text": "public function testAttachLocation()\n {\n\n }", "title": "" }, { "docid": "69469a79f567d5f47fb17f3c5d1a8ee3", "score": "0.5869599", "text": "public function testInvoicesRead()\n {\n }", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.58682823", "text": "protected function setup() {}", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.58682823", "text": "protected function setup() {}", "title": "" }, { "docid": "6979e80ece67c0756965fc26f6a87d07", "score": "0.5867553", "text": "public function testServiceOrdersGetServiceOrderList()\n {\n }", "title": "" }, { "docid": "3b070c14d6b76b5a0847ccb162a5c426", "score": "0.5862833", "text": "public function testGetTokenRequestor()\n {\n }", "title": "" }, { "docid": "4912627967d370879e2f7fdbbaf84f1c", "score": "0.58540916", "text": "public function testAssetsIdDownloadGet()\n {\n }", "title": "" }, { "docid": "e93d11a723afe267d25741ccf2f0a04b", "score": "0.58490235", "text": "public function test_getBillOfLadingByFilter() {\n\n }", "title": "" }, { "docid": "c70c065965fc84a42f9ff155866352a6", "score": "0.58480567", "text": "public function testGetPromotions()\n {\n }", "title": "" }, { "docid": "7bc22d6cca919bc8813ee28a92e24a79", "score": "0.5840584", "text": "public function testChatbotChatbotIDEntityStatisticsGet()\n {\n }", "title": "" }, { "docid": "ee5dd0f5b8f350729a54320ea238da2c", "score": "0.58400136", "text": "public function testGetProviderStatus()\n {\n }", "title": "" }, { "docid": "983bc8c18cca7e73aa3f259969a8dc6a", "score": "0.5838183", "text": "public function testGetProcessById()\n {\n }", "title": "" }, { "docid": "ac89a7a3734e0d62734f66500f94c6f6", "score": "0.5835077", "text": "public function testSearchDashboardElements()\n {\n }", "title": "" }, { "docid": "900b10a3bfaf0f99d58aa67a14981868", "score": "0.5825133", "text": "public function testGetItemById()\n {\n }", "title": "" }, { "docid": "07cf86224f3c1bbb16cc26441829844a", "score": "0.58213544", "text": "public function testChallengeTeamRead()\n {\n }", "title": "" }, { "docid": "ea61fc268d526bef1990536ad8e39dbc", "score": "0.58153635", "text": "public function testStrategiesGet()\n {\n }", "title": "" }, { "docid": "463a19650e921c55f38375499437f8c5", "score": "0.58134216", "text": "public function testGetTerytById()\n {\n }", "title": "" }, { "docid": "dfc7f19c09a4871791ffec85568b3c5d", "score": "0.581266", "text": "public function testReportProovCodeGet()\n {\n }", "title": "" }, { "docid": "0163bd27f4e8590c733873eb7be09098", "score": "0.5810836", "text": "public function test_getDuplicateQuickReceiptById() {\n\n }", "title": "" }, { "docid": "cc437aca2b36febb5b7ecfa821447f63", "score": "0.58054173", "text": "public function testAssetsIdGet()\n {\n }", "title": "" }, { "docid": "3063a1791564b0158cb943ed18ac0b44", "score": "0.5803721", "text": "public function testGetAttributes()\n {\n\n }", "title": "" }, { "docid": "12f7a368797ff048290caf48fea9c0de", "score": "0.58021027", "text": "public function testGetDuplicateLocationFootprintById()\n {\n }", "title": "" }, { "docid": "d3ed9dd649938f828fb1dffb7fde40a9", "score": "0.57965195", "text": "public function testScheduledPlansForLook()\n {\n }", "title": "" }, { "docid": "fab8856ca6f162f9f7d26c931e0d5ee7", "score": "0.5796322", "text": "public function testBuildsAppStoreVersionGetToOneRelated()\n {\n }", "title": "" }, { "docid": "d7ad443018160e341e72cd26db6b2104", "score": "0.57953733", "text": "public function test_getBillOfLadingById() {\n\n }", "title": "" }, { "docid": "d0fe61e3f0e8d9feae7b81ef75386108", "score": "0.5794294", "text": "public function testGetByUuid()\n {\n }", "title": "" }, { "docid": "337dc0ec54883e4708be4f8a1a4838a0", "score": "0.5794114", "text": "public function testGetOrderHistories()\n {\n }", "title": "" }, { "docid": "69bee7ac0169e5f83cda5cd822f34c59", "score": "0.57940537", "text": "public function test_addSubstitutionAudit() {\n\n }", "title": "" }, { "docid": "0aeb387ab16f65d1e8055f5a35c252f4", "score": "0.57935923", "text": "public function testStrategiesStrategyIdUseragentListsGet()\n {\n }", "title": "" }, { "docid": "602613632c90464bbf0a8935d4afe0b5", "score": "0.57931566", "text": "public function testGetDuplicateItemById()\n {\n }", "title": "" }, { "docid": "0855a2c578f0ff8e1d8962b6cbdda26e", "score": "0.57847166", "text": "public function testGetRetiradaPatrimonio()\n {\n }", "title": "" }, { "docid": "55d0a0980f19999d659d83e6490c6c71", "score": "0.5780087", "text": "public function testGetOrderStatuses()\n {\n }", "title": "" }, { "docid": "7a2b34146f527a6fa7a9a681f9103a18", "score": "0.5778035", "text": "public function testAvatarGet()\n {\n }", "title": "" }, { "docid": "c495894301262d9fbb907714b5c7efd0", "score": "0.57716745", "text": "public function testGetInbound()\n {\n }", "title": "" }, { "docid": "16a15ca9e42399c737b43f4031339829", "score": "0.57673544", "text": "public function testProcurementPricingschedulesIdDetailsGet()\n {\n\n }", "title": "" }, { "docid": "1075d05964ca22863e3bc97941b7bdbd", "score": "0.57670194", "text": "public function testCrceTariffGetTariffs()\n {\n\n }", "title": "" }, { "docid": "3a397526ed58118a028350b43c445c13", "score": "0.5766533", "text": "public function testRootGet()\n {\n }", "title": "" }, { "docid": "5c16c23d5588ea9c6fdc309e0d74aea6", "score": "0.5759893", "text": "public function testPayrollsGet()\n {\n }", "title": "" }, { "docid": "1b7d16d420680275f885e9f74c7a7d73", "score": "0.57565963", "text": "public function testDossierItemsRead()\n {\n }", "title": "" }, { "docid": "9efeb457779b8fb5f4b15d49b2e050f4", "score": "0.57553524", "text": "public function test_getDuplicateLocationAddressSchemeById() {\n\n }", "title": "" }, { "docid": "4a99328c172afd74bd4803d660967eb8", "score": "0.57549274", "text": "public function testGetAccountLookup()\n {\n }", "title": "" }, { "docid": "6a04cb7d365081f56c10d6ef196d721e", "score": "0.5751546", "text": "public function testAvailabilitySearch()\n {\n }", "title": "" }, { "docid": "9a18f91f7ec9dec664c08144ba13043b", "score": "0.5744664", "text": "public function testGetPackingList()\n {\n }", "title": "" }, { "docid": "3b541c2b69018c28fc4ec533c51b10af", "score": "0.5743285", "text": "public function testStrategiesStrategyIdGet()\n {\n }", "title": "" }, { "docid": "194493ba6f1ebc40a12adf15da933002", "score": "0.57429713", "text": "public function testImportProcess()\n {\n }", "title": "" }, { "docid": "0c240e98850bbf39ed9015b702605a9f", "score": "0.57415247", "text": "public function testGetInvoiceCounters()\n {\n }", "title": "" }, { "docid": "31191de74b56d7119ca88414f9515f0c", "score": "0.57411754", "text": "public function testStrategiesStrategyIdCreativesGet()\n {\n }", "title": "" }, { "docid": "bc9d41995f6496124f2265502db73f08", "score": "0.5740642", "text": "public function testRetrieveApiUser()\n {\n }", "title": "" }, { "docid": "dd5f642cdc2b36e0a2a20c1d528a2bc3", "score": "0.5739119", "text": "public function testGetRoomS3Tags()\n {\n }", "title": "" }, { "docid": "01ff8aa75f167d90beadcc652b62e814", "score": "0.57357275", "text": "public function test_updateBillOfLadingCustomFields() {\n\n }", "title": "" }, { "docid": "4a77f3415074eb03e38fc6ddb1ba9627", "score": "0.5735116", "text": "public function before() {}", "title": "" }, { "docid": "a0b66680997f13ebe83804386639a75a", "score": "0.5734311", "text": "public function testStrategiesStrategyIdDealsGet()\n {\n }", "title": "" }, { "docid": "79e6585b409a8f0560df8fe3dd177923", "score": "0.5733186", "text": "public function testStrategiesStrategyIdSiteListsGet()\n {\n }", "title": "" }, { "docid": "b31d5d0bb8e59065736d15629331f8fe", "score": "0.5730946", "text": "public function testPurchaseOrderReceiptsNumberGet()\n {\n }", "title": "" }, { "docid": "6cfaa30ce83d751d4b4bc37fe2a54de0", "score": "0.572974", "text": "public function testQuerySettings()\n {\n }", "title": "" }, { "docid": "80f21fac578acd83298c02267e4ca45d", "score": "0.57273597", "text": "public function testCrceTariffChangeGetAllAvailable()\n {\n\n }", "title": "" }, { "docid": "a830c90123764872be2132eb083ce1b2", "score": "0.57259697", "text": "public function testBuildsPreReleaseVersionGetToOneRelated()\n {\n }", "title": "" }, { "docid": "b2dfd57d9a2be3c41b8ea1324002d6b8", "score": "0.57258517", "text": "public function testGetMetadata1()\n {\n }", "title": "" }, { "docid": "d05e2365cc7144c2d7d3c82f3e8022a6", "score": "0.5717419", "text": "public function test_addBillOfLadingTag() {\n\n }", "title": "" }, { "docid": "3281c3ae2a97f468c13c3db9784c34bc", "score": "0.571678", "text": "public function test_imageCollectionDownload() {\n\n }", "title": "" }, { "docid": "50999f634457fbe591c97aea969f1853", "score": "0.5716364", "text": "public function testGetPlan()\n {\n }", "title": "" }, { "docid": "103bf8afe1c2b4d2900840e2611a2691", "score": "0.5714048", "text": "public function testGetFounder()\n {\n\n }", "title": "" }, { "docid": "e1cf725e832a20bff0c9e508c3526032", "score": "0.571343", "text": "public function testCrceTariffGetTariff()\n {\n\n }", "title": "" }, { "docid": "ce0e4ae9f9e4f8e1b53d946732a94bae", "score": "0.5711232", "text": "public function testProcurementPricingschedulesIdDetailsCountGet()\n {\n\n }", "title": "" }, { "docid": "97a8c428b99e050d17c2e108810a842e", "score": "0.570866", "text": "public function testCrceFlexiPlanServiceGetPlanTariffTemplate()\n {\n\n }", "title": "" }, { "docid": "1777e182fad7eb9dd816e55f3449c495", "score": "0.57055634", "text": "public function testScheduledPlansForLookmlDashboard()\n {\n }", "title": "" }, { "docid": "d1e69e9878c207ba049cfbe5a230a5f9", "score": "0.5703417", "text": "public function testRetrieveListRoute()\n {\n }", "title": "" }, { "docid": "9003d52c9884fa78dccf5fb211053c7c", "score": "0.5701992", "text": "public function testCheckDocumentIdentitiesPost()\n {\n }", "title": "" }, { "docid": "391fb50a1a8d490ea5e7c8e72aba43ed", "score": "0.5700842", "text": "public function testAvailabilityResult()\n {\n }", "title": "" }, { "docid": "c62fd9bd69f0762addae1c4a2de5b1ea", "score": "0.5700704", "text": "public function testGetGroupMemberById()\n {\n }", "title": "" }, { "docid": "007b6ccadf0a43912459f50fb6f5609e", "score": "0.5699574", "text": "public function testMeasurementExportRequest()\n {\n }", "title": "" }, { "docid": "adb430dca88665483dc0619dc22a53e4", "score": "0.5697937", "text": "public function test_imageCollectionFind() {\n\n }", "title": "" }, { "docid": "d3f73280d6ba8a55a72a7a1acaf35041", "score": "0.56970257", "text": "public function testRetrieveRoute()\n {\n }", "title": "" }, { "docid": "427bea0c715850646696093d7b819644", "score": "0.569408", "text": "public function testGetCurrentPlan()\n {\n }", "title": "" }, { "docid": "a095147b89d5c92b958aeda92b91754b", "score": "0.56933206", "text": "public function testServiceOrdersPostServiceOrder()\n {\n }", "title": "" }, { "docid": "862b05af1fbf2907764e58aa0bf35104", "score": "0.56911165", "text": "protected function setup() { }", "title": "" }, { "docid": "6d46b7c061c3b52afa3cc8e2ed6bb676", "score": "0.5687618", "text": "public function testGetClient()\n {\n }", "title": "" }, { "docid": "011e558688d5e2eecba3980cb90ac79b", "score": "0.5683594", "text": "public function testPostInbound()\n {\n }", "title": "" }, { "docid": "662085285e2e1cf747b28219bc5855b3", "score": "0.568296", "text": "public function testGetAllocationCompositionAllUsingGet()\n {\n }", "title": "" }, { "docid": "bc4620eac870570458a81d59b00a1273", "score": "0.5681705", "text": "public function testPurchaseOrdersBook()\n {\n }", "title": "" }, { "docid": "26c925dd63175f32c123e9d4572203c2", "score": "0.5680402", "text": "public function testGetProductDescriptions()\n {\n }", "title": "" } ]
0cffa1b2764e4f1b1703aeb98348d5e7
Generated from protobuf field int32 history_shard_count = 6;
[ { "docid": "f20aac71e3869c19c30739361d33ddeb", "score": "0.78329784", "text": "public function setHistoryShardCount($var)\n {\n GPBUtil::checkInt32($var);\n $this->history_shard_count = $var;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "b89d6fd9822ffcc638ca468d46ba87a8", "score": "0.8229376", "text": "public function getHistoryShardCount()\n {\n return $this->history_shard_count;\n }", "title": "" }, { "docid": "c44ed07e050924de8dafae3fa6553d0b", "score": "0.5745203", "text": "public function getTableHistoryDepth():int;", "title": "" }, { "docid": "0dbe31479f03a9aa002dc6d7e6422b46", "score": "0.5415745", "text": "public function countHash()\n {\n return $this->redis()->hLen($this->getName());\n }", "title": "" }, { "docid": "5c008e9ec19993a613169f5f7beb16cb", "score": "0.5196462", "text": "public function getSizeOfStringHistory(): int\n {\n return count($this->strings);\n }", "title": "" }, { "docid": "ee8f0703c9cbb4d3f8e9cadc4fcd9292", "score": "0.507398", "text": "public function setNumberOfShards($value)\n {\n assert(null === $value || is_numeric($value));\n $this->_numberOfShards = $value;\n }", "title": "" }, { "docid": "d0ebd869746cd07b3ee7312ad797273e", "score": "0.49435583", "text": "public function getNumberOfShards()\n {\n return $this->_numberOfShards;\n }", "title": "" }, { "docid": "fa590539d0f566f2bc47f0100a0fc493", "score": "0.4928199", "text": "public function getRelationCountHash()\n {\n return 'laravel_reserved_'.static::$selfJoinCount++;\n }", "title": "" }, { "docid": "9729e5eb1fe9bd2a1966ccbcd971ecfb", "score": "0.4873973", "text": "public function getStreamIdCount()\n {\n return $this->count(self::STREAM_ID);\n }", "title": "" }, { "docid": "75a1cb77b9e31e677b237cf8095d59e9", "score": "0.4871399", "text": "protected function writeHistory()\n {\n $this->gridHistory[] = $this->grid;\n $history = [];\n $this->loopBoard(function ($letter, $row, $col) use (&$history) {\n $clone = clone $letter;\n $clone->untouch();\n $history[$row][$col] = $clone;\n });\n $this->setSeed();\n $this->grid = $history;\n }", "title": "" }, { "docid": "c6878b5e91c891c60a8608852d3d84f4", "score": "0.4866013", "text": "function hopcount($log) {\r\n\t\tglobal $noderecvs, $nodefwds, $nodesents, $nodeputs, $nodehandle, $packetlog;\r\n\r\n\t\t$type = substr($log, -3);\r\n\r\n\t\t$nodehandle = array();\r\n\t\t$nodesents = array();\t$nodefwds = array();\r\n\t\t$noderecvs = array(); $nodeputs = array();\r\n\t\t$packetlog = array();\r\n\r\n\t\t$logout = $log . '.tab';\r\n\r\n\t\t//$hops = array(); // The count of each hops (histogram binning)\r\n\t\t//$delays = array(); // The count of each delays (histogram binning)\r\n\r\n\t\t$hopValues = array(); // The number of hops on a packet when recv'ed\r\n\t\t$delayValues = array(); // The delay on a packet when recv'ed\r\n\t\t$resentValues = array(); // The number of resends of a packet when recv'ed\r\n\r\n\t\t$hosts = array();\r\n\t\t$linksCount = array();\r\n\t\t$linksBW = array();\r\n\t\t$linksDups = array();\r\n\r\n\t\t$totaldelay = 0;\r\n\t\t$errors = 0;\r\n\t\t$sent = 0;\r\n\t\t$resent = 0;\r\n\t\t$recv = 0;\r\n\t\t$fwd = 0;\r\n\t\t$put = 0;\r\n\r\n\t\t$filesize = 0;\r\n\r\n\t\t// Bail if the output file already exists\r\n\t\t//if (file_exists($logout)) {\r\n\t\t//\techo \"skipping $logout\\n\";\r\n\t\t//\treturn;\r\n\t\t//}\r\n\r\n\t\t$fpout = fopen($logout, 'w');\r\n\t\tif ($fpout === false) {\r\n\t\t\texit('Couldn\\'t open ' . $logout . ' for writing');\r\n\t\t}\r\n\r\n\t\t$fp = open($type, $log, 'r');\r\n\t\tif ($fp === false) {\r\n\t\t\texit('Couldn\\'t open ' . $log . ' for reading');\r\n\t\t}\r\n\r\n\t\twhile (!eof($type, $fp)) {\r\n\t\t\t$line = gets ($type, $fp);\r\n\t\t\t$filesize += strlen($line);\r\n\r\n\t\t\t\t// Match Messages\r\n\t\t\tif ( preg_match (\"/: ([0-9A-F ]+)\\b: ([recv|fwd|sent]+)\\b[\\s]*([A-Za-z]+)\\(([\\d]+)\\b.*([\\d]+) hops.* ([\\d]+) ms.* ([\\d]+) resent/\", $line, $regs) ) {\r\n\t\t\t //print_r($regs);\r\n\r\n\t\t\t $id = trim($regs[1]);\r\n\t\t\t $type = $regs[2];\r\n\t\t\t $messagetype = $regs[3];\r\n\t\t\t\t\t$messageid = $regs[4];\r\n\t\t\t $hop = $regs[5];\r\n\t\t\t $delay = $regs[6];\r\n\t\t\t $resent = $regs[7];\r\n\t\t\t $totaldelay += $delay;\r\n\r\n\t\t\t\t\taddID($id);\r\n\r\n\t\t\t if ($type == 'recv') {\r\n\r\n\t\t\t \t\t$recv++;\r\n\r\n\t\t\t\t $noderecvs[$id]++;\r\n\r\n\t\t\t\t //if (!isset($hops[$hop])) {\r\n\t\t\t\t //\t$hops[$hop] = 0;\r\n\t\t\t\t //}\r\n\t\t\t\t //$hops[$hop]++;\r\n\t\t\t\t $hopValues[] = $hop;\r\n\r\n\t\t\t\t\t\t// Store the delay\r\n\t\t\t\t //$delay = round($delay, -2);\r\n\t\t\t\t\t\t//if (!isset($delays[$delay])) {\r\n\t\t\t\t //\t$delays[$delay] = 0;\r\n\t\t\t\t //}\r\n\t\t\t\t //$delays[$delay]++;\r\n\t\t\t $delayValues[] = $delay;\r\n\r\n\t\t\t // Store the resent value\r\n\t\t\t $resentValues[] = $resent;\r\n\r\n\t\t\t if ($messagetype == 'PutMessage') {\r\n\t\t\t \t$nodeputs[$id]++;\r\n\t\t\t \t$put++;\r\n\t }\r\n\r\n\t \t$nodehandle[$id]++;\r\n\r\n\t\t\t\t\t\tmessageFinished($messageid);\r\n\r\n\t\t\t\t } else if ($type == 'fwd') {\r\n\t\t\t\t $nodefwds[$id]++;\r\n\t\t\t\t \t$fwd++;\r\n\r\n\t\t\t\t \t$nodehandle[$id]++;\r\n\r\n\t\t\t\t } else if ($type == 'sent') {\r\n\t\t\t\t \t$nodesents[$id]++;\r\n\t\t\t\t \t$sent++;\r\n\r\n\t\t\t\t \t// Track this packet's movements\r\n\t\t\t\t \t$packetlog[$messageid] = array();\r\n\t\t\t\t }\r\n\r\n\t\t\t} else if ( preg_match (\"/: ([0-9A-F ]+)\\b: ([aliv|fail]+)/\", $line, $regs) ) {\r\n\t\t\t\t\t//print_r($regs);\r\n\r\n\t\t\t\t\t$id = trim($regs[1]);\r\n\t\t\t $type = $regs[2]; //aliv or fail\r\n\r\n\t\t\t addID($id);\r\n\r\n\t\t\t // Match Packets\r\n\t\t\t} else if ( preg_match (\"/: ([0-9A-F]+)\\b: ([A-Za-z]+)\\(([\\d]+)\\b.* ([0-9A-F]+)>([0-9A-F]+) size:([\\d]+).*data:([A-Za-z]+)\\(([\\d]+)\\b/\", $line, $regs) ) {\r\n\t\t\t\t//print_r($regs);\r\n\r\n\t\t $addy = $regs[1];\r\n\t\t $packettype = $regs[2];\r\n\t\t $packetid = $regs[3];\r\n\t\t\t\t$from = $regs[4];\r\n\t\t $to = $regs[5];\r\n\t\t $size = $regs[6];\r\n\t\t $datatype = $regs[7];\r\n\t\t $dataid = $regs[8];\r\n\r\n\t\t if ( isset($hosts[$packetid]) ) {\r\n\t\t\t\t\t$oldhost = $hosts[$packetid];\r\n\r\n\t\t\t\t\t$idx = $addy . '>' . $oldhost;\r\n\r\n\t\t\t\t\t// Record a count on this link\r\n\t\t\t\t\tif ( !isset( $linksCount[$idx] )) {\r\n\t\t\t\t\t\t$linksCount[$idx] = 0;\r\n\t\t\t\t\t\t$linksBW[$idx] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t$linksCount[$idx]++;\r\n\t\t\t\t\t$linksBW[$idx]+=$size;\r\n\t\t }\r\n\r\n\t\t // Insert the packetid here\r\n\t\t $hosts[$packetid] = $addy;\r\n\r\n\t\t // Track the path of this message (if we are recording it)\r\n\t\t if (isset($packetlog[$dataid])) {\r\n \t\t\t\t$packetlog[$dataid][] = $addy;\r\n\t\t }\r\n\r\n\t\t\t} else if ( strpos ($line, \"ERROR\") !== false ) {\r\n\t\t\t\t\t$errors++;\r\n\t\t\t} else {\r\n\t\t\t\t// This will print out any lines that didn't match\r\n\t\t\t\t//print_r($line);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t// Count only the values greater than zero\r\n\t\t$resents = count ( array_filter ($resentValues, 'nonzero') );\r\n\r\n\t\t//echo 'Sent: ' . $sent . ' Fwd: ' . $fwd . ' Recv: ' . $recv . ' Resents: ' . $resents . ' Put: ' . $put;\r\n\r\n\t\t//$sum = 0;\r\n\t\t//$total = 0;\r\n\t\t//foreach($hops as $hop=>$count) {\r\n\t\t//\t$sum += $hop * $count;\r\n\t\t//\t$total += $count;\r\n\t\t//}\r\n\r\n\t\t//echo \"\\n\\n\";\r\n\r\n\t\t//if ($total == 0)\r\n\t\t//\t$total = -1;\r\n\r\n\t\t//echo 'Total Messages: ' . $total . ' Average Hops: ' . ($sum / $total) . ' Average Delay: ' . ($totaldelay / $total) . \"\\n\";\r\n\t\t//echo 'Lost Messages: ' . $errors . ' (' . round(($errors / $total * 100), 1) . '%)' . \"\\n\";\r\n\t\t//echo 'Log size: ' . $filesize . \" bytes\\n\";\r\n\t\tclose($type, $fp);\r\n\r\n\t\t// Remove the ID as keys from node{recvs,fwds}\r\n\t\t$noderecvs = array_values($noderecvs);\r\n\t\t$nodefwds = array_values($nodefwds);\r\n\t\t$nodesents = array_values($nodesents);\r\n\t\t$nodeputs = array_values($nodeputs);\r\n\r\n\t\t$nodehandle = array_values($nodehandle);\r\n\r\n\t\t$linksCount1 = array();\r\n\t\t$linksBW1 = array();\r\n\r\n\t\t// Treats both link directions as one whole link\r\n\t\tforeach ($linksCount as $key => $link) {\r\n\r\n\t\t\t$keys = split('>', $key);\r\n\r\n\t\t\t// Swap the index around if needed\r\n\t\t\tif (strcmp($keys[0], $keys[1]) >= 0) {\r\n\t\t\t\t$idx = $keys[0] . '-' . $keys[1];\r\n\t\t\t} else {\r\n\t\t\t\t$idx = $keys[1] . '-' . $keys[0];\r\n\t\t\t}\r\n\r\n\t\t\tif ( !isset($linksDups[$idx]) )\r\n\t\t\t\t$linksDups[$idx] = 0;\r\n\r\n\t\t\t// Record a count on this link\r\n\t\t\tif ( !isset( $linksCount1[$idx] )) {\r\n\t\t\t\t$linksCount1[$idx] = 0;\r\n\t\t\t\t$linksBW1[$idx] = 0;\r\n\t\t\t}\r\n\r\n\t\t\t$linksCount1[$idx]+=$linksCount[$key];\r\n\t\t\t$linksBW1[$idx]+=$linksBW[$key];\r\n\t }\r\n\t\t$linksCount1 = array_values($linksCount1);\r\n\t\t$linksBW1 = array_values($linksBW1);\r\n\r\n\t\t// Treats links as 2 different links (1 in each direction)\r\n\t\t$linksCount2 = array_values($linksCount);\r\n\t\t$linksBW2 = array_values($linksBW);\r\n\r\n\t\t$linksDups = array_values($linksDups);\r\n\r\n\t\t// Print out file data, (ie the long lists of numbers)\r\n\t\t$cols = array(/* 'header' => $values */\r\n\t\t\t\t\t\t\t\t\t// Done per node\r\n\t\t\t\t\t\t\t\t\t'delays' => $delayValues, // Number of messages a node sents\r\n\t\t\t\t\t\t\t\t\t'nodesents' => $nodesents, // Number of messages a node sents\r\n\t\t\t\t\t\t\t\t\t'nodefwds' => $nodefwds, // Number of messages a node fwds\r\n\t\t\t\t\t\t\t\t\t'noderecvs' => $noderecvs, // Number of messages a node recvs\r\n\t\t\t\t\t\t\t\t\t'nodeputs' => $nodeputs, // Number of messages a node puts\r\n\t\t\t\t\t\t\t\t\t'nodehandles' => $nodehandle, // Number of message a node recvs and fwds\r\n\r\n\t\t\t\t\t\t\t\t\t// Done per message\r\n\t\t\t\t\t\t\t\t\t'hops' => $hopValues, // Number of hops a message takes\r\n\t\t\t\t\t\t\t\t\t'resents' => $resentValues, // Number of times a message is resent\r\n\r\n\t\t\t\t\t\t\t\t\t// Done per link\r\n\t\t\t\t\t\t\t\t\t'linkcount_uni' => $linksCount1,// The total number of packets a link sees in one direction\r\n\t\t\t\t\t\t\t\t\t'linkbw_uni' => $linksBW1, // The total bandwidth used on a link in one direction\r\n\t\t\t\t\t\t\t\t\t'linkcount_bi' => $linksCount2, // The total number of packets a link sees\r\n\t\t\t\t\t\t\t\t\t'linkbw_bi' => $linksBW2, // The total bandwidth used on a link\r\n\t\t\t\t\t\t\t\t\t'link_dup' => $linksDups, // Number of duplicate messages a link sees\r\n\t\t\t\t\t\t\t\t\t);\r\n\r\n\t\t// Sort the cols so that the longest arrays are printed first\r\n\t\t//usort ( $cols, 'cmp' );\r\n\r\n\t\t$line = '';\r\n\t\t// Print the headers\r\n\t\t$max = 0; // Find the longest col\r\n\t\t$headers = array();\r\n\t\tforeach ($cols as $header => &$col) {\r\n\t\t\t$line .= $header . \"\\t\";\r\n\r\n\t\t\tif (count($col) > $max)\r\n\t\t\t\t$max = count($col);\r\n\r\n\t\t\t$headers[$header] = count($col);\r\n\t\t}\r\n\r\n\t\tfwrite( $fpout, trim($line) . \"\\n\" );\r\n\r\n\t\t// Print the values (in cols)\r\n\t\tfor ($i = 0; $i < $max; $i++) {\r\n\t\t\t$line = '';\r\n\r\n\t\t\tforeach ($headers as $header => $count) {\r\n\t\t\t\tif ($i < $count) {\r\n\t\t\t\t\t$line .= $cols[$header][$i] . \"\\t\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$line .= \" \\t\";\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tfwrite( $fpout, rtrim($line) . \"\\n\" );\r\n\t\t}\r\n\r\n\t\t//echo 'Written ' . $logout . \"\\n\";\r\n\t\tfclose($fpout);\r\n\r\n\t}", "title": "" }, { "docid": "949d814dc5666acfc234f7fd2323e505", "score": "0.48488364", "text": "public function getDataStreamShardsQuota()\n {\n return $this->data_stream_shards_quota;\n }", "title": "" }, { "docid": "d16880b47d8a55370836ca9691d01f37", "score": "0.4824372", "text": "public function historyBag()\n {\n if (!$this->session->hasMetadata('history_bag')) {\n $this->historyBagNew();\n }\n\n return $this->session->metadata('history_bag');\n }", "title": "" }, { "docid": "b0a2fd919463e47cce835146b54366a2", "score": "0.47597367", "text": "public function getStateHistory() {\n return $this->getTable()->getStateHistory();\n }", "title": "" }, { "docid": "bcfa6aa64b5c46835ebf3edae7ea7b25", "score": "0.47533217", "text": "function getGuildLootHistoryCount($guildid, $tableid = 1){\r\n\t\tglobal $sql;\r\n\r\n\t\t$historytable = dkpPointsHistoryTableEntry::tablename;\r\n\t\t$numRows = $sql->QueryItem(\"SELECT count(*)\r\n\t\t\tFROM $historytable\r\n\t\t\tWHERE forItem='1'\r\n\t\t\tAND $historytable.guild='$guildid'\r\n\t\t\tAND tableid = '$tableid'\");\r\n\t\treturn $numRows;\r\n\t}", "title": "" }, { "docid": "3813494fe6caa6e9e1cba822ced95a63", "score": "0.47100165", "text": "public function history_handler(){\n\t\tif(is_null(Session::instance()->get('history'))){\n\t\t\t$history = array();\n\t\t} else {\n\t\t\t//get existing session history var and unserialize\n\t\t\t$history = (array)unserialize(Session::instance()->get('history'));\n\t\t}\n\t\t\n\t\t//current URL\n\t\t$url = $this->request->uri();\n\t\t\n\t\t//push current URL onto end of session history var\n\t\tif(end($history) != $url){\n\t\t\tarray_push($history, $url);\n\t\t}\n\t\t\n\t\t//check if history levels const is defined, if not set to 10 levels\n\t\t$session_history = defined('SESSION_HISTORY') ? SESSION_HISTORY : 10;\n\t\t\n\t\t//if current levels exceeds limit shift first array element\n\t\tif(count($history) > $session_history){\n\t\t\tarray_shift($history);\n\t\t}\n\t\t\n\t\t//serialize array to store in session var\n\t\t$history = serialize($history);\n\t\t\n\t\tSession::instance()->bind('history', $history);\n\t}", "title": "" }, { "docid": "5fdd9a9aea8c92b27edf533a0ed80898", "score": "0.4650169", "text": "public function getHashIndex() {\n\t\treturn $this->_hashIndex;\n\t}", "title": "" }, { "docid": "a7858cd0680d338b9f5a7980b384426e", "score": "0.4648977", "text": "function record_count(){\n\t\treturn $this->db->count_all(\"ci_board\");\n\t}", "title": "" }, { "docid": "85ad46c51955d810eaa5266dddaeae98", "score": "0.46205515", "text": "public function getHistory()\n {\n return $this->history;\n }", "title": "" }, { "docid": "85ad46c51955d810eaa5266dddaeae98", "score": "0.46205515", "text": "public function getHistory()\n {\n return $this->history;\n }", "title": "" }, { "docid": "9c7bbd2a039bde5f021c2b22e018aeb6", "score": "0.46159074", "text": "public function getCount()\n {\n return $this->redis->zcard($this->name);\n }", "title": "" }, { "docid": "45e8c9eb035a26085287da4b2e25c003", "score": "0.46092328", "text": "public function getShardKeys()\n {\n return $this->_shardKeys;\n }", "title": "" }, { "docid": "ca20460503d294580c3a6a5606a6413e", "score": "0.45711744", "text": "public function getStoreChunksCount(): int\n {\n return $this->storeChunksCount;\n }", "title": "" }, { "docid": "0d421f0c545a5d40a288245f99900438", "score": "0.454162", "text": "public function setHistory($history);", "title": "" }, { "docid": "8c4cb46f87d17bbde90ce79a504544c5", "score": "0.45277515", "text": "public function get_history() {\r\n\t\t$db = $this->db;\r\n\t\treturn $db->get_history_data();\r\n\t}", "title": "" }, { "docid": "9f33beb09ba620bac4478a043c85aeea", "score": "0.45219007", "text": "public function count(): int\n {\n return count($this->existingChunks);\n }", "title": "" }, { "docid": "84bde78c3853cdd4acffcd03a00331a7", "score": "0.45199955", "text": "public static function getHistoryTable()\n {\n if (isset(self::$historyTableName))\n return self::$historyTableName;\n /** @var \\wpdb $wpdb */\n global $wpdb;\n self::$historyTableName = $wpdb->prefix . \"db_deployment_history\";\n return self::$historyTableName;\n }", "title": "" }, { "docid": "c374bce5cb7ee31bef6873e1f0e3d905", "score": "0.45158806", "text": "private function hlenRedis($key) {\n return self::$redis_object->hlen($key);\n }", "title": "" }, { "docid": "3c47bf80e334afebe971d0d44a8b8dee", "score": "0.4503719", "text": "protected function getSwsMockHandlerStackCount()\n {\n return $this->swsMockHandler->count();\n }", "title": "" }, { "docid": "68372d7d7a7f30a8ed251637be0f8cd2", "score": "0.44706306", "text": "public function getStatusHistory()\n {\n return $this->status_history;\n }", "title": "" }, { "docid": "cd38e081c25c201ba8459be55aa6d9f4", "score": "0.4447265", "text": "abstract public function getEntriesCount();", "title": "" }, { "docid": "c3b9b6f4c5aab54649e4f115485ea501", "score": "0.44431776", "text": "public function count_all_st_sb_sched(){\n\n\t\t\t$this->db->from($this->tab_name_t);\n\n\t\t\treturn $this->db->count_all_results();\n\t\t}", "title": "" }, { "docid": "5b764dd22b4339a4d3c370c4efa585ae", "score": "0.44278464", "text": "public function getClientStateIdentifierHash()\n {\n\n $pageHashCode = $this->getClientStateIdentifier();\n\n if($pageHashCode !== null){\n $pageHashCode = hexdec(hash('fnv1a32', $pageHashCode));\n // convert to 32bit int\n $pageHashCode = ($pageHashCode & 0xFFFFFFFF);\n /*if ($pageHashCode & 0x80000000) {\n $pageHashCode = ~(~$pageHashCode & 0xFFFFFFFF);\n }*/\n\n $pageHashCode = strtoupper(str_pad(dechex($pageHashCode), 8, '0', STR_PAD_LEFT));\n }\n\n return $pageHashCode;\n }", "title": "" }, { "docid": "19097acce1ead94632445cc447c276dd", "score": "0.44145492", "text": "public function testComparePresenceHistoryWithFixture() {\n $history = self::$channel->presence->history();\n\n // verify history existence and count\n $this->assertNotNull( $history, 'Expected non-null history data' );\n $this->assertEquals( 6, count($history->items), 'Expected 6 history entries' );\n\n // verify history contents\n $fixtureHistoryMap = [];\n foreach (self::$presenceFixture as $entry) {\n $fixtureHistoryMap[$entry->clientId] = $entry->data;\n }\n\n foreach ($history->items as $entry) {\n $this->assertNotNull( $entry->clientId, 'Expected non-null client ID' );\n $this->assertTrue(\n isset($fixtureHistoryMap[$entry->clientId]) && $fixtureHistoryMap[$entry->clientId] == $entry->originalData,\n 'Expected presence contents to match'\n );\n }\n\n // verify limit / pagination - forwards\n $firstPage = self::$channel->presence->history( [ 'limit' => 3, 'direction' => 'forwards' ] );\n\n $this->assertEquals( 3, count($firstPage->items), 'Expected 3 presence entries' );\n\n $nextPage = $firstPage->next();\n\n $this->assertEquals( self::$presenceFixture[0]->clientId, $firstPage->items[0]->clientId, 'Expected least recent presence activity to be the first' );\n $this->assertEquals( self::$presenceFixture[5]->clientId, $nextPage->items[2]->clientId, 'Expected most recent presence activity to be the last' );\n\n // verify limit / pagination - backwards (default)\n $firstPage = self::$channel->presence->history( [ 'limit' => 3 ] );\n\n $this->assertEquals( 3, count($firstPage->items), 'Expected 3 presence entries' );\n\n $nextPage = $firstPage->next();\n\n $this->assertEquals( self::$presenceFixture[5]->clientId, $firstPage->items[0]->clientId, 'Expected most recent presence activity to be the first' );\n $this->assertEquals( self::$presenceFixture[0]->clientId, $nextPage->items[2]->clientId, 'Expected least recent presence activity to be the last' );\n }", "title": "" }, { "docid": "edcc24f31e3872dd66a8cfb654bf31ca", "score": "0.441078", "text": "public function getSourceShardsList(){\n return $this->_get(4);\n }", "title": "" }, { "docid": "963c57bf8210b2bfce1dd7ea078309e1", "score": "0.4398148", "text": "protected function updateHistory()\n {\n self::$history[] = time();\n if (30 === count(self::$history)) {\n if (reset(self::$history) >= (time() - 35)) {\n sleep(2);\n }\n array_shift(self::$history);\n }\n }", "title": "" }, { "docid": "559d6ba7b5f112c8fed6016d5fd5623d", "score": "0.43920186", "text": "public function getCount() {\n return $this->getScheme()->getStore()->executeSchemeCount($this);\n }", "title": "" }, { "docid": "693a87b26f1d9df617e12cf41d704968", "score": "0.43852586", "text": "public function hashIndex($key){\n\t\tif($this->serverCount == 1) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tif(is_array($key)){\n\t\t\t$key = implode(',', $key);\n\t\t}\n\n\t\t$md5_key_str = md5($key);\n\t\t$server_index = hexdec(substr($md5_key_str,0,4)) % count($this->serverList);\n\t\treturn $server_index;\n\t}", "title": "" }, { "docid": "3810064b8e143b775eb8772c5b0e5411", "score": "0.43770653", "text": "public function getHistory();", "title": "" }, { "docid": "3810064b8e143b775eb8772c5b0e5411", "score": "0.43770653", "text": "public function getHistory();", "title": "" }, { "docid": "3810064b8e143b775eb8772c5b0e5411", "score": "0.43770653", "text": "public function getHistory();", "title": "" }, { "docid": "21c2b3ceae379ab72f453b40075ac4c4", "score": "0.43660197", "text": "public function get_history(){\n\t\treturn (array) $this->history;\n\t}", "title": "" }, { "docid": "e3c795dce3269fe3734dc178598b5784", "score": "0.43654275", "text": "public function getCountWashMachine() {\n \n return $this->getWashMachines()->count();\n }", "title": "" }, { "docid": "59aa6b72341b57c6f169c82058eac22f", "score": "0.4363449", "text": "public function histogram_data($query, $date_str='j' , $slots=false, $newstatesonly=false)\n\t{\n\t\tif (empty($slots)) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$res = $this->db->query($query)->result(false);\n\t\tif (!$res) {\n\t\t\treturn false;\n\t\t}\n\t\t$last_state = null;\n\t\tforeach ($res as $row) {\n\t\t\tif ($newstatesonly) {\n\t\t\t\tif ($row['state'] != $last_state) {\n\t\t\t\t\t# only count this state if it differs from the last\n\t\t\t\t\t$slots[date($date_str, $row['timestamp'])][$row['state']]++;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$slots[date($date_str, $row['timestamp'])][$row['state']]++;\n\t\t\t}\n\t\t\t$last_state = $row['state'];\n\t\t}\n\t\treturn $slots;\n\t}", "title": "" }, { "docid": "a243859a8a62edcaa46b0f43df98f7fe", "score": "0.43613416", "text": "public function historys()\n {\n return $this->hasMany(History::class)->select('created_at', 'count_old', 'count_new');\n }", "title": "" }, { "docid": "ee9557967aa994311d08827ce4eb83d8", "score": "0.43482578", "text": "public function getEventHistory()\n {\n return $this->_eventHistory;\n }", "title": "" }, { "docid": "8a7ff3149403877710965d6e5dacd847", "score": "0.43469036", "text": "public function get_action_history_table_name() {\n global $wpdb;\n return $wpdb->prefix . \"fc_action_history\";\n }", "title": "" }, { "docid": "9871fcd07f47596a652e74537a3c2f1c", "score": "0.4345394", "text": "public function changeHistory()\n {\n $this->product->histories()->create([\n 'status_id' => $this->next,\n ]);\n }", "title": "" }, { "docid": "9cb5afcdcc4aeb3330579488fdac61f0", "score": "0.43448228", "text": "public function createHistoryModel();", "title": "" }, { "docid": "c9f3f9e7a3f03dea50e6e05441874bcf", "score": "0.43279514", "text": "public function inThreefoldRepetition(): bool\n {\n $hash = [];\n foreach ($this->history->getEntries() as $entry) {\n if (isset($hash[$entry->position])) {\n ++$hash[$entry->position];\n } else {\n $hash[$entry->position] = 1;\n }\n\n if ($hash[$entry->position] >= 3) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "1774c3016caadab66155b82f5615683a", "score": "0.4320969", "text": "public function getLastHistory();", "title": "" }, { "docid": "a3ed524937f6fe75982b84c50d972c2e", "score": "0.4316749", "text": "function getNbLaps()\n\t{\n\t\treturn $this->execute(ucfirst(__FUNCTION__));\n\t}", "title": "" }, { "docid": "5a441dc126875a8dcde16b5cb4b4c0b2", "score": "0.43092644", "text": "protected function beforeInsert() {\n\t\t$sequence = Utility::hashString($this->getPriKey());\n\t\t$this->setShardId($sequence);\n\t}", "title": "" }, { "docid": "d414780c0aaba36a132ad8d3c54eb6e2", "score": "0.4295274", "text": "private function insertBinHistory($farm_id,$bin_id,$number_of_pigs)\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "67fbd2c9cea69e7350c109bcf0b241ee", "score": "0.42902473", "text": "public function count()\n\t{\n\t\tYii::trace(get_class($this).'.count()','packages.redis.PipiRedisRecord');\n\t\treturn $this->getRedisSet()->getCount();\n\t}", "title": "" }, { "docid": "64b0a82ff17b9c25b64f7f400a809c28", "score": "0.42862344", "text": "public function count()\n {\n return $this->shops->count();\n }", "title": "" }, { "docid": "12fe9228efa26cdba0a62574f168e60f", "score": "0.42734656", "text": "public function reconnectsCount()\n {\n return $this->reconnects;\n }", "title": "" }, { "docid": "73e5ecee1f9d3f988bdb5baabd84d909", "score": "0.42684683", "text": "public function getTableCount();", "title": "" }, { "docid": "22c4a8f7a1202fdf0a2f6401b8830beb", "score": "0.42661384", "text": "public function getCountsList(){\n return $this->_get(6);\n }", "title": "" }, { "docid": "a79375e7cc9eadf67501edd75dd6fec5", "score": "0.42652345", "text": "public function getRangeCount(): int;", "title": "" }, { "docid": "aad716dd9045be9b2af9cf1601b7fc7e", "score": "0.42628607", "text": "public function histogram($slots=false)\n\t{\n\t\tif (empty($slots) || !is_array($slots))\n\t\t\treturn false;\n\n\t\t$breakdown = $this->options['breakdown'];\n\t\t$report_type = $this->options['report_type'];\n\t\t$newstatesonly = $this->options['newstatesonly'];\n\n\t\t# compute what event counters we need depending on report type\n\t\t$events = false;\n\t\tswitch ($report_type) {\n\t\t\tcase 'hosts': case 'hostgroups':\n\t\t\t\tif (!$this->options['host_states'] || $this->options['host_states'] == self::HOST_ALL) {\n\t\t\t\t\t$events = array(0 => 0, 1 => 0, 2 => 0);\n\t\t\t\t} else {\n\t\t\t\t\t$events = array();\n\t\t\t\t\tfor ($i = 0; $i < 7; $i++) {\n\t\t\t\t\t\tif (1 << $i & $this->options['host_states']) {\n\t\t\t\t\t\t\t$events[$i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'services': case 'servicegroups':\n\t\t\t\tif (!$this->options['service_states'] || $this->options['service_states'] == self::SERVICE_ALL) {\n\t\t\t\t\t$events = array(0 => 0, 1 => 0, 2 => 0, 3 => 0);\n\t\t\t\t} else {\n\t\t\t\t\t$events = array();\n\t\t\t\t\tfor ($i = 0; $i < 15; $i++) {\n\t\t\t\t\t\tif (1 << $i & $this->options['service_states']) {\n\t\t\t\t\t\t\t$events[$i] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\n\t\t# add event (state) counters to slots\n\t\t$fixed_slots = false;\n\t\tforeach ($slots as $s => $l) {\n\t\t\t$fixed_slots[$l] = $events;\n\t\t}\n\n\t\t# fields to fetch from db\n\t\t$fields = 'timestamp, event_type, host_name, service_description, state, hard, retry';\n\t\t$query = $this->build_alert_summary_query($fields);\n\n\t\t$data = false;\n\n\t\t# tell histogram_data() how to treat timestamp\n\t\t$date_str = false;\n\t\tswitch ($breakdown) {\n\t\t\tcase 'monthly':\n\t\t\t\t$date_str = 'n';\n\t\t\t\tbreak;\n\t\t\tcase 'dayofmonth':\n\t\t\t\t$date_str = 'j';\n\t\t\t\tbreak;\n\t\t\tcase 'dayofweek':\n\t\t\t\t$date_str = 'N';\n\t\t\t\tbreak;\n\t\t\tcase 'hourly':\n\t\t\t\t$date_str = 'H';\n\t\t\t\tbreak;\n\t\t}\n\n\t\t$data = $this->histogram_data($query, $date_str, $fixed_slots, $newstatesonly);\n\n\t\t$min = $events;\n\t\t$max = $events;\n\t\t$avg = $events;\n\t\t$sum = $events;\n\t\tif (!empty($data)) {\n\t\t\tforeach ($data as $slot => $slotstates) {\n\t\t\t\tforeach ($slotstates as $id => $val) {\n\t\t\t\t\tif ($val > $max[$id]) $max[$id] = $val;\n\t\t\t\t\tif ($val < $min[$id]) $min[$id] = $val;\n\t\t\t\t\t$sum[$id] += $val;\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($max as $v => $k) {\n\t\t\t\tif ($k != 0) {\n\t\t\t\t\t$avg[$v] = number_format(($k/count($data)), 2);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn array('min' => $min, 'max' => $max, 'avg' => $avg, 'sum' => $sum, 'data' => $data);\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "15704521dd91ed5145c66ea53efc5bbc", "score": "0.42558447", "text": "function counter_feed($new_feed,$count_session){\n\tif(isset($count_session) && !empty($count_session)){\n\t\tforeach($count_session as &$element) {\n\t\t\t$element++;\n\t\t}\n\t}\n\tif($new_feed!=''){\n\t\t$count_session[$new_feed]=0;\n\t}\n\treturn $count_session;\n}", "title": "" }, { "docid": "7514a8a1523b8418f6c98534809175d9", "score": "0.4248084", "text": "public function register($history)\n {\n extract($history);\n $sql = 'INSERT INTO histories\n (title)\n VALUES\n (:title)';\n $params = [\n [':title',$title],\n ];\n return $this->query($sql,$params);\n }", "title": "" }, { "docid": "9c377598328b147b6fb8cc42d5d0319b", "score": "0.42347082", "text": "public function getCount()\n {\n return $this->redis->llen($this->name);\n }", "title": "" }, { "docid": "b57a1357e24e04c83230b8777e55a9ea", "score": "0.4226759", "text": "public function getFriendsWorkHistory() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"friends_work_history\");\n\t}", "title": "" }, { "docid": "65536c64321700333f8810a2cbd92243", "score": "0.4224882", "text": "public function getHits(): int;", "title": "" }, { "docid": "8dbb1632754f4e5fce26dc153ee5bea1", "score": "0.42186567", "text": "public function count()\n {\n return count($this->log);\n }", "title": "" }, { "docid": "708d956f7c90c0b666e652416853aa93", "score": "0.4217925", "text": "public function history()\n {\n $sql = \"\n SELECT * FROM \" . $this->table .\n \" WHERE `resourceType` = \" . $this->db->pdb($this->resourceType()) .\n \" AND `resourceID` = \" . $this->db->pdb($this->resourceID()) .\n \" AND `actionDateTime` <= \" . $this->db->pdb($this->actionDateTime()) .\n \" ORDER BY `actionDateTime` DESC\";\n\n $result = $this->db->get_rows($sql);\n\n return $result;\n }", "title": "" }, { "docid": "f7790904432de6974b7d2b8a3db9e319", "score": "0.42168584", "text": "protected function createHistory()\n {\n // the possibility of occurrence if the account is monitored and appears as a tagged/mentioned in the post\n AccountStats::deleteAll(['AND',\n ['account_id' => $this->account->id],\n new Expression('DATE(created_at)=DATE(NOW())'),\n ]);\n $accountStats = new AccountStats([\n 'account_id' => $this->account->id,\n 'media' => $this->account->media,\n 'follows' => $this->account->follows,\n 'followed_by' => $this->account->followed_by,\n 'er' => $this->account->er,\n 'avg_likes' => $this->account->avg_likes,\n 'avg_comments' => $this->account->avg_comments,\n ]);\n $this->saveModel($accountStats);\n\n return $accountStats;\n }", "title": "" }, { "docid": "14485111709a20bd84d450e05adbe9d0", "score": "0.42150107", "text": "public function count() {\n\t\t$count = count($this->storage) - count($this->containerIndex);\n\t\tforeach ($this->containerIndex as $hash) {\n\t\t\t$count += count($this->storage[$hash]);\n\t\t}\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "e0b7c154d8f365e4994f490953f957f2", "score": "0.42124924", "text": "public static function getHomeViewCount(): int\n {\n $statisticsModel = StatisticsRepository::getHomepageOpeningCount();\n $statisticsDTO = new Statistics($statisticsModel->Id, $statisticsModel->HomeViewCount);\n\n return $statisticsDTO->getHomeViewCount();\n }", "title": "" }, { "docid": "f98a982395786af3df2cb39db73b9a0f", "score": "0.4208959", "text": "public function getChatTabCount()\n\t{\n $this->DB->build(array(\t'select' \t=> 'COUNT(*)',\n 'from'\t\t=> array( 'addonchat_who' => 'aw' )));\n $this->DB->execute();\n\n /* Member does not exist */\n if ( (!$count = ipsRegistry::DB()->fetch()) )\n return \"\";\n\n $count = $count['COUNT(*)'];\n\n if($count == 0) return \"\";\n \n $retval = <<<______EOF\n <div style='display:none;' id='chat-tab-count-wrap'><span id='chat-tab-count' class='ipsHasNotifications' title='$count'>$count</span></div>\n <script type='text/javascript'>\n document.observe(\"dom:loaded\", function(){\n var _thisHtml\t= $('nav_app_addonchat').innerHTML;\n _thisHtml = _thisHtml.replace( /\\<\\/a\\>/ig, '' ) + \"&nbsp;&nbsp;\" + $('chat-tab-count-wrap').innerHTML + \"</a>\";\n $('nav_app_addonchat').update( _thisHtml );\n $('chat-tab-count-wrap').remove();\n $('chat-tab-count').show();\n });\n </script>\n______EOF;\n\n return $retval;\n\t}", "title": "" }, { "docid": "e86806b537ad896f04d0a6cc6b4722ad", "score": "0.4205687", "text": "public function getLocalColorTableByteSize(): int\n {\n return 3 * pow(2, $this->getLocalColorTableSize() + 1);\n }", "title": "" }, { "docid": "47ac682f092f562b7e0cc97c4867ca75", "score": "0.42040822", "text": "abstract public function getInsertCount(): int;", "title": "" }, { "docid": "4f8c74bb187eef892afd7fc4b0abbc61", "score": "0.42028338", "text": "public function getBucketCounts()\n {\n return $this->bucket_counts;\n }", "title": "" }, { "docid": "a0c6ff63ecc8f1212065f6b100f7e731", "score": "0.41961136", "text": "public function get_name() {\n\t\treturn 'history';\n\t}", "title": "" }, { "docid": "3278e47a24af0f455422917d074613b2", "score": "0.41937974", "text": "private function _rc_dbsize()\n {\n $result = 0;\n foreach ($this->_redises as $alias => $redisent) {\n if (stripos($alias, '_slave') === false) {\n continue;\n }\n\n $result += $redisent->dbsize();\n }\n\n return $result;\n\n }", "title": "" }, { "docid": "f72cd3a9d2a55430274df9e0bee8574c", "score": "0.4191696", "text": "final public function count()\n {\n return (int)count( $this->registry );\n }", "title": "" }, { "docid": "ae47fc7ca6a79b362c047c01065bdd7d", "score": "0.41914538", "text": "public function hasStatusChangeHistory(){\n return $this->_has(10);\n }", "title": "" }, { "docid": "c7d25726c79e68f7db7a1d9918cfa882", "score": "0.41899028", "text": "public static function incrementHomepageCount(): void\n {\n StatisticsRepository::incrementHomepageCount();\n }", "title": "" }, { "docid": "f9afa08644efe849aa7cd4001d349d71", "score": "0.4182733", "text": "protected function _getBatchIndexingSize()\n {\n return max(1, (int) Mage::getStoreConfig('catalog/search/elasticsearch_batch_indexing_size'));\n }", "title": "" }, { "docid": "c0c8915795f0e1c66fc3a76e0c63c591", "score": "0.41825742", "text": "function hits_count(){\n\t\treturn $this->hits_count;\n\t}", "title": "" }, { "docid": "011feb0476c79a1ffc36cd8ba0ca121c", "score": "0.418153", "text": "public static function tableName()\n {\n return 'history';\n }", "title": "" }, { "docid": "786d35aa4131246d8a4eade5e39f3361", "score": "0.41808283", "text": "public function actionHistory() {\n \n // check if user is logged\n $userId = User::checkLogged();\n // get values of user order\n $ordersList = Order::getOrdersListByUserId($userId);\n\n //if no orders\n if (empty($ordersList)) {\n $ordersList = 0;\n }\n require_once(ROOT . '/views/cabinet/history.php');\n return true;\n }", "title": "" }, { "docid": "b18598f0f5af5ef75092376db8a0d413", "score": "0.41793528", "text": "public function usedCapacity(): int\n {\n $hashLength = (int) config('urlhub.hash_length');\n $regexPattern = '['.config('urlhub.hash_char').']{'.$hashLength.'}';\n\n $randomKey = Url::whereIsCustom(false)\n ->whereRaw('LENGTH(keyword) = ?', [$hashLength])\n ->count();\n\n $customKey = Url::whereIsCustom(true)\n ->whereRaw('LENGTH(keyword) = ?', [$hashLength])\n ->whereRaw(\"keyword REGEXP '\".$regexPattern.\"'\")\n ->count();\n\n return $randomKey + $customKey;\n }", "title": "" }, { "docid": "163d63865d2e4a9781fde18d2235176a", "score": "0.41788286", "text": "function get_statehistory_xml_output($request_args)\n{\n $output = \"\";\n\n $totals = grab_array_var($request_args, 'totals', 0);\n\n $statehistory = get_data_statehistory($request_args);\n\n $output .= \"<statehistory>\\n\";\n\n if ($totals) {\n $count = empty($statehistory[0]['total']) ? 0 : $statehistory[0]['total'];\n $output .= \" <recordcount>\" . $count . \"</recordcount>\\n\";\n } else {\n $output .= \" <recordcount>\" . count($statehistory) . \"</recordcount>\\n\";\n\n foreach ($statehistory as $rs) {\n\n $output .= \" <stateentry>\\n\";\n $output .= get_xml_db_field(2, $rs, 'instance_id', 'instance_id');\n $output .= get_xml_db_field(2, $rs, 'state_time');\n $output .= get_xml_db_field(2, $rs, 'object_id');\n $output .= get_xml_db_field(2, $rs, 'objecttype_id');\n $output .= get_xml_db_field(2, $rs, 'host_name');\n $output .= get_xml_db_field(2, $rs, 'service_description');\n $output .= get_xml_db_field(2, $rs, 'state_change');\n $output .= get_xml_db_field(2, $rs, 'state');\n $output .= get_xml_db_field(2, $rs, 'state_type');\n $output .= get_xml_db_field(2, $rs, 'current_check_attempt');\n $output .= get_xml_db_field(2, $rs, 'max_check_attempts');\n $output .= get_xml_db_field(2, $rs, 'last_state');\n $output .= get_xml_db_field(2, $rs, 'last_hard_state');\n $output .= get_xml_db_field(2, $rs, 'output');\n $output .= \" </stateentry>\\n\";\n\n }\n }\n\n $output .= \"</statehistory>\\n\";\n\n return $output;\n}", "title": "" }, { "docid": "38538aa1b13eb2f80f1c96df27747083", "score": "0.41742182", "text": "public function setShardKeys($value)\n {\n assert(null === $value || is_array($value));\n $this->_shardKeys = $value;\n }", "title": "" }, { "docid": "437c6b1ece7d69ee5abea7acb1f37f09", "score": "0.4172233", "text": "public function count()\n {\n return count($this->visited);\n }", "title": "" }, { "docid": "61bdeb8ccd1d00f47fdadec92f6bdaa3", "score": "0.41700304", "text": "public function history()\n {\n return $this->hasMany(config('core.acl.incident_history_model'));\n }", "title": "" }, { "docid": "9107ef372b9a33faa9b53dc7e4bacd50", "score": "0.41681904", "text": "public static function save_history($backup_history, $use_cache = true) {\n\t\t\n\t\tglobal $updraftplus;\n\n\t\t// This data is constructed at run-time from the other keys; we do not wish to save redundant data\n\t\tforeach ($backup_history as $btime => $bdata) {\n\t\t\tunset($backup_history[$btime]['incremental_sets']);\n\t\t}\n\t\t\n\t\t// Explicitly set autoload to 'no', as the backup history can get quite big.\n\t\t$changed = UpdraftPlus_Options::update_updraft_option('updraft_backup_history', $backup_history, $use_cache, 'no');\n\n\t\tif (!$changed) {\n\t\t\n\t\t\t$max_packet_size = $updraftplus->max_packet_size(false, false);\n\t\t\t$serialization_size = strlen(addslashes(serialize($backup_history)));\n\t\t\t\n\t\t\t// Take off the *approximate* over-head of UPDATE wp_options SET option_value='' WHERE option_name='updraft_backup_history'; (no need to be exact)\n\t\t\tif ($max_packet_size < ($serialization_size + 100)) {\n\t\t\t\n\t\t\t\t$max_packet_size = $updraftplus->max_packet_size();\n\t\t\t\t\n\t\t\t\t$changed = UpdraftPlus_Options::update_updraft_option('updraft_backup_history', $backup_history, $use_cache, 'no');\n\t\t\t\t\n\t\t\t\tif (!$changed) {\n\t\t\n\t\t\t\t\t$updraftplus->log('The attempt to write the backup history to the WP database returned a negative code and the max packet size looked small. However, WP does not distinguish between a failure and no change from a previous update, so, this code is not conclusive and if no other symptoms are observed then there is no reason to infer any problem. Info: The updated database packet size is '.$max_packet_size.'; the serialization size is '.$serialization_size);\n\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}", "title": "" }, { "docid": "1370e17e292a20643788f59c3021243c", "score": "0.41665298", "text": "public function neighborhoodCount()\n {\n return House::where('neighborhood_id', $this->neighborhood->id)->count();\n }", "title": "" }, { "docid": "72f33f995d19c9cac8a8b1aa7412359d", "score": "0.41656932", "text": "public static function loadSongHistory()\n\t{\n\t\tini_set(\"allow_url_fopen\", 1);\n\t\t$json = utilphp\\util::getFileContents(Config::SERVICE_HISTORY_LINK);\n\t\t$obj = json_decode($json);\n\t\t\n\t\t$rows = $obj->{'feed'}->{'entry'};\n\t\t$adaptor = GoogleSpreadsheetAdaptorFactory::getInstance()->getServiceAdaptor();\n\t\tforeach($rows as $row) \n\t\t{\n\t\t\t$service = $adaptor->createService($row);\n\t\t\tself::$serviceHistory[] = $service;\n\t\t}\n\t}", "title": "" }, { "docid": "2b165965514b423e7ab500948f94200c", "score": "0.4163776", "text": "public function getHistory()\n {\n if (!$this->history) {\n $this->history = new History();\n }\n return $this->history;\n }", "title": "" }, { "docid": "6da27750334d7cfa97e989944e90eb95", "score": "0.4162849", "text": "private function get_history(/*int*/ $pageNumber) {\n\t\tglobal $config, $database;\n\n\t\tif(is_null($pageNumber) || !is_numeric($pageNumber))\n\t\t\t$pageNumber = 0;\n\t\telse if ($pageNumber <= 0)\n\t\t\t$pageNumber = 0;\n\t\telse\n\t\t\t$pageNumber--;\n\n\n\t\t$historiesPerPage = $config->get_int(\"poolsUpdatedPerPage\");\n\n\t\t$history = $database->get_all(\"\n\t\t\t\tSELECT h.id, h.pool_id, h.user_id, h.action, h.images,\n\t\t\t\t h.count, h.date, u.name as user_name, p.title as title\n\t\t\t\tFROM pool_history AS h\n\t\t\t\tINNER JOIN pools AS p\n\t\t\t\tON p.id = h.pool_id\n\t\t\t\tINNER JOIN users AS u\n\t\t\t\tON h.user_id = u.id\n\t\t\t\tORDER BY h.date DESC\n\t\t\t\tLIMIT :l OFFSET :o\n\t\t\t\t\", array(\"l\"=>$historiesPerPage, \"o\"=>$pageNumber * $historiesPerPage));\n\n\t\t$totalPages = ceil($database->get_one(\"SELECT COUNT(*) FROM pool_history\") / $historiesPerPage);\n\n\t\t$this->theme->show_history($history, $pageNumber + 1, $totalPages);\n\t}", "title": "" }, { "docid": "cd38a5d2456bc7669c09ef2b8666c1ea", "score": "0.4154339", "text": "public function getNumberOfByes() {\n\t\tglobal $wpdb;\n $loc = __CLASS__ . '::' . __FUNCTION__;\n\n $byes = 0;\n $bracketTable = $wpdb->prefix . self::$tablename;\n $eventTable = $wpdb->prefix . \"tennis_event\";\n $matchTable = $wpdb->prefix . \"tennis_match\";\n // $eventId = $this->getEventId();\n // $bracketNum = $this->getBracketNumber();\n \n $sql = \"SELECT count(*)\n from $eventTable as e\n inner join $bracketTable as b on b.event_ID = e.ID\n inner join $matchTable as m on m.event_ID = b.event_ID and m.bracket_num = b.bracket_num \n where m.is_bye = 1 \n and e.ID = %d \n and b.bracket_num = %d;\";\n $safe = $wpdb->prepare( $sql, $this->getEventId(), $this->getBracketNumber() );\n $byes = $wpdb->get_var( $safe );\n\n error_log( sprintf(\"%s(E(%d)B(%d)) -> has %d byes.\", $loc, $this->getEventId(), $this->getBracketNumber(), $byes ) );\n return $byes;\n }", "title": "" }, { "docid": "818d9212ccc04dd9c6059897813feffb", "score": "0.41535616", "text": "public function countFactureEditionHistorys(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collFactureEditionHistorysPartial && !$this->isNew();\n if (null === $this->collFactureEditionHistorys || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collFactureEditionHistorys) {\n return 0;\n }\n\n if ($partial && !$criteria) {\n return count($this->getFactureEditionHistorys());\n }\n $query = FactureEditionHistoryQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByClients($this)\n ->count($con);\n }\n\n return count($this->collFactureEditionHistorys);\n }", "title": "" }, { "docid": "d44017b747c35a47f048779baa4b561f", "score": "0.414977", "text": "public function sessions_count()\n\t{\n\t\treturn count($this->running_sessions);\n\t}", "title": "" }, { "docid": "25553dae3b6a5933f853bc1607eb6253", "score": "0.41470745", "text": "public function getChannelCount();", "title": "" }, { "docid": "4d83e8f3c25b5c592919526e13d62315", "score": "0.41470703", "text": "public function getTransitionHistory()\n\t{\n\t\tif ($this->_transitionHistory === null) {\n\t\t\t$this->_transitionHistory = new CList(array($this->getStateName()));\n\t\t}\n\t\treturn $this->_transitionHistory;\n\t}", "title": "" }, { "docid": "b8bf69c13475b778f4d8cf11ad2f8deb", "score": "0.41407332", "text": "public function historyAction() {\n $this->view->searches = $this->_searches->getAllSearches((int)$this->getIdentityForForms(),\n (int)$this->_getParam('page'));\n }", "title": "" }, { "docid": "af49ed7095a29667425108e41c91117f", "score": "0.41368926", "text": "function modules_history(){\n\t\t// to be used wherever a module is \n\t\t// \ti\tcreated\n\t\t// \tii\tdeleted\n\t\t// etc...\n\t\t\n\t}", "title": "" } ]
6680506fe619298c8d8c9ee29d29039a
Definicion de variables para ejecucion del procedimiento
[ { "docid": "070fae81f7439202922a591a3f63d2ee", "score": "0.0", "text": "function eliminarEvents(){\n\t\t$this->procedimiento='ras.ft_events_ime';\n\t\t$this->transaccion='PB_EVENT_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','id','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}", "title": "" } ]
[ { "docid": "3553a0a9b03e8a6684ceaf1fa9876063", "score": "0.673534", "text": "function procesarVariables() {\r\n $propiedades = get_object_vars($this->data);\r\n foreach ($propiedades as $k => $value) {\r\n $this->$k = $this->data->$k;\r\n }\r\n }", "title": "" }, { "docid": "84f6e14f1cab8f9afd650f15e5b3c776", "score": "0.6701386", "text": "public function setup_variables() {\n\n\t}", "title": "" }, { "docid": "882484f78f404cb57e30b11e48cda2b0", "score": "0.64404017", "text": "public function __construct()\n {\n $this->_set_variables();\n }", "title": "" }, { "docid": "5db92f2d1d8720deec555e4bb4c6bfe3", "score": "0.6409462", "text": "public function initVars()\n {\n $this->listaCarreras = carrera::getListacarrera();\n $this->listaEstudiantes = ModelosEstudiantes::getListaestudiantes();\n $this->setVar('listaEstudiantes', $this->listaEstudiantes);\n $this->setVar('listaCarreras', $this->listaCarreras);\n }", "title": "" }, { "docid": "d74ff2200f6c28e7e27c1998be8daa65", "score": "0.63514125", "text": "public function __construct() {\n $conf= CargaConfiguracion::getInstance('');\n clNavegacion::cargaParametros();\n }", "title": "" }, { "docid": "efae390e65da2a502f8ebba83a619917", "score": "0.63292223", "text": "public function setVariables(){\n\t\t// Initial sample storage data\n\t\t$this->input = array(\n\t\t\t\n\t\t\t'unit-of-issue' => '100mgs',\n\t\t\t'description' => 'issued in 100mg sachets',\n\t\t\t\n\t\t\t\n\t\t);\n\n\t\t// Edition sample data\n\t\t$this->inputUpdate = array(\n\t\t\t\n\t\t\t'unit-of-issue' => '100mgs',\n\t\t\t'description' => 'issued in 100mg sachets',\n\t\t\t\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "0b98a175f384ad1c028cf72cf4f8efa7", "score": "0.6270692", "text": "public function setVariables(){\n\t\t// Initial sample storage data\n\t\t$this->input = array(\n\t\t\t\n\t\t\t'name' => 'gloves',\n\t\t\t'description' => 'large size',\n\t\t\t'unit_of_issue' => '1',\n\t\t\t'unit_price' => '250.00',\n\t\t\t'item_code' => '7883',\n\t\t\t'storage_req' => 'dry place',\n\t\t\t'min_level' => '100',\n\t\t\t'max_level' => '5000',\n\t\t\t\n\t\t);\n\n\t\t// Edition sample data\n\t\t$this->inputUpdate = array(\n\t\t\t\n\t\t\t'name' => 'gloves',\n\t\t\t'description' => 'large size',\n\t\t\t'unit_of_issue' => '1',\n\t\t\t'unit_price' => '250.00',\n\t\t\t'item_code' => '7883',\n\t\t\t'storage_req' => 'dry place',\n\t\t\t'min_level' => '100',\n\t\t\t'max_level' => '5000',\n\t\t\t\t\t\t\n\t\t);\n\t}", "title": "" }, { "docid": "6e82aff3ab7947238e45b84dcf2d425e", "score": "0.62207043", "text": "private function inicializarParametros() {\r\n\r\n //Verifica se os parametro existem, senão iniciliza todos\r\n\t\t$this->view->parametros->dataInicial = isset($this->view->parametros->dataInicial) ? $this->view->parametros->dataInicial : \"\" ;\r\n $this->view->parametros->dataFinal = isset($this->view->parametros->dataFinal) ? $this->view->parametros->dataFinal : \"\" ;\r\n\r\n }", "title": "" }, { "docid": "6c184f583661eecb8dbe781e95477b78", "score": "0.6186629", "text": "function cl_proced() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"proced\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "1b41d6a4864f8877c041f0c44724b06d", "score": "0.61761487", "text": "function formPasoVariables() {\n $esteBloque = $this->miConfigurador->getVariableConfiguracion(\"esteBloque\");\n // ------------------- SECCION: Paso de variables ------------------------------------------------\n\n /**\n * En algunas ocasiones es útil pasar variables entre las diferentes páginas. SARA permite realizar esto a través de tres\n * mecanismos:\n * (a). Registrando las variables como variables de sesión. Estarán disponibles durante toda la sesión de usuario. Requiere acceso a\n * la base de datos.\n * (b). Incluirlas de manera codificada como campos de los formularios. Para ello se utiliza un campo especial denominado\n * formsara, cuyo valor será una cadena codificada que contiene las variables.\n * (c) a través de campos ocultos en los formularios. (deprecated)\n */\n //En este formulario se utiliza el mecanismo (b) para pasar las siguientes variables:\n // Paso 1: crear el listado de variables\n\n $valorCodificado = \"idUsario=\" . $esteBloque [\"grupo\"];\n /**\n * SARA permite que los nombres de los campos sean dinámicos. Para ello utiliza la hora en que es creado el formulario para\n * codificar el nombre de cada campo. Si se utiliza esta técnica es necesario pasar dicho tiempo como una variable:\n * (a) invocando a la variable $_REQUEST ['tiempo'] que se ha declarado en ready.php o\n * (b) asociando el tiempo en que se está creando el formulario\n */\n $valorCodificado .= \"&tiempo=\" . time();\n //Paso 2: codificar la cadena resultante\n $valorCodificado = $this->miConfigurador->fabricaConexiones->crypto->codificar($valorCodificado);\n\n\n $atributos [\"id\"] = \"formSaraData\"; // No cambiar este nombre\n $atributos [\"tipo\"] = \"hidden\";\n $atributos ['estilo'] = '';\n $atributos [\"obligatorio\"] = false;\n $atributos ['marco'] = true;\n $atributos [\"etiqueta\"] = \"\";\n $atributos [\"valor\"] = $valorCodificado;\n echo $this->miFormulario->campoCuadroTexto($atributos);\n unset($atributos);\n\n // ----------------FIN SECCION: Paso de variables -------------------------------------------------\n }", "title": "" }, { "docid": "621a6bd55c82b20b87fded873cd72f6b", "score": "0.6149033", "text": "function cl_empageconfche() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empageconfche\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "51d4a2944fb7f1afcfbb8def11dea4aa", "score": "0.6136965", "text": "public function __construct() {\n // On met en place l'accès à la variable globale\n global $Extra;\n // On créé la référence\n $this->Extra = $Extra;\n }", "title": "" }, { "docid": "b1f7b303e6c5d09375af450bcda6787d", "score": "0.6136046", "text": "function cl_proctransferworkflowativexec() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"proctransferworkflowativexec\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "5a379c7022806a16baadb377361e919f", "score": "0.60994804", "text": "function inicializar_vars() {\n\tglobal $nombre, $dni, $localidad;\t\t\n $nombre=$dni=$localidad=\"\"; \n}", "title": "" }, { "docid": "6415722395fd67513a1f58c4d4c6a7a5", "score": "0.6097431", "text": "static public function obterPotencia(){\n \n \n \n }", "title": "" }, { "docid": "88b030ec05ee12c69e2bb6dae1e35bdd", "score": "0.6066596", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->cuenta=$_POST['cuenta'];\n\t\t$this->numero=$_POST['numero'];\n\t\t$this->titular=$_POST['titular'];\n\t\t$this->rif=$_POST['rif'];\n\t}", "title": "" }, { "docid": "0685a7f52d1cf211c1050e23d9d60439", "score": "0.6063656", "text": "function cl_processoforo() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"processoforo\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "48e714620d5c895a68e289b345fde962", "score": "0.6056645", "text": "protected function varSetup(){\n \t//Setup ID\n\t\t$this->setID($this->getInputString(\"id\", -1, \"G\"));\n\t\t\n\t\t//Set Page request\n\t\t$this->setPageRequest($this->getInputString(\"page\", \"\", \"G\")); \n }", "title": "" }, { "docid": "ca9eb22bfbbc7ac8ec3027895d497738", "score": "0.60379", "text": "public function __construct()\n {\n /*\n * Define variables as array\n */\n $this->vars = array();\n }", "title": "" }, { "docid": "4fc9ba067680923644c580c5bdecd297", "score": "0.6019924", "text": "public function init_variables(){\n parent::init_variables();\n //if you want to force any variables put it after the parent function\n }", "title": "" }, { "docid": "d066ddf36c9865ae3656fbee1432ebe6", "score": "0.6015321", "text": "private function __construct()\n {\n $this->variables = [];\n }", "title": "" }, { "docid": "0fabaa4d8f5c475fba9112cd564f144b", "score": "0.5965142", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "0fabaa4d8f5c475fba9112cd564f144b", "score": "0.5965142", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source = $data_source;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "9615e623b49b14f6d702035fa67dcdf3", "score": "0.5963081", "text": "function cl_procjur() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procjur\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "fdd33e65ca4b5af9dd0722852d91d0b1", "score": "0.59609705", "text": "protected function initVars() {\n\t\t\t$this->auth \t\t\t= 0;\n\t\t\t$this->acct \t\t\t= 0;\n\t\t\t$this->tipo_conta\t\t= \"\";\n\t\t\t\n\t\t\t$this->rc \t\t\t\t= 0;\n\t\t\t$this->rcup \t\t\t= 0;\n\t\t\t$this->rcdown \t\t\t= 0;\n\t\t\t\n\t\t\t$this->username \t\t= \"\";\n\t\t\t$this->password \t\t= \"\";\n\t\t\t$this->foneinfo \t\t= \"\";\n\t\t\t\n\t\t\t$this->entrada \t\t\t= 0;\n\t\t\t$this->saida \t\t\t= 0;\n\t\t\t$this->session \t\t\t= \"\";\n\t\t\t$this->bytes_in\t\t \t= \"\";\n\t\t\t$this->bytes_out \t\t= \"\";\n\t\t\t$this->nas \t\t\t\t= \"\";\n\t\t\t$this->ip_addr \t\t\t= \"\";\n\t\t\t$this->tempo \t\t\t= \"\";\n\t\t\t$this->terminate_cause \t= \"\";\n\t\t\n\t\t}", "title": "" }, { "docid": "30800dfca813a4433cd63302792bdc40", "score": "0.5948135", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "30800dfca813a4433cd63302792bdc40", "score": "0.5948135", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $data_source;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($data_source)) {\n $this->data_source=$data_source;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "3a07e501c5cf9e3e2b78d5791fdbb601", "score": "0.59322774", "text": "public function setVariables()\n {\n\t\t// Initial sample storage data\n\t\t$this->organismData = array(\n\t\t\t'name' => 'Enterococcus spp.',\n\t\t\t'description' => 'Grams known',\n\t\t\t'drugs' => ['12']\n\t\t);\n\n\t\t// Edition sample data\n\t\t$this->organismDataUpdate = array(\n\t\t\t'name' => 'Enterococcux species',\n\t\t\t'description' => 'Gram identifiable',\n\t\t\t'drugs' => ['12']\n\t\t);\n }", "title": "" }, { "docid": "5eb3594f576aefed36bf329136aa9cc0", "score": "0.59279895", "text": "private function setInitValues ( ) {\r\n \r\n /** crea l'objecte usuari */\r\n $this->model = new usuari ( );\r\n \r\n /** crea l'objecte paraula de pas */\r\n $this->modelParaula = new paraulapas ( );\r\n\r\n }", "title": "" }, { "docid": "99f92cfc1c21b4dbe24d4f1fd2695e1a", "score": "0.5915936", "text": "function asignar_valores(){\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->fecha=$_POST['fecha'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t}", "title": "" }, { "docid": "1ea75f8db279d10a5feedbdc9b00dd35", "score": "0.59102255", "text": "public function __construct(){\r\n$this->acCodigo = \"\";\r\n$this->acFecha_salida = \"\";\r\n$this->acCedula_personal = \"\";\r\n$this->acNro_solicitud = \"\";\r\n$this->acFecha_solicitud = \"\";\r\n$this->acObservacion = \"\";\r\n$this->unidad = \"\";\r\n}", "title": "" }, { "docid": "9910d1d2e511d681e349f69d9f612369", "score": "0.5907633", "text": "public function assignPageVariables(){\r\n }", "title": "" }, { "docid": "5d9ea3323d524905300518b990cce2b7", "score": "0.5888131", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n\n if (isset($id)) {\n $this->id = $id;\n }\n\n if (isset($mode)) {\n $this->mode = $mode;\n }\n\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "70b8cb9aaa65f31e33cea39660978469", "score": "0.5885174", "text": "function __construct() { \n\t\t\t$this->id_boleto;\n\t\t\t$this->id_pagamento_boleto;\n\t\t\t$this->nosso_numero_boleto;\n\t\t\t$this->nosso_numero_cnab_boleto;\n\t\t\t$this->dt_emissao_boleto;\n\t\t\t$this->dt_vencimento_boleto;\n\t\t\t$this->valor_boleto;\n\t\t\t$this->especie_boleto;\n\t\t\t$this->aceite_boleto;\n\t\t\t$this->cod_protesto_boleto;\n\t\t\t$this->prazo_protesto_boleto;\n\t\t\t$this->num_parcela_boleto;\n\t\t\t$this->cod_moeda_boleto;\n\t\t\t$this->informacao_boleto_3;\n\t\t\t$this->informacao_boleto_4;\n\t\t\t$this->informacao_boleto_5;\n\t\t\t$this->informacao_boleto_6;\n\t\t\t$this->informacao_boleto_7;\n\t\t\t$this->id_lote;\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "7abee1f29319dc9f7596835f37b66f4b", "score": "0.58830255", "text": "public function __construct()\n {\n $this->demo_variable = 'Demo variable value';\n }", "title": "" }, { "docid": "ed2a41dda7acff9c4e684327f4ee7d4c", "score": "0.58808696", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "ed2a41dda7acff9c4e684327f4ee7d4c", "score": "0.58808696", "text": "function getParams()\n {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id = $id;\n }\n if (isset($mode)) {\n $this->mode = $mode;\n }\n if (isset($view_mode)) {\n $this->view_mode = $view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode = $edit_mode;\n }\n if (isset($tab)) {\n $this->tab = $tab;\n }\n }", "title": "" }, { "docid": "c77ec98819982e0ee0adbffa5afb7690", "score": "0.58618087", "text": "function profilo(){\n\t\tforeach($_GET as $k=>$v){\n\t\t\t$this->$k = $v;\n\t\t}\n\t\t$this->standard_layout = true;\n\t\t$this->title = \"Area Riservata\";\n\t\t$this->db = new DBConn();\n\t\t$this->color = \"#F60\";\n\t\t$this->cerca = false;\n\t\t$this->auth = array('profilo');\n\t}", "title": "" }, { "docid": "eb436101f3ea73db8313a7c38e1c2c6c", "score": "0.58502173", "text": "private function initialize_variables() {\n\t $this->results = array();\n\t $this->message = '';\n }", "title": "" }, { "docid": "6175ad7a3253a88998db38312db7311c", "score": "0.58314514", "text": "public function __construct()\n {\n // Se instancia la clase de configuración.\n $this->_config = new Config();\n // Se instancia la clase de funciones utiles.\n $this->_util = new Util();\n // Se instancia la clase de Ws de Minerva.\n $this->_minerva = new Minerva();\n\n $this->respuesta = \"\";\n $this->estadoMinerva = \"\";\n $this->result = \"\";\n $this->respCommand = \"\";\n $this->urlLog = \"\";\n $this->urlLog = $this->_config->urlLog;\n $this->otherServices = array();\n }", "title": "" }, { "docid": "2f80eb83e7e78294b59361616661f6a8", "score": "0.5830367", "text": "public function __construct(){\n $this->conexion=null;\n $this->ultimosRegistros=null;\n $this->baseDeDatos=\"No Definida\";\n }", "title": "" }, { "docid": "f121e21f29f9c064720d50fef98ac96a", "score": "0.5825595", "text": "function __construct() {\n $this->user = \"user\";\n $this->view = new View(); //instanciate it here as every controller passes through this \n $this->enrypter = array(525250.22,625315.14,825020.24,4253290.34,125345.54);\n \n }", "title": "" }, { "docid": "7799306271c9914e6fa939d0c5435145", "score": "0.58175015", "text": "abstract protected function prepareVars();", "title": "" }, { "docid": "c7ce87e48580c70084a61d34a7945f28", "score": "0.581644", "text": "public function __construct(protected string $nombre, public int $precio, public bool $disponible)\n { \n }", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "11143a54d33c3d04df7bf1f86f4e37d7", "score": "0.5810328", "text": "function getParams() {\n global $id;\n global $mode;\n global $view_mode;\n global $edit_mode;\n global $tab;\n if (isset($id)) {\n $this->id=$id;\n }\n if (isset($mode)) {\n $this->mode=$mode;\n }\n if (isset($view_mode)) {\n $this->view_mode=$view_mode;\n }\n if (isset($edit_mode)) {\n $this->edit_mode=$edit_mode;\n }\n if (isset($tab)) {\n $this->tab=$tab;\n }\n}", "title": "" }, { "docid": "bb5428b547f7ccaa9167dcf3b078a4ed", "score": "0.5804813", "text": "function __construct() { \n\t\t\t$this->id_comentario;\n\t\t\t$this->fk_forum;\n\t\t\t$this->fk_usuario;\n\t\t\t$this->comentario;\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "e19e5e6cf9f7be4081f6e067dd8eb67b", "score": "0.5794005", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "title": "" }, { "docid": "e19e5e6cf9f7be4081f6e067dd8eb67b", "score": "0.5794005", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n }", "title": "" }, { "docid": "0fd037b90733fddfedb530c51a102e43", "score": "0.5773521", "text": "public function __construct()\n {\n $this->idFuncion = 0;\n $this->nombreFuncion = \"\";\n $this->precioFuncion = \"\";\n $this->horaDeInicio = \"\";\n $this->duracionFuncion = \"\";\n $this->objTeatro = \"\";\n }", "title": "" }, { "docid": "789e6382115181c071962e48bac58aa0", "score": "0.5771125", "text": "public function __construct(){\r\n $url = $this->getUrl();\r\n\r\n // Verificar en controladores si el archivo con el nombre del controlador existe\r\n if(file_exists('../app/Controladores/'. ucwords($url[0]) .'.php')){\r\n // Si existe se setea como controlador porm defecto\r\n $this->controladorActual = ucwords($url[0]);\r\n\r\n // unset del indice 0, para desmontar el controlador\r\n unset($url[0]);\r\n }\r\n\r\n // requerir el controlador\r\n require_once '../app/controladores/'. $this->controladorActual .'.php';\r\n $this->controladorActual = new $this->controladorActual;\r\n\r\n // Verificar la segunda parte de la url, el MÉTODO\r\n if(isset($url[1])){\r\n if(method_exists($this->controladorActual, $url[1])){\r\n // Chequeamos el método\r\n $this->metodoActual = $url[1];\r\n unset($url[1]);\r\n }\r\n }\r\n // echo para probar el método actual\r\n // echo $this->metodoActual;\r\n\r\n // obtener los parámetros\r\n $this->parametros = $url ? array_values($url) : [];\r\n\r\n // llamar callback con parámetros array\r\n call_user_func_array([$this->controladorActual,$this->metodoActual], $this->parametros);\r\n }", "title": "" }, { "docid": "d2a243ad8a63d04e84e459769cc42443", "score": "0.576913", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->model->{$this->valueFrom};\n\n // Set the requested template in a variable;\n $this->requestTemplate = $this->loadTemplate($this->vars['value']);\n if(!$this->requestTemplate)\n throw new \\Exception(sprintf('A unexpected error has occurred. The template slug is invalid.'));\n\n // Set a second variable with request data from database\n $template = $this->requestTemplate->attributes;\n if(!$template)\n throw new \\Exception(sprintf('A unexpected error has occurred. Erro while trying to get a non-object property.'));\n\n $this->vars['template'] = $template;\n }", "title": "" }, { "docid": "4eba063e7dfe2d993ef4ee86ca89996b", "score": "0.5761024", "text": "public function __construct() //Metodo magico\n {\n $this->nombre = \"\";\n $this->apellido = \"\";\n }", "title": "" }, { "docid": "77a16cb6b6d81bca763f24dbebde3afd", "score": "0.57566917", "text": "protected function getParams(): void \n {\n $params = require_once CONF . '/params.php';\n \n if (!empty($params)&& is_array($params)) {\n \n foreach ($params as $key => $value) {\n self::$app->setProperty($key, $value);\n }\n \n }\n }", "title": "" }, { "docid": "c44854512f18fb1816bb916dec011f78", "score": "0.5753663", "text": "protected function ReceiveParameters()\n\t\t{\n\t\t\t$this->Function = strtolower($_REQUEST[\"function\"]);\n\t\t\t$this->Tid = $this->GetParameter(\"tid\");\n\t\t\t$this->Custom = $this->GetParameter(\"custom\");\n\t\t\t$this->Prodid = $this->GetParameter(\"prodid\");\n\t\t\t$this->Pid = $this->GetParameter(\"pid\");\n\t\t\t$this->Dsignature = $this->GetParameter(\"dsignature\");\n\t\t}", "title": "" }, { "docid": "0cb714bcadd1bd178465bba7969bbd59", "score": "0.5745824", "text": "public function loadParams()\n {\n $this->params = \\OWeb\\OWeb::getInstance()->get_get();\n }", "title": "" }, { "docid": "84ce9a14f8bb3a4dcb7c66b0c7bf9b4b", "score": "0.5733667", "text": "public function __construct() {\n $this->ajaxController = new \\controllers\\ajaxController();\n $this->mantenimientosClass = new models\\MantenimientosClass();\n }", "title": "" }, { "docid": "bf0c0adbf6ab88e590c4668f42a5d4f9", "score": "0.5730231", "text": "public function __construct()\n\t{\n\t\t//$this->tipo = 'prod' ;\n\t\t//$this->tipo = 'paralelo' ;\n\t\t$this->tipo = 'respaldo' ;\n\t}", "title": "" }, { "docid": "8a6304be838346cc118a243108b5c15f", "score": "0.5727589", "text": "public function __construct( ){\n\t\t$this->message = \"Erro no tipo de variavel\";\n\t}", "title": "" }, { "docid": "8600a80d1f86f57e6ccd979a4cb3134c", "score": "0.57143253", "text": "function cl_pontoparada() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pontoparada\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f4caa50ca62df61a13990cdd0938cd74", "score": "0.570925", "text": "function cl_empord() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empord\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8b6eadf1b584e69d23dd62f62954a1fa", "score": "0.57074827", "text": "function __construct() { \n\t\t\t$this->id_mercadoria;\n\t\t\t$this->mercadoria;\n\t\t\t$this->descricao;\n\t\t\t$this->fornecedor;\n\t\t\t$this->cnpj_fornecedor;\n\t\t\t$this->quantidade;\n\t\t\t$this->quantidade_min;\n\t\t\t$this->valor;\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "2ae3ca6e41e5896ac3d02e2678549cef", "score": "0.57045925", "text": "function getParams() {\r\n global $id;\r\n global $mode;\r\n global $view_mode;\r\n global $edit_mode;\r\n global $tab;\r\n if (isset($id)) {\r\n $this->id=$id;\r\n }\r\n if (isset($mode)) {\r\n $this->mode=$mode;\r\n }\r\n if (isset($view_mode)) {\r\n $this->view_mode=$view_mode;\r\n }\r\n if (isset($edit_mode)) {\r\n $this->edit_mode=$edit_mode;\r\n }\r\n if (isset($tab)) {\r\n $this->tab=$tab;\r\n }\r\n}", "title": "" }, { "docid": "a37d76f0af077dda7f904b838d5f43b5", "score": "0.56906515", "text": "private function assignControllerInfo()\n {\n $this->assign('module', $this->module);\n $this->assign('class', $this->class);\n $this->assign('event', $this->event);\n }", "title": "" }, { "docid": "42eb4a879344581b07c71415e0f22d54", "score": "0.56847394", "text": "public function request(){ \n //Cargo el modulo correspondiente en base al tipo de requerimiento\n if(ENOLA_MODE == 'HTTP'){\n //Cargo el modulo Http\n $this->loadHttpModule();\n }else{\n //Cargo el modulo Cron\n $this->loadCronModule();\n } \n //Luego de la carga de todos los modulos creo una instancia de Support\\View\n $this->view= new Support\\View();\n //Cargo la configuracion del usuario\n $this->loadUserConfig();\n //Analizo si estoy en modo HTTP o CLI\n if(ENOLA_MODE == 'HTTP'){\n //Ejecuto el controlador correspondiente\n $this->httpCore->executeHttpRequest();\n }else{\n //Ejecuta el cron controller\n $this->cronCore->executeCronController();\n } \n }", "title": "" }, { "docid": "c432fb2c903917c0dd423c5b3db8bcab", "score": "0.5682112", "text": "public function __construct(){\n$this->acRif = \"\";\n$this->acRazon_social = \"\";\n$this->acCodigo_tipo_proveedor = \"\";\n$this->acDireccion = \"\";\n$this->acCodigo_area = \"\";\n$this->acTelefono = \"\";\n$this->acCodigo_dominio_correo = \"\";\n$this->acCorreo = \"\";\n}", "title": "" }, { "docid": "ffd1b15e9689a213ab0ebd022f893e14", "score": "0.56820256", "text": "public function prepareVars()\n {\n $this->vars['inputType'] = $this->pattern;\n $this->vars['name'] = $this->formField->getName();\n $this->vars['table'] = $this->table;\n $this->vars['model'] = $this->model;\n $this->vars['value'] = $this->getLoadValue();\n }", "title": "" }, { "docid": "416e97fff7bb4714a16f797deb915bb1", "score": "0.56765586", "text": "function cl_prontuarios() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"prontuarios\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "ba4e0e12cf6713361d461a25c599588f", "score": "0.567447", "text": "function cl_orcparamrelnota() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcparamrelnota\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "37cf3979076bdd70453238b4f35c447b", "score": "0.5670831", "text": "public function operateParams()\n {\n //$this->assign(\"params\", $setting);\n\n $this->display();\n }", "title": "" }, { "docid": "3e5873481628b400e84f2b0f13aa16f4", "score": "0.5656981", "text": "function __construct()\n\t\t{\n\t\t\t$this->personaModelo = $this->modelo('Persona');\n\t\t\t$this->fincaModelo = $this->modelo('Finca');\n\n\t\t\t$this->UbicacionModelo = $this->modelo('Ubicacion');\n\t\t\t\n\t\n\t\t}", "title": "" }, { "docid": "e20c68e4a47744950cc3d96e230f1022", "score": "0.56377107", "text": "function __construct( $nombre , $talla , $precio )\n {\n // asigno el valor que se pase por parametro a cada una de las instancias de las propiedades\n $this->nombre = $nombre;\n $this->talla = $talla;\n $this->precio = $precio;\n \n // echo \"***Se creo un contructor *** \\n\"; \n \n }", "title": "" }, { "docid": "b376520208ff3e6f2c56fecbdc99b52a", "score": "0.5634646", "text": "protected function initiate() {}", "title": "" }, { "docid": "793192b7cc6dbbbd54361520d803b5ef", "score": "0.5625858", "text": "function cl_parjuridico() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"parjuridico\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "050e904dbb38e1fee88fafc096c20f25", "score": "0.56222314", "text": "public function prepareVars()\n {\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n\n $this->project = $this->vars['project'] = $this->controller->vars['formModel'];\n\n $this->vars['options'] = $this->getOptions();\n }", "title": "" }, { "docid": "773e79ccffee5fc0b2c4c007d7fb2990", "score": "0.5621191", "text": "private function inicializarParametros() {\r\n \r\n //Verifica se os parametro existem, senão iniciliza todos\r\n\t\t$this->view->parametros->gmeoid = isset($this->view->parametros->gmeoid) ? $this->view->parametros->gmeoid : \"\" ; \r\n $this->view->parametros->gmeano = isset($this->view->parametros->gmeano) ? trim($this->view->parametros->gmeano) : (intval(date('Y')) < 2014 ? '2014' : date(Y));\r\n $this->view->parametros->filtro_gmeano = isset($this->view->parametros->filtro_gmeano) ? trim($this->view->parametros->filtro_gmeano) : (intval(date('Y')) < 2014 ? '2014' : date(Y));\r\n $this->view->parametros->gmenome = isset($this->view->parametros->gmenome) ? trim($this->view->parametros->gmenome) : '';\r\n $this->view->parametros->filtro_cargo = isset($this->view->parametros->filtro_cargo) ? trim($this->view->parametros->filtro_cargo) : '';\r\n $this->view->parametros->gmefunoid_responsavel = isset($this->view->parametros->gmefunoid_responsavel) ? trim($this->view->parametros->gmefunoid_responsavel) : '';\r\n $this->view->parametros->gmetipo = isset($this->view->parametros->gmetipo) ? trim($this->view->parametros->gmetipo) : 'M';\r\n $this->view->parametros->gmemetrica = isset($this->view->parametros->gmemetrica) ? trim($this->view->parametros->gmemetrica) : 'P';\r\n $this->view->parametros->gmepeso = isset($this->view->parametros->gmepeso) ? trim($this->view->parametros->gmepeso) : 0;\r\n $this->view->parametros->gmeprecisao = isset($this->view->parametros->gmeprecisao) ? trim($this->view->parametros->gmeprecisao) : 0;\r\n $this->view->parametros->gmedirecao = isset($this->view->parametros->gmedirecao) ? trim($this->view->parametros->gmedirecao) : 'D';\r\n $this->view->parametros->gmeformula = isset($this->view->parametros->gmeformula) ? trim($this->view->parametros->gmeformula) : '';\r\n $this->view->parametros->filtro_gmeoid = isset($this->view->parametros->filtro_gmeoid) ? trim($this->view->parametros->filtro_gmeoid) : '';\r\n\r\n \r\n $this->view->parametros->listarMetas = array();\r\n //if (isset($_POST['gmeano']) && !empty($_POST['gmeano'])) {\r\n $this->view->parametros->listarMetas = $this->dao->buscarNomeMetas($this->view->parametros->gmeano);\r\n //}\r\n\r\n $this->view->parametros->listarCargos = $this->dao->buscarCargos();\r\n\r\n $this->view->parametros->listarFuncionarios = $this->dao->buscarFuncionarios($this->view->parametros->gmeoid, '','','');\r\n $this->view->parametros->listarFuncionariosCadastro = $this->dao->buscarFuncionarios('','', '',$this->view->parametros->gmeano);\r\n $this->view->parametros->listarFuncionariosCadastroCompartilhamento = $this->dao->buscarFuncionarios('','', $this->view->parametros->gmefunoid_responsavel,$this->view->parametros->gmeano);\r\n \r\n $this->view->parametros->listarTipos = array(\r\n 'D' => 'Diário',\r\n 'M' => 'Mensal',\r\n 'B' => 'Bimestral',\r\n 'T' => 'Trimestral',\r\n 'Q' => 'Quadrimestral',\r\n 'S' => 'Semestral',\r\n 'A' => 'Anual'\r\n );\r\n\r\n $this->view->parametros->listarMetricas = array(\r\n 'V' => 'Vlr',\r\n 'P' => '%',\r\n 'M' => '$'\r\n );\r\n\r\n $this->view->parametros->listarDirecoes = array(\r\n 'D' => 'Diretamente',\r\n 'I' => 'Inversamente'\r\n );\r\n\r\n $this->view->parametros->listarIndicadores = $this->dao->buscarIndicadores($this->view->parametros->gmetipo);\r\n \r\n $this->view->recarregarArvore = !isset($_GET['recarregarArvore']) ? false : (intval($_GET['recarregarArvore']) == 1);\r\n \r\n\r\n }", "title": "" }, { "docid": "8c348c9bed73a417ad2c48fe9d14c267", "score": "0.5620723", "text": "protected function assign_vars()\n\t{\n\t\t$this->contrib->assign_details(true);\n\t\t$this->display->assign_global_vars();\n\t\t$this->generate_navigation('faq');\n\t\t$this->generate_breadcrumbs();\n\t}", "title": "" }, { "docid": "5dae34d6e4fd2918cc77bfc55bab465b", "score": "0.5618307", "text": "function cl_msgaviso() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"msgaviso\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "1a8ba2d3477e68d9f42bb01c2f52a254", "score": "0.5618013", "text": "function usuarios_niveles_datos()\n\t{\n\n\t\tparent::objeto();\n\n\t\t$this->tabla=\"usuarios_niveles\";\n\t\t$this->campoClave=\"Id\";\n\t\t$this->id=null;\n\t\t\n\t\t\n$v=new Variable(2,$this->tabla,\"Id\",1);\n\t\t\t\n$v->clave=true;\n\t\t\t\n\t\t\t\n$v->autonumerica=true;\n\t\t\t\n$this->agregarVariable2($v);\n$v=new Variable(1,$this->tabla,\"Nivel\",2);\n$this->agregarVariable2($v);\n\n\t}", "title": "" }, { "docid": "995d082f5759511df2b8d68e41bbaa42", "score": "0.5617255", "text": "protected function gatherParameters()\n {\n $this->class_name = $this->argument('class_name');\n\n // If you didn't input the name of the class\n if (!$this->class_name) {\n $this->class_name = $this->ask('Enter class name');\n }\n\n // Convert to studly case\n $this->class_name = Str::studly($this->class_name);\n }", "title": "" }, { "docid": "5f0baab64aa74deee41e544ba816b52e", "score": "0.5611017", "text": "public function prepareVars()\n {\n $this->prepareBlocks();\n $this->vars['placeholder'] = $this->placeholder;\n $this->vars['name'] = $this->formField->getName();\n $this->vars['value'] = $this->getLoadValue();\n $this->vars['model'] = $this->model;\n $this->vars['toolSettings'] = e(json_encode($this->toolSettings));\n $this->vars['scripts'] = $this->scripts;\n }", "title": "" }, { "docid": "2d594e45a770490a9611521b313ca114", "score": "0.56039494", "text": "function __construct(){\n\t\t$this->departamento = 100;\n\t\t$this->municipio = 101;\n\t}", "title": "" }, { "docid": "cac5e1cdfd8b6116a19178b26646b945", "score": "0.55993354", "text": "function asignar_valores(){\n\t\t$this->codigo=$_POST['codigo'];\n\t\t$this->nombre=$_POST['nombre'];\n\t\t$this->categoria=$_POST['categoria'];\n\t\t$this->subcategoria=$_POST['subcategoria'];\n\t\t$this->prioridad=$_POST['prioridad'];\n\t\t$this->detal=$_POST['detal'];\n\t\t$this->mayor=$_POST['mayor'];\n\t\t$this->limite=$_POST['limite'];\n\t\t$this->descripcion=$_POST['descripcion'];\n\t\t$this->estado=$_POST['estado'];\n\t}", "title": "" }, { "docid": "e671e91a5e9b99b0547e2fc7af6c77c2", "score": "0.55958825", "text": "public function setDataFromConsoling()\n {\n $this->data->put('driver', $this->ask('数据库引擎(mysql/pgsql/sqlite):'));\n if (in_array($this->data->get('driver'), [\n 'mysql',\n 'pgsql',\n ])) {\n $this->data->put('database_host', $this->ask('数据库服务器:'));\n $this->data->put('database', $this->ask('数据库名:'));\n $this->data->put('database_username', $this->ask('数据库用户名:'));\n $this->data->put('database_password', $this->ask('数据库密码:'));\n }\n $this->data->put('database_prefix', $this->ask('数据库表前缀:'));\n $this->data->put('admin_account', $this->ask('管理员帐号:'));\n $this->data->put('admin_password', $this->ask('管理员密码:'));\n $this->data->put('admin_password_confirmation', $this->ask('重复密码:'));\n $this->data->put('admin_email', $this->ask('电子邮箱:'));\n $this->data->put('website', $this->ask('网站标题:'));\n $this->info('所填写的信息是:');\n $this->info('数据库引擎:' . $this->data->get('driver'));\n if (in_array($this->data->get('driver'), [\n 'mysql',\n 'pgsql',\n ])) {\n $this->info('数据库服务器:' . $this->data->get('database_host'));\n $this->info('数据库名:' . $this->data->get('database'));\n $this->info('数据库用户名:' . $this->data->get('database_username'));\n $this->info('数据库密码:' . $this->data->get('database_password'));\n }\n $this->info('数据库表前缀:' . $this->data->get('database_prefix'));\n $this->info('管理员帐号:' . $this->data->get('admin_account'));\n $this->info('管理员密码:' . $this->data->get('admin_password'));\n $this->info('重复密码:' . $this->data->get('admin_password_confirmation'));\n $this->info('电子邮箱:' . $this->data->get('admin_email'));\n $this->info('网站标题:' . $this->data->get('website'));\n $this->isDataSetted = true;\n }", "title": "" }, { "docid": "6e3cf1fba4e2b540da3f6f398230b686", "score": "0.55949837", "text": "public function __construct() {\n self::checaDependencias();\n }", "title": "" }, { "docid": "2cf4130f569e6e277d36383ec22c3e8c", "score": "0.5574323", "text": "function resumen(){\n echo '**********************' . PHP_EOL;\n echo '**** FUNCION DE CLASE ****' . PHP_EOL;\n echo $this->nombre . PHP_EOL;\n echo $this->talla . PHP_EOL;\n echo $this->precio . PHP_EOL;\n }", "title": "" }, { "docid": "b3ee52097028260ba55cafe5374d9c2b", "score": "0.5571414", "text": "function cl_pcorcamjulg() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"pcorcamjulg\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "0084b078f7fde40bb50708ff03f7d403", "score": "0.55689484", "text": "function cl_assentamentosubstituicao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"assentamentosubstituicao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "48fdfa490dddbef28fe0b568e3c37ae1", "score": "0.5566852", "text": "public function ejecutar(){\n }", "title": "" }, { "docid": "07837cecee9f8d29ac800f127420c946", "score": "0.5565789", "text": "public function __construct(){\r\n$this->acRif = \"\";\r\n$this->acRazon_social = \"\";\r\n$this->acCodigo_ciudad = \"\";\r\n$this->acDireccion = \"\";\r\n$this->acCorreo = \"\";\r\n$this->acTelefono = \"\";\r\n}", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.55536866", "text": "protected function setup() {}", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.55536866", "text": "protected function setup() {}", "title": "" }, { "docid": "4bfaf7586e527d6c57e817346bd6e83c", "score": "0.55503625", "text": "function __construct()\n {\n $this->criterion = $this->getCriterion();\n $this->frontend = $this->getFrontend();\n $this->identification = $this->getIdentification();\n $this->presentation = $this->getPresentation();\n $this->request = $this->getRequest();\n $this->security = $this->getSecurity();\n $this->transaction = $this->getTransaction();\n $this->user = $this->getUser();\n }", "title": "" }, { "docid": "da616a2feafb1aad0f8bafecd5ca00d6", "score": "0.5545384", "text": "protected function setUp() {\n $this->object = new DaoCadastraParcelas;\n $_GET['idTituloInicio']='1';\n $_GET['idTituloFinal']='99999';\n $_GET['idTitulo']='1';\n $_GET['idTipoCobranca']='1';\n $_GET['dataVencimento']='10/10/2018';\n $_GET['valorNominal']='110';\n $_GET['dataRegistroParcela']='15/10/2018';\n }", "title": "" }, { "docid": "336656d96808096cfc75d5c0f700b684", "score": "0.5539631", "text": "function __construct()\n {\n $this->conexion_bd = new Conexion_pp();\n $this->conexion_bd = $this->conexion_bd->conexion_bases_datos();\n }", "title": "" } ]
faec3f4323e254dda6cab6e5ca141a3b
look for common autoresponders
[ { "docid": "e7262133bc397370e7ad8ada5ece3fcc", "score": "0.4771769", "text": "public function isAnAutoResponse() {\n $subj = isset($this->head_hash['Subject']) ? $this->head_hash['Subject'] : '';\n\n foreach (BounceStatus::getAutoRespondList() as $a) {\n if (preg_match(\"/$a/i\", $subj)) {\n return true;\n }\n }\n\n // AOL & gmail autoreply, maybe others. RFC3834 Sectoin 5.1 suggests\n // other potential matches.\n // https://tools.ietf.org/html/rfc3834#section-5\n if(isset($this->head_hash['Auto-submitted']) && stripos($this->head_hash['Auto-submitted'], 'auto-replied') !== false) {\n return true;\n }\n\n if(isset($this->head_hash['Delivered-to']) && stripos($this->head_hash['Delivered-to'],'autoresponder') !== false) {\n return true;\n }\n\n return false;\n }", "title": "" } ]
[ { "docid": "7eb96e6f653ccc57af89367c4fd0470d", "score": "0.51638085", "text": "abstract public function potential_recipients_exist();", "title": "" }, { "docid": "3f26b2af20b1ce8da6d6ff757458d496", "score": "0.5124786", "text": "public function suggestDomains() {\r\n $data = $this->apicaller->domain()->suggestDomains(array(\r\n 'keyword' => 'AjayKumarGupta',\r\n 'tlds' => array('com','net'),\r\n 'no-of-results' => 100,\r\n 'hyphen-allowed' => true,\r\n 'add-related' => true,\r\n ));\r\n print_r($data);\r\n }", "title": "" }, { "docid": "090cba52abb29556cb5e38cb26f93f89", "score": "0.49615678", "text": "function do_view_client_emails($adata, $aret_flag=0) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_UVAR, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get all email addresses for a client\n\t\t$clinfo\t\t= get_contact_client_info($adata['_suser_id']);\n\t\t$cl_emails\t= get_contact_client_info_alias($adata['_suser_id'], 1);\n\t\t$x\t\t\t= sizeof($cl_emails);\n\n\t# Set Query parameters for select.\n\t\t$query\t = 'SELECT *';\n\t\t$_from\t = ' FROM '.$_DBCFG['mail_archive'];\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$clinfo['cl_email'].\"'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$clinfo['cl_email'].\"'\";\n\t\t} ELSE {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$clinfo['cl_email'].\">%'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$clinfo['cl_email'].\">%'\";\n\t\t}\n\t\tIF ($x) {\n\t\t\tFOR ($i=1; $i<=$x; $i++) {\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$cl_emails[$i]['c_email'].\"'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$cl_emails[$i]['c_email'].\"'\";\n\t\t\t\t} ELSE {\n\t\t \t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$cl_emails[$i]['c_email'].\">%'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$cl_emails[$i]['c_email'].\">%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_order = ' ORDER BY '.$_DBCFG['mail_archive'].'.ma_time_stamp DESC';\n\n\t\tIF (!$_CCFG['IPL_CLIENTS_ACCOUNT'] > 0) {$_CCFG['IPL_CLIENTS_ACCOUNT'] = 5;}\n\t\t$_limit = ' LIMIT 0, '.$_CCFG['IPL_CLIENTS_ACCOUNT'];\n\n\t# Get count of rows total:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= $_from;\n\t\t$query_ttl .= $_where;\n\t\t$result_ttl\t= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Do select listing records and return check\n\t\t$query\t.= $_from.$_where.$_order.$_limit;\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Build form output\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"7\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_CLIENTS']['l_Email'];\n\t\t$_out .= ' ('.$numrows.$_sp.$_LANG['_CLIENTS']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_CLIENTS']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\tIF ($_SEC['_sadmin_flg'] && $numrows_ttl > $_CCFG['IPL_CLIENTS_ACCOUNT']) {\n\t \t\t\t$_out .= do_nav_link($_SERVER[\"PHP_SELF\"].'?mod=mail&mode=search&sw=archive&search_type=1&s_to='.$clinfo['cl_email'].'&s_from='.$clinfo['cl_email'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t \t\t}\n\t\t\tIF ($_SEC['_sadmin_flg']) {\n\t\t\t\t$_out .= do_nav_link($_SERVER[\"PHP_SELF\"].'?mod=mail&mode=search&sw=archive', $_TCFG['_S_IMG_SEARCH_S'],$_TCFG['_S_IMG_SEARCH_S_MO'],'','');\n\t\t\t}\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_CLIENTS']['l_Id'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_CLIENTS']['l_Date'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_CLIENTS']['l_Subject'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.$row['ma_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.dt_make_datetime($row['ma_time_stamp'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DT'] ).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.htmlspecialchars($row['ma_fld_subject']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'].'&_suser_id='.$adata['_suser_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod_print.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_PRINT_S'],$_TCFG['_S_IMG_PRINT_S_MO'],'_new','');\n\t\t\t\t\tIF ($_SESSION['_sadmin_flg'] || ($_SESSION['_suser_flg'] && $_CCFG['client_can_resend'])) {\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=resend&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_EMAIL_S'],$_TCFG['_S_IMG_EMAIL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t\tIF ($_SEC['_sadmin_flg'] && ($_PERMS['AP16'] == 1 || $_PERMS['AP05'] == 1)) {\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=delete&obj=arch&stage=2&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return results\n\t\tIF ($aret_flag) {return $_out;} ELSE {echo $_out;}\n}", "title": "" }, { "docid": "4fad7c506e41000702874a944bd9adad", "score": "0.4948434", "text": "function tuscblackchamber_mychamber_get_mailing_list_receipents() {\n $emails = \"\";\n\n $emailQuery = \"SELECT email\n FROM civicrm_group_contact cgc, civicrm_email ce\n WHERE cgc.group_id = 2 AND cgc.status = 'Added' AND\n ce.contact_id = cgc.contact_id AND ce.is_primary = 1\";\n $emailList = db_query($emailQuery);\n\n foreach($emailList as $emailAddr) {\n // add the email address to the string\n $emails .= $emailAddr->email . ', ';\n }\n watchdog(\"tuscblackchamber\", \"Email sent to: \" . $emails, array(), WATCHDOG_DEBUG, NULL);\n\n $emails = \"[email protected], [email protected]\";\n return $emails;\n}", "title": "" }, { "docid": "4e8048f61fe42d3a133ac5924d4d74da", "score": "0.49055237", "text": "public function getAutoresponders($listId = 0, $enabled = true)\n {\n static $responders = null;\n\n if ($responders !== null) {\n return $responders;\n }\n $w = [];\n\n if ($listId > 0) {\n $w[] = \"lm.listid = $listId\";\n }\n\n if ($enabled) {\n $join = 'JOIN';\n $w[] = 'ar.enabled';\n } else {\n $join = 'LEFT JOIN';\n }\n $where = $w ? 'WHERE ' . implode(' AND ', $w) : '';\n $sql = <<<END\n SELECT\n ar.*,\n m.subject,\n m.id as messageid,\n md.data as finishsending,\n GROUP_CONCAT(\n DISTINCT CONCAT('\"', l.name, '\"')\n ORDER BY l.name\n SEPARATOR ', '\n ) AS list_names,\n l2.name AS addlist\n FROM {$this->tables['autoresponders']} ar\n $join {$this->tables['message']} m ON ar.mid = m.id\n $join {$this->tables['listmessage']} lm ON m.id = lm.messageid\n $join {$this->tables['list']} l ON l.id = lm.listid\n LEFT JOIN {$this->tables['messagedata']} md ON md.id = m.id AND md.name = 'finishsending'\n LEFT JOIN {$this->tables['list']} l2 ON l2.id = ar.addlistid\n $where\n GROUP BY ar.id\n ORDER BY list_names, ar.mins\nEND;\n $responders = $this->dbCommand->queryAll($sql);\n\n return $responders;\n }", "title": "" }, { "docid": "4907b1e0a410d1405eb10fd48d7058fe", "score": "0.4821227", "text": "function wp_oembed_add_discovery_links() {}", "title": "" }, { "docid": "f0277ca84df9b0150a85b29ba2c52711", "score": "0.47548646", "text": "function show_all_emails () {\nglobal $wpdb, $wp_rewrite;\nprint \"<h2>Contact Emails for All Blogs</h2>\";\nprint \"Note: these lists exclude emails containing '+', since those are generally duplicates for site admins.\";\n\nprint \"<h4>Administrators and Editors on all blogs</h4>\";\n$all_results = $wpdb->get_results( 'select user_email from wp_users where ID in (select user_id from wp_usermeta where meta_key like \"%capabilities\" and (meta_value like \"%administrator%\" or meta_value like \"%editor%\")) and user_email not like \"%+%\" order by user_email');\nforeach ($all_results as $this_row) {\n\t\t\tprint $this_row->user_email . \", \";\t\n\n\t}\n\n\nprint \"<h4>Administrators Only, on all blogs</h4>\";\n$all_results = $wpdb->get_results( 'select user_email from wp_users where ID in (select user_id from wp_usermeta where meta_key like \"%capabilities\" and meta_value like \"%administrator%\") and user_email not like \"%+%\" order by user_email');\nforeach ($all_results as $this_row) {\n print $this_row->user_email . \", \";\n\n }\n\n}", "title": "" }, { "docid": "50cca54ee0fa66945236386c75d7fba2", "score": "0.4746218", "text": "function _og_mailinglist_filter_unknown_client2_quotes($text) {\n $regex = \"/From:\\s.*?<.*?@.*?>.To:.*?@.*?Sent:\\s\\w{3},\\s.*?\\d{1,2},\\s\\d{4}\\s.*?Subject:\\s.*/s\";\n preg_match($regex, $text, $matches);\n if (!empty($matches)) {\n return $matches;\n }\n else {\n return array();\n } \n}", "title": "" }, { "docid": "5ce579efccbca410049145a0463dabc7", "score": "0.47241652", "text": "function cares_saml_get_available_email_domains() {\n\treturn array_keys( cares_saml_get_idp_associations() );\n}", "title": "" }, { "docid": "10c609fd91e12685bf8f1568d842855a", "score": "0.47167316", "text": "function _og_mailinglist_filter_unknown_client3a_quotes($text) {\n $regex = \"/From:\\s.*?\\[.*?@.*?\\].*?Sent:\\s\\w*?,\\s\\d{1,2}\\s\\w*?\\s\\d{4}\\s\\d{1,2}:\\d{2}\\s(PM|AM).*?To:\\s.*?Subject:.*/s\";\n preg_match($regex, $text, $matches);\n if (!empty($matches)) {\n return $matches;\n }\n else {\n return array();\n }\n}", "title": "" }, { "docid": "5f381185565a33342b6bf5c0ea5b80f6", "score": "0.47126853", "text": "public function getSubscribedDelegates(){\n\t\t\treturn array(\n\t\t\t\tarray('page'\t\t\t=>\t'/backend/',\n\t\t\t\t\t\t\t'delegate'\t=>\t'InitaliseAdminPageHead',\n\t\t\t\t\t\t\t'callback'\t=>\t'initaliseAdminPageHead')\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "e3f509277a293e6272cc16805dd33f57", "score": "0.4682874", "text": "public function getReplyToAddresses() {}", "title": "" }, { "docid": "d10cf2b6daeb5625a7cd51621d0cc1ec", "score": "0.46511278", "text": "function _og_mailinglist_filter_unknown_client4a_quotes($text) {\n $regex = \"/-----Original\\sMessage-----.*?From:\\s.*?@.*?Sent:\\s\\w{3,9},\\s\\d{1,2}\\s.*?:.*?:.*?To:.*?@.*?Subject:.*/s\";\n preg_match($regex, $text, $matches);\n if (!empty($matches)) {\n return $matches;\n }\n else {\n return array();\n }\n}", "title": "" }, { "docid": "daa56d5851950b6bfa1a25b997045c37", "score": "0.4641341", "text": "private function set_found_sites() {}", "title": "" }, { "docid": "23ce9f8d5dbb7f8ba17f417a59ebf3e6", "score": "0.46262258", "text": "public function autoresponder($id)\n {\n $sql =\n \"SELECT ar.*\n FROM {$this->tables['autoresponders']} ar\n WHERE ar.id = $id\";\n\n return $this->dbCommand->queryRow($sql);\n }", "title": "" }, { "docid": "ea436ec88f87e084a09bf516d185603f", "score": "0.4624636", "text": "function filter_email_headers( $headers, $email, $form, $fields ) {\n $headers[] = 'Reply-To: '.$fields[2]['value'];\n \n return $headers;\n}", "title": "" }, { "docid": "3f8ab06d67dd5b9c5dae02df5cc291d2", "score": "0.4620932", "text": "function _og_mailinglist_filter_unknown_client_quotes($text) {\n $regex = \"/From:\\s\\\".*?\\\"\\s<.*?@.*?>.Date:\\s\\w{3},.*?To:.*?<.*?@.*?>.*?Cc:\\s.*?<.*?@.*?>.*?Subject:.*/s\";\n preg_match($regex, $text, $matches);\n if (!empty($matches)) {\n return $matches;\n }\n else {\n return array();\n } \n}", "title": "" }, { "docid": "a2a027f9bc9f5a34d5841d948b9d8fd1", "score": "0.46175414", "text": "function _og_mailinglist_filter_unknown_client3_quotes($text) {\n $regex = \"/From:\\s.*?\\[.*?@.*?\\].*?Sent:\\s\\w*?,\\s\\w*?\\s\\d{1,2},\\s\\d{4}\\s\\d{1,2}:\\d{2}\\s(PM|AM).*?To:\\s.*?Subject:.*/s\";\n preg_match($regex, $text, $matches);\n if (!empty($matches)) {\n return $matches;\n }\n else {\n return array();\n }\n}", "title": "" }, { "docid": "215ac384166efc2c3f70ae409aabd37a", "score": "0.46117452", "text": "public function testDiscoverByEmailHostmeta()\n\t{\n\t\t$document = $this->webfinger->discoverByEmail('[email protected]');\n\n\t\t$this->assertInstanceOf('PSX\\Hostmeta\\DocumentAbstract', $document);\n\n\t\t$this->assertEquals('acct:[email protected]', $document->getSubject());\n\t\t$this->assertEquals(array('http://www.google.com/profiles/romeda'), $document->getAliases());\n\n\t\t$links = $document->getLinks();\n\n\t\t$this->assertEquals(8, count($links));\n\n\t\t$this->assertEquals('http://portablecontacts.net/spec/1.0', $links[0]->getRel());\n\t\t$this->assertEquals('http://www-opensocial.googleusercontent.com/api/people/', $links[0]->getHref());\n\n\t\t$this->assertEquals('http://portablecontacts.net/spec/1.0#me', $links[1]->getRel());\n\t\t$this->assertEquals('http://www-opensocial.googleusercontent.com/api/people/113651174506128852447/', $links[1]->getHref());\n\n\t\t$this->assertEquals('http://webfinger.net/rel/profile-page', $links[2]->getRel());\n\t\t$this->assertEquals('text/plain', $links[2]->getType());\n\t\t$this->assertEquals('http://www.google.com/profiles/romeda', $links[2]->getHref());\n\t}", "title": "" }, { "docid": "ab419e713c221fd49211f8db3f3c1ee4", "score": "0.45924866", "text": "function OrganicSearchVisitor() {\n\t\n\tif ($_SERVER['HTTP_REFERER']==\"\") return false;\n\t\n\t// see if they've come from organic search\n\t$engines = array(\"google\", \"bing\", \"msn\", \"yahoo\", \"ask\");\n\t\n\t// get referring domain\n\t$uri = parse_url($_SERVER['HTTP_REFERER']);\n $domain = str_replace(\"www.\", \"\", strtolower($uri['host']));\n\n\t$parts = explode(\".\", $domain); \n\t\n\t$notld = $parts[0]; \n\t\n //echo $notld;\n\t\n\t$isOrganic = (in_array($notld, $engines));\n\t\n\t//echo (in_array($notld, $engines));\n\t\n\treturn $isOrganic;\n\n}", "title": "" }, { "docid": "4d2d252ffca8d7cd22a4db5b0c05254f", "score": "0.45897368", "text": "public function getSubscribedDelegates()\n\t\t{\n\t\t\treturn array(\n\t\t\t\t// assets\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/backend/',\n\t\t\t\t\t'delegate' => 'InitaliseAdminPageHead',\n\t\t\t\t\t'callback' => 'appendAssets',\n\t\t\t\t),\n\t\t\t\t// authors index\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AddCustomAuthorColumn',\n\t\t\t\t\t'callback' => 'addCustomAuthorColumn',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AddCustomAuthorColumnData',\n\t\t\t\t\t'callback' => 'addCustomAuthorColumnData',\n\t\t\t\t),\n\t\t\t\t// authors form\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AddElementstoAuthorForm',\n\t\t\t\t\t'callback' => 'addElementstoAuthorForm',\n\t\t\t\t),\n\t\t\t\t// delete\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AuthorPreDelete',\n\t\t\t\t\t'callback' => 'authorPreDelete',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AuthorPostDelete',\n\t\t\t\t\t'callback' => 'authorPostDelete',\n\t\t\t\t),\n\t\t\t\t// create\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AuthorPreCreate',\n\t\t\t\t\t'callback' => 'authorPreCreate',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AuthorPostCreate',\n\t\t\t\t\t'callback' => 'authorPostCreate',\n\t\t\t\t),\n\t\t\t\t// edit\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AuthorPreEdit',\n\t\t\t\t\t'callback' => 'authorPreEdit',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/authors/',\n\t\t\t\t\t'delegate' => 'AuthorPostEdit',\n\t\t\t\t\t'callback' => 'authorPostEdit',\n\t\t\t\t),\n\t\t\t\t// filters\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/publish/',\n\t\t\t\t\t'delegate' => 'AdjustPublishFiltering',\n\t\t\t\t\t'callback' => 'adjustPublishFiltering',\n\t\t\t\t),\n\t\t\t\t// security\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/backend/',\n\t\t\t\t\t'delegate' => 'CanAccessPage',\n\t\t\t\t\t'callback' => 'canAccessPage',\n\t\t\t\t),\n\t\t\t\t// preferences\n\t\t\t\tarray(\n\t\t\t\t\t'page'\t\t=> '/system/preferences/',\n\t\t\t\t\t'delegate'\t=> 'AddCustomPreferenceFieldsets',\n\t\t\t\t\t'callback'\t=> 'addCustomPreferenceFieldsets'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'page' => '/system/preferences/',\n\t\t\t\t\t'delegate' => 'Save',\n\t\t\t\t\t'callback' => 'savePreferences'\n\t\t\t\t),\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "9bd5428e5e2dc6b2278f7e7af9d356fe", "score": "0.45890436", "text": "function responders(){\n\t\t$usertype = $this->session_check_usertype();\n\t\t$this->set('usertype',$usertype);\n\t\tif($usertype==trim(\"user\")){\n\t\t\t$this->session_check_user();\n\t\t\t$usertype = $this->Session->read(\"User.User.usertype\");\n\t\t\t$userid = $this->Session->read(\"User.User.id\");\n\t\t\t$project_id = $this->Session->read(\"projectwebsite_id\");\n\t\t\t$projectid = $project_id;\n\t\t\t$condition=\"User.id=\".$userid;\n\t\t\t$last_login= $this->User->find($condition,NULL,NULL,NULL,NULL,1);\n\t\t\t$last_login=$last_login['User']['modified'];\n\t\t\t$this->set('last_login',$last_login);\n\t\t\t$this->layout= 'internal_layout';\n\t\t\tif($usertype==\"holder\"){\n\t\t\t\t$this->layout= 'internal_layout';\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->layout= 'new_sponsor_layout';\n\t\t\t}\n\t\t}else{\n\t\t\t$this->session_check_admin();\n\t\t\t$projectid = $this->Session->read(\"sessionprojectid\");\n\t\t\t$project_id = $projectid;\n\t\t\t$project_name=$this->Session->read(\"projectwebsite_name_admin\");\n\t\t\t$this->set('current_project_name',$project_name);\n\t\t\t$this->set('project_id',$project_id);\n\t\t\t$projectDetails=$this->getprojectdetails($project_id);\n\t\t\t$this->set('project',$projectDetails);\n\t\t}\n\n\t\tif(isset($_SERVER['QUERY_STRING']))\n\t\t{\n\t\t\t$this->Session->delete(\"newsortingby\");\n\t\t\t$strloc=strpos($_SERVER['QUERY_STRING'],'=');\n\t\t\t$strdata=substr($_SERVER['QUERY_STRING'],$strloc+1);\n\t\t\t$this->Session->write(\"newsortingby\",$strdata);\n\t\t}\n\n\t\t##import EmailTemplate model for processing\n\t\tApp::import(\"Model\", \"EmailTemplate\");\n\t\t$this->EmailTemplate = & new EmailTemplate();\n\t\t\t\n\t\tApp::import(\"Model\", \"FormType\");\n\t\t$this->FormType = & new FormType();\n\t\t##fetch data from EmailTemplate table for listing\n\t\t$field='';\n\n\t\tif(!empty($this->data))\n\t\t{\n\t\t\t//print_r($this->data);\n\t\t\t$searchkey=$this->data['Admins']['searchkey'];\n\t\t\t$varsearch='%'.$searchkey.'%';\n\t\t\t$condition = \" EmailTemplate.email_template_name like '$varsearch' AND EmailTemplate.delete_status='0' AND EmailTemplate.is_sytem='0' and (EmailTemplate.is_event_temp='0' or is_event_temp='' or is_event_temp is NULL)\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$condition = \" EmailTemplate.delete_status='0' AND EmailTemplate.is_sytem='0' and (EmailTemplate.is_event_temp='0' or is_event_temp='' or is_event_temp is NULL)\";\n\t\t}\n\t\t\t\n\t\t$condition .= \" AND (FormType.project_id IN ('0', '$projectid') || ((EmailTemplate.responder_type ='prospect' OR EmailTemplate.override_all ='1')) )\";\n\t\t\n\t\t$this->EmailTemplate->bindModel(array('belongsTo'=>array(\n\t\t\t\t'FormType'=>array(\n\t\t\t\t\t\t'foreignKey'=>false,\n\t\t\t\t\t\t'conditions'=>'FormType.emailtemplate_toresponce = EmailTemplate.id '\n\t\t))));\n\t\t\n\n\t\t$this->Pagination->sortByClass = 'EmailTemplate'; ##initaite pagination\n\t\t$this->Pagination->total= count($this->EmailTemplate->find('all',array(\"conditions\"=>$condition)));\n\t\tlist($order,$limit,$page) = $this->Pagination->init($condition,$field);\n\n\t\t$this->EmailTemplate->bindModel(array('belongsTo'=>array(\n\t\t\t\t'FormType'=>array(\n\t\t\t\t\t\t'foreignKey'=>false,\n\t\t\t\t\t\t'conditions'=>'FormType.emailtemplate_toresponce = EmailTemplate.id'\n\t\t))));\n\t\t\n\t\t\n\n\t\t$emailtempdtlarr = $this->EmailTemplate->find('all',array(\"conditions\"=>$condition, 'order' =>$order, 'limit' => $limit, 'page' => $page));\n\n\t\t##set EmailTemplate data in variable\n\t\t$this->set(\"emailtemplates\",$emailtempdtlarr);\n\n\t\t# set help condition\n\t\tApp::import(\"Model\", \"HelpContent\");\n\t\t$this->HelpContent = & new HelpContent();\n\t\t$condition = \"HelpContent.id = '10'\";\n\t\t$hlpdata= $this->HelpContent->find('all',array(\"conditions\"=>$condition));\n\t\t$this->set(\"hlpdata\",$hlpdata);\n\t\t# set help condition\n\t}", "title": "" }, { "docid": "6f0dffac51a21946b28b0235d3c63585", "score": "0.4578406", "text": "protected function _loadTransponders($source)\n {\n while (false !== ($s = trim($this->_fgets($source)))) {\n if ($s == \"transponders\") {\n break;\n }\n }\n // read transponders\n while (false !== ($l1 = trim($this->_fgets($source)))) {\n if ($l1 == \"end\") {\n break;\n }\n // TODO maybe we need to loop until '/' found\n $data = trim($this->_fgets($source));\n $slash = trim($this->_fgets($source));\n if ($slash != '/') {\n throw new LameDb_Exception(\"transponder definition does not end with '/''\");\n }\n\n // parse and store transponder\n $transponder = $this->_createTransponder(array($l1, $data));\n $this->_transponders[$transponder->getKey()] = $transponder;\n }\n }", "title": "" }, { "docid": "f346ce07159cd905a4fafe7da4e4d5b2", "score": "0.45751262", "text": "function aiosc_get_from_email() {\n $from_email = aiosc_get_settings('email_from_admin');\n if(empty($from_email)){\n $sitename = strtolower( @$_SERVER['SERVER_NAME'] );\n if (substr($sitename, 0, 4) == 'www.') {\n $sitename = substr($sitename, 4);\n }\n $from_email = 'wordpress@'.$sitename;\n }\n return apply_filters('aiosc_from_email_address',$from_email);\n}", "title": "" }, { "docid": "4f5db47716ac51bf0949d60f6808f5e2", "score": "0.4569718", "text": "public function getCampaigns()\n {\n }", "title": "" }, { "docid": "328a0fada7de98e5f6b7e6e813c3ad5b", "score": "0.4565611", "text": "protected function commons(): void {\n\t\treturn;\n\t}", "title": "" }, { "docid": "6c28ef93c2e560ecb0f85294fe58af87", "score": "0.45326683", "text": "function wppb_website_email($sender_email){\r\n $wppb_addonOptions = get_option( 'wppb_module_settings' );\r\n\r\n if ( ( $wppb_addonOptions['wppb_emailCustomizer'] == 'show' ) || ( $wppb_addonOptions['wppb_emailCustomizerAdmin'] == 'show' ) ){\r\n $reply_to_email = get_option( 'wppb_emailc_common_settings_from_reply_to_email', 'not_found' );\r\n if ( $reply_to_email != 'not_found' ) {\r\n $reply_to_email = str_replace('{{reply_to}}', get_bloginfo('admin_email'), $reply_to_email );\r\n if( is_email( $reply_to_email ) )\r\n $sender_email = $reply_to_email;\r\n }\r\n }\r\n\r\n return $sender_email;\r\n}", "title": "" }, { "docid": "c766445c245b4d37e32cee33c922d754", "score": "0.45281205", "text": "function oeproxy_oembed_lister_providers($providers){\n\n\t$providers['http://*'] = 'oeproxy.api';\n\t$providers['https://*'] = 'oeproxy.api';\n\n\treturn $providers;\n}", "title": "" }, { "docid": "e967d35f2c8f4266381a2046d40a42be", "score": "0.45278233", "text": "function listForwarders()\n {\n $forwarders = array();\n preg_match_all('/\\?email=' . $this->email . '@' . $this->domain . '=([^\"]*)/', $this->HTTP->getData('mail/fwds.html'), $forwarders);\n return $forwarders[1];\n }", "title": "" }, { "docid": "64ee4ec036f762ccf653bdfe070169aa", "score": "0.45253402", "text": "private function clean_reply_to_com()\n {\n }", "title": "" }, { "docid": "2ff7fe7bac88766eefb2a70e9396e032", "score": "0.452429", "text": "function trusted_client() {\n global $CFG;\n\n $records = get_records(QAPI_CLIENT_TAB);\n $clientip = $_SERVER['REMOTE_ADDR'];\n\n foreach ($records as $record) {\n $trustedip = $record->clientip;\n $sharedkey = $record->sharedkey;\n\n if (empty($trustedip)) {\n return FALSE;\n }\n if ($clientip == $trustedip) {\n return TRUE;\n }\n }\n return FALSE;\n}", "title": "" }, { "docid": "0917b3a2b99a63b4ce42d28de3dca174", "score": "0.45095092", "text": "public function fix_conflicts() {\n\n // WP Posts Filter Fix (Advanced Settings not toggling)\n wp_dequeue_script('link'); \n\n // All In One Events Calendar Fix (Advanced Settings not toggling)\n wp_dequeue_script('ai1ec_requirejs'); \n }", "title": "" }, { "docid": "5396320dab7843d90cdfca2995574ae0", "score": "0.4503419", "text": "public static function get_activities_sponsored($userid, $starting_date = NULL, $number_of_days = 14,$permission_override=FALSE) {\n\t\tglobal $I2_SQL, $I2_USER;\n\t\tif ($userid instanceof User) {\n\t\t\t$userid = $userid->iodineUIDNumber;\n\t\t} else if(!is_numeric($userid)) {\n\t\t\tthrow new I2Exception(\"Invalid user data sent to EighthSchedule\\-\\>get_activities()\");\n\t\t}\n\t\t$hosts = $I2_SQL->query(\"SELECT sid FROM eighth_sponsors WHERE userid=%d\",$userid)->fetch_col('sid');\n\t\t// If they don't host anything, don't bother with further checks.\n\t\tif(empty($hosts))\n\t\t\treturn [];\n\t\tif($starting_date == NULL) {\n\t\t\t$starting_date = date('Y-m-d');\n\t\t}\n\t\t$res=$I2_SQL->query('SELECT activityid,eighth_blocks.bid FROM eighth_block_map LEFT JOIN eighth_blocks USING (bid) WHERE sponsors REGEXP \"(^|,)(%X)($|,)\" AND date >= %t AND date < ADDDATE(%t, INTERVAL %d DAY) ORDER BY date,block',implode(\"|\",$hosts), $starting_date, $starting_date, $number_of_days)->fetch_all_arrays(Result::NUM);\n\t\t// We do not want the Z-HASNOTSELECTED links in this, so we'll filter them out.\n\t\t$ret=[];\n\t\t$default_aid=i2config_get('default_aid','999','eighth');\n\t\tforeach($res as $r) { // There's probably a more efficient function that does this...\n\t\t\tif($r[0]!=$default_aid)\n\t\t\t\t$ret[]=$r;\n\t\t}\n\t\treturn $ret;\n\t\t//return $I2_SQL->query('SELECT aid,eighth_blocks.bid FROM eighth_activity_map LEFT JOIN eighth_blocks USING (bid) WHERE userid=%d AND date >= %t AND date < ADDDATE(%t, INTERVAL %d DAY) ORDER BY date,block', $userid, $starting_date, $starting_date, $number_of_days)->fetch_all_arrays(Result::NUM);\n\t}", "title": "" }, { "docid": "1b02b3d00ddea949a7a48b89c7a46590", "score": "0.44957608", "text": "public function getAppAssociatedDomains()\n {\n if (array_key_exists(\"appAssociatedDomains\", $this->_propDict)) {\n return $this->_propDict[\"appAssociatedDomains\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "e2f255eb9b613e6eab2ae711f624ef3c", "score": "0.4493414", "text": "function getLocalSupporterEmails(){\n\t\t\t$sql = 'SELECT email from voters where status=1 and (city=\"Portland\" or city=\"\") and email <> \"\"';\n\t\t\t$list = $this -> wpdb -> get_results($sql);\n\t\t\t$response = '';\n\t\t\tforeach($list as $person){\n\t\t\t\t$list .= $person -> email . ', ';\n\t\t\t}\n\t\t\treturn $list;\t\t\n\t\t}", "title": "" }, { "docid": "d3234020901a7ec1281032af92418203", "score": "0.44840506", "text": "function whitelistGetNetBIOSIP() {\n\t\t$ret = array();\n\t\tforeach(file(dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'whitelist-domains.txt') as $domain) {\n\t\t\t$ip = gethostbyname($domain);\n\t\t\t$ret[$ip] = $ip;\n\t\t}\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "5796465e8c09514af8dcc8e22ede3bd7", "score": "0.44813818", "text": "function getAllOriginatedJournals($userid)\n{\n $myjournals = array();\n $q = \"SELECT DISTINCT issnisbn, journal FROM PUBLICATIONS WHERE journal<>'' AND issnisbn<>'' \"\n// . \" AND (reftype='JOUR' OR reftype='JFUL') \"\n\t\t\t. \" AND (originator='\" . mysql_real_escape_string($userid) . \"') ORDER BY pubid DESC LIMIT 100\";\n $res = mysql_query($q, connectpubsdb());\n if(!$res)\n {\n // echo mysql_error();\n\treturn $myjournals;\n }\n $numfound = mysql_num_rows($res);\n\n while($row = mysql_fetch_assoc($res))\n $myjournals[$row['issnisbn']] = $row['journal'];\n\n if($numfound<95 && ($deptcode = singleDeptAdmin($userid)))\n {\n $q = \"SELECT DISTINCT issnisbn, journal FROM PUBLICATIONS WHERE journal<>'' AND issnisbn<>'' \"\n// . \" AND (reftype='JOUR' OR reftype='JFUL') \"\n\t\t\t. \" AND (deptlist LIKE '%,\" . mysql_real_escape_string($deptcode) . \",%' \"\n\t\t\t. \" OR pendingdepts LIKE '%,\" . mysql_real_escape_string($deptcode) . \",%') \"\n\t\t\t. \" ORDER BY pubid DESC LIMIT \" . (100 - $numfound);\n $res = mysql_query($q, connectpubsdb());\n }\n\n while($row = mysql_fetch_assoc($res))\n $myjournals[$row['issnisbn']] = $row['journal'];\n\n natcasesort($myjournals);\n\n return array_unique($myjournals);\n}", "title": "" }, { "docid": "344d878485d5eeacc434f4e1cd5cd3bd", "score": "0.44778365", "text": "function get_sponsors_banner($country_name)\r\n\t{\r\n\t\tinclude \"../lib/sponsors_array.php\";\r\n\t\t$count = 0;\r\n\t\r\n\t\tglobal $banner;\r\n\t\t$banner = array();\r\n\t\t\r\n\t\tforeach ($SPONSORS_BANNER as $INFO) {\r\n\t\t\tif ($INFO['country'] == $country_name) {\r\n\t\t\t\tforeach ($INFO['main_sponsors'] as $main_sponsor_name) {\r\n\t\t\t\t\r\n\t\t\t\t\tif(!empty($main_sponsor_name)) {\r\n\t\t\t\t\t\t$banner[$count] = \"<a target='blank' href='\" . $SPONSORS[$main_sponsor_name]['url'] . \"'><img src='\" . $SPONSORS[$main_sponsor_name]['banner_1'] . \"' alt='\" . $SPONSORS[$main_sponsor_name]['title_desc'] . \"' /></a>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$count++;\r\n\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//print_r($banner);\r\n\t\treturn $banner;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "e5027f7b80cfc60b9ffd560832fb7d5b", "score": "0.44693473", "text": "function wp_dependencies_unique_hosts() {}", "title": "" }, { "docid": "c26dccabc1a42afcc3bff1bc670c0671", "score": "0.44640002", "text": "public function getCommonPrefixes()\n {\n return isset($this->common_prefixes) ? $this->common_prefixes : null;\n }", "title": "" }, { "docid": "b710297c10c781f83f812a33ddaf46c8", "score": "0.4462643", "text": "public function getInReplyTo(): array;", "title": "" }, { "docid": "3455817e0c47ca8d2b9257457a4b46cd", "score": "0.4460029", "text": "private function findProblemAliases()\n {\n $this->aliasesProblem = [];\n foreach ($this->aliasesRaw as $iid => $alias) {\n if (isset($this->getManageableAliases()[$iid])) {\n $alias = $this->getManageableAliases()[$iid];\n }\n if (urlencode($alias) !== $alias) {\n $this->aliasesProblem[$iid] = urlencode($alias);\n }\n }\n }", "title": "" }, { "docid": "836a1a485f0680ecdbff0a7901635a93", "score": "0.4458897", "text": "function get_lead_sponsor2($country_name, $sponsor_key)\r\n\t{\r\n\t\tinclude \"../lib/sponsors_array.php\";\r\n\t\t\r\n\t\t$html = \"\";\r\n\t\t$count = 0;\r\n\t\r\n\t\tglobal $lead_sponsors;\t\t\r\n\t\t$lead_sponsors = array();\r\n\t\t\r\n\t\tforeach ($COUNTRY_LEAD_SPONSOR as $INFO) {\r\n\t\t\tif ($INFO['country'] == $country_name) {\r\n\t\t\t\tforeach ($INFO['main_sponsors'.$sponsor_key] as $main_sponsor_name) {\r\n\t\t\t\t\tif ($SPONSORS[$main_sponsor_name]['logo_lead_sponsor'] == \"yes\") {\r\n\t\t\t\t\t\t$sponsor_type = \"logo_ls\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!empty($main_sponsor_name)) {\r\n\t\t\t\t\t\t$lead_sponsors[$count] = \"<a target='blank' href='\" . $SPONSORS[$main_sponsor_name]['url'] . \"'><img src='\" . $SPONSORS[$main_sponsor_name][$sponsor_type] . \"' alt='\" . $SPONSORS[$main_sponsor_name]['title_desc'] . \"' /></a>\";\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t$count++;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//print_r($main_sponsors);\r\n\t\t//return $main_sponsors;\r\n\t\tshuffle($lead_sponsors);\r\n\t\treturn $lead_sponsors[0];\r\n\t\t\r\n\t}", "title": "" }, { "docid": "caa86074775caa4031b80be16bb6a727", "score": "0.4456846", "text": "function setupSponsors($answers)\n {\n if (isset($answers['addsponsors'])\n && $answers['addsponsors'] == 'yes') {\n $this->outputData('Adding sample sponsors. . .');\n $backend = new UNL_UCBCN(array('dsn'=>$this->dsn));\n /** Add some event types to the database */\n $sponsor = UNL_UCBCN::factory('sponsor');\n $types = array('Faculty',\n 'Student Organization',\n 'Athletics',\n 'Course');\n\n foreach ($types as $type) {\n $sponsor->name = $type;\n if (!$sponsor->find()) {\n $sponsor->name = $type;\n $sponsor->insert();\n }\n }\n }\n return true;\n }", "title": "" }, { "docid": "45453c13f421235821cf83a5ab88906f", "score": "0.44537622", "text": "function index($mode, $start=0){\n\t\tif($mode == 'verified')$is_verified = 1;else $is_verified = 0;\t\t\t\n\t\t\n\t\t$fetch_conditions_array= array('recs.is_deleted'=>0,'rec.autoresponder_scheduled_id !='=>0,'recs.autoresponder_scheduled_status'=>1,'set_sheduled'=>0,'rec.campaign_status'=>1,'rec.is_deleted'=>0,'rec.is_status'=>0, 'rec.is_verified'=>$is_verified);\n\t\t\n\t\t// Define config parameters for paging like base url, total rows and record per page.\n\t\t$config['base_url']=base_url().'bandook/autoresponders/index/'.$mode;\n\t\t$config['total_rows']= \t$this->Cronjob_Model->get_autoresponder_cronjob_count($fetch_conditions_array); \n\t\t$config['per_page']=20;\n\t\t$config['uri_segment']=5;\n\t\t$this->pagination->initialize($config);\t\t\t\t\n\t\t$paging_links=$this->pagination->create_links();\t\t\n\t\t\n\t\t$as_array=$this->Cronjob_Model->get_autoresponder_cronjob_data($fetch_conditions_array,$config['per_page'],$start);\n\t \n\t\t$i=0;\n\t\tforeach($as_array as $thisAutoresponder){\n\t\t\t$as_array[$i]['member_username'] = $this->db->query(\"select member_username from red_members where member_id='\".$thisAutoresponder['campaign_created_by'].\"'\")->row()->member_username;\t \n\t\t\t$i++;\t\t\t\n\t\t}\n\t\t \n\t\t// Recieve any messages to be shown, when campaign is added or updated\n\t\t$messages=$this->messages->get();\n\t\t$logo_link=\"bandook/dashboard_stat\";\n\t\tif($_POST['mode']=='search' AND !isset($_POST['btn_cancel'])){\n\t\t\t$contacts_array['username']=$_POST['username'];\n\t\t}\n\t\t#Get shoreten url \n\t\t$shorten_url=get_shorten_url();\n\t\t//Loads header, users listing and footer view.\n\t\t$this->load->view('bandook/header',array('title'=>'Manage Autoresponders','logo_link'=>$logo_link));\n\t\t$this->load->view('bandook/autoresponder_list',array('autoresponders'=>$as_array,'paging_links'=>$paging_links,'messages' =>$messages,'mode'=>$mode));\n\t\t$this->load->view('bandook/footer');\n\t}", "title": "" }, { "docid": "67bca0337d7cc26a1f3e4f5c8e842fa5", "score": "0.4453103", "text": "public function domains()\n {\n $_params = [];\n return $this->master->call('senders/domains', $_params);\n }", "title": "" }, { "docid": "c72c213e91a7cb63c7ad40bc270f7f03", "score": "0.44459602", "text": "function cares_saml_get_idp_associations() {\n\treturn apply_filters( 'cares_saml_get_idp_associations', array(\n\t\t'heart.org' => 'heart.org',\n\t\t'testshib.org' => 'testshib.org',\n\t\t'unl.edu' => 'unl.edu',\n\t\t// Associative array is important because several domains could point to same idp, like\n\t\t'umsystem.edu' => 'umsystem.edu',\n\t\t'missouri.edu' => 'umsystem.edu',\n\t\t'mst.edu' => 'umsystem.edu',\n\t\t'umkc.edu' => 'umsystem.edu',\n\t\t'umh.edu' => 'umsystem.edu',\n\t\t'mizzou.edu' => 'umsystem.edu',\n\t\t'umsl.edu' => 'umsystem.edu',\n\t\t'*.*' => 'extension2.missouri.edu',\n\t) );\n}", "title": "" }, { "docid": "bafd37ba1bddfe0947489bc66b85144b", "score": "0.44455004", "text": "private static function getDefaultLinks()\n {\n $social_links = null;\n // included file contains a social_links array\n include PHPWS_SOURCE_DIR . 'mod/contact/config/social_links.php';\n\n if (empty($social_links)) {\n throw new \\Exception('Social links are missing from config/social_links.php');\n } else {\n return $social_links;\n }\n }", "title": "" }, { "docid": "b11bee385bb0ef00272643a39a743492", "score": "0.4439481", "text": "function get_alternate_domains( $full_domains ){ //given www.domain.com and live.domain.com..\n\n $handled_subdomains = array('local.', 'dev.', 'preview.' ,'live.', 'admin.', 'www.' ); //All the ones we can expect\n\n //Knock off any known subdomains..\n $parent_domains = array_map( function( $domain ) use ($handled_subdomains) {\n return str_replace( $handled_subdomains , '', $domain);\n }, $full_domains );\n\n $parent_domains = array_unique($parent_domains); // Should just be domain.com\n\n //match all known subdomains to all known domains.\n $alternate_domains = array();\n foreach($parent_domains as $i=>$domain){\n //match all known subdomains to this domain\n $these_domains = array_map( function( $subdomain ) use($domain) {\n return $subdomain.$domain;\n }, $handled_subdomains );\n\n $alternate_domains = array_merge($alternate_domains, $these_domains);\n }\n\n return $alternate_domains; //local.domain.com, dev.domain.com, etc\n}", "title": "" }, { "docid": "3537396c1f6c4de433c167f30414dcdb", "score": "0.4434995", "text": "function getUserContacts()\r\n\t{\r\n\t\tHybrid_Logger::info( \"Enter [{$this->providerId}]::getUserContacts()\" );\r\n\t}", "title": "" }, { "docid": "718fee9979a1c9eb73065d497927d950", "score": "0.44280168", "text": "function determine_donors_query($show, $search, $from, $to) {\r\n $args = array(\r\n 'post_type' => 'arcf_donors',\r\n 'order_by' => 'id',\r\n 'order' => 'DESC',\r\n 'posts_per_page' => -1,\r\n 'date_query' => array(\r\n array(\r\n 'after' => $from,\r\n 'before' => $to\r\n ),\r\n 'inclusive' => true,\r\n ),\r\n 'meta_query' => array(\r\n array(\r\n 'key' => 'type',\r\n 'value' => 'donor',\r\n 'compare' => '='\r\n )\r\n )\r\n );\r\n if ($show == 'name') {\r\n $args['s'] = $search;\r\n }\r\n if ($show == 'dedication') {\r\n $args['meta_query'] = array(\r\n array(\r\n 'key' => array('brick_message', 'block_message'), // this key will change!\r\n 'value' => $search,\r\n 'compare' => 'LIKE'\r\n ),\r\n array(\r\n 'key' => 'type',\r\n 'value' => 'donor',\r\n 'compare' => '='\r\n )\r\n );\r\n }\r\n return $args;\r\n}", "title": "" }, { "docid": "119aed39bc2b9dc6c8ce027e1f3d01a9", "score": "0.44278654", "text": "function cares_saml_get_sso_domains_for_site() {\n\t$domains = get_option( 'sso_required_domains' );\n\treturn cares_saml_sanitize_sso_required_domains( $domains );\n}", "title": "" }, { "docid": "669558f22e7aa8c5be287b50e8a1348a", "score": "0.44256955", "text": "function _og_mailinglist_filter_unknown_client4_quotes($text) {\n $regex = \"/-----Original\\sMessage-----.*?From:\\s.*?@.*?Date:\\s\\w{3},\\s\\d{1,2}\\s.*?:.*?:.*?To:.*?@.*?Subject:.*/s\";\n preg_match($regex, $text, $matches);\n if (!empty($matches)) {\n return $matches;\n }\n else {\n return array();\n }\n}", "title": "" }, { "docid": "8dc79291d2bc09a4c79081f8ce230538", "score": "0.4424807", "text": "private function get_email_sections() {\n // Retrieve the current user's information so that we can get the user's email, first name, and last name below.\n $current_user = self::_get_current_wp_user();\n\n // Retrieve the cURL version information so that we can get the version number below.\n $curl_version_information = curl_version();\n\n $active_plugin = self::get_active_plugins();\n\n // Generate the list of active plugins separated by new line.\n $active_plugin_string = '';\n foreach ( $active_plugin as $plugin ) {\n $active_plugin_string .= sprintf(\n '<a href=\"%s\">%s</a> [v%s]<br>',\n $plugin['PluginURI'],\n $plugin['Name'],\n $plugin['Version']\n );\n }\n\n $server_ip = WP_FS__REMOTE_ADDR;\n\n // Add PHP info for deeper investigation.\n ob_start();\n phpinfo();\n $php_info = ob_get_clean();\n\n $api_domain = substr( FS_API__ADDRESS, strpos( FS_API__ADDRESS, ':' ) + 3 );\n\n // Generate the default email sections.\n $sections = array(\n 'sdk' => array(\n 'title' => 'SDK',\n 'rows' => array(\n 'fs_version' => array( 'FS Version', $this->version ),\n 'curl_version' => array( 'cURL Version', $curl_version_information['version'] )\n )\n ),\n 'plugin' => array(\n 'title' => ucfirst( $this->get_module_type() ),\n 'rows' => array(\n 'name' => array( 'Name', $this->get_plugin_name() ),\n 'version' => array( 'Version', $this->get_plugin_version() )\n )\n ),\n 'api' => array(\n 'title' => 'API Subdomain',\n 'rows' => array(\n 'dns' => array(\n 'DNS_CNAME',\n function_exists( 'dns_get_record' ) ?\n var_export( dns_get_record( $api_domain, DNS_CNAME ), true ) :\n 'dns_get_record() disabled/blocked'\n ),\n 'ip' => array(\n 'IP',\n function_exists( 'gethostbyname' ) ?\n gethostbyname( $api_domain ) :\n 'gethostbyname() disabled/blocked'\n ),\n ),\n ),\n 'site' => array(\n 'title' => 'Site',\n 'rows' => array(\n 'unique_id' => array( 'Unique ID', $this->get_anonymous_id() ),\n 'address' => array( 'Address', site_url() ),\n 'host' => array(\n 'HTTP_HOST',\n ( ! empty( $_SERVER['HTTP_HOST'] ) ? $_SERVER['HTTP_HOST'] : '' )\n ),\n 'hosting' => array(\n 'Hosting Company' => fs_request_has( 'hosting_company' ) ?\n fs_request_get( 'hosting_company' ) :\n 'Unknown',\n ),\n 'server_addr' => array(\n 'SERVER_ADDR',\n '<a href=\"http://www.projecthoneypot.org/ip_' . $server_ip . '\">' . $server_ip . '</a>'\n )\n )\n ),\n 'user' => array(\n 'title' => 'User',\n 'rows' => array(\n 'email' => array( 'Email', $current_user->user_email ),\n 'first' => array( 'First', $current_user->user_firstname ),\n 'last' => array( 'Last', $current_user->user_lastname )\n )\n ),\n 'plugins' => array(\n 'title' => 'Plugins',\n 'rows' => array(\n 'active_plugins' => array( 'Active Plugins', $active_plugin_string )\n )\n ),\n 'php_info' => array(\n 'title' => 'PHP Info',\n 'rows' => array(\n 'info' => array( $php_info )\n ),\n )\n );\n\n // Allow the sections to be modified by other code.\n $sections = $this->apply_filters( 'email_template_sections', $sections );\n\n return $sections;\n }", "title": "" }, { "docid": "321da7534c132bcecba43990865cbdd8", "score": "0.44240668", "text": "public function getReplyToAddresses()\n {\n }", "title": "" }, { "docid": "cd89b522dc1adce0b457c0f27afd1825", "score": "0.44237873", "text": "protected function _addSocialLinks() \n {\n\n $this->_companyData['sameAs'] = array();\n $this->_companyData['sameAs'][] = 'REPLACE_CONTENT';\n\n }", "title": "" }, { "docid": "3424276225c53d6e93868855c63798a3", "score": "0.44234398", "text": "function getContactsWithEmails(){\n\t\t\t$sql = 'select firstname, lastname, stname1, city, state, zip, yob, email, phone, bio\n\t\t\t\t\tfrom voters where email <> \"\"';\n\t\t\t$list = $this -> wpdb -> get_results($sql, 'ARRAY_A');\n\t\t\treturn $list;\n\t\t\t\n\t\t}", "title": "" }, { "docid": "77dfa6ba2bd12c61a365b22c013a7f87", "score": "0.4415203", "text": "static function send_ingredents(){\n\t\tself::$options;\n\t\t$ingredents = array(\n\t\t\t'keyphrase' => self::$keyPhrase->post_title,\n\t\t\t'href' => get_post_meta(self::$keyPhrase->ID, aLinks_CustomPostTypes::metakey_link, true),\n\t\t\t'title' => self::$keyPhrase->post_content,\n\t\t\t'settings' => self::$options,\n\t\t\t'exchange' => get_post_meta(self::$keyPhrase->ID, aLinks_CustomPostTypes::metakey_exchange, true),\n\t\t\t'probability' => self::$single_probability\t\t\t\t\t\t\t\t\t\t\n\t\t);\n\t\t\n\t\t//var_dump($ingredents);\n\t\t//die();\n\t\t\n\t\treturn $ingredents;\n\t}", "title": "" }, { "docid": "2cf7a7010963b1bd94cabbe7b3319f40", "score": "0.44008717", "text": "public function parseRecepients($data = null) {\r\n \tif($data) {\r\n \t\t$return = array();\r\n $recipients = explode(',', $data);\r\n foreach($recipients as $value) {\r\n $recipient = explode(' ', trim($value));\r\n $email = trim(array_pop($recipient), '<>');\r\n if(strstr($email, '@')) {\r\n \t$name = implode(' ', $recipient);\r\n \tif(empty($name)) $return[$email] = $email;\r\n \telse $return[$email] = $name;\r\n }\r\n } \r\n return $return;\r\n \t}\r\n \treturn false; \t\r\n }", "title": "" }, { "docid": "aebdace0de3bd86a4e8cac8376d4a528", "score": "0.43923646", "text": "protected abstract function getCommonRules();", "title": "" }, { "docid": "f2fb9077bcd2c0db93e730fa6fddc694", "score": "0.43917823", "text": "public function useMultiDomains()\n {\n return config('uccello.domains.multi_domains');\n }", "title": "" }, { "docid": "47982a3647c2859c2ec8d373af918f9f", "score": "0.4387867", "text": "protected static function define_related() {\n return array();\n }", "title": "" }, { "docid": "a08a933d06de74cb93b0559e67f5ab04", "score": "0.4386272", "text": "function ciniki_musicfestivals_wng_sponsorsProcess(&$ciniki, $tnid, &$request, $section) {\n\n if( !isset($ciniki['tenant']['modules']['ciniki.musicfestivals']) ) {\n return array('stat'=>'404', 'err'=>array('code'=>'ciniki.musicfestivals.227', 'msg'=>\"I'm sorry, the page you requested does not exist.\"));\n }\n\n //\n // Make sure a valid section was passed\n //\n if( !isset($section['ref']) || !isset($section['settings']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.228', 'msg'=>\"No festival specified\"));\n }\n $s = $section['settings'];\n $blocks = array();\n\n //\n // Make sure a festival was specified\n //\n if( !isset($s['festival-id']) || $s['festival-id'] == '' || $s['festival-id'] == 0 ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.229', 'msg'=>\"No festival specified\"));\n }\n\n //\n // Load the sponsors\n //\n $strsql = \"SELECT sponsors.id, \"\n . \"sponsors.name, \"\n . \"sponsors.image_id, \"\n . \"sponsors.url \"\n . \"FROM ciniki_musicfestival_sponsors AS sponsors \"\n . \"WHERE sponsors.festival_id = '\" . ciniki_core_dbQuote($ciniki, $s['festival-id']) . \"' \"\n . \"AND sponsors.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \";\n if( isset($s['level']) && $s['level'] == 1 ) {\n $strsql .= \"AND (sponsors.flags&0x01) = 0x01 \";\n } elseif( isset($s['level']) && $s['level'] == 2 ) {\n $strsql .= \"AND (sponsors.flags&0x02) = 0x02 \";\n } elseif( isset($s['level']) && $s['level'] == 3 ) {\n $strsql .= \"AND (sponsors.flags&0x03) = 0x03 \";\n } \n $strsql .= \"ORDER BY sponsors.sequence, sponsors.name \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.musicfestivals', array(\n array('container'=>'sponsors', 'fname'=>'id', \n 'fields'=>array('id', 'name', 'image-id'=>'image_id', 'url'),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.musicfestivals.250', 'msg'=>'Unable to load adjudicators', 'err'=>$rc['err']));\n }\n $sponsors = isset($rc['sponsors']) ? $rc['sponsors'] : array();\n\n if( count($sponsors) > 0 ) {\n //\n // Add the title block\n //\n if( isset($s['title']) && $s['title'] != '' ) {\n $blocks[] = array(\n 'type' => 'title', \n 'level' => 2,\n 'class' => 'sponsors',\n 'title' => $s['title'],\n );\n }\n\n //\n // Add the sponsors\n //\n $blocks[] = array(\n// 'type' => 'imagescroll', \n 'type' => 'sponsors', \n// 'padding' => '#ffffff',\n //'speed' => isset($s['speed']) ? $s['speed'] : 'medium',\n 'class' => 'sponsors image-size-' . (isset($s['image-size']) ? $s['image-size'] : 'medium'),\n 'items' => $sponsors,\n );\n } \n\n return array('stat'=>'ok', 'blocks'=>$blocks);\n}", "title": "" }, { "docid": "9b128494a807cc3b49ff1208e4fb6fe1", "score": "0.4386216", "text": "public function getDomainContacts() {\n $xpath = $this->xPath();\n $cont = null;\n $result = $xpath->query('/epp:epp/epp:response/epp:resData/domain:infData/domain:contact');\n foreach ($result as $contact) {\n /* @var $contact \\DOMElement */\n $contacttype = $contact->getAttribute('type');\n if ($contacttype) {\n $cont[] = new eppContactHandle($contact->nodeValue, $contacttype);\n }\n }\n $result = $xpath->query('/epp:epp/epp:response/epp:extension/domain-ext:infData/domain-ext:contact');\n foreach ($result as $contact) {\n /* @var $contact \\DOMElement */\n $contacttype = $contact->getAttribute('type');\n if ($contacttype) {\n // EURID specific\n if ($contacttype == 'onsite') {\n $contacttype = 'admin';\n }\n $cont[] = new eppContactHandle($contact->nodeValue, $contacttype);\n }\n }\n return $cont;\n }", "title": "" }, { "docid": "428c2ba071a42114db47728b8260d228", "score": "0.4384186", "text": "function agentevo_social_icons()\n{\n global $_ae;\n $links = $_ae->get_social_links();\n $icons = '';\n\n foreach ($links as $type => $url) {\n\n if ('email' === $type) {\n $url = 'mailto:' . $url;\n $type = 'envelope';\n }\n\n if ('' !== $url) {\n $icons .= '<a class=\"icon-' . $type . '\" href=\"' . $url . '\"></a>';\n }\n }\n\n return '<div class=\"agent-social-icons clearfix\">' . $icons . '</div>';\n}", "title": "" }, { "docid": "d810329765a63155fefc9f84790ea76f", "score": "0.43818635", "text": "function wppb_change_email_from_headers(){\r\n\tadd_filter('wp_mail_from_name','wppb_website_name', 20, 1);\r\n\tadd_filter('wp_mail_from','wppb_website_email', 20, 1);\r\n}", "title": "" }, { "docid": "ccf614a6316e0abdf08597f16d2fc587", "score": "0.4379682", "text": "protected function getQwiserSearchResults(){\n \tif(Mage::helper('salesperson')->getSalespersonApi()->results)\n \t\treturn Mage::helper('salesperson')->getSalespersonApi()->results;\n }", "title": "" }, { "docid": "2fcb151e81bdb55304ef14e193c62359", "score": "0.43790632", "text": "function _build_common_query($user){\n $c = array();\n $c['joins'] = array(); \n $c['conditions'] = array();\n\n //What should we include....\n $c['contain'] = array(\n 'User',\n 'DynamicClientRealm' => array('Realm.name','Realm.id','Realm.available_to_siblings','Realm.user_id'),\n 'DynamicClientNote' => array('Note.note','Note.id','Note.available_to_siblings','Note.user_id'),\n );\n\n //===== SORT =====\n //Default values for sort and dir\n $sort = $this->modelClass.'.last_contact';\n $dir = 'DESC';\n\n if(isset($this->request->query['sort'])){\n if($this->request->query['sort'] == 'username'){\n $sort = 'User.username';\n }else{\n $sort = $this->modelClass.'.'.$this->request->query['sort'];\n }\n $dir = $this->request->query['dir'];\n } \n $c['order'] = array(\"$sort $dir\");\n //==== END SORT ===\n\n\n //====== REQUEST FILTER =====\n if(isset($this->request->query['filter'])){\n $filter = json_decode($this->request->query['filter']);\n foreach($filter as $f){\n\n $f = $this->GridFilter->xformFilter($f);\n\n //Strings\n if($f->type == 'string'){\n if($f->field == 'owner'){\n array_push($c['conditions'],array(\"User.username LIKE\" => '%'.$f->value.'%')); \n }else{\n $col = $this->modelClass.'.'.$f->field;\n array_push($c['conditions'],array(\"$col LIKE\" => '%'.$f->value.'%'));\n }\n }\n //Bools\n if($f->type == 'boolean'){\n $col = $this->modelClass.'.'.$f->field;\n array_push($c['conditions'],array(\"$col\" => $f->value));\n }\n }\n }\n //====== END REQUEST FILTER =====\n\n //====== AP FILTER =====\n //If the user is an AP; we need to add an extra clause to only show the LicensedDevices which he is allowed to see.\n if($user['group_name'] == Configure::read('group.ap')){ //AP\n $tree_array = array();\n $user_id = $user['id'];\n\n //**AP and upward in the tree**\n $this->parents = $this->User->getPath($user_id,'User.id');\n //So we loop this results asking for the parent nodes who have available_to_siblings = true\n foreach($this->parents as $i){\n $i_id = $i['User']['id'];\n if($i_id != $user_id){ //upstream\n array_push($tree_array,array($this->modelClass.'.user_id' => $i_id,$this->modelClass.'.available_to_siblings' => true));\n }else{\n array_push($tree_array,array($this->modelClass.'.user_id' => $i_id));\n }\n }\n //** ALL the AP's children\n $this->children = $this->User->find_access_provider_children($user['id']);\n if($this->children){ //Only if the AP has any children...\n foreach($this->children as $i){\n $id = $i['id'];\n array_push($tree_array,array($this->modelClass.'.user_id' => $id));\n } \n } \n //Add it as an OR clause\n array_push($c['conditions'],array('OR' => $tree_array)); \n } \n //====== END AP FILTER ===== \n return $c;\n }", "title": "" }, { "docid": "3d99e08f85a83de4a55527b1c43b9c15", "score": "0.43734643", "text": "public function testReplyToAliasEmail()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "3b83533005ce74cff8dbebaa5102d474", "score": "0.4369225", "text": "protected function getSupportedDomains(): array {\n return [self::WILDCARD_DOMAIN];\n }", "title": "" }, { "docid": "e3d21132f3ee06e410ef97a7dca663da", "score": "0.43688428", "text": "function get_main_sponsor2($country_name, $sponsor_key)\r\n\t{\r\n\t\t// NOTE: the path of the include file!!!\t\r\n\t\tinclude \"../lib/sponsors_array.php\";\r\n\t\t\r\n\t\t$html = \"\";\r\n\t\t$count = 0;\r\n\t\t$main_count = 1;\r\n\t\t\r\n\t\tglobal $main_sponsors;\t\t\r\n\t\t$main_sponsors = array();\r\n\t\t\r\n\t\tforeach ($COUNTRY_SPONSORS as $INFO) {\r\n\t\t\tif ($INFO['country'] == $country_name) {\r\n\t\t\t\tforeach ($INFO['main_sponsors'.$sponsor_key] as $main_sponsor_name) {\r\n\t\t\t\t\tif ($SPONSORS[$main_sponsor_name]['logo_full'] == \"yes\") {\r\n\t\t\t\t\t\t$size = \"logo_xl\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($SPONSORS[$main_sponsor_name]['logo_lg'] == \"yes\") {\r\n\t\t\t\t\t\t$size = \"logo_l\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($SPONSORS[$main_sponsor_name]['logo_med'] == \"yes\") {\r\n\t\t\t\t\t\t$size = \"logo_m\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ($SPONSORS[$main_sponsor_name]['logo_sm'] == \"yes\") {\r\n\t\t\t\t\t\t$size = \"logo_s\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(!empty($main_sponsor_name)) {\r\n\t\t\t\t\t$main_sponsors[$count] = \"<a target='blank' href='\" . $SPONSORS[$main_sponsor_name]['url'] . \"'><img src='\" . $SPONSORS[$main_sponsor_name][$size] . \"' alt='\" . $SPONSORS[$main_sponsor_name]['title_desc'] . \"' /></a>\";\r\n\t\t\t\t\t$count++;\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}\r\n\t\t//print_r($main_sponsors);\r\n\t\t//return $main_sponsors;\r\n\t\tshuffle($main_sponsors);\r\n\t\treturn $main_sponsors[0];\r\n\t\t\r\n\t}", "title": "" }, { "docid": "1e6776db6352e728af063f11926b2148", "score": "0.4366619", "text": "public function _getConfiguredDomains() {\n $domains = array();\n if(empty($this->conf['account_suffix'])) return $domains; // not configured yet\n\n // add default domain, using the name from account suffix\n $domains[''] = ltrim($this->conf['account_suffix'], '@');\n\n // find additional domains\n foreach($this->conf as $key => $val) {\n if(is_array($val) && isset($val['account_suffix'])) {\n $domains[$key] = ltrim($val['account_suffix'], '@');\n }\n }\n ksort($domains);\n\n return $domains;\n }", "title": "" }, { "docid": "4ed38fb0598d2fa3afff1d1a51a886fc", "score": "0.4350887", "text": "public function meta()\r\n {\r\n $domainrobot = new Domainrobot([\r\n \"url\" => \"https://api.autodns.com/v1/service/pricer\",\r\n \"auth\" => new DomainrobotAuth([\r\n \"user\" => \"username\",\r\n \"password\" => \"password\",\r\n \"context\" => 4\r\n ])\r\n ]);\r\n\r\n try {\r\n\r\n $user = \"InterNetX\"; // User to search after \r\n\r\n $apiSocialMediaResponse = $domainrobot->pcDomains->smuCheck($user);\r\n\r\n } catch (DomainrobotException $exception) {\r\n return $exception;\r\n }\r\n \r\n return $apiSocialMediaResponse;\r\n }", "title": "" }, { "docid": "321358fbbeb0f7569ba2b4da0ef660d9", "score": "0.4350667", "text": "public static function socialAccounts()\n {\n return [\n 'facebook' => 'https://www.facebook.com/app.mimics/',\n 'twitter' => 'https://twitter.com/app_mimic',\n //'reddit' => 'https://www.reddit.com/r/Mimic_app/',\n //'steemit' => 'https://steemit.com/@dariot/feed',\n //'telegram' => 'https://t.me/joinchat/Gw8zPA_0YttHagXJeBwbsw',\n 'instagram' => 'https://www.instagram.com/app_mimic/',\n ];\n }", "title": "" }, { "docid": "868dc0704d4a3d63cf779a110bbe32e2", "score": "0.43482205", "text": "function dispatch_external_members_email($cattype = 'service', $rfpid = 0, $userid = 0, $project_title = '', $bid_details = '', $end_date = '', $invitelist = array(), $invitemessage = '', $skipemailprocess = 0)\r\n {\r\n global $ilance, $ilpage, $ilconfig, $phrase;\r\n \r\n $ilance->email = construct_dm_object('email', $ilance);\r\n \r\n // send out invitations based on any email address and first names supplied on the auction posting interface\r\n if (isset($invitelist) AND !empty($invitelist) AND is_array($invitelist))\r\n {\r\n foreach ($invitelist['email'] as $key => $email)\r\n {\r\n $name = $invitelist['name'][\"$key\"];\r\n if (!empty($email) AND !empty($name))\r\n {\r\n if ($email == $_SESSION['ilancedata']['user']['email'] OR is_valid_email($email) == false)\r\n \t\t//if (fetch_user('user_id', '', '', $email) > 0 OR $email == $_SESSION['ilancedata']['user']['email'] OR is_valid_email($email) == false)\r\n {\r\n // don't send if:\r\n // 1. if user is sending invitation to himself\r\n // 2. if user email is email being used to send invitation to himself\r\n // 3. if is_valid_email() determines that email is bad or not formatted properly\r\n }\r\n else\r\n {\r\n \t\t$inv_user_id = (fetch_user('user_id', '', '', $email) > 0) ? fetch_user('user_id', '', '', $email) : '-1';\r\n // todo: detect is seo is enabled\r\n $url = HTTP_SERVER . $ilpage['rfp'] . '?rid=' . $_SESSION['ilancedata']['user']['ridcode'] . '&id=' . intval($rfpid) . '&invited=1&e=' . $email;\r\n \r\n $comment = $phrase['_no_message_was_provided'];\r\n if (isset($invitemessage) AND !empty($invitemessage))\r\n {\r\n $comment = strip_tags($invitemessage);\r\n }\r\n \r\n $sql3 = $ilance->db->query(\"\r\n SELECT *\r\n FROM \" . DB_PREFIX . \"project_invitations\r\n WHERE email = '\" . trim($ilance->db->escape_string($email)) . \"'\r\n AND project_id = '\" . intval($rfpid) . \"'\r\n \", 0, null, __FILE__, __LINE__);\r\n if ($ilance->db->num_rows($sql3) == 0)\r\n {\r\n // invited users don't exist for this auction.. invite them\r\n if ($cattype == 'service')\r\n {\r\n $ilance->db->query(\"\r\n INSERT INTO \" . DB_PREFIX . \"project_invitations\r\n (id, project_id, buyer_user_id, seller_user_id, email, name, invite_message, date_of_invite, bid_placed)\r\n VALUES(\r\n NULL,\r\n '\" . intval($rfpid) . \"',\r\n '\" . intval($userid) . \"',\r\n '\" . intval($inv_user_id) . \"',\r\n '\" . $ilance->db->escape_string($email) . \"',\r\n '\" . $ilance->db->escape_string($name) . \"',\r\n '\" . $ilance->db->escape_string($comment) . \"',\r\n '\" . DATETIME24H . \"',\r\n 'no')\r\n \", 0, null, __FILE__, __LINE__);\r\n }\r\n else if ($cattype == 'product')\r\n {\r\n $ilance->db->query(\"\r\n INSERT INTO \" . DB_PREFIX . \"project_invitations\r\n (id, project_id, buyer_user_id, seller_user_id, email, name, invite_message, date_of_invite, bid_placed)\r\n VALUES(\r\n NULL,\r\n '\" . intval($rfpid) . \"',\r\n '\" . intval($inv_user_id) . \"',\r\n '\" . intval($userid) . \"',\r\n '\" . $ilance->db->escape_string($email) . \"',\r\n '\" . $ilance->db->escape_string($name) . \"',\r\n '\" . $ilance->db->escape_string($comment) . \"',\r\n '\" . DATETIME24H . \"',\r\n 'no')\r\n \", 0, null, __FILE__, __LINE__); \r\n }\r\n \r\n // are we constructing new auction from an API call?\r\n if ($skipemailprocess == 0)\r\n {\r\n // no api being used, proceed to dispatching email\r\n $ilance->email->mail = $email;\r\n $ilance->email->slng = $_SESSION['ilancedata']['user']['slng'];\r\n \r\n $ilance->email->get('invited_to_place_bid');\t\t\r\n $ilance->email->set(array(\r\n '{{invitee}}' => ucfirst($name),\r\n '{{firstname}}' => ucfirst($_SESSION['ilancedata']['user']['firstname']),\r\n '{{lastname}}' => ucfirst($_SESSION['ilancedata']['user']['lastname']),\r\n '{{username}}' => $_SESSION['ilancedata']['user']['username'],\r\n '{{projectname}}' => $project_title,\r\n '{{bidprivacy}}' => ucfirst($bid_details),\r\n '{{bidends}}' => print_date($end_date, $ilconfig['globalserverlocale_globaltimeformat'], 0, 0, 0, 0),\r\n '{{message}}' => $comment,\r\n '{{url}}' => $url,\r\n '{{ridcode}}' => $_SESSION['ilancedata']['user']['ridcode'],\r\n ));\r\n \r\n $ilance->email->send();\r\n }\r\n }\r\n else\r\n {\r\n // this invited user was already invited.. send email..\r\n if ($skipemailprocess == 0)\r\n {\r\n // no api being used, proceed to dispatching email\r\n $ilance->email->mail = $email;\r\n $ilance->email->slng = $_SESSION['ilancedata']['user']['slng'];\r\n \r\n $ilance->email->get('invited_to_place_bid');\t\t\r\n $ilance->email->set(array(\r\n '{{invitee}}' => ucfirst($name),\r\n '{{firstname}}' => ucfirst($_SESSION['ilancedata']['user']['firstname']),\r\n '{{lastname}}' => ucfirst($_SESSION['ilancedata']['user']['lastname']),\r\n '{{username}}' => $_SESSION['ilancedata']['user']['username'],\r\n '{{projectname}}' => $project_title,\r\n '{{bidprivacy}}' => ucfirst($bid_details),\r\n '{{bidends}}' => print_date($end_date, $ilconfig['globalserverlocale_globaltimeformat'], 0, 0, 0, 0),\r\n '{{message}}' => $comment,\r\n '{{url}}' => $url,\r\n '{{ridcode}}' => $_SESSION['ilancedata']['user']['ridcode'],\r\n ));\r\n \r\n $ilance->email->send();\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n // invite list is empty (we must be opening a previously saved draft)\r\n // check if we have any externally invited users to dispatch email to\r\n $sql3 = $ilance->db->query(\"\r\n SELECT *\r\n FROM \" . DB_PREFIX . \"project_invitations\r\n WHERE project_id = '\" . intval($rfpid) . \"'\r\n AND email != ''\r\n AND name != ''\r\n \", 0, null, __FILE__, __LINE__);\r\n if ($ilance->db->num_rows($sql3) > 0)\r\n {\r\n while ($res3 = $ilance->db->fetch_array($sql3))\r\n {\r\n // are we constructing new auction from an API call?\r\n if ($skipemailprocess == 0)\r\n {\r\n $comment = $phrase['_no_message_was_provided'];\r\n if (!empty($res3['invite_message']))\r\n {\r\n $comment = strip_tags($res3['invite_message']);\r\n }\r\n \r\n // todo: detect is seo is enabled\r\n $url = HTTP_SERVER . $ilpage['rfp'] . '?rid=' . $_SESSION['ilancedata']['user']['ridcode'] . '&amp;id=' . intval($rfpid) . '&amp;invited=1&amp;e=' . $res3['email'];\r\n \r\n $ilance->email->mail = $res3['email'];\r\n $ilance->email->slng = $_SESSION['ilancedata']['user']['slng'];\r\n \r\n $ilance->email->get('invited_to_place_bid');\t\t\r\n $ilance->email->set(array(\r\n '{{invitee}}' => ucfirst($res3['name']),\r\n '{{firstname}}' => ucfirst($_SESSION['ilancedata']['user']['firstname']),\r\n '{{lastname}}' => ucfirst($_SESSION['ilancedata']['user']['lastname']),\r\n '{{username}}' => $_SESSION['ilancedata']['user']['username'],\r\n '{{projectname}}' => $project_title,\r\n '{{bidprivacy}}' => ucfirst($bid_details),\r\n '{{bidends}}' => print_date($end_date, $ilconfig['globalserverlocale_globaltimeformat'], 0, 0, 0, 0),\r\n '{{message}}' => $comment,\r\n '{{url}}' => $url,\r\n '{{ridcode}}' => $_SESSION['ilancedata']['user']['ridcode'],\r\n ));\r\n \r\n $ilance->email->send();\r\n } \r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "7c99d7db432b2e79fc19f33ee7494c2c", "score": "0.4347301", "text": "function onepiece_global_share_entities() {\n\n\n\n\t// contruct the global array\n global $onepiece_share_entities;\n\n\n\n $onepiece_share_entities = array(\n\n\t\t\"email\" => array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'Email',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Email\",\n\t\t\t\t\"l_icon\"=> 'fa:envelope-square', // testing font awsome https://icons8.com/welovesvg\n\t\t\t\t\"l_url\" => \"mailto:?\",\n\t\t\t\t//\"l_attr\" => 'data-action=', //unused properties kept in place for future changes\n\n\t\t\t\t\"s_url\" => \"Body=\",\n\t\t\t\t\"s_ttl\" => \"Subject=\",\n\t\t\t\t//\"s_txt\" => \"text=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\n\t\t\"google\" => array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'Google',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Google+\", \t\t\t\t\t\t\t// link name\n\t\t\t\t\"l_icon\"=> 'fa:google-plus-square', \t\t\t// link icon\n\t\t\t\t\"l_url\" => \"https://plus.google.com/share?\", \t// link url\n\t\t\t\t//\"l_attr\" => \"data-action=\", \t\t\t\t\t// link data-action attribute\n\n\t\t\t\t\"s_url\" => \"url=\", \t\t\t\t\t\t\t\t// share url\n\t\t\t\t//\"s_txt\" => \"text=\", \t\t\t\t\t\t\t// share description\n\t\t\t\t//\"s_ttl\" => \"title=\", \t\t\t\t\t\t\t// share title\n\t\t\t\t//\"s_img\" => \"media=\", \t\t\t\t\t\t\t// share image\n\t\t\t\t//\"s_via\" => \"via=\", \t\t\t\t\t\t\t// share via/source\n\t\t\t),\n\t\t\t//'api' => Array(),\n\t\t),\n\n\t\t\"linkedin\" => array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'LinkedIn',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Linkedin\",\n\t\t\t\t\"l_icon\"=> 'fa:linkedin-square',\n\t\t\t\t\"l_url\" => \"http://www.linkedin.com/shareArticle?mini=true&\",\n\t\t\t\t//\"l_attr\" => \"data-action=\"\n\n\t\t\t\t\"s_url\" => \"url=\",\n\t\t\t\t\"s_ttl\" => \"title=\",\n\t\t\t\t\"s_txt\" => \"summary=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t\"s_via\" => \"source=\",\n\t\t\t),\n\t\t),\n\n\t\t\"facebook\" => array(\n\t\t\t'company' => array(\n\t\t\t\t\t'name' => 'Facebook',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Facebook\",\n\t\t\t\t\"l_icon\"=> 'fa:facebook-square',\n\t\t\t\t\"l_url\" => \"https://www.facebook.com/sharer/sharer.php?\",\n\t\t\t\t//\"l_attr\" => \"data-action=\",\n\n\t\t\t\t\"s_url\" => \"u=\",\n\t\t\t\t\"s_ttl\" => \"title=\",\n\t\t\t\t//\"s_txt\" => \"text=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\n\t\t\"whatsapp\" => array(\n\t\t\t'company' => array(\n\t\t\t\t\t'name' => 'Whatsapp',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Whatsapp\",\n\t\t\t\t\"l_icon\"=> 'fa:whatsapp',\n\t\t\t\t\"l_url\" => \"whatsapp://send?\",\n\t\t\t\t\"l_attr\" => 'data-action=\"share/whatsapp/share\"',\n\n\t\t\t\t//\"s_url\" => \"u=\",\n\t\t\t\t//\"s_ttl\" => \"\",\n\t\t\t\t\"s_txt\" => \"text=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\n\t\t\"pinterest\" => array(\n\t\t\t'company' => array(\n\t\t\t\t\t'name' => 'Pinterest',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Pinterest\",\n\t\t\t\t\"l_icon\"=> 'fa:pinterest-square',\n\t\t\t\t\"l_url\" => \"http://pinterest.com/pin/create/bookmarklet/?\",\n\t\t\t\t//\"l_attr\" => 'data-action=',\n\n\t\t\t\t\"s_url\" => \"url=\",\n\t\t\t\t\"s_ttl\" => \"description=\",\n\t\t\t\t//\"s_txt\" => \"description=\",\n\t\t\t\t\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\n\t\t\"twitter\" => array(\n\t\t\t'company' => array(\n\t\t\t\t\t'name' => 'Twitter',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Twitter\",\n\t\t\t\t\"l_icon\"=> 'fa:twitter-square',\n\t\t\t\t\"l_url\" => \"https://twitter.com/intent/tweet?\",\n\t\t\t\t//\"l_attr\" => \"data-action=\",\n\t\t\t\t\"s_url\" => \"url=\",\n\t\t\t\t//\"s_ttl\" => \"\",\n\t\t\t\t\"s_txt\" => \"text=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\n\t\t\"tumblr\" => array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'Tumblr',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Tumblr\",\n\t\t\t\t\"l_icon\"=> 'fa:tumblr-square',\n\t\t\t\t\"l_url\" => \"http://www.tumblr.com/share?v=3&\",\n\t\t\t\t//\"l_attr\" => 'data-action=',\n\n\t\t\t\t\"s_url\" => \"u=\",\n\t\t\t\t\"s_ttl\" => \"t=\",\n\t\t\t\t//\"s_txt\" => \"desc=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\n\t\t\"reddit\" => array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'Reddit',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Reddit\",\n\t\t\t\t\"l_icon\"=> 'fa:reddit-square',\n\t\t\t\t\"l_url\" => \"http://www.reddit.com/submit?\",\n\t\t\t\t//\"l_attr\" => 'data-action=',\n\n\t\t\t\t\"s_url\" => \"url=\",\n\t\t\t\t\"s_ttl\" => \"title=\",\n\t\t\t\t//\"s_txt\" => \"desc=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t), // http://www.reddit.com/submit?url=[URL]&title=[TITLE]\n\n\t\t\"friendfeed\"> array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'Friendfeed',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Friendfeed\",\n\t\t\t\t\"l_icon\"=> 'brandico:friendfeed-rect',\n\t\t\t\t\"l_url\" => \"http://www.friendfeed.com/share?u\",\n\t\t\t\t//\"l_attr\" => 'data-action=',\n\n\t\t\t\t\"s_url\" => \"url=\",\n\t\t\t\t\"s_ttl\" => \"title=\",\n\t\t\t\t//\"s_txt\" => \"desc=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t), // http://www.friendfeed.com/share?url=[URL]&title=[TITLE]\n\n\t\t/* // need better icon\n\t\t\"stumbleupon\" => array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'Stumbleupon',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Stumbleupon\",\n\t\t\t\t\"l_icon\"=> 'fa:stumbleupon',\n\t\t\t\t\"l_url\" => \"http://www.stumbleupon.com/submit?\",\n\t\t\t\t//\"l_attr\" => 'data-action=',\n\n\t\t\t\t\"s_url\" => \"url=\",\n\t\t\t\t\"s_ttl\" => \"title=\",\n\t\t\t\t//\"s_txt\" => \"desc=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\t\t*/ //http://www.stumbleupon.com/submit?url=[URL]&title=[TITLE]\n\n\t\t // need better icon\n\t\t\"evernote\" => array(\n\t\t\t'company' => array(\n\t\t\t\t'name' => 'Evernote',\n\t\t\t),\n\t\t\t'share' => array(\n\t\t\t\t\"l_name\"=> \"Evernote\",\n\t\t\t\t\"l_icon\"=> 'lsf:evernote', // foundation:social-evernote', //webhostinghub:evernote\n\t\t\t\t\"l_url\" => \"http://www.evernote.com/clip.action?\",\n\t\t\t\t//\"l_attr\" => 'data-action=',\n\n\t\t\t\t\"s_url\" => \"url=\",\n\t\t\t\t\"s_ttl\" => \"title=\",\n\t\t\t\t//\"s_txt\" => \"desc=\",\n\t\t\t\t//\"s_img\" => \"media=\",\n\t\t\t\t//\"s_via\" => \"via=\",\n\t\t\t),\n\t\t),\n\t\t // http://www.evernote.com/clip.action?url=[URL]&title=[TITLE]\n\n\t\t'slashdot' => array(), // http://slashdot.org/bookmark.pl?url=[URL]&title=[TITLE]\n\t\t'technorati' => array(),// http://technorati.com/faves?add=[URL]&title=[TITLE]\n\t\t'tapiture' => array(), // http://tapiture.com/bookmarklet/image?img_src=[IMAGE]&page_url=[URL]&page_title=[TITLE]&img_title=[TITLE]&img_width=[IMG WIDTH]img_height=[IMG HEIGHT]\n\t\t'posterous' => array(), // http://posterous.com/share?linkto=[URL]\n\n\t\t'delicious' => array(), // http://del.icio.us/post?url=[URL]&title=[TITLE]&notes=[DESCRIPTION]\n\t\t'newsvine' => array(), // http://www.newsvine.com/_tools/seed&save?u=[URL]&h=[TITLE]\n\n\t\t// Google Bookmarks // http://www.google.com/bookmarks/mark?op=edit&bkmk=[URL]&title=[title]&annotation=[DESCRIPTION]\n\t\t// Ping.fm // http://ping.fm/ref/?link=[URL]&title=[TITLE]&body=[DESCRIPTION]\n\t\t// 'instagram' => array(),\n\t\t//'github' => array(),\n\t\t//'gitlab' => array(),\n\n\t\t// source: http://petragregorova.com/articles/social-share-buttons-with-custom-icons/\n\n\t\t);\n\n}", "title": "" }, { "docid": "f48a7ef674c9cc258ec6a6e5679a3a0c", "score": "0.43472755", "text": "public function testDiscoverVariousIdentities()\n\t{\n\t\t$identities = array(\n\t\t\t'[email protected]',\n\t\t\t// yahoo does not follow the spec properly when resolving a template \n\t\t\t// the email must provided without acct: scheme also the xrd \n\t\t\t// document gets served as text/plain\n\t\t\t//'[email protected]',\n\t\t\t'[email protected]', \n\t\t\t'[email protected]', \n\t\t\t'[email protected]', \n\t\t\t'[email protected]', \n\t\t\t'[email protected]',\n\t\t);\n\n\t\tforeach($identities as $identity)\n\t\t{\n\t\t\t$document = $this->webfinger->discoverByEmail($identity);\n\n\t\t\t$this->assertInstanceOf('PSX\\Hostmeta\\DocumentAbstract', $document);\n\t\t}\n\t}", "title": "" }, { "docid": "b1a7dec21cac0f39b46f92ece0eeb4d5", "score": "0.4342651", "text": "public function actionAutoLink()\n {\n $mailMessages = Mail::find()\n ->select(['id', 'subject', 'from', 'to', 'cc', 'bcc'])\n ->where(['case_id'=>0])\n ->orderBy('created_at DESC')\n ->limit(100)\n ->asArray()\n ->all();\n\n foreach ($mailMessages as $message) {\n echo '<hr>', '<a href=\"/mails/r/', $message['id'], '\">', $message['id'].$message['subject'] , '</a> FROM:', $message['subject'], ' TO:', $message['to'];\n $from = $message['from'];\n $to = $message['to'];\n $cc = $message['cc'];\n $bcc = $message['bcc'];\n\n $addresses = $this->getEmails(implode(' ', [$from, $to, $cc, $bcc]));\n\n $hasPax = false; // Co dia chi ngoai\n $hasIms = false; // Co dia chi ims@\n\n $excludeList = [\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n ];\n\n foreach ($addresses as $address) {\n if (!in_array($address, $excludeList) && strpos($address, '@amicatravel.com') === false && strpos($address, '@amica-travel.com') === false && strpos($address, '@amicatravel.org') === false) {\n $hasPax = true;\n }\n }\n\n if (in_array('[email protected]', $addresses)) {\n $hasIms = true;\n }\n\n // Get email rule\n $email = $addresses[0];\n if (strpos($addresses[0], '@amicatravel.com') !== false && strpos($addresses[0], '@amica-travel.com') !== false && strpos($addresses[0], '@amicatravel.org') !== false) {\n $email = $addresses[1];\n }\n\n $sql = 'SELECT * FROM at_email_mapping WHERE email=:email LIMIT 1';\n $mapping = Yii::$app->db->createCommand($sql, [':email'=>$email])->queryOne();\n if ($mapping) { \n if ($mapping['action'] == 'drop') {\n // Drop email immediately\n } elseif ($mapping['action'] == 'ask') {\n // Ask every time\n // TODO\n } else {\n echo '<a href=\"/cases/r/', $mapping['case_id'], '\">Case ID</a>';\n }\n }\n\n }\n }", "title": "" }, { "docid": "ebe48b0c12c82f1e014852489c7aabe6", "score": "0.43391868", "text": "function houndstooth_contactmethods( $contactmethods ) {\n // Add Twitter\n $contactmethods['twitter'] = 'Twitter';\n //add Facebook\n $contactmethods['facebook'] = 'Facebook';\n //add Google+\n $contactmethods['google'] = 'Google+';\n //add LinkedIn\n $contactmethods['linkedin'] = 'LinkedIn';\n \n return $contactmethods;\n}", "title": "" }, { "docid": "8fc25e68fc7055536080b1eaa10bd6f9", "score": "0.43391263", "text": "function wc_talk_contactmethods( $methods = array() ) {\n\t// Get rid of g+\n\tif ( ! empty( $methods['googleplus'] ) ) {\n\t\tunset( $methods['googleplus'] );\n\t}\n\n\treturn array_merge(\n\t\t$methods,\n\t\tarray(\n\t\t\t'company' => __( 'Company', 'wc-talk' ),\n\t\t\t'phone' => __( 'Phone number', 'wc-talk' ),\n\t\t\t'twitter' => __( 'Twitter account', 'wc-talk' ),\n\t\t)\n\t);\n}", "title": "" }, { "docid": "18eae2fcf85b16667df96028b16d5f2b", "score": "0.43370476", "text": "public function relatingHandler();", "title": "" }, { "docid": "da3f9d4c7e8ddf9cd46e625d6becfe98", "score": "0.43349522", "text": "function unbound_host_override_exists($hostname, $domain) {\n // Local variables\n global $err_lib, $config;\n $curr_hosts = array();\n $host_exists = false;\n // Check if host override already exists\n if (array_key_exists(\"hosts\", $config[\"unbound\"])) {\n $curr_hosts = $config[\"unbound\"][\"hosts\"];\n }\n foreach ($curr_hosts as $host_ent) {\n if ($host_ent[\"host\"] === $hostname and $host_ent[\"domain\"] === $domain) {\n $host_exists = true;\n break;\n }\n if (is_array($host_ent[\"aliases\"])) {\n foreach ($host_ent[\"aliases\"][\"item\"] as $alias_ent) {\n if ($alias_ent[\"host\"] === $hostname and $alias_ent[\"domain\"] === $domain) {\n $host_exists = true;\n break;\n }\n }\n }\n }\n return $host_exists;\n}", "title": "" }, { "docid": "b1b6032a944c85b3135239f756e29f80", "score": "0.43332663", "text": "function _og_mailinglist_filter_unknown_client4b_quotes($text) {\n $regex = \"/-----\\sOriginal\\sMessage\\s-----.*?From:\\s.*?\\<.*?@.*?\\>.*?To:\\s.*?Subject:\\s.*?Date:\\s\\w*?,\\s\\d{1,2}\\s\\w*?\\s\\d{4}\\s\\d{1,2}:\\d{2}:\\d{2}\\s.*/s\";\n preg_match($regex, $text, $matches);\n if (!empty($matches)) {\n return $matches;\n }\n else {\n return array();\n }\n}", "title": "" }, { "docid": "65de6d2b1bb2cc61dd4dd076548f0261", "score": "0.43290573", "text": "function projets_sites_autoriser(){}", "title": "" }, { "docid": "0d8d92df2d9fb9e5a92b66bbe1987748", "score": "0.4328001", "text": "public function getContacts();", "title": "" }, { "docid": "c0450e4c8c0178f846abeb93fef59a20", "score": "0.43276018", "text": "function Correo($destinos='[email protected]',$asunto='WebMaster - RastaGeek',$cuerpo='<h1><br>Mail de Prueba</br></h1>',$remitente='RastaGeeK <[email protected]>',$retraso='0',$ReplyTo='',$Cc='nada',$Bcc='nada') \r\n{\t\r\n\t\t$destinos = explode('*,*',$destinos);\r\n \t\t$total = count($destinos) - 1;\r\n \r\n \t\tforeach($destinos as $id => $destino)\r\n\t\t{\r\n\t\t\t//para el envío en formato HTML \r\n\t\t\t$headers = \"MIME-Version: 1.0\\r\\n\"; \r\n\t\t\t$headers .= \"Content-type: text/html; charset=iso-8859-1\\r\\n\"; \r\n\t\t\t\r\n\t\t\t//dirección del remitente \r\n\t\t\t$headers .= \"From: \".$remitente.\"\\r\\n\"; \r\n\t\t\t\r\n\t\t\t//dirección de respuesta, si queremos que sea distinta que la del remitente \r\n\t\t\tif($ReplyTo == '')\r\n\t\t\t\t$ReplyTo = $remitente;\r\n\t\t\t\t\r\n\t\t\t$headers .= \"Reply-To:\".$ReplyTo; \r\n\t\t\t\r\n\t\t\t//direcciones que recibián copia \r\n\t\t\tif(($Cc != 'nada') && ($total == 0))\r\n\t\t\t\t$headers .= \"Cc: \".$Cc.\"\\r\\n\"; \r\n\t\t\t\r\n\t\t\t//direcciones que recibirán copia oculta \r\n\t\t\tif(($Bcc != 'nada') && ($total == 0))\r\n\t\t\t\t$headers .= \"Bcc: \".$Bcc.\"\\r\\n\"; \t\r\n\t\t\t\t\r\n\t\t\t//Enviando Correo\r\n\t\t\tif(mail($destino,$asunto,$cuerpo,$headers) == True)\r\n\t\t\t\t{\r\n\t\t\t\t\t$_sendMails_OK = $_sendMails_OK + 1;\r\n\t\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t$_sendMails_Error = $_sendMails_Error + 1;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t// Tiempo de Retardo de envio por cada correo\r\n\t\t\tsleep($retraso);\r\n \t\t} \r\n\t\t\r\n\t\t$_sendMails = array('send' => $_sendMails_OK,\r\n\t\t\t\t\t\t 'error' => $_sendMails_Error);\r\n\t\t\t\t\t\t\t\r\n\t\treturn ($_sendMails);\r\n}", "title": "" }, { "docid": "de0a960078d4a4db92caf770b2da460b", "score": "0.43273136", "text": "public function getAssociatedDomains()\n {\n if (array_key_exists(\"associatedDomains\", $this->_propDict)) {\n return $this->_propDict[\"associatedDomains\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "3096242b3d3bbe2e299bbb1bba68b5d3", "score": "0.43242744", "text": "protected function checkClients(){\n if ((empty($this->config->clients) !== true) \n && (in_array($_SERVER['REMOTE_ADDR'], (array) $this->config->clients) !== true)){\n throw new Exception(\"Cannot perform this operation from this url\",ODataResponse::E_forbidden);\n }\n }", "title": "" }, { "docid": "16b0ba88b0ec001aa0c3aa3b1fe3e960", "score": "0.432395", "text": "public function getMessagePersons();", "title": "" }, { "docid": "016fc15a2b2bad5ecf2180fdc223fbb9", "score": "0.43215305", "text": "public function shareWithGroupMembersOnly();", "title": "" }, { "docid": "57494869141d4b0d0600d292523d7fb2", "score": "0.43195006", "text": "function _jr_email_headers( $headers ='' ) {\n\t// Strip 'www.' from URL\n\t$domain = preg_replace( '#^www\\.#', '', strtolower( $_SERVER['SERVER_NAME'] ) );\n\n\tif ( ! $headers ) $headers = sprintf( 'From: %1$s <%2$s', get_bloginfo( 'name' ), \"wordpress@$domain\" ) . PHP_EOL;\n\treturn apply_filters( 'jr_email_headers', $headers ) ;\n}", "title": "" }, { "docid": "8c9d45745a80d3a28d8294adc8f4cba4", "score": "0.43170866", "text": "function COXYMallNewsletters() {\r\n\t}", "title": "" }, { "docid": "0f628d2e71172389c14bb58be51ddf8d", "score": "0.43158904", "text": "private function get_people() {\n\n\t\t$people = [];\n\n\t\tforeach ( $this->mailcatcher->getToAddresses() as $to ) {\n\t\t\t$people['to'][] = $to[0];\n\t\t}\n\t\tforeach ( $this->mailcatcher->getCcAddresses() as $cc ) {\n\t\t\t$people['cc'][] = $cc[0];\n\t\t}\n\t\tforeach ( $this->mailcatcher->getBccAddresses() as $bcc ) {\n\t\t\t$people['bcc'][] = $bcc[0];\n\t\t}\n\n\t\t$people['from'] = $this->mailcatcher->From;\n\n\t\treturn $people;\n\t}", "title": "" }, { "docid": "4e66b98f5c1f6b5a428a514b4ac7ffd9", "score": "0.4315405", "text": "function is_automail2($mailobject, $uid, $subject, $msgHeaders, $queue=0)\n\t{\n\t\t// This array can be filled with checks that should be made.\n\t\t// 'bounces' and 'autoreplies' (level 1) are the keys coded below, the level 2 arrays\n\t\t// must match $msgHeader properties.\n\t\t//\n\t\t$autoMails = array(\n\t\t\t 'bounces' => array(\n\t\t\t\t 'subject' => array(\n\t\t\t\t)\n\t\t\t\t,'from' => array(\n\t\t\t\t\t 'mailer-daemon'\n\t\t\t\t)\n\t\t\t)\n\t\t\t,'autoreplies' => array(\n\t\t\t\t 'subject' => array(\n\t\t\t\t\t 'out of the office',\n\t\t\t\t\t 'out of office',\n\t\t\t\t\t 'autoreply'\n\t\t\t\t\t)\n\t\t\t\t,'auto-submitted' => array(\n\t\t\t\t\t'auto-replied'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t// Check for bounced messages\n\t\tforeach ($autoMails['bounces'] as $_k => $_v) {\n\t\t\tif (count($_v) == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_re = '/(' . implode('|', $_v) . ')/i';\n\t\t\tif (preg_match($_re, $msgHeader[strtoupper($_k)])) {\n\t\t\t\tswitch ($this->mailhandling[0]['bounces']) {\n\t\t\t\t\tcase 'delete' :\t\t// Delete, whatever the overall delete setting is\n\t\t\t\t\t\t$returnVal = $mailobject->deleteMessages($uid, $_folderName, 'move_to_trash');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'forward' :\t// Return the status of the forward attempt\n\t\t\t\t\t\t$returnVal = $this->forward_message2($mailobject, $uid, $mailcontent['subject'], lang(\"automatic mails (bounces) are configured to be forwarded\"), $queue);\n\t\t\t\t\t\tif ($returnVal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mailobject->flagMessages('seen', $uid, $_folderName);\n\t\t\t\t\t\t\t$mailobject->flagMessages('forwarded', $uid, $_folderName);\n\t\t\t\t\t\t}\n\t\t\t\t\tdefault :\t\t\t// default: 'ignore'\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\t// Check for autoreplies\n\t\tforeach ($autoMails['autoreplies'] as $_k => $_v) {\n\t\t\tif (count($_v) == 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$_re = '/(' . implode('|', $_v) . ')/i';\n\t\t\tif (preg_match($_re, $msgHeader[strtoupper($_k)])) {\n\t\t\t\tswitch ($this->mailhandling[0]['autoreplies']) {\n\t\t\t\t\tcase 'delete' :\t\t// Delete, whatever the overall delete setting is\n\t\t\t\t\t\t$returnVal = $mailobject->deleteMessages($uid, $_folderName, 'move_to_trash');\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'forward' :\t// Return the status of the forward attempt\n\t\t\t\t\t\t$returnVal = $this->forward_message2($mailobject, $uid, $mailcontent['subject'], lang(\"automatic mails (replies) are configured to be forwarded\"), $queue);\n\t\t\t\t\t\tif ($returnVal)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mailobject->flagMessages('seen', $uid, $_folderName);\n\t\t\t\t\t\t\t$mailobject->flagMessages('forwarded', $uid, $_folderName);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'process' :\t// Process normally...\n\t\t\t\t\t\treturn false;\t// ...so act as if it's no automail\n\t\t\t\t\tdefault :\t\t\t// default: 'ignore'\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "486b32dd8909a40fc0d3e7283bde35b6", "score": "0.43139225", "text": "function gr_update_common_settings() {\n\n\tif ( 'Save Changes' !== gr_post( 'commentSubmit' ) ) {\n\t\treturn;\n\t}\n\n\t$comment_checkout_responder_enabled = $comment_selected_responder = null;\n\t$comment_campaign = gr_post( 'comment_checkout_campaign' );\n\t$comment_checkout_enabled = 'enabled' === gr_post( 'comment_status' ) ? 1 : 0;\n\n\tif ( $comment_checkout_enabled && empty( $comment_campaign ) ) {\n\t\tgr()->add_error_message( 'You need to select a contact list' );\n\n\t\treturn;\n\t}\n\n\tgr_update_option( 'comment_checkout_enabled', $comment_checkout_enabled );\n\n\tif ( $comment_checkout_enabled ) {\n\t\t$comment_label = gr_post( 'comment_checkout_label' );\n\n\t\tif ( !empty( $comment_label ) ) {\n\t\t\tgr_update_option( 'comment_checkout_label', $comment_label );\n\t\t}\n\n\t\t$comment_selected_responder = gr_post( 'comment_checkout_campaign_selected_autoresponder' );\n\t\t$comment_checkout_responder_enabled = 'on' === gr_post( 'comment_checkout_campaign_autoresponder_enabled' ) ? 1 : 0;\n\t}\n\n\tgr_update_option( 'comment_checkout_campaign', $comment_campaign );\n\tgr_update_option( 'comment_checkout_autoresponder_enabled', $comment_checkout_responder_enabled );\n\n\tgr_update_option( 'comment_checkout_selected_autoresponder', $comment_selected_responder );\n\n\t$comment_checked = null !== gr_post( 'comment_checked' ) ? 1 : 0;\n\n\tgr_update_option( 'comment_checked', $comment_checked );\n\n\tif ( gr()->buddypress->is_active() ) {\n\n\t\t$registration_enabled = 'enabled' === gr_post( 'buddypress_status' ) ? 1 : 0;\n\t\t$campaign = gr_post( 'bp_registration_campaign' );\n\n\t\tif ( $registration_enabled && empty( $campaign ) ) {\n\t\t\tgr()->add_error_message( 'You need to select a contact list' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tgr_update_option( 'bp_registration_on', $registration_enabled );\n\n\t\t$autoresponder_status = $autoresponder_id = $is_checked = null;\n\n\t\tif ( 1 === $registration_enabled ) {\n\n\t\t\t$label = gr_post( 'bp_registration_label' );\n\n\t\t\t$autoresponder_status = 'on' === gr_post( 'bp_registration_campaign_autoresponder_enabled' ) ? 1 : 0;\n\t\t\t$autoresponder_id = gr_post( 'bp_registration_campaign_selected_autoresponder' );\n\t\t\t$is_checked = gr_post( 'bp_registration_checked' );\n\n\t\t\tif ( !empty( $label ) ) {\n\t\t\t\tgr_update_option( 'bp_registration_label', $label );\n\t\t\t}\n\t\t}\n\n\t\tgr_update_option( 'bp_registration_campaign', $campaign );\n\t\tgr_update_option( 'bp_registration_campaign_autoresponder_status', $autoresponder_status );\n\t\tgr_update_option( 'bp_registration_campaign_autoresponder', $autoresponder_id );\n\t\tgr_update_option( 'bp_registration_checked', $is_checked );\n\n\t} else {\n\n\t\t$registration_checkout_enabled = 'enabled' === gr_post( 'register_status' ) ? 1 : 0;\n\t\t$registration_checkout_autoresponder_enabled = 'on' === gr_post( 'registration_checkout_campaign_autoresponder_enabled' ) ? 1 : 0;\n\n\t\t$registration_checkout_campaign = gr_post( 'registration_checkout_campaign' );\n\t\t$registration_checkout_label = gr_post( 'registration_checkout_label' );\n\n\t\tif ( $registration_checkout_enabled && empty( $registration_checkout_campaign ) ) {\n\t\t\tgr()->add_error_message( 'You need to select a contact list' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tif ($registration_checkout_enabled) {\n\n\t\t if (!empty($registration_checkout_label)) {\n\t\t\t gr_update_option( 'registration_checkout_label', $registration_checkout_label );\n }\n }\n\n\t\tgr_update_option( 'registration_checkout_enabled', $registration_checkout_enabled );\n\t\tgr_update_option( 'registration_checkout_autoresponder_enabled', $registration_checkout_autoresponder_enabled );\n\n\t\t$register_checked = null !== gr_post( 'registration_checked' ) ? 1 : 0;\n\n\t\tgr_update_option( 'registration_checkout_campaign', $registration_checkout_campaign );\n\t\tgr_update_option( 'registration_campaign_autoresponder',\n gr_post( 'registration_checkout_campaign_selected_autoresponder' ) );\n\t\tgr_update_option( 'registration_checked', $register_checked );\n\n\t}\n\n\tif ( gr()->contactForm7->is_active() ) {\n\n\t\t$cf7_status = 'enabled' === gr_post( 'contactFormStatus' ) ? 1 : 0;\n\t\t$cf7_campaign = gr_post( 'cf7_registration_campaign' );\n\n\t\tif ( $cf7_status && empty( $cf7_campaign ) ) {\n\t\t\tgr()->add_error_message( 'You need to select a contact list' );\n\n\t\t\treturn;\n\t\t}\n\n\t\tgr_update_option( 'cf7_registration_on', $cf7_status );\n\n\t\t$cf7_autoresponder_status = $cf7_autoresponder_id = null;\n\n\t\tif ( $cf7_status ) {\n\t\t\t$cf7_autoresponder_id = gr_post( 'cf7_registration_campaign_selected_autoresponder' );\n\t\t\t$cf7_autoresponder_status = 'on' === gr_post( 'cf7_registration_campaign_autoresponder_enabled' ) ? 1 : 0;\n\t\t}\n\n\t\tgr_update_option( 'cf7_registration_campaign', $cf7_campaign );\n\t\tgr_update_option( 'cf7_registration_campaign_autoresponder', $cf7_autoresponder_id );\n\t\tgr_update_option( 'cf7_registration_campaign_autoresponder_status', $cf7_autoresponder_status );\n\t}\n\n if ( gr()->ninjaForms->is_active() ) {\n\n $ninjaforms_status = 'enabled' === gr_post( 'contactNinjaFormStatus' ) ? 1 : 0;\n $ninjaforms_campaign = gr_post( 'ninjaforms_registration_campaign' );\n\n if ( $ninjaforms_status && empty( $ninjaforms_campaign ) ) {\n gr()->add_error_message( 'You need to select a contact list' );\n\n return;\n }\n\n gr_update_option( 'ninjaforms_registration_on', $ninjaforms_status );\n\n $ninjaforms_autoresponder_status = $ninjaforms_autoresponder_id = null;\n\n if ( $ninjaforms_status ) {\n $ninjaforms_autoresponder_id = gr_post( 'ninjaforms_registration_campaign_selected_autoresponder' );\n $ninjaforms_autoresponder_status = 'on' === gr_post( 'ninjaforms_registration_campaign_autoresponder_enabled' ) ? 1 : 0;\n }\n\n gr_update_option( 'ninjaforms_registration_campaign', $ninjaforms_campaign );\n gr_update_option( 'ninjaforms_registration_campaign_autoresponder', $ninjaforms_autoresponder_id );\n gr_update_option( 'ninjaforms_registration_campaign_autoresponder_status', $ninjaforms_autoresponder_status );\n }\n\n\tgr()->add_success_message( __( 'Settings saved', 'Gr_Integration' ) );\n\n\n}", "title": "" }, { "docid": "c90abb3f8125fdce9867f261763dcd32", "score": "0.43116242", "text": "public function commonRules() : array\n {\n return [];\n }", "title": "" }, { "docid": "4d78c9f4703adf9358aba9675b4787b9", "score": "0.43081462", "text": "protected function getRespondentMailfields()\r\n {\r\n if ($this->respondent) {\r\n $result = array();\r\n $result['bcc'] = $this->mailFields['project_bcc'];\r\n $result['email'] = $this->respondent->getEmailAddress();\r\n $result['from'] = '';\r\n $result['first_name'] = $this->respondent->getFirstName();\r\n $result['full_name'] = $this->respondent->getFullName();\r\n $result['greeting'] = $this->respondent->getGreeting();\r\n $result['last_name'] = $this->respondent->getLastName();\r\n $result['name'] = $this->respondent->getName();\r\n } else {\r\n $result = array(\r\n 'email' => '',\r\n 'from' => '',\r\n 'first_name'=> '',\r\n 'full_name' => '',\r\n 'greeting' => '',\r\n 'last_name' => '',\r\n 'name' => ''\r\n );\r\n }\r\n\r\n $result['reply_to'] = $result['from'];\r\n $result['to'] = $result['email'];\r\n $result['reset_ask'] = '';\r\n if ($this->mailFields['organization_login_url']) {\r\n $result['reset_ask'] = $this->mailFields['organization_login_url'] . '/index/resetpassword';\r\n }\r\n return $result;\r\n }", "title": "" }, { "docid": "308adbf00d2eee2b6c9e33e3f7cf054b", "score": "0.4307829", "text": "function send_match_emails($match_id){\n global $coordinatorEmail, $coordinatorPhone, $coordinatorName, $domainPath;\n $match_info = match_info($match_id);\n $request_info = request_info($match_info['request_id']);\n $student_info = student_info($request_info['student_id']);\n $tutor_info = tutor_info($match_info['tutor_id']);\n\n if ($student_info['email']){\n // fill in the student email body template\n ob_start();\n include('student_match_email_template.php');\n $student_body = ob_get_contents();\n ob_clean();\n\n // send the email\n send_email($student_info['email'],$coordinatorEmail,\"I've found a tutor for you\",$student_body);\n }\n \n if ($tutor_info['email']){\n // fill in the tutor email body template\n ob_start();\n include('tutor_match_email_template.php');\n $tutor_body = ob_get_contents();\n ob_clean();\n\n // send the email\n send_email($tutor_info['email'],$coordinatorEmail,\"I've found a student for you to tutor\",$tutor_body);\n }\n}", "title": "" }, { "docid": "d8cc0fb988bc42ca43bd54d42a3ca526", "score": "0.43073663", "text": "public function Autosuggestion($Autosuggestion)\r\n\t{\r\n\t\t$sql = \"SELECT * FROM tbl_index WHERE to_email LIKE '%\".$Autosuggestion.\"%' ORDER BY to_email ASC\";\r\n\t\t$result = $this->connect_db->query($sql);\r\n\t //$response = $result->fetch_assoc();\r\n\t\treturn $result;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "5c2f0615cee19d891439978cd026a6f1", "score": "0.43070155", "text": "private function includes() {}", "title": "" } ]
40d8d7f5cd44f66a0219310026ef8d45
Processes the response from the Upgrade server. Connector sould: Display notice about the new upgrade if available Download an XML file with the upgrade pack description
[ { "docid": "1709a618d217e16c60aca7d093b44134", "score": "0.7252075", "text": "public function processServerResponse($response, $show_upgrade_notice);", "title": "" } ]
[ { "docid": "657449cedefe4acdee02c905e4b36688", "score": "0.6486757", "text": "function give_in_plugin_update_message( $data, $response ) {\n\t$new_version = $data['new_version'];\n\t$current_version_parts = explode( '.', GIVE_VERSION );\n\t$new_version_parts = explode( '.', $new_version );\n\n\t// If it is a minor upgrade then return.\n\tif ( version_compare( $current_version_parts[0] . '.' . $current_version_parts[1], $new_version_parts[0] . '.' . $new_version_parts[1], '=' ) ) {\n\n\t\treturn;\n\t}\n\n\t// Get the upgrade notice from the trunk.\n\t$upgrade_notice = give_get_plugin_upgrade_notice( $new_version );\n\n\t// Display upgrade notice.\n\techo apply_filters( 'give_in_plugin_update_message', $upgrade_notice ? '</p>' . wp_kses_post( $upgrade_notice ) . '<p class=\"dummy\">' : '' );\n}", "title": "" }, { "docid": "9c6d2315258ab3a2d4cf7dbacd3605a2", "score": "0.62069607", "text": "public static function action_upgrader_process_complete( $upgrader, $result ) {\n\n\t\t// Check if the flag '--skip-packages' is used and honor it.\n\t\t$skip_check = false;\n\t\tif ( isset( $GLOBALS['argv'] ) ) {\n\t\t\t$args = $GLOBALS['argv'];\n\t\t\tif ( false !== array_search( '--skip-packages', $args ) ) {\n\t\t\t\t$skip_check = true;\n\t\t\t}\n\t\t}\n\n\t\t// If Skip Check is true, we hard-code in the site response\n\t\t// Else we do the checks.\n\t\tif ( $skip_check ) {\n\t\t\t$site_response = array(\n\t\t\t\t'status_code' => 200,\n\t\t\t\t'closing_body' => true,\n\t\t\t\t'php_fatal' => false,\n\t\t\t);\n\t\t} else {\n\t\t\tself::log_message( 'Fetching post-update site response...' );\n\t\t\t$site_response = self::check_site_response( home_url( '/?nocache' ) );\n\n\t\t\t$stage = 'post';\n\t\t\t$http_code = $site_response['status_code'];\n\n\t\t\tif ( ! in_array( $http_code, self::valid_http_codes() ) ) {\n\t\t\t\t$is_errored = sprintf( 'Failed %s-update status code check (HTTP code %d).', $stage, $site_response['status_code'] );\n\t\t\t} elseif ( ! empty( $site_response['php_fatal'] ) ) {\n\t\t\t\t$is_errored = sprintf( 'Failed %s-update PHP fatal error check.', $stage );\n\t\t\t} elseif ( empty( $site_response['closing_body'] ) ) {\n\t\t\t\t$is_errored = sprintf( 'Failed %s-update closing </body> tag check.', $stage );\n\t\t\t}\n\n\t\t\tif ( isset( $is_errored ) ) {\n\t\t\t\tif ( method_exists( 'WP_Upgrader', 'release_lock' ) ) {\n\t\t\t\t\t\\WP_Upgrader::release_lock( 'core_updater' );\n\t\t\t\t}\n\t\t\t\t\\WP_CLI::error( $is_errored );\n\t\t\t\treturn new \\WP_Error( 'upgrade_verify_fail', $is_errored );\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Permit action based on the post-update site response check.\n\t\t *\n\t\t * @param array $site_response Values for the site heuristics check.\n\t\t * @param WP_Upgrader $upgrader The WP_Upgrader instance.\n\t\t */\n\t\tdo_action( 'upgrade_verify_upgrader_process_complete', $site_response, $upgrader );\n\t}", "title": "" }, { "docid": "8de09e4e9c89b41cabea394d50a03af1", "score": "0.6202286", "text": "public function displayUpgradeNotice()\n\t\t{\n\t\t\tinclude_once( ABSPATH . 'wp-admin/includes/plugin-install.php' );\n\t\t\t//echo \"<tr><td colspan='5'>TEST</td></tr>\";\n\t\t\t//$api = plugins_api('plugin_information', array('slug' => 'connections', 'fields' => array('tested' => true, 'requires' => false, 'rating' => false, 'downloaded' => false, 'downloadlink' => false, 'last_updated' => false, 'homepage' => false, 'tags' => false, 'sections' => true) ));\n\t\t\t//print_r($api);\n\t\t\t\n\t\t\tif( version_compare($GLOBALS['wp_version'], '2.9.999', '>') ) // returning bool if at least WP 3.0 is running\n\t\t\t $current = get_option( '_site_transient_update_plugins' );\n\t\t\t\n\t\t\telseif( version_compare($GLOBALS['wp_version'], '2.7.999', '>') ) // returning bool if at least WP 2.8 is running\n\t\t\t $current = get_transient( 'update_plugins' );\n\t\t\t\t\n\t\t\telse\n\t\t\t $current = get_option( 'update_plugins' );\n\t\t\t\t\n\t\t\t//print_r($current);\n\t\t\t\n\t\t\tif ( !isset($current->response[ CN_BASE_NAME ]) ) return NULL;\n\t\t\t\n\t\t\t$r = $current->response[ CN_BASE_NAME ]; // response should contain the slug and upgrade_notice within an array.\n\t\t\t//print_r($r);\n\t\t\t\n\t\t\tif ( isset($r->upgrade_notice) )\n\t\t\t{\n\t\t\t\t$columns = CLOSMINWP28 ? 3 : 5;\n\t\t\t\t\n\t\t\t\t$output .= '<tr class=\"plugin-update-tr\"><td class=\"plugin-update\" colspan=\"' . $columns . '\"><div class=\"update-message\" style=\"font-weight: normal;\">';\n\t\t\t\t$output .= '<strong>Upgrade notice for version: ' . $r->new_version . '</strong>';\n\t\t\t\t$output .= '<ul style=\"list-style-type: square; margin-left:20px;\"><li>' . $r->upgrade_notice . '</li></ul>';\n\t\t\t\t$output .= '</div></td></tr>';\n\t\t\t\n\t\t\t\techo $output;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/*stdClass Object\n\t\t\t(\n\t\t\t [id] => 5801\n\t\t\t [slug] => connections\n\t\t\t [new_version] => 0.7.0.0\n\t\t\t [upgrade_notice] => Upgrading to this version might break custom templates.\n\t\t\t [url] => http://wordpress.org/extend/plugins/connections/\n\t\t\t [package] => http://downloads.wordpress.org/plugin/connections.0.7.0.0.zip\n\t\t\t)*/\n\t\t}", "title": "" }, { "docid": "278ad061e435faa4ab2252000707b95d", "score": "0.61697906", "text": "private function on_upgrade_page()\n {\n }", "title": "" }, { "docid": "a82683c54f8cd76d1b9462af329103e7", "score": "0.6148734", "text": "public function wt_product_import_export_for_woo_update_message( $data, $response ) {\n\t\t\tif ( isset( $data[ 'upgrade_notice' ] ) ) {\n\t\t\t\tprintf(\n\t\t\t\t'<div class=\"update-message wt-update-message\">%s</div>', $data[ 'upgrade_notice' ]\n\t\t\t\t);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "80735689014211ad1b30c15d4e03d69b", "score": "0.60453725", "text": "public function in_plugin_update_message( $args, $response ) {\n\n\t\t$message = '';\n\n\t\tif ( ! empty( $args['upgrade_notice'] ) ) {\n\n\t\t\t$notice = $args['upgrade_notice'];\n\n\t\t\t/*\n\t\t\t * Get data from upgrade notice string.\n\t\t\t *\n\t\t\t * The update notice should be a string formatted\n\t\t\t * like: \"Compatible Themes: Foo 1.0+, Bar 1.1+\"\n\t\t\t */\n\t\t\t$notice = str_replace( '<p>Compatible Themes: ', '', $notice );\n\n\t\t\t$notice = str_replace( '</p>', '', $notice );\n\n\t\t\t$themes = explode( ', ', $notice );\n\n\t\t\t$theme_data = wp_get_theme();\n\n\t\t\t$theme_name = $theme_data->get( 'Name' );\n\n\t\t\t$required = '';\n\n\t\t\t/*\n\t\t\t * Loop through themes extracted from data\n\t\t\t * upgrade string.\n\t\t\t *\n\t\t\t * Each theme will be a string formatted\n\t\t\t * like, \"Foo 1.1+\".\n\t\t\t *\n\t\t\t * So we can break this into its Name and\n\t\t\t * Version, and then match it against the\n\t\t\t * installed theme Name and Version.\n\t\t\t */\n\t\t\tforeach ( $themes as $theme ) {\n\n\t\t\t\t/*\n\t\t\t\t * Does one of the theme names from the upgrade\n\t\t\t\t * notice match the current theme name?\n\t\t\t\t */\n\t\t\t\tif ( 0 === strpos( $theme, $theme_name ) ) {\n\n\t\t\t\t\t$required = str_replace( $theme_name, '', $theme );\n\n\t\t\t\t\t$required = str_replace( '+', '', $required );\n\n\t\t\t\t\t$required = trim( $required );\n\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\t/*\n\t\t\t * Is the installed version of the theme less\n\t\t\t * than what's required?\n\t\t\t *\n\t\t\t * If not, we don't need to display an update\n\t\t\t * notice at all.\n\t\t\t */\n\t\t\tif ( $required && version_compare( $theme_data->get( 'Version' ), $required, '<' ) ) {\n\n\t\t\t\t$message = sprintf(\n\t\t\t\t\t__( 'This update requires that you also update to %s %s+.', 'theme-blvd-layout-builder' ),\n\t\t\t\t\t$theme_name,\n\t\t\t\t\t$required\n\t\t\t\t);\n\n\t\t\t\t$message = '<br><br><strong>' . $message . '</strong>';\n\n\t\t\t}\n\n\t\t}\n\n\t\techo apply_filters( 'themeblvd_builder_in_plugin_update_message', $message );\n\n\t}", "title": "" }, { "docid": "78d961162d5cc9ebf47b919db3f41286", "score": "0.59199077", "text": "protected function processUpgrade() {\n\t\tglobal $messageStack;\n\n\t\t$success = $this->removeObsoleteFiles();\n\n\t\t$version = $this->getInstalledVersion();\n\t\tif($version !== '-1') {\n\t\t\t$messageStack->add(sprintf(\n\t\t\t\tPLUGIN_INSTALL_FOUND_PREVIOUS_VERSION,\n\t\t\t\t$this->getUniqueName(),\n\t\t\t\t$version,\n\t\t\t\t$this->getVersion()\n\t\t\t), 'success');\n\n\t\t\treturn $success && $this->handleUpgradeFrom($version);\n\t\t}\n\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "37eea43b82dfb07aee15307993aa64d0", "score": "0.59017503", "text": "protected function handlePluginUpgrade() {\n\t\tif ( self::getOption( 'current_plugin_version' ) !== self::$VERSION && current_user_can( 'manage_options' ) ) {\n\n\t\t\t//Set the flag so that this update handler isn't run again for this version.\n\t\t\tself::updateOption( 'current_plugin_version', self::$VERSION );\n\t\t}\n\n\t\t//Someone clicked the button to acknowledge the update\n\t\tif ( isset( $_POST['hlt_hide_update_notice'] ) && isset( $_POST['hlt_user_id'] ) ) {\n\t\t\tupdate_user_meta( $_POST['hlt_user_id'], self::OptionPrefix.'current_version', self::$VERSION );\n\t\t\theader( \"Location: admin.php?page=\".$this->getFullParentMenuId() );\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "cb5cf2797c069a429d0ef091ec63b36f", "score": "0.5889695", "text": "function twentysixteen_upgrade_notice() {}", "title": "" }, { "docid": "e1092744fc8d116c810d5dcfcdc5d1d5", "score": "0.58391273", "text": "function twentyfifteen_upgrade_notice() {}", "title": "" }, { "docid": "5ca32d9b476e4c5094ab17b8a4b1dad9", "score": "0.5836341", "text": "function twentyfourteen_upgrade_notice() {}", "title": "" }, { "docid": "4f55dc8810a9e0b47a8170910c29c08a", "score": "0.5822245", "text": "function twentyseventeen_upgrade_notice() {}", "title": "" }, { "docid": "cd963a47ef61820f98ed429cf0e95142", "score": "0.582161", "text": "function doClientUpgrade($serial_no) {\n\t\tglobal $fmdb, $__FM_CONFIG, $fm_name;\n\t\t\n\t\t/** Check permissions */\n\t\tif (!currentUserCan('manage_servers', $_SESSION['module'])) {\n\t\t\techo buildPopup('header', _('Error'));\n\t\t\tprintf('<p>%s</p>', _('You do not have permission to manage servers.'));\n\t\t\techo buildPopup('footer', _('OK'), array('cancel_button' => 'cancel'));\n\t\t\texit;\n\t\t}\n\t\t\n\t\t/** Process server group */\n\t\tif ($serial_no[0] == 'g') {\n\t\t\t$group_servers = $this->getGroupServers(substr($serial_no, 1));\n\t\t\t\n\t\t\tif (!is_array($group_servers)) return $group_servers;\n\t\t\t\n\t\t\t$response = null;\n\t\t\tforeach ($group_servers as $serial_no) {\n\t\t\t\tif (is_numeric($serial_no)) $response .= $this->doClientUpgrade($serial_no) . \"\\n\";\n\t\t\t}\n\t\t\treturn $response;\n\t\t}\n\t\t\n\t\t/** Check serial number */\n\t\tbasicGet('fm_' . $__FM_CONFIG[$_SESSION['module']]['prefix'] . 'servers', sanitize($serial_no), 'server_', 'server_serial_no');\n\t\tif (!$fmdb->num_rows) return sprintf(_('%d is not a valid serial number.'), $serial_no);\n\n\t\t$server_details = $fmdb->last_result;\n\t\textract(get_object_vars($server_details[0]), EXTR_SKIP);\n\t\t\n\t\t$response[] = $server_name;\n\t\t\n\t\tif ($server_installed != 'yes') {\n\t\t\t$response[] = ' --> ' . _('Failed: Client is not installed.') . \"\\n\";\n\t\t}\n\t\t\n\t\tif (count($response) == 1) {\n\t\t\tswitch($server_update_method) {\n\t\t\t\tcase 'cron':\n\t\t\t\t\t/* Servers updated via cron require manual upgrades */\n\t\t\t\t\t$response[] = ' --> ' . _('This server needs to be upgraded manually with the following command:');\n\t\t\t\t\t$response[] = \" --> sudo php /usr/local/$fm_name/{$_SESSION['module']}/client.php upgrade\";\n\t\t\t\t\taddLogEntry(sprintf(_('Upgraded client scripts on %s.'), $server_name));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'http':\n\t\t\t\tcase 'https':\n\t\t\t\t\t/** Test the port first */\n\t\t\t\t\tif (!socketTest($server_name, $server_update_port, 10)) {\n\t\t\t\t\t\t$response[] = ' --> ' . sprintf(_('Failed: could not access %s using %s (tcp/%d).'), $server_name, $server_update_method, $server_update_port);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/** Remote URL to use */\n\t\t\t\t\t$url = $server_update_method . '://' . $server_name . ':' . $server_update_port . '/fM/reload.php';\n\t\t\t\t\t\n\t\t\t\t\t/** Data to post to $url */\n\t\t\t\t\t$post_data = array('action' => 'upgrade',\n\t\t\t\t\t\t'serial_no' => $server_serial_no,\n\t\t\t\t\t\t'module' => $_SESSION['module']);\n\t\t\t\t error_log(\"URL == $url\");\t\n\t\t\t\t\t$post_result = @unserialize(getPostData($url, $post_data));\n\t\t\t\t\t\n\t\t\t\t\tif (!is_array($post_result)) {\n\t\t\t\t\t\t/** Something went wrong */\n\t\t\t\t\t\tif (empty($post_result)) {\n\t\t\t\t\t\t\t$response[] = ' --> ' . sprintf(_('It appears %s does not have php configured properly within httpd or httpd is not running.'), $server_name);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (count($post_result) > 1) {\n\t\t\t\t\t\t\t/** Loop through and format the output */\n\t\t\t\t\t\t\tforeach ($post_result as $line) {\n\t\t\t\t\t\t\t\tif (strlen(trim($line))) $response[] = \" --> $line\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$response[] = \" --> \" . $post_result[0];\n\t\t\t\t\t\t}\n\t\t\t\t\t\taddLogEntry(sprintf(_('Upgraded client scripts on %s.'), $server_name));\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'ssh':\n\t\t\t\t\t$server_remote = runRemoteCommand($server_name, \"sudo php /usr/local/$fm_name/{$_SESSION['module']}/client.php upgrade\", 'return', $server_update_port);\n\n\t\t\t\t\tif (is_array($server_remote)) {\n\t\t\t\t\t\tif (array_key_exists('output', $server_remote) && !count($server_remote['output'])) {\n\t\t\t\t\t\t\tunset($server_remote);\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn $server_remote;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/** Test the port first */\n\t\t\t\t\tif (!socketTest($server_name, $server_update_port, 10)) {\n\t\t\t\t\t\t$response[] = ' --> ' . sprintf(_('Failed: could not access %s using %s (tcp/%d).'), $server_name, $server_update_method, $server_update_port);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif ($server_remote['failures']) {\n\t\t\t\t\t\t/** Something went wrong */\n\t\t\t\t\t\t$server_remote['output'][] = _('Client upgrade failed.');\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (!count($server_remote['output'])) {\n\t\t\t\t\t\t\t$server_remote['output'][] = _('Config build was successful.');\n\t\t\t\t\t\t\taddLogEntry(sprintf(_('Upgraded client scripts on %s.'), $server_name));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif (count($server_remote['output']) > 1) {\n\t\t\t\t\t\t/** Loop through and format the output */\n\t\t\t\t\t\tforeach ($server_remote['output'] as $line) {\n\t\t\t\t\t\t\tif (strlen(trim($line))) $response[] = \" --> $line\";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response[] = \" --> \" . $server_remote['output'][0];\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$response[] = null;\n\t\t}\n\n\t\treturn implode(\"\\n\", $response);\n\t}", "title": "" }, { "docid": "795e82871941c6d83a9e3431e720d1d6", "score": "0.5769681", "text": "function give_parse_plugin_update_notice( $content, $new_version ) {\n\t$version_parts = explode( '.', $new_version );\n\t$check_for_notices = array(\n\t\t$version_parts[0] . '.0',\n\t\t$version_parts[0] . '.0.0',\n\t\t$version_parts[0] . '.' . $version_parts[1] . '.' . '0',\n\t);\n\n\t// Regex to extract Upgrade notice from the readme.txt file.\n\t$notice_regexp = '~==\\s*Upgrade Notice\\s*==\\s*=\\s*(.*)\\s*=(.*)(=\\s*' . preg_quote( $new_version ) . '\\s*=|$)~Uis';\n\n\t$upgrade_notice = '';\n\n\tforeach ( $check_for_notices as $check_version ) {\n\t\tif ( version_compare( GIVE_VERSION, $check_version, '>' ) ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$matches = null;\n\n\t\tif ( preg_match( $notice_regexp, $content, $matches ) ) {\n\t\t\t$notices = (array) preg_split( '~[\\r\\n]+~', trim( $matches[2] ) );\n\n\t\t\tif ( version_compare( trim( $matches[1] ), $check_version, '=' ) ) {\n\t\t\t\t$upgrade_notice .= '<p class=\"give-plugin-upgrade-notice\">';\n\n\t\t\t\tforeach ( $notices as $index => $line ) {\n\t\t\t\t\t$upgrade_notice .= preg_replace( '~\\[([^\\]]*)\\]\\(([^\\)]*)\\)~', '<a href=\"${2}\">${1}</a>', $line );\n\t\t\t\t}\n\n\t\t\t\t$upgrade_notice .= '</p>';\n\t\t\t}\n\n\t\t\tif ( ! empty( $upgrade_notice ) ) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn wp_kses_post( $upgrade_notice );\n}", "title": "" }, { "docid": "99506343ba166c949393a158d59ac08b", "score": "0.5763134", "text": "public function check_for_upgrade() {\r\n\r\n\t\t$file = 'upgrade.php';\r\n\t\tif( file_exists( $file ) ) {\r\n\t\t\techo '<div class=\"update\">';\r\n\t\t\techo 'Please <a href=\"upgrade.php\">run the update file</a> to keep your database structured updated.';\r\n\t\t\techo '</div>';\r\n\t\t\treturn;\r\n\t\t} else {\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "08f9aa55d81874c0d19c22c84c45e468", "score": "0.57112944", "text": "function twentythirteen_upgrade_notice() {}", "title": "" }, { "docid": "8d02aa15ef5990bad3f6255676a9c44d", "score": "0.56637424", "text": "public function action_check() {\n $this->upgrade->unmute();\n //check server for newer version\n $this->upgrade->check_remote();\n //return data to frontend\n return json_encode($this->upgrade->check());\n }", "title": "" }, { "docid": "91d973db65183c7ce7d4e4cf968b2d32", "score": "0.56444883", "text": "function twentynineteen_upgrade_notice() {}", "title": "" }, { "docid": "84776233ba0dfde611cb453a0b83197e", "score": "0.5642254", "text": "private function _update_translation() {\n\t\tglobal $wp_filesystem;\n\n\t\t$status = array();\n\n\t\tinclude_once(ABSPATH . 'wp-admin/includes/class-wp-upgrader.php');\n\t\tif (!class_exists('Automatic_Upgrader_Skin')) include_once(UPDRAFTCENTRAL_CLIENT_DIR.'/classes/class-automatic-upgrader-skin.php');\n\t\t\n\t\t$skin = new Automatic_Upgrader_Skin();\n\t\t$upgrader = new Language_Pack_Upgrader($skin);\n\t\t$result = $upgrader->bulk_upgrade();\n\t\t\n\t\tif (is_array($result) && !empty($result)) {\n\t\t\t$status['success'] = true;\n\t\t} elseif (is_wp_error($result)) {\n\t\t\t$status['error'] = $result->get_error_code();\n\t\t\t$status['error_message'] = $result->get_error_message();\n\t\t} elseif (is_bool($result) && !$result) {\n\t\t\t$status['error'] = 'unable_to_connect_to_filesystem';\n\n\t\t\t// Pass through the error from WP_Filesystem if one was raised\n\t\t\tif (is_wp_error($wp_filesystem->errors) && $wp_filesystem->errors->get_error_code()) {\n\t\t\t\t$status['error'] = $wp_filesystem->errors->get_error_code();\n\t\t\t\t$status['error_message'] = $wp_filesystem->errors->get_error_message();\n\t\t\t}\n\t\t} elseif (is_bool($result) && $result) {\n\t\t\t$status['error'] = 'up_to_date';\n\t\t} else {\n\t\t\t// An unhandled error occured\n\t\t\t$status['error'] = 'update_failed';\n\t\t}\n\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "b56486532153b14d124af892c24b1a9a", "score": "0.56349355", "text": "public function render_upgrade_page() {\n include METASLIDER_PATH.\"admin/views/pages/upgrade.php\";\n }", "title": "" }, { "docid": "2f5a4712932f9050ebef2c9686e09fc8", "score": "0.55960137", "text": "function upgrade_101() {}", "title": "" }, { "docid": "c55d3e3ce0e7a8a7b55b7ba1a35b74d2", "score": "0.5594268", "text": "public function onVersionReply()\n {\n }", "title": "" }, { "docid": "2cd2a5df55390402bec935a68e4c4fd7", "score": "0.5566203", "text": "public function updatesmbupgrading(){\r\n \t$appid \t= PageContext::$request['appid'];\r\n \t$plan \t= PageContext::$request['plan'];\r\n \t//echo $appid.':'.$plan;\r\n \t$upgraderes = Cmshelper::updateUserPlan($appid, $plan);\r\n \techo $upgraderes;\r\n \t//echopre($_REQUEST);\r\n \texit();\r\n }", "title": "" }, { "docid": "0637fac77eb8f5784f5bd5d00b136372", "score": "0.5558154", "text": "public function do_upgrade() {\n\n\t\t\tglobal $itsec_globals;\n\n\t\t\t//require plugin setup information\n\t\t\tif ( ! class_exists( 'ITSEC_Setup' ) ) {\n\t\t\t\trequire( self::get_core_dir() . '/class-itsec-setup.php' );\n\t\t\t}\n\n\t\t\tnew ITSEC_Setup( 'upgrade', 3064 ); //run upgrade scripts\n\n\t\t}", "title": "" }, { "docid": "804a273316bc70412eceaffa4101b69d", "score": "0.55492777", "text": "function perform_update() {\n $this->echo(\"Component:\", $this->component);\n $this->echo(\"New version:\", $this->new_version);\n $this->get_plugin_info();\n if ( $this->plugin_info ) {\n if ( $this->banner_low ) {\n $this->get_banner_low();\n } else {\n $this->download_assets();\n }\n\n $this->download_plugin_version();\n $this->update_installed_plugin();\n $this->update_oik_plugin();\n } else {\n $this->echo( \"Error:\",\"Not found.\" );\n }\n\n\t}", "title": "" }, { "docid": "bf98568eb88acc45234ce956703fbb0d", "score": "0.5512434", "text": "public function main() {\n\t\tif ($this->validateParameters()) {\n\t\t\t$this->addTrackback();\n\t\t}\n\n\t\t// Output response\n\t\theader('Content-type: text/xml; charset=UTF-8');\n\t\tif ($this->error == '') {\n\t\t\techo '<?xml version=\"1.0\" encoding=\"utf-8\"?><response><error>0</error></response>';\n\t\t}\n\t\telse {\n\t\t\techo '<?xml version=\"1.0\" encoding=\"utf-8\"?><response><error>1</error>' .\n\t\t\t\t'<message>' . htmlentities($this->error) . '</message></response>';\n\t\t}\n\t}", "title": "" }, { "docid": "044246e0bafb3f18fda222043052ffaa", "score": "0.5480665", "text": "public function checkForUpgrade() {\n // To be back-compatible, we need to be able to convert old autonotify calls into the newer format.\n\n global $data_entry_trigger_url;\n $det_qs = parse_url($data_entry_trigger_url, PHP_URL_QUERY);\n\n parse_str($det_qs,$params);\n if (!empty($params['an'])) {\n // Step 1: We have identified an old DET-based config\n logIt(\"Updating older DET url: $data_entry_trigger_url\", \"DEBUG\");\n $an = $params['an'];\n $old_config = self::decrypt($an);\n\n // Step 2: Save the updated autonotify object\n $this->config = $old_config;\n $this->saveConfig();\n $log_data = array(\n 'action' => 'AutoNotify2 config moved from querystring to log',\n 'an' => $an,\n 'config' => $old_config\n );\n REDCap::logEvent(AutoNotify::PluginName . \" Update\", \"Moved querystring config to log table\", json_encode($log_data));\n\n // Step 3: Update the DET URL to be plain-jane\n self::isDetUrlNotAutoNotify(true);\n }\n }", "title": "" }, { "docid": "dc18c6a613516cbcbe319b61c4d39de8", "score": "0.547901", "text": "public function upgrade_006_1_2_0()\n {\n $this->db->where_in(\"version_file\", array(\"006_1.2.0.sql\",\"005_1.1.2.sql\"));\n $versions = $this->db->get('ip_versions')->result();\n $upgrade_diff = $versions[1]->version_date_applied - $versions[0]->version_date_applied;\n\n if ($this->session->userdata('is_upgrade') && $upgrade_diff > 100 && $versions[1]->version_date_applied > (time() - 100)) {\n $setup_notice = array(\n 'type' => 'alert-danger',\n 'content' => lang('setup_v120_alert'),\n );\n $this->session->set_userdata('setup_notice', $setup_notice);\n }\n }", "title": "" }, { "docid": "45d4587dd832a7970bf6b40bd2ee2fea", "score": "0.54633206", "text": "public function checkout_upgrade_details() {\n\n\t\t$items = edd_get_cart_contents();\n\n\t\tif( ! is_array( $items ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach( $items as $item ) {\n\n\t\t\tif( empty( $item['options']['is_upgrade'] ) ) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\t$sub = $this->get_subscription_of_license( $item['options']['license_id'] );\n\n\t\t\tif( ! $sub ) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif( empty( $item['options']['recurring'] ) ) {\n\n\t\t\t\tcontinue;\n\n\t\t\t}\n\n\t\t\tif( edd_has_variable_prices( $item['id'] ) ) {\n\t\t\t\t$price = edd_get_price_option_amount( $item['id'], $item['options']['price_id'] );\n\t\t\t} else {\n\t\t\t\t$price = edd_get_download_price( $item['id'] );\n\t\t\t}\n\n\t\t\t$discount = edd_sl_get_renewal_discount_percentage();\n\t\t\t$cost = edd_currency_filter( edd_sanitize_amount( $price - ( $price * ( $discount / 100 ) ) ) );\n\t\t\t$period = EDD_Recurring()->get_pretty_subscription_frequency( $item['options']['recurring']['period'] );\n\n\t\t\t$message = sprintf(\n\t\t\t\t__( '%s will now automatically renew %s for %s', 'edd-recurring' ),\n\t\t\t\tget_the_title( $item['id'] ),\n\t\t\t\t$period,\n\t\t\t\t$cost\n\t\t\t);\n\n\t\t\techo '<div class=\"edd-alert edd-alert-warn\"><p class=\"edd_error\">' . $message . '</p></div>';\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "28b1af2ddc3d9416ffd4562739f44e47", "score": "0.5460995", "text": "function upgrade_280() {}", "title": "" }, { "docid": "4b733ada3d432cf9b122d064ee1a5898", "score": "0.54580176", "text": "function upgrade_500() {}", "title": "" }, { "docid": "c4742cec4ed71c540fa7897d6595105a", "score": "0.54538107", "text": "protected function parseResponseForRequestForUpgradeAction(\\PEAR2\\HTTP\\Request\\Response $response)\n {\n return $this->parseJSON($response);\n }", "title": "" }, { "docid": "43bfb944f7488856ce98fb1a36ed8fb5", "score": "0.54487276", "text": "public function run_upgrade_process()\n {\n Upgrade::run($this->old_version, $this->args['version']);\n }", "title": "" }, { "docid": "c07f97a19db410ff4c6dee0fd590185a", "score": "0.5429489", "text": "function upgrade_400() {}", "title": "" }, { "docid": "09274465c30d7608fb1b3dc84cf6f1de", "score": "0.54042566", "text": "function civicrm_upgrade_db() {\n _civicrm_init();\n\n require_once 'CRM/Core/Config.php';\n require_once 'CRM/Core/Smarty.php';\n $template =& CRM_Core_Smarty::singleton( );\n\n require_once 'CRM/Utils/System.php';\n require_once 'CRM/Core/BAO/Domain.php';\n $codeVer = CRM_Utils_System::version();\n $dbVer = CRM_Core_BAO_Domain::version();\n if ( !$dbVer ) {\n drush_die(dt('Version information missing in civicrm database.'));\n } else if ( stripos($dbVer, 'upgrade') ) {\n drush_die(dt('Database check failed - the database looks to have been partially upgraded. You may want to reload the database with the backup and try the upgrade process again.'));\n } else if ( !$codeVer ) {\n drush_die(dt('Version information missing in civicrm codebase.'));\n } else if ( version_compare($codeVer, $dbVer) > 0 ) {\n drush_print(dt(\"Starting with v!dbVer -> v!codeVer upgrade ..\", \n array('!dbVer' => $dbVer, '!codeVer' => $codeVer)));\n } else if ( version_compare($codeVer, $dbVer) < 0 ) {\n drush_die(dt(\"Database is marked with an unexpected version '!dbVer' which is higher than that of codebase version '!codeVer'.\", array('!dbVer' => $dbVer, '!codeVer' => $codeVer)));\n } else {\n drush_print(dt(\"Starting with upgrade ..\"));\n }\n\n $_POST['upgrade'] = 1;\n require_once( 'CRM/Upgrade/Page/Upgrade.php' );\n $upgrade =& new CRM_Upgrade_Page_Upgrade( );\n ob_start(); // to suppress html output /w source code.\n $upgrade->run( );\n $result = $template->get_template_vars('message'); // capture the required message.\n ob_end_clean();\n drush_print(\"Upgrade outputs: \" . \"\\\"$result\\\"\");\n}", "title": "" }, { "docid": "8141bdc862a391710be7415a3b59f2f8", "score": "0.5397616", "text": "public function actionUpgrade()\n\t{\n\t\t//find block for page's content\n\t\t$page = Page::model()->find('slug = ?', array('tutor-upgrade'));\n\t\t\n\t\t//find block for basic section\n\t\t$basic = Page::model()->find('slug = ?', array('basic-account'));\n\t\t\n\t\t//find block for enhance section\n\t\t$enhance = Page::model()->find('slug = ?', array('enhance-account'));\n\t\t\n\t\t//find block for premium section\n\t\t$premium = Page::model()->find('slug = ?', array('premium-account'));\n\t\t\n\t\t//get enhance paypal url\n\t\t$criteria = new CDbCriteria();\n\t\t\n\t\t$criteria->condition = 'type = ? and status = ?';\n\t\t$criteria->params = array(Subscription::ENHANCE, Subscription::PUBLISHED);\n\t\t\n\t\t$enhance_subscription = Subscription::model()->find($criteria);\n\t\t\n\t\tif(!empty($enhance_subscription))\n\t\t{\n\t\t\t$enhance_pay_url = Subscription::model()->getPaypalLink($enhance_subscription->id, app()->user->id, Subscription::ENHANCE);\n\t\t}\n\t\t\n\t\t$this->pageTitle = $this->settings['site_title'] . ' :: My Account :: Upgrade';\n\t\t$this->change_title = true;\n\t\t\n\t\t$this->layout = 'account';\n\t\t$this->render('upgrade', array(\n\t\t\t\t'page'=>$page,\n\t\t\t\t'basic'=>$basic,\n\t\t\t\t'enhance'=>$enhance,\n\t\t\t\t'premium'=>$premium,\n\t\t\t\t'enhance_pay_url'=>isset($enhance_pay_url) ? $enhance_pay_url : '',\n\t\t\t\t'message'=>app()->user->getFlash('message'),\n\t\t\t\t));\n\t}", "title": "" }, { "docid": "f9014bce3fc8274496abc997622d6f13", "score": "0.5378759", "text": "public function get_upgrade_messages()\n {\n }", "title": "" }, { "docid": "645805e2eaff737b6c4de13b6c45e883", "score": "0.53735876", "text": "function give_get_plugin_upgrade_notice( $new_version ) {\n\n\t// Cache the upgrade notice.\n\t$transient_name = \"give_upgrade_notice_{$new_version}\";\n\t$upgrade_notice = get_transient( $transient_name );\n\n\tif ( false === $upgrade_notice ) {\n\t\t$response = wp_safe_remote_get( 'https://plugins.svn.wordpress.org/give/trunk/readme.txt' );\n\n\t\tif ( ! is_wp_error( $response ) && ! empty( $response['body'] ) ) {\n\t\t\t$upgrade_notice = give_parse_plugin_update_notice( $response['body'], $new_version );\n\t\t\tset_transient( $transient_name, $upgrade_notice, DAY_IN_SECONDS );\n\t\t}\n\t}\n\n\treturn $upgrade_notice;\n}", "title": "" }, { "docid": "abc9557b733e52862e7c1d9b158a9c30", "score": "0.53715414", "text": "private function generateUpgrade() {\n $method = $this->class->addMethod(\"upgrade\")\n ->setVisibility(\"public\")\n ->addComment('Performs an upgrade from $current_version to the given file version of the module')\n ->addComment('@param string $current_version Currently installed version of the module');\n\n $method->addParameter(\"current_version\");\n\n //deny downgrades as default\n $lines = array(\n 'if (version_compare($this->version, $current_version) < 0) {',\n \"\\t\" .'$this->Input->setErrors(array(', \n \"\\t\\t\" .'\"version\" => array(',\n \"\\t\\t\\t\" . '\"invalid\" => \"Downgrades are not allowed.\"',\n \"\\t\\t\" . ')',\n \"\\t\" . '));',\n \"\\t\" . 'return;',\n '}'\n );\n\n foreach($lines as $l) {\n $method->addBody($l);\n }\n }", "title": "" }, { "docid": "69bbf9be4d2d9f6749775fc43600d8e1", "score": "0.5371058", "text": "public function _checkorder()\n {\n try {\n //If the exception is thrown, this text will not be shown\n $this->_updateUrl();\n $this->_prepareXmldocument();\n $this->_sendRequest();\n $this->_parseResponse();\n return $this->response;\n }\n catch(Exception $e) {\n echo 'Message: ' .$e->getMessage();\n }\n }", "title": "" }, { "docid": "82d4ecb64152fe23c0d1e52453a1b25c", "score": "0.53650934", "text": "public function getUpdateInfo(){\r\n $xmlObj = $this->loadXML(false);\r\n if($this->rzUbbVer != $xmlObj->info->version){\r\n return $this->__('Update your UBB Virtual POS module version. Your current version is') . ' ' . $this->rzUbbVer . '. ' . $this->__('The newest version is') . ' ' . $xmlObj->info->version;\r\n }\r\n \r\n return false;\r\n }", "title": "" }, { "docid": "d85abfe10b277ad06d9dade63ca018f8", "score": "0.53642976", "text": "public function process()\n\t{\n\t\tif (\\App\\Installer\\Languages::getToInstall()) {\n\t\t\t$this->status = 0;\n\t\t\t$this->link = 'index.php?parent=Settings&module=LangManagement&view=Index';\n\t\t\t$this->linkTitle = \\App\\Language::translate('LBL_UPDATE', 'Settings:Base');\n\t\t\t$this->description = \\App\\Language::translate('LBL_LANGUAGES_UPDATER_DESC', 'Settings:SystemWarnings');\n\t\t} else {\n\t\t\t$this->status = 1;\n\t\t}\n\t}", "title": "" }, { "docid": "a1af29caf218291a9daf50b54a773874", "score": "0.5363335", "text": "public static function renderREDCapRepoUpdatesAlert()\n\t{\n\t\tglobal $lang, $external_modules_updates_available;\n\t\t$moduleUpdates = json_decode($external_modules_updates_available, true);\n\t\tif (!is_array($moduleUpdates) || empty($moduleUpdates)) return false;\n\t\t$links = \"\";\n\t\t$countModuleUpdates = count($moduleUpdates);\n\t\tforeach ($moduleUpdates as $id=>$module) {\n\t\t\t$module_name = $module['name'].\"_v\".$module['version'];\n\t\t\t$links .= \"<div id='repo-updates-modid-$id'><button class='btn btn-success btn-xs' onclick=\\\"window.location.href='\".APP_URL_EXTMOD.\"manager/control_center.php?download_module_id=$id&download_module_title=\"\n\t\t\t\t . rawurlencode($module['title'].\" ($module_name)\").\"&download_module_name=$module_name';\\\">\"\n\t\t\t\t . \"<span class='glyphicon glyphicon-save'></span> {$lang['global_125']}</button> {$module['title']} v{$module['version']}</div>\";\n\t\t}\n\t\tprint \"<div class='yellow repo-updates'>\n\t\t\t\t\t<div style='color:#A00000;'>\n\t\t\t\t\t\t<i class='fas fa-bell'></i> <span style='margin-left:3px;font-weight:bold;'>\n\t\t\t\t\t\t<span id='repo-updates-count'>$countModuleUpdates</span>\n\t\t\t\t\t\t\".($countModuleUpdates == 1 ? \"External Module</span> has\" : \"External Modules</span> have\").\" \n\t\t\t\t\t\tupdates available for download from the REDCap Repo. <a href='javascript:;' onclick=\\\"$(this).hide();$('.repo-updates-list').show();\\\" style='margin-left:3px;'>View</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class='repo-updates-list'>\n\t\t\t\t\t\tUpdates are available for the modules listed below. Click the button for each to upgrade the module. $links\n\t\t\t\t\t</div>\n\t\t\t\t</div>\";\n\t}", "title": "" }, { "docid": "243d94622f9cf55abd7aa1d1fc07f437", "score": "0.5362001", "text": "public function set_upgrade_notice()\n {\n }", "title": "" }, { "docid": "554cbb596ab211306a9a94a812e3db93", "score": "0.5343726", "text": "public static function filter_upgrader_pre_download( $retval, $package, $upgrader, $hook_extra ) {\n\n\t\t// Check if the flag '--skip-packages' is used and honor it.\n\t\t$skip_check = false;\n\t\tif ( isset( $GLOBALS['argv'] ) ) {\n\t\t\t$args = $GLOBALS['argv'];\n\t\t\tif ( false !== array_search( '--skip-packages', $args ) ) {\n\t\t\t\t$skip_check = true;\n\t\t\t}\n\t\t}\n\n\t\t// If Skip Check is true, we return false and skip the rest of the check\n\t\t// Yes, the logic is weird.\n\t\tif ( $skip_check ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tself::log_message( 'Fetching pre-update site response...' );\n\t\t$site_response = self::check_site_response( home_url( '/?nocache' ) );\n\t\t/**\n\t\t * Permit modification of $retval based on the site response.\n\t\t *\n\t\t * @param mixed $retval Return value to WP_Upgrader.\n\t\t * @param array $site_response Values for the site heuristics check.\n\t\t * @param string $package The package file name.\n\t\t * @param WP_Upgrader $upgrader The WP_Upgrader instance.\n\t\t */\n\t\t$retval = apply_filters( 'upgrade_verify_upgrader_pre_download', $retval, $site_response, $package, $upgrader );\n\t\t$stage = 'pre';\n\t\t$http_code = $site_response['status_code'];\n\n\t\tif ( ! in_array( $http_code, self::valid_http_codes() ) ) {\n\t\t\t$is_errored = sprintf( 'Failed %s-update status code check (HTTP code %d).', $stage, $site_response['status_code'] );\n\t\t} elseif ( ! empty( $site_response['php_fatal'] ) ) {\n\t\t\t$is_errored = sprintf( 'Failed %s-update PHP fatal error check.', $stage );\n\t\t} elseif ( empty( $site_response['closing_body'] ) ) {\n\t\t\t$is_errored = sprintf( 'Failed %s-update closing </body> tag check.', $stage );\n\t\t}\n\n\t\tif ( isset( $is_errored ) ) {\n\t\t\tif ( method_exists( 'WP_Upgrader', 'release_lock' ) ) {\n\t\t\t\t\\WP_Upgrader::release_lock( 'core_updater' );\n\t\t\t}\n\t\t\t\\WP_CLI::error( $is_errored );\n\t\t\treturn new \\WP_Error( 'upgrade_verify_fail', $is_errored );\n\t\t}\n\n\t\treturn $retval;\n\t}", "title": "" }, { "docid": "b94c508e7ec17a14b81ef7bc0cbd6c97", "score": "0.5329161", "text": "function wpgrade_callback_update_notifier_menu() {\n\tif ( wpgrade::option( 'themeforest_upgrade' ) ) {\n\t\t// stop if simplexml_load_string funtion isn't available\n\t\tif ( function_exists( 'simplexml_load_string' ) ) {\n\t\t\t$newversion = wpgrade_update_notifier_check_if_new_version();\n\t\t\t$count = ( isset( $_GET['wpgrade_update'] ) && $_GET['wpgrade_update'] == 'true' ) ? '' : '<span class=\"update-plugins count-1\"><span class=\"update-count\">1</span></span>';\n\n\t\t\t// compare current theme version with the remote XML version\n\t\t\tif ( $newversion ) {\n\t\t\t\tadd_dashboard_page( wpgrade::themename() . ' Theme Updates', wpgrade::themename() . ' Update ' . $count, 'administrator', wpgrade::update_notifier_pagename(), 'update_notifier' );\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "a24ef555a40893320ebd6ea2ff520803", "score": "0.5328496", "text": "function upgrade_110() {}", "title": "" }, { "docid": "4c72a86697e94faebdee06d35e0f4ffd", "score": "0.53126854", "text": "public function run() {\n\t\t// Upgrade also disabled data, so the compatibility is\n\t\t// preserved in case the data ever gets enabled again\n\t\tglobal $ENTITY_SHOW_HIDDEN_OVERRIDE;\n\t\t$ENTITY_SHOW_HIDDEN_OVERRIDE = true;\n\n\t\t// Defined in Elgg\\Application\n\t\tglobal $START_MICROTIME;\n\n\t\t$result = new Result;\n\n\t\t// Get the class taking care of the actual upgrading\n\t\t$upgrade = $this->upgrade->getUpgrade();\n\n\t\tdo {\n\t\t\t$upgrade->run($result, $this->upgrade->offset);\n\n\t\t\t$failure_count = $result->getFailureCount();\n\t\t\t$success_count = $result->getSuccessCount();\n\n\t\t\t$total = $failure_count + $success_count;\n\n\t\t\tif ($upgrade::INCREMENT_OFFSET) {\n\t\t\t\t// Offset needs to incremented by the total amount of processed\n\t\t\t\t// items so the upgrade we won't get stuck upgrading the same\n\t\t\t\t// items over and over.\n\t\t\t\t$this->upgrade->offset += $total;\n\t\t\t} else {\n\t\t\t\t// Offset doesn't need to be incremented, so we mark only\n\t\t\t\t// the items that caused a failure.\n\t\t\t\t$this->upgrade->offset += $failure_count;\n\t\t\t}\n\n\t\t\tif ($failure_count > 0) {\n\t\t\t\t$this->upgrade->has_errors = true;\n\t\t\t}\n\n\t\t\t$this->upgrade->processed += $total;\n\t\t} while ((microtime(true) - $START_MICROTIME) < $this->config->get('batch_run_time_in_secs'));\n\n\t\tif ($this->upgrade->processed >= $this->upgrade->total) {\n\t\t\t// Upgrade is finished\n\t\t\tif ($this->upgrade->has_errors) {\n\t\t\t\t// The upgrade was finished with errors. Reset offset\n\t\t\t\t// and errors so the upgrade can start from a scratch\n\t\t\t\t// if attempted to run again.\n\t\t\t\t$this->upgrade->offset = 0;\n\t\t\t\t$this->upgrade->has_errors = false;\n\n\t\t\t\t// TODO Should $this->upgrade->count be updated again?\n\t\t\t} else {\n\t\t\t\t// Everything has been processed without errors\n\t\t\t\t// so the upgrade can be marked as completed.\n\t\t\t\t$this->upgrade->setCompleted();\n\t\t\t}\n\t\t}\n\n\t\t// Give feedback to the user interface about the current batch.\n\t\treturn array(\n\t\t\t'errors' => $result->getErrors(),\n\t\t\t'numErrors' => $failure_count,\n\t\t\t'numSuccess' => $success_count,\n\t\t);\n\t}", "title": "" }, { "docid": "af1701a5894aa59f7e560e07fb437780", "score": "0.5302642", "text": "function _getWelcomePage() {\n global $objTpl, $objCommon, $language, $arrLanguages, $_CONFIG, $_ARRLANG, $contrexxURI;\n\n if (!isset($_SESSION['installer']['started'])) {\n $_SESSION['installer']['started'] = true;\n }\n\n // load content\n $objTpl->addBlockfile('CONTENT', 'CONTENT_BLOCK', 'welcome.html');\n\n $welcomeMsg = str_replace(\"[VERSION]\", str_replace(' Service Pack 0', '', preg_replace('#^(\\d+\\.\\d+)\\.(\\d+)$#', '$1 Service Pack $2', $_CONFIG['coreCmsVersion'])), $_ARRLANG['TXT_WELCOME_MSG']);\n $welcomeMsg = str_replace(\"[NAME]\", $_CONFIG['coreCmsName'], $welcomeMsg);\n\n $objTpl->setVariable(array(\n 'WELCOME_MSG' => $welcomeMsg\n ));\n\n $newestVersion = $objCommon->getNewestVersion();\n if (!$objCommon->_isNewestVersion($_CONFIG['coreCmsVersion'], $newestVersion)) {\n $versionMsg = str_replace(\"[VERSION]\", str_replace(' Service Pack 0', '', preg_replace('#^(\\d+\\.\\d+)\\.(\\d+)$#', '$1 Service Pack $2', $newestVersion)), $_ARRLANG['TXT_NEW_VERSION']);\n $versionMsg = str_replace(\"[NAME]\", \"<a href=\\\"\".$contrexxURI.\"\\\" target=\\\"_blank\\\">\".$_CONFIG['coreCmsName'].\"</a>\", $versionMsg);\n $objTpl->setVariable(array(\n 'NEW_VERSION_TEXT' => \"<br />\".$versionMsg\n ));\n $objTpl->parse('newVersion');\n } else {\n $objTpl->hideBlock('newVersion');\n }\n }", "title": "" }, { "docid": "aa1e3e58ec91536139e63cfdfe1865d2", "score": "0.528623", "text": "public function executeAutomaticUpgrade()\n {\n $this->mLog->addReport(_AD_LEGACY_MESSAGE_UPDATE_STARTED);\n\n //\n // Updates all of module templates\n //\n $this->_updateModuleTemplates();\n if (!$this->_mForceMode && $this->mLog->hasError()) {\n $this->_processReport();\n return false;\n }\n\n //\n // Update blocks.\n //\n $this->_updateBlocks();\n if (!$this->_mForceMode && $this->mLog->hasError()) {\n $this->_processReport();\n return false;\n }\n\n //\n // Update preferences & notifications.\n //\n $this->_updatePreferences();\n if (!$this->_mForceMode && $this->mLog->hasError()) {\n $this->_processReport();\n return false;\n }\n\n //\n // Update module object.\n //\n $this->saveXoopsModule($this->_mTargetXoopsModule);\n if (!$this->_mForceMode && $this->mLog->hasError()) {\n $this->_processReport();\n return false;\n }\n\n //\n // call back 'onUpdate'\n //\n $this->_processScript();\n if (!$this->_mForceMode && $this->mLog->hasError()) {\n $this->_processReport();\n return false;\n }\n\n $this->_processReport();\n\n return true;\n }", "title": "" }, { "docid": "2c685d7b5d8f684a824681614bb5165f", "score": "0.5278612", "text": "public function apiWebsiteUpgrade()\n\t{\n\t\t$v =& $this->scene ;\n\t\t$this->checkAllowed( 'config', 'modify' ) ;\n\t\ttry\n\t\t{\n\t\t\t$theUpdater = new SiteUpdater(\n\t\t\t\t\t$this, $v, $this->getUpdateModelName() ) ;\n\t\t\t$theUpdater->upgradeAllFeatures() ;\n\t\t\t$v->results = APIResponse::noContentResponse() ;\n\t\t}\n\t\tcatch( Exception $x )\n\t\t{ throw BrokenLeg::tossException( $this, $x ) ; }\n\t}", "title": "" }, { "docid": "1559f2e838b5ea969d6273ea83b19b21", "score": "0.52776027", "text": "public function ping_for_new_version() {\r\n\r\n $license_activated = is_multisite() ? get_site_option( WWOF_LICENSE_ACTIVATED ) : get_option( WWOF_LICENSE_ACTIVATED );\r\n\r\n if ( $license_activated !== 'yes' ) {\r\n \r\n if ( is_multisite() )\r\n delete_site_option( WWOF_UPDATE_DATA );\r\n else\r\n delete_option( WWOF_UPDATE_DATA );\r\n\r\n return;\r\n\r\n }\r\n\r\n $retrieving_udpate_data = is_multisite() ? get_site_option( WWOF_RETRIEVING_UPDATE_DATA ) : get_option( WWOF_RETRIEVING_UPDATE_DATA );\r\n if ( $retrieving_udpate_data === 'yes' )\r\n return;\r\n\r\n $update_data = is_multisite() ? get_site_option( WWOF_UPDATE_DATA ) : get_option( WWOF_UPDATE_DATA );\r\n\r\n if ( $update_data ) {\r\n\r\n if ( isset( $update_data->download_url ) ) {\r\n\r\n $file_headers = @get_headers( $update_data->download_url );\r\n\r\n if ( strpos( $file_headers[ 0 ] , '404' ) !== false ) {\r\n\r\n // For some reason the update url is not valid anymore, delete the update data.\r\n if ( is_multisite() )\r\n delete_site_option( WWOF_UPDATE_DATA );\r\n else\r\n delete_option( WWOF_UPDATE_DATA );\r\n \r\n $update_data = null;\r\n\r\n }\r\n\r\n } else {\r\n\r\n // For some reason the update url is not valid anymore, delete the update data.\r\n if ( is_multisite() )\r\n delete_site_option( WWOF_UPDATE_DATA );\r\n else\r\n delete_option( WWOF_UPDATE_DATA );\r\n\r\n $update_data = null;\r\n\r\n }\r\n\r\n }\r\n\r\n /**\r\n * Even if the update data is still valid, we still go ahead and do static json file ping.\r\n * The reason is on WooCommerce 3.3.x , it seems WooCommerce do not regenerate the download url every time you change the downloadable zip file on WooCommerce store.\r\n * The side effect is, the download url is still valid, points to the latest zip file, but the update info could be outdated coz we check that if the download url\r\n * is still valid, we don't check for update info, and since the download url will always be valid even after subsequent release of the plugin coz WooCommerce is reusing the url now\r\n * then there will be a case our update info is outdated. So that is why we still need to check the static json file, even if update info is still valid.\r\n */\r\n\r\n $option = array(\r\n 'timeout' => 10 , //seconds coz only static json file ping\r\n 'headers' => array( 'Accept' => 'application/json' )\r\n );\r\n\r\n $response = wp_remote_retrieve_body( wp_remote_get( apply_filters( 'wwof_plugin_new_version_ping_url' , WWOF_STATIC_PING_FILE ) , $option ) );\r\n\r\n if ( !empty( $response ) ) {\r\n\r\n $response = json_decode( $response );\r\n\r\n if ( !empty( $response ) && property_exists( $response , 'version' ) ) {\r\n\r\n\t\t\t\t $installed_version = is_multisite() ? get_site_option( WWOF_OPTION_INSTALLED_VERSION ) : get_option( WWOF_OPTION_INSTALLED_VERSION );\r\n\r\n\t\t\t\t if ( ( !$update_data && version_compare( $response->version , $installed_version , '>' ) ) ||\r\n\t\t\t\t ( $update_data && version_compare( $response->version , $update_data->latest_version , '>' ) ) ) {\r\n \r\n if ( is_multisite() )\r\n update_site_option( WWOF_RETRIEVING_UPDATE_DATA , 'yes' );\r\n else\r\n update_option( WWOF_RETRIEVING_UPDATE_DATA , 'yes' );\r\n\r\n // Fetch software product update data\r\n if ( is_multisite() )\r\n $this->_fetch_software_product_update_data( get_site_option( WWOF_OPTION_LICENSE_EMAIL ) , get_site_option( WWOF_OPTION_LICENSE_KEY ) , home_url() );\r\n else\r\n $this->_fetch_software_product_update_data( get_option( WWOF_OPTION_LICENSE_EMAIL ) , get_option( WWOF_OPTION_LICENSE_KEY ) , home_url() );\r\n \r\n if ( is_multisite() )\r\n delete_site_option( WWOF_RETRIEVING_UPDATE_DATA );\r\n else\r\n delete_option( WWOF_RETRIEVING_UPDATE_DATA );\r\n\r\n } elseif ( $update_data && version_compare( $update_data->latest_version , $installed_version , '==' ) ) {\r\n\r\n /**\r\n * We delete the option data if update is already installed\r\n * We encountered a bug when updating the plugin via the dashboard updates page\r\n * The update is successful but the update notice does not disappear\r\n */ \r\n if ( is_multisite() )\r\n delete_site_option( WWOF_UPDATE_DATA );\r\n else\r\n delete_option( WWOF_UPDATE_DATA );\r\n\r\n }\r\n\r\n }\r\n\r\n }\r\n\r\n }", "title": "" }, { "docid": "b6c453c20a4b4cdf4310fef2a9fd3e32", "score": "0.5274393", "text": "function upgrade($VersionUpgrade, $OldVersion){\n\t$xmlload = simplexml_load_file(dirname(__FILE__).\"/../settings/settings.xml\");\t\n\t$DevNumbersOriginal = $xmlload->datasources->numberofds;\t\n\t$xmlUpgrade = new DOMDocument('1.0', 'utf-8');\n\t$xmlUpgrade->formatOutput = true;\n\t$xmlUpgrade->preserveWhiteSpace = false;\n\t$xmlUpgrade->load(dirname(__FILE__).\"/../settings/settings.xml\");\t\n\t//If version upgrade to is V2.0\n\tif ($VersionUpgrade == \"2.0\" && $OldVersion == \"1.0\"){\n\t\t//Upgrade Datasources \t\n\t\t//Get item Element\n\t\t$DSUpgrade = $xmlUpgrade->getElementsByTagName('datasources')->item(0);\n\t\t$NumofdevOriginal = $DSUpgrade->getElementsByTagName('numberofds')->item(0);\n\t\t$Numofdevnew = $DevNumbersOriginal;\n\t\t$Numofdevfix = $Numofdevnew - 1; \n\t\t$Number = \"0\";\n\t\twhile($Number<=$Numofdevfix){\n\t\t\t$DSUpgrade1 = $DSUpgrade->getElementsByTagName('ds'. $Number)->item(0);\n\t\t\t$DSUpgrade1->appendChild($xmlUpgrade->createElement('sizex', '500'));\n\t\t\t$DSUpgrade1->appendChild($xmlUpgrade->createElement('sizey', '500'));\n\t\t\t$DSUpgrade1->appendChild($xmlUpgrade->createElement('minute', '1440'));\n\t\t\t//Load child elements\n\t\t\t$xmlUpgrade->getElementsByTagName('datasources')->item(0)->appendChild($DSUpgrade1);\t\t\t\t\t\n\t\t\t$Number++;\n\t\t};\n\t\t//Add weather support\n\t\t$WeatherElem = $xmlUpgrade->getElementsByTagName('settings')->item(0);\n\t\t$WeatherElem->appendChild($xmlUpgrade->createElement('weather'));\n\t\t$WeatherElem2 = $xmlUpgrade->getElementsByTagName('weather')->item(0);\n\t\t$WeatherElem2->appendChild($xmlUpgrade->createElement('en', 'false'));\n\t\t$WeatherElem2->appendChild($xmlUpgrade->createElement('url', 'http://www.yr.no/sted/Sverige/Blekinge/Ronneby/'));\n\t\t$WeatherElem2->appendChild($xmlUpgrade->createElement('xmlfile', 'forecast.xml'));\n\t\t$WeatherElem2->appendChild($xmlUpgrade->createElement('meteogram', 'avansert_meteogram.png'));\n \t$WeatherElem2->appendChild($xmlUpgrade->createElement('number', '7'));\n \t$WeatherElem2->appendChild($xmlUpgrade->createElement('positionx', '11'));\n \t$WeatherElem2->appendChild($xmlUpgrade->createElement('positiony', '616'));\n \t$WeatherElem2->appendChild($xmlUpgrade->createElement('iconsize', '22'));\n \t$WeatherElem2->appendChild($xmlUpgrade->createElement('fontsize', '12'));\n \t$WeatherElem2->appendChild($xmlUpgrade->createElement('transperant', '0.8'));\n\t\t//Add theme support\t\t\t\t\t\t\t\n\t\t$MainUpgrade = $xmlUpgrade->getElementsByTagName('main')->item(0);\n\t\t$MainUpgrade->appendChild($xmlUpgrade->createElement('theme', 'ui-darkness'));\n\t\t//Add additional move settings\n\t\t$MainUpgrade->appendChild($xmlUpgrade->createElement('allmove', 'false'));\n\t\t$MainUpgrade->appendChild($xmlUpgrade->createElement('moverespondpositionx', '10'));\n\t\t$MainUpgrade->appendChild($xmlUpgrade->createElement('moverespondpositiony', '10'));\n\t\t//Add butten settings\n\t\t$MainUpgrade->appendChild($xmlUpgrade->createElement('refreshbutton', 'true'));\n\t\t$MainUpgrade->appendChild($xmlUpgrade->createElement('settingsbutton', 'true'));\n\t\t$MainUpgrade->appendChild($xmlUpgrade->createElement('settingsbuttonpositionx', '867'));\n \t$MainUpgrade->appendChild($xmlUpgrade->createElement('settingsbuttonpositiony', '571'));\n \t$MainUpgrade->appendChild($xmlUpgrade->createElement('refreshbuttonpositionx', '868'));\n \t$MainUpgrade->appendChild($xmlUpgrade->createElement('refreshbuttonpositiony', '598'));\n\t\t//Upgrade version on file\n\t\t$Version_orginal = $MainUpgrade->getElementsByTagName('version')->item(0);\n\t\t$Version_orginal->nodeValue = $VersionUpgrade;\n\t\t//Replace or add elements with new\t\n\t\t$xmlUpgrade->save(dirname(__FILE__).\"/../settings/settings.xml\");\n\t\t?>\n <script>\n\t\tlocation.reload()\n\t\t</script>\n <?php\t\n\t};\n}", "title": "" }, { "docid": "eb97ffe3ebfbaf4e5072b7d352343989", "score": "0.5270649", "text": "public function responseMsg()\n{\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n switch($postObj->MsgType){\n case 'event':\n $this->_doEvent($postObj);\n break;\n case 'text':\n $this->_doText($postObj);\n break;\n case 'image':\n $this->_doImage($postObj);\n break;\n case 'location':\n $this->_doLocation($postObj);\n break;\n default:;\n }\n }", "title": "" }, { "docid": "a4c5cc6594d3b2316c61030d0046beb4", "score": "0.52705586", "text": "function execute() {\n\t\t$versionInfo = VersionCheck::parseVersionXML($this->_descriptor);\n\t\t$pluginVersion = $versionInfo['version'];\n\n\t\t$productType = $pluginVersion->getProductType();\n\t\tif (!preg_match('/^plugins\\.(.+)$/', $productType, $matches) || !in_array($matches[1], Application::getPluginCategories())) {\n\t\t\terror_log(\"Invalid type \\\"$productType\\\".\");\n\t\t\treturn false;\n\t\t}\n\n\t\t$versionDao = DAORegistry::getDAO('VersionDAO');\n\t\t$versionDao->insertVersion($pluginVersion, true);\n\n\t\t$pluginPath = dirname($this->_descriptor);\n\t\t$plugin = @include(\"$pluginPath/index.php\");\n\t\tif ($plugin && is_object($plugin)) {\n\t\t\tPluginRegistry::register($matches[1], $plugin, $pluginPath);\n\t\t}\n\n\t\timport('classes.install.Upgrade');\n\t\t$installer = new Upgrade(array());\n\t\t$result = true;\n\t\t$param = array(&$installer, &$result);\n\t\tif ($plugin->getInstallSchemaFile()) {\n\t\t\t$plugin->updateSchema('Installer::postInstall', $param);\n\t\t}\n\t\tif ($plugin->getInstallSitePluginSettingsFile()) {\n\t\t\t$plugin->installSiteSettings('Installer::postInstall', $param);\n\t\t}\n\t\tif ($plugin->getInstallControlledVocabFiles()) {\n\t\t\t$plugin->installControlledVocabs('Installer::postInstall', $param);\n\t\t}\n\t\tif ($plugin->getInstallEmailTemplatesFile()) {\n\t\t\t$plugin->installEmailTemplates('Installer::postInstall', $param);\n\t\t}\n\t\tif ($plugin->getInstallEmailTemplateDataFile()) {\n\t\t\t$plugin->installEmailTemplateData('Installer::postInstall', $param);\n\t\t}\n\t\tif ($plugin->getInstallDataFile()) {\n\t\t\t$plugin->installData('Installer::postInstall', $param);\n\t\t}\n\t\t$plugin->installFilters('Installer::postInstall', $param);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c91c71c5259b883de281fda47344ad59", "score": "0.52681357", "text": "public function do_update_process(){\n\t\t\n\t\t// $this->update_version('2.1.6');\n\t\t// $this->set_version('2.1.6');\n\t\t\n\t\tif(version_compare($this->version, '1', '<=')){\n\t\t\t$this->update_to_110();\n\t\t}\n\t\t\n\t\tif(version_compare($this->version, '2.0', '<')){\n\t\t\t$this->update_to_20();\n\t\t}\n\t\t\n\t\tif(version_compare($this->version, '2.0.1', '<')){\n\t\t\t$this->update_to_201();\n\t\t}\n\t\t\n\t\tif(version_compare($this->version, '2.1.0', '<')){\n\t\t\t$this->update_to_210();\n\t\t}\n\t\t\n\t\t/* 2.1.5 */\n\t\tif(version_compare($this->version, '2.1.5', '<')){\n\t\t\t$this->update_to_215();\n\t\t}\n\t\t\n\t\t/* 2.1.6 */\n\t\tif(version_compare($this->version, '2.1.6', '<')){\n\t\t\t$this->update_to_216();\n\t\t}\n\n\t\t/* 2.2 */\n\t\tif(version_compare($this->version, '2.2', '<')){\n\t\t\t$this->update_to_22();\n\t\t}\n\t\t\n\t\t/* 2.3 */\n\t\tif(version_compare($this->version, '2.3', '<')){\n\t\t\t$this->update_to_23();\n\t\t}\n\t\t\n\t\tdo_action('essgrid_do_update_process', $this->version);\n\t}", "title": "" }, { "docid": "d7e443a530ae6c243a5a47920bd5ac84", "score": "0.5263911", "text": "function modify_plugin_update_message( $plugin_data, $response ) {\n\t\t\n\t\t// bail ealry if has key\n\t\tif( acf_pro_get_license_key() ) return;\n\t\t\n\t\t\n\t\t// display message\n\t\techo '<br />' . sprintf( __('To enable updates, please enter your license key on the <a href=\"%s\">Updates</a> page. If you don\\'t have a licence key, please see <a href=\"%s\" target=\"_blank\">details & pricing</a>.', 'acf'), admin_url('edit.php?post_type=acf-field-group&page=acf-settings-updates'), 'https://www.advancedcustomfields.com/pro/?utm_source=ACF%2Bpro%2Bplugin&utm_medium=insideplugin&utm_campaign=ACF%2Bupgrade&utm_content=updates' );\n\t\t\n\t}", "title": "" }, { "docid": "e9a171e40dbc634a3014bec98c8e6cca", "score": "0.52527934", "text": "function upgrade_300() {}", "title": "" }, { "docid": "77f9237bb227e5546bf9a385d3f8b6a6", "score": "0.5248631", "text": "function upgrade_210() {}", "title": "" }, { "docid": "f07769074f1aedc8163aa82a6bc8ec3a", "score": "0.5242171", "text": "function upgrade_250() {}", "title": "" }, { "docid": "e107fb701c9eeecfddbcf49e1bd6f31d", "score": "0.5238677", "text": "public function action_complete()\n\t{\n\t\t\\Config::load('foolframe');\n\t\t\\Config::set('foolframe.install.installed', true);\n\t\t\\Config::save('foolframe', 'foolframe');\n\n\t\t$this->process('complete');\n\t\t$this->_view_data['method_title'] = __('Congratulations');\n\t\t$this->_view_data['main_content_view'] = \\View::forge('install::complete');\n\t\treturn \\Response::forge(\\View::forge('install::default', $this->_view_data));\n\t}", "title": "" }, { "docid": "58f9e85f0e795ab058a99a28dbdf4abf", "score": "0.52125716", "text": "public function socket() {\n\t\t$XMLServer = Configure :: read('host');\n\t\t#$fp = fsockopen('127.0.0.1',12345); # test environment\n\t\t$fp = fsockopen($XMLServer, 12345); # scm environment\n\n\t\tif (!is_resource($fp)) {\n\t\t\t$this->log('Xml Server is not responding', 'error');\n\t\t\treturn 'No response from ALG!!';\n\t\t} else {\n\t\t\t$path = Configure :: read('upload_url');\n\t\t\t$handle = fopen($path . 'update.xml', 'r');\n\t\t\t// header(\"Content-Type: text/xml\");\n\t\t\t#$start = '!#KEY:t26iUGbl7NYoi4jtQjBs!>';\n\t\t\t#fwrite($fp,$start);\n\t\t\t$acknowledge = \"\";\n\t\t\t$response = \"\";\n\t\t\t$contents = \"\";\n\t\t\t$record['ack'] = '';\n\t\t\t$record['resp'] = '';\n\n\t\t\twhile (!feof($handle)) {\n\t\t\t\t$contents .= fread($handle, 2048);\n\t\t\t}\n\t\t\tfwrite($fp, $contents);\n\t\t\tfwrite($fp, \"\\n\");\n\n\t\t\t#while (!feof($fp)) {\n\t\t\t#$acknowledge .= fgets($fp, 1024);\n\t\t\t#$stream_meta_data = stream_get_meta_data($fp); //Added line\n\t\t\t#if($stream_meta_data['unread_bytes'] <= 0) break; //Added line\n\t\t\t#}\n\n\t\t\twhile (!feof($fp)) {\n\t\t\t\t$response .= fgets($fp, 1024);\n\t\t\t\t$stream_meta_data = stream_get_meta_data($fp); //Added line\n\t\t\t\tif ($stream_meta_data['unread_bytes'] <= 0)\n\t\t\t\t\tbreak; //Added line\n\t\t\t}\n\n\t\t\t#$record['ack'] =$acknowledge;\n\t\t\t$record['ack'] = '<ack><transaction id=\"1284025424-142\"/></ack>';\n\t\t\t$record['resp'] = $response;\n\n\t\t\t// $this->log($record, LOG_DEBUG); \n\n\t\t\tfclose($fp);\n\t\t\tfclose($handle);\n\t\t\t$path = Configure :: read('upload_url') . 'text123.xml';\n\t\t\tfile_put_contents($path, $response, FILE_APPEND);\n\n\t\t\t$path = Configure :: read('upload_url') . 'ack.xml';\n\t\t\tfile_put_contents($path, $record['ack']);\n\n\t\t\t$path = Configure :: read('upload_url') . 'res.xml';\n\t\t\tfile_put_contents($path, $record['resp']);\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "929e0172a707d1052779f20b0e96059f", "score": "0.52124196", "text": "function upgrade_550() {}", "title": "" }, { "docid": "a55867fcd0a61216b9194d8e4ac196c3", "score": "0.5193012", "text": "function wpgrade_callback_update_notifier_update_notice() {\n\tif ( wpgrade::option( 'themeforest_upgrade' ) ) {\n\t\t$message_type = \"updated\";\n\t\tif ( wpgrade::state()->has( 'theme_updated' ) && isset( $_GET['wpgrade_update'] ) && $_GET['wpgrade_update'] == 'true' ) {\n\t\t\tif ( wpgrade::state()->get( 'theme_updated' ) ) {\n\t\t\t\t$message = 'The theme has been updated successfully';\n\n\t\t\t\t//in case we have backups activated\n\t\t\t\t//add a link to download the backup archive\n\t\t\t\t$backup_uri = wpgrade::state()->get( 'backup_uri', null );\n\n\t\t\t\tif ( ! empty( $backup_uri ) ) {\n\t\t\t\t\t$message .= '<br/><br/><i>' . __( 'If you want, you can download the automatic theme backup.', 'border_txtd' ) . ' <a href=\"' . $backup_uri . '\" title=\"' . esc_attr( __( 'Download Backup', 'border_txtd' ) ) . '\">' . esc_attr( __( 'Download Backup', 'border_txtd' ) ) . '</a></i>';\n\t\t\t\t}\n\t\t\t} else { // error while updating theme\n\t\t\t\t$message = '<b>' . __( 'Upgrade Process Failed', 'border_txtd' ) . '</b><br>' . __( 'The process has encountered the following errors:', wpgrade::textdoamin() );\n\n\t\t\t\t$upgrader = wpgrade::state()->get( 'theme_upgrader', null );\n\n\t\t\t\t$message .= '<ul style=\"list-style-type: square; margin: 0; padding: 0 25px;\">';\n\t\t\t\tif ( $upgrader !== null ) {\n\t\t\t\t\tforeach ( $upgrader->upgrade_errors() as $error ) {\n\t\t\t\t\t\t$message .= \"<li>$error</li>\";\n\t\t\t\t\t}\n\t\t\t\t} else { // failed to retrieve upgrade handler\n\t\t\t\t\t$message .= '<li>' . __( 'Upgrade handler failed to initialize self-diagnostics. (please contact support)', 'border_txtd' ) . '</li>';\n\t\t\t\t}\n\t\t\t\t$message .= '</ul>';\n\n\t\t\t\t/*\n\t\t\t\t$message = 'An error occurred, the theme has not been updated. Please try again later or install the update manually.';\n\t\t\t\t$theme_update_error = wpgrade::state()->get('theme_update_error', array());\n\n\t\t\t\tif (isset($theme_update_error[1])) {\n\t\t\t\t\t$message .= '<br/>(Error message: '.$theme_update_error[1].')';\n\t\t\t\t}\n\t\t\t\t*/\n\n\t\t\t\t$message_type = \"error\";\n\t\t\t}\n\t\t} elseif ( wpgrade::state()->get( 'curl_disabled', false ) ) {\n\t\t\t$message = 'Error: The theme was not updated, because the cURL extension is not enabled on your server. In order to update the theme automatically, the Envato Toolkit Library requires cURL to be enabled on your server. You can contact your hosting provider to enable this extension for you.';\n\t\t\t$message_type = \"error\";\n\t\t} elseif ( wpgrade::state()->has( 'backup_failed' ) && wpgrade::state()->get( 'backup_failed' ) === true ) {\n\t\t\t$message = '<b>' . __( 'Upgrade Backup Process Failed', 'border_txtd' ) . '</b><br>' . __( 'The backup process has encountered the following errors:', 'border_txtd' );\n\n\t\t\t$upgrader = wpgrade::state()->get( 'theme_upgrader', null );\n\n\t\t\t$message .= '<ul style=\"list-style-type: square; margin: 0; padding: 0 25px;\">';\n\t\t\tif ( $upgrader !== null ) {\n\t\t\t\tforeach ( $upgrader->backup_errors() as $error ) {\n\t\t\t\t\t$message .= \"<li>$error</li>\";\n\t\t\t\t}\n\t\t\t} else { // failed to retrieve upgrade handler\n\t\t\t\t$message .= '<li>' . __( 'Upgrade handler failed to initialize self-diagnostics. (please contact support)', 'border_txtd' ) . '</li>';\n\t\t\t}\n\t\t\t$message .= '</ul>';\n\n\t\t\t// @todo in translation refactor :theme_options_url to use absolute url instead of relative\n\t\t\t// @todo update based on basecamp discussion\n\t\t\t$message .= '<i>' . strtr( __( 'You may bypass the backup system by turning off automatic backups in your <a href=\":theme_options_url\">utilities section of theme options</a>.', 'border_txtd' ), array( ':theme_options_url' => admin_url( 'admin.php?page=bucket_options&amp;tab=6' ) ) ) . '<br>' . __( 'Should you choose to disable automatic backups you are <b>strongly encouraged to perform a manual backup</b>.', 'border_txtd' ) . '<br>' . __( 'Skipping the backup process entirely will result, upon a failed upgrade attempt, in the loss of any modifications you have made to the theme.', 'border_txtd' ) . '</i>' . '<br><br><b>' . __( 'Tip', 'border_txtd' ) . '</b>: ' . __( 'Modifying a theme via a child theme is the best way to easily deal with theme upgrade issues.', 'border_txtd' );\n\n\t\t\t$message_type = \"error\";\n\t\t}\n\n\t\tif ( isset( $message ) ) {\n\t\t\techo '<div class=\"' . $message_type . '\"><p>' . $message . '</p></div>';\n\t\t}\n\t}\n}", "title": "" }, { "docid": "ba91f648db2beb9e80d7926980434757", "score": "0.5190929", "text": "function upgrade_100() {}", "title": "" }, { "docid": "5afd5070c559764f36073a2d87b9c056", "score": "0.51806676", "text": "public function show_update_message( $plugin_data, $response ) {\n\t\t// Users have an active license.\n\t\tif ( ! empty( $response->package ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$messages = [\n\t\t\t// Translators: %1$s - URL to the settings page, %2$s - URL to the pricing page.\n\t\t\t'no_key' => __( 'Please <a href=\"%1$s\">enter your license key</a> or <a href=\"%2$s\" target=\"_blank\">get a new one here</a>.', 'meta-box' ),\n\t\t\t// Translators: %1$s - URL to the settings page, %2$s - URL to the pricing page.\n\t\t\t'invalid' => __( 'Your license key is <b>invalid</b>. Please <a href=\"%1$s\">update your license key</a> or <a href=\"%2$s\" target=\"_blank\">get a new one here</a>.', 'meta-box' ),\n\t\t\t// Translators: %1$s - URL to the settings page, %2$s - URL to the pricing page.\n\t\t\t'error' => __( 'Your license key is <b>invalid</b>. Please <a href=\"%1$s\">update your license key</a> or <a href=\"%2$s\" target=\"_blank\">get a new one here</a>.', 'meta-box' ),\n\t\t\t// Translators: %3$s - URL to the My Account page.\n\t\t\t'expired' => __( 'Your license key is <b>expired</b>. Please <a href=\"%3$s\" target=\"_blank\">renew your license</a>.', 'meta-box' ),\n\t\t];\n\t\t$status = $this->option->get_license_status();\n\t\tif ( ! isset( $messages[ $status ] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo '<br><span style=\"width: 26px; height: 20px; display: inline-block;\">&nbsp;</span>' . wp_kses_post( sprintf( $messages[ $status ], $this->settings_page, 'https://metabox.io/pricing/', 'https://metabox.io/my-account/' ) );\n\t}", "title": "" }, { "docid": "59dbc0736379a7c081c9508a41c31bc8", "score": "0.5173389", "text": "protected function install() {\n\t\ttry {\n\t\t\t// open package file\n\t\t\tif (!FileUtil::isURL($this->packageArchive->getArchive())) {\n\t\t\t\t$this->assignPackageInfo();\n\t\t\t}\n\t\t\t\n\t\t\tswitch ($this->step) {\n\t\t\t\t// prepare package installation\n\t\t\t\tcase '':\n\t\t\t\t\n\t\t\t\t\t// download package file if necessary\n\t\t\t\t\tif (FileUtil::isURL($this->packageArchive->getArchive())) {\n\t\t\t\t\t\t// get return value and update entry in \n\t\t\t\t\t\t// package_installation_queue with this value\n\t\t\t\t\t\t$archive = $this->packageArchive->downloadArchive();\n\t\t\t\t\t\t$sql = \"UPDATE\twcf\".WCF_N.\"_package_installation_queue\n\t\t\t\t\t\t\tSET\tarchive = '\".escapeString($archive).\"' \n\t\t\t\t\t\t\tWHERE\tqueueID = \".$this->queueID;\n\t\t\t\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t\t\t\t\t$this->assignPackageInfo();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// check package file\n\t\t\t\t\t$this->checkArchive();\n\t\t\t\t\t\n\t\t\t\t\t// show confirm package installation site if necessary\n\t\t\t\t\tif ($this->confirmInstallation == 1 && $this->parentQueueID == 0) {\n\t\t\t\t\t\t$this->nextStep = 'confirm';\n\t\t\t\t\t}\n\t\t\t\t\t// show the installation frame if necessary\t\n\t\t\t\t\telse if ($this->parentQueueID == 0) {\n\t\t\t\t\t\t$this->nextStep = 'installationFrame';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$this->nextStep = 'requirements';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tHeaderUtil::redirect('index.php?page=Package&action='.$this->action.'&queueID='.$this->queueID.'&step='.$this->nextStep.'&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED);\n\t\t\t\t\texit;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// show confirm package installation site\t\n\t\t\t\tcase 'confirm':\n\t\t\t\t\t// get requirements\n\t\t\t\t\t$requirements = $this->packageArchive->getRequirements();\n\t\t\t\t\t$openRequirements = $this->packageArchive->getOpenRequirements();\n\t\t\t\t\t$updatableInstances = array();\n\t\t\t\t\t$missingPackages = 0;\n\t\t\t\t\tforeach ($requirements as $key => $requirement) {\n\t\t\t\t\t\tif (isset($openRequirements[$requirement['name']])) {\n\t\t\t\t\t\t\t$requirements[$key]['open'] = 1;\n\t\t\t\t\t\t\t$requirements[$key]['action'] = $openRequirements[$requirement['name']]['action'];\n\t\t\t\t\t\t\tif (!isset($requirements[$key]['file'])) $missingPackages++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t$requirements[$key]['open'] = 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// get other instances\n\t\t\t\t\tif ($this->action == 'install') {\n\t\t\t\t\t\t$updatableInstances = $this->packageArchive->getUpdatableInstances();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tWCFACP::getMenu()->setActiveMenuItem('wcf.acp.menu.link.package');\n\t\t\t\t\tWCF::getTPL()->assign(array(\n\t\t\t\t\t\t'archive' => $this->packageArchive,\n\t\t\t\t\t\t'package' => $this->package,\n\t\t\t\t\t\t'requiredPackages' => $requirements,\n\t\t\t\t\t\t'missingPackages' => $missingPackages,\n\t\t\t\t\t\t'updatableInstances' => $updatableInstances,\n\t\t\t\t\t\t'excludingPackages' => $this->packageArchive->getConflictedExcludingPackages(),\n\t\t\t\t\t\t'excludedPackages' => $this->packageArchive->getConflictedExcludedPackages()\n\t\t\t\t\t));\n\t\t\t\t\tWCF::getTPL()->display('packageInstallationConfirm');\n\t\t\t\t\texit;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase 'changeToUpdate': \n\t\t\t\t\t// get package id\n\t\t\t\t\t$updatePackageID = 0;\n\t\t\t\t\tif (isset($_REQUEST['updatePackageID'])) $updatePackageID = intval($_REQUEST['updatePackageID']);\n\t\t\t\t\t\n\t\t\t\t\t// check package id\n\t\t\t\t\t$updatableInstances = $this->packageArchive->getUpdatableInstances();\n\t\t\t\t\tif (!isset($updatableInstances[$updatePackageID])) {\n\t\t\t\t\t\tthrow new IllegalLinkException();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// update queue entry\n\t\t\t\t\t$sql = \"UPDATE\twcf\".WCF_N.\"_package_installation_queue\n\t\t\t\t\t\tSET\taction = 'update',\n\t\t\t\t\t\t\tpackageID = \".$updatePackageID.\"\n\t\t\t\t\t\tWHERE\tqueueID = \".$this->queueID;\n\t\t\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t\t\t\t\n\t\t\t\t\tHeaderUtil::redirect('index.php?page=Package&action=update&queueID='.$this->queueID.'&step=installationFrame&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED);\n\t\t\t\t\texit;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// cancel the installation\n\t\t\t\tcase 'cancel':\n\t\t\t\t\t$this->packageArchive->deleteArchive();\n\t\t\t\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_package_installation_queue\n\t\t\t\t\t\tWHERE\t\tqueueID = \".$this->queueID;\n\t\t\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t\t\t\t\n\t\t\t\t\tHeaderUtil::redirect('index.php?page=PackageList&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED);\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// show the installation frame\t\n\t\t\t\tcase 'installationFrame':\n\t\t\t\t\t$this->calcProgress(0);\n\t\t\t\t\t$this->nextStep = 'requirements';\n\t\t\t\t\tWCF::getTPL()->assign(array(\n\t\t\t\t\t\t'nextStep' => $this->nextStep\n\t\t\t\t\t));\n\t\t\t\t\tWCF::getTPL()->display('packageInstallationFrame');\n\t\t\t\t\texit;\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// check if this package depends on other packages\t\n\t\t\t\tcase 'requirements':\n\t\t\t\t\tif ($this->installPackageRequirements()) {\n\t\t\t\t\t\t$this->calcProgress(1);\n\t\t\t\t\t\t$this->nextStep = 'exclusions';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tWCF::getTPL()->display('packageInstallationRequirements');\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// check for conflicted exclusions\t\n\t\t\t\tcase 'exclusions':\n\t\t\t\t\t$this->checkExclusions();\n\t\t\t\t\t$this->calcProgress(1);\n\t\t\t\t\t$this->nextStep = 'package';\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// install package itself\n\t\t\t\tcase 'package':\n\t\t\t\t\t// install selectable package requirements\n\t\t\t\t\t$this->installSelectablePackageRequirements();\n\t\t\t\t\t// install package\n\t\t\t\t\t$this->installPackage();\n\t\t\t\t\t$this->calcProgress(2);\n\t\t\t\t\t$this->nextStep = 'parent';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// manage parent packages (these are needed by plugins)\n\t\t\t\tcase 'parent':\n\t\t\t\t\t$this->installPackageParent();\n\t\t\t\t\t$this->rebuildConfigFiles();\n\t\t\t\t\t$this->calcProgress(3);\n\t\t\t\t\t$this->nextStep = 'packageInstallationPlugins';\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// install packageInstallationPlugins\n\t\t\t\tcase 'packageInstallationPlugins':\n\t\t\t\t\tif ($this->hasPackageInstallationPlugins()) {\n\t\t\t\t\t\t$this->installPackageInstallationPlugins();\n\t\t\t\t\t}\n\t\t\t\t\t$this->calcProgress(4);\n\t\t\t\t\t$this->nextStep = 'execPackageInstallationPlugins';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// At this point execution of packageInstallationPlugins starts. The getNextStep method will return \n\t\t\t\t// the class name of the first available packageInstallationPlugin. Thus in the next installation step\n\t\t\t\t// this switch will jump into the default: directive. The default: directive will then be called for \n\t\t\t\t// every available packageInstallationPlugin. The actual execution of the respective packageInstallationPlugin \n\t\t\t\t// is being done there.\n\t\t\t\tcase 'execPackageInstallationPlugins':\n\t\t\t\t\t$this->loadPackageInstallationPlugins();\n\t\t\t\t\t$this->calcProgress(5);\n\t\t\t\t\t$this->nextStep = $this->getNextPackageInstallationPlugin('');\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\t// check if this package has optional packages\n\t\t\t\tcase 'optionals':\n\t\t\t\t\t// update package version before installing optionals\n\t\t\t\t\t$this->updatePackageVersion();\n\t\t\t\t\t\n\t\t\t\t\t// install optional packages\n\t\t\t\t\tif ($this->installPackageOptionals()) {\n\t\t\t\t\t\t$this->calcProgress(6);\n\t\t\t\t\t\t$this->nextStep = 'finish';\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tWCF::getTPL()->display('packageInstallationOptionals');\n\t\t\t\t\t\texit;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// finish installation\n\t\t\t\tcase 'finish':\n\t\t\t\t\t$this->calcProgress(7);\n\t\t\t\t\t$this->nextStep = $this->finishInstallation();\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// start rollback of all installations in the active process\n\t\t\t\tcase 'rollback':\n\t\t\t\t\t// delete packages that are not rollbackable\n\t\t\t\t\t$sql = \"DELETE FROM\twcf\".WCF_N.\"_package_installation_queue\n\t\t\t\t\t\tWHERE\t\tprocessNo = \".$this->processNo.\"\n\t\t\t\t\t\t\t\tAND (\n\t\t\t\t\t\t\t\t\taction <> 'install'\n\t\t\t\t\t\t\t\t\tOR cancelable = 0\n\t\t\t\t\t\t\t\t)\";\n\t\t\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t\t\t\t\n\t\t\t\t\t// enable rollback for all other packages\n\t\t\t\t\t$sql = \"UPDATE\twcf\".WCF_N.\"_package_installation_queue\n\t\t\t\t\t\tSET\taction = 'rollback',\n\t\t\t\t\t\t\tdone = 0\n\t\t\t\t\t\tWHERE\tprocessNo = \".$this->processNo.\"\n\t\t\t\t\t\t\tAND action = 'install'\n\t\t\t\t\t\t\tAND cancelable = 1\";\n\t\t\t\t\tWCF::getDB()->sendQuery($sql);\n\t\t\t\t\tHeaderUtil::redirect('index.php?page=Package&action=openQueue&processNo='.$this->processNo.'&packageID='.PACKAGE_ID.SID_ARG_2ND_NOT_ENCODED);\n\t\t\t\t\texit;\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t// execute PackageInstallationPlugins\n\t\t\t\tdefault:\n\t\t\t\t\t$this->executePackageInstallationPlugin($this->step);\n\t\t\t\t\t$this->nextStep = $this->getNextPackageInstallationPlugin($this->step);\n\t\t\t}\n\t\t\t\n\t\t\tWCF::getTPL()->assign(array(\n\t\t\t\t'nextStep' => $this->nextStep\n\t\t\t));\n\t\t\tWCF::getTPL()->display('packageInstallationNext');\n\t\t}\n\t\tcatch (SystemException $e) {\n\t\t\t$this->showPackageInstallationException($e);\n\t\t}\n\t}", "title": "" }, { "docid": "c943b94123de268b39cb306fb8dc1ca4", "score": "0.517338", "text": "public function plugin_update_message( $plugin_data, $response ) {\n\t\tif ( empty( $plugin_data['is_beta'] ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tprintf(\n\t\t\t'</p><p class=\"rank-math-beta-update-notice\">%s',\n\t\t\tesc_html__( 'This update will install a beta version of Rank Math.', 'rank-math' )\n\t\t);\n\t}", "title": "" }, { "docid": "c75054627591b6263ee5f881d3a0b399", "score": "0.51707673", "text": "protected function _upgrade() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a7f5a8ababa95745b194d086e993ec62", "score": "0.5157309", "text": "function checkUpgrade ()\n\t{\n\t\t\n\t\t$liveUpdate = false; // Set to true for the real thing\n\t\t\n\n\t\t$hasAlreadyRun = get_option('qtl-v3upgrade');\n\t\t\n\t\t$report= '<h2>CHECK FOR UPGRADE</h2>';\n\t\t$report.= 'Step 1 : Check for previous version<br/>';\n\t\t// Check if an option exists from the previous version_compare\n\t\tif(get_option('qtl-minimum-editor'))\n\t\t{\t\t\t\n\t\t\t$report.= 'Previous Version Found<hr/>';\n\t\n\t\t\t// Now see if the upgrade has been successful\n\t\t\tif(get_option('qtl-v3upgrade')<>1)\n\t\t\t{\n\t\t\t\t\n\t\t\t\t//echo '<h1>RUN</h1>';\n\t\t\t\t\n\t\t\t\tglobal $wpdb;\n\t\t\t\t\n\t\t\t\t// Create the lookup array for legacy items\n\t\t\t\t$legacyLookupArray =array();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// This does not exist so DO THE UPGRADE\n\t\t\t\t$report.= '<h2>Do the upgrade</h2>';\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t// Copy question pots\n\t\t\t\t$report.= '<h3>Question Pots</h3>';\n\t\t\t\t$table_name = $wpdb->prefix . \"AI_Quiz_tblQuestionPots\";\t\t\n\t\t\t\t\n\t\t\t\t$SQL='Select * FROM '.$table_name.' ORDER by potID ASC';\n\t\t\t\t$potRS = $wpdb->get_results( $SQL, ARRAY_A );\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tforeach($potRS as $potInfo)\n\t\t\t\t{\n\t\t\t\t\t$potID = $potInfo['potID'];\n\t\t\t\t\t$potName = $potInfo['potName'];\t\t\t\n\t\t\t\t\t$report.= $potName.' ('.$potID.')<hr/>';\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// Create post object\n\t\t\t\t\t$my_post = array(\n\t\t\t\t\t 'post_title'\t\t=> wp_strip_all_tags( $potName ),\n\t\t\t\t\t 'post_status'\t\t=> 'publish',\n\t\t\t\t\t 'post_type'\t\t=> 'ek_pot',\n\n\t\t\t\t\t );\n\t\t\t\t\t \n\t\t\t\t\t// Insert the post into the database\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif($liveUpdate==true)\n\t\t\t\t\t{\n\t\t\t\t\t\t$newPotID = wp_insert_post( $my_post );\n\t\t\t\t\t\t$report.= 'New ID = '.$newPotID.'</br>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$legacyLookupArray[] = array(\n\t\t\t\t\t\t\t\"itemType\"\t\t=> \"pot\",\n\t\t\t\t\t\t\t\"originalID\"\t=> $potID,\n\t\t\t\t\t\t\t\"newID\"\t\t\t=> $newPotID,\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// Now get all the questions for the old pot and add them to the new pot\n\t\t\t\t\t$table_name = $wpdb->prefix . \"AI_Quiz_tblQuestions\";\t\t\n\t\t\n\t\t\t\t\t\n\t\t\t\t\t$SQL='Select * FROM '.$table_name.' WHERE potID='.$potID;\t\n\t\t\t\t\t$questionRS = $wpdb->get_results($SQL, ARRAY_A);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\techo '<pre>';\n\t\t\t\t\t//print_r($questionRS);\n\t\t\t\t\techo '</pre>';\n\t\t\t\t\tforeach($questionRS as $questionInfo)\n\t\t\t\t\t{\n\t\t\t\t\t\t$questionID = $questionInfo['questionID'];\n\t\t\t\t\t\t$question = $questionInfo['question'];\n\t\t\t\t\t\t$qType = $questionInfo['qType'];\n\t\t\t\t\t\t$correctFeedback = $questionInfo['correctFeedback'];\n\t\t\t\t\t\t$incorrectFeedback = $questionInfo['incorrectFeedback'];\n\t\t\t\t\t\t$optionOrderType = $questionInfo['optionOrderType'];\n\t\t\t\t\t\t\n\t\t\t\t\t\t// COnvert qTypes\n\t\t\t\t\t\tswitch ($qType)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcase \"radio\":\n\t\t\t\t\t\t\t\t$newQtype = 'singleResponse';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase \"check\":\n\t\t\t\t\t\t\t\t$newQtype = 'multiResponse';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase \"text\":\n\t\t\t\t\t\t\t\t$newQtype = 'shortTextResponse';\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcase \"blank\":\n\t\t\t\t\t\t\t\t$newQtype = 'multiBlanks';\n\t\t\t\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t$report.= '<h2>Question : '.$question.'</h2>';\n\t\t\t\t\t\t$report.= 'qType = '.$qType.'<br/>';\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// Get any response options\n\t\t\t\t\t\t$table_name = $wpdb->prefix . \"AI_Quiz_tblResponseOptions\";\t\t\n\t\t\t\t\t\t$SQL='Select * FROM '.$table_name.' WHERE questionID='.$questionID.' ORDER by optionOrder ASC';\n\t\t\t\t\t\t$responseOptionRS = $wpdb->get_results( $SQL, ARRAY_A );\n\t\t\t\t\t\techo '<pre>';\n\t\t\t\t\t\t//print_r($responseOptionRS);\n\t\t\t\t\t\techo '</pre>';\n\t\t\t\t\t\t$report.= '<h3>Response Options</h3>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t// Create option array\n\t\t\t\t\t\t$options_data= array();\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($newQtype==\"multiBlanks\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($responseOptionRS as $optionInfo)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//$isCorrect = $optionInfo['isCorrect'];\n\t\t\t\t\t\t\t\t$optionValue = $optionInfo['optionValue'];\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t//unseralise this database\n\t\t\t\t\t\t\t\t$thisOptionArray = unserialize($optionValue);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\techo '<pre>';\n\t\t\t\t\t\t\t\t//print_r($thisOptionArray);\n\t\t\t\t\t\t\t\techo '</pre>';\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// Is this array key an answer?\n\t\t\t\t\t\t\t\tforeach($thisOptionArray as $key=>$value)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(stristr($key,'answers')!==FALSE)\n\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\n\t\n\t\t\t\t\t\t\t\t\t\t$possibleAnswers = $value[0];\n\t\t\t\t\t\t\t\t\t\t// Now add the possible answers array to the mast option array\n\t\t\t\t\t\t\t\t\t\t$options_data[] = \n\t\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t\t\"optionValue\" => $possibleAnswers,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\n\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//$report.='thisInfo='.$thisInfo[0].'<br/>';\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\t//$report.= $optionValue.' ('.$isCorrect.')<br/>';\n\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tforeach($responseOptionRS as $optionInfo)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$isCorrect = $optionInfo['isCorrect'];\n\t\t\t\t\t\t\t\t$optionValue = $optionInfo['optionValue'];\n\t\t\t\t\t\t\t\t$report.= $optionValue.' ('.$isCorrect.')<br/>';\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$options_data[] = array (\n\t\t\t\t\t\t\t\t\t\"optionValue\" => $optionValue,\n\t\t\t\t\t\t\t\t\t\"isCorrect\" => $isCorrect\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\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\n\t\t\t\t\t\n\t\t\t\t\t\t$randomiseOptions = \"\";\n\t\t\t\t\t\tif($optionOrderType<>\"ordered\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$randomiseOptions=\"on\";\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$totalOptions = count($options_data);\n\t\t\t\t\t\t$next_key = $totalOptions+1;\n\t\t\t\t\t\t$report.= 'Total Options = '.$totalOptions.'<br/>';\n\t\t\t\t\t\t$report.= 'next key = '.$next_key.'</br>';\n\t\t\t\t\t\t$report.= 'randomiseOptions = '.$randomiseOptions.'</br>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\techo '<pre>';\n\t\t\t\t\t\t\t\tprint_r($options_data);\n\t\t\t\t\t\t\t\techo '</pre>';\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// Update the question meta\n\t\t\t\t\t\t\n\t\t\t\t\t\tif($liveUpdate==true)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// Create post object\n\t\t\t\t\t\t\t$my_post = array(\n\t\t\t\t\t\t\t 'post_title'\t\t=> \"temp title\",\n\t\t\t\t\t\t\t 'post_status'\t\t=> 'publish',\n\t\t\t\t\t\t\t 'post_type'\t\t=> 'ek_question',\n\t\t\t\t\t\t\t 'post_content'\t=> $question,\n\t\t\t\t\t\t\t 'post_parent'\t\t=> $newPotID,\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$newQuestionID = wp_insert_post( $my_post );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$legacyLookupArray[] = array(\n\t\t\t\t\t\t\t\t\"itemType\"\t\t=> \"question\",\n\t\t\t\t\t\t\t\t\"originalID\"\t=> $questionID,\n\t\t\t\t\t\t\t\t\"newID\"\t\t\t=> $newQuestionID,\n\t\t\t\t\t\t\t);\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t// Insert the question into the database\n\t\t\t\t\t\t\t$title = substr(preg_replace(\"/[^A-Za-z0-9 ]/\", ' ', strip_tags($question) ), 0, 80);\n\t\t\t\t\t\t\t$title=$title.'...';\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$where = array( 'ID' => $newQuestionID );\n\t\t\t\t\t\t\t$wpdb->update( $wpdb->posts, array( 'post_title' => $title ), $where );\n\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t\tupdate_post_meta( $newQuestionID, 'qType', $newQtype ); \n\t\t\t\t\t\t\tupdate_post_meta( $newQuestionID, 'responseOptions', $options_data ); \n\t\t\t\t\t\t\tupdate_post_meta( $newQuestionID, 'autoIncrementOptionKeyID', $next_key );\t\n\t\t\t\t\t\t\tupdate_post_meta( $newQuestionID, 'randomiseOptions', $randomiseOptions );\n\t\t\t\t\t\t\tupdate_post_meta( $newQuestionID, 'correctFeedback', $correctFeedback );\t\t\n\t\t\t\t\t\t\tupdate_post_meta( $newQuestionID, 'incorrectFeedback', $incorrectFeedback );\n\n\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\techo '<hr/>';\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif($liveUpdate==true)\n\t\t\t\t{\t\t\t\t\n\t\t\t\t\tglobal $legacyLookupTable;\n\t\t\t\t\tforeach($legacyLookupArray as $lookupInfo)\n\t\t\t\t\t{\n\t\t\t\t\t\t$itemType = $lookupInfo[\"itemType\"];\n\t\t\t\t\t\t$originalID = $lookupInfo[\"originalID\"];\n\t\t\t\t\t\t$newID = $lookupInfo[\"newID\"];\n\t\t\t\t\t\t\n\t\t\t\t\t\t$report.= 'Item Type = '.$itemType.'<br/>';\n\t\t\t\t\t\t$report.= 'Old ID = '.$originalID.'<br/>';\n\t\t\t\t\t\t$report.= 'New ID = '.$newID.'<hr/>';\n\t\t\t\t\t\t\n\t\t\t\t\t\t$wpdb->query( $wpdb->prepare(\n\t\t\t\t\t\t\"INSERT INTO \".$legacyLookupTable.\" (itemType, originalID, newID) VALUES ( %s, %d, %s )\",\n\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t$itemType,\n\t\t\t\t\t\t\t$originalID,\n\t\t\t\t\t\t\t$newID\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\n\t\t\t\t\t// Update the site meta that it has been upgraded\n\t\t\t\t\t$report.='<h2>update Site option</h2>';\n\t\t\t\t\tupdate_option( \"qtl-v3upgrade\", 1 ); \t\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\n\t\n\t\t\t\t\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$report.='Already Updated';\n\t\t\t\t//update_option( \"qtl-v3upgrade\", false ); \t\t\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\techo $report;\n\t\tdie();\n\n\t\n\t}", "title": "" }, { "docid": "c987508f6ec6b78d1c15c888b05f0c78", "score": "0.5156922", "text": "function upgrade_431() {}", "title": "" }, { "docid": "92c711e6467d2de7bc475f7883b1d635", "score": "0.5151258", "text": "function upgrade_420() {}", "title": "" }, { "docid": "4e2da18c79b00b383c5cd748df880e78", "score": "0.5147392", "text": "protected function is_possible_upgrade() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cffaf88a99d4ddb4bca2aeb3d29de5aa", "score": "0.51404583", "text": "function doUpgrade($simulation=false) {\n global $ftp,$DOCUMENT_ROOT;\n global $lang,$shop,$config;\n\n $this->_simulation=$simulation;\n\n $this->_getFiles();\n if (empty($this->_files)) $this->_getFiles();\n $ftp->connect();\n //print \"<table cellspacing=1 cellpadding=0 border=0>\\n\";\n $result=array();\n foreach ($this->_files as $_file) {\n // print \"<tr>\\n\";\n // spawdz, czy plik mozna zaktualizowac\n $result_upgrade_test=$this->_upgradeTestFile($_file);\n\n if (! ereg(\"000-upgrade_config.php\",$_file)) {\n // pomiń plik konfiguracji aktualnie instalowanego pakietu\n $result[$_file]['result']=$result_upgrade_test;\n }\n\n if (($result_upgrade_test>0) && ($result_upgrade_test!=2)) {\n $this->upgrade_status=1;\n }\n if ($result_upgrade_test==0) {\n // instaluj plik jeśli nie został wywołany tryb symulacji lub jeśli jest odczytywany plik konfiguracyjny\n if ((! $this->_simulation) || (ereg(\"000-upgrade_config.php\",$_file))) {\n if (! $this->upgradeFile($_file)) {\n $result['files'][$_file]=UPGRADE_RESULT_ERROR;\n } else {\n // start home.pl 2005-08-17 [email protected]\n // instaluj plik konfiguracyjny do głównego katalogu i do admin (dla home.pl)\n // gdyż na home.pl plik z głównego katalogu nie jest dostępny i jego\n // kopia musi znajdować się w podkatalogu \"admin\"\n if ((ereg(\"000-upgrade_config.php\",$_file)) && ($shop->home)) {\n if ($fd=fopen(\"/tmp/000-upgrade_config.php\",\"w+\")) {\n fwrite($fd,$this->_source,strlen($this->_source));\n fclose($fd);\n $ftp->put(\"/tmp/000-upgrade_config.php\",$config->ftp['ftp_dir'].\"/admin\",\"000-upgrade_config.php\");\n } else {\n die (\"Error: Unable to install file /tmp/000-upgrade_config.php\");\n }\n }\n // end home.pl\n\n }\n\n if (ereg(\"000-upgrade_config.php\",$_file)) {\n // odczytaj numer wersji aktualnie instalowanego pakietu\n include_once (\"000-upgrade_config.php\");\n if (! defined(\"PATCH_VERSION\")) {\n $this->upgrade_status=1;\n } else {\n $this->_version=PATCH_VERSION;\n }\n\n // kod aktywacyjny związany z pakietem aktualizacyjnym\n if (defined(\"PATCH_CODE\")) {\n $this->_patch_code=PATCH_CODE;\n }\n\n }\n }\n\n // sprawdź wersję instalowanego pakietu,\n if (! $this->checkVersion()) {\n return (-1);\n }\n\n // } elseif ($result_upgrade_test==-1) {\n // if (! $this->upgradeFile($_file,'',UPGRADE_FILE_MOD)) {\n // $result['files'][$_file]=UPGRADE_RESULT_ERROR;\n // }\n } else {\n //print \"</td>\\n\";\n //print \"<td>\\n\";\n //print \" <font color=\\\"$color\\\">\".$lang->upgrade_file_status_simulation[$result_upgrade_test].\"</font>\";\n //print \"</td>\\n\";\n global $shop;\n if (($result_upgrade_test!=2) && ($this->_simulation) && !@$shop->home) {\n //print \"<td>\\n\";\n // pokaż formularze do wykrycia modyfikacji pliku i \"wyleczenia/pogodzenia\" zmian\n //print \" <form action=repair.php method=POST target=window>\\n\";\n //print \" <input type=hidden name=file[name] value='\".$_file.\"'>\\n\";\n $result[$_file]['form']['name']=$_file;\n $result[$_file]['form']['upgrade_file']=$this->upgradeFile;\n //print \" <input type=hidden name=file[upgrade_file] value='\".$this->upgradeFile.\"'>\\n\";\n //print \" <input type=hidden name=file[path] value='\".$this->_files['path'].\"'>\\n\";\n $result[$_file]['form']['path']=$this->_files['path'];\n //print \" <input type=hidden name=file[upgrade] value='\".$this->_files['upgrade'].\"'>\\n\";\n $result[$_file]['form']['upgrade']=$this->_files['upgrade'];\n //print \" <input type=submit value='$lang->upgrade_file_repair' onclick='window.open(\\\"\\\", \\\"window\\\", \\\"width=800, height=600, status=no, toolbar=no, scrollbars=yes, resize=1\\\")'>\\n\";\n //print \" </form>\\n\";\n //print \"</td>\\n\";\n } else {\n // instalacja plików z bufora, lub nadpisanie plików z dysku plikami z pakietu\n // sprawdź, czy aktualizowany plik jest w buforze, jeśli tak to odczytaj jego zawartość i zainstaluj\n // jeśli nie, instaluj pliki z pakietu\n $upgrade_file_source=$this->getFileFromDB($_file);\n if ($upgrade_file_source) {\n // plik jest w buforze\n $this->upgradeFile($_file,$upgrade_file_source,UPGRADE_FILE_MOD);\n $result[$_file]['result']=4;\n } else {\n // nie ma plku w buforze, weź plik z pakietu akualizacyjnego\n $this->upgradeFile($_file);\n $result[$_file]['result']=0;\n }\n }\n //print \"</tr>\\n\";\n }\n } // end foreach()\n //print \"</table>\\n\";\n\n // zapamiętaj wynik testu/aktualizacji\n $this->_result=$result;\n //print \"<pre>\";print_r($result);print \"</pre>\";\n\n\n if (empty($result)) {\n print \"<font color=\\\"red\\\">$lang->upgrade_error_ext</font>\\n\";\n $this->upgrade_status=2;\n }\n\n global $__database_md5;\n\n // zapisz nową bazę sum kontrolnych\n if (! $this->_simulation) {\n if (FileChecksum::saveDat()) {\n print \"<p>$lang->upgrade_checksums_upgraded <p>\";\n } else {\n print \"<p><font color=\\\"red\\\">$lang->upgrade_checksums_upgrade_error</font><p>\\n\";\n }\n }\n $ftp->close();\n\n return (1);\n }", "title": "" }, { "docid": "fb12799e748cbb7edb97ea1a8df054c6", "score": "0.5134028", "text": "public function upgrade() {\n\t\treturn $this->_upgrade;\n\t}", "title": "" }, { "docid": "a64b8ca72ae43551431540634f6eecac", "score": "0.5125321", "text": "protected function process_response($response)\n {\n }", "title": "" }, { "docid": "008fff76f6a90ec05819aa566bfaf324", "score": "0.5124445", "text": "protected function processResponse() {\n\t\t$this->errors = $this->json['errors'];\n\t\t$this->api_version = $this->json['apiVersion'];\n\t\t$this->loaded_date = $this->json['mtime'];\n\t\t$this->capabilities['id'] = $this->json['id'];\n\t\t$this->capabilities = array_merge($this->capabilities,$this->json['capabilities']);\n\t}", "title": "" }, { "docid": "18a7dfdc72ff4554a8fad1f9a2449246", "score": "0.5115916", "text": "abstract protected function _upgrade( array $option );", "title": "" }, { "docid": "81629a77d1804715e396cb7b82064e49", "score": "0.51088667", "text": "public function upgrade() {\n $pkg = $this;\n parent::upgrade();\n\n $this->_installThemes($pkg);\n $this->_installBlocks($pkg);\n $this->_installSinglePages($pkg);\n }", "title": "" }, { "docid": "599d325aaaa860ac6559dcdb92bd3c9c", "score": "0.51019883", "text": "public static function maybe_update_installation_progress() {\r\n\t\tif( isset( $_POST['wootax_license_key'] ) ) {\r\n\t\t\t$license = trim( $_POST['wootax_license_key'] );\r\n\t\t\r\n\t\t\tif ( !empty( $license ) ) {\r\n\t\t\t\t// data to send in our API request\r\n\t\t\t\t$api_params = array( \r\n\t\t\t\t\t'edd_action'=> 'activate_license', \r\n\t\t\t\t\t'license' \t=> $license, \r\n\t\t\t\t\t'item_name' => urlencode( 'WooTax Plugin for WordPress' ), // the name of our product in EDD\r\n\t\t\t\t\t'url' \t\t=> home_url(),\r\n\t\t\t\t);\r\n\t\t\t\t\r\n\t\t\t\t// Call the custom API.\r\n\t\t\t\t$response = wp_remote_get( add_query_arg( $api_params, 'http://wootax.com' ), array( 'timeout' => 15, 'sslverify' => false ) );\r\n\t\t\r\n\t\t\t\t// make sure the response came back okay\r\n\t\t\t\tif ( is_wp_error( $response ) ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\r\n\t\t\t\t// decode the license data\r\n\t\t\t\t$license_data = json_decode( wp_remote_retrieve_body( $response ) );\r\n\t\t\t\t\r\n\t\t\t\t// $license_data->license will be either \"valid\" or \"invalid\"\r\n\t\t\t\tif ( $license_data->license == \"valid\" ) {\r\n\t\t\t\t\tupdate_option( 'wootax_license_key', $license );\r\n\t\t\t\t} else {\r\n\t\t\t\t\tupdate_option( 'wootax_license_key', false );\r\n\r\n\t\t\t\t\t// Display message\r\n\t\t\t\t\twootax_add_message( 'The license key you entered is invalid. Please try again.' );\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\twootax_add_message( 'Please enter your license key.' );\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "87df8ad7d92fb90a4ff5664ac805ec47", "score": "0.50726247", "text": "public function upgradePackageAction() {\n\n //USER VALIDATION\n if (!$this->_helper->requireUser()->isValid())\n return;\n\n $listing_singular_lc = lcfirst($this->_listingType->title_singular);\n $listing_singular_uc = ucfirst($this->_listingType->title_singular);\n\n //GET LISTING ID, LISTING OBJECT AND THEN CHECK VALIDATIONS\n $listingtype_id = $this->_listingTypeId;\n\n $title = $this->_listingType->title_plural;\n $viewer = Engine_Api::_()->user()->getViewer();\n $viewer_id = $viewer->getIdentity();\n\n $page = $this->_getParam('page', 1);\n\n Engine_Api::_()->getApi('Core', 'siteapi')->setView();\n Engine_Api::_()->getApi('Core', 'siteapi')->setLocal();\n\n $listing_id = $this->_getParam('listing_id');\n if (empty($listing_id)) {\n $this->respondWithError('no_record');\n }\n $sitereview = Engine_Api::_()->getItem('sitereview_listing', $listing_id);\n if (empty($sitereview)) {\n $this->respondWithError('no_record');\n }\n if (isset($sitereview->package_id) && !empty($sitereview->package_id))\n $currentPackage = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id);\n\n\n if ($this->getRequest()->isGet()) {\n try {\n\n $packages_select = Engine_Api::_()->getDbtable('packages', 'sitereviewpaidlisting')->getPackagesSql($viewer_id, $listingtype_id, 1)\n ->where(\"update_list = ?\", 1)\n ->where(\"enabled = ?\", 1)\n ->where(\"package_id <> ?\", $sitereview->package_id);\n $paginator = Zend_Paginator::factory($packages_select);\n\n $paginator = $paginator->setCurrentPageNumber($page);\n $bodyParams[\"getTotalItemCount\"] = $paginator->getTotalItemCount();\n foreach ($paginator as $package) {\n $packageShowArray = array();\n\n if (isset($package->package_id) && !empty($package->package_id))\n $packageShowArray['package_id'] = $package->package_id;\n\n if (isset($package->title) && !empty($package->title)) {\n $packageShowArray['title']['label'] = $this->translate('Title');\n $packageShowArray['title']['value'] = $this->translate($package->title);\n }\n if (isset($package->description) && !empty($package->description)) {\n $packageShowArray['description']['label'] = $this->translate(\"Description\");\n $packageShowArray['description']['value'] = $this->translate($package->description);\n }\n if ($package->price > 0.00) {\n $packageShowArray['price']['label'] = $this->translate('Price');\n $packageShowArray['price']['value'] = (double) $package->price;\n $packageShowArray['price']['currency'] = Engine_Api::_()->getApi('settings', 'core')->getSetting('payment.currency', 'USD');\n } else {\n $packageShowArray['price']['label'] = $this->translate('Price');\n $packageShowArray['price']['value'] = $this->translate('FREE');\n }\n\n $packageShowArray['billing_cycle']['label'] = $this->translate('Billing Cycle');\n $packageShowArray['billing_cycle']['value'] = $package->getBillingCycle();\n\n $packageShowArray['duration']['label'] = $this->translate(\"Duration\");\n $packageShowArray['duration']['value'] = $package->getPackageQuantity();\n\n if ($package->featured == 1) {\n $packageShowArray['featured']['label'] = $this->translate('Featured');\n $packageShowArray['featured']['value'] = $this->translate('Yes');\n } else {\n $packageShowArray['featured']['label'] = $this->translate('Featured');\n $packageShowArray['featured']['value'] = $this->translate('No');\n }\n\n if ($package->sponsored == 1) {\n $packageShowArray['Sponsored']['label'] = $this->translate('Sponsored');\n $packageShowArray['Sponsored']['value'] = $this->translate('Yes');\n } else {\n $packageShowArray['Sponsored']['label'] = $this->translate('Sponsored');\n $packageShowArray['Sponsored']['value'] = $this->translate('No');\n }\n\n if ($overview && (empty($level_id) || Engine_Api::_()->authorization()->getPermission($level_id, 'sitereview_listing', \"overview_listtype_\" . \"$listingtype_id\"))) {\n if ($package->overview == 1) {\n $packageShowArray['rich_overview']['label'] = $this->translate('Rich Overview');\n $packageShowArray['rich_overview']['value'] = $this->translate('Yes');\n } else {\n $packageShowArray['rich_overview']['label'] = $this->translate('Rich Overview');\n $packageShowArray['rich_overview']['value'] = $this->translate('No');\n }\n }\n\n if (empty($level_id) || Engine_Api::_()->authorization()->getPermission($level_id, 'sitereview_listing', \"video_listtype_\" . \"$listingtype_id\")) {\n if ($package->video == 1) {\n if ($package->video_count) {\n $packageShowArray['videos']['label'] = $this->translate('Videos');\n $packageShowArray['videos']['value'] = $package->video_count;\n } else {\n $packageShowArray['videos']['label'] = $this->translate('Videos');\n $packageShowArray['videos']['value'] = $this->translate(\"Unlimited\");\n }\n } else {\n $packageShowArray['videos']['label'] = $this->translate('Videos');\n $packageShowArray['videos']['value'] = $this->translate('No');\n }\n }\n\n if (empty($level_id) || Engine_Api::_()->authorization()->getPermission($level_id, 'sitereview_listing', \"photo_listtype_\" . \"$listingtype_id\")) {\n if ($package->photo == 1) {\n if ($packagem->photo_count) {\n $packageShowArray['photos']['label'] = $this->translate('Photos');\n $packageShowArray['photos']['value'] = $package->photo_count;\n } else {\n $packageShowArray['photos']['label'] = $this->translate('Photos');\n $packageShowArray['photos']['value'] = $this->translate(\"Unlimited\");\n }\n } else {\n $packageShowArray['photos']['label'] = $this->translate('Photos');\n $packageShowArray['photos']['value'] = $this->translate('No');\n }\n }\n\n if ($location) {\n if ($package->map == 1) {\n $packageShowArray['map']['label'] = $this->translate('Map');\n $packageShowArray['map']['value'] = $this->translate('Yes');\n } else {\n $packageShowArray['map']['label'] = $this->translate('Map');\n $packageShowArray['map']['value'] = $this->translate('No');\n }\n }\n\n if (!empty($allow_review) && $allow_review != 1 && (empty($level_id) || Engine_Api::_()->authorization()->getPermission($level_id, 'sitereview_listing', \"review_create_listtype_\" . \"$listingtype_id\"))) {\n if ($package->user_review == 1) {\n $packageShowArray['review']['label'] = $this->translate('User Review');\n $packageShowArray['review']['value'] = $this->translate('Yes');\n } else {\n $packageShowArray['review']['label'] = $this->translate('User Review');\n $packageShowArray['review']['value'] = $this->translate('No');\n }\n }\n\n if ($wishlist) {\n if (Engine_Api::_()->getApi('settings', 'core')->getSetting('sitereview.favourite')) {\n $packageShowArray['wishlist']['label'] = $this->translate('Favourite');\n } else {\n $packageShowArray['wishlist']['label'] = $this->translate('Wishlist');\n }\n if ($package->wishlist == 1) {\n $packageShowArray['wishlist']['value'] = $this->translate('Yes');\n } else {\n $packageShowArray['wishlist']['value'] = $this->translate('No');\n }\n }\n\n $packageArray['package'] = $packageShowArray;\n $tempMenu = array();\n $tempMenu[] = array(\n 'label' => $this->translate('Upgrade Package'),\n 'name' => 'upgrade_package',\n 'url' => 'listings/upgrade-package',\n 'urlParams' => array(\n 'package_id' => $package->package_id,\n 'listingtype_id' => $listingtype_id,\n 'listing_id' => $sitereview->getIdentity()\n )\n );\n $tempMenu[] = array(\n 'label' => $this->translate('Package Info'),\n 'name' => 'package_info',\n 'url' => 'listings/upgrade-package',\n 'urlParams' => array(\n 'package_id' => $package->package_id,\n 'listingtype_id' => $listingtype_id,\n 'listing_id' => $sitereview->getIdentity()\n )\n );\n\n $packageArray['menu'] = $tempMenu;\n $bodyParams['response'][] = $packageArray;\n }\n if (isset($currentPackage) && !empty($currentPackage)) {\n $bodyParams['currentPackage'] = $currentPackage->toArray();\n }\n\n if (isset($bodyParams) && !empty($bodyParams))\n $this->respondWithSuccess($bodyParams);\n } catch (Exception $ex) {\n $this->respondWithError('internal_server_error', $ex->getMessage());\n }\n } elseif ($this->getRequest()->getPost()) {\n\n if (!empty($_POST['package_id'])) {\n $package_id = $this->_getParam('package_id');\n $package_chnage = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $package_id);\n\n if (empty($package_chnage) || !$package_chnage->enabled || (!empty($package_chnage->level_id) && !in_array($sitereview->getOwner()->level_id, explode(\",\", $package_chnage->level_id)))) {\n $this->respondWithError('no_record');\n }\n $table = $sitereview->getTable();\n $db = $table->getAdapter();\n $db->beginTransaction();\n\n try {\n $is_upgrade_package = true;\n //APPLIED CHECKS BECAUSE CANCEL SHOULD NOT BE CALLED IF ALREADY CANCELLED \n if ($sitereview->status == 'active') {\n $sitereview->cancel($is_upgrade_package);\n }\n $sitereview->package_id = $_POST['package_id'];\n $package = Engine_Api::_()->getItem('sitereviewpaidlisting_package', $sitereview->package_id);\n\n $sitereview->featured = $package->featured;\n $sitereview->sponsored = $package->sponsored;\n $sitereview->pending = 1;\n $sitereview->expiration_date = new Zend_Db_Expr('NULL');\n $sitereview->status = 'initial';\n if (($package->isFree())) {\n $sitereview->approved = $package->approved;\n } else {\n $sitereview->approved = 0;\n }\n\n if (!empty($sitereview->approved)) {\n $sitereview->pending = 0;\n $expirationDate = $package->getExpirationDate();\n if (!empty($expirationDate))\n $sitereview->expiration_date = date('Y-m-d H:i:s', $expirationDate);\n else\n $sitereview->expiration_date = '2250-01-01 00:00:00';\n\n if (empty($sitereview->approved_date)) {\n $sitereview->approved_date = date('Y-m-d H:i:s');\n if ($sitereview->draft == 0 && $sitereview->search && time() >= strtotime($sitereview->creation_date)) {\n $action = Engine_Api::_()->getDbtable('actions', 'activity')->addActivity($sitereview->getOwner(), $sitereview, 'sitereview_new_listtype_' . $listingtype_id);\n if ($action != null) {\n Engine_Api::_()->getDbtable('actions', 'activity')->attachActivity($action, $sitereview);\n }\n }\n }\n }\n $sitereview->save();\n $db->commit();\n $this->successResponseNoContent('no_content', true);\n } catch (Exception $e) {\n $db->rollBack();\n }\n }\n /* $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => true,\n 'format' => 'smoothbox',\n 'parentRedirect' => $this->view->url(array('action' => 'update-package', 'listing_id' => $sitereview->listing_id), \"sitereview_package_listtype_$sitereview->listingtype_id\", true),\n 'parentRedirectTime' => 15,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_('The package for your Listing has been successfully changed.'))\n )); */\n }\n }", "title": "" }, { "docid": "6de7c275443a35aa0f005ee05e67f282", "score": "0.5071614", "text": "public function ver(){\n\t\theader(\"Content-type:text/html;charset=utf-8\");\n\t\t$result = array();\n\t\t$host = $_GET['host'];\n\t\t$oVersion = $_GET['oVersion'];\n\t\t$cVersion = $_GET['cVersion'];\n\t\t$channel = $_GET['channel'];\n\t\t\n\t\t//判断获取哪个配置\n\t\t//判断配置版本是否低于后台最高版本\n\t\t//echo $cVersion.\"_\".S(\"Max_hot_version\");\n\t\t$Max_hot_version = S(\"Max_hot_version\");\n\t\tif ($cVersion < $Max_hot_version){\n\t\t\t$str21 = $oVersion.\"_\".$Max_hot_version.\"_src\";\n\t\t\t$str22 = $oVersion.\"_\".$Max_hot_version.\"_flag\";\n\t\t\t$str23 = $oVersion.\"_\".$Max_hot_version.\"_size\";\n\t\t\t$str24 = $oVersion.\"_\".$Max_hot_version.\"_status\";\n\t\t\t$str25 = $oVersion.\"_\".$Max_hot_version.\"_channel\";\n\t\t\t\n\t\t\tif (S($str21)==\"\"){\n\t\t\t\t//没有匹配到获取最低版本的更新包\n\t\t\t\t$str21 = S(\"Min_hot_version\").\"_\".$Max_hot_version.\"_src\";\n\t\t\t\t$str22 = S(\"Min_hot_version\").\"_\".$Max_hot_version.\"_flag\";\n\t\t\t\t$str23 = S(\"Min_hot_version\").\"_\".$Max_hot_version.\"_size\";\n\t\t\t\t$str24 = S(\"Min_hot_version\").\"_\".$Max_hot_version.\"_status\";\n\t\t\t\t$str25 = S(\"Min_hot_version\").\"_\".$Max_hot_version.\"_channel\";\n\t\t\t}\n\t\t\t//echo $str21.\"*\".S($str24).\"--<br>\";\n\t\t\tif (S($str24)==\"0\"){\n\t\t\t\t//所有渠道不更新\t\t\n\t\t\t\t$flag1 = 0;\n\t\t\t}elseif (S($str24)==\"1\"){\n\t\t\t\t//所有渠道更新\t\t\n\t\t\t\t$flag1 = 1;\n\t\t\t}elseif (S($str24)==\"2\"){\n\t\t\t\t//部分更新\n\t\t\t\t$flag1 = 0;\n\t\t\t\tif (S($str25)!=\"\"){\n\t\t\t\t\t$arr = explode(\",\", S($str25));\n\t\t\t\t\tif (in_array($channel, $arr)){$flag1 = 1;}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($flag1 == 1){\n\t\t\t\t$result['info']['hot_src'] = S($str21);\n\t\t\t\t$result['info']['hot_flag'] = (S($str22)==\"1\") ? true : false;\n\t\t\t\t$result['info']['hot_size'] = (int)S($str23);\t\n\t\t\t}else{\n\t\t\t\t$result['info']['hot_src'] = false;\n\t\t\t\t$result['info']['hot_flag'] = false;\n\t\t\t\t$result['info']['hot_size'] = 0;\t\n\t\t\t}\n\t\t}else{\n\t\t\t$result['info']['hot_src'] = false;\n\t\t\t$result['info']['hot_flag'] = false;\n\t\t\t$result['info']['hot_size'] = 0;\n\t\t}\n\t\t//print_r($result); exit;\n\t\t//S(\"Max_full_version\",null);\n\t\t//判断配置版本是否低于后台最高整包版本\n\t\t$Max_full_version = S(\"Max_full_version\");\n\t\t$Max_full_src = S(\"Max_full_src\");\n\t\t$str11 = \"FULL_\".$host.\"_\".$Max_full_version.\"_flag\";\n\t\t$str12 = \"FULL_\".$host.\"_\".$Max_full_version.\"_status\";\n\t\t$str13 = \"FULL_\".$host.\"_\".$Max_full_version.\"_channel\";\n\t\t//echo $host.\"_\".$Max_full_version;\n\t\tif ($host < $Max_full_version){\n\t\t\tif (S($str11)==\"\"){\n\t\t\t\t$flag2 = 1;\n\t\t\t}else{\n\t\t\t\tif (S($str12)==\"0\"){\n\t\t\t\t\t//所有渠道不更新\t\t\n\t\t\t\t\t$flag2 = 0;\n\t\t\t\t}elseif (S($str12)==\"1\"){\n\t\t\t\t\t//所有渠道更新\t\t\n\t\t\t\t\t$flag2 = 1;\n\t\t\t\t}elseif (S($str12)==\"2\"){\n\t\t\t\t\t//部分更新\n\t\t\t\t\t$flag2 = 0;\n\t\t\t\t\tif (S($str13)!=\"\"){\n\t\t\t\t\t\t$arr2 = explode(\",\", S($str13));\n\t\t\t\t\t\tif (in_array($channel, $arr2)){$flag2 = 1;}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t//echo $flag2.\"**\".$Max_full_src;\n\t\t\tif ($flag2 == 1){\n\t\t\t\t$result['info']['strong_src'] = $Max_full_src;\n\t\t\t\t$result['info']['strong_flag'] = (S($str11)==\"1\") ? true : false;\n\t\t\t}else{\n\t\t\t\t$result['info']['strong_src'] = false;\n\t\t\t\t$result['info']['strong_flag'] = false;\n\t\t\t}\n\t\t}else{\n\t\t\t$result['info']['strong_src'] = false;\n\t\t\t$result['info']['strong_flag'] = false;\n\t\t}\n\n\t\t\n\t\t\n\t\tif (S($str11)!=\"\" || S($str21)!=\"\"){\n\t\t\t$result['code'] = 0;\n\t\t\t$result['info']['Max_hot_version'] = $Max_hot_version;\n\t\t\t$result['info']['Max_full_version'] = $Max_full_version;\n\t\t\t//$result['info']['strong_src'] = S($str11);\n\t\t\t//$result['info']['strong_flag'] = S($str12);\n\t\t}else{\n\t\t\t$result['code'] = -1;\n\t\t\t$result['info'] = \"版本号有误\";\n\t\t}\n\t\t\n\t\techo json_encode($result);\n\t}", "title": "" }, { "docid": "03279055d80366a0ce0be8712f370998", "score": "0.5070779", "text": "function upgrade() {\n\n\t\t$module_path = $this->uri->segment(3);\n\n\t\t$this->load->module($module_path . '/setup');\n\n\t\t$this->setup->upgrade();\n\n\t\tredirect('ba_modules');\n\n\t}", "title": "" }, { "docid": "2759f8c1fba5c64ce4535de650d5dc54", "score": "0.50682807", "text": "function connectionsShowUpgradePage()\n{\n\tif (!current_user_can('connections_manage'))\n\t{\n\t\twp_die('<p id=\"error-page\" style=\"-moz-background-clip:border;\n\t\t\t\t-moz-border-radius:11px;\n\t\t\t\tbackground:#FFFFFF none repeat scroll 0 0;\n\t\t\t\tborder:1px solid #DFDFDF;\n\t\t\t\tcolor:#333333;\n\t\t\t\tdisplay:block;\n\t\t\t\tfont-size:12px;\n\t\t\t\tline-height:18px;\n\t\t\t\tmargin:25px auto 20px;\n\t\t\t\tpadding:1em 2em;\n\t\t\t\ttext-align:center;\n\t\t\t\twidth:700px\">You do not have sufficient permissions to access this page.</p>');\n\t}\n\telse\n\t{\n\t\tglobal $connections;\n\t\t\n\t\t?>\n\t\t\t\n\t\t\t<div class=\"wrap nosubsub\">\n\t\t\t\t<div class=\"icon32\" id=\"icon-connections\"><br/></div>\n\t\t\t\t<h2>Connections : Upgrade</h2>\n\t\t\t\t<?php echo $connections->displayMessages(); ?>\n\t\t\t\t<div id=\"connections-upgrade\">\n\t\t\t\t\n\t\t\t\t\t<?php\n\t\t\t\t\t\t$urlPath = admin_url() . 'admin.php?page=' . $_GET['page'];\n\t\t\t\t\t\t\n\t\t\t\t\t\tif ( isset($_GET['upgrade-db']) && $_GET['upgrade-db'] === 'do')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcnRunDBUpgrade();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t?>\n\t\t\t\t\t\t\t\t<h3>Upgrade Required!</h3>\n\t\t\t\t\t\t\t\t<p>Your database tables for Connections is out of date and must be upgraded before you can continue.</p>\n\t\t\t\t\t\t\t\t<p>If you would like to downgrade later, please first make a complete backup of your database tables.</p>\n\t\t\t\t\t\t\t\t<h4><a class=\"button-primary\" href=\"<?php echo $urlPath;?>&amp;upgrade-db=do\">Start Upgrade</a></h4>\n\t\t\t\t\t\t\t<?php\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</div>\n\t\t\t</div>\n\t\t\t\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "e146edfb781c4bc047b8406a152fef78", "score": "0.5062499", "text": "function disp_pia_update_client(){\n global $_pia;\n global $_files;\n global $_settings;\n require_once './plugin/parsedown/Parsedown.php';\n $Parsedown = new Parsedown();\n $set = $_settings->get_settings();\n\n $up = $_pia->get_update_status();\n if(is_int($up) === true && $up == 0 ){\n $up_txt = 'latest release';\n }elseif( $up > 0 ){\n $s = ( $up > 1 ) ? 's' : '';\n $up_txt = '<a href=\"/?page=tools&amp;cid=tools&amp;cmd=update_software_client\">'.\"$up update{$s} available</a>\";\n }else{\n $up_txt = $up;\n }\n\n $disp_body = '<div class=\"box update_client\">';\n $disp_body .= '<h2>Online Update Client</h2>';\n $disp_body .= 'Updates are downloaded from the <a href=\"https://github.com/KaiserSoft/PIA-Tunnel/tree/release-v2\" target=\"_blank\">GitHub repository.</a>';\n $disp_body .= '<br><span id=\"update_refresh\">Update Status: '.$up_txt.\"</span>\";\n\n $disp_body .= '<div class=\"box changelog\">';\n $cl = $_files->readfile( $set['HTDOCS_PATH'].\"/changes-v2-release.md\");\n $disp_body .= $Parsedown->text($cl);\n $disp_body .= '</div>';\n\n $disp_body .= '<div class=\"clear\"></div>';\n //$disp_body .= '<a id=\"toggle_git_updatelog\" class=\"button\" href=\"#\" onclick=\"var _update = new UpdateClient(); _update.get_git_log('.$up.'); return false;\">Show Update Log</a>';\n //$disp_body .= ' <a id=\"toggle_git_log\" class=\"button\" href=\"#\" onclick=\"var _update = new UpdateClient(); _update.get_git_log(50); return false;\">Show Repository Log</a>';\n $disp_body .= '<div class=\"hidden\" id=\"uc_feedback\" ><textarea id=\"uc_feedback_txt\">'.$_pia->git_log($up).'</textarea></div>';\n $disp_body .= '<div class=\"clear\"></div>';\n\n $disp_body .= '<form class=\"inline\" action=\"/?page=tools&amp;cid=tools\" method=\"post\">';\n $disp_body .= '<input type=\"hidden\" name=\"cmd\" value=\"run_pia_command\">';\n $disp_body .= '<br><input type=\"submit\" id=\"pia-update\" name=\"pia-update\" value=\"Start Online Update\">';\n $disp_body .= \"</form>\\n\";\n\n $disp_body .= '<script type=\"text/javascript\">';\n $disp_body .= ' var _update = new UpdateClient();';\n $disp_body .= ' _update.enhance_ui();';\n $disp_body .= '</script>';\n $disp_body .= '</div>';\n return $disp_body;\n}", "title": "" }, { "docid": "b5c7edafb1ebf444b65044d930fbc0fe", "score": "0.50606257", "text": "function _getInstallationPage() {\n global $objCommon, $_ARRLANG, $objTpl, $useUtf8;\n\n $objTpl->addBlockfile('CONTENT', 'CONTENT_BLOCK', \"installation.html\");\n\n // set permissions\n $result = $this->_setPermissions();\n $this->_setInstallationStatus($result, $_ARRLANG['TXT_SET_PERMISSIONS']);\n\n // create database\n if ($result === true && isset($_SESSION['installer']['config']['createDatabase']) && $_SESSION['installer']['config']['createDatabase'] == true) {\n $result = $this->_createDatabase();\n $this->_setInstallationStatus($result, $_ARRLANG['TXT_CREATE_DATABASE']);\n } elseif ($result === true && $useUtf8) {\n $result = $this->_alterDatabase();\n $this->_setInstallationStatus($result, $_ARRLANG['TXT_CONFIG_DATABASE']);\n }\n\n $databaseAlreadyCreated = isset($_SESSION['installer']['checkDatabaseTables']) && $_SESSION['installer']['checkDatabaseTables'];\n\n // create database tables\n if ($result === true) {\n $result = $this->_createDatabaseTables();\n $this->_setInstallationStatus($result, $_ARRLANG['TXT_CREATE_DATABASE_TABLES']);\n }\n\n // check database structure\n if ($result === true) {\n $result = $this->_checkDatabaseTables();\n $this->_setInstallationStatus($result, $_ARRLANG['TXT_CHECK_DATABASE_TABLES']);\n }\n\n if (!$databaseAlreadyCreated && $result === true) {\n // make a break after the database has been created and show an alert box message\n $objTpl->setVariable('MESSAGE', $_ARRLANG['TXT_DATABASE_CREATION_COMPLETE']);\n $objTpl->parse('installer_alert_box');\n return;\n }\n\n // insert database data\n if ($result === true) {\n $result = $this->_insertDatabaseData();\n $this->_setInstallationStatus($result, $_ARRLANG['TXT_INSERT_DATABASE_DATA']);\n }\n\n // create htaccess file\n if ($result === true) {\n $result = $this->_createHtaccessFile();\n $msg = $objCommon->getWebserverSoftware() == 'iis' ? $_ARRLANG['TXT_CREATE_IIS_HTACCESS_FILE'] : $_ARRLANG['TXT_CREATE_APACHE_HTACCESS_FILE'];\n $this->_setInstallationStatus($result, $msg);\n }\n }", "title": "" }, { "docid": "b9273016088fd1c285630d9f103e99ce", "score": "0.50543505", "text": "protected function parseResponseForGetAddonPackAction(\\PEAR2\\HTTP\\Request\\Response $response)\n {\n return $this->writeDataToFile($response);\n }", "title": "" }, { "docid": "8065b1b7537742ce18b471a83c595218", "score": "0.50533885", "text": "private static function send_response($response)\n {\n header(\"Content-type: text/xml\");\n header(\"Content-Transfer-Encoding: 8bit\");\n echo $response;\n }", "title": "" }, { "docid": "fa86f31f2ad2883adf6b4d7f561454ec", "score": "0.5039534", "text": "function bunchy_render_import_demo_response() {\n\t$import_response = get_transient( 'bunchy_import_demo_response' );\n\n\tif ( false !== $import_response ) {\n\t\tdelete_transient( 'bunchy_import_demo_response' );\n\n\t\t$response_status_class = 'success' === $import_response['status'] ? 'notice' : 'error';\n\t\t?>\n\t\t<div class=\"updated is-dismissible <?php echo sanitize_html_class( $response_status_class ); ?>\">\n\t\t\t<p>\n\t\t\t\t<strong><?php echo wp_kses_post( $import_response['message'] ); ?></strong><br/>\n\t\t\t</p>\n\t\t\t<button type=\"button\" class=\"notice-dismiss\"><span\n\t\t\t\t\tclass=\"screen-reader-text\"><?php esc_html_e( 'Dismiss this notice.', 'bunchy' ); ?></span></button>\n\t\t</div>\n\t\t<?php\n\t}\n}", "title": "" }, { "docid": "369c2d0cc63ba9143bf3e31eb5b97d19", "score": "0.5038075", "text": "function upgrade_350() {}", "title": "" }, { "docid": "91517db0b51f3dddd3a76f8d678c7e43", "score": "0.50328076", "text": "function upgrade_290() {}", "title": "" }, { "docid": "25539518bc7c9f2b167be0e2e12dd8fa", "score": "0.50255835", "text": "public function responseMsg()\n {\n $postStr = $GLOBALS[\"HTTP_RAW_POST_DATA\"];\n\n //extract post data\n if (!empty($postStr)){\n \n $postObj = simplexml_load_string($postStr, 'SimpleXMLElement', LIBXML_NOCDATA);\n $RX_TYPE = trim($postObj->MsgType);\n\n switch($RX_TYPE)\n {\n case \"text\":\n $resultStr = $this->handleTextRetImage($postObj);\n break;\n case \"event\":\n $resultStr = $this->handleEvent($postObj);\n break;\n default:\n $resultStr = \"Unknow msg type: \".$RX_TYPE;\n break;\n }\n echo $resultStr;\n }else {\n echo \"\";\n exit;\n }\n }", "title": "" }, { "docid": "307a3b796d1d4f1552d1f49a3f18b0b3", "score": "0.50220406", "text": "private function _handleXMLResponse() {\n $this->_xmlParser = xml_parser_create();\n xml_set_object($this->_xmlParser, $this);\n xml_set_element_handler($this->_xmlParser, \"_xmlStartTag\", \"_xmlEndTag\");\n xml_set_character_data_handler($this->_xmlParser, \"_xmlContentBetweenTags\");\n $final = false;\n $chunk_size = 262144;\n do{\n if(strlen($this->xml) <= $chunk_size) {\n $final = true;\n }\n $part = substr($this->xml, 0, $chunk_size);\n $this->xml = substr($this->xml, $chunk_size);\n if(!xml_parse($this->_xmlParser, $part, $final)) {\n return false;\n }\n if($final) {\n break;\n }\n } while (true);\n xml_parser_free($this->_xmlParser);\n }", "title": "" }, { "docid": "ba92715f1f095004195dc68a20ed3c33", "score": "0.50216377", "text": "function request_upgrade()\n\t\t{\n\t\t\t$loggedin_email = $this->session->userdata('email_id');\n\t\t\t$userid \t\t= $this->session->userdata('user_id');\n\t\t//$userid = 241;\n\t\t\tif(isset($userid) && $userid !='')\n\t\t\t{\n\t\t\t\t$sql_pmemail = \"SELECT \n\t\t\t\t\t\t\t\t\t\t\tusers.email AS USERS,\n\t\t\t\t\t\t\t\t\t\t\tpm.email AS PM\n\t\t\t\t\t\t\t\tFROM \n\t\t\t\t\t\t\t\t\t\t\tusers\n\t\t\t\t\t\t\t\tLEFT JOIN\n\t\t\t\t\t\t\t\t\t\t\tusers AS pm\n\t\t\t\t\t\t\t\t\t\t ON \n\t\t\t\t\t\t\t\t\t\t\tusers.pmid=pm.id\n\t\t\t\t\t\t\t\tWHERE \n\t\t\t\t\t\t\t\t\t\t\tusers.id=\".$userid.\"\n\t\t\t\t\t\t\t\t\";\n\t\t\t\t$result_email = $this->db_interaction->run_query($sql_pmemail);\t\t\t\t\t\n\t\t\t\t\n\t\t\t\tif(is_array($result_email) && count($result_email)>0)\t\t\t\t\n\t\t\t\t{\n\t\t\t\t\t$client_email = $result_email[0]['USERS'];\n\t\t\t\t\t$pm_email \t = $result_email[0]['PM'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$data = array(\n\t\t\t\t\t\"pagetitle\" \t\t\t=> \"Request for more pages\",\n\t\t\t\t\t\"msg\"\t \t\t\t\t=> $this->msg,\t\n\t\t\t\t\t\"errors\" \t\t\t\t=> $this->errors,\n\t\t\t\t\t\"client_email\"\t\t\t=> $client_email,\n\t\t\t\t\t\"pm_email\"\t\t\t\t=> $pm_email, \n\t\t\t\t\t\"Subject\" \t\t\t=> \"Request to add more subpages in Page Management (DPCS)\",\n\t\t\t\t\t\"website\"\t\t\t\t=> base_url(),\n\t\t\t\t\t\t\t);\n\t\t\t\t$this->_display('request_pages',$data);\t\t\t\t\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tredirect('login');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "97f6f65799d9ca97ae25bceaf7b00ae4", "score": "0.5021136", "text": "function upgrade_440() {}", "title": "" }, { "docid": "468c9d61fca460e29ed357d7cc19ec13", "score": "0.49975452", "text": "function fetch_backend_info($outputtype)\n{\n if ($outputtype == \"json\") {\n $data = array(\"product\" => get_product_name(),\n \"version\" => get_product_version(),\n \"version_major\" => get_product_version(\"major\"),\n \"version_minor\" => get_product_version(\"minor\"),\n \"build\" => get_product_build(),\n \"api_url\" => get_backend_url());\n print backend_output($data);\n } else {\n output_backend_header();\n echo \"<backendinfo>\\n\";\n echo \" <productinfo>\\n\";\n xml_field(2, \"productname\", get_product_name());\n xml_field(2, \"productversion\", get_product_version());\n xml_field(2, \"productbuild\", get_product_build());\n echo \" </productinfo>\\n\";\n echo \" <apis>\\n\";\n xml_field(2, \"backend\", get_backend_url());\n echo \" </apis>\\n\";\n echo \"</backendinfo>\\n\";\n }\n}", "title": "" }, { "docid": "e46169e2a4cd22b1cf8f2e6d99398a06", "score": "0.49969086", "text": "private function upgrade_111()\n {\n }", "title": "" }, { "docid": "e86dfb2dea1d7e23ac17794ff43e0270", "score": "0.49961886", "text": "public function infoAction() {\n $http = $this->app[\"my\"]->get('http');\n $crXml = $this->app[\"my\"]->get('xml');\n //------------------\n\n try {\n \n // Initialization\n $this->init(__CLASS__ . \"/\" . __FUNCTION__);\n \n // Get XML request\n $xmlStr = $http->getInputPHP();\n\n // Validate XML request\n if (!$crXml->isValidXml($xmlStr)) {\n $this->app->abort(406, \"Invalid format XML\");\n }\n\n // Load XML\n $crXml->loadXML($xmlStr);\n\n // Define the number of the request\n $encodeRequest = (string) $crXml->doc->ubki->req_envelope->req_xml;\n $decodeRequest = base64_decode($encodeRequest);\n $strRequest = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>' . $decodeRequest;\n $crXml->loadXML($strRequest);\n\n // Get XML response\n $file = $this->getLibPath() . \"/resGetInfo.xml\";\n $resXml = file_get_contents($file);\n\n // Load XML response\n $crXml->loadXML($resXml);\n $xml = $crXml->xml();\n } catch (\\Exception $exc) {\n // Get error code\n $code = $this->getCodeException($exc);\n\n // Get XML response for error\n $file = $this->getLibPath() . '/resError.xml';\n $resXml = file_get_contents($file);\n\n // Load XML response for error\n $crXml->loadXML($resXml);\n // Set error code and error message\n $crXml->ubkidata->tech->error['errtype'] = $code;\n $crXml->ubkidata->tech->error['errtext'] = $exc->getMessage();\n $xml = $crXml->xml();\n }\n // Send XML response\n return $this->sendXml($xml);\n }", "title": "" }, { "docid": "28685fc408e65941e6fc5868d5cc590e", "score": "0.49952796", "text": "function ft_check_version() {\n\t// Get newest version.\n\tif ($c = ft_get_url(\"http://www.solitude.dk/filethingie/versioninfo2.php?act=check&from=\".urlencode('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']))) {\n\t $c = explode('||', $c);\n\t\t$version = trim($c[0]);\n\t\t$log = trim($c[1]);\n\t\t// Compare versions.\n\t\tif (version_compare($version, VERSION) == 1) {\n\t\t\t// New version available.\n\t\t\treturn '<p>'.t('A new version of File Thingie (!version) is available.', array('!version' => $version)).'</p>'.$log.'<p><strong><a href=\"http://www.solitude.dk/filethingie/download\">'.t('Download File Thingie !version', array('!version' => $version)).'</a></strong></p>';\n\t\t} else {\n\t\t\t// Running newest version.\n\t\t\treturn '<p>'.t('No updates available.').'</p><ul><li>'.t('Your version:').' '.VERSION.'</li><li>'.t('Newest version:').' '.$version.'</li></ul>';\n\t\t}\n\t\treturn \"<p>\".t('Newest version is:').\" {$version}</p>\";\n\t} else {\n\t\treturn \"<p class='error'>\".t('Could not connect (possible error: URL wrappers not enabled).').\"</p>\";\n\t}\n}", "title": "" }, { "docid": "9a27320b3e7b5be0010bb921f24f2e2a", "score": "0.49909434", "text": "function sl_license_response($response)\r\n\t{\r\n\t\t$response['tested'] = VAT_ECSL_WORDPRESS_COMPATIBILITY;\r\n\t\t$response['compatibility'] = serialize( array( VAT_ECSL_WORDPRESS_COMPATIBILITY => array( VAT_ECSL_VERSION => array(\"100%\", \"5\", \"5\") ) ) );\r\n\t\treturn $response;\r\n\t}", "title": "" } ]
604bd6fb91926821a8b1fc67c2925b48
dec to hex conversion
[ { "docid": "03e64a0ec5f50a4df680c1107141fb43", "score": "0.7157586", "text": "public\n\n function dec2hex( $dec, $byte_order = 'MSB' )\n {\n $hex = dechex( $dec );\n if ($byte_order == 'LSB') {\n $hex = self::byte_order_reverse( $hex );\n }\n return $hex;\n }", "title": "" } ]
[ { "docid": "232566569acbbb27e4ad33e1686b00fb", "score": "0.8013424", "text": "public function toHex();", "title": "" }, { "docid": "ee84c79ee1792701c35d0f8fc40193c9", "score": "0.7956654", "text": "function dec2hex($dec) {\n\t\t$out=dechex(round($dec*255));\n\t\tif (strlen($out)==0) $out=\"00\";\n\t\tif (strlen($out)==1) $out=\"0\".$out;\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "6093cf545eec478730be018086e678f2", "score": "0.7695301", "text": "function conv($hex)\r\n {\r\n\t $dec = hexdec($hex);\r\n\t return \"&#$dec;\";\r\n }", "title": "" }, { "docid": "e1514be7299d48cd78e05fec75a9b096", "score": "0.75793153", "text": "public function dec2hex($dec) {\n if($dec > 2147483648) {\n $result = dechex($dec - 2147483648);\n $prefix = dechex($dec / 268435456);\n $suffix = substr($result,-7);\n $hex = $prefix.str_pad($suffix, 7, \"0000000\", STR_PAD_LEFT);\n }\n else {\n $hex = dechex($dec);\n }\n $hex = strtoupper ($hex);\n return($hex);\n }", "title": "" }, { "docid": "bae7c4b18237911bf6a720a890460a53", "score": "0.7512378", "text": "public function toHex() : int\n\t\t{\n\t\t}", "title": "" }, { "docid": "d320f0c5683dc365242c7b0e2990f784", "score": "0.7017359", "text": "function wc_format_hex($hex)\n {\n }", "title": "" }, { "docid": "f6160ebe259e7c4ca3cb023dd0956f5b", "score": "0.7009075", "text": "public function toHex(): string\n {\n if (\\extension_loaded('gmp')) {\n $gmp = gmp_init('0b'.$this->binaryValue);\n\n return bin2hex(gmp_export($gmp));\n }\n\n return implode(\n '',\n array_map(\n static function (int $int) {\n return dechex($int);\n },\n $this->getIntegers()\n )\n );\n }", "title": "" }, { "docid": "cfccd8d79f0a0906cb2ae111696a55eb", "score": "0.69876176", "text": "public function toHex(): string\n {\n return $this->hex;\n }", "title": "" }, { "docid": "1e3921e9a4cdc74a0e8a39e832e533f4", "score": "0.6986996", "text": "public function toHex()\n {\n return str_pad(dechex($this->color),6,\"0\",STR_PAD_LEFT);\n }", "title": "" }, { "docid": "47152e061e7be6de34af101d4bf2c6aa", "score": "0.68812215", "text": "public static function hex( $hex )\n {\n return $hex;\n }", "title": "" }, { "docid": "11915fb280b02b3d4d0d882c80b868cb", "score": "0.68766916", "text": "public function hex()\n {\n return join('', array_map('dechex', array_map('ord', $this->source)));\n }", "title": "" }, { "docid": "3f60f4b6b510d8d0601f80c97d204b69", "score": "0.68626755", "text": "function asc2hex($str) {\n return chunk_split(bin2hex($str), 2, \" \");\n }", "title": "" }, { "docid": "23377ff208d30fd8c32bd8dbcaa18cbd", "score": "0.6839188", "text": "function bin_2_hex($str)\r\n{\r\n return \\bin2hex($str);\r\n}", "title": "" }, { "docid": "c96f8944f67267160eb639585e1cf41f", "score": "0.6827548", "text": "function hex(int $x)\n{\n $neg = '';\n if ($x < 0) {\n $neg = '-';\n $x = abs($x);\n }\n return sprintf('%s0x%x', $neg, $x);\n}", "title": "" }, { "docid": "0f7bd65c7cacb95829b6bc85bd3aa2ca", "score": "0.67987037", "text": "public function convert_decimal_to_hex($dec)\n {\n\n $options = array(\n 'options' => array('min_range' => 0)\n );\n\n if (filter_var($dec, FILTER_VALIDATE_INT, $options) !== FALSE) {\n $hex = base_convert(strval($dec), 10, 16);\n if (strlen($hex) === 1)\n {\n $hex = '0' . $hex;\n }\n if (strcmp($hex, '256') === 0)\n {\n $hex = '255';\n }\n return $hex;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "0e1dcaba7a1057e8d0f44e8bad7dc7dd", "score": "0.6765545", "text": "function hex2dec($hex) {\n\t\tif (strlen($hex)==1) {\n\t\t\t$hex=$hex.$hex;\n\t\t}\n\t\t$out=hexdec($hex);\n\t\tif ($out<0) $out=0;\n\t\tif ($out>255) $out=255;\n\t\treturn $out/255;\n\t}", "title": "" }, { "docid": "31070fc6f5ef7e454a173edb041fdf0f", "score": "0.6744391", "text": "function ip2hex($ip)\r\n\t{\r\n\t\treturn dechex(ip2long($ip));\r\n\t}", "title": "" }, { "docid": "78fdbddb9b500e9cb9a4cc3f31b713b7", "score": "0.6719478", "text": "public function toHex()\n {\n return $this->toCIELab()->toHex();\n }", "title": "" }, { "docid": "a28e28654620e9a3cbcc18086297d289", "score": "0.6708328", "text": "public function toHexAlpha() : int\n\t\t{\n\t\t}", "title": "" }, { "docid": "a30e77955e1930181cb3deef625b274a", "score": "0.6701333", "text": "function getHex() {\n\t\t$out=\"#\"\n\t\t\t.$this->dec2hex($this->r)\n\t\t\t.$this->dec2hex($this->g)\n\t\t\t.$this->dec2hex($this->b);\n\t\tif ($this->a!=1) $out.=$this->dec2hex($this->a);\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "6528287d3c5f1f89dc4643605e16030c", "score": "0.6651083", "text": "function bin2hex($str)\n{\n return '';\n}", "title": "" }, { "docid": "95547cdbd273649b71ca4577366139a2", "score": "0.6606129", "text": "public\n\n function bin2hex( $bin )\n {\n return str_pad( dechex( bindec( str_pad( $bin, 8, 0, STR_PAD_LEFT ) ) ), 2, 0, STR_PAD_LEFT );\n }", "title": "" }, { "docid": "e284b5f552ab5f2ebd6f3a1c973884f7", "score": "0.658931", "text": "public function toHex()\n {\n return $this->toRGB()->toHex();\n }", "title": "" }, { "docid": "881033658993e2555f35bc76bbc6cf3d", "score": "0.65381", "text": "public function encode_hex($str);", "title": "" }, { "docid": "df3507847ca27c114f407b42f0080a2d", "score": "0.6534392", "text": "static public function bin2hex($aData='') {\n\t\t$hex = '';\n\t\t$max = strlen($aData);\n\t\tfor ($i=0; $i<$max; $i++) {\n\t\t\t$hex .= sprintf(\"%02x\",ord($aData[$i]));\n\t\t}\n\t\treturn $hex;\n\t}", "title": "" }, { "docid": "f38a75f49bbe21dad46f2ef395cae693", "score": "0.6533659", "text": "function hex2str_imports($hex) { //transforma tudo pra texto, mas deixa o texto zuado\n\t$str = '';\n\t$hex = str_replace(\" \", \"\", $hex);\n\tfor($i=0;$i<strlen($hex);$i+=2) {\n\t\t$decValue = hexdec(substr($hex,$i,2));\n\t\tif($decValue > 32) {\n\t\t\t$str .= mb_convert_encoding(chr($decValue), 'UTF-8', 'ISO-8859-2');\n\t\t}else{\n\t\t\t$str .= \"#\";\n\t\t}\n\t}\n\treturn $str;\n}", "title": "" }, { "docid": "c540e454182fb2f4802b94e2c73a18c5", "score": "0.65275115", "text": "private function _intToHex($i)\n\t{\n\t\t// Sanitize the input.\n\t\t$i = (int) $i;\n\n\t\t// Get the first character of the hexadecimal string if there is one.\n\t\t$j = (int) ($i / 16);\n\t\tif ($j === 0)\n\t\t{\n\t\t\t$s = ' ';\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$s = strtoupper(dechex($j));\n\t\t}\n\n\t\t// Get the second character of the hexadecimal string.\n\t\t$k = $i - $j * 16;\n\t\t$s = $s . strtoupper(dechex($k));\n\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "777102ec3d1d349de0c6acc1421668cd", "score": "0.6510803", "text": "public function toHex() {\n return $this->rH . $this->gH . $this->bH;\n }", "title": "" }, { "docid": "0d3980ec84658679f71a4b262e956afe", "score": "0.6509784", "text": "public function encodeHex($i) {\n\t\treturn dechex($this->transcode($i));\n\t}", "title": "" }, { "docid": "ae2326fc9c873b41962d1be125e01509", "score": "0.65040225", "text": "function toHex($hash=true)\n\t{\n\t\treturn ($hash?'#':'')\n\t\t.sprintf(\"%02X\",$this->r)\n\t\t.sprintf(\"%02X\",$this->g)\n\t\t.sprintf(\"%02X\",$this->b);\n\t}", "title": "" }, { "docid": "ca2988fd0fc2fc2581b0d76a8a4cc214", "score": "0.6502477", "text": "function hex_encode($value) {\n $val = dechex(ord(substr($value, 0, 1)));\n\n $result = str_repeat('0', 2 - strlen($val)) . $val;\n\n for ($i = 1; $i < strlen($value); $i = $i + 1) {\n $val = dechex(ord(substr($value, $i, 1)));\n\n $result .= ' ' . str_repeat('0', 2 - strlen($val)) . $val;\n }\n\n return $result;\n }", "title": "" }, { "docid": "85748c90d0d40ba1b8f3f2b5dd4a1f3c", "score": "0.6471084", "text": "public function toHex(): string\n {\n return $this->inner->getHex();\n }", "title": "" }, { "docid": "58a679a867bb05e9138b79a2c3d08cf5", "score": "0.64650655", "text": "protected function intToHex(int $input)\r\n {\r\n $hex = dechex($input);\r\n\r\n return $this->padToEven($hex);\r\n }", "title": "" }, { "docid": "34ca72c3449d3b867fcbb5b954a9bab0", "score": "0.6449387", "text": "private function dechexArr(array $dec)\n\t\t{\n\n\t\t\t// convert each value to hex, being careful of a few pitfalls.\n\t\t\tforeach($dec as &$v){\n\n\t\t\t\t$v = round($v);\n\n\t\t\t\tif($v < 1){\n\t\t\t\t\t$v = '00';\n\t\t\t\t}elseif($v < 10){\n\t\t\t\t\t$v = str_pad($v, 2, 0, STR_PAD_LEFT);\n\t\t\t\t}elseif($v < 16){\n\t\t\t\t\t$v = $v;\n\t\t\t\t}elseif($v > 255){\n\t\t\t\t\t$v = 'ff';\n\t\t\t\t}else{\n\t\t\t\t\t$v = dechex($v);\n\t\t\t\t}\n\n\t\t\t\tif(strlen($v) === 1){\n\n\t\t\t\t\t$v .= $v;\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\treturn $dec;\n\t\t}", "title": "" }, { "docid": "a0ab3e1ea51aa70b2bbcb4cfd84fc1a7", "score": "0.6448716", "text": "public function encodeHex($dec, $prefix = true)\n {\n if ($this->param_checking == true) {\n if ($this->numberCheck($dec) === false) {\n throw new \\Exception('Empty or invalid decimal parameter passed to encodeHex function. Value received was \"' . var_export($dec, true) . '\".');\n }\n }\n\n if ($this->math == null) {\n $this->MathCheck();\n }\n\n $dec = strtolower(trim($dec));\n\n if (substr($dec, 0, 1) == '-') {\n $dec = substr($dec, 1);\n }\n\n if ($this->Test($dec) == 'hex') {\n if (substr($dec, 0, 2) != '0x') {\n return '0x' . $dec;\n } else {\n return $dec;\n }\n }\n\n $digits = $this->hex_chars;\n\n $hex = '';\n\n while ($this->math->comp($dec, '0') > 0) {\n $qq = $this->math->div($dec, '16');\n $rem = $this->math->mod($dec, '16');\n $dec = $qq;\n $hex = $hex . $digits[$rem];\n }\n\n $hex = strrev($hex);\n\n if ($prefix === true) {\n return '0x' . $hex;\n } else {\n return $hex;\n }\n }", "title": "" }, { "docid": "430bd32f0ad86e730054281ed40f691b", "score": "0.6440554", "text": "function conv2hex($rgb) {\n\t$out = \"\";\n\tforeach ($rgb as $itm) {\n\t\t$out.= sprintf(\"%02X\", round($itm));\n\t}\n\treturn $out;\n}", "title": "" }, { "docid": "fb674e0e2019da4b6a0e39acd07345e5", "score": "0.64400625", "text": "function char2hex($c)\n\t{\n\t\treturn zeropad(dechex(ord($c)), 2);\n\t}", "title": "" }, { "docid": "26ed1114fbf820c124cc762fbc60a415", "score": "0.64367235", "text": "function SetToHexString($str)\n{\nif(!$str)return false;\n$tmp=\"\";\nfor($i=0;$i<strlen($str);$i++)\n{\n$ord=ord($str[$i]);\n$tmp.=SingleDecToHex(($ord-$ord%16)/16);\n$tmp.=SingleDecToHex($ord%16);\n}\nreturn $tmp;\n}", "title": "" }, { "docid": "61a7e80d9046daeb5a2c889c9d3abc86", "score": "0.6414832", "text": "function hexdec($hex_string)\n{\n return 0;\n}", "title": "" }, { "docid": "3e29a700f199ced81fb55057a899bb99", "score": "0.6390705", "text": "function bchexdec($hex) {\n $dec = 0;\n $len = strlen($hex);\n for ($i = 1; $i <= $len; $i++) {\n $dec = bcadd($dec, bcmul(strval(hexdec($hex[$i - 1])), bcpow('16', strval($len - $i))));\n }\n return $dec;\n}", "title": "" }, { "docid": "764b2780354f3b341ad4e32081a253a2", "score": "0.6362533", "text": "public function toHex(): string {\n return str_replace(\"-\", \"\", $this->uuid);\n }", "title": "" }, { "docid": "3c8fe922bc77e9f9c6530d0e78edd6ac", "score": "0.6298467", "text": "public static function toHex($c)\n {\n // Assumption/prerequisite: $c is the ordinal value of the character\n // (i.e. an integer)\n return dechex($c);\n }", "title": "" }, { "docid": "55f38700fab7b81b0523404b6f67c5bd", "score": "0.62961066", "text": "protected function _convertBinaryToHex($value)\n {\n $toHex = bin2hex($value);\n\n return $toHex;\n }", "title": "" }, { "docid": "fc19a8caeaaee696f4b0e999ecf4350c", "score": "0.6292606", "text": "public static function formatHex($hex): string\n\t{\n\t\t$ar = unpack('C*', $hex);\n\t\t$str = '';\n\t\tforeach ($ar as $v) {\n\t\t\t$s = dechex($v);\n\t\t\tif (strlen($s)<2) {\n\t\t\t\t$s = \"0$s\";\n\t\t\t}\n\t\t\t$str .= $s.' ';\n\t\t}\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "760e8f087f30d7b65e81deaffd00f93c", "score": "0.62800026", "text": "function hexdec($hex_string)\n{\n\treturn 0;\n}", "title": "" }, { "docid": "bfd8c03a6dff13a54a8627316d608d62", "score": "0.62565786", "text": "public function toHex()\n {\n \tif (is_array($this->color))\n \t{\n \t\treturn $this->convertToHexa($this->color);\n \t}\n \telse\n \t{\n \t\treturn $this->color;\n \t}\n }", "title": "" }, { "docid": "f436701c6a25335592d39224e08773e8", "score": "0.6244631", "text": "function hex2str($hex) {\n $str = '';\n for($i=0;$i<strlen($hex);$i+=2) $str .= chr(hexdec(substr($hex,$i,2)));\n return $str;\n}", "title": "" }, { "docid": "a2aab5d4e7f15f47e0bfb03be63942d1", "score": "0.62276506", "text": "function hex2str2($hex) {\n\t\t\t$str = '';\n\t\t\t$hex = str_replace(\" \", \"\", $hex);\n\t\t\tfor($i=0;$i<strlen($hex);$i+=2) {\n\t\t\t\t$decValue = hexdec(substr($hex,$i,2));\n\t\t\t\tif($decValue > 32) {\n\t\t\t\t\t$str .= mb_convert_encoding(chr($decValue), 'UTF-8', 'ISO-8859-2');\n\t\t\t\t}\n\t\t\t}\n\treturn $str;\n}", "title": "" }, { "docid": "aed960d7d38968d4329a4ebedd31ab38", "score": "0.6220877", "text": "function hex2str($hex) {\n $str = '';\n\n //trim any empty 2-byte chunks off the right side\n while(preg_match('/00$/', $hex))\n $hex = substr($hex, 0, -2);\n\n //get 2-byte chunks, encode decimal, then get ascii\n for($i=0;$i<strlen($hex);$i+=2)\n $str .= chr(hexdec(substr($hex,$i,2)));\n\n return $str;\n}", "title": "" }, { "docid": "10df8dcbebc0fab2407f87cce889f113", "score": "0.62014455", "text": "public static function toHex( $ip ) {\n\t\t$n = self::toUnsigned( $ip );\n\t\tif ( $n !== false ) {\n\t\t\t$n = sprintf( '%08X', $n );\n\t\t}\n\t\treturn $n;\n\t}", "title": "" }, { "docid": "afb1c019a4e34212979f2eea0be6431d", "score": "0.61825746", "text": "function ascii_to_hex($ascii_string)\n{\n foreach (str_split($ascii_string) as $chr)\n {\n $hex_string .= dechex(ord($chr));\n }\n\n return $hex_string;\n}", "title": "" }, { "docid": "47cdfdcdeb6f7d940a1a5cb9730f20af", "score": "0.6163692", "text": "public function getHexadecimalString()\n {\n return sprintf('%02X%02X%02X', $this->getRed(), $this->getGreen(), $this->getBlue());\n }", "title": "" }, { "docid": "451e8127228ba93a61db84f363d13d70", "score": "0.6158702", "text": "function rgb2hex($r,$g,$b){ \n return toHex($r).toHex($g).toHex($b); \n }", "title": "" }, { "docid": "c3883babb0dcfe55d5790d30f25018c9", "score": "0.6150172", "text": "protected function dec2hex($intDecimal) {\n\t\treturn str_repeat(\"0\", 2 - strlen(($strHexadecimal = strtoupper(dechex($intDecimal))))) . $strHexadecimal;\n\t}", "title": "" }, { "docid": "d2d3dfc40eb5dd37c9df329ce3b99ae0", "score": "0.6138653", "text": "function hex_decode($value) {\n $value = preg_replace('/[^0-9a-fA-F]/', '', $value);\n\n $result = '';\n\n for ($i = 0; $i < strlen($value); $i = $i + 2) {\n $result .= chr(hexdec(substr($value, $i, 2)));\n }\n\n return $result;\n }", "title": "" }, { "docid": "737134c0330fa8b00ea59328dcee8808", "score": "0.6109467", "text": "function byteArrayToHex($byteArray) {\r\n\t//\r\n\t$n = count($byteArray);\r\n\t$result = \"\";\r\n\t//\r\n\tfor ( $i = 0; $i < $n; $i++ ) {\r\n\t\t$result .= sprintf(\"%02x\",($byteArray[$i]) );\r\n\t}\r\n\t//\r\n\treturn $result;\r\n}", "title": "" }, { "docid": "009887030203697739a3101eff37de64", "score": "0.61032486", "text": "function user_ip2hex()\r\n\t{\r\n\t\treturn dechex(ip2long(get_ip_address()));\r\n\t}", "title": "" }, { "docid": "626cea3cdebe4e4e26598ccba7b9a5fb", "score": "0.608847", "text": "function hexdecs($hex)\n{\n $hex = preg_replace('/[^0-9A-Fa-f]/', '', $hex);\n \n // converted decimal value:\n $dec = hexdec($hex);\n \n // maximum decimal value based on length of hex + 1:\n // number of bits in hex number is 8 bits for each 2 hex -> max = 2^n\n // use 'pow(2,n)' since '1 << n' is only for integers and therefore limited to integer size.\n $max = pow(2, 4 * (strlen($hex) + (strlen($hex) % 2)));\n \n // complement = maximum - converted hex:\n $_dec = $max - $dec;\n \n // if dec value is larger than its complement we have a negative value (first bit is set)\n return $dec >= $_dec ? -$_dec : $dec;\n}", "title": "" }, { "docid": "ba174291992d68f0c1572c4167d935c0", "score": "0.6088037", "text": "public function toHexString()\n {\n return '#' .\n $this->decToHex($this->r) .\n $this->decToHex($this->g) .\n $this->decToHex($this->b);\n }", "title": "" }, { "docid": "6c19b6dbf103962d486a196510bfc133", "score": "0.6077136", "text": "function hsl_to_hex( $hsl ){\n\t\t\n\t\t$rgb = $this->hsl_to_rgb($hsl);\n\n\t\t$hex = $this->rgb_to_hex($rgb);\n\t\t\t\n\t\treturn $hex;\n\t}", "title": "" }, { "docid": "464e7202d2e7f9e066a48db313b855a3", "score": "0.6073939", "text": "public function toHexSharp() {\n return '#' . $this->toHex();\n }", "title": "" }, { "docid": "51ff2d58ed78ac27bc7d48fd690baea3", "score": "0.60432935", "text": "function hex2dec($couleur = \"#000000\"){\n $R = substr($couleur, 1, 2);\n $rouge = hexdec($R);\n $V = substr($couleur, 3, 2);\n $vert = hexdec($V);\n $B = substr($couleur, 5, 2);\n $bleu = hexdec($B);\n $tbl_couleur = array();\n $tbl_couleur['R']=$rouge;\n $tbl_couleur['G']=$vert;\n $tbl_couleur['B']=$bleu;\n return $tbl_couleur;\n}", "title": "" }, { "docid": "d3b23abb98604ccca960622dc17e9577", "score": "0.6035209", "text": "function str2hex($string)\n{\n $hex='';\n for ($i=0; $i < strlen($string); $i++)\n {\n $hex .= dechex(ord($string[$i]));\n }\n return $hex;\n}", "title": "" }, { "docid": "03325e380514dc1bc34a4da63d0542f1", "score": "0.6025696", "text": "public function toInteger(): string {\n return base_convert($this->toHex(), 16, 10);\n }", "title": "" }, { "docid": "8e143dd682579c3b1c095e486f06e789", "score": "0.6022576", "text": "function bchexdec($dec) {\n $res = 0;\n $mn = 1;\n $l = strlen($dec);\n for($i=0;$i<$l;$i++) {\n $res = bcadd($res, bcmul($mn, hexdec($dec[$l-$i-1])));\n $mn = bcmul($mn, 16);\n }\n return $res;\n}", "title": "" }, { "docid": "4c45a34bce0812b3c5c1d69c2e52b0a7", "score": "0.5961642", "text": "function pdf_encode_field_value($value) {\n\t\t//---------------------------------------\n\t\t\t$value=$this->static_method_call('_bin2hex',$value);\n\t\t\treturn $value;\n\t\t}", "title": "" }, { "docid": "b22501522b4310c65319eaab2795458d", "score": "0.59588176", "text": "protected static function bits2hex($bits) \r\n {\r\n $hex = '';\r\n $total = strlen($bits) / 4;\r\n\r\n for ($i = 0; $i < $total; $i++) {\r\n $nibbel = substr($bits, $i*4, 4);\r\n\r\n $pos = strpos(self::$bin, $nibbel);\r\n $hex .= substr(self::$hex, $pos/5, 1);\r\n }\r\n\r\n return $hex;\r\n }", "title": "" }, { "docid": "bededd361b4eb24b399403e8683817fa", "score": "0.5955028", "text": "public function hex($hex) {\n $hex = ltrim($hex, '#');\n if (!isset($this->colors[$hex])) {\n if (strlen($hex) == 3) {\n $rgb = str_split($hex, 1);\n $rgb[0] .= $rgb[0]; \n $rgb[1] .= $rgb[1];\n $rgb[2] .= $rgb[2];\n }\n else {\n $rgb = str_split($hex, 2);\n }\n $this->colors[$hex] = $this->rgb(intval($rgb[0], 16), intval($rgb[1], 16), intval($rgb[2], 16));\n }\n return $this->colors[$hex]; \n }", "title": "" }, { "docid": "95d56d69c8a2d40726b48cdfca085b00", "score": "0.5933384", "text": "function hexToBin($h) {\n\t\tif (!is_string($h)) return null;\n\t\t$r = '';\n\t\tfor ($a = 0; $a < strlen($h); $a += 2) {\n\t\t\t$r .= chr(hexdec($h{$a}.$h{($a + 1)}));\n\t\t}\n\t\treturn $r;\n\t}", "title": "" }, { "docid": "27a8725620ff0ef04737e560bc2cdf55", "score": "0.5931155", "text": "private function hexToStr($hex)\n {\n $string = '';\n for ($i = 0; $i < \\strlen($hex) - 1; $i += 2) {\n $string .= \\chr(hexdec($hex[$i] . $hex[$i + 1]));\n }\n\n return $string;\n }", "title": "" }, { "docid": "cef6fd87a125db285f04df4ce6d6ca04", "score": "0.59234697", "text": "function str2Hex($string){\n $hex='';\n for ($i=0; $i < strlen($string); $i++) {\n $hex .= dechex(ord($string[$i]));\n }\n return $hex;\n}", "title": "" }, { "docid": "d1ffc4214cf16f66d49bd2c99cf7eddb", "score": "0.5904473", "text": "function hexbc($hex): string\n{\n // TODO exception on invalid hex, just use ascii code to calc\n\n if (is_null($hex)) {\n return null;\n }\n\n $result = '0';\n $digits = strlen($hex);\n\n for ($i = 0; $i < $digits; $i++) {\n switch ($hex{$i}) {\n case 'A':\n case 'a': $num = 10; break;\n case 'B':\n case 'b': $num = 11; break;\n case 'C':\n case 'c': $num = 12; break;\n case 'D':\n case 'd': $num = 13; break;\n case 'E':\n case 'e': $num = 14; break;\n case 'F':\n case 'f': $num = 15; break;\n default:\n // 0~9 are 10 base number, so ignore\n $num = $hex{$i};\n break;\n }\n\n $result = bcadd($result, bcmul($num, bcpow(16, $digits - $i - 1)));\n }\n\n return $result;\n}", "title": "" }, { "docid": "2c5c5b1d7c309f306ea7dac07e2f5a69", "score": "0.5903473", "text": "public static function bchexdec($hex)\n {\n if (strlen($hex) == 1) {\n return hexdec($hex);\n }\n\n $remain = substr($hex, 0, -1);\n $last = substr($hex, -1);\n return bcadd(bcmul(16, self::bchexdec($remain), 0), hexdec($last), 0);\n }", "title": "" }, { "docid": "4722f9e2bf70639704286fdaa6252822", "score": "0.5892911", "text": "public function encodeHexadecimal($integer, $options)\n {\n if ($options['hex.capitalize']) {\n return sprintf('%s0x%X', $this->sign($integer), abs($integer));\n }\n\n return sprintf('%s0x%x', $this->sign($integer), abs($integer));\n }", "title": "" }, { "docid": "006d368f2703602b56400a430200780a", "score": "0.5888882", "text": "static public function ip2hex($ip)\r\n\t{\r\n\t\tif (Core_Valid::ip($ip))\r\n\t\t{\r\n\t\t\t$ip_code = explode('.', $ip);\r\n\r\n\t\t\tif (isset($ip_code[3]))\r\n\t\t\t{\r\n\t\t\t\treturn sprintf('%02x%02x%02x%02x', $ip_code[0], $ip_code[1], $ip_code[2], $ip_code[3]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn NULL;\r\n\t}", "title": "" }, { "docid": "13e5dda2ca0107f5f6a6edaaf421647f", "score": "0.58861214", "text": "function d2h($d)\n{\n $hd = \"0123456789ABCDEF\";\n $h = $hd[$d & 15];\n //echo 'h' . $h . \"<br>\";\n while ($d > 15) {\n $d >>= 4;\n $h = $hd[$d & 15] . $h;\n }\n\n if (strlen($h) == 1) {\n $h = \"0\" . $h;\n }\n\n //print \"h: \" . $h.\"<br>\";\n return $h;\n}", "title": "" }, { "docid": "356927c9215077829c11ccd2e24ccd86", "score": "0.58859974", "text": "function hex2bin($str) {\r\n $len = strlen($str);\r\n $nstr = \"\";\r\n for ($i = 0; $i < $len; $i+=2) {\r\n $num = sscanf(substr($str, $i, 2), \"%x\");\r\n $nstr.=chr($num[0]);\r\n }\r\n return $nstr;\r\n }", "title": "" }, { "docid": "8f0a9ef5c89fb214af9b1c87b23ea360", "score": "0.5880269", "text": "private function __to_hex ($string) {\n\n $sum = 0;\n $len = strlen($string);\n\n for ($i = 0; $i < $len; $i ++) {\n\n $sum += ord($string[$i]);\n }\n\n return strtolower(dechex($sum));\n }", "title": "" }, { "docid": "0a98cddb7063fd4e0440546913644d87", "score": "0.5880085", "text": "public function toRgbHex()\n {\n return array_map(function($item){\n return dechex($item);\n }, $this->toRgbInt());\n }", "title": "" }, { "docid": "7bcd823fb371f8176642a9b266feac07", "score": "0.58665305", "text": "public static function hex( $color ) {\n\t\treturn Fusion_Color::new_color( $color )->to_css( 'hex' );\n\t}", "title": "" }, { "docid": "e1a8ed1e8e4fb07046f8515660851f0a", "score": "0.58566827", "text": "protected static function bin2hex(string|false $bin): string\n {\n\tif($bin === false) return '** false **';\n\t$str = '';\n\tfor($pos = 0; $pos < strlen($bin); $pos ++) $str .= bin2hex($bin[$pos]).' ';\n\treturn trim($str);\n }", "title": "" }, { "docid": "8330a7da5469869f4ab739912ef7d30e", "score": "0.5844506", "text": "function hex2dec($couleur = \"#000000\"){\n\t\t$R = substr($couleur, 1, 2);\n\t\t$rouge = hexdec($R);\n\t\t$V = substr($couleur, 3, 2);\n\t\t$vert = hexdec($V);\n\t\t$B = substr($couleur, 5, 2);\n\t\t$bleu = hexdec($B);\n\t\t$tbl_couleur = array();\n\t\t$tbl_couleur['R']=$rouge;\n\t\t$tbl_couleur['V']=$vert;\n\t\t$tbl_couleur['B']=$bleu;\n\t\treturn $tbl_couleur;\n\t}", "title": "" }, { "docid": "9b9b9759cf6f42a83c313457d876df52", "score": "0.5797537", "text": "public\n\n function ascii2dhex( $ascii, $byte_order = 'LSB' )\n {\n $hex = self::ascii2hex( $ascii, $byte_order );\n $hex = explode( ' ', $hex );\n $first = $second = '';\n for ($i = 0; $i < 16; $i++) {\n if ($i < 8) {\n $first .= @$hex[ $i ];\n }\n if ($i > 7) {\n $second .= @$hex[ $i ];\n }\n }\n return hexdec( $first ) . '/' . hexdec( $second );\n }", "title": "" }, { "docid": "2e4d22a701c3595b432f2d5267d7a4fa", "score": "0.5796388", "text": "public function makeHex() : string\n {\n $bytes = random_bytes((int)round($this->length / 2, 0, PHP_ROUND_HALF_UP));\n $token = StringEncoder::rawToHex($bytes);\n\n return substr($token, 0, $this->length);\n }", "title": "" }, { "docid": "dd568d1f9e8ce6b09cb09238991f6840", "score": "0.5778104", "text": "private function decbin32 ($dec) {\n return str_pad(decbin($dec), 32, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "3bfb63dd62d2b21abeb69cd306485006", "score": "0.5775384", "text": "public static function hexToStr($hex) {\r\n $string = '';\r\n for ($i = 0; $i < strlen($hex) - 1; $i += 2) {\r\n $string .= chr(hexdec($hex[$i] . $hex[$i + 1]));\r\n }\r\n\r\n return $string;\r\n }", "title": "" }, { "docid": "ac1a7d643eba4e7d3b4d9b2622802099", "score": "0.5759729", "text": "private function convertFractionToHexadecimal(): string\n {\n $blocks = str_split(\n $this->fraction,\n static::BINARY_BLOCK_SIZE\n );\n\n return implode(\n '',\n array_map(\n [$this, 'convertBlockToHexadecimal'],\n $blocks\n )\n );\n }", "title": "" }, { "docid": "1ddfc17ec880ab687150576d1b67db79", "score": "0.57560426", "text": "public function getTokenHex()\r\n\t{\r\n\t\treturn bin2hex($this->token);\r\n\t}", "title": "" }, { "docid": "152c8e614e26fc3138d45a12699a87a6", "score": "0.5735018", "text": "function bstr($hex)\n\t\t{\n\t\treturn str_replace($this->h2bin,$this->hbin,$hex);\n\t\t}", "title": "" }, { "docid": "3b9cd9c43dedceac77a0dc73c6c69d07", "score": "0.57278985", "text": "public\n\n function ascii2hex( $ascii, $byte_order = 'LSB' )\n {\n if (ctype_xdigit( $ascii ) and $this->type == 'hex') {\n return substr( chunk_split( $ascii, 2, ' ' ), 0, -1 );\n }\n $hex = unpack( 'H*', $ascii )[ 1 ];\n if ($byte_order == 'LSB') {\n $hex = self::byte_order_reverse( $hex );\n }\n return substr( chunk_split( $hex, 2, ' ' ), 0, -1 );\n }", "title": "" }, { "docid": "2261ca516bb670f3f21835e9280b2204", "score": "0.57258815", "text": "public function binConv($hex)\n {\n if ($this->param_checking == true) {\n if ($this->numberCheck($hex) === false) {\n throw new \\Exception('Missing or invalid number parameter passed to the binConv() function. Value received was \"' . var_export($hex, true) . '\".');\n }\n }\n\n if ($this->math == null) {\n $this->MathCheck();\n }\n\n $hex = strtolower(trim($hex));\n $digits = $this->BaseCheck('256');\n\n switch ($this->Test($hex)) {\n case 'dec':\n $hex = $this->encodeHex($hex);\n break;\n case 'hex':\n if ($hex[0] . $hex[1] != '0x') {\n $hex = '0x' . $hex;\n }\n break;\n default:\n throw new \\Exception('Unknown data type passed to the binConv() function. Value received was \"' . var_export($hex, true) . '\".');\n }\n\n $byte = '';\n\n while ($this->math->comp($hex, '0') > 0) {\n $dv = $this->math->div($hex, '256');\n $rem = $this->math->mod($hex, '256');\n $hex = $dv;\n $byte = $byte . $digits[$rem];\n }\n\n return strrev($byte);\n }", "title": "" }, { "docid": "36118abd0ad6e703d471fa5cd3251ab5", "score": "0.57253426", "text": "function color2hex($r, $g, $b)\n{\n\treturn '#' . bin2hex(pack('C3', $r * 255, $g * 255, $b * 255));\n}", "title": "" }, { "docid": "a10d9d978f346b4ef2d9be6f0036ba10", "score": "0.5721044", "text": "public\n\n function hex2dec( $hex, $byte_order = 'LSB', $signed = false )\n {\n $hex = preg_replace( '/[^0-9A-Fa-f]/', '', trim( $hex ) );\n if ($byte_order == 'LSB') {\n $hex = self::byte_order_reverse( $hex );\n }\n $dec = hexdec( $hex );\n $max = pow( 2, 4 * (strlen( $hex ) + (strlen( $hex ) % 2)) );\n $_dec = $max - $dec;\n if ($signed) {\n return $dec > $_dec ? -$_dec : $dec;\n } else {\n return $dec;\n }\n }", "title": "" }, { "docid": "c744df76fed2e4be2b504e1b16f49690", "score": "0.5712458", "text": "function hex2bin ($str){\n\t\t\t$len\t= strlen($str);\n\t\t\t$res\t= '';\n\t\t\tfor ($i = 0; $i < $len; $i += 2) {\n\t\t\t\t$res .= pack(\"H\", $str[$i]) | pack(\"h\", $str[$i + 1]);\n\t\t\t}\n\t\t\treturn $res;\n\t\t}", "title": "" }, { "docid": "a8ac47d3fef47de8123b8745aad2b68e", "score": "0.5711305", "text": "function _hex2chr($num) {\n\t\t\treturn chr(hexdec($num));\n\t\t}", "title": "" }, { "docid": "376347fba312043b356c9669afa5cdea", "score": "0.5708399", "text": "public function testHexdecForNegativeIntegers()\n {\n $this->assertEquals(1, hexdec(dechex(1)));\n // but not working for negative\n $this->assertNotEquals(-1, hexdec(dechex(-1)));\n\n // custom hexdec implementation works for both\n $this->assertEquals(1, $this->imageHash->hexdec(dechex(1)));\n $this->assertEquals(-1, $this->imageHash->hexdec(dechex(-1)));\n }", "title": "" }, { "docid": "abdcff42bdb9ed15e324de9aa52198eb", "score": "0.5701091", "text": "function hexToByte($hex)\n\t{\n\t // ignore non hex characters\n\t $hex = preg_replace('/[^0-9A-Fa-f]/', '', $hex);\n\t \n\t // converted decimal value:\n\t $dec = hexdec($hex);\n\t \n\t // maximum decimal value based on length of hex + 1:\n\t // number of bits in hex number is 8 bits for each 2 hex -> max = 2^n\n\t // use 'pow(2,n)' since '1 << n' is only for integers and therefore limited to integer size.\n\t $max = pow(2, 4 * (strlen($hex) + (strlen($hex) % 2)));\n\t \n\t // complement = maximum - converted hex:\n\t $_dec = $max - $dec;\n\t \n\t // if dec value is larger than its complement we have a negative value (first bit is set)\n\t return $dec > $_dec ? -$_dec : $dec;\n\t}", "title": "" }, { "docid": "63e19308a72413952edbf56ec6886ff3", "score": "0.56839246", "text": "public function convertFromHex(\n string $hex,\n int $bytes,\n bool $parameterBigEndian\n ): string\n {\n return $this->calculateEndian($hex, true);\n }", "title": "" }, { "docid": "a0b86d863f512361de1d18326391ba28", "score": "0.5683786", "text": "protected static function fromHex(string $hex): string\n {\n $data = '';\n\n // Convert hex to string.\n for ($i = 0; $i < \\strlen($hex) - 1; $i += 2) {\n $data .= \\chr(hexdec($hex[$i].$hex[$i + 1]));\n }\n\n return $data;\n }", "title": "" }, { "docid": "d47ed85410adb237c22ce6086c6a08fe", "score": "0.5675238", "text": "function rgb_to_hex($rgb){\n\t\t\n\t\t$r = $rgb['red'];\n\t\t$g = $rgb['green'];\n\t\t$b = $rgb['blue'];\n\t\t\n\t\t$rhex = sprintf( '%02X', round($r) );\n\t\t$ghex = sprintf( '%02X', round($g) );\n\t\t$bhex = sprintf( '%02X', round($b) );\n\n\t\t$hex = $rhex.$ghex.$bhex;\n\t\t\n\t\treturn $hex;\n\t\t\n\t}", "title": "" } ]
e4976f5263f56768aae0fb1c53b85d8e
Registers the called class in the registry.
[ { "docid": "f8a4a1a39fe9e4e134b91fee0ff505ee", "score": "0.5729974", "text": "final public static function registerClass(CtkObject $object = null) {\n\t\tself::$_classRegistry[get_called_class()] = (isset($object))? $object : true;\n\t}", "title": "" } ]
[ { "docid": "ed63c2c4bf38fdc54fca0cb7b05e6511", "score": "0.7127324", "text": "public static function register() { return parent::register(get_class()); }", "title": "" }, { "docid": "ef24db6d22c56fc67e0562dee4063f2e", "score": "0.6719875", "text": "public abstract function register();", "title": "" }, { "docid": "93ae8d4ea0527541c135ae3d718d7fe7", "score": "0.66418964", "text": "abstract public function registering();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6619355", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6619355", "text": "abstract public function register();", "title": "" }, { "docid": "f3a2bd7bfa867881666a6fb51c3dc160", "score": "0.6619355", "text": "abstract public function register();", "title": "" }, { "docid": "e60c4829a9d92aa836db38c9b524f2f7", "score": "0.6464918", "text": "abstract public static function register(): void;", "title": "" }, { "docid": "b599923503159f0dd059257125a28e00", "score": "0.6417108", "text": "function register_class(&$class)\n\t{\n\t\t$this->class = &$class;\n\t}", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.64019734", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.64019734", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.64019734", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.64019734", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.64019734", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.64019734", "text": "public function register();", "title": "" }, { "docid": "d29d53a3a2460ede7b17a5e5193d5955", "score": "0.64019734", "text": "public function register();", "title": "" }, { "docid": "c9a52410d77b29677f751771d913db2f", "score": "0.63411623", "text": "abstract public function register(): void;", "title": "" }, { "docid": "35d1c743ce7013c5896c065b50aae8b5", "score": "0.6326531", "text": "function register_class(&$class)\n\t{\n\t\t$this->class = &$class;\n\t\t$this->ipsclass =& $class->ipsclass;\n\t\t$this->root_path = $this->class->root_path;\n\t}", "title": "" }, { "docid": "35d1c743ce7013c5896c065b50aae8b5", "score": "0.6326531", "text": "function register_class(&$class)\n\t{\n\t\t$this->class = &$class;\n\t\t$this->ipsclass =& $class->ipsclass;\n\t\t$this->root_path = $this->class->root_path;\n\t}", "title": "" }, { "docid": "930f0783695bb9695b0b53023f6138cc", "score": "0.6319698", "text": "public function register(): void;", "title": "" }, { "docid": "930f0783695bb9695b0b53023f6138cc", "score": "0.6319698", "text": "public function register(): void;", "title": "" }, { "docid": "b88299998bd116a9f5b5517e97f99287", "score": "0.62830484", "text": "public function register( )\n {\n }", "title": "" }, { "docid": "2196c2492d71669b8000c9ed09a4c694", "score": "0.6277283", "text": "public function register($name, $classname) {\n }", "title": "" }, { "docid": "93d0ac3e9703637c679c243e0da25eb7", "score": "0.6272195", "text": "static function register_class($class_name){\n self::setup();\n $isTag = Tag::isValid($class_name);\n if(!$isTag && !function_exists($class_name)) return;\n\n $extend = '\\\\React\\\\'.($isTag ? 'Tag' : 'Func');\n $namspace = '';\n $class_arr = explode('\\\\', $class_name);\n $class = array_pop($class_arr);\n if($class_arr) $namspace = 'namespace '. implode('\\\\', $class_arr).';';\n eval(\"$namspace class $class extends $extend {}\");\n }", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.62647736", "text": "public function register() {}", "title": "" }, { "docid": "aeb50a2c58e9343495170823be8f7ab8", "score": "0.62647736", "text": "public function register() {}", "title": "" }, { "docid": "00273f8ddd445f97b40d00aeef124ff3", "score": "0.62027156", "text": "public static function register(): void\n {\n\n }", "title": "" }, { "docid": "5089a05ea439ef585b118740b2d62062", "score": "0.61800843", "text": "public function register($name, $class)\n {\n $this->classes[$name] = $class;\n }", "title": "" }, { "docid": "7a5180c73b3232d4b1b38aa42f6afd12", "score": "0.61516243", "text": "public function addToClass($class) {\n\n }", "title": "" }, { "docid": "3ad14bb8c56adcb542afd0b318060fd4", "score": "0.6055464", "text": "function register() {}", "title": "" }, { "docid": "f2d33ef42ca27b7ecbf6ff6c5df07934", "score": "0.6023611", "text": "public function register($class)\n {\n $name = preg_replace('/^.*\\\\\\\\/', '', $class);\n\n $this->serviceFactory->registerService($name, $class);\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.59738815", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.59738815", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "965a4de28272e56bd9f1cc779990207d", "score": "0.59738815", "text": "public function register(): void\n {\n }", "title": "" }, { "docid": "95bd0bcb55056d00e0f53826e2cffd5b", "score": "0.59710807", "text": "public function register()\n {\n parent::register();\n }", "title": "" }, { "docid": "95bd0bcb55056d00e0f53826e2cffd5b", "score": "0.59710807", "text": "public function register()\n {\n parent::register();\n }", "title": "" }, { "docid": "95bd0bcb55056d00e0f53826e2cffd5b", "score": "0.59710807", "text": "public function register()\n {\n parent::register();\n }", "title": "" }, { "docid": "a4d01aa0279b12767601c7a49ae0bfa1", "score": "0.5948167", "text": "protected function detectAndRegister() {\n foreach ($this->registry as $registered) {\n foreach ($this->overloaderPrefix as $prefix) {\n\n // Stop too much looping early\n $key = $registered . $prefix;\n if (isset($this->classes[$key])\n && $this->classes[$key] == false) {\n continue;\n }\n\n $class = $prefix . str_replace('_', '__', ucfirst($registered));\n $name = '';\n\n if (isset($this->classes[$key])) {\n if ($this->classes[$key]) {\n $name = $class;\n }\n }\n elseif ($this->maybeMapped($class)) {\n $name = $class;\n $this->classes[$key] = true;\n $this->updateCache = true;\n }\n else {\n\n if (class_exists($class)) {\n $this->classes[$key] = true;\n $name = $class;\n }\n else {\n $this->classes[$key] = false;\n }\n\n $this->updateCache = true;\n }\n\n // Prevent double loading\n if (empty($name)) {\n continue;\n }\n\n // Dont double load\n if (isset($this->loaded[$name])) {\n continue;\n }\n\n // Register the hook\n if (class_exists($name, true)) {\n $this->registerHook($name, $registered);\n }\n\n }\n }\n\n if ($this->updateCache) {\n $this->setCache();\n }\n\n return $this;\n }", "title": "" }, { "docid": "fd4cc22bd2378d07fcb1b75882fe5fa6", "score": "0.5933128", "text": "public function register($classes): void;", "title": "" }, { "docid": "970bc3799054938927c002ceba293d9b", "score": "0.5930409", "text": "public\n\tfunction register() {\n\t\t//\n\t}", "title": "" }, { "docid": "0b96993cbbdce75877e85b14065d849f", "score": "0.59301054", "text": "public static function register() {\n\t\tspl_autoload_register(array('\\system\\Loader', 'load_class'));\n\t}", "title": "" }, { "docid": "d62a28271c892f3b85c213f0c4814623", "score": "0.5909956", "text": "function register($class, EventEmitterInterface $events);", "title": "" }, { "docid": "95f0b16ee72a246a88e96c5b7261b9d4", "score": "0.5909862", "text": "public function register()\n {\n /**\n * search for actions and filteres and register them \n */\n foreach( get_class_methods( $this->hooks ) as $methodName )\n {\n if( ! preg_match( '/^(action|filter)([A-Z].+)/', $methodName, $m) )\n {\n continue;\n }\n \n $hookName = preg_replace('/[A-Z]/', '_$0', $m[2]);\n $hookName = substr( strtolower($hookName), 1 );\n \n switch( $m[1] )\n {\n case 'action':\n add_action( $hookName, array( $this, '_' . $methodName ) );\n break;\n \n case 'filter':\n add_filter( $hookName, array( $this, '_' . $methodName ) );\n break;\n }\n }\n \n if( method_exists( $this->hooks, 'hookActivation' ) )\n {\n register_activation_hook( POST_MINER__FILE, array( $this, '_hookActivation') );\n }\n\n }", "title": "" }, { "docid": "4d427dc2b687900b0a9c0d7929195131", "score": "0.5906945", "text": "final public static function Register(){\n\t\tspl_autoload_register( [ __CLASS__, 'Load'], true, true);\n\t}", "title": "" }, { "docid": "69d3f167e184a4c4449b045cd6a3eea6", "score": "0.5889211", "text": "public function register()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "0bfb73cb67e6001c902cccf16b73f0ba", "score": "0.58880717", "text": "private function registerClases() \n {\n spl_autoload_register([$this, 'load']);\n }", "title": "" }, { "docid": "15d0cde5ddd499c09dea1ec658b9ac10", "score": "0.5886375", "text": "public static function register()\n\t{\n\t\tspl_autoload_register(array(__CLASS__, 'loadClass'));\n\t}", "title": "" }, { "docid": "c7e17f83d7109e2119cf96eeef428c09", "score": "0.5866957", "text": "public function register() {\n\t\t\n\t}", "title": "" }, { "docid": "9ac9343bdaedf5920c4648210d89b30c", "score": "0.5856884", "text": "static public function register ()\n {\n ini_set ( 'unserialize_callback_func', 'spl_autoload_call' );\n spl_autoload_register ( array ( __CLASS__, 'autoload' ) );\n }", "title": "" }, { "docid": "4f0bf9229ac6a03e004cc0d38851a797", "score": "0.58366805", "text": "public function register()\n {\n return array(T_CLASS);\n\n }", "title": "" }, { "docid": "c429c85acfe89525acf308ff2b8f95e6", "score": "0.5829447", "text": "public static function register(string $name, $class): void\n {\n self::$di[$name] = $class;\n }", "title": "" }, { "docid": "2e7ac771d34bb04f2c3c4e44f9eaa61d", "score": "0.58197975", "text": "public function register(){\n\t\t//\n\t}", "title": "" }, { "docid": "2bee4c9b03a11f825e041511fb790763", "score": "0.5816879", "text": "public function registry($type, $class)\n {\n $this->selectorsMap->set($type, $class);\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5816691", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5816691", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5816691", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5816691", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5816691", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "76840ce9e6bf2aaf07b6cf2bdd39bd7b", "score": "0.5816691", "text": "public function register(): void\n {\n //\n }", "title": "" }, { "docid": "833033cdfabd18549e0665a70ac9cf29", "score": "0.58129644", "text": "public function enregistrer()\n {\n spl_autoload_register(array($this, 'loadClass'));\n }", "title": "" }, { "docid": "a80ee18e4e9ee23bd5428cca71abf62c", "score": "0.5811959", "text": "static function register(){\n spl_autoload_register(array(__CLASS__, 'autoload'));\n }", "title": "" }, { "docid": "a988ae76e0b56b307298fcfc0cdfd1bb", "score": "0.5798001", "text": "public function register() { }", "title": "" }, { "docid": "57b38f8a2baf8efdd47d09f00fd7303a", "score": "0.5787934", "text": "public function register()\n\t{\t\t\n\t\t//\n\t}", "title": "" }, { "docid": "e5a0100d810cf8eadea69b308526d9a9", "score": "0.57800555", "text": "function register(){\n \n }", "title": "" }, { "docid": "0024b56154bb8d6411a9e8ef590040dd", "score": "0.574433", "text": "static public function register()\n\t{\n\t\tini_set('unserialize_callback_func', 'spl_autoload_call');\n\t\tspl_autoload_register(array(new self, 'autoload'));\n\t}", "title": "" }, { "docid": "97df743e552917ec3b93140a97bd3eb6", "score": "0.57235354", "text": "public function register()\n {\n spl_autoload_register([$this, 'loadClass']);\n }", "title": "" }, { "docid": "a34e86e6064aa48571b4c3a9670be44b", "score": "0.57039374", "text": "public function register()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "40c408a144c69475efc780cad2dbc13a", "score": "0.57038826", "text": "protected function registerClass($cid, $key, $matches, $ClassName)\n {\n if ( ! isset($this->keys[$cid]) && class_exists('Controller', false) && ! isset($this->unset[$cid])) {\n\n $this[$cid] = function () use ($key, $matches, $ClassName) {\n\n $Object = is_string($ClassName) ? new $ClassName($this) : $ClassName;\n\n if (Controller::$instance != null && empty($matches['return'])) { // Let's sure controller instance available and not null\n return Controller::$instance->{$key} = $Object;\n }\n return $Object;\n };\n }\n return null;\n }", "title": "" }, { "docid": "78079f90d9a4f9416c1604c08f8ce30a", "score": "0.5702268", "text": "public function register()\n\t\t{\n\t\t}", "title": "" }, { "docid": "78079f90d9a4f9416c1604c08f8ce30a", "score": "0.5702268", "text": "public function register()\n\t\t{\n\t\t}", "title": "" }, { "docid": "78215d41efaa88abb7bc3956641270e0", "score": "0.5699341", "text": "static function register(){\n\t spl_autoload_register(array(__CLASS__, 'autoload'));\n\t}", "title": "" }, { "docid": "71dc355ea2fd7efa85a49fe1a7e4927c", "score": "0.56957877", "text": "public function register()\n\t{\n\n\t}", "title": "" }, { "docid": "71dc355ea2fd7efa85a49fe1a7e4927c", "score": "0.56957877", "text": "public function register()\n\t{\n\n\t}", "title": "" }, { "docid": "4d7f9dc6f07712fbfc0ca812d22c0783", "score": "0.5689134", "text": "public function registerSingleton($className, $params);", "title": "" }, { "docid": "ac031da8393f885d8422fa986a3aaef9", "score": "0.568719", "text": "public function register()\n\t{\n\t}", "title": "" }, { "docid": "f1cc9a91a71fdf774291b95cda19fac8", "score": "0.5687007", "text": "public function register()\n {\n spl_autoload_register([$this, 'classLoader'], true, true);\n }", "title": "" }, { "docid": "46a30b62f5f3b96b07e391134726491f", "score": "0.5666741", "text": "public function register()\n\t{\n\t //\n\t}", "title": "" }, { "docid": "9cb81440745322f0f39e786160d740c5", "score": "0.56658065", "text": "public static function register(): void\n {\n spl_autoload_register(array(__CLASS__, 'autoload'));\n }", "title": "" }, { "docid": "b9429ce7ae3c45f96c975ae7ec27f583", "score": "0.56626093", "text": "public function register()\r\n {\n //print \"Register controller: \".get_class($this).NL;\n \n // TODO: Here, the paths must be told.\r\n }", "title": "" }, { "docid": "690f558e03bf540ba0941e903aea1486", "score": "0.56573635", "text": "function register_class(&$class)\n\t{\n\t\t$this->lib = &$class;\n\t\t\n\t\t$this->topic = $this->lib->topic;\n $this->forum = $this->lib->forum;\n }", "title": "" }, { "docid": "a86c4c183d91cb80786d91af119f1af5", "score": "0.5651774", "text": "public function register() {\n\t\tspl_autoload_register(array($this, 'loadClass'));\n\t}", "title": "" }, { "docid": "f0ec926ac2cf852de8ebebb50e38a206", "score": "0.5642107", "text": "static public function register() {\n ini_set('unserialize_callback_func', 'spl_autoload_call');\n spl_autoload_register(array(new self, 'autoload'));\n }", "title": "" }, { "docid": "6df8667f275a6803e309894b37e92925", "score": "0.56380635", "text": "private function register_hooks() {\n\t\tforeach ( $this->get_hooking_classes() as $class ) {\n\t\t\t$full_class_name = ( $this->namespace . '\\\\' . $class );\n\t\t\t$reflection = new \\ReflectionClass( $full_class_name );\n\n\t\t\tif ( $reflection->implementsInterface( 'UTEC\\Common\\Interfaces\\Has_Hooks' ) ) {\n\t\t\t\t( new $full_class_name() )->hooks();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "010cb91d1b4930f8bb6696aba8f47c72", "score": "0.5626909", "text": "public function register()\n\t{\n//\n\t}", "title": "" }, { "docid": "bb2b54cb83d68a62e1852e81f858009a", "score": "0.5623027", "text": "public function register()\n {\n // TODO: Implement register() method.\n }", "title": "" }, { "docid": "bb2b54cb83d68a62e1852e81f858009a", "score": "0.5623027", "text": "public function register()\n {\n // TODO: Implement register() method.\n }", "title": "" }, { "docid": "bb2b54cb83d68a62e1852e81f858009a", "score": "0.5623027", "text": "public function register()\n {\n // TODO: Implement register() method.\n }", "title": "" }, { "docid": "bb2b54cb83d68a62e1852e81f858009a", "score": "0.5623027", "text": "public function register()\n {\n // TODO: Implement register() method.\n }", "title": "" }, { "docid": "bb2b54cb83d68a62e1852e81f858009a", "score": "0.5623027", "text": "public function register()\n {\n // TODO: Implement register() method.\n }", "title": "" }, { "docid": "bb2b54cb83d68a62e1852e81f858009a", "score": "0.5623027", "text": "public function register()\n {\n // TODO: Implement register() method.\n }", "title": "" }, { "docid": "08933960f84c6524a7dbc28a34dfe5b1", "score": "0.56177473", "text": "static function register() {\n\t\tspl_autoload_register(array(__CLASS__, 'autoload'));\n\t}", "title": "" }, { "docid": "e2a49fada140a574d3f3b8e2fde440fa", "score": "0.56095874", "text": "public static function register() {\n spl_autoload_register (array(__CLASS__,'autoload'));\n }", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "a975759eb645fc967d9d4bf8b2d882ed", "score": "0.55856335", "text": "public function register()\n\t{\n\t\t//\n\t}", "title": "" } ]
a9b7bbdfdfadf26cf58dd7a659e26bf5
changing the name of welcome to website Index Page for this controller. Maps to the following URL or or Since this controller is set as the default controller in config/routes.php, it's displayed at So any other public methods not prefixed with an underscore will map to /index.php/welcome/
[ { "docid": "43e0219f48a46ae4a9b38ac121669b74", "score": "0.0", "text": "public function index() //TO HIDE CONTROL YOU REMOVE INDEX FILE\n\t{\n\t\t$this->load->model('users_model');\n\n\t\t$data = array(\n\t\t\t'users'\t\t=> $this->users_model->all_users(),\n\t\t\t'courses'\t=> $this->users_model->all_courses()\n\t\t);\n\n\t\t$this->build('welcome_message', $data);\n\n\t}", "title": "" } ]
[ { "docid": "f100ba09e7b846346ac60985262e5200", "score": "0.72111166", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome');\n\t}", "title": "" }, { "docid": "55d01d9ef8b72aa52d6827cdc221fb21", "score": "0.7120542", "text": "public function index(){\t\n\t\treturn view('welcome/welcome');\n\t}", "title": "" }, { "docid": "cc170c5a7b410d5c465cc6dce1b195eb", "score": "0.7049038", "text": "public function getIndex()\n\t{\t\n return view ('pages.welcome'); \n\t}", "title": "" }, { "docid": "4e7d41ab6eec632a59a36b070cfc6add", "score": "0.6993047", "text": "public function index()\n\t{\n\t\treturn view('pages.home.welcome');\n\t}", "title": "" }, { "docid": "8c995fb33a385ea3941393faeb800fb9", "score": "0.6850765", "text": "public function index()\n {\n return view('Main.welcome');\n }", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "8ba2bad3a25739ea30952c8f105f6775", "score": "0.6836539", "text": "public function index()\n\t{\n\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "bff7dbc65e587835248e4b204b1a131e", "score": "0.68184084", "text": "public function index ()\n \t{\n \t\treturn view('welcome');\n \t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f98a1166979aa71dcc6f80a8bf7d6bdd", "score": "0.6817648", "text": "public function index()\n\t{\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "71a5f880be1b0e74e1f11298e00a0abd", "score": "0.6795264", "text": "public function index()\n {\t\n return view('welcome');\n }", "title": "" }, { "docid": "f79a52e021f4547613823efae7797e9f", "score": "0.67782426", "text": "public function welcome() \n\t{\n\t\t$this->load->view(\"includes/welcome\");\n\t}", "title": "" }, { "docid": "b8554d895ae1a174ee814e91709ca9da", "score": "0.67705166", "text": "public function index()\n {\n $this->load->view('welcome_message');\n }", "title": "" }, { "docid": "b8554d895ae1a174ee814e91709ca9da", "score": "0.67705166", "text": "public function index()\n {\n $this->load->view('welcome_message');\n }", "title": "" }, { "docid": "7b693ad33621bb553322198d699939a0", "score": "0.6764794", "text": "public function index()\n {\n return view(\"welcome\");\n }", "title": "" }, { "docid": "8d3e08a5ee0e46b7ead8465373e7119d", "score": "0.6758864", "text": "public function index() {\n $this->load->view('welcome_message');\n }", "title": "" }, { "docid": "2342db9abe912e750c717ee0dd516070", "score": "0.6756538", "text": "public function index(){\n\t\techo \"Welcome to HOME controller\";\n\t\texit();\n\t}", "title": "" }, { "docid": "b94da795cad00eb789e20a2c9de95932", "score": "0.67489374", "text": "public function index()\n\t{\n\t\t//$this->load->view('welcome_message');\n\t\t$this->load->view('index');\n\t}", "title": "" }, { "docid": "2eff068e1173802025a56b4eecbc6d70", "score": "0.67260706", "text": "public function index(){\n return view('nickelcms::pages.welcome');\n }", "title": "" }, { "docid": "064bf703e3c3869b8a391eee324e1d30", "score": "0.67098254", "text": "public function welcome() {\n\t\t$data['header'] = 'searchandflick/welcome_header.inc';\n\t\t$data['main_content'] = 'searchandflick/welcome_view';\n\t\t$this->load->view('includes/template', $data);\n\t}", "title": "" }, { "docid": "cdc200ca7a6803c8219410b216f83118", "score": "0.67061645", "text": "public function index()\n {\n return view('home.welcome');\n }", "title": "" }, { "docid": "6acff0899b1a4f1a17f7c98e46c1432c", "score": "0.66685754", "text": "public function index()\n {\n return view('/welcome');\n }", "title": "" }, { "docid": "c68203b3bf9f6072bd8dc71be4309b9d", "score": "0.66632134", "text": "public function index()\n\t{\n\t\tlog_message('debug', \"API PATH: \".$_SERVER[\"REQUEST_URI\"]);\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "f32a28a2058ea9d70deaa49be625f1d4", "score": "0.66581714", "text": "public function index()\n {\n return view('welcome');\n\t\t// return redirect('/home');\n }", "title": "" }, { "docid": "7c600ad3a0002885c83a94a4b55eb20e", "score": "0.6633311", "text": "public function index()\n { \n\n return view('welcome', [\n ]) ;\n }", "title": "" }, { "docid": "3ebcc11b356cee2009aa2f83170ae639", "score": "0.6615756", "text": "public function index()\n {\n\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "e75c125de384ce9e432e95f0d85057b8", "score": "0.66071963", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "598fbae8e986b3682d483735306c4cea", "score": "0.6603928", "text": "public function getIndex(){\n return view('welcome');\n }", "title": "" }, { "docid": "74ad0c3afbc95c7ad471b3d098db33f2", "score": "0.6597649", "text": "public function welcome(){\n\n \treturn view('welcome');\n }", "title": "" }, { "docid": "0f28a14f503211d310ddde068cb94816", "score": "0.65858", "text": "public function index()\n {\n return view('welcome');\n\n }", "title": "" }, { "docid": "6605496b6bb8b78b1e25361b0d26eadc", "score": "0.6582526", "text": "public function welcome(){\n return view('pages.welcome');\n }", "title": "" }, { "docid": "08152fccbdd291eb9701320391423aa3", "score": "0.6576132", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "b315d88d7e7b0206836f869b27a70fe0", "score": "0.6570153", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "52cdda7e2ffca924d46e6cc328a1ea8f", "score": "0.65687495", "text": "public function index()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "5009ca6275d1249233b371262f451c8e", "score": "0.65628785", "text": "public function welcome()\n {\n return view(\"Accounting::welcome\");\n }", "title": "" }, { "docid": "439e552ebb86e0e42681b579ba38a5f2", "score": "0.6556421", "text": "public function welcomeAction()\r\n {\r\n\r\n }", "title": "" }, { "docid": "ca534e70443ef6e0a69ca0c61fe3e5fd", "score": "0.65512896", "text": "public function index()\n { \n return view('welcome');\n }", "title": "" }, { "docid": "419f65e24da5f20ad9c8019a17117c30", "score": "0.65493757", "text": "public function welcomeAction()\n {\n $this->loadLayout();\n $this->renderLayout();\n }", "title": "" }, { "docid": "171f0b08bdae5d5f525e99c1bc77baf4", "score": "0.65061826", "text": "public function welcome(){\n\n return view('welcome');\n }", "title": "" }, { "docid": "92771aaf697482bc123baf31135dfcd1", "score": "0.64905846", "text": "public function index(){\n return view('welcome');\n }", "title": "" }, { "docid": "823ef18012ff49dfd21924e2cb75d6c5", "score": "0.6485786", "text": "public function welcome()\n {\n $data['title'] = \"Welcome\";\n $data['user_status'] = (Session::get('user_name') ? Session::get('user_name') : \"Visitor\");\n $this->test();\n View::renderTemplate('header', $data);\n $this->feedback->render();\n View::render('index', $data);\n View::renderTemplate('footer', $data);\n }", "title": "" }, { "docid": "0c315c2d016d647468b629fa931f03b6", "score": "0.6484918", "text": "public function showWelcome()\n\t{\n\t\treturn View::make('index');\n\t}", "title": "" }, { "docid": "0b3fd728610bafefc89894763d9c3e40", "score": "0.64640427", "text": "public function index()\n\t{\n\t\tif ( ! $this->ion_auth->logged_in())\n\t\t{\n\t\t\tredirect('auth/login');\n\t\t}\n\t\t$this->load->view('welcome_message');\n\t}", "title": "" }, { "docid": "5faca383432d54deff44311c1237b092", "score": "0.6454527", "text": "public function welcome()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "5faca383432d54deff44311c1237b092", "score": "0.6454527", "text": "public function welcome()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "5faca383432d54deff44311c1237b092", "score": "0.6454527", "text": "public function welcome()\n {\n return view('welcome');\n }", "title": "" }, { "docid": "bf570076d51978ec3c450d381b5793fd", "score": "0.6449358", "text": "public function showWelcome() { //Homepage Function\n //return Redirect::to('/admin');\n $layout = 'layout';\n $this->layout->title = TITLE_FOR_PAGES . 'Welcome';\n $this->layout->content = View::make('home.index');\n }", "title": "" }, { "docid": "033454cc1943985b70951c4c4df9372e", "score": "0.644664", "text": "public function welcome(){\n return view('welcome');\n }", "title": "" }, { "docid": "b2374f954dd1ea75c32f117998ccabf4", "score": "0.64212865", "text": "public function actionWelcome()\n {\n return $this->render('welcome');\n }", "title": "" }, { "docid": "7981ea2e5174307f8cf22c59751417f0", "score": "0.64170796", "text": "public function welcome()\n {\n $this->authorize('admin-welcome');\n return view ('admin.welcome');\n }", "title": "" }, { "docid": "1bf700a35557998a6d4c143b68389b1c", "score": "0.6415179", "text": "public function getIndex()\n {\n #2 talk to the model\n #3 receive data back\n #4 process the data again\n #5 pass the data to the correct view\n\n return view('/pages/welcome');\n }", "title": "" }, { "docid": "db0e83323414c8b556643d5420b5fed0", "score": "0.6405242", "text": "public function actionHome()\n {\n $this->redirect('/home/default/welcome');\n }", "title": "" }, { "docid": "04e32fcf9025b8180cd66e0a2cd8ea6e", "score": "0.6387171", "text": "public function index()\n {\n return view('test.welcome');\n }", "title": "" }, { "docid": "2a37ccc2aee72bd12ee149144209fc0c", "score": "0.6360679", "text": "public function index()\n {\n $params = array('path' => $this->filePath);\n\n // Get the Message.\n $message = '';\n\n EventManager::sendEvent('welcome', $params, $message);\n\n // Setup the View variables.\n $this->title(__d('demo', 'Welcome'));\n\n $this->set('message', $message);\n }", "title": "" }, { "docid": "47450350b5138c8ca24b39833a89ae17", "score": "0.6342246", "text": "public function index()\n {\n $data['page_title'] = \"Home\";\n $this->view(\"index\",$data);\n }", "title": "" }, { "docid": "db1d8683668225f772d50caef726e553", "score": "0.6304989", "text": "public function Index() // /home/index\r\n {\r\n // Pre-process data.\r\n\r\n $this->view();\r\n }", "title": "" }, { "docid": "6de4642757358d9d58b9727932de6b12", "score": "0.62903047", "text": "public function index() {\n //\n return \"Welcome Companies\";\n }", "title": "" }, { "docid": "f6adcef89cf2717c35f073dc0eac3a64", "score": "0.62649775", "text": "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "title": "" }, { "docid": "f6adcef89cf2717c35f073dc0eac3a64", "score": "0.62649775", "text": "public function index()\n\t{\n\t\t$this->load->view('home');\n\t}", "title": "" }, { "docid": "24b115c60fb95050d3c650296e4e1250", "score": "0.6254931", "text": "public function welcome(){\n\t\t\n\t}", "title": "" }, { "docid": "b007be06ffae62bdfca63975721a2731", "score": "0.6240008", "text": "public function index() {\n\t\t$this->view('user/home');\n\t}", "title": "" }, { "docid": "616b2dba0a2f4e0beab2ff1868f72f8e", "score": "0.6237635", "text": "public function index()\n\t{\n\t\t\n\t\t\n\t\t$this->load->view('home');\n\t\t\n\t}", "title": "" }, { "docid": "ff57870a025e85ac7e88349fc8f0b801", "score": "0.62124425", "text": "public function index()\n\t{\n\t\treturn;\n\t\t$this->load->view('home');\n\t\t\n\t}", "title": "" }, { "docid": "044b2ca15cbf2a0ed970334dffc3fb23", "score": "0.62104315", "text": "public function showIndex()\n\t{\n\t\tif( Auth::check() )\n\t\t\treturn view('home');\n\t\telse\n\t\t\treturn view('welcome');\n\t}", "title": "" }, { "docid": "d902761cb2f249905178bb3575fc7c44", "score": "0.6197904", "text": "public function Index()\n {\n $this->redirectToController('Home');\n }", "title": "" } ]
7185244b314212a23583f512a04eaa1e
Unmarshal a property into stdClass.
[ { "docid": "17d5777cb98f17cdde885d22a51d4de7", "score": "0.54603", "text": "protected static function unmarshalStdClass(\n ReflectionProperty $property,\n object $object,\n array $jsonData\n ): void {\n $property->setValue($object, (object)json_decode(json_encode($jsonData)));\n }", "title": "" } ]
[ { "docid": "89609cdf36b647087c1d6c0c3f499cbe", "score": "0.6747413", "text": "protected static function unmarshalProperty(\n ReflectionProperty $property,\n string $propertySubtype,\n string $propertyDateFormat,\n mixed $propertyValue,\n object $object,\n bool $skipConstructor\n ): void {\n $propertyType = (string)$property->getType();\n\n if ($propertyType === 'array' && is_array($propertyValue)) {\n self::unmarshalArray(\n $property,\n $object,\n $propertySubtype,\n $propertyValue,\n );\n } elseif ($propertyType === stdClass::class && is_array($propertyValue)) {\n self::unmarshalStdClass($property, $object, $propertyValue);\n } elseif (is_a($propertyType, Set::class, true) && is_array($propertyValue)) {\n /** @psalm-suppress MixedArgumentTypeCoercion */\n self::unmarshalSet(\n $propertySubtype,\n $propertyValue,\n $property,\n $object\n );\n } elseif (is_a($propertyType, Collection::class, true) && is_array($propertyValue)) {\n /** @psalm-suppress MixedArgumentTypeCoercion */\n self::unmarshalCollection(\n $propertySubtype,\n $propertyValue,\n $property,\n $object\n );\n } elseif (is_a($propertyType, Date::class, true) && is_scalar($propertyValue)) {\n $property->setValue($object, Date::createFromFormat($propertyDateFormat, (string)$propertyValue));\n } elseif (is_a($propertyType, DateTime::class, true) && is_scalar($propertyValue)) {\n $property->setValue($object, DateTime::createFromFormat($propertyDateFormat, (string)$propertyValue));\n } elseif (class_exists($propertyType, true)) {\n $property->setValue(\n $object,\n self::unmarshal(\n json_encode($propertyValue),\n $propertyType,\n $skipConstructor\n )\n );\n } else {\n $property->setValue($object, $propertyValue);\n }\n }", "title": "" }, { "docid": "544f7afdef8b003c375ab9030b14e205", "score": "0.6258575", "text": "public function getProperty() : \\stdClass\n {\n return $this->property;\n }", "title": "" }, { "docid": "148765ffbba4a1875cc447e0009d05d7", "score": "0.5911053", "text": "protected function __getJsonFromValueType(string $property, mixed $value): object\n {\n return is_string($value)\n ? Obj::fromString($value)\n : (object) $value;\n }", "title": "" }, { "docid": "27cd7da1f6a88ba00db7568d26ac8cae", "score": "0.576798", "text": "protected function __getObjectFromValueType(string $property, mixed $value): object\n {\n return is_string($value)\n ? unserialize(\n $value,\n [\n 'allowed_classes' => static::getCastingsAllowedClasses()[$property] ?? false,\n ]\n )\n : (object) $value;\n }", "title": "" }, { "docid": "6ae7f588a4d40b46dfcba0178138e92c", "score": "0.56304455", "text": "public function extract(object $object, string $property);", "title": "" }, { "docid": "c3596d41088613a254dcc468d8d17d60", "score": "0.5548773", "text": "public function __get($property)\n {\n if (is_object($this->_target)) {\n return $this->_target->{$property};\n }\n }", "title": "" }, { "docid": "922ec9450d106ddccdd776e307c3e876", "score": "0.5542251", "text": "abstract protected function extractAutoDetectValue($obj_property);", "title": "" }, { "docid": "58e3bdc6caf863827ae1f1e399254290", "score": "0.54611623", "text": "public function __get($property);", "title": "" }, { "docid": "58e3bdc6caf863827ae1f1e399254290", "score": "0.54611623", "text": "public function __get($property);", "title": "" }, { "docid": "bf01919ec450b0289aaf0d88b4201305", "score": "0.5389907", "text": "public function &jsonData($_property)\n {\n if (!isset($this->_validators[$_property])) {\n throw new UnexpectedValue($_property . ' is no property of $this->_properties');\n }\n if (!isset($this->_properties[$_property])) {\n $this->_properties[$_property] = array();\n } else if (is_string($this->_properties[$_property])) {\n $this->_properties[$_property] = json_decode($this->_properties[$_property], true);\n }\n\n return $this->_properties[$_property];\n }", "title": "" }, { "docid": "fd174898e695cf38444046d95542b28e", "score": "0.5341197", "text": "public static function cast(Property $property, mixed $value): mixed\n {\n if (null === $value) {\n return null;\n }\n\n // handle empty strings as null\n if ($property->null && '' === $value) {\n return null;\n }\n\n // perform decryption, if enabled\n if ($property->encrypted) {\n $value = Crypto::decrypt($value, self::$encryptionKey);\n }\n\n $type = $property->type;\n if (!$type) {\n return $value;\n }\n\n if (self::ENUM == $type) {\n return self::to_enum($value, (string) $property->enum_class);\n }\n\n if (self::DATE == $type) {\n return self::to_date($value, $property->date_format);\n }\n\n if (self::DATETIME == $type) {\n return self::to_datetime($value, $property->date_format);\n }\n\n $m = 'to_'.$property->type;\n\n return self::$m($value);\n }", "title": "" }, { "docid": "5738dcce83f091fc9b0f2f2e1a54bcbb", "score": "0.5308557", "text": "abstract protected function extractPropertyValue($int_type, $obj_property);", "title": "" }, { "docid": "40cf653d31d642fbda75d815198fd7f5", "score": "0.5291199", "text": "public function returnProperty($property)\n {\n $this->parseResponse();\n return $this->$property;\n }", "title": "" }, { "docid": "33c6aac52d10893d99ef07053a23f6e9", "score": "0.52669764", "text": "public function __get($property)\n {\n return array_key_exists($property, $this->_data) ? $this->_data[$property] : null;\n }", "title": "" }, { "docid": "3713038f53107d241433e5b7daca21a2", "score": "0.52638674", "text": "public function toProperty() {\n\t\treturn new Property($this->pm, $this->path, $this->name, $this->value);\n\t}", "title": "" }, { "docid": "7ceb59ba8c4d362d1780b1c74ae972ed", "score": "0.52190644", "text": "public function __get($property)\n\t{\n\t\tif (isset($this->_values[$property]))\n\t\t{\n\t\t\treturn $this->_values[$property];\n\t\t}\n\t}", "title": "" }, { "docid": "ed3e06dfe72ba5df5863c8ed03daf9d4", "score": "0.5217818", "text": "public function getCast( $property )\n {\n $value = !empty($this->properties[$property]) ? $this->properties[$property] : null;\n\n if ( ! empty( $this->cast[$property] ) ) {\n $handle = $this->cast[$property];\n\n if ( $handle == 'int' || $handle == 'integer' ) {\n // Integer\n $value = (int) $value;\n } if ( $handle == 'array' ) {\n // Priority Array\n if ( is_string($value) && tr_is_json($value) ) {\n $value = json_decode( $value, true );\n } elseif ( is_string($value) && is_serialized( $value ) ) {\n $value = unserialize( $value );\n }\n } if ( $handle == 'object' ) {\n // Priority Object\n if ( is_string($value) && tr_is_json($value) ) {\n $value = json_decode( $value );\n } elseif ( is_string($value) && is_serialized( $value ) ) {\n $value = unserialize( $value );\n }\n } elseif ( is_callable($handle) ) {\n // Callback\n $value = call_user_func($this->cast[$property], $value );\n }\n }\n\n return $this->properties[$property] = $value;\n }", "title": "" }, { "docid": "44e6f518ad08272b502b08163bdec029", "score": "0.52081287", "text": "protected function map($property, $value)\n {\n switch ($property) {\n case 'name':\n return ($value instanceof LongName ? $value : new LongName($value));\n case 'address':\n return ($value instanceof Address ? $value : new Address($value));\n case 'email':\n return ($value instanceof EmailAddress ? $value : new EmailAddress($value));\n case 'phone':\n return ($value instanceof PhoneNumber ? $value : new PhoneNumber($value));\n }\n\n return parent::map($property, $value);\n }", "title": "" }, { "docid": "8407afb06860147809e5e886d80f4db0", "score": "0.5204792", "text": "public function convertObject(stdClass $input)\n {\n if ($this->object === null) {\n return $input;\n }\n $properties = get_object_vars($input);\n $output = $this->object;\n foreach ($properties as $key => $value) {\n $output->$key = $value;\n }\n\n return $output;\n }", "title": "" }, { "docid": "058753ccb997bdfa7b523c00fe02c826", "score": "0.51895833", "text": "public function __get(string $property)\n {\n switch ($property) {\n case \"har\":\n $proxy_handle = curl_init();\n $har_url = \"http://{$this->browsermob_url}/proxy/{$this->port}/har\";\n curl_setopt($proxy_handle, CURLOPT_URL, $har_url);\n curl_setopt($proxy_handle, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($proxy_handle);\n $decoded = json_decode($result, true);\n curl_close($proxy_handle);\n return $decoded;\n default:\n return $this->$property;\n }\n }", "title": "" }, { "docid": "145ef27ff240cc40ba16e5e210b0443e", "score": "0.5185065", "text": "public function __get($property)\n\t{\n\t\tif (isset($this->_data[$property]))\n\t\t{\n\t\t\treturn $this->_data[$property];\n\t\t}\n\t}", "title": "" }, { "docid": "79be71626dc4e6d4d6158643a1432067", "score": "0.51726496", "text": "public function __get($property){ }", "title": "" }, { "docid": "f8df3ba941518f7eee93bd6eccd1c87e", "score": "0.51722884", "text": "public function toObject() : \\stdClass\n\t{\n\t\treturn $this->unwrapXMLObject(false);\n\t}", "title": "" }, { "docid": "0270fae057e19c1c222991e6f7f30e0e", "score": "0.5154906", "text": "protected function _decodeObject()\r\n {\r\n $result = new StdClass();\r\n $token = $this->_fetchNextToken();\r\n while($token && $token != self::RBRACE)\r\n {\r\n if($token != self::SCALAR || ! is_string($this->_currentValue))\r\n {\r\n Fynd_Object::throwException(\"Fynd_JSON_Exception\", 'Missing key in object encoding: ' . $this->_json);\r\n }\r\n $key = $this->_currentValue;\r\n $token = $this->_fetchNextToken();\r\n if($token != self::COLON)\r\n {\r\n Fynd_Object::throwException(\"Fynd_JSON_Exception\", 'Missing \":\" in object encoding: ' . $this->_json);\r\n }\r\n $token = $this->_fetchNextToken();\r\n $result->$key = $this->decode();\r\n $token = $this->_currentToken;\r\n if($token == self::RBRACE)\r\n {\r\n break;\r\n }\r\n if($token != self::COMMA)\r\n {\r\n Fynd_Object::throwException(\"Fynd_JSON_Exception\", 'Missing \",\" in object encoding: ' . $this->_json);\r\n }\r\n $token = $this->_fetchNextToken();\r\n }\r\n $this->_fetchNextToken();\r\n return $result;\r\n }", "title": "" }, { "docid": "b151702f3f50e7f2f26d2ef17e2b7e1a", "score": "0.51476854", "text": "public function __get($property)\n {\n $value = null;\n if (isset($this->data[$property])) {\n $value = $this->data[$property];\n }\n\n return $value;\n }", "title": "" }, { "docid": "3678d9a6b8f753ebafbf62294906633f", "score": "0.5145407", "text": "public function __get($property): mixed\n {\n return $this->getProperty($property);\n }", "title": "" }, { "docid": "fc7f861b158bfa2917ab350d96291244", "score": "0.5138976", "text": "public function __get($property) {\n return $this->{$property};\n }", "title": "" }, { "docid": "765592796db1dc6343cd79de90dd026e", "score": "0.5128778", "text": "protected function transformToObject($propertyValue, $targetType, $propertyName) {\n\t\tif (isset($this->objectConverters[$targetType])) {\n\t\t\t$conversionResult = $this->objectConverters[$targetType]->convertFrom($propertyValue);\n\t\t\tif ($conversionResult instanceof \\F3\\FLOW3\\Error\\Error) {\n\t\t\t\t$this->mappingResults->addError($conversionResult, $propertyName);\n\t\t\t\treturn NULL;\n\t\t\t} elseif (is_object($conversionResult) || $conversionResult === NULL) {\n\t\t\t\treturn $conversionResult;\n\t\t\t}\n\t\t}\n\t\tif (is_string($propertyValue) && preg_match(self::PATTERN_MATCH_UUID, $propertyValue) === 1) {\n\t\t\t$object = $this->persistenceManager->getObjectByIdentifier($propertyValue);\n\t\t\tif ($object === FALSE) {\n\t\t\t\t$this->mappingResults->addError($this->objectManager->create('F3\\FLOW3\\Error\\Error', 'Querying the repository for the specified object with UUID ' . $propertyValue . ' was not successful.' , 1249379517), $propertyName);\n\t\t\t}\n\t\t} elseif (is_array($propertyValue)) {\n\t\t\tif (isset($propertyValue['__identity'])) {\n\t\t\t\t$existingObject = (is_array($propertyValue['__identity'])) ? $this->findObjectByIdentityProperties($propertyValue['__identity'], $targetType) : $this->persistenceManager->getObjectByIdentifier($propertyValue['__identity']);\n\t\t\t\tif ($existingObject === NULL) {\n\t\t\t\t\tthrow new \\F3\\FLOW3\\Property\\Exception\\TargetNotFoundException('Querying the repository for the specified object was not successful.', 1237305720);\n\t\t\t\t}\n\t\t\t\tif ($targetType === NULL) {\n\t\t\t\t\t$targetType = get_class($existingObject);\n\t\t\t\t}\n\n\t\t\t\tunset($propertyValue['__identity']);\n\t\t\t\tif (count($propertyValue) === 0) {\n\t\t\t\t\t$object = $existingObject;\n\t\t\t\t} elseif ($existingObject !== NULL) {\n\t\t\t\t\tif ($this->reflectionService->isClassTaggedWith($targetType, 'valueobject')) {\n\t\t\t\t\t\t$object = $this->buildObject($propertyValue, $targetType);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$newObject = clone $existingObject;\n\t\t\t\t\t\tif ($this->map(array_keys($propertyValue), $propertyValue, $newObject)) {\n\t\t\t\t\t\t\t$object = $newObject;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$newObject = $this->buildObject($propertyValue, $targetType);\n\t\t\t\tif (count($propertyValue)) {\n\t\t\t\t\t$this->map(array_keys($propertyValue), $propertyValue, $newObject);\n\t\t\t\t\treturn $newObject;\n\t\t\t\t} else {\n\t\t\t\t\treturn $newObject;\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new \\InvalidArgumentException('transformToObject() accepts only uuids as strings and arrays with properties, ' . gettype($propertyValue) . ' given.', 1251814355);\n\t\t}\n\n\t\treturn $object;\n\t}", "title": "" }, { "docid": "c22c5eea9c4f3fe6ea1ed69de8856165", "score": "0.51248676", "text": "public function __get($property)\n {\n //only pull from data\n if (array_key_exists($property, $this->data)) {\n return $this->data[$property];\n }\n\n return null;\n }", "title": "" }, { "docid": "41cb588e9d0ec6170b2e919f93919cc0", "score": "0.5095996", "text": "public function __get($property)\n {\n \treturn $this->$property;\n }", "title": "" }, { "docid": "41cb588e9d0ec6170b2e919f93919cc0", "score": "0.5095996", "text": "public function __get($property)\n {\n \treturn $this->$property;\n }", "title": "" }, { "docid": "41cb588e9d0ec6170b2e919f93919cc0", "score": "0.5095996", "text": "public function __get($property)\n {\n \treturn $this->$property;\n }", "title": "" }, { "docid": "afb5a9fa45c917b185e9d872f51adc9d", "score": "0.50839466", "text": "public function __get($property) {\n return $this->$property;\n }", "title": "" }, { "docid": "bcfbc31144dd206fdf1d4b02a0d7ddb5", "score": "0.50770783", "text": "public function __get($property)\r\n {\r\n if (property_exists($this, $property)) {\r\n //UTF-8 is recommended for correct JSON serialization\r\n $value = $this->$property;\r\n if (is_string($value) && mb_detect_encoding($value, \"UTF-8\", TRUE) != \"UTF-8\") {\r\n return utf8_encode($value);\r\n }\r\n else {\r\n return $value;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "33da837ebc0f379c2af0cce2523aa419", "score": "0.5073493", "text": "public function hydrate(ReflectionProperty $property, $value): DataTransferObject\n {\n $dtoType = $property->getType()->getName();\n $dto = $this->createDto($dtoType);\n return $this->hydrator->hydrate($dto, $value);\n }", "title": "" }, { "docid": "6e365552616ae16614993c7360c16ffe", "score": "0.5063167", "text": "public function __get( $property ) {\n\n if ( isset( $this->$property ) ) {\n return $this->$property;\n }\n\n }", "title": "" }, { "docid": "c4897c590348cd6c0e041e072c5e6c1b", "score": "0.505946", "text": "protected function hydrateNode($property, $value)\n {\n if (is_array($value) || $value instanceof \\Traversable) {\n $value = new static(\n $value,\n $this->id.self::PATH_TOKEN.$property,\n $property\n );\n }\n return $value;\n }", "title": "" }, { "docid": "3ca4c135c55e83e258a34d73aaeac92a", "score": "0.5043982", "text": "protected function extractProperty($object, $property)\n {\n try {\n $objReflection = new ReflectionClass($object);\n } catch (ReflectionException $e) {\n return null;\n }\n\n $propReflection = $objReflection->getProperty($property);\n $propReflection->setAccessible(true);\n\n return $propReflection->getValue($object);\n }", "title": "" }, { "docid": "8e3b1c35f4e9d665de3cb00eeb3a2ea6", "score": "0.5036725", "text": "public final static function cast(PropertyAnnotation $propertyAnnotation) {\n return $propertyAnnotation;\n }", "title": "" }, { "docid": "40f015f9b3e92c40cd8aed2bcdce6356", "score": "0.50298285", "text": "public function __get($property)\n {\n }", "title": "" }, { "docid": "40f015f9b3e92c40cd8aed2bcdce6356", "score": "0.5029632", "text": "public function __get($property)\n {\n }", "title": "" }, { "docid": "079eeb934e2786af8e3c931162f03449", "score": "0.5014781", "text": "public function __get($property)\n {\n return $this->$property;\n }", "title": "" }, { "docid": "079eeb934e2786af8e3c931162f03449", "score": "0.5014781", "text": "public function __get($property)\n {\n return $this->$property;\n }", "title": "" }, { "docid": "ed3fa0d8e5149e1a88965dcbf8eee8d8", "score": "0.50079334", "text": "public function testSerialization()\n {\n $jsonString = '{\"amount\":15,\"vatAmount\":10,\"vatRate\":50}';\n\n $jsonObj = json_decode($jsonString, true);\n\n $amountProcessor = new AmountUnserializer();\n\n $amount = $amountProcessor->unserializeProperty(new Processor(), $jsonObj);\n\n /**\n * @var Amount $amount\n */\n $this->assertEquals(15, $amount->getAmount());\n $this->assertEquals(10, $amount->getVatAmount());\n $this->assertEquals(50, $amount->getVatRate());\n\n }", "title": "" }, { "docid": "4194e5a0331f873e893f28f0ade10552", "score": "0.5002831", "text": "public function __get($property)\n\t{\n\t\tif (!property_exists($this->data, $property)) {\n\t\t\tthrow new RuntimeException(\n\t\t\t\t'Cannot normalize \"%s\", attempt to access non-existent property \"%s\"',\n\t\t\t\tget_class($this->data),\n\t\t\t\t$property\n\t\t\t);\n\t\t}\n\n\t\tif (!$this->reflection) {\n\t\t\t$this->reflection = new ReflectionObject($this->data);\n\t\t}\n\n\t\t$property = $this->reflection->getProperty($property);\n\n\t\tif (!$property->isPublic()) {\n\t\t\t$property->setAccessible(TRUE);\n\t\t}\n\n\t\treturn static::prepare($property->getValue($this->data));\n\t}", "title": "" }, { "docid": "338f72ec112a62a87ad4c55c356b5f14", "score": "0.49983895", "text": "private function parseObject($data)\n {\n $result = new StdClass();\n\n foreach ($data as $k => $v) {\n $properties = explode('.', $k);\n\n $tmp = &$result;\n\n foreach ($properties as $property) {\n if (!property_exists($tmp, $property)) {\n $tmp->$property = new StdClass();\n }\n\n $tmp = &$tmp->$property;\n }\n\n $tmp = $v;\n }\n\n return $result;\n }", "title": "" }, { "docid": "469435b36fa6b8ba74f4a639da6d9eb4", "score": "0.4994158", "text": "public function retrieve_properties() {\n global $conf;\n\t\t\t\n if (!$this->_loaded) {\n $metavalue = $this->get_metadata_value();\n\n $keys = array_merge(array_keys($this->_metatype),array_keys($metavalue));\n $keys = array_unique($keys);\n\n $param = null;\n foreach ($keys as $key) {\n if (isset($this->_metatype[$key])) {\n $class = $this->_metatype[$key][0];\n\n if($class && class_exists('property_'.$class)){\n $class = 'property_'.$class;\n } else {\n if($class != '') {\n $this->property[$key] = new property_no_class($key,$param);\n }\n $class = 'property';\n }\n\n $param = $this->_metatype[$key];\n array_shift($param);\n } else {\n $class = 'property_undefined';\n $param = null;\n }\n\n $this->property[$key] = new $class($key,$param);\n $this->property[$key]->initialize($metavalue[$key]);\n }\n\n $this->_loaded = true;\n }\n }", "title": "" }, { "docid": "335fecdab6101360878cbfa0bd84bdfd", "score": "0.49910212", "text": "public function __get($property) {\n\t\tswitch($property) {\n\t\t\tcase 'points':\n\t\t\t\treturn $this->quiz->points;\n\n\t\t\tcase 'quiz':\n\t\t\t\treturn $this->quiz;\n\n\t\t\tdefault:\n\t\t\t\treturn parent::__get($property);\n\t\t}\n\t}", "title": "" }, { "docid": "02a84bff302e9a0e5f82240315aea765", "score": "0.4982787", "text": "public function __get($property) \r\n\t{\r\n\t if (property_exists($this, $property)) \r\n\t {\r\n\t\t return $this->$property;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7825d6905495cff943894e9ba77c3115", "score": "0.49803287", "text": "public function __get($property)\n {\n return $this->entity->{$property};\n }", "title": "" }, { "docid": "e7c064506b4dc720eb18f73184095b4a", "score": "0.49642128", "text": "public function __get($property)\n {\n return $this->$property;\n }", "title": "" }, { "docid": "b5b1081a3cd2c81ca0a3e5329ccd1482", "score": "0.4963021", "text": "public static function get($property) {\n\t\t\tparent::init();\n return self::$$property;\n }", "title": "" }, { "docid": "3a570a336eb5f66368fd3c939800a0c8", "score": "0.49625376", "text": "public function __get($property){\n if ($this->container->{$property}) //se verifica si la propiedad existe\n return $this->container->{$property}; //se retorna el objeto\n }", "title": "" }, { "docid": "50159a9b589bc89fa3948d15e338435e", "score": "0.49611685", "text": "public function __get($property)\n {\n if (array_key_exists($property, get_object_vars($this)) || $this->_allowDynamicAttributes) {\n return $this->$property;\n } else {\n if(array_key_exists($property, $this->_relationships)) {\n return $this->getRelationship($property);\n } else {\n throw new Exception('Requested property ' . $property . ' does not exist, could not retrieve');\n }\n }\n }", "title": "" }, { "docid": "6be0c2595c9dadf946749731d1dcd2d1", "score": "0.495634", "text": "protected function map($property, $value)\n {\n switch ($property) {\n case 'name':\n return ($value instanceof Name ? $value : new Name($value));\n case 'address':\n return ($value instanceof Address ? $value : new Address($value));\n }\n\n return parent::map($property, $value);\n }", "title": "" }, { "docid": "40f2df55665002afa8cb8bcec3003b6c", "score": "0.4954219", "text": "public function __get($property){\n\t\t/*$trace = debug_backtrace();\n\t\ttrigger_error(\n\t\t\t'Undefined property via __get(): ' . $name .\n\t\t\t' in ' . $trace[0]['file'] .\n\t\t\t' on line ' . $trace[0]['line'],\n\t\t\tE_USER_NOTICE);\n\t\treturn null;*/\n\t\treturn $this->$property;\n\t}", "title": "" }, { "docid": "44faad5f2671dc6d293208ed6395b8a2", "score": "0.49539286", "text": "public function __get($property) {\n if (property_exists($this, $property)) {\n return $this->$property;\n }\n }", "title": "" }, { "docid": "1537c03f2b1ad376bc2e169d48765f0e", "score": "0.49480662", "text": "public function __get($property)\n\t{\n\t\treturn $this->$property;\n\t}", "title": "" }, { "docid": "8a9d144336c95bd43115caa67b726f9e", "score": "0.4929572", "text": "public static function unmarshal(string $data, string|object $objectOrClass, bool $skipConstructor = false): object\n {\n if ($objectOrClass === stdClass::class) {\n /** @var stdClass */\n return json_decode($data);\n }\n if (is_string($objectOrClass)) {\n $object = self::getObjectFromClassString($objectOrClass, $skipConstructor);\n } else {\n $object = $objectOrClass;\n }\n $className = $object::class;\n /** @var array $jsonData */\n $jsonData = json_decode($data, true, flags: JSON_THROW_ON_ERROR);\n $paramInfo = self::getClassParamInfo($className);\n\n $classInfo = new ReflectionClass($className);\n foreach ($classInfo->getProperties() as $property) {\n $newPropertyName = $property->getName();\n /** @var string $propertyName */\n $propertyName = $paramInfo[$newPropertyName]['name'] ?? $newPropertyName;\n if (!array_key_exists($propertyName, $jsonData)) {\n continue;\n }\n /** @var scalar|array $propertyValue */\n $propertyValue = $jsonData[$propertyName];\n self::unmarshalProperty(\n $property,\n (string)$paramInfo[$newPropertyName]['type'],\n (string)$paramInfo[$newPropertyName]['dateFormat'],\n $propertyValue,\n $object,\n $skipConstructor\n );\n }\n\n return $object;\n }", "title": "" }, { "docid": "29c788a3ae9639a222f754ec786fbd99", "score": "0.4924506", "text": "public function __get($property) {\n if (property_exists($this, $property)) {\n return $this->$property;\n }\n }", "title": "" }, { "docid": "29c788a3ae9639a222f754ec786fbd99", "score": "0.4924506", "text": "public function __get($property) {\n if (property_exists($this, $property)) {\n return $this->$property;\n }\n }", "title": "" }, { "docid": "29c788a3ae9639a222f754ec786fbd99", "score": "0.4924506", "text": "public function __get($property) {\n if (property_exists($this, $property)) {\n return $this->$property;\n }\n }", "title": "" }, { "docid": "8a6ef5250b4a71407d48091f3e17d820", "score": "0.4914752", "text": "protected function map( $property, $v ){\n\n switch( $property ){\n case 'name':\n return ($v instanceof Elements\\Name) ? $v : new Elements\\Name( $v );\n case 'dob':\n return ($v instanceof Elements\\Dob) ? $v : new Elements\\Dob( $v );\n }\n\n // else...\n return parent::map( $property, $v );\n\n }", "title": "" }, { "docid": "48f0e4b3d300a487c7f7665a6645c6e5", "score": "0.49146053", "text": "public function __get( $property )\n\t{\n\t\tif ( property_exists( $this, $property ) )\n\t\t\treturn $this->$property;\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "cedab80a450fe52dd4a191158c0dba4e", "score": "0.4907942", "text": "private function _getPropertyValue(DataBaseObject $object, string $property){\n\n $reflectionObject = new ReflectionObject($object);\n\n try {\n\n $reflectionProperty = $reflectionObject->getProperty($property);\n\n } catch (Throwable $e) {\n\n $reflectionProperty = $reflectionObject->getParentClass()->getProperty($property);\n }\n\n $reflectionProperty->setAccessible(true);\n\n return $reflectionProperty->getValue($object);\n }", "title": "" }, { "docid": "7cf9f4eeb0b273a9f449d7250a669b11", "score": "0.49072134", "text": "public static function getPropertyValue($obj, $property)\n {\n $rc = new \\ReflectionClass(get_class($obj));\n $p = $rc->getProperty($property);\n $p->setAccessible(true);\n\n return $p->getValue($obj);\n }", "title": "" }, { "docid": "daae1f383f510f7b3836e164490057c3", "score": "0.4901793", "text": "public static function getPrivateProperty($obj, $property)\n {\n $refProperty = self::getAccessibleRefProperty($obj, $property);\n\n return is_string($obj) ? $refProperty->getValue() : $refProperty->getValue($obj);\n }", "title": "" }, { "docid": "441be083ac9d9ee7f7be3177e54f3971", "score": "0.48856297", "text": "private function getProperty($object, string $property) {\n $reflection = new \\ReflectionProperty($object, $property);\n $reflection->setAccessible(true);\n $value = $reflection->getValue($object);\n $reflection->setAccessible(false);\n\n return $value;\n }", "title": "" }, { "docid": "ffa66dd36bf99c661a3cb7496bc5f36e", "score": "0.4885007", "text": "final public function __get($property) {\n\t\tif (strlen($property) > 0) {\n\t\t\tif ($property[0] !== \"_\") {\n\t\t\t\treturn $this -> $property;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "83dfb0a4b49854198ba8426c6e9ec07c", "score": "0.4882181", "text": "public function deserializeField()\n {\n $this->checkConfiguration();\n $json = $this->owner->{$this->dataField};\n if (!is_string($json)) {\n return;\n }\n $value = json_decode($json);\n\n $this->owner->{$this->dataField} = $value;\n }", "title": "" }, { "docid": "27c7df517cbc7e23090fe6afbca31ead", "score": "0.48767886", "text": "private function mappingFromProp(\\ReflectionProperty $prop)\n {\n $comment = $prop->getDocComment();\n preg_match('/@var\\s+(.*)[\\s|\\n]/', $comment, $matches);\n\n if (!isset($matches[1])) {\n return;\n }\n\n $annotation = $matches[1];\n $type = $annotation;\n\n if (ctype_upper($type[0]) && !class_exists($type)) {\n $ns = $prop->getDeclaringClass()->getNamespaceName();\n $type = $ns . '\\\\' . $type;\n }\n\n return $this->of($type)->optional();\n }", "title": "" }, { "docid": "ef116d9a3393dbe121239ed39e3d01e8", "score": "0.4867815", "text": "public function SetPropertyValue($property, $value) {\n if (property_exists($this, $property)) { // <- For internal properties\n if (is_array($value)) {\n $this->$property = $value[0];\n } else {\n $this->$property = $value;\n }\n } elseif (isset($this->fielddefs[$property])) { // <- For field definitions\n $this->$property = (array) $value;\n } else { // Anything else.\n $this->$property = $value;\n }\n }", "title": "" }, { "docid": "21b3e86334b2626781f3cd2be58272a0", "score": "0.4843304", "text": "public function asObject(): stdClass\n {\n return (new Transformer($this, $this->getFields()))->asObject();\n }", "title": "" }, { "docid": "2ffac5ecc488360cb4c2a732053f0485", "score": "0.48271617", "text": "public function get_property ($property)\n {\n if ( array_key_exists($property,$this->properties) ) // check if the property do exist\n return $this->properties[$property]; // get its value\n else\n return null; // else return null\n }", "title": "" }, { "docid": "cd9871f52a51686718e9f4acb32562e0", "score": "0.48244828", "text": "public function get( $property ){\n\t\tif( isset( $this->$property ) ){\n\t\t\treturn $this->$property;\n\t\t}\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "cc6b56b38c331dfe4b4096cddef4d160", "score": "0.48242328", "text": "public function __get($property) {\n switch($property) {\n\t case 'email':\n\t \tif($this->email === null) {\n\t \t\t$this->email = new Email($this->assignment->site);\n\t\t }\n\n\t\t return $this->email;\n\n\t case 'due':\n\t \treturn $this->due;\n\n default:\n $trace = debug_backtrace();\n trigger_error(\n 'Undefined property ' . $property .\n ' in ' . $trace[0]['file'] .\n ' on line ' . $trace[0]['line'],\n E_USER_NOTICE);\n return null;\n }\n }", "title": "" }, { "docid": "81435f6b23d9191a26149c1bfe17e895", "score": "0.48142645", "text": "public function __get($property)\n {\n if (in_array($property, $this->_properties)) {\n $prop = '_' . $property;\n return $this->$prop;\n }\n\n return null;\n }", "title": "" }, { "docid": "a5035dcd3f307ddfa3a32497a101a256", "score": "0.48096317", "text": "public function __get($prop) {\n\t\treturn $this->wrapper->{$prop};\n\t}", "title": "" }, { "docid": "d2741d555777dba97d5a963e9d83d683", "score": "0.48080322", "text": "private function &readProperty(&$object, $property)\n {\n // Use an array instead of an object since performance is\n // very crucial here\n $result = array(\n self::VALUE => null,\n self::IS_REF => false,\n );\n\n if (!is_object($object)) {\n throw new NoSuchPropertyException(sprintf('Cannot read property \"%s\" from an array. Maybe you intended to write the property path as \"[%s]\" instead.', $property, $property));\n }\n\n $access = $this->getReadAccessInfo($object, $property);\n\n if (self::ACCESS_TYPE_PROPERTY === $access[self::ACCESS_TYPE]) {\n if ($access[self::ACCESS_REF]) {\n $result[self::VALUE] = &$object->{$access[self::ACCESS_NAME]};\n $result[self::IS_REF] = true;\n } else {\n $result[self::VALUE] = $object->{$access[self::ACCESS_NAME]};\n }\n } elseif (!$access[self::ACCESS_HAS_PROPERTY] && property_exists($object, $property)) {\n // Needed to support \\stdClass instances. We need to explicitly\n // exclude $access[self::ACCESS_HAS_PROPERTY], otherwise if\n // a *protected* property was found on the class, property_exists()\n // returns true, consequently the following line will result in a\n // fatal error.\n\n $result[self::VALUE] = &$object->$property;\n $result[self::IS_REF] = true;\n } else {\n throw new NoSuchPropertyException($access[self::ACCESS_NAME]);\n }\n\n // Objects are always passed around by reference\n if (is_object($result[self::VALUE])) {\n $result[self::IS_REF] = true;\n }\n\n return $result;\n }", "title": "" }, { "docid": "270457b851ba2156644db849567bbfa0", "score": "0.48050305", "text": "function __get($property)\n {\n if($property == \"id\")\n {\n return $this->id;\n }\n else\n {\n return call_user_func_array(array($this, \"getAttribute\"), array($property));\n }\n }", "title": "" }, { "docid": "33fcd2e00002feb2cb7a1224b4ae9487", "score": "0.47994417", "text": "public function __get($property)\n {\n // Try to call the property setter methods.\n if (method_exists($this, $method = 'get' . studly_case($property))) {\n return $this->$method($this);\n }\n\n return $this->properties[$property];\n }", "title": "" }, { "docid": "46dfd900c9fee695280c1fe9e1f1f6f4", "score": "0.47907707", "text": "public function set_properties_by_api_object( \\stdClass $object ) {\n\t\tforeach( get_object_vars( $object) AS $property => $value ) {\n\t\t\t$this->$property = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "eae1153a3b282748b67831b1ada6a8b4", "score": "0.47906637", "text": "public function get($property);", "title": "" }, { "docid": "eae1153a3b282748b67831b1ada6a8b4", "score": "0.47906637", "text": "public function get($property);", "title": "" }, { "docid": "afde312d7dc0d675a3d8b42ba1a4176f", "score": "0.4784003", "text": "private function _getTypeFromObjectProperty(DataBaseObject $object, string $property){\n\n // Try to find a strongly defined type for the requested column on the provided object instance.\n // This will have preference over the type that is automatically detected from the table value.\n $typesSetup = $this->_getPropertyValue($object, '_types');\n\n if(isset($typesSetup[$property])){\n\n return $this->_validateAndFormatTypeArray($typesSetup[$property], $property);\n }\n\n // If types definition are mandatory, we will check here that all the object properties have a defined data type\n if(count($typesSetup) > 0 && $this->_getPropertyValue($object, '_isTypingMandatory')){\n\n throw new UnexpectedValueException($property.' has no defined type but typing is mandatory. Define a type or disable this restriction by setting _isTypingMandatory = false');\n }\n\n try {\n\n return $this->_getTypeFromValue($object->{$property});\n\n } catch (Throwable $e) {\n\n throw new UnexpectedValueException('Could not detect property '.$property.' type: '.$e->getMessage());\n }\n }", "title": "" }, { "docid": "8472b5a5f840156a176c59c0f52c2f43", "score": "0.47824168", "text": "public function __get($property)\n {\n return $this->query->{$property};\n }", "title": "" }, { "docid": "00aa2c90538b883c36bd29e50544b9a6", "score": "0.47685727", "text": "public function __get($prop) {\n return $this->offsetGet($prop);\n }", "title": "" }, { "docid": "5fed868efeaae78c0e27f9bc6e4e17e0", "score": "0.47636628", "text": "public function resolvePropertyAnnotation(object $instance)\n {\n return $this->getAnnotationResolver()->resolveProperty($instance);\n }", "title": "" }, { "docid": "3394d7e5241f1bf6139ce1dff6467683", "score": "0.47614992", "text": "public function mapResultToPropertyValue(Tx_Extbase_DomainObject_DomainObjectInterface $parentObject, $propertyName, $result) {\n\t\tif ($result instanceof Tx_Extbase_Persistence_LoadingStrategyInterface) {\n\t\t\t$propertyValue = $result;\n\t\t} else {\n\t\t\t$propertyMetaData = $this->reflectionService->getClassSchema(get_class($parentObject))->getProperty($propertyName);\n\t\t\tif (in_array($propertyMetaData['type'], array('array', 'ArrayObject', 'SplObjectStorage', 'Tx_Extbase_Persistence_ObjectStorage'), TRUE)) {\n\t\t\t\t$objects = array();\n\t\t\t\tforeach ($result as $value) {\n\t\t\t\t\t$objects[] = $value;\n\t\t\t\t}\n\t\t\t\tif ($propertyMetaData['type'] === 'ArrayObject') {\n\t\t\t\t\t$propertyValue = new ArrayObject($objects);\n\t\t\t\t} elseif (in_array($propertyMetaData['type'], array('Tx_Extbase_Persistence_ObjectStorage'), TRUE)) {\n\t\t\t\t\t$propertyValue = new Tx_Extbase_Persistence_ObjectStorage();\n\t\t\t\t\tforeach ($objects as $object) {\n\t\t\t\t\t\t$propertyValue->attach($object);\n\t\t\t\t\t}\n\t\t\t\t\t$propertyValue->_memorizeCleanState();\n\t\t\t\t} else {\n\t\t\t\t\t$propertyValue = $objects;\n\t\t\t\t}\n\t\t\t} elseif (strpbrk($propertyMetaData['type'], '_\\\\') !== FALSE) {\n\t\t\t\tif (is_object($result) && $result instanceof Tx_Extbase_Persistence_QueryResultInterface) {\n\t\t\t\t\t$propertyValue = $result->getFirst();\n\t\t\t\t} else {\n\t\t\t\t\t$propertyValue = $result;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $propertyValue;\n\t}", "title": "" }, { "docid": "22328245fa1058caf2cbd1b7c907d160", "score": "0.47611627", "text": "public function __get($prop)\r\n {\r\n return $this->$prop;\r\n }", "title": "" }, { "docid": "17f52bbfcedf4df850c606eab3f38521", "score": "0.47554234", "text": "public function __get( $property )\n\t{\n\t\tif ( property_exists( $this, $property ) )\n\t\t{\n\t\t\treturn $this->{$property};\n\t\t}\n\t\telseif ( property_exists( $this->_library, $property ) )\n\t\t{\n\t\t\treturn $this->_library->{$property};\n\t\t}\n\n\t\treturn $this->_library->__get( $property );\n\t}", "title": "" }, { "docid": "a114ea99dbb209fa653206bd5459ca58", "score": "0.47527665", "text": "protected function _initScalarProperties($apiResponse, array $properties)\n {\n foreach ($properties as $property) {\n if (is_array($property)) {\n $classPropertyName = current($property);\n $value = $apiResponse->{key($property)};\n } else {\n $classPropertyName = $this->_underToCamel(str_replace('-', '_', $property));\n $value = $apiResponse->$property;\n }\n\n $reflectionProperty = new \\ReflectionProperty($this, $classPropertyName);\n $docBlock = $reflectionProperty->getDocComment();\n $propertyType = preg_replace('/^.+ @var ([a-z\\\\\\]+) .+$/i', '\\1', $docBlock);\n\n if ('string' == $propertyType) {\n $value = (string)$value;\n } else if ('integer' == $propertyType) {\n $value = (int)$value;\n } else if ('boolean' == $propertyType) {\n $value = in_array((string)$value, ['true', 'on', 'enabled']);\n } elseif (class_exists($propertyType)) {\n $value = new $propertyType($value);\n } else {\n throw new \\Exception(\"Unknown property type '$propertyType'.\");\n }\n\n $this->$classPropertyName = $value;\n }\n }", "title": "" }, { "docid": "ce39a4957da025391bbf44bf93f3c698", "score": "0.47409955", "text": "protected function force_get_property( $instance, $property ) {\n\t\t$reflection_property = new \\ReflectionProperty( $instance, $property );\n\t\t$reflection_property->setAccessible( true );\n\n\t\treturn $reflection_property->getValue( $instance );\n\t}", "title": "" }, { "docid": "3aebeeb3ce034a8ea6701ad9889e26a0", "score": "0.47345185", "text": "function __get($property_name)\n\t{\n\t\t// When the `content` property is not generated yet do it, otherwise return the old value\n\t\tif ($property_name == 'content')\n\t\t\tif ( is_null($this->content) )\n\t\t\t\treturn ( $this->content = self::process_content($this->raw_content, $this->processors_as_list, $this) );\n\t\t\telse\n\t\t\t\treturn $this->content;\n\t\t\n\t\t// Make all private properties readable. Yes, it's strange and sounds stupid but it is what\n\t\t// we actually want here. All private properties contain stuff the user is interested in but\n\t\t// should not change.\n\t\tif ( property_exists($this, $property_name) )\n\t\t\treturn $this->$property_name;\n\t\t\n\t\t// If the user wants a header in a special format parse or convert it.\n\t\tif ( preg_match('/^(?<name>.+)_as_(?<format>list|time|array)$/i', $property_name, &$matches) )\n\t\t{\n\t\t\tif ($matches['format'] == 'list')\n\t\t\t\treturn self::parse_list_header(@$this->headers[$matches['name']]);\n\t\t\tif ($matches['format'] == 'time')\n\t\t\t\treturn self::parse_time_header(@$this->headers[$matches['name']]);\n\t\t\tif ($matches['format'] == 'array')\n\t\t\t\tif ( is_array(@$this->headers[$matches['name']]) )\n\t\t\t\t\treturn @$this->headers[$matches['name']];\n\t\t\t\telse\n\t\t\t\t\treturn array(@$this->headers[$matches['name']]);\n\t\t}\n\t\t\n\t\t// Every header should be available as a property. Therefore we try to return a header with\n\t\t// the name of the requested property.\n\t\treturn @$this->headers[$property_name];\n\t}", "title": "" }, { "docid": "25def334f9d5987a45703e15598fd31c", "score": "0.47339153", "text": "private function convertProperty($name)\n {\n if (isset($this->_schema[$name]['null']) && $this->_schema[$name]['null'] && $this->$name === null) {\n return;\n }\n\n switch ($this->_schema[$name]['type']) {\n case Object::TYPE_ID:\n if (!($this->$name instanceof MongoId) && $this->$name !== null) {\n $this->$name = new MongoId($this->$name);\n }\n break;\n case Object::TYPE_BOOL:\n if (!is_bool($this->$name)) {\n $this->$name = (bool) $this->$name;\n }\n break;\n case Object::TYPE_INT:\n if (!is_int($this->$name)) {\n $this->$name = (int) $this->$name;\n }\n break;\n case Object::TYPE_DOUBLE:\n if (!is_double($this->$name)) {\n $this->$name = (double) $this->$name;\n }\n break;\n case Object::TYPE_STRING:\n if (!is_string($this->$name)) {\n $this->$name = (string) $this->$name;\n }\n break;\n case Object::TYPE_ARRAY:\n if (!is_array($this->$name)) {\n $this->$name = [];\n }\n break;\n case Object::TYPE_DATE:\n if (!($this->$name instanceof MongoDate)) {\n $this->$name = new MongoDate($this->$name);\n }\n break;\n case Object::TYPE_REFERENCE:\n if (!MongoDBRef::isRef($this->$name)) {\n $this->$name = null;\n }\n break;\n default:\n throw new Exception(\"Property '{$name}' type is unknown ({$this->_schema[$name]['type']})\");\n }\n return null;\n }", "title": "" }, { "docid": "1f0fc5259ebfd9e70e13f48d3d9780f3", "score": "0.47318658", "text": "public function __get($property)\n {\n // ?: Devuelve la propiedad del objeto container solicitada ...\n if ($this->container->get($property)) {\n return $this->container->get($property);\n }\n }", "title": "" }, { "docid": "41e374a0ef2e699ea72447faa8a977a8", "score": "0.47291824", "text": "protected function getBeanProperties(OODBBean $bean, DomainObject $DomainObject)\n {\n $data = $bean->getProperties();\n foreach($data as $name => $value) {\n // this is an array\n if (strpos($name, '_php_') === 0) {\n // do not overwrite real (exposed) property.\n // @important this allows arbitrary data types per property. \n // saving should handle property type strictness.\n if ($value && !isset($data[substr($name, 5)])) {\n $value = unserialize($value);\n }\n unset($data[$name]); // remove this as it's soley storage\n $name = str_replace('_php_', '', $name); // remove flag\n\n }\n // this may be named differently in DomainObject and auto converted by redBean on save\n // @todo this is dangerous. Fix redBean or impose restriction programatically on DomainObject property names\n // will overrite isset($DomainObject->$name)\n if (strpos($name, '____') !== false) {\n // copy data to other possible names.\n $_name = str_replace(' ', '', ucwords(str_replace('____', ' ', $name)));\n if (!isset($data[$_name]) && $DomainObject->property_exists($_name)) {\n $data[$_name] = $value;\n unset($data[$name]);\n } else {\n $_name[0] = strtolower($_name[0]);\n if (!isset($data[$_name]) && $DomainObject->property_exists($_name)) {\n $data[$_name] = $value;\n unset($data[$name]);\n }\n }\n }\n }\n return $data;\n }", "title": "" }, { "docid": "046f28f65a11d1fbeff5a82a2f4f8a8f", "score": "0.47131395", "text": "public function __set($property, $value){ }", "title": "" }, { "docid": "b49cd78e43e7b89d7c37085f88883927", "score": "0.4706088", "text": "public function &__get($property) {\n\t\treturn $this->get($property);\n\t}", "title": "" }, { "docid": "bf7e254ec19ddbe343c19cda2fedf613", "score": "0.46958202", "text": "public function __get($property) {\n\t\tswitch($property) {\n\t\t\tcase 'grading':\n\t\t\t\treturn $this->grading;\n\n\t\t\tcase 'user':\n\t\t\t\treturn $this->user;\n\n\t\t\tdefault:\n\t\t\t\t$trace = debug_backtrace();\n\t\t\t\ttrigger_error(\n\t\t\t\t\t'Undefined property ' . $property .\n\t\t\t\t\t' in ' . $trace[0]['file'] .\n\t\t\t\t\t' on line ' . $trace[0]['line'],\n\t\t\t\t\tE_USER_NOTICE);\n\t\t\t\treturn null;\n\t\t}\n\t}", "title": "" } ]
2242f1ececfd6793410a6e3bcf42d8d3
Removes the results file from the server.
[ { "docid": "7b2589379e31ae57f5d736193b730d32", "score": "0.0", "text": "public function remove($url = NULL)\n {\n if ($this->protocol === 'ftp')\n {\n return $this->ftpOperations->remove();\n }\n else\n {\n return $this->httpOperations->remove($url);\n }\n }", "title": "" } ]
[ { "docid": "68902a4b2d42cd3e87a3df3781b24d7f", "score": "0.63581115", "text": "public function clearCache() {\n if ($this->file->exists()) {\n $this->file->delete();\n }\n }", "title": "" }, { "docid": "79e0cd31dd21b6534c2e4c0a7cf7db2e", "score": "0.6213548", "text": "public function removeUpload()\r\n\t{\r\n\t\t//if ($file = $this->getAbsolutePath()) {\r\n\t\t//\tunlink($file);\r\n\t\t//}\r\n\t}", "title": "" }, { "docid": "6f71bf7e667aa5cda819fd6d25794d70", "score": "0.6209387", "text": "public function stop_caching()\n\t{\n\t\tif ($this->cache_fp) {\n\t\t\tfclose($this->cache_fp);\n\t\t\t$this->cache_fp = null;\n\t\t}\n\t\n\t\tif (file_exists($this->temp_cache_filename)) {\n\t\t\tif (unlink($this->temp_cache_filename) === FALSE)\n\t\t\t\t$this->warn(\"Cannot delete temporary cache file: [{$this->temp_cache_filename}]\");\n\t\t\telse\n\t\t\t\t$this->debug(\"Temporary cache file deleted.\\n\");\n\t\t}\n\t\n\t\t$this->cache_filename = $this->temp_cache_filename = null;\n\t}", "title": "" }, { "docid": "e1512fc8404d8c3c154e0d7e3c6d1a8b", "score": "0.6207883", "text": "public function unlinkTempFiles() {}", "title": "" }, { "docid": "e1512fc8404d8c3c154e0d7e3c6d1a8b", "score": "0.62069464", "text": "public function unlinkTempFiles() {}", "title": "" }, { "docid": "00adb56dbc4076ad0625dde46983811c", "score": "0.6204599", "text": "public function removeUpload()\n\t{\n\t\tif ($file = $this->getAbsolutePath()) {\n\t\t\tunlink($file);\n\t\t}\n\t}", "title": "" }, { "docid": "c41a8c586f3cfc39935459b577d1b862", "score": "0.61892134", "text": "public function removeUpload()\n {\n if (isset($this->temp)) {\n unlink($this->temp);\n }\n }", "title": "" }, { "docid": "51a91a15819355afb7d81ca19f6d8cf0", "score": "0.6137284", "text": "private function clean()\r\n\t{\r\n\t\r\n\t\t//get original info\r\n\t\t$path = dirname(self::$serverPath.$this->file);\r\n\t\t$file = basename($this->unaltered, self::BASE_EXTENSION);\r\n\t\t\r\n\t\t//build regular expressions based on what has been done to the file\r\n\t\t$regex = \"=\" . preg_replace(\"/\\./\",\"\\.\", $file . \".v\") . \".*\";\t\t\r\n\t\t$file .= \".v\" . $this->version;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t$regex .= self::BASE_EXTENSION . '=';\r\n\t\t$file .= self::BASE_EXTENSION;\r\n\t\t\r\n\t\t\r\n\t\t//iterate through the directory and search for possible matches to remove.\r\n\t\tforeach( new DirectoryIterator( $path ) as $f )\r\n\t\t{\r\n\t\t\t$fileDir = $f->getPath();\r\n\t\t\t$fileName = $f->getFilename();\t\t\t\r\n\t\t\tif( $f->isFile() ) \t\t\t\r\n\t\t\t{\r\n\t\t\t\t//check to see if the file is versioned and should be removed\r\n\t\t\t\tif(preg_match($regex,$fileDir.\"/\".$fileName) > 0 && $fileDir.\"/\".$fileName != $file && preg_match(\"/\".$this->version.\"/\", $fileName) == 0)\r\n\t\t\t\t{\r\n\t\t\t\t\t//remove any file that matches\r\n\t\t\t\t\t@unlink($fileDir . \"/\" . $fileName);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}", "title": "" }, { "docid": "92396787893ff36a48d96237756440a4", "score": "0.6130846", "text": "protected function _clearTmp() {\n $tmp = scandir(base_path('public/tmp/'));\n for ( $j = 2; $j < count( $tmp ); $j ++ ) {\n if (preg_match('/[a-z0-9]*_(project|website)\\.zip/i', $tmp[ $j ])) {\n unlink('tmp/'.$tmp[ $j ]);\n }\n }\n }", "title": "" }, { "docid": "d400f4f7bf590ae97b301e31d1841d98", "score": "0.6130473", "text": "public function clean()\n {\n ServerCommand::removeDir($this->inputFilesPath);\n // if output is not inside input\n if (strpos($this->outputFolder, $this->inputFilesPath)!==false)\n ServerCommand::removeDir($this->outputFolder);\n }", "title": "" }, { "docid": "2363e85916f199c9ac649a0d4e04e41a", "score": "0.61214215", "text": "public function clearResults();", "title": "" }, { "docid": "7dfc14cd107eb90d5e76c3a6bdeab6b1", "score": "0.60674953", "text": "public function flush()\n\t{\n\t\t$files = glob($this->options['cache_dir'] . '*');\n\t\tforeach ($files as $file) {\n\t\t\tif (is_file($file)) {\n\t\t\t\tunlink($file);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "fe4bbf5126f7989e5361c88dc61a1392", "score": "0.60634834", "text": "public function clean(){\n\t\t\tif( $this->_cacheFile == -1 ){\n\t\t\t\t$files = $this->_fileObject->files( $this->_cacheDir, array(), '.', true, true );\n\t\t\t\t// Delete all files\n\t\t\t\tforeach( $files as $file ){\n\t\t\t\t\t@ unlink( $file );\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// Full path to file\n\t\t\t\t$cacheFile = $this->_cacheDir . DS . $this->_cacheFile;\n\t\t\t\treturn @ unlink( $cacheFile );\n\t\t\t}\t\t\t\t\n\t\t}", "title": "" }, { "docid": "5023dd79e7fb3cf2994249fa05d2a8bb", "score": "0.6039156", "text": "function clearfile() {\n\t\tunset($_SESSION['pluginmaker']['file']);\n\t\t$this->file = $this->filedir = \"\";\n\t}", "title": "" }, { "docid": "2c54644a7a651f037c1f1ab15629ba3e", "score": "0.60321075", "text": "public function removeRegisteredFiles() {}", "title": "" }, { "docid": "1273d6dc82e44bb71ddd87d6a4f78237", "score": "0.6031596", "text": "function file_cache_clear() {\n if ($this->cache_files) {\n $this->file_cache_set(NULL);\n }\n }", "title": "" }, { "docid": "2b64bf9c1d6f970b6bdbe5f4ef4e767a", "score": "0.60014606", "text": "public static function removeCacheFiles() {}", "title": "" }, { "docid": "432a9d7da2cb1827739a117d0e1e7675", "score": "0.5997204", "text": "public static function destroyFileTemp()\n {\n $path = self::RUTA_FINAL;\n $files = glob($path . '*');\n foreach ($files as $file) {\n if (is_file($file))\n //elimino el fichero \n unlink($file);\n }\n }", "title": "" }, { "docid": "502b5383f48810bef4befaa0c8fdc24f", "score": "0.5981244", "text": "protected function clearProcessedFiles() {}", "title": "" }, { "docid": "a6b9c5e2bcb825e1cfba302990ec2140", "score": "0.59743214", "text": "public function remove()\n\t{\n\t\tFile::remove($this->getFilePath());\n\t}", "title": "" }, { "docid": "edd9972dc9bbb2f6ea58559460ea24eb", "score": "0.59701514", "text": "private function clean() {\n if(!$query=$this->uCore->query(\"uDrive\",\"SELECT\n `file_id`,\n `site_id`,\n `file_mime`,\n `file_hashname`\n FROM\n `u235_files`\n WHERE\n `deleted`='2'\n LIMIT 200\n \")) $this->uCore->error(6);\n while($file=$query->fetch_object()) {\n $this->delete_file($file);\n }\n }", "title": "" }, { "docid": "354269df99645aedc9813b6382ca9155", "score": "0.5949656", "text": "public function remove()\n {\n foreach($this->files as $file) {\n\n @unlink($this->getUploadRootDir() . DIRECTORY_SEPARATOR . $file);\n\n } \n }", "title": "" }, { "docid": "f8db9838eb8358e7d94f761d3c805f78", "score": "0.59433687", "text": "public function clearResourceFiles()\n {\n $this->collResourceFiles = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "6183be89df6712894af8824fc3b1f66a", "score": "0.59374934", "text": "private function removeSessions()\n {\n $dir = TMP . 'sessions';\n foreach (new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($dir, FilesystemIterator::SKIP_DOTS),\n RecursiveIteratorIterator::CHILD_FIRST\n ) as $path) {\n if ($path->isFile()) {\n $res = new File($path->getPathname(), false);\n $res->delete();\n $res->close();\n $this->out($path->getPathname());\n }\n }\n $this->success('Sessions files deleted!');\n }", "title": "" }, { "docid": "b4324b512ffffce171c68004df8b9c60", "score": "0.59326077", "text": "protected function removeTmpFiles()\n\t{\n\t\t@unlink($this->getHTMLPath());\n\t\t@unlink($this->getPDFPath());\n\t}", "title": "" }, { "docid": "2b49e5cf57affe3333937be0ee604380", "score": "0.5911737", "text": "private function removeOldFetchedFiles() : void {\n $this->fileSystem->load(FileSystem::RAW);\n $rawLoadedFiles = $this->fileSystem->getLoadedFiles(FileSystem::RAW);\n if(count($rawLoadedFiles) > 0) {\n $this->fileSystem->remove($rawLoadedFiles);\n }\n }", "title": "" }, { "docid": "4aac9caeb4171c06216739be47ce245e", "score": "0.5904637", "text": "public function __destruct() {\n\t\tif(file_exists($this->serverPath.'/'.$this->file_bufor_path.$this->file_name) && filetype($this->serverPath.'/'.$this->file_bufor_path.$this->file_name)!='dir') unlink($this->serverPath.'/'.$this->file_bufor_path.$this->file_name);\n\t}", "title": "" }, { "docid": "f35aaf17008b130a60b3962b50777f92", "score": "0.59014815", "text": "public function unlink();", "title": "" }, { "docid": "e3d43b098c267cbb98f810df338e588f", "score": "0.5899875", "text": "public function clean_files() {\n\n\t\tif ( empty( $_SESSION['files_to_remove'] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $cherry_data_manager;\n\n\t\t$res = $cherry_data_manager->importer->fs_connect();\n\n\t\tif ( ! $res ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tglobal $wp_filesystem;\n\n\t\tif ( ! $wp_filesystem ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tforeach ( $_SESSION['files_to_remove'] as $file ) {\n\t\t\tif ( $wp_filesystem->exists( $file ) ) {\n\t\t\t\t$wp_filesystem->delete( $file );\n\t\t\t}\n\t\t}\n\n\t\tunset( $_SESSION['files_to_remove'] );\n\t}", "title": "" }, { "docid": "d13b2ed0d4d2601d6c3bcc6df3725220", "score": "0.58993286", "text": "private function clearOutputFile()\n {\n file_put_contents(__DIR__ . '/outputMessages.txt', '');\n }", "title": "" }, { "docid": "2e671cbf9c6fa1e28c7dddd23ea10cfb", "score": "0.5894341", "text": "private function performCleanup()\n {\n $directory = $this->updater->getTempDirectory();\n $fileBasename = $this->updater->getLocalPharFileBasename();\n\n @unlink(sprintf('%s/%s.phar.temp.pubkey', $directory, $fileBasename));\n @unlink(sprintf('%s/%s.temp.pubkey', $directory, $fileBasename));\n }", "title": "" }, { "docid": "c1621b7571a4163350cbc8ac7e9e42ec", "score": "0.5892361", "text": "protected function tearDown()\n\t {\n\t\texec(\"rm -rf \" . __DIR__ . \"/cache\");\n\n\t\tunset($this->remotepath);\n\t }", "title": "" }, { "docid": "104ce27a1212630cdf8d28045c303f34", "score": "0.5889005", "text": "function remove(): string\n {\n foreach ($this->data['files'] as $file) {\n $zip = new ZipArchive();\n\n $zip->open($this->data['source'], $this->operation);\n $zip->deleteName($file);\n\n $this->setNumFiles(++$this->numFiles);\n\n $zip->close();\n }\n\n return $this->getResponse();\n }", "title": "" }, { "docid": "019a172f7d5de3bfcf6729242f7d8b3c", "score": "0.58709174", "text": "private function clear() {\n $params = array(\n \"all\" => $this->_request[0] == \"all\" ? true : false,\n \"id\" => $this->_request[0] ?: $this->_request['id']\n );\n\n IF($params['all'] === true) {\n // clear all cached maps\n\n } ELSEIF($params['id'] > 0) {\n $this->_request['id'] = $params['id'];\n $data = $this->property(true);\n $filename = \"cache/{$data[latitude]},{$data[longitude]}*\";\n $maps = glob($filename);\n FOREACH($maps AS $file) {\n IF(is_file($file) && $file != __FILE__)\n unlink($file);\n }\n }\n }", "title": "" }, { "docid": "7e317ad73216ded636fa0ead5bdb364f", "score": "0.5860467", "text": "static function cleanupTmpFiles(){\n $files = CHOQ_FileManager::getFiles(CHOQ_ACTIVE_MODULE_DIRECTORY.\"/tmp\", false);\n foreach($files as $file){\n if(preg_match(\"~proxy\\.~i\", basename($file))){\n if(filemtime($file) < time() - self::CACHETIME) unlink($file);\n }\n }\n }", "title": "" }, { "docid": "19a22081a66f980c41435154a1ec7b29", "score": "0.5857028", "text": "public function __destruct()\n {\n foreach ($this->tmpFiles as $file) {\n if (is_file($file)) {\n unlink($file);\n }\n }\n }", "title": "" }, { "docid": "153154b929eb598ce6c84b1d493e8d75", "score": "0.58534396", "text": "public function clearDebugFile() {\n\t\t$this->load->language($this->route);\n\t\t$json = array();\n\n\t\tif (!$this->user->hasPermission('modify', $this->route)) {\n\t\t\t$json['error'] = $this->language->get('error_permission');\n\t\t} else {\n\t\t\t$file = DIR_LOGS.$this->request->post['debug_file'];\n\n\t\t\t$handle = fopen($file, 'w+');\n\n\t\t\tfclose($handle);\n\n\t\t\t$json['success'] = $this->language->get('success_clear_debug_file');\n\t\t}\n\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}", "title": "" }, { "docid": "bc0a58788a9bef6cf54dcc12032be9f2", "score": "0.5845664", "text": "public function cleanup()\n {\n if(!self::KEEP_FILES)\n {\n //delete all temporary files created\n $this->delete_work_dir();\n }\n }", "title": "" }, { "docid": "3412d0585c1769c6fe5f8a0a28d6e2bc", "score": "0.5844414", "text": "protected function removeTemporaryFiles()\n {\n $finder = new Finder();\n\n // Delete temporary files\n $datas = $finder->name('*_schema.xml')->name('build*')->in($this->absoluteFixturesPath);\n foreach($datas as $data) {\n $this->filesystem->remove($data);\n }\n }", "title": "" }, { "docid": "11037a6970e17879939a1a90a759a6c9", "score": "0.5840863", "text": "public static function removeCacheFiles()\n {\n self::getCacheManager()->flushCachesInGroup('system');\n }", "title": "" }, { "docid": "c7e8baa787691f7d89c5a7f84293bb35", "score": "0.5837332", "text": "public function clear_debug_file() {\n $this->load->language($this->route);\n $json = array();\n\n if (!$this->user->hasPermission('modify', $this->route)) {\n $json['error'] = $this->language->get('error_permission');\n } else {\n $file = DIR_LOGS.$this->request->post['debug_file'];\n\n $handle = fopen($file, 'w+');\n\n fclose($handle);\n\n $json['success'] = $this->language->get('success_clear_debug_file');\n }\n\n $this->response->addHeader('Content-Type: application/json');\n $this->response->setOutput(json_encode($json));\n\n }", "title": "" }, { "docid": "1a6786b10ad0bc4a943701f19d1e3ab0", "score": "0.58366483", "text": "public function removeTrackingSettingsFile()\n {\n $filePath = $this->getAppKernel()->getProjectDir() . '/var/logs/tracking/settings.ser';\n if (file_exists($filePath)) {\n unlink($filePath);\n }\n }", "title": "" }, { "docid": "1528c0285b4a2b0f4bc5d92d2cada447", "score": "0.5825261", "text": "private function cleanup()\n {\n $unchecked = $this->results;\n\n $results = array_merge(\n $this->features,\n $this->scenarios,\n $this->steps\n );\n\n foreach($results as $event){\n $key = $event->getKey();\n $this->results[$key] = $event;\n if(isset($unchecked[$key])){\n unset($unchecked[$key]);\n }\n }\n\n // now checking removed features,scenarios,or steps\n foreach($unchecked as $event){\n $file = $event->getFile();\n $line = $event->getLine();\n $key = $event->getKey();\n if(!file_exists($file)){\n // always remove unexistent file\n $this->removeFailed($event);\n }else{\n $contents = file($event->getFile());\n $index = $line-1;\n $lineContent = isset($contents[$index]) ? $contents[$index]:\"\";\n if(false===strpos($lineContent,$event->getText())){\n unset($this->results[$key]);\n }\n }\n }\n }", "title": "" }, { "docid": "070c0823feb9429ac826ae2af7f7b16b", "score": "0.58202446", "text": "public function remove() {\n\n if($this->_ignore_hidden_files) {\n $this->_ignore_hidden_files = false;\n $this->files = null;\n $this->getFiles();\n }\n\n foreach ($this->files as $file) {\n $file->remove();\n }\n rmdir($this->completePath);\n\t}", "title": "" }, { "docid": "3ad7751c19eac2020afb1e628f921c2e", "score": "0.58193195", "text": "public function clear()\n\t{\n\t\t$files = glob($this->dirname . '/*');\n\t\tforeach($files as $file) {\n\t\t\tunlink($file);\n\t\t}\n\t}", "title": "" }, { "docid": "3e4bc169142b5d355bb9d13390f8da99", "score": "0.5813169", "text": "private function clear_cache()\n\t{\n\t\treturn delete_files('../cache/', TRUE);\n\t}", "title": "" }, { "docid": "09c62ae082b99965692c5140894c07e8", "score": "0.581137", "text": "private function clear(){\n $dir = file_directory_temp();\n \n foreach($this -> tmp_images as $img){\n unlink($dir .'/' . $img);\n }\n \n \n \n }", "title": "" }, { "docid": "ff9a95965b7343abb3e68fc5bb5c411d", "score": "0.5809927", "text": "public function flushFsCache()\n {\n $this->deleteFilesInDirectory( $this->getFsCachePath() );\n $this->deleteFilesInDirectory( $this->getFsCachePath() . 'smarty/' );\n }", "title": "" }, { "docid": "e9a282384f959aad8bd239ae80b81566", "score": "0.57913816", "text": "public function tearDown() {\n if (file_exists($this->mock_vnstat_script)) {\n unlink($this->mock_vnstat_script);\n }\n }", "title": "" }, { "docid": "f372c72760cefbb07d5aa26ba3228ae7", "score": "0.57883584", "text": "public function clear()\n {\n $files = array(\n trim($this->c['config']['logger']['file']['path']['http'], '/'),\n trim($this->c['config']['logger']['file']['path']['ajax'], '/'),\n trim($this->c['config']['logger']['file']['path']['cli'], '/'),\n );\n foreach ($files as $file) {\n $file = ROOT. str_replace('/', DS, $file);\n $exp = explode(DS, $file);\n $filename = array_pop($exp);\n $path = implode(DS, $exp). DS;\n\n if (is_file($path.$filename)) {\n unlink($path.$filename);\n }\n }\n if ($this->c->has('queue')) {\n $this->c['queue']->deleteQueue($this->c['config']['logger']['queue']['route']); // Clear queue data\n }\n echo Console::success('Application logs deleted.');\n }", "title": "" }, { "docid": "5be0a6695e1eef2a6a3851e1b98a7f49", "score": "0.5782085", "text": "public function removeTemporaryFiles(): void\n {\n foreach ($this->temporaryFiles as $file) {\n $this->unlink($file);\n }\n }", "title": "" }, { "docid": "50eec37d15408ad3ff96f066d42f5440", "score": "0.5778565", "text": "public function clean()\n {\n array_map('unlink', $this->files());\n }", "title": "" }, { "docid": "9efd8d349664307968329ce8c97377fc", "score": "0.5776043", "text": "public function clear(){\n $file = $this->getFilepath();\n if (file_exists($file)){\n return unlink($file);\n }\n return false;\n }", "title": "" }, { "docid": "399f14decb02e6faf840e2fd90f41618", "score": "0.57718235", "text": "public function clear()\n {\n $this->data = array();\n file_put_contents($this->fileName, '');\n }", "title": "" }, { "docid": "65f4018f98a942697cc1951d768e1588", "score": "0.57676905", "text": "public function clear()\n {\n foreach (self::TYPE_FILES as $typeFile) {\n $files = glob(self::FILE_PATH . $typeFile . '/*');\n foreach ($files as $file) {\n if (is_file($file)) {\n unlink($file);\n }\n }\n }\n }", "title": "" }, { "docid": "229e91493c18938f592b91c7fa9438a3", "score": "0.5758318", "text": "public function Cleanup()\n\t{\n\t\tif (!empty($this->dir) && (count($this->files) > 0)) {\n\t\t\tforeach ($this->files as $file) {\n\t\t\t\t$this->RemoveFile($file);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d5b08a6289fb21c751d662ecd683f9e3", "score": "0.5756214", "text": "public function deleteFile() {\n\n\t\tif(isset($_POST['hash'])) {\n\t\t\t$this->removeFile($_POST['hash']);\n\t\t} else {\n\t\t\t$this->setResponseData('true', 'Invalid file.');\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "cb1244c47640c88d29ac2f86ba0c7c54", "score": "0.57552516", "text": "public function unlinkTempFiles() {\n foreach ($this->tmp_files as $file) { // remove all temporary files created\n unlink($file);\n }\n $this->tmp_files = array();\n }", "title": "" }, { "docid": "905b264756481e2ff4d531537e7629c5", "score": "0.5739753", "text": "public function clearResult();", "title": "" }, { "docid": "8dccd4d5e4781bb49ecfac329689ef13", "score": "0.5737528", "text": "public function clearCache() {\r\n $files = glob($this->getConfig('cacheDir') . '/*', GLOB_MARK);\r\n foreach ($files as $file) {\r\n unlink($file);\r\n }\r\n }", "title": "" }, { "docid": "37d1f8df79d1b403823098c91384300b", "score": "0.5737094", "text": "public function destroy() {\n $filepath = $this->getFilepath();\n @unlink($filepath);\n }", "title": "" }, { "docid": "5ece85975bb57d85feafacab632c74da", "score": "0.5736265", "text": "public function cleanTemporaryFiles()\r\n {\r\n if(isset($this->searchButton))\r\n {\r\n if(file_exists('keys.txt'))\r\n {\r\n unlink('keys.txt');\r\n }\r\n if(file_exists('keywords.txt'))\r\n {\r\n unlink('keywords.txt');\r\n }\r\n if(file_exists('urls.txt'))\r\n {\r\n unlink('urls.txt');\r\n }\r\n if(file_exists('clean content.txt'))\r\n {\r\n unlink('clean content.txt');\r\n }\r\n if(file_exists('dirty content.html'))\r\n {\r\n unlink('dirty content.html');\r\n }\r\n if(file_exists('c content.txt'))\r\n {\r\n unlink('c content.txt');\r\n }\r\n if(file_exists('sentences.txt'))\r\n {\r\n unlink('sentences.txt');\r\n }\r\n if(file_exists('degree.txt'))\r\n {\r\n unlink('degree.txt');\r\n }\r\n if(file_exists('list Urls.txt'))\r\n {\r\n unlink('list Urls.txt');\r\n }\r\n if(file_exists('combined sentence.txt'))\r\n {\r\n unlink('combined sentence.txt');\r\n }\r\n if(file_exists('selected sentences.txt'))\r\n {\r\n unlink('selected sentences.txt');\r\n }\t\t\t\r\n\t\t\t\r\n }\r\n if(isset($this->combinedSearchButton))\r\n {\r\n if(file_exists('clean content.txt'))\r\n {\r\n unlink('clean content.txt');\r\n }\r\n if(file_exists('dirty content.html'))\r\n {\r\n unlink('dirty content.html');\r\n }\r\n if(file_exists('c content.txt'))\r\n {\r\n unlink('c content.txt');\r\n }\r\n if(file_exists('keys.txt'))\r\n {\r\n unlink('keys.txt');\r\n }\r\n if(file_exists('selected sentences.txt'))\r\n {\r\n unlink('selected sentences.txt');\r\n }\t\t\t\r\n }\r\n }", "title": "" }, { "docid": "cf88a37d3def2095b05a49e7a7a85cb3", "score": "0.5729737", "text": "public function __destruct() \n {\n fclose($this->myfile);\n \n if(ENV == \"local\")\n {\n $x = $_SERVER['DOCUMENT_ROOT'].\"/REST_APIs/business_relationships/logs/\";\n }\n else\n {\n $x = $_SERVER['DOCUMENT_ROOT'].\"/business_relationships/logs/\";\n }\n // $x = $x.\"\\\\\";\n \n $x = $x.$this->file_prefix.\"entity_mgmt.txt\";\n\n if( filesize($x) == false)\n {\n unlink($x);\n }\n }", "title": "" }, { "docid": "5f5e818b59e200abdffd0f7c72004114", "score": "0.5728328", "text": "public function processDatamap_afterAllOperations() {\n\t\tforeach(self::$downloadedFiles as $downloadedFile) {\n\t\t\tif (is_file($downloadedFile)) {\n\t\t\t\t$result = t3lib_div::unlink_tempfile($downloadedFile);\n\t\t\t\tif (!$result) {\n\t\t\t\t\tt3lib_div::sysLog('Could not delete tempfile \"'.$downloadedFile.'\"', 'filepicker', 3);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5323557367b036ff689b192fed4d9012", "score": "0.5712552", "text": "private function removeUploadedFile()\n {\n if(!isset($_REQUEST['file']))\n {\n exit;\n }\n\n list($file, $src, $size) = explode(':', $_REQUEST['file']);\n\n if(file_exists($src))\n {\n @unlink($src);\n }\n exit;\n }", "title": "" }, { "docid": "6eadd0db2aff540996f943dc66f54818", "score": "0.5711838", "text": "abstract protected function clearFileCache();", "title": "" }, { "docid": "40de06db997a143cc6601316cd9afbc3", "score": "0.57117546", "text": "function remove_file(){\n echo $folder = $_SERVER['DOCUMENT_ROOT'] . $_POST['file_path'];\n unlink($folder);\n $this->autoRender=false;\n }", "title": "" }, { "docid": "98d7d0ece45f83bb86fdd64b069d813b", "score": "0.5709903", "text": "public function reset()\n {\n $this->returnedFiles = [];\n }", "title": "" }, { "docid": "a840a89b6cb1ddd96bfc68e18c6a2954", "score": "0.57092804", "text": "protected function tearDown(): void\n {\n if (file_exists($this->file)) {\n unlink($this->file);\n }\n }", "title": "" }, { "docid": "3da468d67eea72bd7b6cd14e6d3471b3", "score": "0.5699901", "text": "public function clean(FileProxy $file);", "title": "" }, { "docid": "34e2ed8ae7b24599cfd728dfc90f660d", "score": "0.5696118", "text": "public function deleteTmpFiles()\n {\n foreach ($this->tmpFiles as $filePath) {\n @unlink($filePath);\n }\n }", "title": "" }, { "docid": "b58c07ee9d770bc8a485ceebd1228fd2", "score": "0.56936246", "text": "public function clear()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n try {\n $file = new File(CLEAROS_CACHE_DIR . \"/mp-cart.\" . $this->CI->session->userdata['sdn_rest_id']);\n\n if ($file->exists())\n $file->delete();\n } catch (Exception $e) {\n throw new Engine_Exception(clearos_exception_message($e), CLEAROS_WARNING);\n }\n }", "title": "" }, { "docid": "e8354b64e863b87f24ffe12a8cd25823", "score": "0.56914157", "text": "private function clean_it(){\r\n\t\tif($handle = @opendir(str_replace(\"\\\\\",\"/\",$this->path))){\r\n\t\t\t\r\n\t\t\twhile(false !== ($file = readdir($handle))){\r\n\t\t\t\t\r\n\t\t\t\tif(is_file(str_replace(\"\\\\\",\"/\",$this->path).$file)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t$file_info = @pathinfo(str_replace(\"\\\\\",\"/\",$this->path).$file);\r\n\t\t\t\t\t\r\n\t\t\t\t\tif(isset($file_info['extension']) && in_array(strtolower($file_info['extension']), $this->file_types)){\r\n\t\t\t\t\t\r\n\t\t\t\t\t\tif( @filemtime(str_replace(\"\\\\\",\"/\",$this->path).$file) < (time() - ($this->days * 24 * 60 * 60)) ){\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t@unlink(str_replace(\"\\\\\",\"/\",$this->path).$file);\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t $respArray = array(\"response\" => \"SUCCESS\", \"data\" => array( \"message\"=>\"File cleaning complete!\", \"command\"=>\"\") );\r\n\t\t\t echo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\r\n\t\t\t exit;\r\n\t\t\t\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\t$respArray = array(\"response\" => \"ERROR\", \"data\" => array( \"message\"=>\"Could not find the specified path!\", \"command\"=>\"\") );\r\n\t\t\techo $this->jsoncallback.\"(\".json_encode($respArray).\")\";\r\n\t\t\texit;\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "d4836d3869de566517fa269c99bea1a8", "score": "0.5687695", "text": "protected function tearDown(): void\n {\n if ($this->outputFileName !== '') {\n unlink($this->outputFileName);\n $this->outputFileName = '';\n }\n }", "title": "" }, { "docid": "08dc17d13b9b1106ffc6f4e31016818e", "score": "0.56847024", "text": "public function __destruct() {\n\t\tunlink($this->tmp_file);\n\t}", "title": "" }, { "docid": "d4e72ba42c3802c94227752d3e223876", "score": "0.5682554", "text": "function resetFeedData(){\n $getDownloadedFeeds = (new CraigslistService())->getDownloadedFeeds();\n foreach ($getDownloadedFeeds as $feed){\n unlink(__DIR__.'/../feeds/'.$feed);\n }\n $content ='';\n $fp = fopen( __DIR__ . \"/../catch_errors\",\"wb\");\n fwrite($fp,$content);\n fclose($fp);\n $fp2 = fopen( __DIR__ . \"/../cron_debug.txt\",\"wb\");\n fwrite($fp2,$content);\n fclose($fp2);\n unlink(__DIR__.'/../opml_local.xml');\n if($this->config['method'] =='upload'){\n CraigslistService::deleteFeedsFromServer();\n }\n\n return true;\n }", "title": "" }, { "docid": "420b4f886a696a274922de30ff5b2136", "score": "0.5680911", "text": "public function delete()\n\t{\n\t\tforeach ($this->iterator as $file)\n\t\t{\n \t\t\tunlink($file->getPathname());\n\t\t}\n\t}", "title": "" }, { "docid": "603b26126a567ceef51d0d209ff45650", "score": "0.5679412", "text": "public static function clearCacheFiles()\n {\n global $sugar_config;\n $importdir = self::getImportDir();\n if ( is_dir($importdir) ) {\n $files = dir($importdir);\n while (false !== ($file = $files->read())) {\n if ( !is_dir($file) && stristr($file,'.csv') )\n unlink(\"$importdir/$file\");\n }\n }\n }", "title": "" }, { "docid": "288072170ee9381893fa11cb6d77cc4d", "score": "0.567691", "text": "public function DeleteUpdate() {\n $this->fileService->fileRemove();\n }", "title": "" }, { "docid": "72f0564dce9ef74d8ac8548cc629dfe8", "score": "0.56667155", "text": "public function destroy() {\n $this->target_path = SITE_ROOT . DS . $this->upload_dir . DS . $this->file_name;\n\n //First remove the database entry\n return unlink($this->target_path) ? true : false;\n /*if ($this->delete()) {\n //Then remove the file\n //$target_path = SITE_ROOT . DS . 'public' . DS . $this->file_path();\n\n } else {\n //Database delete failed\n return false;\n }*/\n\n }", "title": "" }, { "docid": "3ec1051c44bcdbf6b8f0b979de237ca0", "score": "0.5665256", "text": "public function destroy () {\n\t\treturn unlink(self::filepath($this->name));\n\t}", "title": "" }, { "docid": "4a3f06b17d352b56d099191d0678bb61", "score": "0.56621236", "text": "public function clear()\n\t{\n\t\t//delete files and directories\n\t\treturn delete_files( rtrim( $this->cache_base, '/' ), true );\n\t}", "title": "" }, { "docid": "e84c20d04226832e39bb8c03387da3cc", "score": "0.5657276", "text": "private function clearTmpFolder()\n {\n $logFiles = $this->defaultLoggingStrategy->getLogFiles();\n foreach ($this->getLogTypes() as $logType) {\n $logFilePath = $logFiles[$logType]['path'];\n if (file_exists($logFilePath)) {\n unlink($logFilePath);\n }\n }\n }", "title": "" }, { "docid": "8fa6190ed47aec5551104c5fdea01c11", "score": "0.5651666", "text": "public function clearResult() {\n $this->results = array();\n }", "title": "" }, { "docid": "a5d26f1fd613dbe9a0bb224f0e4b3b24", "score": "0.56459713", "text": "public function clear()\n {\n if ($this->directory->isExist($this->logFile)) {\n $this->directory->delete($this->logFile);\n }\n }", "title": "" }, { "docid": "c5a03ae62bc1f881a7526953b3cd1d3d", "score": "0.5643329", "text": "public function clearTempFiles(){\n $model_temp_path = __DIR__ . '/temp_config/*';\n $save_file = __DIR__ . '/temp_config/redcap_config.js';\n $files_to_keep = array( $save_file );\n\n $dirList = glob($model_temp_path);\n foreach ($dirList as $file) {\n if (!in_array($file, $files_to_keep)) {\n if (is_dir($file)) {\n $this->emDebug(\"is dir remove $file\");\n rmdir($file);\n } else {\n $this->emDebug(\"is file remove $file\");\n unlink($file);\n }\n }\n }\n return;\n }", "title": "" }, { "docid": "6663c5b93b63e109b5315034a83472e5", "score": "0.5637038", "text": "protected function cleanFiles()\n {\n $path = $this->getPathTemplate('filePath', $this->attribute);\n @unlink($path);\n }", "title": "" }, { "docid": "ed8b52f53294b34cac4790961bc9ad45", "score": "0.56331086", "text": "public function clear()\n\t{\n\t\t$cacheDir = PATH_APP . DS . 'cache';\n\t\t$files = array('site.css', 'site.less.cache');\n\n\t\t// Remove each file\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif (!is_file($cacheDir . DS . $file))\n\t\t\t{\n\t\t\t\t$this->output->addLine($file . ' does not exist', 'warning');\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (!Filesystem::delete($cacheDir . DS . $file))\n\t\t\t{\n\t\t\t\t$this->output->addLine('Unable to delete cache file: ' . $file, 'error');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->output->addLine($file . ' deleted', 'success');\n\t\t\t}\n\t\t}\n\n\t\t// success!\n\t\t$this->output->addLine('All CSS cache files removed!', 'success');\n\t}", "title": "" }, { "docid": "9054648597de4626d36f1cdb44d80c54", "score": "0.5630026", "text": "public function cleanup_working_files() {\n\t\tWsLog::l('CLEANING WORKING FILES:');\n\n\t\t$files_to_clean = array(\n\t\t\t'/WP-STATIC-EXPORT-TARGETS',\n\t\t\t'/WP-STATIC-EXPORT-S3-FILES-TO-EXPORT',\n\t\t\t'/WP-STATIC-EXPORT-FTP-FILES-TO-EXPORT',\n\t\t\t'/WP-STATIC-EXPORT-GITHUB-FILES-TO-EXPORT',\n\t\t\t'/WP-STATIC-EXPORT-DROPBOX-FILES-TO-EXPORT',\n\t\t\t'/WP-STATIC-EXPORT-BUNNYCDN-FILES-TO-EXPORT',\n\t\t\t'/WP-STATIC-CRAWLED-LINKS',\n\t\t\t'/WP-STATIC-INITIAL-CRAWL-LIST',\n\t\t\t//'/WP-STATIC-CURRENT-ARCHIVE', // needed for zip download, diff deploys, etc\n\t\t\t//'WP-STATIC-EXPORT-LOG'\n\t\t);\n\n\t\tforeach ($files_to_clean as $file_to_clean) {\n\t\t\tif ( file_exists($this->_uploadsPath . '/' . $file_to_clean) ) {\n\t\t\t\tunlink($this->_uploadsPath . '/' . $file_to_clean);\n\t\t\t} \n\t\t}\n\n\t\techo 'SUCCESS';\n\t}", "title": "" }, { "docid": "fca3f12d4fcc133da6289213e664c772", "score": "0.5622474", "text": "public function cleanUp()\n\t{\n\t\tjimport('joomla.filesystem.file');\n\n\t\t// Remove the update package\n\t\t$jreg = JFactory::getConfig();\n\t\t$tempdir = $jreg->get('config.tmp_path');\n\t\t$file = JFactory::getApplication()->getUserState('com_joomlaupdate.file', null);\n\t\t$target = $tempdir.'/'.$file;\n\t\tif (!@unlink($target))\n\t\t{\n\t\t\tjimport('joomla.filesystem.file');\n\t\t\tJFile::delete($target);\n\t\t}\n\n\t\t// Remove the restoration.php file\n\t\t$target = JPATH_ADMINISTRATOR . '/components/com_joomlaupdate/restoration.php';\n\t\tif (!@unlink($target))\n\t\t{\n\t\t\tJFile::delete($target);\n\t\t}\n\n\t\t// Remove joomla.xml from the site's root\n\t\t$target = JPATH_ROOT . '/joomla.xml';\n\t\tif (!@unlink($target))\n\t\t{\n\t\t\tJFile::delete($target);\n\t\t}\n\n\t\t// Unset the update filename from the session\n\t\tJFactory::getApplication()->setUserState('com_joomlaupdate.file', null);\n\t}", "title": "" }, { "docid": "763476e5ce64a564a1eff2f3a2a0120d", "score": "0.56223446", "text": "public function actionDiscardTask(){\n $app = Yii::$app;\n $req = $app->request;\n $session = $app->session;\n if($req->isAjax){\n $storedFiles = $session->get('tempStoreFiles');\n if(count($storedFiles)>0){\n foreach($storedFiles as $file_id){\n $file = SpyFile::findOne(['file_id' => $file_id]);\n if($file instanceof SpyFile){\n unlink($file->path);\n $file->delete();\n }\n }\n }\n $session->set('tempStoreFiles', null);\n return true;\n }\n return null;\n }", "title": "" }, { "docid": "2bb2e274ab4dfe4b2e5b29e9868e869b", "score": "0.5615307", "text": "protected function tearDown()\r\n\t{\r\n\t\tunlink($this->file);\r\n\t}", "title": "" }, { "docid": "3eba7a599ff2a0bf828391bc529e5ff0", "score": "0.5608383", "text": "public function run()\n {\n $files = glob('storage/files/*');\n\n foreach ($files as $file) {\n unlink($file);\n }\n\n $files = glob('storage/orders/*');\n\n foreach ($files as $file) {\n unlink($file);\n }\n }", "title": "" }, { "docid": "0f98f075d046a9c6c706a9f289dc7908", "score": "0.56050205", "text": "protected function removeTempFiles()\n {\n foreach ($this->tempFileList as $tempFile) {\n if (file_exists($tempFile)) {\n unlink($tempFile);\n }\n }\n\n $this->tempFileList = [];\n }", "title": "" }, { "docid": "7815f8ee6d3104a6c5a73fd0c97d7bf2", "score": "0.55895203", "text": "public function tearDownFiles() {\n\t\t//アップロードテストのためのディレクトリ削除\n\t\t$folder = new Folder();\n\t\t$folder->delete(TMP . 'tests' . DS . 'files');\n\n\t\tunset($folder);\n\t}", "title": "" }, { "docid": "c8341b1ebfad244a3876d1c9c0293e3e", "score": "0.55833733", "text": "public function unlinkTempFiles()\n {\n foreach ($this->tempFiles as $absFile) {\n GeneralUtility::unlink_tempfile($absFile);\n }\n $this->tempFiles = [];\n }", "title": "" }, { "docid": "ba651aab0fb4eb158faf662e2da52f8c", "score": "0.55792576", "text": "public static function clear() :void\n {\n Storage::delete(static::$file);\n }", "title": "" }, { "docid": "46536528c531d187f40c9ddd0ad4c1d0", "score": "0.5576581", "text": "public function destroy(Results $results)\n {\n //\n }", "title": "" }, { "docid": "1e5bbeda58bf5a07f14e5f1657454b61", "score": "0.5563987", "text": "public function tearDown()\n {\n $file = $this->client->getConfig('file') ?: sys_get_temp_dir() . \"/segment-io.log\";\n if (file_exists($file)) {\n unlink($file);\n }\n\n $file = sys_get_temp_dir() . \"/segment-io-test2.log\";\n if (file_exists($file)) {\n unlink($file);\n }\n\n unset($this->client);\n unset($this->subscriber);\n }", "title": "" }, { "docid": "fb6f917a623c192cef555de367cb42d8", "score": "0.5562768", "text": "public function tearDown()\n {\n $filename = $this->getFilename();\n\n if (file_exists($filename)) {\n unlink($filename);\n }\n }", "title": "" }, { "docid": "6ead4abda27226341d5addb61bbb31f4", "score": "0.55556786", "text": "private function _deleteUnreferencedResponses(){\n\t\t$sql = \"SELECT file_identifier FROM response\";\n\n\t\t$responses = $this->_listFiles($this->db->_multipleSelect($sql), 'file_identifier');\n\n\t\tif($this->responseFolder && !empty($this->responseFolder)){\n\t\t\t$responsesPath = $this->red5Path .'/'.$this->responseFolder;\n\t\t\t$this->_deleteFiles($responsesPath, $responses);\n\t\t}\n\n\t}", "title": "" } ]
a398a20229d27b4c5dc246d8c1b40f9f
Ask user for his OATH code
[ { "docid": "e48c2f401bdb1c4c1ef97a6484033ed6", "score": "0.0", "text": "public function codeAction(Request $request)\n {\n $form = $this->createCodeForm();\n $form->handleRequest($request);\n\n return [\n 'form' => $form->createView(),\n 'error' => null\n ];\n }", "title": "" } ]
[ { "docid": "069e131d694d4b80fa2c3bd838444255", "score": "0.63063824", "text": "public function askCode() {\n $question = Question::create(\"Please paste the code here (Add nothing else to the message) - or cancel to cancel\");\n $this->ask($question, function (Answer $answer) {\n\n /** @var string $code */\n $code = trim($answer->getText());\n\n if (!$code) {\n $this->say(\"I don't see a code. 🤔 Please enter it and send\");\n// $this->bot->typesAndWaits(1);\n $this->askCode();\n return;\n }\n\n\t\t\t\tif (strtoupper($code) == \"CANCEL\") {\n\t\t\t\t\t$this->say(\"Cancelled.\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n DB::beginTransaction();\n\n $character = DB::table(\"characters\")\n ->where(\"CONTROL_TOKEN\", '=', $code)\n ->get();\n\n if ($character->count() != 1) {\n DB::rollBack();\n if (!$code) {\n $this->say(\"This code was not found. 🤔 Remember, you can only use a code once.\");\n// $this->bot->typesAndWaits(1);\n $this->askCode();\n return;\n }\n }\n\n $charId = $character->get(0)->ID;\n $charName = $character->get(0)->NAME;\n\n // Clean control token\n DB::table(\"characters\")\n ->where(\"ID\", \"=\", $charId)\n ->update([\"CONTROL_TOKEN\" => \"\"]);\n\n // Clean DB\n DB::table(\"link\")\n ->where('CHAT_ID', '=', $this->bot->getUser()->getId())\n ->where('CHAR_ID', '=', $charId)\n ->delete();\n\n // Insert new link\n DB::table(\"link\")\n ->insert([\n 'CHAT_ID' => $this->bot->getUser()->getId(),\n 'CHAR_ID' => $charId,\n \"active\" => 0\n ]);\n\n // Commit\n DB::commit();\n\n // Respond\n $this->say(\"Perfect. I am now a co-pilot for \".$charName.\" 👨‍✈️\");\n $this->say(\"Now you can use advanced commands such as 'Identify $charName' or others. If you haven't done it yet, now is a great time to see my features at https://co-pilot.eve-nt.uk\");\n\n // Set current link as active\n ChatCharLink::setActive($this->bot->getUser()->getId(), $charId);\n });\n }", "title": "" }, { "docid": "4c3aa592b8acb5cd75d0a037a76ecbc5", "score": "0.60767674", "text": "public function askCommand()\n {\n $a = Interact::ask('you name is: ', null, function ($val, &$err) {\n if (!preg_match('/^\\w{2,}$/', $val)) {\n $err = 'Your input must match /^\\w{2,}$/';\n\n return false;\n }\n\n return true;\n });\n\n $this->write('Your answer is: ' . $a);\n }", "title": "" }, { "docid": "d166c87ed64eda99247864bf461b79cd", "score": "0.605245", "text": "public function code($input = \"1\"){\n\t\treturn $this->hash_it(($_SERVER['HTTP_USER_AGENT'] . $input));\n\t}", "title": "" }, { "docid": "de5fbf024bd42af7015faf4477499c45", "score": "0.5868498", "text": "public function greetAndAskCode() {\n\n $q = Question::create(\"Nice to meet you. Do you have the control token?\")\n ->addButtons([\n Button::create(\"Yes, I have a token\")->value(\"yes\"),\n Button::create(\"No, not yet\")->value(\"no\"),\n ]);\n\n return $this->ask($q, function(Answer $answer) {\n if ($answer->isInteractiveMessageReply() || in_array($answer->getValue(), [\"yes\", \"no\"])) {\n switch ($answer->getValue()) {\n case 'yes':\n $this->say(\"Great 👍\");\n $this->askCode();\n break;\n case 'no':\n $this->say(\"No worries. Click the link in the next message to get a token.\");\n $this->say(route(\"auth-start\"));\n $this->askCode();\n break;\n default:\n $this->say(\"Please click the buttons or respond with 'yes' or 'no'.\");\n $this->greetAndAskCode();\n break;\n }\n } else {\n $this->say(\"Please click the buttons or respond with 'yes' or 'no'.\");\n $this->greetAndAskCode();\n }\n });\n }", "title": "" }, { "docid": "c99c43359f7e19d6145ddab53d9d8310", "score": "0.56539243", "text": "public function input()\n\t{\n\t\t$name = $this->cli->input('Enter your name');\n\t\t$like = $this->cli->confirm('Do you like beer?');\n\n\t\t$this->cli->wait(5);\n\n\t\t$this->cli->stdout($name . ($like ? ' likes beer' : ' doesn\\'t like beer'));\n\t}", "title": "" }, { "docid": "543874466da36f70db03c470f5e51069", "score": "0.5430338", "text": "public function getUserInput(): string;", "title": "" }, { "docid": "5a6e984364a85be06794e96567dc73e7", "score": "0.54288805", "text": "function input(){\r\n\t\t\t?>\r\n\t\t\t<input type=\"text\" name=\"inputDegree\" value=\"11\" >Input degree to display\r\n\t\t\t<?php\r\n\t\t}", "title": "" }, { "docid": "e171d4705a76ea55b9d0eac739db13cb", "score": "0.5427711", "text": "function getUserAnswer(string $message): string\n{\n return \\cli\\prompt($message);\n}", "title": "" }, { "docid": "29febd020946cbe826bbc0efdcf6a97c", "score": "0.5330356", "text": "function askQuestion() {\n return \"Come to me?\";\n }", "title": "" }, { "docid": "db760de18c035cfdbaf62217cea5b8d2", "score": "0.5248734", "text": "private function askForKey()\n {\n $data['view'] = \"login/select_nocharacter_v\";\n $data['no_header'] = 1;\n $data['SESSION'] = $_SESSION; // not part of MY_Controller\n buildMessage('error', Msg::LOGIN_NO_CHARS);\n $this->twig->display('main/_template_v', $data);\n }", "title": "" }, { "docid": "4500818441a128feff529b731718367c", "score": "0.52171046", "text": "function getPatronAI($input)\r\n{\r\n $patronAI = \"\";\r\n\r\n switch ($input) \r\n {\r\n case 0:\r\n $patronAI = \"Achroma\";\r\n break;\r\n \r\n case 1:\r\n $patronAI = \"Gaea\";\r\n break;\r\n \r\n case 2:\r\n $patronAI = \"Hale-E\";\r\n break;\r\n \r\n case 3:\r\n $patronAI = \"Hexacoda\";\r\n break;\r\n \r\n case 4:\r\n $patronAI = \"Mangala\";\r\n break;\r\n \r\n case 5:\r\n $patronAI = \"ME10\";\r\n break;\r\n \r\n case 6:\r\n $patronAI = \"Tetraplex\";\r\n break;\r\n \r\n case 7:\r\n $patronAI = \"Ukur\";\r\n break;\r\n\r\n default:\r\n $patronAI = \"000000000\";\r\n }\r\n\r\n return $patronAI;\r\n}", "title": "" }, { "docid": "53256c2a263a47aa0e547f2588e11f4c", "score": "0.5150663", "text": "function send_authcode() {\n global $firewall;\n // If firewall == true, allow access only to routers has record in array $ruid_data\n if ($firewall) firewall();\n\n // Generate auth-code and add to REQUEST array\n $_REQUEST['authcode'] = substr(str_shuffle('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ123456789'), 0, 5);\n // Create message that will be sent to user\n $message = 'To authorize user '.$_REQUEST['username'].' connection open '.HOST.'?ruid='.$_REQUEST['ruid'].'&auth='.$_REQUEST['authcode'];\n\n if ($_REQUEST['telegram']) send_telegram($message); // via telegram\n if ($_REQUEST['syno_token']) send_synoChat($message); // via synology chat\n if ($_REQUEST['phone']) send_SMS($message); // via SMS to phone\n\n // логируем запросы | save log\n writelog('SEND AUTH CODE');\n die($_REQUEST['authcode']);\n}", "title": "" }, { "docid": "65bbec26d5cebe9e1a51dcfaa3bf86ca", "score": "0.5090541", "text": "protected function ask($question)\n {\n $fh = fopen(\"php://stdin\", 'r');\n print($question . \"\\n\");\n return fgets($fh);\n }", "title": "" }, { "docid": "cb041a7600fa0bec524d16dc5d8b4f1b", "score": "0.5071012", "text": "public function intellisence($query) {\n if (ctype_digit($query) && (strlen($query >= 6))) {\n echo $this->turnoEmpleado('dni');\n } else { \n if (filter_var($query, FILTER_VALIDATE_EMAIL)) {\n echo $this->turnoEmpleado('email');\n } else {\n echo $this->turnoEmpleado('name');\n \n }\n }\n }", "title": "" }, { "docid": "5471083a27a4b359b95341a35964034f", "score": "0.50602156", "text": "public function random_code($input = \"1\"){\n\t\treturn str_shuffle(\"OAISFJNSDONSDOK98A7987SDFJKDJSF98OD\");\n\t}", "title": "" }, { "docid": "122fda52b610685c718547730feaa67c", "score": "0.5056142", "text": "private function ask($question, $example = NULL) {\n $this->e($question);\n if($example) { $this->e(\"\\t\" . 'Example: ' . $example); }\n echo '> ';\n $handle = fopen('php://STDIN', 'r');\n return trim(fgets($handle));\n }", "title": "" }, { "docid": "b33281b7b25f7152e1e39511a7bb6948", "score": "0.50487894", "text": "abstract function get_input();", "title": "" }, { "docid": "139deac1ca6f2ce346f794c4569ec8bb", "score": "0.50470847", "text": "function getCode();", "title": "" }, { "docid": "139deac1ca6f2ce346f794c4569ec8bb", "score": "0.50470847", "text": "function getCode();", "title": "" }, { "docid": "79d2c804c13f948eb90b0b3fbb6d701d", "score": "0.5042733", "text": "function getStationName($prompt, $options) {\n\t$station = ask($prompt, $options);\n\t\n\tif($station->value == 'NO_MATCH') {\n\t\tsay(\"Sorry, I dont recognize that station.\", array(\"voice\" => $options[\"voice\"]));\n\t\treturn getStationName($prompt, $options);\n\t}\n\t\n\t// Attempts over.\n\tif($station->value == '') {\n\t\tsay(\"Sorry, I did not get your response. Please try again later. Goodbye\", array(\"voice\" => $options[\"voice\"]));\n\t\thangup();\n\t}\n\t\n\tif($station->choice->confidence < CONFIDENCE_LEVEL) {\n\t\tsay(\"I think you said, \" . $station->value . \".\", array(\"voice\" => $options[\"voice\"]));\n\t\tif(confirmEntry($options[\"voice\"])) {\n\t\t\treturn $station->value;\n\t\t}\n\t\telse {\n\t\t\t_log(\"*** Caller rejected recognized input. ***\");\n\t\t\treturn getStationName($prompt, $options);\n\t\t}\n\t}\n\telse {\n\t\treturn $station->value;\n\t}\n}", "title": "" }, { "docid": "221f87ebeb0b46da6a80f5eda48a88d9", "score": "0.5037543", "text": "private function getAccessTokenFromUser()\n {\n printf(\"Open the following link in your browser:\\n%s\\n\", $this->client->createAuthUrl());\n print 'Enter verification code: ';\n\n $auth_code = trim(fgets(STDIN));\n\n return $this->client->fetchAccessTokenWithAuthCode($auth_code);\n }", "title": "" }, { "docid": "f7c4c02ccfdba39fdce03b14cbcf5a0a", "score": "0.503444", "text": "public function ask($question)\n {\n $this->output($question);\n $handle = fopen (\"php://stdin\",\"r\");\n $line = fgets($handle);\n\n return trim($line);\n }", "title": "" }, { "docid": "5e45a107525befeb65d77059a512658d", "score": "0.5032454", "text": "public function code(){\n $url = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx1974c1f0f7d6ca40&redirect_uri=http%3A%2F%2Fwcz.ittun.com%2Fthink%2Findex.php%2FAccredit%2Fifnull&response_type=code&scope=snsapi_userinfo&state=123#wechat_redirect';\n header(\"Location: $url\");\n }", "title": "" }, { "docid": "e51030ee4d67733029eb03733b31f970", "score": "0.5016769", "text": "function postcode_form () {\n\t\t// And the userchangepc page.\n\t\tglobal $THEUSER;\n\n\t\t$MPURL = new URL('yourmp');\n\t\t?>\n\t\t\t\t<br>\n<?php\n\t\t$this->block_start(array('id'=>'mp', 'title'=>'Find out about your Representative'));\n\t\t?>\n\t\t\t\t\t\t<form action=\"<?php echo $MPURL->generate(); ?>\" method=\"get\">\n<?php\n\tif (get_http_var('c4')) print '<input type=\"hidden\" name=\"c4\" value=\"1\">';\n\tif (get_http_var('c4x')) print '<input type=\"hidden\" name=\"c4x\" value=\"1\">';\n\t\tif ($THEUSER->constituency_is_set()) {\n\n\t\t\t$FORGETURL = new URL('userchangepc');\n\t\t\t$FORGETURL->insert(array('forget'=>'t'));\n\t\t}\n\t\t?>\n\t\t\t\t\t\t<p><strong>Enter your Australian postcode: </strong>\n\n\t\t\t\t\t\t<input type=\"text\" name=\"pc\" value=\"<?php echo htmlentities(get_http_var('pc')); ?>\" maxlength=\"10\" size=\"10\"> <input type=\"submit\" value=\"GO\" class=\"submit\"> <small>(e.g. 2340)</small>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<input type=\"hidden\" name=\"ch\" value=\"t\">\n\t\t\t\t\t\t</form>\n<?php\n\t\t$this->block_end();\n\t}", "title": "" }, { "docid": "22ab2f74f6a0ab94a7e4e1c8695276db", "score": "0.49803308", "text": "public function chooseQuestion();", "title": "" }, { "docid": "620f6b8e3204749b7127a4451155da01", "score": "0.49609613", "text": "public function getCodeInputDescription()\n {\n return $this->_('From the Google app on your phone.');\n }", "title": "" }, { "docid": "f12a214a379a1e1997fb1705840b5771", "score": "0.49608332", "text": "public function code()\n {\n HistoryHandler::getCurrencyRateByDate($_GET[\"date\"], $_GET[\"code\"]);\n }", "title": "" }, { "docid": "0fc3bd77d245c95aa7db208b8499b64b", "score": "0.49289477", "text": "function qa_approval_colour($code) {\n switch ($code) {\n case \"y\": return \"green\"; break;\n case \"n\": return \"red\"; break;\n case \"s\": return \"#E260E0\"; break;\n case \"p\": return \"blue\"; break;\n default: return \"\";\n } // switch\n}", "title": "" }, { "docid": "8f90ea3d33a1c7e81cff4a5df11d2522", "score": "0.49178842", "text": "public function getCode(){\n return $this->getParameter('code');\n }", "title": "" }, { "docid": "8f90ea3d33a1c7e81cff4a5df11d2522", "score": "0.49178842", "text": "public function getCode(){\n return $this->getParameter('code');\n }", "title": "" }, { "docid": "9d0b747c0c112a19086e72204a508497", "score": "0.4893009", "text": "public function postCode();", "title": "" }, { "docid": "fee5e4ae1fe87e9e8396c3e079866cb4", "score": "0.48894247", "text": "public function action()\n {\n $code = $this->input->get('code');\n if ($code) {\n $this->facebook_ion_auth->login();\n redirect('admin');\n } else {\n redirect('auth/login');\n }\n }", "title": "" }, { "docid": "32c1b26221bd90f6dc7b950d24540bb2", "score": "0.48695326", "text": "function gold_room() {\n print_r(\"This room is full of gold. How much do you take? \\n\");\n $choice = readline(\"> \");\n if (preg_match(\"/\\d/\", $choice)) {\n $how_much = (int)$choice;\n } else {\n dead(\"Man, learn to type a number.\");\n }\n\n if ($how_much < 50) {\n print_r(\"Nice, you're not greedy, you win! \\n\");\n exit(0);\n } else {\n dead(\"You greedy bastard!\");\n }\n}", "title": "" }, { "docid": "b1921a842cff5ae8d6f9d06042f1e128", "score": "0.4864006", "text": "private function promptYesNo($text, $default = \"Y\"){\n\t\treturn trim(strtolower($this->in($text,array('Y','n','q'), $default)));\n\t}", "title": "" }, { "docid": "7964a8b3ff57d1fdcce7482e23b44cad", "score": "0.4850472", "text": "protected function getCode()\n {\n return $this->request->get('code');\n }", "title": "" }, { "docid": "7c74ee205803e589e982c0f8c455f4ed", "score": "0.483837", "text": "function displayPrompt() {\n echo '(N)ew item, (R)emove item, (S)ave, (Q)uit : ';\n}", "title": "" }, { "docid": "aef5460f0739828a25816238231a0b0e", "score": "0.48227566", "text": "function qa_approval_status($code) {\n switch ($code) {\n case \"y\": return \"Approved\"; break;\n case \"n\": return \"Refused\"; break;\n case \"s\": return \"Skipped\"; break;\n case \"p\": return \"In progress\"; break;\n default: return \"\";\n } // switch\n}", "title": "" }, { "docid": "103f7d5ca4ab53af0faa8d839cf231a1", "score": "0.4807544", "text": "public function getGuess();", "title": "" }, { "docid": "7ed95877ea7cfddc7db99e25efc0ac48", "score": "0.4798902", "text": "function drawinputscreen($guesses)\n\t{\n\t\tprint \"<center><input type='text' name='guessletter'>\";\n\t\tprint \"Guess a letter. You have $guesses guesses left.\";\n\t\tprint \"<input type='submit' name='action' value='GUESS'>\";\n\t\tprint \"<input type='submit' name='next' value='NEXT PHRASE'>\";\n\t\tprint \"<input type='submit' name='reveal' value='REVEAL'></center>\";\n\t}", "title": "" }, { "docid": "4676491aef7838154e194eea25344084", "score": "0.47971758", "text": "public function ask($question)\n {\n $this->output->writeln($question);\n\n return $this->input->getInput();\n }", "title": "" }, { "docid": "083f6878f8c073d472394c5ab985b328", "score": "0.47827908", "text": "public static function input() {\n }", "title": "" }, { "docid": "9de89d0403cdc1901b93231812e70717", "score": "0.47592303", "text": "function show_on_demand_academy($what = \"premium_academy\", $amount = 1, $polozka = 'Členství v online programu Studio x51 academy PREMIUM + zkušební verze SocialSprinters - 1 Kč včetně DPH', $podminky)\n{\n\tglobal $CONF_XTRA, $CONF, $CONF_BASE;\n\t$getAppInfo = getAppInfo($aplikace_id);\n\tif(fetch_uri(\"action\",\"g\") == \"gopay\" && fetch_uri(\"id\",\"g\")) {\n\t\t$tdo = date(\"d.m.Y\", $getAppInfo[\"tdo\"]);\n\t\t$typ_platby = $getAppInfo[\"typ_platby\"];\n\t\t$delka_trvani = $getAppInfo[\"delka_trvani\"];\n\t}\n\t$aplikace_typ_id = $getAppInfo[\"aplikace_typ_id\"];\n\t\t\n\tob_start();\n?>\t\n\t<div id=\"PopPlatba\" class=\"PopWin PopWinWhite set_fakturace academy_platba hura<?echo fetch_uri(\"paid\",\"g\") == \"success\" ? \" schovat\" : \"\"?>\">\n\t\t<?\n/*\n\t\techo \"<p>cookie=\".$_COOKIE[\"_ssuser\"].\"</p>\"; \n\t\techo \"<p>\".date(\"Y-m-d h:i:s\", $_COOKIE[\"_ssuser\"] / 1000).\"</p>\";\n*/\t\t\n\t\t?>\n\t\t<form id=\"form_by_what_premium\" class=\"form_odberatel\">\n\t\t<input type=\"hidden\" name=\"aplikace_id\" value=\"0\" id=\"aplikace_id\" />\n\t\t<input type=\"hidden\" name=\"amount\" id=\"amount\" value=\"<?=$amount?>\" rel=\"<?=$amount?>\" />\n\t\t<input type=\"hidden\" name=\"amount_together\" id=\"amount_together\" value=\"<?= $CONF_XTRA[\"premium_cena_mesic\"] * $CONF_XTRA[\"premium_delka_trvani\"]?>\" />\n\t\t<input type=\"hidden\" name=\"typ_platby\" value=\"ON_DEMAND\" />\n\t\t<input type=\"hidden\" name=\"what\" value=\"<?=$what?>\" />\n\t\t<input type=\"hidden\" name=\"type\" value=\"setFakturace\" />\n<?\t\tforms_inputs_odberatel($_SESSION[\"user\"][APLIKACE_UNIQ_ID]); ?>\n<?\t\tif(fetch_uri(\"paid\",\"g\") == \"success\") {\n\t\t\tunset($_SESSION[\"xtra_premium\"]);\n?>\t\t\t<p class=\"title\"><?=txt(\"setting-platba_description-ss_premium_members-title-gratulace\")?></p>\t\t\n\t\t\t<button id=\"godashboard\" rel=\"premium\"><?=txt(\"setting-platba_description-ss_premium_members-button_vstup\")?></button>\n<?\t\t}\n\t\t\t// 3. parametr fce Login: url_new = \"on_demand\"; pro presmerovani na on_demand stranku!\n?>\t\t\n<!--\n\t\t\t<button id=\"bt_login\" class=\"login\" rel=\"premium\" onclick=\"Login('<?=$CONF[\"scope\"]?>', '<?=session_id()?>', 'on_demand_academy'); return false;\" type=\"submit\">with login <?=txt(\"setting-academy_upis-platba_login-provest_platbu\")?></button>\n-->\t\t\n\t\t<div class=\"polozky\">\n\t\t\t<h3>\n\t\t\t\tPoložky a ceny\n\t\t\t</h3>\n\t\t\t<div>\n\t\t\t\t <input type=\"checkbox\" disabled=\"disabled\" checked=\"checked\">\n\t\t\t\t <label for=\"frm-variants-225114\"><?=$polozka?></label>\n\t\t\t</div>\n\t\t\t<h3>Způsob platby</h3>\n\t\t\t<div>\n\t\t\t\t<label for=\"frm-payMethod-credit_card\">\n\t\t\t\t<input type=\"radio\" name=\"payMethod\" disabled=\"disabled\" checked=\"checked\" value=\"credit_card\">Online platební karta (ihned)\n\t\t\t\t<img src=\"https://form.fapi.cz/images/icons-payment-card.png?v=2\" width=\"231\" height=\"15\">\n\t\t\t</div>\n\t\t\t<h3>Obchodní podmínky</h3>\n\t\t\t<div>\n\t\t\t\t<input type=\"checkbox\" id=\"souhlas_podminky\" rel=\"y\" placeholder=\"<?=txt(\"form_check-err_musite_souhlas_s_obch_podminkami\")?>\">\n<!--\nMusíte souhlasit s obchodními podmínkami\n-->\n\t\t\t\t<label for=\"souhlas_podminky\">Souhlasím s <a href=\"<?=$podminky?>\" target=\"_blank\">obchodními podmínkami</a>.</label>\n\t\t\t</div>\n\t\t</div>\n\n\t\t<button id=\"bt_login\" class=\"login\" rel=\"premium\" type=\"submit\"><?=txt(\"setting-academy_upis-platba_login-provest_platbu\")?></button>\n\n\t\t</form>\n\t\t<div id=\"gateWayPaypal\"><?echo gateWayPaypalEmpty()?></div>\n\t\t\n\t</div>\n<?\n\treturn ob_get_clean();\n}", "title": "" }, { "docid": "378fe92a9db1a12b7328c2a7bf4a2fb3", "score": "0.4748513", "text": "public function answerAction()\n {\n $this->append([\n 'action' => 'talk',\n 'text' => 'Thanks for calling Nexmo order status hotline for demo\n the Basic Interactive Voice Response (IVR) use case.'\n ]);\n\n $this->promptSearch();\n }", "title": "" }, { "docid": "50035f09b9bb3391e7b6bc5f47b5bd59", "score": "0.4739646", "text": "function ask(string $question, string $default = ''): string\n{\n $answer = readline($question . ($default ? \" ({$default})\" : null) . ': ');\n\n if (!$answer) {\n return $default;\n }\n\n return $answer;\n}", "title": "" }, { "docid": "a8e35d5c4e1cd65b559a89a15ef04b0f", "score": "0.4736527", "text": "public function post_get_code()\n\t{\n\t\t$val = \\Model_Verification::validate('verification');\n\t\tif ( ! $val->run()) return $this->error_response($val->error());\n\n\t\t// send verify code by SMS\n\t\t$verify_code = $this->random_verify_code();\n\t\t// if ($this->send_SMS($verify_code) == 'error')\n\t\t// return $this->error_response('get verify code failed');\n\n\t\ttry\n\t\t{\n\t\t\t$verification = \\Model_Verification::forge(array(\n\t\t\t\t'verify_code' => $verify_code,\n\t\t\t\t'imei' => \\Input::post('imei'),\n\t\t\t\t'phone' => \\Input::post('phone'),\n\t\t\t\t'expiration' => time() + 300 // Add 5 minutes\n\t\t\t));\n\n\t\t\t// save verification\n\t\t\tif ( ! ($verification and $verification->save()))\n\t\t\t\treturn $this->error_response('Could not registered this imei');\n\n\t\t\treturn $this->success_response($verify_code);\n\t\t}\n\t\tcatch (\\Exception $e)\n\t\t{\n\t\t\treturn $this->error_response($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "cd06b9cc7c1adf4ecb746448280b36db", "score": "0.4734556", "text": "public function input()\n {\n return call_user_func_array('Zend\\Console\\Prompt\\Line::prompt', func_get_args());\n }", "title": "" }, { "docid": "d281935ba33b7b4cfd4a5d3eccfa2994", "score": "0.4732346", "text": "function user_module_path($question, $default = null) {\n $default_prompt = strlen($default)?\" [$default]\":\"\";\n while(true) {\n print \"$question$default_prompt: \";\n $result = trim(fgets(STDIN)); \n\n $value = strlen($result)?$result:$default;\n if(module_exists($value)) {\n print \"Selected $value\\n\";\n return module_path($value);\n }\n\n print \"Sorry, not a valid answer. Answer should be a valid module.\\n\";\n }\n}", "title": "" }, { "docid": "67b455bf7bb3353cf50c67970e4c5f21", "score": "0.4723161", "text": "function util_cli_input($prompt, $default='', array $options=null, $casesensitiveoptions=false) {\n echo $prompt;\n echo \"\\n: \";\n $input = fread(STDIN, 2048);\n $input = trim($input);\n if ($input === '') {\n $input = $default;\n }\n if ($options) {\n if (!$casesensitiveoptions) {\n $input = strtolower($input);\n }\n if (!in_array($input, $options)) {\n echo \"Incorrect value, please retry.\\n\"; // TODO: localize, mark as needed in install\n return util_cli_input($prompt, $default, $options, $casesensitiveoptions);\n }\n }\n return $input;\n}", "title": "" }, { "docid": "c4f5e9b4070829b86074c456999b6c44", "score": "0.46810207", "text": "function check_employee_code($checkcode)\n {\n if (isset($_REQUEST['id']) && $_REQUEST['id'] != '') \n {\n return DB::queryFirstField(\"SELECT code FROM \" . CFG::$tblPrefix . \"employee where code=%s and id!=%d\", $checkcode, $_REQUEST['id']);\n } \n else \n {\n return DB::queryFirstField(\"SELECT code FROM \" . CFG::$tblPrefix . \"employee where code=%s\", $checkcode);\n }\n /* 2nd Way*/\n /*\n $checkAvailability=DB::query(\"SELECT code FROM \".CFG::$tblPrefix.\"employee where code like '%\".$checkcode.\"%'\");\n $flag=(sizeof($checkAvailability)==0) ? \"true\" : \"false\";\n return $flag;\n */\n \n \n /* 1st Way */\n /*\n if($_SESSION['employee_code']!=\"\") { $checkcode=$_SESSION['employee_code']; }\n $checkAvailability=DB::query(\"SELECT code FROM \".CFG::$tblPrefix.\"employee where code like '%\".$checkcode.\"%'\");\n if(sizeof($checkAvailability)==0)\n {\n return $checkcode;\n }\n else\n {\n $appendDigit=(rand(0,100));\n $_SESSION['employee_code']=$checkcode.\"_\".$appendDigit;\n $this->check_employee_code($_SESSION['employee_code']);\n }\n */\n }", "title": "" }, { "docid": "2d1a8a0e8ee264783c0f7487f24b02c2", "score": "0.46788064", "text": "public function handle(): string\n {\n $practices = $this->command->user()->practiceQuestions()->get();\n\n if ($practices->isEmpty() || $practices->where('status', '!=', PracticeStatusEnum::Correct)->isEmpty()) {\n $this->command->warn('No question to ask.');\n $result = $this->command->confirm('Want to Add one?', true);\n\n return $result ? QAStatesEnum::AddQuestion : QAStatesEnum::MainMenu;\n }\n\n $this->drawProgressTable($practices);\n\n $this->askQuestion($practices);\n\n return $this->command->confirm('Continue?', true) ? QAStatesEnum::Practice : QAStatesEnum::MainMenu;\n }", "title": "" }, { "docid": "034043ad280a92b0668062ca50f90b61", "score": "0.46777397", "text": "public function askSecret(string $prompt): ? string\n {\n $this->stdout->write(\"\\033[32;49m\".$prompt);\n $this->stdout->write(\"\\033[97;49m> \", false);\n\n $stty = $this->sttyInstalled();\n\n if ($stty) {\n $mode = shell_exec('stty -g');\n shell_exec('stty -echo');\n }\n\n $input = $this->stdin->read();\n\n if ($stty) {\n shell_exec(\"stty {$mode}\");\n }\n \n $this->stdout->write(\"\\033[0m\\n\"); // reset + line break\n\n return $input;\n }", "title": "" }, { "docid": "7e19fca34cf3b0ac86be07741e533257", "score": "0.4671436", "text": "public function load_code($user_code)\n {\n //remove any non-ASCII and escape characters from the user code\n $user_code = preg_replace('/[^(\\x20-\\x7F)\\n]*/', '', $user_code);\n\n //strip any terminating characters that may appear in the user code\n $user_code = str_replace(self::USERCODE_TERMINATOR, '', $user_code);\n\n //instruct the UCS to begin recieving user code\n $this->send_raw_command('c '.self::USERCODE_TERMINATOR);\n\n //send the user code directly\n $this->send_raw_command($user_code);\n\n //terminate the user code\n $this->send_raw_command(self::USERCODE_TERMINATOR);\n\n //read any response from the command, and discard it\n $this->read_response();\n\n }", "title": "" }, { "docid": "415043f37e5d250eafa029f0471588f5", "score": "0.46693376", "text": "function informe_anual()\n{\n\techo \"No se ha creado el informe anual del presente a&ntilde;o\";\n}", "title": "" }, { "docid": "550765cbb8ce70f4ca37c5e7ed693761", "score": "0.46618417", "text": "function confirmEntry($voice) {\n\t$confirm = ask(\"Is that correct?\", array(\"choices\" => \"yes,no\", \"voice\" => $voice));\n\treturn $confirm->value == \"yes\" ? true : false;\n}", "title": "" }, { "docid": "038e1d541e9f0aa1b1d290c098fcc5a4", "score": "0.4658576", "text": "function drawInputBoxSuccess() {\n \t?>\n \t<section id=\"form-small\">\n \t<form action=\"index.php\" method=\"get\">\n \t<h2>More weather? Enter a zip code.</h1>\n\t<input type=\"text\" name=\"zip\">\n\t<input type=\"submit\" id=\"submit\">\n\t</section>\n <?php }", "title": "" }, { "docid": "6d0a5e0e059e1510c89ae7cc1ae82f00", "score": "0.46583676", "text": "function what_is(){ //will be executed if intent-name = \"what_is\", because $helper_config[\"intent-function\"] = true;\n global $helper;\n simple_response(\"Here is your result:\");\n basic_card($helper[\"parameters\"][\"animal\"], $helper[\"parameters\"][\"animal\"] . \"s are beatuiful\", \"https://example.com/\" . $helper[\"parameters\"][\"animal\"] . \".jpg\", \"cat from example.com\"); //on this link is no image\n suggestion_chips([\"grey \" . $helper[\"parameters\"][\"animal\"], \"white \" . $helper[\"parameters\"][\"animal\"] , \"brown\" . $helper[\"parameters\"][\"animal\"]]);\n}", "title": "" }, { "docid": "7e7fd0a6e0f82b7cea279a2591317647", "score": "0.46482047", "text": "private static function prompt(array $info): string\n {\n $prompt = $info['prompt'] ?? 'QUESTION?';\n $options = $info['options'] ?? [];\n\n if ($options) {\n if (($info['displayType'] ?? '') == 'list' &&\n self::isAssocArray($options)\n ) {\n $prompt .= \"\\n\";\n\n foreach ($options as $value) {\n $label = $value['label'] ?? $value;\n\n $prompt .= $label . \"\\n\";\n }\n\n $options = array_keys($options);\n } else {\n if (self::isAssocArray($options)) {\n $options = array_keys($options);\n }\n\n $prompt .= ' [' . implode('|', $options) . ']';\n }\n }\n\n do {\n self::echoMsg(\"\\n$prompt - \", ['newline' => false]);\n\n $stdin = fopen('php://stdin', 'r');\n $response = trim(fgets($stdin));\n\n //select value by a number instead of the real value.\n $selectByIndex = $info['selectByIndex'] ?? null;\n\n if ($selectByIndex && is_numeric($response)) {\n //index is started by 1.\n $response = $options[$response - 1] ?? $response;\n }\n\n if ($response && $options && !in_array($response, $options)) {\n self::echoMsg(\"Invalid option\");\n $valid = false;\n } else {\n $valid = true;\n }\n } while (!$valid);\n\n return $response;\n }", "title": "" }, { "docid": "926fedc8d23f5821610ab9323576a309", "score": "0.4648129", "text": "public function codeverificationAction() {\n $arrayParams = $this->getRequest ()->getParams ();\n /**\n * Get customer details.\n * Get customer id.\n */\n $customerData = Mage::getSingleton ( 'customer/session' )->getCustomer ();\n $customerId = $customerData->getId ();\n if (isset ( $arrayParams ['code'] )) {\n if (! isset ( $_SESSION )) {\n /**\n * Session start.\n */\n session_start ();\n }\n /**\n * Check condition if session code and\n * nexmo code is same or not\n */\n if ($_SESSION ['code'] == $arrayParams ['code']) {\n $text = 1;\n if (! isset ( $arrayParams ['payout'] )) {\n /**\n * Set mobile verification flag.\n */\n $data = array (\n 'mobile_verified_profile' => 'verified' \n );\n } else {\n /**\n * Set payment verification flag.\n */\n $data = array (\n 'mobile_verified_payment' => 'verified' \n );\n }\n /**\n * Get customer details from customerphoto collection\n *\n * @var $customerId\n * @var unknown\n */\n $customerDetails = Mage::getModel ( 'airhotels/customerphoto' )->load ( $customerId )->addData ( $data );\n $customerDetails->setId ( $customerId )->save ();\n } else {\n /**\n * Set text as 0.\n * \n * @var $text\n */\n $text = 0;\n }\n }\n echo $text;\n }", "title": "" }, { "docid": "ad7f603634d28321a503e92b60fec1d9", "score": "0.46463352", "text": "public function getCode()\n {\n return $this->request->get('code');\n }", "title": "" }, { "docid": "84f772547edf9ed7c06c32af0eb22895", "score": "0.46457094", "text": "public function getCode(): string;", "title": "" }, { "docid": "5de765c30bb00f6aa6af704795986588", "score": "0.46405503", "text": "public function promptCredits()\n {\n//.message-notice\n//.message-information\n//.message-ok\n//.message-warning\n//.message-error\n\n $prompt = null;\n\n $prompt = $prompt . '\n<div class=\"message-body\" style=\"max-width:600px;\">\n ' . $GLOBALS[ 'LANG' ]->sL( 'LLL:EXT:radialsearch/lib/userfunc/locallang.xml:promptCredits' ) . '\n</div>';\n\n return $prompt;\n }", "title": "" }, { "docid": "ed197e7210bf75df32431bd2e738ec00", "score": "0.46381894", "text": "function syntax(){\n print \"Syntax: challenge_8.php <server_name> <domain_name>\\n\\n\";\n exit;\n}", "title": "" }, { "docid": "687c19097bc9b806029fa677549fefd8", "score": "0.46252224", "text": "protected function getExpectedCode()\n {\n $options = $this->session->get($this->key, array());\n\n if (is_array($options) && isset($options['phrase'])) {\n return $options['phrase'];\n }\n\n return null;\n }", "title": "" }, { "docid": "c57ef05d96aada5709799f3352af64e0", "score": "0.46166575", "text": "abstract function code();", "title": "" }, { "docid": "9c5a774b0368f98a84a764b47fc36b5c", "score": "0.46144637", "text": "function showAuthority($input,$option=0){\n global $conn;\n $sql=\"SELECT `BoardName` FROM `Board` WHERE `UserID`=? AND `UserID` not in ('admin')\";\n $result = query($conn,$sql,array($input),\"SELECT\");\n $resultCount = count($result);\n if($resultCount <= 0){\n $sql=\"SELECT `IsAdmin` FROM `Users` WHERE `UserID`=?\";\n $result = query($conn,$sql,array($input),\"SELECT\");\n $resultCount = count($result);\n if($resultCount <= 0){\n $authority=0;\n }else if($result[0][0]){\n $authority=3;\n }else{\n $authority=1;\n }\n }\n else{\n $authority=2;\n }\n if($option){\n return $authority;\n }else{\n $rtn = successCode(\"Successfully show.\",$authority);\n echo json_encode($rtn);\n }\n }", "title": "" }, { "docid": "8da3ba0968ce1721699fe50814d8ef9e", "score": "0.46092495", "text": "public function askFirstname() {\n $this->ask('Hello! What is your firstname?', function(Answer $answer) {\n $this->firstname = $answer->getText();\n $this->say('Nice to meet you ' . $this->firstname);\n $this->askEmail();\n });\n }", "title": "" }, { "docid": "11c0857aa8859ea48b471e56c2774ce2", "score": "0.46001405", "text": "public function getConfirmInput();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.45976216", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.45976216", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.45976216", "text": "public function getCode();", "title": "" }, { "docid": "a3c818802d46e3ab8f2d84bc1c2b07b3", "score": "0.45976216", "text": "public function getCode();", "title": "" }, { "docid": "441cd0985c0326d6a7e1a8d932854fc0", "score": "0.45968795", "text": "public function code(): string;", "title": "" }, { "docid": "5b132f4c0c925dcca2345490a271faba", "score": "0.4596631", "text": "public function prompt(string $msg)\n {\n return $msg;\n }", "title": "" }, { "docid": "974b6262fb5ec07a387e95a9fccdfe4c", "score": "0.4592476", "text": "function menu()\n{\n echo \"*********************************************\\n\";\n echo \"1) Agregar un dueño a la disquetera. \\n\";\n echo \"2) Abrir disquetera. \\n\";\n echo \"3) Cerrar disquetera. \\n\";\n echo \"4) Verificar si la disquetera esta abierto. \\n\";\n echo \"5) Mostrar Informacion de la diquetera. \\n\";\n echo \"6) Salir. \\n\";\n echo \"**********************************************\\n\";\n\n // Ingreso y lectura de la opcion\n echo \"Ingrese una opcion: \";\n $opcion = (int) trim(fgets(STDIN));\n\n return $opcion;\n}", "title": "" }, { "docid": "f24ebfc4793a2c91649076336e3b84c3", "score": "0.4591285", "text": "public function ask()\n {\n // Modify data\n $this->data['page_info']['title'] = SITE_NAME . ' - Questionnez ' . SITE_NAME;\n\n // Load view\n $this->view('pages/ask.php', $this->data);\n }", "title": "" }, { "docid": "7a1b6ec15bf324bbf19fc654906f8743", "score": "0.45875105", "text": "function fokus($kod){\nif($kod=='PPS4') $ret='Pengurusan Diri';\nif($kod=='PPS5') $ret='Tingkah Laku Kurang Sopan';\nif($kod=='PPS1') $ret='Hormat Menghormati';\nif($kod=='PPS3') $ret='Kepimpinan';\nif($kod=='PPS2') $ret='Kemahiran Sosial';\nif($kod=='PD3') $ret='Vandalisme';\nif($kod=='PD5') $ret='Rokok';\nif($kod=='PD6') $ret='Tidak Penting Masa';\nif($kod=='PD1') $ret='Buli';\nif($kod=='PD7') $ret='Tingkah Laku Jenayah';\nif($kod=='PD4') $ret='Ponteng';\nif($kod=='PD2') $ret='Kenakalan';\nif($kod=='PD8') $ret='Tingkah Laku Lucah';\nif($kod=='PK1') $ret='Hala Tuju Kerjaya';\nif($kod=='PK4') $ret='Pemilihan Bidang Kerjaya';\nif($kod=='PK6') $ret='Penyebaran Maklumat Kerjaya';\nif($kod=='PK5') $ret='Pengetahuan Berkaitan Kerjaya';\nif($kod=='PK3') $ret='Inventori Personaliti';\nif($kod=='PK2') $ret='Inventori Nilai Kerjaya';\nif($kod=='PK7') $ret='Ujian Minat Kerjaya';\nif($kod=='PKM5') $ret='Masalah Keluarga';\nif($kod=='PKM2') $ret='Kemahiran Belajar';\nif($kod=='PKM7') $ret='Perkauman';\nif($kod=='PKM4') $ret='Komunikasi';\nif($kod=='PKM1') $ret='Jati Diri';\nif($kod=='PKM6') $ret='Pengurusan Emosi';\nif($kod=='PKM9') $ret='Seksual';\nif($kod=='PKM8') $ret='Keremajaan';\nif($kod=='PKM3') $ret='Kerohanian';\n\n\nreturn $ret;\n}", "title": "" }, { "docid": "fde3abbd66da7d401726afa092299549", "score": "0.45853353", "text": "public function in() {\n if ($this->post(\"pin\")) {\n S::loginWithPin($this->post('pin'));\n } else {\n S::loginWithPassword(\n $this->post('username'), $this->post('password')\n );\n }\n\n return \"\";\n }", "title": "" }, { "docid": "222c4dacd93c13cf2567bc93cdfa6d5e", "score": "0.45808393", "text": "private function prompt_site_input( InputInterface $input, OutputInterface $output ): ?string {\n\t\tif ( $input->isInteractive() ) {\n\t\t\t$question = new Question( '<question>Enter the site ID or URL to retrieve the error log for:</question> ' );\n\t\t\t$question->setAutocompleterValues( \\array_map( static fn( object $site ) => $site->url, get_pressable_sites() ?? array() ) );\n\n\t\t\t$site = $this->getHelper( 'question' )->ask( $input, $output, $question );\n\t\t}\n\n\t\treturn $site ?? null;\n\t}", "title": "" }, { "docid": "7f579acd665f25cbffe5e2a7fa3ce5f8", "score": "0.45757848", "text": "function balise_GET_ACCESSKEY($p) {\n\tglobal $accesskey;\n\tif(!$accesskey) $accesskey = 97;\n\t$key = $accesskey<=122?chr($accesskey):'';\n\t$p->code = \"'$key'\";\n\treturn $p;\n}", "title": "" }, { "docid": "c70dacd86bbda2ada06dcbd177324b50", "score": "0.4570277", "text": "function check_code($code){\n\t$pdo = connect_db();\n\n\t$query = $pdo->prepare(\"SELECT code from shortened where code = ? Limit 1\");\n\t$query->execute([$code]);\n\n\treturn $query->fetch();\n}", "title": "" }, { "docid": "5b0e6524023475604dbd7dd5f62b01e6", "score": "0.45662856", "text": "public function getOpaCode(): string\n {\n return $this->opaCode;\n }", "title": "" }, { "docid": "2605c254d05e5c4dce2d7459519c8412", "score": "0.4564522", "text": "function SetCode($code='') { $this->code = $code; }", "title": "" }, { "docid": "7fd757434e13ebff22352194a1aadbd6", "score": "0.4562103", "text": "public function validInnCode(): string\n {\n return $this->generateInnCode();\n }", "title": "" }, { "docid": "4ca7d18a16b17ab278384f6e84f29b6c", "score": "0.45604378", "text": "function pco_section_text_fn() {\n\techo '<p>Enter your key and secret below.</p>';\n}", "title": "" }, { "docid": "e9cba4cad396a8268afaaed92b9db634", "score": "0.45582077", "text": "public function verify_phonecode()\n {\n\t $code=$_POST['code'];\n\t $secret=$_POST['authcode'];\n\n\t $checkResult = $this->googleauthenticator->verifyCode($secret, $code, 2); // 2 = 2*30sec clock tolerance\n\n\t\t\t\tif ($checkResult) {\n\t\t\t\t\t \n\t\t\t $_SESSION['verified']= $secret; \n\t\t\t\t\t redirect('dashboard');\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\tredirect('auth');\n\t\t\t\t}\n\t \n\t }", "title": "" }, { "docid": "b0a19fe7e547bee0f7a18ef74afc5e8f", "score": "0.45580038", "text": "function vowelOrConsonant($input)\n{\n try {\n if (!ctype_alpha($input)) {\n throw new Exception(\"An alphabet should be entered\");\n }\n if ($input == 'a' || $input == 'e' || $input == 'i' || $input == 'o' || $input == 'u') {\n echo \"The alphabet entered is: Vowel <br>\";\n } else {\n echo \"The alphabet entered is: Consonant <br>\";\n }\n } catch (Exception $ex) {\n echo $ex->getMessage() . \"<br>\";\n }\n}", "title": "" }, { "docid": "159917a0d128cc5513c45ab4559d467b", "score": "0.4550752", "text": "function initialsearch(){\n\t\techo \"<p>Please enter the ISBN-10 or ISBN-13 for your book.</p><input type='text' value='' id='isbn' name='isbn' size='30' />&nbsp;\";\n\t\techo \"<input type='submit' name='addbooksearch' value='Search' />&nbsp;\";\n\t\techo \"<input type='submit' name='manual' value='I don&#39;t have an ISBN' />\";\n\t}", "title": "" }, { "docid": "b2489478e88a0f39fbbe1681c059cec4", "score": "0.45501563", "text": "public function RequestAuthenticationPage() : string {\n\t\t$requestData = (object) [\n\t\t\t\"codeChallenge\"=> MPCHelper::CreateChalangeCode(),\n\t\t\t\"osType\" => \"string\",\n\t\t\t\"idfa\" => \"string\",\n\t\t\t\"imei\"=> \"string\",\n\t\t];\n\n\t\ttry {\n\t\t\t$mp = new MPCProtocol($this->config);\n\t\t\t$mp->AddEventHandler(_MPCPROTOCOL_ONDATASENT_, function ($args) { $this->onDataSent($args); });\n\n\t\t\t$res = $mp->ApiExecute(self::api_reqauthpage, $requestData);\n\t\t\t$data = $res->getData();\n\t\t\tif (!property_exists($data, 'url')) {\n\t\t\t\tthrow new \\Exception('Exekusi API tidak mengembalikan variable url yang diinginkan');\n\t\t\t}\n\n\t\t\treturn $data->url;\n\t\t} catch (\\Exception $ex) {\n\t\t\tthrow $ex;\n\t\t}\n\t}", "title": "" }, { "docid": "a8742609268f6c69f23127de2210f363", "score": "0.45486432", "text": "public function action($stdin) {\n $key = trim(fgets($stdin));\n if ($key) {\n $key = $this->translateKeypress($key);\n echo chr(27).chr(91).'H'.chr(27).chr(91).'J'; //^[H^[J\n switch ($key) {\n case \"UP\":\n if ($this->positionX < 5 && $this->positionX > 1) {\n $this->positionX--;\n if($this->checkBonus($this->positionX,$this->positionY)){\n echo 'You win';die();\n };\n $this->render($this->positionX,$this->positionY);\n }else {\n echo 'Out of range';\n }\n break;\n case \"RIGHT\":\n if ($this->positionY < 6) {\n $this->positionY++;\n if($this->checkBonus($this->positionX,$this->positionY)){\n echo 'You win';die();\n };\n $this->render($this->positionX,$this->positionY);\n }else {\n echo 'Out of range';\n }\n break;\n case \"DOWN\":\n if ($this->positionX > 1 && $this->positionX < 5) {\n $this->positionX++;\n if($this->checkBonus($this->positionX,$this->positionY)){\n echo 'You win';die();\n };\n $this->render($this->positionX,$this->positionY);\n }else {\n echo 'Out of range';\n }\n break;\n default:\n die();\n }\n }\n }", "title": "" }, { "docid": "cb1ba642a584b24a8d2e41fbf081cbcc", "score": "0.45433655", "text": "function readinput() {\n\n // get number of employees and cashbox balance \n $cashbox_bal = readline(\"Cashbox balance: \");\n $no_of_emps = readline(\"Employees Number: \");\n\n for($i = 0; $i < $no_of_emps; $i++) {\n $emp = readline(\"Employee's data (emp_no emp_type salary loan incentive)\");\n $emps[] = $emp;\n }\n }", "title": "" }, { "docid": "33821b00bafae245cd96f0b891690392", "score": "0.45375493", "text": "public function actionAsk() {\n header('Content-type: application/json');\n $json = array('isTimeout' => UserWeb::instance()->isGuest);\n if ($json['isTimeout']) {\n $json['backURL'] = $this->createUrl('/parser/authenticate/login');\n }\n echo CJSON::encode($json);\n }", "title": "" }, { "docid": "a9c86a554ab292d589f8afc1b91fa7e1", "score": "0.45346332", "text": "public static function handleAuthorizationResponse() : void {\n if (isset($_GET['error_reason'])) {\n echo 'Error requesting authorization token, reason: ' . ($_GET['error'] ?? 'unknown') . '<br />';\n die($_GET['error_description'] ?? '');\n }\n\n if (empty($_GET['code'])) {\n die(\"Unable to obtain code\");\n }\n\n $authCode = trim($_GET['code']);\n\n echo \"🔑 Congratulations, the authorization code was retrieved!<br />\";\n echo \"<pre><code>$authCode</code></pre>\";\n }", "title": "" }, { "docid": "15f132b9ba4f0df9b071ac44093401e5", "score": "0.45307276", "text": "function drawInputBoxError() {\n \t?>\n \t<section id=\"form-small\">\n \t<form action=\"index.php\" method=\"get\">\n \t<h2>Zip code, please.</h1>\n\t<input type=\"text\" name=\"zip\">\n\t<input type=\"submit\" id=\"submit\">\n\t</section>\n <?php }", "title": "" }, { "docid": "1b7653572eaa405a163d44104cdd32ac", "score": "0.4522623", "text": "function verifycodeConfirm($reason = null) {\r\n $this->checkPermission(User::_TYPE_TEACHER);\r\n\r\n if ($this->Session->check('User.id') && $reason != null && ($reason == self::_REASON_LASTIP || $reason == self::_REASON_TEMP_LOCKED)) {\r\n $this->set(\"title_for_layout\", \"Verifycode確認\");\r\n\r\n if ($this->request->is('post')) { //if answer is entered\r\n /* encode answer */\r\n $answer = sha1($this->Session->read('User.Username') . \"+\" . $this->request->data['Teacher']['Answer'] . \"+\" . $this->Session->read('User.FilterChar'));\r\n /* end of endcoding answer */\r\n\r\n /* check answer */\r\n $id = $this->Teacher->find(\"first\", array(\r\n 'fields' => 'id',\r\n 'conditions' => array(\r\n 'user_id' => $this->Session->read('User.id'),\r\n 'Answer' => $answer,\r\n )\r\n ));\r\n\r\n if ($this->Teacher->getNumRows() > 0) { //if answer is correct\t\t\t\t\t\r\n if ($reason == self::_REASON_LASTIP) {\r\n /* save new ip */\r\n $this->Teacher->id = $id['Teacher']['id'];\r\n $this->Teacher->save(array(\r\n \"Teacher\" => array(\r\n \"LastIP\" => $this->request->clientIp(),\r\n )\r\n ));\r\n\r\n /* end saving new ip */\r\n } else if ($reason == self::_REASON_TEMP_LOCKED) {\r\n /* unlock this user */\r\n $Users = new UsersController;\r\n $Users->constructClasses();\r\n $Users->unlockUser($this->Session->read('User.id'));\r\n /* end of unlocking user */\r\n\r\n /* delete Login session */\r\n if ($this->Session->check('Login.WrongNum')) {\r\n $this->Session->delete('Login');\r\n }\r\n /* end of deleting Login session */\r\n }\r\n\r\n $this->updateLastActionTime($this->Session->read('User.id'));\r\n\r\n $this->redirect(array(\r\n 'controller' => 'teachers',\r\n 'action' => 'homepage'\r\n ));\r\n } else { //if answer is incorrect\r\n if ($reason == self::_REASON_TEMP_LOCKED) {\r\n $this->redirect(array(\r\n 'controller' => 'users',\r\n 'action' => 'login'\r\n ));\r\n } else {\r\n $this->Session->setFlash(__('秘密の答えは正しくない。'));\r\n }\r\n }\r\n /* end of check answer */\r\n }\r\n\r\n $question = $this->Teacher->find(\"first\", array(\r\n 'fields' => 'SecretQuestion',\r\n 'conditions' => array(\r\n 'user_id' => $this->Session->read('User.id')\r\n )\r\n ));\r\n if ($this->Teacher->getNumRows() > 0) {\r\n $message = \"\";\r\n if ($reason == self::_REASON_TEMP_LOCKED) {\r\n $message = \"あなたはあなたのアカウントは一時的にロックされたから、<br>Verifycodeを確認してください。\";\r\n } else if ($reason == self::_REASON_LASTIP) {\r\n $message = \"あなたのIPアドレスと前回のIPアドレスが間違うから、<br>Verifycodeを確認してください。\";\r\n }\r\n $this->set('reason', $message);\r\n $this->set('data', $question);\r\n }\r\n } else {\r\n return $this->redirect(array(\r\n 'controller' => 'users',\r\n 'action' => 'login'\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "56063dad94e1454751488e7d2eabfa3e", "score": "0.45204115", "text": "function user_yesno($question) {\n while(true) {\n print \"$question [Y/n]: \";\n $result = trim(fgets(STDIN));\n return (0 !== stripos($result, \"n\"));\n }\n}", "title": "" }, { "docid": "47a718f031e7a41f75f1ea041d37e150", "score": "0.45196828", "text": "public function getCode() : string;", "title": "" }, { "docid": "c8a244465f08a9a9ea8bebf39975b64a", "score": "0.4519297", "text": "function get_input_option()\n\t{\n\t\t\n\t\t$google_details=$this->util->get_settings();\n\t\t\n\t\t$client_id = $google_details->google_import_client_id;\n\t\t$client_secret = $google_details->google_import_client_secret;\n\t\t\n\t\t\n\t\t$mysite_url = $this->config->item('site_url').\"/import/google_oauth_import_friend\";\n\t\t\n\t\t\t\n\t\t\t\n\t\t$state = sha1(uniqid(mt_rand(), true));\n\t\t$this->session->set_userdata('state',$state);\n\t\t\n\t\t$params = array(\n\t\t\t'client_id' => $client_id,\n\t\t\t'redirect_uri' => $mysite_url,\n\t\t\t'state' => $state,\n\t\t\t'approval_prompt' => 'force',\n\t\t\t'scope' => 'https://www.google.com/m8/feeds/',\n\t\t\t'response_type' => 'code'\n\t\t);\n\t\t$dialog_url = \"https://accounts.google.com/o/oauth2/auth?\".http_build_query($params);\n\n\t\t$data['dialog_url']=$dialog_url;\n\t\t\n\t\t/********************* end***************************************/\n\t\t\n\t\t$this->load->view('friend_invitation_option',$data);\n\t}", "title": "" }, { "docid": "0ad31713651bb195513b1509b94dab70", "score": "0.45181382", "text": "function jump()\n{\n $appid = 'wx87fb4896ee814b3d';\n $secret = '4814aea67055c9258fa31ee5f1a3bcfa';\n $code = $_GET['code'];//获取code\n //$state = $_GET['state']; //获取参数\n $weixin = file_get_contents(\"https://api.weixin.qq.com/sns/oauth2/access_token?appid=$appid&secret=$secret&code=$code&grant_type=authorization_code\");//通过code换取网页授权access_token\n $jsondecode = json_decode($weixin); //对JSON格式的字符串进行编码\n $array = get_object_vars($jsondecode);//转换成数组\n\n $openid = $array['openid'];//输出openid\n\n if ($openid) {\n //你的业务逻辑\n //跳转\n echo 'success||||||'.$openid;\n //header('Location:http://www.baidu.com');\n }\n}", "title": "" }, { "docid": "18d68e5099025763deb50a94a12d2d4b", "score": "0.4516667", "text": "public function activationCode();", "title": "" }, { "docid": "affd46bdffeb49229318b9a2b90c72dd", "score": "0.45138597", "text": "public function checkCode(Request $request, User $user)\n {\n $fields = $request->validate([\n 'code' => 'numeric'\n ]);\n\n $code = Code::where('code', bcrypt($fields['code']))\n ->latest();\n\n if (!$code) {\n return response([\n 'message' => 'Wrong code',\n ], 401);\n }\n\n if ($code->user_id === $user->id) {\n return response([\n 'user' => $user,\n ], 200);\n } else {\n return response([\n 'message' => 'Incorrect user',\n ], 401);\n }\n }", "title": "" }, { "docid": "e934c97a6b583eea879cfb2104667dab", "score": "0.45121294", "text": "function askDomain(string $text, ?string $default = null, ?array $suggestedChoices = null): ?string\n{\n $text = parse($text);\n $domain = cleanUpWhitespaces(ask(\" $text \", $default, $suggestedChoices));\n if ($domain === 'exit') {\n writebox('Canceled, nothing was written', 'red');\n return 'exit';\n }\n if ($domain) {\n return $domain;\n }\n return null;\n}", "title": "" } ]
1b42485b22680d74c6b5719df2e12b3f
Store a newly created resource in storage. POST /posts
[ { "docid": "29595c1853ab01db2c9b4d8884b947b6", "score": "0.73653185", "text": "public function store()\n\t{\n\t\t$input = Input::only('post');\n\t\t$this->postForm->validate($input);\n\n\t\t$post = new Post($input);\n\t\t$user = User::find(Auth::id());\n\t\t$post = $user->posts()->save($post);\n\n\t\tFlash::overlay('Post Success!', 'Good Job');\n\t\treturn Redirect::back();\n\t}", "title": "" } ]
[ { "docid": "bfc1c7e4df66c8d5147d0aa2516b86ce", "score": "0.7557523", "text": "public function store(StorePostRequest $request)\n {\n $attributes = request()->except(['tags']);\n\n $attributes['featured_image'] = request('featured_image')->store('featured-images');\n\n $post = auth_user()->posts()->create($attributes);\n\n $post->tags()->sync(request('tags'));\n\n return redirect('/admin/posts');\n }", "title": "" }, { "docid": "4a4f0a44663cf5d92a6347c72aa09f35", "score": "0.74440885", "text": "public function store(Request $request)\n {\n $request['title'] = strtolower(request('title'));\n $this->validate($request, [\n 'title' => 'required|unique:posts|max:100',\n 'ingredients' => 'required',\n 'directions' => 'required',\n 'image' => 'file|max:40000|mimes:jpeg,gif,png,svg,bmp',\n ]);\n\n $path = empty(request('image')) ? null : $request->file('image')->store(null, 'google');\n\n Post::create([\n 'title' => request('title'),\n 'ingredients' => request('ingredients'),\n 'directions' => request('directions'),\n 'slug' => str_slug($request->title, '-'),\n 'user_id' => auth()->id(),\n 'image' => $path,\n ])->tags()->attach($request->tag);\n Alert::success('Recipe has been published');\n // session()->flash('success', 'Recipe has been published');\n return redirect()->route('posts.index');\n }", "title": "" }, { "docid": "fdc6d61d9a060246122882cb8d0e7cfd", "score": "0.7364083", "text": "public function store(StorePostRequest $request)\n {\n $validated = $request->validated();\n\n $post = new Post();\n $post->user_id = auth()->user()->id;\n $post->title = $validated['title'];\n $post->slug = $validated['slug'];\n $post->content = $request->content;\n\n if($request->hasFile('image')){\n if($request->file('image')->isValid()){\n // Get image file\n $image = $request->file('image');\n\n // Make a image name based on user name and current timestamp\n $name = Str::slug($request->input('title')).'_'.time();\n\n $extension = $request->image->extension();\n\n $request->image->storeAs('/public/posts', $name.\".\".$extension);\n $url = Storage::url('posts/'.$name.\".\".$extension);\n\n $post->thumbnail = $url;\n }\n }\n\n $post->save();\n\n if($request->tags){\n $tags = explode(',', $request->tags);\n\n foreach($tags as $tag){\n $newPostTag = new PostTag;\n $newPostTag->post_id = $post->id;\n $newPostTag->tag = $tag;\n $newPostTag->save();\n }\n }\n\n if($post){\n return response()->json(array('success' => true, 'msg' => 'New post created!'));\n }else{\n return response()->json(array('success' => false, 'msg' => 'Something went wrong on the system, Please try again!'));\n }\n }", "title": "" }, { "docid": "3945138f55f761dffc9804afd800c724", "score": "0.73318475", "text": "public function store(StorePostRequest $request)\n {\n $post=Post::create([\n 'title' => $request->title,\n 'content' => $request['content'],\n 'slug' => Str::slug($request->title),\n 'user_id' => auth('sanctum')->user()->id,\n 'is_published' => $request->is_published??true,\n ]);\n return (new PostResource($post))\n ->additional(['links' => [\n 'self' => url()->full(),\n ]])->response()->setStatusCode(201);\n }", "title": "" }, { "docid": "d6dda67e10cd7fd041f83adbabbc7ab1", "score": "0.7325644", "text": "public function store()\n {\n // $post = new Post();\n // $post->title = request('title');\n // $post->body = request('body');\n // //save it to the database\n // $post->save();\n\n $this->validate(request(), [\n 'title' => 'required',\n 'body' => 'required',\n ]);\n \n // Post::create(request(['title', 'body']));\n Post::create([\n 'title' => request('title'),\n 'body' => request('body'),\n 'user_id' => auth()->id()\n ]);\n\n session()->flash(\n 'message', 'Your post has now been published.'\n );\n\n\n //redirect\n return redirect('/posts');\n }", "title": "" }, { "docid": "db31e3842bd772db1df025817a5f7126", "score": "0.7320335", "text": "public function store(PostRequest $request)\n {\n $attr = $request->all();\n\n // assign title to the slug\n $attr['slug'] = \\Str::slug(request('title'));\n $attr['category_id'] = request('category');\n\n\n // create new post\n $post = auth()->user()->posts()->create($attr);\n\n $post->tags()->attach(request('tags'));\n\n session()->flash('success', 'The Post was creates');\n // session()->flash('error', 'The Post was creates');\n\n return redirect('posts');\n // return back();\n }", "title": "" }, { "docid": "0caf167a92445c3fd34ad7e8e3733578", "score": "0.7284", "text": "public function store(Request $request)\n {\n $data = $request->all();\n\n $post = Post::create($data);\n\n $postInformation = new PostInformation;\n $postInformation->fill([\n 'post_id' => $post->id,\n 'description' => $data['description'],\n 'slug' => Str::slug($post->title)\n ]);\n $postInformation->save(); \n \n $tag = new Tag;\n $tag -> fill ([\n 'tagtitle' => $data['tagtitle'],\n 'slug' => Str::slug($post->title)\n ]);\n $tag->save(); \n $tag -> posts() -> attach($post);\n\n return redirect('/posts');\n }", "title": "" }, { "docid": "371c510b87b9ec37c5093c15d37011cd", "score": "0.7283038", "text": "public function store(CreatePostRequest $request)\n {\n $data = $this->extractData($request);\n $data['image'] = $request->image->store('posts');\n $post = Post::create($data);\n $post->tags()->attach($request->tags);\n session()->flash('success', 'Post Created Successfully');\n return redirect(route('post.index'));\n }", "title": "" }, { "docid": "407dc476576dc251fa428dd1df618f98", "score": "0.7276264", "text": "public function store()\n {\n $post = new Post();\n $post->title = Input::get('title');\n $post->body = Input::get('content');\n\n $author = User::find(Input::get('author'));\n\n $post->author()->associate($author);\n\n $post->save();\n return Redirect::route('posts.show', $post->id);\n }", "title": "" }, { "docid": "7c5e988404c9af02ceab6d6b8bb265b5", "score": "0.7263349", "text": "public function store(PostRequest $request)\n {\n $post = $request->user()->posts()->create($request->validated());\n\n $post->tags()->sync($request->tags);\n\n return redirect()->route('posts.show', $post);\n }", "title": "" }, { "docid": "499c00dffb4aec16826f48d15291ec05", "score": "0.72518766", "text": "public function store()\n {\n $attributes = request()->validate([\n 'title' => 'required|min:5|max:255',\n 'body' => 'required'\n ]);\n\n\n Post::create([\n 'title' => $attributes['title'],\n 'body' => $attributes['body']\n ]);\n\n return response()->json(['message' => 'post created successfully']);\n }", "title": "" }, { "docid": "fb8cf0f2cfb2730d9e7b8821eae649a4", "score": "0.72368836", "text": "public function store(Request $request)\n {\n $post = new Posts();\n $post->title = $request->get('title');\n $post->description = $request->get('description');\n $post->body = $request->get('body');\n $post->slug = str_slug($post->title);\n $post->author_id = $request->user()->id;\n\n // thumbnail upload\n if ($request->file('images')){\n $fileName = str_random(30);\n $request->file('images')->move(\"img/\", $fileName);\n } else {\n $fileName = $post->images;\n }\n\n $post->images = $fileName;\n if ($request->has('save')){\n // for draft\n $post->active = 0;\n $message = 'Post saved successfully';\n } else {\n // for posts\n $post->active = 1;\n $message = 'Post published successfully';\n }\n $post->save();\n //return redirect('admin/posts/editpost/'.$post->slug)->withMessage($message);\n return redirect('admin/posts/allposts/');\n }", "title": "" }, { "docid": "b65d1261024745e2d76f077b092208aa", "score": "0.7235222", "text": "public function store(Request $request)\n {\n $user_id = Auth::user()->id;\n $post = new Post;\n $post->title = $request->title;\n $post->article = $request->article;\n $post->user_id = $user_id;\n $post->slug = $request->slug;\n $post->category_id = $request->category;\n $post->save();\n\n $post->tags()->sync($request->tags, false);\n\n $this->uploadImages($post->id);\n\n Session::flash('success', 'You Created New Article: ' . $post->title);\n\n return redirect()->route('home');\n }", "title": "" }, { "docid": "d6fdf73be7674a583d1f66910a2500bf", "score": "0.72332054", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required',\n 'body' => 'required',\n 'tag_id' => 'nullable|exists:tags,id'\n ]);\n $request['user_id'] = auth()->id();\n $post = Post::create($request->all());\n if ($request['tag_id']) {\n $post->tags()->attach([\n 'tag_id' => $request['tag_id']\n ]);\n }\n if ($request->expectsJson()) {\n return $post;\n }\n return redirect($post->path());\n }", "title": "" }, { "docid": "898f6ee242861210e7536d9c5388c870", "score": "0.723307", "text": "public function store(StorePostRequest $request)\n {\n $post = $request->user()->posts()->create($request->all());\n\n $post->tags()->sync(\n Tag::whereIn('name', explode(',', $request->tags))->pluck('id')->all()\n );\n\n return redirect()->route('admin.posts.show', $post)\n ->withSuccess('The post was created.');\n }", "title": "" }, { "docid": "b4b16490f8018648d739edf602cdf21c", "score": "0.72212404", "text": "public function store()\n {\n\n $this->validate(request(), [\n\n 'body' => 'required'\n ]);\n\n auth()->user()->publish(\n new Post(request(['body']))\n );\n\n\n return redirect('/timeline');\n }", "title": "" }, { "docid": "22ae56c63aa8f02c63c08ee68289fc9d", "score": "0.7220281", "text": "public function store() {\n\n /* This does the same thing as Post::create\" */\n \n // $post = new Post;\n\n // $post->title = request('title');\n // $post->body = request('body');\n\n // //Save it to the database.\n // $post->save();\n\n /*********************************************/\n\n $this->validate(request(), [\n 'title' => 'required',\n 'body' => 'required'\n ]);\n\n auth()->user()->publish(\n new Post(request(['title', 'body']))\n );\n\n session()->flash('message', 'Your post has been published.');\n\n //Redirect to the homepage.\n return redirect('/');\n \n }", "title": "" }, { "docid": "8129b9b8814de9f70d1e2a2c3d8ef2fc", "score": "0.72137207", "text": "public function store()\n\t{\n\n\t\n\t\t\t$post = new Posts;\n\t\t\t$post->title = Input::get('title');\n\t\t\t$post->alias = Input::get('alias');\n\t\t\t$post->author = Input::get('author');\n\t\t\t$post->content = Input::get('content');\n\t\t\t$post->caId = Input::get('caId');\n\t\t\t//$nerd->tag = Input::get('tag');\n\t\t\t$post->save();\n\n\t\t\t// redirect\n\t\t\tSession::flash('message', 'Successfully created post!');\n\t\t\treturn Redirect::to('/');\n\t\t\n\t \n\t}", "title": "" }, { "docid": "87f2d19af0da4629225d43886ef7d9f9", "score": "0.7211514", "text": "public function store(StorePost $request)\n {\n $validated = $request->validated();\n\n $post = new Post;\n $post->id = Input::get('restaurant_id') . Input::get('user_id');\n $post->content = Input::get('content');\n $post->restaurant_id = Input::get('restaurant_id');\n $post->user_id = Input::get('user_id');\n $post->save();\n\n // redirect\n Session::flash('message', 'Successfully created Post');\n return Redirect::to('posts');\n }", "title": "" }, { "docid": "4805b4865a3376f2c5d5c1fdbda38ac3", "score": "0.72042257", "text": "public function store(StorePostRequest $request)\n {\n $post = Post::create([\n 'title' => $request->input('title'),\n 'body' => $request->input('body'),\n 'user_id' => auth()->id(),\n 'published_at' => $request->has('draft') ? null : \\Carbon\\Carbon::now()\n ]);\n\n if ($request->hasFile('image')) {\n $request->file('image')->store('public/post');\n\n // Generate a random name for every file\n $image = $request->file('image')->hashName();\n\n $post->update(['image' => $image]);\n }\n\n if ($request->has('categories')) {\n $categories = $request->input('categories');\n $post->categories()->attach($categories);\n } else {\n $category = Category::where('name', Category::defaultCategory())->first()->id;\n $post->categories()->attach($category);\n }\n\n if ($request->has('tags')) {\n foreach ($request->input('tags') as $tag) {\n $tag = Tag::firstOrCreate(['name' => $tag]);\n $post->tags()->attach($tag);\n }\n }\n\n if ($request->has('draft')) {\n return redirect()->route('dashboard.posts.draft')->with('success', 'Post saved in drafts.');\n }\n\n return redirect()->route('posts.show', $post->id)->with('success', 'Post created.');\n }", "title": "" }, { "docid": "75947f4085dc01fb305e1971f94add6a", "score": "0.7203621", "text": "public function store(StorePostRequest $request)\n {\n $this->post->create(['author_id' => auth()->user()->id] + $request->only('title', 'slug', 'published_at', 'excerpt', 'body'));\n\n return redirect(route('backend.posts.index'))->withStatus('Post has been created');\n }", "title": "" }, { "docid": "b284eae9c6d6c8aaf6f161fb61d365cb", "score": "0.71946275", "text": "public function store() {\n $input = array(\n 'title' => Binput::get('title'),\n 'summary' => Binput::get('summary'),\n 'body' => Input::get('body'), // use standard input method\n 'user_id' => $this->getUserId(),\n );\n\n $rules = $this->post->rules;\n\n $v = Validator::make($input, $rules);\n if ($v->fails()) {\n return Redirect::route('blog.posts.create')->withInput()->withErrors($v->errors());\n }\n\n $post = $this->post->create($input);\n\n Session::flash('success', 'Your post has been created successfully.');\n return Redirect::route('blog.posts.show', array('posts' => $post->getId()));\n }", "title": "" }, { "docid": "8ca44cb22e01d03cf9eb46a5ad01a885", "score": "0.7182061", "text": "public function store () \n {\n \t// serverside validation required\n \t$this->validate(request(), [\n\n \t\t'title' => 'required',\n \t\t'body' => 'required'\n \t\t]);\n\n auth()->user()->publish(\n\n new Post(request(['title', 'body']))\n\n );\n\n // Flash message \n session()->flash('message', 'Your post is now published!');\n\n\n \t// then redirect\n \treturn redirect('/post');\n }", "title": "" }, { "docid": "f229ec2166630cf51989956e252b3f7b", "score": "0.7175569", "text": "public function store(StorePost $request)\n {\n $data = $request->only(['title','description']);\n $data['user_id'] = Auth::user()->id;\n $post = Post::create($data);\n \n $request->session()->flash('status','post was created');\n return redirect()->route('mypost');\n }", "title": "" }, { "docid": "e3dadacf443ac38cf61dd0d8b82a1952", "score": "0.7169567", "text": "public function store()\n {\n $post = new Post();\n return $this->savePost($post);\n }", "title": "" }, { "docid": "47026bd3b56666b36b459ce63e4a6796", "score": "0.71687025", "text": "public function store(CreatePostRequest $request)\n {\n $validatedData = $request->postFillData();\n\n $post = Post::create($validatedData);\n\n if ($request->hasFile('image')) {\n $this->uploadManager->upload($post, $request, 'public/posts/images', 'image');\n }\n\n if ($request->has('tags')) {\n $post->syncTags($request->tags);\n }\n\n flash('Post has been saved!');\n\n return redirect()\n ->route('posts.index');\n }", "title": "" }, { "docid": "35ba3438590d3ac454fdcf5a9f58f31d", "score": "0.7155754", "text": "public function store(StorePostRequest $request)\n {\n $this->posts->create(['auther_id'=>auth()->user()->id] + $request->only('title','slug','published_at','body','excerpt'));\n\n return redirect(route('backend.posts.index'))->with('status','Post Has been Created');\n }", "title": "" }, { "docid": "7c87789abad4ad9661d325a077cdb14a", "score": "0.7155028", "text": "public function store(Request $request)\n {\n /* $request->validate([\n 'title' => 'required|string|max:100',\n 'subTitle' => 'required|string|max:100',\n 'description' => 'required|numeric|min:0'\n ]);\n $post = new Post();\n\n $post->title= $request->title;\n $post->subTitle = $request->subTitle;\n $post->description =$request->description;\n $post->user_id = 1;\n\n $post->save(); \n return response()->json($post,201); */\n\n $post = Post::create([\n 'title' => $request->title,\n 'subTitle' => $request->subTitle,\n 'description' => $request->description,\n 'user_id' => 2,\n ]);\n\n return new PostResource($post);\n }", "title": "" }, { "docid": "81b15d241b87d0406ece19234921fbd3", "score": "0.715132", "text": "public function store(PostRequest $request)\n {\n $post = Post::create($request->all());\n $post->services()->attach($request->service_id);\n makeImage($request->file('image'), 'uploads/posts', $post);\n return redirect(route('posts.index'));\n\n }", "title": "" }, { "docid": "414020117b91ef2ba81f1d194883d1a7", "score": "0.7150072", "text": "public function store(PostRequest $request)\n {\n $timestamp = Carbon::now()->timestamp;\n $id = $this->postService->getPostIdMax() + 1;\n\n if ($request->hasFile('image')) {\n $file = $request->image ;\n $path = $file->move('uploads', $file->getClientOriginalName());\n $data['image'] = $path;\n }\n $data['title'] = $request->title;\n $data['slug'] = $this->createSlug($request->title, $id, $timestamp);\n $data['sapo'] = $request->sapo;\n $data['content'] = $request->content;\n $data['category_id'] = $request->category_id;\n $data['user_id'] = $request->user_id;\n $this->postService->createPost($data);\n\n return redirect( '/posts' );\n }", "title": "" }, { "docid": "c721e631a6d9cf487f49f3b08c6d53eb", "score": "0.7147424", "text": "public function store(Request $request)\n {\n $post = new Posts();\n $post->title = $request->get('title');\n $post->description = $request->get('description');\n $post->body = $request->get('body');\n $post->slug = str_slug($post->title);\n $post->author_id = $request->user()->id;\n\n //thumbnail upload\n if ($request->file('images')) {\n $fileName = str_random(30);\n $request->file('images')->move(\"img/\",$fileName);\n } else {\n $fileName = $post->images;\n }\n $post->images = $fileName;\n\n if ($request->has('save')){\n //for draft\n $post->active = 0;\n $message = 'Post saved succesfully';\n } else {\n // for posts\n $post->active = 1;\n $message = 'post published succesfully';\n }\n $post->save();\n return redirect('admin/posts/editpost/'.$post->slug)->withMessage($message);\n\n }", "title": "" }, { "docid": "bf1d6cb5af6e005ef5a765eee5dbda51", "score": "0.7146703", "text": "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, Post::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$input['image'] = $this->uploadImage($input, 'image');\n\t\t\t\n\t\t\t$this->post->create($input);\n\n\t\t\treturn Redirect::route('admin.posts.index');\n\t\t}\n\n\t\treturn Redirect::route('admin.posts.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "title": "" }, { "docid": "d69cdb418f0e147064c1d94569880061", "score": "0.7144827", "text": "public function store(Request $request)\n {\n $data = $request->all();\n\n $newPost = new Post;\n\n $newPost->title = $data['title'];\n $newPost->author = $data['author'];\n $newPost->category_id = $data['category_id'];\n\n $newPost->save();\n\n $newPostInfo = new PostInformation;\n $newPostInfo->post_id = $newPost->id;\n\n $newPostInfo->slug = Str::slug($newPost->title);\n $newPostInfo->description = $data['description'];\n\n $newPostInfo->save();\n\n $newPost->tags()->attach($data['tags']);\n\n return redirect()->route('posts.index');\n }", "title": "" }, { "docid": "086422f7ba0937b4fb3756c8a508bd2b", "score": "0.71391857", "text": "public function store(Request $request)\n {\n $resource = $request->getContent();\n $postData = \\json_decode($resource, true);\n $postData['user_id'] = $request->user()->id;\n $newPost = Post::create($postData);\n $postResource = new PostResource($newPost);\n return response()->json($postResource, Response::HTTP_CREATED);\n }", "title": "" }, { "docid": "2c289a8fa59a15591c6036926f32a6fe", "score": "0.713436", "text": "public function store(Request $request)\n {\n $post = $this->validate(request(), [\n 'title' => 'required|string|max:100',\n 'body' => 'required',\n 'image' => 'nullable|string|max:100',\n 'author_id' => 'required',\n 'published' => 'required',\n ]);\n\n $post['slug'] = Str::slug($post['title']);\n $post = Post::create($post);\n if($request->tags){\n $post->tags()->sync($request->tags);\n }\n return back()->with('success', 'Post criado!');\n }", "title": "" }, { "docid": "43210841498075c55f77e37237a7cd70", "score": "0.7131084", "text": "public function store(Request $request)\n {\n $post = new Post();\n $post->titulo = $request->titulo;\n $post->subtitulo = $request->subtitulo;\n $post->descricao = $request->descricao;\n\n $post->save();\n\n// Post::create([\n// 'titulo' => $request->titulo,\n// 'subtitulo' => $request->subtitulo,\n// 'descricao' => $request->descricao,\n// ]);\n return redirect()->route('posts.index');\n }", "title": "" }, { "docid": "d6f3468628526d9a0840d9a6f16205dd", "score": "0.7129253", "text": "public function store(Request $request)\n {\n $post = new Posts();\n \n $post->title = $request->get('title');\n $post->body = $request->get('body');\n $post->slug = str_slug($post->title);\n $post->author_id = $request->user()->id;\n $post->active = 1;\n \n $post->save();\n return redirect('posts/index');;\n }", "title": "" }, { "docid": "947a4c92e29a8523b1655e215809c02b", "score": "0.71269506", "text": "public function store(Request $request)\n {\n $this->validate($request,\n [\n 'title' => 'required',\n ]);\n\n $id = Poster::createPost(array(\n 'userid' => auth()->user()->id,\n 'title' => $request->input('title'),\n 'name' => str_slug($request->input('title')),\n 'content' => $request->input('content'),\n 'excerpt' => $request->input('excerpt'),\n 'type' => $this->type,\n 'status' => 'published'\n ));\n\n Poster::collectMetas($request->input('meta'), $id);\n\n return redirect(route('post.index'));\n\n }", "title": "" }, { "docid": "a1081d9fb68fd40249e1e8ce05e1798a", "score": "0.7126576", "text": "public function store(Request $request)\n {\n $posts = $request->isMethod('put') ? Posts::findOrFail($request->id) : new Posts;\n\n $posts->id = $request->input('id');\n $posts->user_id = $request->input('user_id');\n $posts->title = $request->input('title');\n $posts->body = $request->input('body');\n if($posts->save()){\n return new PostsResource($posts);\n }\n\n\n return new Posts($posts);\n \n // $posts = Posts::create($request->all());\n\n // return response()->json($posts, 201);\n \n }", "title": "" }, { "docid": "aa77b819978e14643901d155bcea7682", "score": "0.712478", "text": "public function store(PostRequest $request)\n {\n $post = $this->service->create($request->all());\n\n return redirect()->route('admin.posts.edit', $post)->withSuccess(__('Posts created'));\n }", "title": "" }, { "docid": "4a0c0ae51496c91cc61cb75c66d8c1c3", "score": "0.7124286", "text": "public function store(PostRequest $request)\n {\n $post = Post::create([\n 'title' => $request->title ,\n 'description' => $request->description ,\n 'content' => $request->content ,\n 'category_id' => $request->categoryID ,\n 'image' => $request->image->store('images', 'public'),\n 'user_id' => $request->user_id\n ]);\n\n if ($request->tags) { // if user choosed tags\n // attach post with its tags(array)\n $post->tags()->attach($request->tags);\n }\n\n session()->flash('success', 'post created successfully');\n\n return redirect(route('posts.index'));\n }", "title": "" }, { "docid": "da4d594609632c0c120398710d6d0fad", "score": "0.71224827", "text": "public function store(StorePost $request)\n {\t\n\t\t//vidimo da je isti csrf token u sesiji i u formi\n //dd($request);\n\t\t\n\t\t//dohvacamo podatke koje zelimo spremiti\n\t\t$post = array(\n\t\t\t'title'\t\t=> $request->get('title'),\n\t\t\t'content'\t=> $request->get('content'),\n\t\t\t'user_id'\t=> Sentinel::getUser()->id\n\t\t);\n\t\t\n\t\t//dd($post);\n\t\t\n\t\t$new_post = new Post();\n\t\t\n\t\t$data = $new_post->savePost($post);\n\t\t\n\t\t//dd($data);\n\t\t\n\t\tsession()->flash('success', 'You have successfully created a new post');\n\t\treturn redirect()->route('posts.index');\n }", "title": "" }, { "docid": "cf03387abdbbb7dd5e07871da002d133", "score": "0.7122402", "text": "public function postStore(PostFormRequest $request)\n {\n $post = Post::create([\n 'user_id' => auth()->user()->id,\n 'category_id' => $request->input('category_id'),\n 'title' => $request->input('title'),\n 'image_id' => $request->input('feature_image'),\n 'content' => $request->input('content'),\n 'status' => $request->input('status')\n ]);\n\n if($post)\n {\n if($request->input('publish_medium'))\n {\n $medium = App::make(\\JonathanTorres\\LaravelMediumSdk\\LaravelMediumSdk::class);\n $result = MediumPublishService::publish($medium, $post);\n }\n\n return redirect()->back()->with([\n 'message' => 'Post was saved',\n 'alert_class' => 'success'\n ]);\n }\n\n return redirect()->back()->with([\n 'message' => 'Post was not saved',\n 'alert_class' => 'danger'\n ]);\n }", "title": "" }, { "docid": "91f9f830592b4a9c0d13309fe8f54500", "score": "0.7119734", "text": "public function store(PostsCreateRequest $request)\n {\n //assign the request\n $input = $request->all();\n //get the logged in user for population to db relationship\n $user = Auth::user();\n //check if there is a file or foto attached\n if ($file = $request->file('photo_id')) {\n\n $name = time() . $file->getClientOriginalName();\n //move to the public\\images directory`\n $file->move(public_path() . '\\images', $name); // absolute destination path\n //save to the table photos\n $photo = Photo::create(['file' => $name]);\n //get the id of the photo from the photos table and place it on the users table under column photo_id\n $input['photo_id'] = $photo->id;\n }\n\n //persist the post to the db and redirect\n $user->posts()->create($input);\n //flash message\n Session::flash('create_post','The post has been successfully created');\n //return redirect\n return redirect('/admin/posts');\n }", "title": "" }, { "docid": "6f7ee059198846fff1b61b4f757c365e", "score": "0.7093891", "text": "public function store(PostRequest $request)\n {\n\n\n //Se cambio request por PostRequest\n $post = Post::create($request->all());\n\n if ($request->file('file')) {\n $url = Storage::put('posts', $request->file('file'));\n\n $post->image()->create([\n 'url' => $url,\n ]);\n //Despues de esta línea, habilitar la asignación masiva en el modelo Image\n }\n\n if ($request->tags) {\n $post->tags()->attach($request->tags);\n }\n\n return redirect()->route('admin.posts.edit', $post)\n ->with('info', 'El post se creó con éxito');\n\n }", "title": "" }, { "docid": "82fbb6c39becc3b4e0d517f2ac79f1a2", "score": "0.7084268", "text": "public function store()\n\t{\n\t\t// print_r(Input::all());\n\t\t$validator = Validator::make($data = Input::all(), Post::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tPost::create($data);\n\n\t\treturn Redirect::route('admin.posts.posts');\n\t}", "title": "" }, { "docid": "914fc47714052cdbb6e604d87dac5ebf", "score": "0.70796156", "text": "public function store(PostRequest $request)\n {\n\n $post = Post::create($request->all());\n\n if($request->file('file')){\n $url= Storage::put('posts', $request->file('file'));\n\n $post->image()->create([\n 'url'=> $url\n ]);\n }\n\n //Eliminar datos de cache\n //Cache::forget('key');\n\n //Elimina todas las variables del cache\n Cache::flush();\n\n //rellenamos la tabla intermedia post_tag con lo que se ha sellecionado en nel formulario\n if($request->tags){\n $post->tags()->attach($request->tags);\n }\n\n return redirect()->route('admin.posts.index')->with('info', 'El post se creó con éxito');;\n }", "title": "" }, { "docid": "c1f24b4c87e9dfa70f2d4ceda378cd4a", "score": "0.70793855", "text": "public function store(PostRequest $request)\n {\n $this->createPost($request);\n\n flash()->success('Successfully created new post!')->important();\n\n return redirect('posts');\n }", "title": "" }, { "docid": "7b7058803e1e54e6e914f9349cbcb6b7", "score": "0.7068954", "text": "public function store() {\n\n $data = request()->validate([\n 'caption'=> 'required',\n 'image'=> ['required', 'image'],\n ]);\n\n\n // controlling where image goes. ->store('foldername', 'path')\n $imagePath = request('image')->store('uploads', 'public');\n\n\n // using intervention/image library to resize files\n $image = Image::make(public_path(\"storage/{$imagePath}\"))->fit(1200, 1200);\n $image->save();\n\n auth()->user()->posts()->create([\n 'caption' => $data['caption'],\n 'image' => $imagePath,\n ]);\n\n\n //after creating post, user will be taken to their profile\n return redirect('/profile/' . auth()->user()->id);\n\n\n // for json output. turn on/off as needed\n // dd(request()->all());\n }", "title": "" }, { "docid": "1c62f94b2457e3bf285a15e0b636fbd5", "score": "0.70666146", "text": "public function store()\n {\n $attributes = request()->validate([\n 'titre' => 'required|min:3',\n 'message' => 'required|min:3',\n 'image' => 'image|required'\n \n ]);\n\n $tags = request()->validate([\n 'tags' => 'required|min:3'\n ]);\n\n $tags = explode(', ', $tags['tags']);\n \n $attributes = $this->uploadImage($attributes);\n\n $attributes['auteur_id'] = auth()->id();\n $post = Post::create($attributes);\n \n foreach($tags as $tag){\n\n if(Tag::where('tag_name', $tag)->get()->count() == 0){\n\n Tag::create([\n 'tag_name' => $tag\n ]);\n\n } \n\n $post->tags()->attach(Tag::where('tag_name', $tag)->get());\n }\n\n\n return back();\n }", "title": "" }, { "docid": "bf22ff586f2ba1e98ca8092c393a8479", "score": "0.7065381", "text": "public function store(Request $request)\n {\n $input = $request->all();\n $user_id = Auth::id();\n $input ['user_id'] = $user_id;\n $validator = Validator::make($input, [\n 'desc' => 'max:255',\n 'img' => 'image:jpg,jpeg,png,svg|required',\n ]);\n\n if($validator->fails()){\n return $this->sendError($validator->errors());\n }\n\n $post = Post::create($input);\n\n return $this->sendResponse(new PostResource($post),'post created!');\n }", "title": "" }, { "docid": "f1237167b47537032afd41809fe75cb0", "score": "0.7064106", "text": "public function store(Request $request)\n {\n if(!auth()->user()->can('create', \\App\\Post::class)){\n abort(404);\n }\n Validator::make($request->input(), [\n 'title' => ['required', 'string', 'max:255'],\n ])->validate();\n\n\n\n //Create new post\n $post = new \\App\\Post();\n $post->title = $request->input('title');\n $post->description = $request->input('description')?$request->input('description'):null;\n $post->body = $request->input('body')?$request->input('body'):null;\n $post->published_at = $request->input('published')?now():null;\n $post->is_required_auth = $request->input('is_required_auth')?1:null;\n $post->admin_id = auth()->user()->id;\n $post->save();\n\n //Attach tags to post\n $post->syncTags($request->input('tags'));\n\n }", "title": "" }, { "docid": "f4b845f4e179a9c2c7fd960e060603fd", "score": "0.706313", "text": "public function store(Request $request)\n {\n $data = $this->validate($request, [\n 'title' => 'required',\n 'content' => '',\n 'style' => '',\n 'meta' => '',\n 'featured_media_id' => '',\n 'is_featured' => '',\n 'serial' => '',\n ]);\n $post = Post::create($data);\n $post->categories()->attach($request->category_id);\n $post->tags()->attach($request->tag_id);\n return back();\n }", "title": "" }, { "docid": "42c11cb1ec3506eb744ed30dfc5f4502", "score": "0.7060251", "text": "public function store(Request $request)\n {\n $createdPost = PostService::savePost($request);\n $createdPost->tags()->attach(\\request('tags'));\n // Return to page after submitting input\n if ($createdPost !== null)\n {\n PostService::flashMessage('Your post has been created');\n return redirect(route('posts-index'));\n }\n }", "title": "" }, { "docid": "76180cf87b7a6b0b36994437684562cc", "score": "0.7059498", "text": "public function store(StorePostRequest $request)\n {\n $post = Post::create($request->validated());\n return response()->json([\n 'status' => 'success',\n 'posts' => new PostResource($post)\n ]);\n }", "title": "" }, { "docid": "c3959c6059f7fc913ffaaca8017638d0", "score": "0.7059409", "text": "public function store(StorePostRequest $request)\n {\n // return dd($request->all());\n $post = new Post;\n $post->title = $request->get('title'); //max 50 caracteres\n $post->body = $request->get('body');\n $post->excerpt = $request->get('excerpt'); // max 150 caracteres\n $post->published_at = $request->get('published_at'); \n $post->category_id = $request->get('category_id');\n $post->save();\n $post->tags()->attach($request->get('tags'));\n \n return redirect()->route('post.edit', $post)->with('flash', 'Publicado com sucesso');\n }", "title": "" }, { "docid": "c84365f0ea7132ff89643a5daf52584f", "score": "0.70592916", "text": "public function store(Request $request) {\n // validates the information\n $this->validate($request, [ \n 'title' => 'required|max:85', \n 'message' => 'required|max:255',\n 'user_id' => 'required',\n 'privacy' => 'required',\n ]);\n \n // Store and Save Form\n $post = new Post();\n $post->title = $request->title;\n $post->message = $request->message;\n $post->user_id = $request->user_id;\n $post->privacy_id = $request->privacy;\n $post->save();\n \n // Redirect page\n return redirect(\"/post/$post->id\");\n }", "title": "" }, { "docid": "984bc1932453b32389274f6e352acfb3", "score": "0.70580757", "text": "public function store(PostRequest $request)\n {\n $input = $request->only(['title', 'description', 'category_id']);\n\n auth()->user()->posts()->create($input);\n\n return redirect('/posts');\n }", "title": "" }, { "docid": "29698b80514a9be6fa85df531475c01c", "score": "0.7056887", "text": "public function store(StorePostRequest $request)\n {\n $user_id = Auth::id();\n $post = Post::create( $request->except('_token') + [ 'date' => Carbon::now(), 'user_id' => $user_id] );\n return redirect()->action('PostsController@index');\n }", "title": "" }, { "docid": "9a4c0fd996d5fc80450af12d28881647", "score": "0.7055251", "text": "public function store(Request $request)\n {\n $post = new Post;\n $input = $request->all();\n $input['user_id'] = Auth::user()->id;\n\n //create the post\n $newPostId = $post->create($input)->id;\n $createdPost = Post::find($newPostId);\n\n //if categories sync them to the post\n if($request->cats){\n $createdPost->categories()->sync($request->cats);\n }\n\n //if post image upload it\n if($fileData = $request->file('photo_id')){\n $fileName = $fileData->getClientOriginalName();\n $fileSaveData = $fileData->store('post-photos','public');\n $createdPost->files()->create(['path'=>$fileSaveData,'filename'=>$fileName]);\n }\n\n return redirect('/admin/posts/');\n }", "title": "" }, { "docid": "90bbe62d4bcf6ac6b3e7bd232646a3a6", "score": "0.7055179", "text": "public function store( CreatePostsRequest $request ) {\n //upload image\n $image = $request->image->store( 'posts' );\n\n //create the post\n $post = Post::create( [\n 'title' => $request->title,\n 'description' => $request->description,\n 'post_content' => $request->post_content,\n 'published_at' => $request->published_at,\n 'image' => $image,\n 'category_id' => $request->category_id,\n 'user_id' => auth()->user()->id,\n ] );\n\n //to attach(associate) tags to the post for many to many relationships\n if($request->tags){\n $post->tags()->attach($request->tags);\n }\n\n //flash image\n session()->flash( 'success', 'Post created successfully' );\n\n //redirect user\n return redirect( route( 'posts.index' ) );\n }", "title": "" }, { "docid": "bd92bf40ffaa01869b2c320c19e276ce", "score": "0.7051084", "text": "public function store(Request $request)\n {\n\n $this->validate($request, [\n 'title' => 'required',\n 'content' => 'required',\n 'image' => 'required',\n ]);\n\n $post = new Post();\n\n $post->title = $request->input('title');\n $post->content = $request->input('content');\n $post->user_id = auth(\"api\")->user()->id;\n if($request->hasFile('image')) {\n $file = $request->file('image');\n\n $filename = time().'-'.uniqid().'.'.$file->getClientOriginalExtension();\n\n $file->move(public_path('uploads'), $filename);\n\n $post->image = $filename;\n }\n\n $post->save();\n\n // store tags\n return response()->json(['data' => $post, 'message' => 'Created successfully'], 201);\n }", "title": "" }, { "docid": "dcfff95591f8255a55d83e4b779cb96e", "score": "0.704934", "text": "public function store(CreatePostRequest $request) {\n $input = $request->all();\n $input['post_featuredimage'] = Post::handleFile($request);\n $post = new Post();\n $posttype = Posttype::find($input['posttype_id']);\n $addedPost = Post::addPost($input, $post, $posttype);\n $addedPost->categories()->sync($input['category_list']);\n flash('Post created sucessfully!');\n return redirect('dashboard/admin/post');\n }", "title": "" }, { "docid": "0300094ef504640f889596113b14bc2b", "score": "0.70456624", "text": "public function store(CreatePostRequest $request)\n {\n $image = $request->file('image')->store('images/posts');\n $post = Post::create([\n 'title'=>$request->title,\n 'excerpt'=>$request->excerpt,\n 'content'=>$request->content,\n 'category_id'=>$request->category_id,\n 'user_id'=>auth()->id(),\n 'image'=>$image,\n 'published_at'=>$request->published_at\n\n ]);\n $post->tags()->attach($request->tags);\n session()->flash('success','Post Created Successfully');\n return redirect(route('posts.index'));\n }", "title": "" }, { "docid": "7b07f774b503994fbd7804ddb4b430ab", "score": "0.7043047", "text": "public function store(PostRequest $request)\n {\n $image_name = '';\n $slug = str_replace(' ', '_', strtolower($request->slug ?? $request->title));\n $slug = preg_replace('/[^A-Za-z0-9\\_]/', '', $slug ); // Removes special chars.\n\n // Checking if the image is added\n if($request->hasFile('image')){\n $image_name = $slug.'.'.$request->image->extension();\n\n //moving file\n $request->image->move(public_path('storage'), $image_name);\n }\n\n $post = Post::create([\n 'title' => $request->title,\n 'slug' => $slug,\n 'content' => $request->content,\n 'image' => $image_name,\n 'category_id' => $request->category_id,\n 'user_id' => auth()->user()->id\n ]);\n return redirect()->back()->with('msg', 'New post has been created!');\n }", "title": "" }, { "docid": "c0bce90514b6765e8004a6d04b6bc071", "score": "0.70426667", "text": "public function store(PostInsertFormRequest $request)\n {\n $slug = uniqid();\n Post::create([\n 'title' => $request->get('title'),\n 'content' => $request->get('content'),\n 'slug' => $slug,\n 'user_id' => $request->get('user_id'),\n 'category_id' => $request->get('category_id'),\n ]);\n return redirect('postcreator/posts/create')->with('status', 'Post Created Successfully !');\n }", "title": "" }, { "docid": "e304bc117d756022b22592507d3a486e", "score": "0.70384264", "text": "public function store(StorePost $request)\n {\n $post = new Post(\n $request->validated()\n );\n $post->user_id = $this->user->id;\n $post->save();\n\n return (new PostResource($post))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "5d5e411d8f88afbbf0af071ac06d4c70", "score": "0.70381665", "text": "public function store(Request $request)\n {\n $posts = new Post;\n $posts->id = $request->input('post_id');\n $posts->chat = $request->input('chat');\n $posts->group_id = $request->input('group_id');\n $posts->user_id = $request->input('user_id');\n\n $posts->save();\n return new PostResource($posts);\n }", "title": "" }, { "docid": "8525956182c0d10da2ee2e2c629d56f3", "score": "0.703693", "text": "public function store(PostCreateRequest $request)\n {\n $user = AppUser::find(ContextHelper::GetRequestUserId());\n $class = VirtualClass::where('guid', $request->input('classId'))->first();\n\n //Saving new post:\n try{\n //opening transaction\n DB::beginTransaction();\n\n $newPost = new Post();\n $newPost->detail = $request->input('detail');\n $newPost->user_id = $user->id;\n $newPost->class_id = $class->id ?? null;\n $newPost->access = AccessEnum::getEnumByName($request->input('access'));\n $newPost->post_type = PostTypeEnum::getEnumByName($request->input('postType'));\n $newPost->status = StatusEnum::ACTIVE;\n $newPost->view_counts = 0;\n $newPost->like_count = 0;\n $newPost->guid = uniqid();\n\n $file = null;\n if ($request->has('fileId')){\n $file = File::where('guid', $request->input('fileId'))->first();\n }\n\n $newPost->save();\n\n if ($request->has('classwork') ) {\n $classwork = Post::ConvertRequestToClasswork($request, $newPost->id);\n $newPost->classwork_id = $classwork->id ?? null;\n if (!$classwork instanceof Question){\n $classwork->file_id = $file->id ?? null;\n }\n } else {\n $newPost->file_id = $file->id ?? null;\n }\n\n $newPost->save();\n\n DB::commit();\n return new PostResource($newPost);\n }catch (Exception $e){\n DB::rollBack();\n throw $e;\n// return response('Server failure. Contact IT.', 500);\n }\n }", "title": "" }, { "docid": "89d05452d55eb704a60afbdbb91caebf", "score": "0.7035033", "text": "public function store( PostRequest $request )\n {\n $this->data = objectify( $request->except(['_token', 'newCategory', 'newTags']) );\n\n if ( ! empty($this->data->tags) ) $this->buildTagsArray();\n\n $post = $this->storeOrUpdatePost();\n\n if ( $this->status->byHash( $this->data->status )->name == 'Pending review' ) $this->mailReviewer( $post );\n\n $message = trans('blogify::notify.success', ['model' => 'Post', 'name' => $post->title, 'action' => ( $request->hash == '' ) ? 'created' : 'updated']);\n session()->flash('notify', [ 'success', $message ] );\n $this->cache->forget('autoSavedPost');\n\n return redirect()->route('admin.posts.index');\n }", "title": "" }, { "docid": "be12319a2d4b09a5a6cc20e5aa1c08d6", "score": "0.7031472", "text": "public function store(StorePost $request)\n {\n try {\n if ($request->hasFile('image_path')) {\n\n $image = new ImageService($request->image_path, 770, 460);\n $request['path'] = $image->resizeImage('posts', false);\n\n $thumb = new ImageService($request->image_path, 368, 274);\n $request['thumb_path'] = $thumb->resizeImage('posts', true);\n }\n $request['user_id'] = \\Auth::user()->id;\n Post::create($request->all());\n return redirect()->back()->with('success', $this->successCreatedMessage($this->nameModel));\n } catch (\\Exception $exception) {\n return redirect()->back()->withInput(Input::all())->with('error', $this->errorCreatedMessage($this->nameModel, $exception));\n }\n }", "title": "" }, { "docid": "8ca12a10ed04eda8d7855f79a3f9fe59", "score": "0.7028202", "text": "public function store()\n\t{\n\t\t$validator = Validator::make($data = Input::all(), Posttag::$rules);\n\n\t\tif ($validator->fails())\n\t\t{\n\t\t\treturn Redirect::back()->withErrors($validator)->withInput();\n\t\t}\n\n\t\tPosttag::create($data);\n\n\t\treturn Redirect::route('posttags.index');\n\t}", "title": "" }, { "docid": "622c71c39d3f3cbd344e8ca63e2dbadf", "score": "0.7020095", "text": "public function store(PostRequest $request)\n {\n $post = $this->post->create($request->all());\n\n return response()->json(new PostResource($post), 201);\n }", "title": "" }, { "docid": "95e0cd126ca5dd6de798f9edf4809863", "score": "0.7019736", "text": "public function store(Request $request)\n {\n //Fetching requests and posting it on the db\n $request->validate([\n 'title' => 'required|unique:posts|max:255',\n 'description' => 'required'\n ]);\n \n if($request->hasFile('img')){\n\n $filenameWithExt = $request->file('img')->getClientOriginalName();\n\n $filename = pathinfo($filenameWithExt, PATHINFO_FILENAME);\n\n $extension = $request->file('img')->getClientOriginalExtension();\n\n $fileNameToStore = $filename.'_'.time().'.'.$extension;\n\n $path = $request->file('img')->storeAs('public/img', $fileNameToStore);\n } else{\n $fileNameToStore = '';\n }\n\n $post = new Post();\n $post->fill($request->all());\n $post->img = $fileNameToStore;\n $post->user_id = auth()->user()->id;\n $post->save();\n\n return redirect('/posts');\n }", "title": "" }, { "docid": "682a1f9e5641cd9194034b7b7ef43187", "score": "0.70170265", "text": "public function store(Requests\\PostRequest $request)\n {\n // Validation rule Dipindahkan ke file App\\HTTP\\Request\\PostRequest\n \n $data = $this->handleRequest($request);\n \n // agar dapat menyimpan tags ke database, tampung create post ke variabel $newpost\n $newpost = $request->user()->posts()->create($data);\n \n // simpan data tags ke posts_tags dengan \"attach\"\n $newpost->createTags($data['post_tags']);\n \n Alert::success('Post succesfully created', 'Create Success');\n return redirect()->route('posts.index')->with('message','Post succesfully created');\n }", "title": "" }, { "docid": "6d17619fcff2b41d4e18bce3a156cc07", "score": "0.70153975", "text": "public function store(Posts $request)\n {\n $validated = $request->validated();\n\n Story::create($validated);\n\n return redirect('stories');\n }", "title": "" }, { "docid": "81e14bb6bc86c35dd8fe7e731d08f358", "score": "0.7014268", "text": "public function store()\n {\n //dd(request()->all());\n //$post = new Post;\n\n // $post->title = request('title');\n // $post->body = request('body');\n\n $this->validate(request(), [\n 'title' => 'required',\n 'body' => 'required'\n ]);\n // allow save and add forms submitted to database with this one line of code\n //but must use protected $guarded or $fillable to Post Model\n\n auth()->user()->publish(\n new Post(\\request(['title', 'body']))\n );\n\n// Post::create([\n// 'title' =>\\request('title'),\n// 'body' =>\\request('body'),\n// 'user_id' => auth()->id()\n// ]);\n //save it to the database\n //$post->save();\n\n //And redirect back to the home page.\n return redirect('/');\n }", "title": "" }, { "docid": "51dc65deb3400fb69c74b2ffa6c6d0e4", "score": "0.7011545", "text": "public function store(Request $request)\n {\n //$post = new Post;\n //$post->title = $request->title;\n //$post->body = $request->body;\n //$post->save();\n\n $post = $request->isMethod('put') ? Post::fideOrFail($request->id) : new Post;\n\n $post->title = $request->input('title');\n $post->body = $request->input('body');\n\n if($post->save()) {\n return new PostsResource($post);\n }\n }", "title": "" }, { "docid": "e091f337fea71d7805619c19a705e2fb", "score": "0.70104027", "text": "public function store(StorePostRequest $request)\n {\n Input::merge(array_map('trim', Input::all()));\n $this->validate(\n $request, [\n 'title' => 'required | min:6 | max:255 | unique:posts'\n ]\n );\n $dataArray = array(\n 'title' => $request->get('title'),\n 'body' => $request->get('body'),\n 'slug' => str_slug($request->get('title')),\n 'user_id' => $request->user()->id,\n 'active' => 1,\n 'publish_date' => $request->get('publish_date')\n );\n Post::create($dataArray);\n \\Session::flash('flash_message', 'Post successfully added!');\n\n return redirect('/post');\n }", "title": "" }, { "docid": "9948074ed48deffcd0de7630675087ff", "score": "0.700633", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required|unique:posts|max:255',\n 'content' => 'required',\n 'image' => 'required|image'\n\n ]);\n\n $image = $request->image->store('post');\n $post = Post::create([\n 'title' => $request->title,\n 'content' => $request->content,\n 'category_id' => $request->category_id,\n 'published_at' => $request->published_at,\n 'image' => $image,\n 'tag_id' => $request->tag\n ]);\n\n if ($request->tag) {\n $post->tag()->attach($request->tag);\n }\n\n Session::flash('msg', 'post successfully added');\n return redirect()->route('post.index');\n }", "title": "" }, { "docid": "a0534ab00225216606bf9f63e1196451", "score": "0.7006307", "text": "public function store(Request $request)\n {\n $post = new Post($request->all());\n $post->published = (isset($post->published)) ? true : false;\n $post->slug = str_slug($post->title);\n $post->save();\n $post->tags()->sync($request->all()['tags']);\n\n return redirect(route('posts.show', ['id' => $post->id, 'slug' => $post->slug]));\n }", "title": "" }, { "docid": "2ab42a9aaab95b16c9b4a62f36e28b9c", "score": "0.7005256", "text": "public function store(PostFormRequest $request)\n {\n $post = $this->post->create(\n $request->only(['title', 'body'])\n );\n\n if (count($request->get('tags')) > 0) {\n $post->tags()->sync($request->get('tags'));\n }\n\n return redirect()->route('admin.post.index');\n }", "title": "" }, { "docid": "308d4e3f9d3d2fdaaaea3a806b4fd9d4", "score": "0.7004366", "text": "public function store(Request $request)\n {\n $post = new Post();\n $post->user_id = Session::get('user_id');\n $post->title = $request->title;\n $post->content = $request->content;\n $image_name = $request->file('image')->getClientOriginalName();\n Storage::putFileAs('public', $request->file('image'), $image_name);\n $post->image = config('app.link_image').$image_name;\n $post->save();\n\n return redirect()->route('posts.list', [$post->user_id]);\n }", "title": "" }, { "docid": "b6b8df68416f90bc46bda4c979f6ea12", "score": "0.7002172", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'title' => 'required',\n 'image' => 'mimes:png,jpg,jpeg'\n ]);\n\n if ($validator->fails()) {\n return response()->json([\n 'success' => false,\n 'message' => 'Please fill required fields',\n 'data' => $validator->errors()\n ], 400);\n } else {\n if ($request->hasFile('image') && $request->file('image')->isValid()) {\n $image = $request->file('image');\n $image->storeAs('public/posts', $image->hashName());\n }\n\n $req = $request->all();\n $req['slug'] = Post::unique_slug(Str::of($req['slug'] ?? $req['title'])->slug('-'));\n $req['excerpt'] = $req['excerpt'] ?? '';\n $req['content'] = $req['content'] ?? '';\n\n if (isset($image)) {\n $req['image'] = $image->hashName();\n }\n\n if (!isset($req['published'])) {\n $req['published'] = 0;\n }\n\n unset($req['_method']);\n\n $post = Post::create($req);\n\n return response()->json([\n 'success' => true,\n 'message' => 'Post created',\n 'data' => $post\n ], 200);\n }\n }", "title": "" }, { "docid": "ea43757531f1154c67ca595acc9fb4bd", "score": "0.7002047", "text": "public function store(Request $request)\n {\n auth()->user()->posts()->create($request->except('_token'));\n return redirect()->back();\n }", "title": "" }, { "docid": "12e0cd5cfb48b2842df4e3770af603a1", "score": "0.69986206", "text": "public function store(CreatePostRequest $request)\n {\n // upload image to storage\n //$imageName = time().'.'.$post->image->extension();\n \n //$post->image->move(public_path('images'), $imageName);\n $img = $request->image->store('posts');\n // create post\n $post = Post::create([\n 'title' => $request->title,\n 'description' => $request->description,\n 'content' => $request->content,\n 'image' => $img,\n 'published_at' => $request->published_at,\n 'category_id' => $request->category // use category instead category_id beacuse the name in form is category \n ]);\n\n if($request->tags){\n // attach method is belong to Many relationship \n $post->tags()->attach($request->tags);\n }\n \n // redirect user \n return redirect()->route('posts.index')->with('success', 'Post created successfully');\n\n }", "title": "" }, { "docid": "4631e19c424a8b618db7c22f7fbe2e1e", "score": "0.6997877", "text": "public function store(PostRequest $request)\n\t{\n\t\t$post = $request->user()->posts()->create($request->only(['body']));\n\n\t\treturn response([\n\t\t\t'id' => $post->id\n\t\t], 201);\n\t}", "title": "" }, { "docid": "6bf4e5c71aecf8699eab735f087ea497", "score": "0.69975483", "text": "public function store(PostRequest $request)\n {\n if ($request->hasFile('image')) {\n $filename = time() . '-' . $request->file('image')->getClientOriginalName();\n $request->file('image')->storeAs('posts', $filename, 'public');\n }\n\n $post = Post::create([\n 'title' => $request->title,\n 'category_id' => $request->category,\n 'post' => $request->post,\n 'image' => $filename,\n 'user_id' => auth()->user()->id,\n ]);\n $post->tags()->attach($request->tags);\n\n return redirect()->route('post.index')->with('status', 'Post successfully added');\n }", "title": "" }, { "docid": "96f62ea44724e57df56193cf2fefc343", "score": "0.69965595", "text": "public function store(PostRequest $request)\n {\n $this->repository->store($request);\n\n return redirect(route('posts.index'))->with('post-ok', __('The post has been successfully created'));\n }", "title": "" }, { "docid": "c005d87c70ae029ae8ef04809be3d588", "score": "0.6991674", "text": "public function store(PostRequest $request)\n {\n // se inserta informacion de los botones a la tabla posts excepto tags\n $post=Post::create($request->all());\n\n // validar si se estan enviando una imagen\n if($request->file('file')){\n $url=Storage::put('posts', $request->file('file'));\n\n // se inserta la imagen\n $post->image()->create([\n 'url'=>$url\n ]);\n }\n\n // validar las etiquetas\n if($request->tags){\n $post->tags()->attach($request->tags);\n }\n\n return redirect()->route('admin.posts.edit',$post);\n }", "title": "" }, { "docid": "a127dfa92071604826840e21be0224b6", "score": "0.69885874", "text": "public function store(PostCreateRequest $request)\n {\n try {\n\n Post::create([\n 'title' => $request->title,\n 'body' => $request->body,\n 'tags' => implode(' ', $request->tags),\n 'user_id' => Auth::user()->id\n ]);\n } catch (\\Illuminate\\Database\\QueryException $exception) {\n return response()->json($exception->errorInfo);\n }\n }", "title": "" }, { "docid": "6ecc25c59745cbbe44a464ffb0feb0ac", "score": "0.69885033", "text": "public function store()\n\t{\n\t\ttry {\n\t\t\t$this->status_code = 200;\n\t\t\t// get POST data\n\t\t\t$input = Input::all();\n\n\t\t\t// set validation rules\n\t\t\t$rules = array(\n\t\t\t\t'title' => 'required'\n\t\t\t);\n\n\t\t\t// validate input\n\t\t\t$validator = Validator::make($input, $rules);\n\n\t\t\t// if validation fails, return the user to the form w/ validation errors\n\t\t\tif ($validator->fails()) {\n\t\t\t\t\t\t$this->status_code = 400;\n\t\t\t\t\t\t$messages = $validator->messages()->first();\t\t\t\t\t\t\n\t\t\t\t\t\treturn Helper::getResponse('true', $messages, $this->status_code);\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// -------------------------------- Create new Post instance\n\n\t\t\t\t$post = Post::create(array('title' => $input['title']));\n\n\t\t\t\t\n\t\t\t\t// -------------------------------- Send Email\n\n\t\t\t\tif($post){\n\n\t\t\t\t\t$this->_sendSuccessEmail($post);\n\t \n\t\t\t\t}\n\n\n\t\t\t\t//-------------------------------- Attach tags\n\n\t\t if (!empty($input['tags'])) {\n\n\t\t $this->_attachTagsToPost(array_unique($input['tags']), $post);\n\t\t }\n\n\n\n\n\t\t\t\t// Custom Message\n\t\t\t\t$messages = array(\n\t\t\t\t\t\t\t\t'success' => true, \n\t\t\t\t\t\t\t\t'status' => $this->status_code, \n\t\t\t\t\t\t\t\t'message' => 'Post inserted successfully!',\n\t\t\t\t\t\t\t\t'data' => $post,\n\t\t\t\t\t\t\t\t);\n\n\t\t\t\treturn Helper::getResponse('false', $messages, $this->status_code);\n\n\n\n\n\t\t\t\n\t\t} catch (HttpException $e) {\n\n\t\t\t// Custom Message\t\t\t\n\t\t\treturn Helper::getResponse('true', $e, 400);\n\n\n\n\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "7ac21bea5373c1791369bb1cb41ba88b", "score": "0.6987493", "text": "public function store(PostRequest $request)\n {\n $this->storePost();\n\n session()->flash('success', 'Post successfully created');\n return redirect()->route('post.index');\n\n }", "title": "" }, { "docid": "64a2b39c0f4c28f91a4ccf835d1a0d60", "score": "0.6986901", "text": "public function store(Request $request)\n {\n $data = $request->only(['title', 'body']);\n $data['user_id'] = auth()->id();\n\n $post = Post::create($data);\n $post->images()->attach($request->input('image'));\n return redirect()->route('posts.index');\n }", "title": "" }, { "docid": "1a814137f1dd4f471963f5237c2cc237", "score": "0.6985424", "text": "public function store(PostCreateRequest $request)\n {\n $postInput = $request->all();\n $user = Auth::user();\n if($file = $request->file('photo_id')) {\n $name = $file->getClientOriginalName();\n $size = $file->getClientSize();\n $file->move('images', $name); // creates avatars folder in public directory\n $photo = Photo::create( ['image_url'=>$name, 'size'=>$size ]);\n\n $postInput['photo_id'] = $photo['id'];\n }\n $user->posts()->create($postInput);\n return redirect('/admin/posts');\n }", "title": "" }, { "docid": "25bcef18a0a880bba80273e3290fa519", "score": "0.69808924", "text": "public function store() {\n\t\t$data = request()->validate(array(\n\t\t\t'caption' => 'required',\n\t\t\t'image' => array('required', 'image'),\n\t\t));\n\n\t\t// store the image file to the /storage/app/public/uploads folder\n\t\t$imagePath = request('image')->store('uploads', 'public');\n\n\t\t// resize the image with Intervention\\Image\\Facades\\Image\n\t\t$imageResizer = Image::make(\"storage/{$imagePath}\")->fit(1200, 1200);\n\t\t$imageResizer->save();\n\n\t\t// insert post to the related user\n\t\tauth()->user()->posts()->create(array(\n\t\t\t'caption' => $data['caption'],\n\t\t\t'image' => $imagePath,\n\t\t));\n\n\t\t// redirect to current user profile page\n\t\treturn redirect(route('profiles.show', auth()->user()->username));\n\t}", "title": "" }, { "docid": "09ccf12f7cfa3e5714dc71a57b73efe2", "score": "0.69804776", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required|string|max:50',\n 'post' => 'required',\n 'status' => 'required|string|max:25',\n ]);\n $post = new Post;\n $post->title = $request->title;\n $post->post = $request->post;\n $post->status = $request->status;\n $post->category_id = $request->category_id;\n $post->slug = Str::of($request->title)->slug('-');\n $post->user_id = $request->user()->id;\n $post->url_thumbnail = $request->url_thumbnail;\n $post->thumbnail_id = $request->thumbnail_id;\n\n $post->save();\n\n return response()->json(\n [\n \"meta\" => [\n \"message\" => \"Succes\",\n \"status\" => true\n ],\n \"data\" => $post\n ]\n );\n }", "title": "" }, { "docid": "682cf9175057b843f439d49243f35e43", "score": "0.6979921", "text": "public function store()\n {\n try {\n\n $fields = request()->all();\n\n if ($this->validator instanceof LaravelValidator)\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n if ($this->fileManager instanceof FileManager){\n $files = request()->allFiles();\n\n foreach ($files as $key => $value) {\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\n }\n }\n\n $createdData = $this->repository->create($fields);\n\n $response = [\n 'message' => 'Resource created.',\n 'data' => $createdData->toArray(),\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\n\n } catch (ValidatorException $e) {\n if (request()->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "title": "" }, { "docid": "5eac410aa57df44385bcdb73f4be63d0", "score": "0.6979854", "text": "public function store(Request $request)\n {\n //dd($request->all());\n $this->validate($request, [\n 'title' => 'required',\n 'featured' => 'required|image',\n 'content' => 'required',\n 'category_id' => 'required',\n 'tags' => 'required'\n ]);\n\n $featured = $request->featured;\n\n // TO prevent duplicate images with same name in DB\n\n $featured_new_name = time().$featured->getClientOriginalName();\n\n $featured->move('uploads/posts', $featured_new_name);\n\n $post = Post::create([\n 'title' => $request->title,\n 'content' => $request->content,\n 'featured' => 'uploads/posts/'.$featured_new_name,\n 'category_id' => $request->category_id,\n 'slug' => str_slug($request->title), //This function to generate a slug from a string ex: create a 5.6 project -> create-a-56-project\n 'user_id' => Auth::id() //This is to get the id of the authenticated user that wrote this post\n ]);\n\n $post->tags()->attach($request->tags);\n\n Session::flash('success', 'Post created successfully');\n\n return redirect()->back();\n\n }", "title": "" }, { "docid": "200b7e897687c514f43f870d76d6b5d3", "score": "0.6974825", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|max:255',\n 'content' => 'required',\n ]);\n $now = new Carbon();\n $user = Auth::user();\n\n $post = $user->posts()->create([\n 'title' => $request->title,\n 'content' => $request->content,\n 'published' => $request->has('published'),\n 'created_at'=> $now,\n ]);\n\n return redirect()->route('posts.index');\n }", "title": "" } ]
d06f26f0ec3e80f26b8c278a587d87c3
Return a random element from the array $products
[ { "docid": "4acd6fee729fddfab4ada050829ec2d6", "score": "0.8400271", "text": "public function product()\n {\n return $this->products[array_rand($this->products)];\n }", "title": "" } ]
[ { "docid": "0c36ccd610762e59ec6d9ca57c910ba2", "score": "0.75432706", "text": "public function getRandomProduct()\n\t{\n\t\t$this->db->join(self::categories, self::categories . '.id_category = ' . self::table . '.id_category', 'left');\n\t\t$this->db->order_by('id_product', 'RANDOM');\n\t\treturn $this->db->get(self::table, 4)->result();\n\t}", "title": "" }, { "docid": "d26717e13528e400fe42f7f09e9f0b20", "score": "0.70061976", "text": "private function _random_item_from_set()\n\t{\n\t\treturn $this->set[array_rand($this->set)];\n\t}", "title": "" }, { "docid": "deb440122af531db6cf2eb740169e79c", "score": "0.690019", "text": "function random_element($arreglo) {\n return is_array($arreglo) ? $arreglo[array_rand($arreglo)] : $arreglo;\n}", "title": "" }, { "docid": "14bb1a465eec14bdf2c2556d13e7a207", "score": "0.6898795", "text": "function get_random_element($array)\n{\n\treturn $array[mt_rand() % sizeof($array)];\n\n}", "title": "" }, { "docid": "08329292af29b8d7901a0e2f5da8410c", "score": "0.6873257", "text": "function random_element($array)\n\t{\n\t\treturn is_array($array) ? $array[array_rand($array)] : $array;\n\t}", "title": "" }, { "docid": "9f1d4223d667ed3ac4fd5fa68d7821ef", "score": "0.68564594", "text": "function rand()\n\t{\n\t\t// note: array_rand() returns a key.\n\t\treturn $this->get(array_rand($this->get()));\n\t}", "title": "" }, { "docid": "752ee8e2678266a752f3defe9b7cafe1", "score": "0.6781666", "text": "function tep_random_select($query) {\n $random_product = '';\n $random_query = tep_db_query($query);\n $num_rows = tep_db_num_rows($random_query);\n if ($num_rows > 0) {\n $random_row = tep_rand(0, ($num_rows - 1));\n tep_db_data_seek($random_query, $random_row);\n $random_product = tep_db_fetch_array($random_query);\n }\n\n return $random_product;\n }", "title": "" }, { "docid": "4e2a5e1ef65ba86c4d4e5385f96ac5dd", "score": "0.66701066", "text": "public function get_rand_product()\n {\n\t\t\n\t\t$this->db->select('*');\n\t\t$this->db->from('tbl_product');\n//\t\t$this->db->where('parentId != ', '0');\n\t $this->db->order_by('id', 'RANDOM');\n\t\n\t\t$this->db->limit(20, 0);\n\t\t\n\t\t$this->db->where(\"selling_price > \",\"0\");\n\t\t$this->db->where(\"retail_price > \",\"0\");\n\t\t$query = $this->db->get();\n\t//\techo $this->db->last_query();\n\t\treturn $query->result_array(); \n }", "title": "" }, { "docid": "b68299ba0f8287671509e2a446fec2f2", "score": "0.64274126", "text": "function pick($x){\n $y = $x[array_rand($x)];\n return $y;\n}", "title": "" }, { "docid": "acb03f55a8d6e8d1368ba0fcee828580", "score": "0.6377951", "text": "function createRandomProductRow() : array\n{\n return array(\n 'uuid' => generateUuid(),\n 'name' => Programster\\CoreLibs\\StringLib::generateRandomString(100, useSpecialChars: false, useNumbers: false),\n );\n}", "title": "" }, { "docid": "d8a1349ebd1cff3818b24221d2922d5e", "score": "0.637726", "text": "private function select_random_products(&$array_display){\n\t\t$rand_product = rand(1, $this->product_count);\n\n\t\tif(count($array_display) == 3){\n\t\t\n\t\t\treturn $array_display;\n\t\t}elseif(in_array($rand_product, $array_display) || $rand_product == $this->selected_product_ID){\n\n\t\t\t$this->select_random_products($array_display);\n\t\t}else{\n\t\t\t\n\t\t\tarray_push($array_display, $rand_product);\n\t\t\t$this->select_random_products($array_display);\n\t\t}\n\t}", "title": "" }, { "docid": "934264698c12222c477b597d86f4c7e1", "score": "0.6348549", "text": "public function getOneRandom();", "title": "" }, { "docid": "4cdb14f9f6ea6299ce2765c8e8026e0f", "score": "0.6334168", "text": "function get_random_id()\n {\n $args = array('post_type'=>'panther_product','hide_empty'=>1);\n $posts = get_posts($args);\n $i=0;\n //put id's that exist into array for randomizing\n foreach($posts as $post)\n {\n $randomArray[$i] = $post->ID;\n $i++;\n }\n //count elements in array -1 for indexing\n $count = count($randomArray)-1;\n $random_post_id = $randomArray[rand(0,$count)];\n return $random_post_id;\n }", "title": "" }, { "docid": "bfbe92e15fa0f6844cb05ba9dd41db39", "score": "0.6218194", "text": "public function random()\n {\n return $this->storage[$this->randomKey()];\n }", "title": "" }, { "docid": "16973634922bc609ce14e2d1aa9f88f3", "score": "0.6115456", "text": "public function random()\n {\n $new = $this->values();\n if ($this->count() === 0) {\n return null;\n }\n return $new[get_random_int(0, $this->count() - 1)];\n }", "title": "" }, { "docid": "b12a1c188a745dc71665d0fa9469d668", "score": "0.6036235", "text": "function getRANDAllProductBySubCateId ($subcateid) {\n $sql = \"SELECT * FROM tbl_product Where subcateid = '\".$subcateid.\"' ORDER BY RAND() LIMIT 40\"; // ORDER BY name ASC\n $queryResult = mysql_query($sql);\n if (!$queryResult) {\n echo 'Could not run query: ' . mysql_error();\n exit;\n }\n $i = 0;\n $result = null;\n while ($seletedItem = mysql_fetch_array($queryResult)) {\n $item = new Product();\n $item->id = $seletedItem['id'];\n $item->subcateId = $seletedItem['subcateid'];\n $item->name = $seletedItem['name'];\n $item->price = $seletedItem['price'];\n $item->promotion_price = $seletedItem['promotion_price'];\n $item->image_1 = $seletedItem['image_1'];\n $item->image_2 = $seletedItem['image_2'];\n $item->image_3 = $seletedItem['image_3'];\n $item->size = $seletedItem['size'];\n $item->material = $seletedItem['material'];\n $item->color = $seletedItem['color'];\n $item->description = $seletedItem['description'];\n $item->created_date = $seletedItem['created_date'];\n $result[$i] = $item;\n $i++;\n }\n return $result;\n}", "title": "" }, { "docid": "36061b291e99feaced18a0994cbbc177", "score": "0.5988481", "text": "private function random()\n\t{\n\t\treturn $this->stack{rand(0, $this->stackLength)};\n\t}", "title": "" }, { "docid": "b7e64a0fbf1122bc289e3022ad07482e", "score": "0.59718543", "text": "protected function randomlyPickItemFromList(array $items) {\n $random_item = '';\n\n $count = 0;\n foreach ($items as $item) {\n $count++;\n if (rand() % $count == 0) {\n $random_item = $item;\n }\n }\n\n return $random_item;\n }", "title": "" }, { "docid": "dec2e587a92788d83f85d2d6b9f5f2a2", "score": "0.5940204", "text": "function rand_e(&$arr) {\n\t\t\t\treturn $arr[rand(0, sizeof($arr)-1)];\n\t\t\t}", "title": "" }, { "docid": "40419ade67264529d6844014fb70ddf9", "score": "0.593792", "text": "public static function getRandomProducts($conn, $so_id, $num) {\n $sql = 'SELECT * from products \n join products_stores on pr_sku = sku\n join categories on pr_cat_id = cat_id\n where store_id = :so_id\n order by random()\n limit :num';\n\n return $conn->fetchAll($sql, ['num' => $num, 'so_id' => $so_id]);\n }", "title": "" }, { "docid": "91b81893e82d397cd1da8b4b3100d983", "score": "0.591983", "text": "function randomMovie($movies)\n{\n shuffle($movies);\n $randMovie = array_pop($movies);\n return $randMovie;\n}", "title": "" }, { "docid": "e2aafe326cf649fa54ded75ad9687fc0", "score": "0.5874531", "text": "function alm_woo_get_random_product_cat(){\n\n\t$args = array(\n\t\t'taxonomy' => 'product_cat',\n\t\t'hide_empty' => true\n\t);\n\t$terms = get_terms( $args );\n\n\tif($terms){\n\t\t// Category\n\t\t$index = array_rand($terms, 1);\n\t\t$term = $terms[$index];\n\t\t$term_link = get_term_link( $term );\n\t\treturn $term_link;\n\t} else {\n\t\t// Tags\n\t\t$args['taxonomy'] = 'product_tag';\n\t\t$terms = get_terms( $args );\n\t\tif($terms){\n\t\t\t$index = array_rand($terms, 1);\n\t\t\t$term = $terms[$index];\n\t\t\t$term_link = get_term_link( $term );\n\t\t\treturn $term_link;\n\t\t}\n\t}\n\n}", "title": "" }, { "docid": "420d684eafd24564b37f7cb75f3d7efa", "score": "0.58034873", "text": "function oscimp_getproducts($product_cnt=1) { \n \n \n //Connect to the OSCommerce database \n $oscommercedb = new wpdb(get_option('oscimp_dbuser'),get_option('oscimp_dbpwd'), get_option('oscimp_dbname'), get_option('oscimp_dbhost')); \n \n $retval = ''; \n for ($i=0; $i<$product_cnt; $i++) { \n //Get a random product \n $product_count = 0; \n while ($product_count == 0) { \n $product_id = rand(0,30); \n $product_count = $oscommercedb->get_var(\"SELECT COUNT(*) FROM products WHERE products_id=$product_id AND products_status=1\"); \n } \n \n //Get product image, name and URL \n $product_image = $oscommercedb->get_var(\"SELECT products_image FROM products WHERE products_id=$product_id\"); \n $product_name = $oscommercedb->get_var(\"SELECT products_name FROM products_description WHERE products_id=$product_id\"); \n $store_url = get_option('oscimp_store_url'); \n $image_folder = get_option('oscimp_prod_img_folder'); \n \n //Build the HTML code \n $retval .= '<div class=\"oscimp_product\">'; \n $retval .= '<a href=\"'. $store_url . 'product_info.php?products_id=' . $product_id . '\"><img src=\"' . $image_folder . $product_image . '\" /></a><br />'; \n $retval .= '<a href=\"'. $store_url . 'product_info.php?products_id=' . $product_id . '\">' . $product_name . '</a>'; \n $retval .= '</div>'; \n } \n \t\n \t\t\n \t//$retval .= \"Hello\";\n \n return $retval; \n}", "title": "" }, { "docid": "03fed0b8899248cc6e17581952519097", "score": "0.5802167", "text": "function wp_pluginner_array_random($array, $num = null)\n {\n return Arr::random($array, $num);\n }", "title": "" }, { "docid": "e98a8d16f45bf3f5a07e0d194e4fbc50", "score": "0.5791602", "text": "function randomGen($array){\n $random = rand(0, count($array)-1);\n $random = $array[$random];\n return $random;\n}", "title": "" }, { "docid": "a22188960f3407d6fd70412fcab81e7e", "score": "0.57800996", "text": "private function pickRandomValue($arr)\n {\n return $arr[array_rand($arr, 1)];\n }", "title": "" }, { "docid": "c93e8995cda89583fa742ca704d87552", "score": "0.5768685", "text": "function getRandomQuote ($array) {\r\n return $array[array_rand($array)];\r\n}", "title": "" }, { "docid": "bc843c1194ed68c6d3f7972337dcf6de", "score": "0.57517964", "text": "public function getRandomProducts($limit = 20){\n $query = \"SELECT * FROM `products`\n WHERE `products`.id >= (\n SELECT floor( RAND() * (\n (SELECT MAX(`products`.id) FROM `products`)\n -\n (SELECT MIN(`products`.id) FROM `products`)\n ) \n + (SELECT MIN(`products`.id) FROM `products`))\n )\n LIMIT $limit\";\n return $this->query($query); \n }", "title": "" }, { "docid": "a012db73ae157271d62f96d6b4e85bfd", "score": "0.5740967", "text": "function getRandomQuote($array){\n return $array[array_rand($array)];\n}", "title": "" }, { "docid": "302538e9728d2e9ab9f81c31fa2563df", "score": "0.5734223", "text": "public function random($where = [])\n {\n // get full list\n $data = $this->find($where);\n\n // get one by random\n return is_array($data)\n ? array_rand($data)\n : $data;\n }", "title": "" }, { "docid": "1f7737a2ec133316d5736fd041a07db6", "score": "0.57026213", "text": "public static function getAllByRand($num){\n\t\t$sql = \"SELECT * FROM produtos ORDER BY rand() LIMIT $num;\";\n\t\treturn BD::query($sql);\n\t}", "title": "" }, { "docid": "bf2b75c105d5a2c480c088003d830716", "score": "0.5664113", "text": "static public function choose(array $array): mixed\n {\n if (count($array) == 0)\n return null;\n\t\t\n\t\t$keys = array_keys($array);\n\t\t$selection = $keys[ rand(0, count($keys)-1) ];\n\t\t\n return $array[ $selection ];\n }", "title": "" }, { "docid": "71aef518280938bdd9ca1e50db167995", "score": "0.5648901", "text": "function getWord() {\r\n\r\n\r\n //Here are the random pizza types, you may not use this array or modify it in the program, you may only pick a value from it!.\r\n $pizzaTypes = ['Marinara', \r\n 'Margherita', \r\n 'Chicago', \r\n 'Tomato', \r\n 'Sicilian', \r\n 'Greek', \r\n 'California'];\r\n \r\n //Shuffle the array, pull one from the top or find the length of the array and select a random number.\r\n $rand_keys = array_rand($pizzaTypes,2);\r\n $randPizzaType = strtolower($pizzaTypes[$rand_keys[0]]);\r\n return $randPizzaType;\r\n}", "title": "" }, { "docid": "7d73405b937e117688a8a1867b65d8e2", "score": "0.5646808", "text": "function getRandomQuote($array) {\n return $array[array_rand($array)];\n}", "title": "" }, { "docid": "bb51910713afc133bf9ed9f865919214", "score": "0.563869", "text": "public function getPrice($productIndex)\n {\n // phpcs:disable\n mt_srand($productIndex);\n switch (mt_rand(0, 3)) {\n case 0:\n return 9.99;\n case 1:\n return 5;\n case 2:\n return 1;\n case 3:\n return mt_rand(1, 10000) / 10;\n }\n // phpcs:enable\n }", "title": "" }, { "docid": "123aa950fd81273814df534cc0484efc", "score": "0.5637878", "text": "public function findRandom() \n {\n $query = $this->createQuery();\n $query->matching($query->equals('showcase', 1));\n $results = $query->execute();\n\n\t\t\n\t\t\n\t\tif(is_object($results))\n\t\t{\n\t\t\t$results = $results->toArray();\n\t\t}\n\t\t\n\t\t$filteredResults = [];\n\t\t\n\t\tforeach($results as $result)\n\t\t{\n\t\t\t$artist = $result->getArtist();\n\t\t\t\n\t\t\tif($artist->getPermanent() == 1 && $artist->getAdvertise() == 1)\n\t\t\t{\n\t\t\t\t$filteredResults[] = $result;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//\\TYPO3\\CMS\\Extbase\\Utility\\DebuggerUtility::var_dump($filteredResults);\n\t\t\n\t\t$count = count($filteredResults);\n if($count > 0)\n {\n if($count === 1)\n {\n return $filteredResults[0];\n }\n else \n {\n $x = mt_rand(0, max(0, ($count - 1)));\n return $filteredResults[$x];\n }\n }\n else\n {\n return NULL;\n }\n }", "title": "" }, { "docid": "8563b0a4f763d7f7975e40ffefec1c84", "score": "0.5635231", "text": "public function random($amount = 1);", "title": "" }, { "docid": "70ba82b687d3f9de3e1420693b12fb9e", "score": "0.5626565", "text": "public function getProductForTest(){\n\t\t\t///file_get_contents(\\Yii::getAlias('@webroot').\"/var/8713189004.txt\")\n\t\t$timeStamp = time();\n\t\t$data = Array(\n\t\t\t 'id' => '8713189004',\n\t\t\t 'title' => 'Apple-71'.$timeStamp,\n\t\t\t 'body_html' => 'Apple 7 mobile'.$timeStamp,\n\t\t\t 'vendor' => 'Fashion Apparel'.$timeStamp, \n\t\t\t 'product_type' => 'ball',\n\t\t\t 'created_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'handle' => 'apple-7',\n\t\t\t 'updated_at' => '2016-10-13T08:17:54-04:00',\n\t\t\t 'published_at' => '2016-10-07T03:26:00-04:00',\n\t\t\t 'published_scope' => 'global',\n\t\t\t 'tags' => '',\n\t\t\t 'variants' => Array\n\t\t\t (\n\t\t\t '0' => Array\n\t\t\t (\n\t\t\t 'id' => '29982617292',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'title' => 'silver / 75'.$timeStamp,\n\t\t\t 'price' => $this->getRandomFloatValue(),\n\t\t\t 'sku' => '285642562',\n\t\t\t 'position' => '1',\n\t\t\t 'grams' => '500',\n\t\t\t 'inventory_policy' => 'deny',\n\t\t\t 'fulfillment_service' => 'manual',\n\t\t\t 'inventory_management' => 'shopify',\n\t\t\t 'option1' => 'silver'.$timeStamp,\n\t\t\t 'option2' => '75'.$timeStamp,\n\t\t\t 'created_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'taxable' => '1',\n\t\t\t 'barcode' => '',\n\t\t\t 'inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'weight' =>$this->getRandomFloatValue(),\n\t\t\t 'weight_unit' => 'kg',\n\t\t\t 'old_inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'requires_shipping' => 1,\n\t\t\t ),\n\n\t\t\t '1' => Array\n\t\t\t (\n\t\t\t 'id' => '29982617356',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'title' => 'silver / 65 '.$timeStamp,\n\t\t\t 'price' => $this->getRandomFloatValue(),\n\t\t\t 'sku' => '285642563',\n\t\t\t 'position' => 2,\n\t\t\t 'grams' => 500,\n\t\t\t 'inventory_policy' => 'deny',\n\t\t\t 'fulfillment_service' => 'manual',\n\t\t\t 'inventory_management' => 'shopify',\n\t\t\t 'option1' => 'silver'.$timeStamp,\n\t\t\t 'option2' => '65'.$timeStamp,\n\t\t\t 'created_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'taxable' => 1,\n\t\t\t 'barcode' => '',\n\t\t\t 'inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'weight' => $this->getRandomFloatValue(),\n\t\t\t 'weight_unit' => 'kg',\n\t\t\t 'old_inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'requires_shipping' => 1,\n\t\t\t ),\n\n\t\t\t '2' => Array\n\t\t\t (\n\t\t\t 'id' => '29982617420',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'title' => 'silver / 56'.$timeStamp,\n\t\t\t 'price' => $this->getRandomFloatValue(),\n\t\t\t 'sku' => '285642564',\n\t\t\t 'position' => 3,\n\t\t\t 'grams' => 500,\n\t\t\t 'inventory_policy' => 'deny',\n\t\t\t 'fulfillment_service' => 'manual',\n\t\t\t 'inventory_management' => 'shopify',\n\t\t\t 'option1' => 'silver'.$timeStamp,\n\t\t\t 'option2' => '56'.$timeStamp,\n\t\t\t 'created_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'taxable' => 1,\n\t\t\t 'barcode' => '',\n\t\t\t 'inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'weight' => $this->getRandomFloatValue(),\n\t\t\t 'weight_unit' => 'kg',\n\t\t\t 'old_inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'requires_shipping' => 1,\n\t\t\t ),\n\n\t\t\t '3' => Array\n\t\t\t (\n\t\t\t 'id' => '29982617484',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'title' => 'golden / 75 '.$timeStamp,\n\t\t\t 'price' => $this->getRandomFloatValue(),\n\t\t\t 'sku' => '285642565',\n\t\t\t 'position' => 4,\n\t\t\t 'grams' => 500,\n\t\t\t 'inventory_policy' => 'deny',\n\t\t\t 'fulfillment_service' => 'manual',\n\t\t\t 'inventory_management' => 'shopify',\n\t\t\t 'option1' => 'golden'.$timeStamp,\n\t\t\t 'option2' => '75'.$timeStamp,\n\t\t\t 'created_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'taxable' => 1,\n\t\t\t 'barcode' => '',\n\t\t\t 'inventory_quantity' =>$this->getRandomIntValue(),\n\t\t\t 'weight' => $this->getRandomFloatValue(),\n\t\t\t 'weight_unit' => 'kg',\n\t\t\t 'old_inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'requires_shipping' => 1,\n\t\t\t ),\n\n\t\t\t '4' => Array\n\t\t\t (\n\t\t\t 'id' => '29982617548',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'title' => 'golden / 65'.$timeStamp,\n\t\t\t 'price' => $this->getRandomFloatValue(),\n\t\t\t 'sku' => '285642566',\n\t\t\t 'position' => 5,\n\t\t\t 'grams' => '500',\n\t\t\t 'inventory_policy' => 'deny',\n\t\t\t 'fulfillment_service' => 'manual',\n\t\t\t 'inventory_management' => 'shopify',\n\t\t\t 'option1' => 'golden'.$timeStamp,\n\t\t\t 'option2' => '65'.$timeStamp,\n\t\t\t 'created_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'taxable' => 1,\n\t\t\t 'barcode' => '',\n\t\t\t 'inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'weight' => $this->getRandomFloatValue(),\n\t\t\t 'weight_unit' => 'kg',\n\t\t\t 'old_inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'requires_shipping' => 1,\n\t\t\t ),\n\n\t\t\t '5' => Array\n\t\t\t (\n\t\t\t 'id' => '29982617612',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'title' => 'golden / 56'.$timeStamp,\n\t\t\t 'price' => $this->getRandomFloatValue(),\n\t\t\t 'sku' => '285642567',\n\t\t\t 'position' => 6,\n\t\t\t 'grams' => 500,\n\t\t\t 'inventory_policy' => 'deny',\n\t\t\t 'fulfillment_service' => 'manual',\n\t\t\t 'inventory_management' => 'shopify',\n\t\t\t 'option1' => 'golden'.$timeStamp,\n\t\t\t 'option2' => '56'.$timeStamp,\n\t\t\t 'created_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:31-04:00',\n\t\t\t 'taxable' => 1,\n\t\t\t 'barcode' => '',\n\t\t\t 'inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'weight' => $this->getRandomFloatValue(),\n\t\t\t 'weight_unit' => 'kg',\n\t\t\t 'old_inventory_quantity' => $this->getRandomIntValue(),\n\t\t\t 'requires_shipping' => 1,\n\t\t\t ),\n\n\t\t\t ),\n\n\t\t\t 'options' => Array\n\t\t\t (\n\t\t\t '0' => Array\n\t\t\t (\n\t\t\t 'id' => '10496543820',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'name' => 'Color',\n\t\t\t 'position' => 1,\n\t\t\t 'values' => Array\n\t\t\t (\n\t\t\t '0' => 'silver'.$timeStamp,\n\t\t\t '1' => 'golden'.$timeStamp\n\t\t\t )\n\n\t\t\t ),\n\n\t\t\t '1' => Array\n\t\t\t (\n\t\t\t 'id' => '10496543884',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'name' => 'Size',\n\t\t\t 'position' => 2,\n\t\t\t 'values' => Array\n\t\t\t (\n\t\t\t '0' => '75'.$timeStamp,\n\t\t\t '1' => '65'.$timeStamp,\n\t\t\t '2' => '56'.$timeStamp,\n\t\t\t )\n\n\t\t\t ),\n\n\t\t\t ),\n\n\t\t\t 'images' => Array\n\t\t\t (\n\t\t\t '0' => Array\n\t\t\t (\n\t\t\t 'id' => '19247501580',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'position' => 1,\n\t\t\t 'created_at' => '2016-10-07T03:32:34-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:34-04:00',\n\t\t\t 'src' => 'https://cdn.shopify.com/s/files/1/1009/2336/products/1.jpg?v=1475825554',\n\t\t\t ),\n\n\t\t\t ),\n\n\t\t\t 'image' => Array\n\t\t\t (\n\t\t\t 'id' => '19247501580',\n\t\t\t 'product_id' => '8713189004',\n\t\t\t 'position' => 1,\n\t\t\t 'created_at' => '2016-10-07T03:32:34-04:00',\n\t\t\t 'updated_at' => '2016-10-07T03:32:34-04:00',\n\t\t\t 'src' => 'https://cdn.shopify.com/s/files/1/1009/2336/products/1.jpg?v=1475825554',\n\t\t\t ),\n\n\t\t\t 'shopName' => 'ced-jet.myshopify.com',\n\t\t\t);\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "8f2dac0f7e6fd920896670e036e84b34", "score": "0.5610075", "text": "public function randomize();", "title": "" }, { "docid": "bca156222896ad8e3478916037389242", "score": "0.56088233", "text": "function array_rand($array, $num = 1)\n{\n}", "title": "" }, { "docid": "45ab2a728873894c36bfb1ca9b658747", "score": "0.5600555", "text": "public function random_materials( $count = 1 ){ return CMSMaterial::get( NULL, $this, 0, 1, array( 'RAND()', ''), array( 0, $count) ); }", "title": "" }, { "docid": "b4ff85bc68c1fc83ac95e067a2182068", "score": "0.5589629", "text": "function randomImage() {\n global $images;\n return $images[array_rand($images)];\n}", "title": "" }, { "docid": "2357e4af78446ac05263c68fda5c8963", "score": "0.5574872", "text": "private function randomItemFromArray(array $array): ?string\n {\n return $array[array_rand($array)];\n }", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.5533415", "text": "public function getProduct();", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.5533415", "text": "public function getProduct();", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.5533415", "text": "public function getProduct();", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.5533415", "text": "public function getProduct();", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.5533415", "text": "public function getProduct();", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.5533415", "text": "public function getProduct();", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.5533415", "text": "public function getProduct();", "title": "" }, { "docid": "60ba838ff021b7d0cb95a472ffabca92", "score": "0.55312663", "text": "public function definition()\n {\n $product = new Product();\n $keys = array_keys($product->getUnits()); \n $rand = array_rand($keys, 1);\n return [\n 'description' => $this->faker->sentence(3),\n 'price' => $this->faker->randomFloat(2,0,1000),\n 'user_id' => User::factory(),\n 'quantity' => random_int(1,50),\n 'unit' => $keys[$rand],\n 'rural_property_id' => RuralProperty::factory()\n ];\n }", "title": "" }, { "docid": "5220b554dd98363d0cd08e88bf1798e3", "score": "0.5526483", "text": "function woocommerce_output_related_products() {\r\n\t\twoocommerce_related_products(array(\r\n\t\t\t'posts_per_page' => 4,\r\n\t\t\t'columns' => 4,\r\n\t\t\t'orderby' => 'rand',\r\n\t\t)); // Display 4 products in rows of 1\r\n\t}", "title": "" }, { "docid": "8f14761ffed03d00015f13f2dc70ba50", "score": "0.55105853", "text": "public function getMatchingProduct()\n {\n //\n }", "title": "" }, { "docid": "c7f198509d57d9e6ccac79c741d1f6d9", "score": "0.5509641", "text": "function getRandArrayVal($arr, $num = 1, $suffle = true){\n\tif( $num > 1 ){\n\t\t$rand = array_rand($arr, $num);\n\t\t$return = [];\n\t\tforeach ($rand as $key => $value) {\n\t\t\t$return[] = $arr[$value];\n\t\t}\n\t\tif( $suffle ) shuffle($return);\n\t\treturn $return;\n\t} else{\n\t\t$rand = array_rand($arr);\n\t\treturn $arr[$rand];\n\t}\n}", "title": "" }, { "docid": "dd2140e663d41dab215872f9a6cd133c", "score": "0.5502361", "text": "function get_random_restaurants($num){\n\t\t/* Database connection */\n\t\t$dbCon = new dbConnection();\n\t\t$con = $dbCon->databaseConnect();\n\t\t/*~~~~~~~~~~~~~~~~~~~~*/\n\t\n\t\t$select = \"SELECT name\n\t\tFROM restaurants\n\t\tORDER BY RAND()\n\t\tLIMIT $num\"\n\t\tor die(\"Error in the consult..\" . mysqli_error($con));\n\t\n\t\t$selectResult = $con->query($select);\n\t\n\t\t$list = array();\n\t\twhile($row = $selectResult->fetch_array()) {\n\t\t\tarray_push($list, $row[0]);\n\t\t}\n\t\t\n\t\tmysqli_close($con);\n\t\t\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "9ca8ce895bb98e562558857dda054ecc", "score": "0.549631", "text": "public function test_making_get_request_to_list_one_product()\n {\n $data = Product::factory()->create();\n\n $this->assertDatabaseCount('products', 1);\n $this->assertDatabaseHas('products', $data->toArray());\n\n $response = $this->getJson(self::PRODUCT_URI . '/' . $data->id);\n $response->assertOk();\n }", "title": "" }, { "docid": "3ef693c6182eb4d393d22a8b54b19960", "score": "0.54881346", "text": "public function getRandomImage() {\n $images = $this->t29_settings['random_images'];\n $num_images = count($images);\n $random = self::randomInt(0, $num_images - 1);\n return $images[$random];\n }", "title": "" }, { "docid": "2bc66174e33503577b3021a769d251b9", "score": "0.54769856", "text": "public function getAProduct($products_list)\n {\n $products = $products_list;\n foreach ($products as $key=>$product){\n if($product->speed <= 10){\n unset($products[$key]);\n }\n }\n $products = $products->filter()->values();\n return $products;\n }", "title": "" }, { "docid": "d2b7fde1c58f4a5c8dd44abf78acaeb7", "score": "0.5462376", "text": "public function random($size);", "title": "" }, { "docid": "8056b1428827b9ab95103ab183a25286", "score": "0.54590994", "text": "function product()\n\t{\n\t\tif($this->db->table_exists('shop_images'))\n\t\t{\n\t\t\t$x = explode(',' , $this->attribute('x', '') );\n\t\t\t$id = $this->attribute('id', '0');\n\t\t\t$limit = intval($this->attribute('max', '0'));\n\n\t\t\t$this->load->model('shop_images/images_m');\n\n\t\t\t($limit == '0') OR $this->images_m->limit( $limit ) ;\n\t\t\t$this->db->where('product_id',$id)->where('cover',0);\n\t\t\tif(in_array('COVER', $x )) $this->db->or_where('product_id',$id)->where('cover',1);\n\n\t\t\t$images = $this->images_m->get_all();\n\n\t\t\tif(in_array('RANDOMIZE', $x )) shuffle( $images );\n\t\t\t$ret = array(); $ret[] = array( 'images'=> $images , 'count' => (in_array('COUNT', $x ) ? count($images) : '' ));\n\n\t\t\treturn $ret;\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "ea28a3de841e87c89df758d2e3d67085", "score": "0.5453429", "text": "function comprar_una_figu($figus_total){\n $figu = rand(1,$figus_total);\n //print(\"Compre la $figu\");\n return $figu;\n}", "title": "" }, { "docid": "4b33abdad15c56b5c307c30581c7193a", "score": "0.5446378", "text": "public function foodName()\n {\n return static::randomElement(static::$foodNames);\n }", "title": "" }, { "docid": "6df752e052aa2db6c3dbd9723ab06b56", "score": "0.5446163", "text": "public function run(Faker $faker)\n {\n $products = [\n [\n 'name' => 'GALLETAS OREO 35g',\n\n 'category_id' => 2,\n\n ],\n [\n 'name' => 'PULP x150 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'CORONA 500 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'ITAIPAVA 500 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'CUZQUEÑA 450 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'GUARANÁ 500 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'KOLA REAL 350 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'PILSEN 500 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'PILSEN 255 ml',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'GALLETA RELLENITAS 50g',\n\n 'category_id' => 2,\n\n ],\n [\n 'name' => 'GALLETA CLUB SOCIAL 30g',\n\n 'category_id' => 2,\n\n ],\n [\n 'name' => 'GALLETA SODA V 50g',\n\n 'category_id' => 2,\n\n ],\n [\n 'name' => 'GASEOSA INCA KOLA 2.5 L',\n\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'COCA COLA 355 ml LATA',\n 'category_id' => 1,\n\n ],\n [\n 'name' => 'AGUA BRASILERA PEQUEÑA',\n 'category_id' => 1,\n\n ],\n ];\n foreach ($products as $product) {\n Product::create($product);\n }\n }", "title": "" }, { "docid": "4315bc120ea39f73834b23020ce16340", "score": "0.54447895", "text": "function array_random($arr, $num = 1) {\n\n shuffle($arr);\n \n $r = array();\n \n for ($i = 0; $i < $num; $i++) {\n $r[] = $arr[$i];\n }\n\n return $num == 1 ? $r[0] : $r;\n\n}", "title": "" }, { "docid": "5a7182c7c5dde3253509e0e4329f9129", "score": "0.544304", "text": "public function product(){\n return $this->product;\n }", "title": "" }, { "docid": "7144ed3ccce6d1b69975199ff5903bea", "score": "0.5437323", "text": "public function randomKey()\n {\n return array_rand($this->storage);\n }", "title": "" }, { "docid": "5d08ff33ae499241c19ee5585306e5ee", "score": "0.54143727", "text": "function woocommerce_output_related_products() {\n $args = array(\n 'posts_per_page' \t=> 1,\n 'columns' \t\t\t=> 4,\n 'orderby' \t\t\t=> 'rand', // @codingStandardsIgnoreLine.\n );\nwoocommerce_related_products( apply_filters( 'woocommerce_output_related_products_args', $args ) );\n}", "title": "" }, { "docid": "f3bec1764cfcbbeaf051a9490db6cfb8", "score": "0.54092956", "text": "public function generate_fake_products($quantity) {\n\t\t\t\n\t\t\t// Generate a certain number of fake products\n\t\t\t$names_first_part = array(\n\t\t\t\t\t\t\t\t\t 'Balón',\n\t\t\t\t\t\t\t\t\t 'Bañador',\n\t\t\t\t\t\t\t\t\t 'Bicicleta',\n\t\t\t\t\t\t\t\t\t 'Calcetines',\n\t\t\t\t\t\t\t\t\t 'Gafas',\n\t\t\t\t\t\t\t\t\t 'Gorros',\n\t\t\t\t\t\t\t\t\t 'Patines',\n\t\t\t\t\t\t\t\t\t 'Protecciones',\n\t\t\t\t\t\t\t\t\t 'Raqueta',\n\t\t\t\t\t\t\t\t\t 'Reloj',\n\t\t\t\t\t\t\t\t\t 'Ropa',\n\t\t\t\t\t\t\t\t\t 'Toalla',\n\t\t\t\t\t\t\t\t\t 'Zapatillas'\n\t\t\t\t\t\t\t\t\t );\n\t\t\t$names_second_part = array(\n\t\t\t\t\t\t\t\t\t 'Darth Vader',\n\t\t\t\t\t\t\t\t\t 'Yoda',\n\t\t\t\t\t\t\t\t\t 'Obi-Wan Kenobi',\n\t\t\t\t\t\t\t\t\t 'Almirante Ackbar',\n\t\t\t\t\t\t\t\t\t 'Anakin Ani Skywalker',\n\t\t\t\t\t\t\t\t\t 'BB-8',\n\t\t\t\t\t\t\t\t\t 'BB-9E',\n\t\t\t\t\t\t\t\t\t 'Boba Fett',\n\t\t\t\t\t\t\t\t\t 'C-3PO',\n\t\t\t\t\t\t\t\t\t 'C2-B5',\n\t\t\t\t\t\t\t\t\t 'Capitana Phasma',\n\t\t\t\t\t\t\t\t\t 'Chewbacca',\n\t\t\t\t\t\t\t\t\t 'Chirrut Imwe',\n\t\t\t\t\t\t\t\t\t 'Darth Maul',\n\t\t\t\t\t\t\t\t\t 'Darth Vader',\n\t\t\t\t\t\t\t\t\t 'Death Troopers',\n\t\t\t\t\t\t\t\t\t 'Director Orson Krennic',\n\t\t\t\t\t\t\t\t\t 'Ewoks',\n\t\t\t\t\t\t\t\t\t 'Finn',\n\t\t\t\t\t\t\t\t\t 'General Hux',\n\t\t\t\t\t\t\t\t\t 'Han Solo',\n\t\t\t\t\t\t\t\t\t 'Jyn Erso',\n\t\t\t\t\t\t\t\t\t 'K-2SO',\n\t\t\t\t\t\t\t\t\t 'Kylo Ren',\n\t\t\t\t\t\t\t\t\t 'Lando Calrissian',\n\t\t\t\t\t\t\t\t\t 'Luke Skywalker',\n\t\t\t\t\t\t\t\t\t 'Obi-Wan Kenobi',\n\t\t\t\t\t\t\t\t\t 'Poe',\n\t\t\t\t\t\t\t\t\t 'Porg',\n\t\t\t\t\t\t\t\t\t 'Praetorian Guard',\n\t\t\t\t\t\t\t\t\t 'Princesa Leia',\n\t\t\t\t\t\t\t\t\t 'R2-D2',\n\t\t\t\t\t\t\t\t\t 'Rey',\n\t\t\t\t\t\t\t\t\t 'Rose Tico',\n\t\t\t\t\t\t\t\t\t 'Snowtroopers',\n\t\t\t\t\t\t\t\t\t 'Stormtroopers',\n\t\t\t\t\t\t\t\t\t 'Yoda'\n\t\t\t\t\t\t\t\t\t );\n\t\t\tfor ($i = 1; $i <= $quantity; $i++) {\n\t\t\t\t$code = uniqid();\n\t\t\t\t$name = $names_first_part[array_rand($names_first_part, 1)].\" \".$names_second_part[array_rand($names_second_part, 1)];\n\t\t\t\t$descrition = $name.\" ha sido concebido para deportistas ocasionales o principiantes.\";\n\t\t\t\t$image = \"\";\n\t\t\t\t$price = mt_rand(5, 99).\".99\";\n\t\t\t\t$category_id_1 = mt_rand(1, 5);\n\t\t\t\t$category_id_2 = mt_rand(1, 5);\n\t\t\t\t$query = $this->db->query(\"CALL INSERT_PRODUCT('\".$code.\"', '\".$name.\"', '\".$descrition.\"', '\".$image.\"', \".$price.\", \".$category_id_1.\", \".$category_id_2.\");\");\n\t\t\t}\n\t\t\n\t\t}", "title": "" }, { "docid": "3afe2ec6cd10ac8d9454c12532d0384e", "score": "0.5400944", "text": "function getRandomClue($arrayClues)\n\t{\n\t\t$item = $arrayClues[rand(0, count($arrayClues)-1)];\n\t\treturn $item;\n\t}", "title": "" }, { "docid": "0890aad712c4c46c8787751330c6eeac", "score": "0.5399746", "text": "public function get_random_image()\n {\n $image = $this->db->query(\"\n SELECT * FROM {$this->table_name}\n ORDER BY RAND()\n LIMIT 1\n \")->result();\n\n return $image[0];\n }", "title": "" }, { "docid": "3113e768cac705a9a02f13af971b8ec1", "score": "0.539406", "text": "function randomProductOrderNumber(int $limit = 4)\n {\n $date = date('ljSofFYhisA');\n $string = substr(str_shuffle(str_repeat(strtoupper('abcdefghijklmnopqrstuvwxyz'), 10)), 0, $limit);\n $rand = strtoupper(substr(uniqid(sha1(time())), 0, 6));\n return $string . '' . $rand;\n }", "title": "" }, { "docid": "a5df8519b92011758c7f2c59745e7920", "score": "0.53939676", "text": "public function run(Faker $faker)\n {\n $orders = Order::all();\n $products = Product::all()->toArray();\n\n foreach ($orders as $order) {\n $used = [];\n\n for ($i=0; $i < rand(1,5); $i++) {\n $product = $faker->randomElement($products);\n\n if(!in_array($product[\"id\"],$used)) {\n $id = $product[\"id\"];\n $price = $product[\"price\"];\n $quantity = $faker->numberBetween(1,3);\n\n OrderItem::create([\n 'order_id' => $order->id,\n 'product_id'=> $id,\n 'quantity' => $quantity,\n 'price' => $price\n ]);\n\n $used[] = $product[\"id\"];\n }\n }\n }\n }", "title": "" }, { "docid": "ed3d6df079269d47c867602eb51518ec", "score": "0.53838944", "text": "function getRandItemId($type, $number){\n\t\t$table = \"ce_\".strtolower($type);\n\t\t$idName = \"id\".$type;\n\n\t\t$result = $this->db->prepare(\"SELECT \".$idName.\" FROM \".$table);\n\t\t$result->execute();\n\t\t$result = $result->fetchAll(PDO::FETCH_ASSOC);\n\n\t\t$randKeys = array_rand($result, $number);\n\n\t\tfor($i=0; $i<$number; $i++){\n\t\t\t$resultArr[$i] = $result[$randKeys[$i]];\n\t\t}\n\t\t\n\t\treturn $resultArr;\n\t}", "title": "" }, { "docid": "0ed5681016515052953005ddfc270a2f", "score": "0.53678775", "text": "public function index()\n {\n\n $products = Product::latest()->limit(6)->get();\n $randomActiveProducts = Product::inRandomOrder()->limit(3)->get();\n\n $randomActiveProductIds=[];\n foreach($randomActiveProducts as $product){\n array_push($randomActiveProductIds,$product->id);\n }\n $randomItemProducts = Product::whereNotIn('id', $randomActiveProductIds)->limit(3)->get();\n return view('home', compact('products', 'randomItemProducts', 'randomActiveProducts'));\n }", "title": "" }, { "docid": "a1c732adc300fe1c90d1851e9fce3cf0", "score": "0.53595185", "text": "public function GetProducts() {\n\t\treturn $this->request('GetProducts')->GetProductsResult->Product;\n\t}", "title": "" }, { "docid": "6589af7af9517e30846c0df78458eb0d", "score": "0.5347776", "text": "function getr_few($arr, $amount) {\n $numbers = [];\n $result = [];\n for ($i = 0; $i < $amount; $i++) {\n $y = rand(0, sizeof($arr) - 1);\n if (!in_array($y, $numbers)) array_push($numbers, $y);\n else {\n if ($y < sizeof($arr) / 2) $y = rand(0, $y);\n else $y = rand($y, sizeof($arr) - 1);\n if (!in_array($y, $numbers)) array_push($numbers, $y);\n else {\n $y = rand(0, sizeof($arr) - 1);\n if (!in_array($y, $numbers)) array_push($numbers, $y);\n }\n } array_push($result, $arr[$numbers[$i]]);\n } if ($amount != 1) return $result;\n else return $result[0];\n}", "title": "" }, { "docid": "1bde94f5f0182efeaf16b5810bf706f6", "score": "0.5347307", "text": "public function randMovie(){\n $query = $this->db->query('\n SELECT id, title, synopsis, image, date_release\n FROM movies\n ORDER BY RAND()\n LIMIT 1');\n\n return $query->row();\n }", "title": "" }, { "docid": "5ee63cb16535219aab9cbee0274ec99a", "score": "0.5346104", "text": "public function getProduct() \n {\n return $this->product;\n }", "title": "" }, { "docid": "3cb534558532a723d1fa542613323eae", "score": "0.5345892", "text": "public function pickVariation()\n {\n // get all the variations in this scheme\n $vars = PersonalisationVariation::get()\n ->filter(\"ParentID\", $this->ID)\n ->toArray();\n\n if (!$vars || count($vars) == 0) {\n return null;\n }\n $rand = mt_rand(0, count($vars) - 1);\n return $vars[$rand];\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.53433114", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.53433114", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "a67fc77c8cb3f95aeea837896540a7ec", "score": "0.53351724", "text": "public function getPopularProduct()\n {\n return Product::whereHas('user')->withCount('user as popluarity')->orderBy('popluarity', 'desc')->take(10)->get()->toArray();\n }", "title": "" }, { "docid": "3c398e7b46ee2fcc8d39a4a1e0e9b3d4", "score": "0.5330326", "text": "function peek() {\n $selected = rand(0, $this->count);\n foreach($this->marbles as $ele) {\n if($ele['amount'] >= $selected) return $ele['name'];\n $selected -= $ele['amount'];\n }\n }", "title": "" }, { "docid": "75e4b9e6578f2d2d6a08e35dea751284", "score": "0.5323572", "text": "public function productCreated() {\n\n \t// $body = @file_get_contents('php://input');\n \t$body = @file_get_contents('../JSONtests/productCreated.json'); // This is a test, ignore for production\n \t$data = json_decode($body);\n http_response_code(200); // Returns 200 OK to the server\n if ($data) {\n \treturn LinioProducts::getProductsById($data->payload->SellerSkus);\n \t}\n \n }", "title": "" }, { "docid": "2abe335bfb97e85dc815757114c84436", "score": "0.5320654", "text": "public function get_by_product_no(Product $product)\n {\n return $product;\n }", "title": "" }, { "docid": "ab188d477177d49d3d777a11306d199d", "score": "0.5319712", "text": "function generate_random_quote(){\n // List of handpicked quotes.\n $quotes = [\n [\n 'quote' => 'Don\\'t tell people your dreams, Show them!',\n 'credits'=> 'Quotes & Things'\n ],\n [\n 'quote' => 'A Goal without a plan is just a wish!',\n 'credits'=> 'Inspiration Quotes'\n ],\n [\n 'quote' => 'Every accomplishment starts with a decision to try!',\n 'credits' => 'Random search on the web'\n ],\n [\n 'quote' => 'Do something today that your future self will thank you for!',\n 'credits' => 'Random search on the web'\n ],\n [\n 'quote' => 'Your life does not get better by chance, it gets better by change',\n 'credits' => 'Random search on the web'\n ]\n ];\n \n // Pick ONE random quote from list of quotes\n $rand_quote_key = array_rand($quotes, 1);\n \n // Return the quote from the random key\n return $quotes[$rand_quote_key];\n}", "title": "" }, { "docid": "931c7535a00b3fc75db29ee1a565c110", "score": "0.5303909", "text": "function getRandomQuote($array) {\n\n\t$randomNumber = rand(0, sizeof($array)-1);\n\n\treturn $array[$randomNumber];\n}", "title": "" }, { "docid": "15f126810395bdb764a988b92adb7582", "score": "0.52989835", "text": "public function getItem(Product $product)\n {\n return $this->items[$product->id];\n }", "title": "" }, { "docid": "de517b810465fd75b41830abcbb97c35", "score": "0.52982295", "text": "public function fruitName()\n {\n return static::randomElement(static::$fruitNames);\n }", "title": "" }, { "docid": "4ff306ee2627ea4c989242af4ca70057", "score": "0.5296191", "text": "public function getRandomTags() {\n\t\t$cacheTagOK = Q::cache ( 'front' )->testPart ( 'randomTag', 300 );\n\t\tif (! $cacheTagOK) {\n\t\t\tQ::loadModel ( 'Tag' );\n\t\t\t$tags = new Tag ();\n\t\t\t$tags->status = 0;\n\t\t\t$data = $tags->limit ( 10, null, null, array (\n\t\t\t\t\t'custom' => 'ORDER BY RAND()' \n\t\t\t) );\n\t\t} else {\n\t\t\t$data = array ();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "72d35c915b4b4b84dcc0f28951b56812", "score": "0.5289687", "text": "public function rand()\n {\n // get\n $value = $this->random_data[$this->block_sub_index];\n $this->block_sub_index++;\n\n // end of block, calculate another\n if ($this->block_sub_index == ChaCha20Block::STATE_ARRAY_LENGTH)\n {\n $this->block_sub_index = 0;\n $this->inc_counter();\n $this->compute_block();\n $this->random_data = $this->get_state(ChaCha20Random::STATE_FINAL);\n }\n\n return $value;\n }", "title": "" }, { "docid": "e2577f9311889b540400edb891bbaf1b", "score": "0.5279384", "text": "public function fakeProductsData($productsFields = [])\n {\n $fake = Faker::create();\n\n return array_merge([\n 'user_id' => $fake->randomDigitNotNull,\n 'product_group_id' => $fake->randomDigitNotNull,\n 'name' => $fake->word,\n 'is_main_product' => $fake->randomDigitNotNull,\n 'minimum_order_quantity_id' => $fake->randomDigitNotNull,\n 'lead_time' => $fake->word,\n 'created_at' => $fake->word,\n 'updated_at' => $fake->word\n ], $productsFields);\n }", "title": "" }, { "docid": "9434c937f211887a7acb5ce66584b590", "score": "0.5278384", "text": "protected function getProduct()\n {\n return Mage::registry('product');\n }", "title": "" }, { "docid": "6d930c791c384a87f3dab5ad902b7a53", "score": "0.527681", "text": "public function get() {\n $key = array_rand($this->words, 1);\n $keyword = $this->words[$key];\n return $this->getImages(self::URL, $keyword);\n }", "title": "" }, { "docid": "32139d91c9cb13e1ef4ed568f21be7af", "score": "0.52727085", "text": "function sortVector($vector){\n\t\t$chosen = rand(0,count($vector)-1);\n\t\treturn $vector[$chosen];\n\t}", "title": "" }, { "docid": "064db830ac4e973367d6e22f51b1abaf", "score": "0.52707875", "text": "function getRandomName($item, $count = 2)\n {\n $faker = Factory::create();\n\n $elements = [\n 'Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune',\n 'Moon', 'Luna', 'Deimos', 'Phobos', 'Ganymede', 'Callisto', 'Io', 'Europa', 'Titan', 'Rhea', 'Iapetus', 'Dione', 'Tethys', 'Hyperion', 'Ariel', 'Puck', 'Oberon', 'Umbriel', 'Triton', 'Proteus',\n 'Milky Way', 'Andromeda', 'Triangulum', 'Whirlpool', 'Blackeye', 'Sunflower', 'Pinwheel', 'Centaurus', 'Messier',\n 'Lagoon', 'Nebula', 'Eagle', 'Triffid', 'Dumbell', 'Orion', 'Ring', 'Bodes', 'Owl',\n 'Orion', 'Mercury', 'Gemini', 'Apollo', 'Enterprise', 'Columbia', 'Challenger', 'Discovery', 'Atlantis', 'Endeavour',\n 'Aarhus', 'Abee', 'Adelie', 'Land', 'Adhi', 'Bogdo', 'Agen', 'Albareto', 'Allegan', 'Allende', 'Ambapur', 'Nagla', 'Andura', 'Angers', 'Angra', 'Ankober', 'Anlong', 'Annaheim', 'Appley', 'Bridge', 'Arbol', 'Solo', 'Archie', 'Arroyo', 'Aguiar', 'Assisi', 'Atoka', 'Avanhandava', 'Bacubirito', 'Beardsley', 'Bellsbank', 'Bench', 'Crater', 'Benton', 'Blithfield', 'Block', 'Island', 'Bovedy', 'Brachina', 'Brahin', 'Brenham', 'Buzzard', 'Coulee', 'Campo', 'Cielo', 'Canyon', 'Diablo', 'Cape', 'York', 'Carancas', 'Chambord', 'Chassigny', 'Chelyabinsk', 'Chergach', 'Chinga', 'Chinguetti', 'Claxton', 'Coahuila', 'Cranbourne', 'Orbigny', 'Dronino', 'Eagle', 'Station', 'Elbogen', 'Ensisheim', 'Esquel', 'Gancedo', 'Gebel', 'Kamil', 'Gibeon', 'Goose', 'Lake', 'Grant', 'Hadley', 'Rille', 'Heat', 'Shield', 'Rock', 'Hoba', 'Homestead', 'Hraschina', 'Huckitta', 'Imilac', 'Itqiy', 'Kaidun', 'Kainsaz', 'Karoonda', 'Kesen', 'Krasnojarsk', 'Aigle', 'Dodon', 'Lake', 'Murray', 'Loreto', 'Los', 'Angeles', 'Mackinac Island', 'Mbozi', 'Middlesbrough', 'Mineo', 'Monte Milone', 'Moss', 'Mundrabilla', 'Muonionalusta', 'Murchison', 'Nakhla', 'Nantan', 'Neuschwanstein', 'Norton', 'County', 'Novato', 'Oileán Ruaidh (Martian)', 'Old', 'Oldenburg', 'Omolon', 'Ornans', 'Osseo', 'Ourique', 'Pallasovka', 'Paragould', 'Park', 'Forest', 'Pavlovka', 'Peace', 'River', 'Peekskill', 'Penouille', 'Polonnaruwa', 'High Possil', 'Pribram', 'Pultusk', 'Qidong', 'Richardton', 'Seymchan', 'Shelter', 'Island', 'Shergotty', 'Sikhote', 'Alin', 'Sołtmany', 'Springwater', 'Robert', 'Stannern', 'Sulagiri', 'Sutter', 'Mill', 'Sylacauga', 'Tagish Lake', 'Tamdakht', 'Tenham', 'Texas Fireball', 'Tissint', 'Tlacotepec', 'Toluca', 'Treysa', 'Twannberg', 'Veliky Ustyug', 'Vermillion', 'Weston', 'Willamette', 'Winona', 'Wold', 'Cottage', 'Yardymly', 'Zagami', 'Zaisho', 'Zaklodzie',\n 'Antares', 'Ariane', 'Atlas', 'Diamant', 'Dnepr', 'Delta', 'Electron', 'Energia', 'Europa', 'Falcon', 'Falcon Heavy', 'Juno', 'Long March', 'Mercury', 'Redstone', 'Minotaur', 'Pegasus', 'Proton', 'PSLV', 'Safir', 'Shavit', 'Saturn IV', 'Semiorka', 'Soyouz', 'Titan', 'Vega', 'Veronique', 'Zenit',\n 'ants', 'bats', 'bears', 'bees', 'birds', 'buffalo', 'cats', 'chickens', 'cattle', 'dogs', 'dolphins', 'ducks', 'elephants', 'fishes', 'foxes', 'frogs', 'geese', 'goats', 'horses', 'kangaroos', 'lions', 'monkeys', 'owls', 'oxen', 'penguins', 'people', 'pigs', 'rabbits', 'sheep', 'tigers', 'whales', 'wolves', 'zebras', 'banshees', 'crows', 'black cats', 'chimeras', 'ghosts', 'conspirators', 'dragons', 'dwarfs', 'elves', 'enchanters', 'exorcists', 'sons', 'foes', 'giants', 'gnomes', 'goblins', 'gooses', 'griffins', 'lycanthropes', 'nemesis', 'ogres', 'oracles', 'prophets', 'sorcerers', 'spiders', 'spirits', 'vampires', 'warlocks', 'vixens', 'werewolves', 'witches', 'worshipers', 'zombies', 'druids'\n ];\n\n $name = '';\n $unique = true;\n while ($unique) {\n $names = $faker->unique()->randomElements($elements, $count);\n foreach ($names as $randomName) {\n $name .= '-' . $randomName;\n }\n $unique = $item->where('name', $name)->count();\n }\n\n return Str::slug($name);\n }", "title": "" }, { "docid": "e6e2888cb825df21d43c43f5e3bb64d0", "score": "0.5266235", "text": "private function getByMinimumCommission() {\n return $this->banks[rand(0,sizeof($this->banks)-1)];\n }", "title": "" }, { "docid": "a0af0e94086e7dcf1523e14a4eebb91f", "score": "0.5266059", "text": "public function pick($sku)\n {\n return $this->products->get($sku);\n }", "title": "" }, { "docid": "f192e3a3773e71af99dcdacecbbfe2ab", "score": "0.5265278", "text": "function itu_randPlant($name){\n\t$i = rand(0,9);\n\twhile(!itu_isFav($i, $name)){\n\t\t$i = rand(0,9);\n\t}\n\treturn $i;\n}", "title": "" }, { "docid": "a49ee8e102982c1a145974f8d00b5986", "score": "0.5264584", "text": "function getProduct($multiples){\n $product = 1;\n foreach ($multiples as $multiple){ $product *= $multiple; }\n return $product;\n }", "title": "" } ]
3e25e4d5f8af3b1b58e601f6098699a6
Creates new Venues & associates Region and Venue information with a given post.
[ { "docid": "97ec25c3d75db7e32e8861a64981df2a", "score": "0.5928152", "text": "private static function set_custom_taxonomies($post_id, $venue_data) {\n // Region/neighborhood\n wp_set_object_terms($post_id, $venue_data['Neighborhood'], self::CUSTOM_TAXONOMIES[2]);\n\n // Venue\n $venue_id = wp_set_object_terms($post_id, $venue_data['Name'], self::CUSTOM_TAXONOMIES[1]);\n if (empty($venue_id) || is_wp_error($venue_id)) {\n error_log(\"[VSEI Plugin] Could not set venue with ID #$venue_id for event post with ID #$post_id.\");\n return;\n }\n\n // Venue description\n wp_update_term($venue_id[0], self::CUSTOM_TAXONOMIES[1], array('description' => $venue_data['Description']));\n\n // Venue address\n foreach ($venue_data['Address'] as $key => $value) {\n if ($key === 'PostalCode') {\n $key = 'postal_code';\n } else if ($key === 'Country') {\n $key = 'region';\n }\n update_option(self::CUSTOM_TAXONOMIES[1] . '_' . $venue_id[0] . '_' . $key, $value);\n }\n\n // Venue meta\n $venue_meta_mapping = array(\n 'venue_id' => 'ID',\n 'neighborhood' => 'Neighborhood',\n 'classification' => 'PrimaryClassification'\n );\n foreach ($venue_meta_mapping as $key => $value) {\n update_option(self::CUSTOM_TAXONOMIES[1] . '_' . $venue_id[0] . '_' . $key, $venue_data[$value]);\n }\n }", "title": "" } ]
[ { "docid": "78e4da22a550756b9f967ae7a9d07d7b", "score": "0.68944883", "text": "function addVenue_post() {\n $venue_data = array(\n 'name' => $this->post('name'),\n 'address' => $this->post('address'),\n 'location' => $this->post('location'),\n 'pubcatid' => $this->post('pubcatid'),\n 'image' => $this->post('image')\n );\n\n foreach ($venue_data as $key => $data) {\n if(!$data) {\n $this->response(\"You missed $key, enter it...\");\n }\n }\n\n // ADD INSERT\n if($this->admin_model->addVenue($venue_data)){\n $this->response('Venue Added', 200);\n } else {\n $this->response('Something went wrong, go fix it', 501);\n }\n }", "title": "" }, { "docid": "06c51d33130b7d200b85fa98d54fff8d", "score": "0.64429516", "text": "public function store(Request $request)\n {\n $v = Validator::make($request->all(), Venue::$rules);\n if ($v->fails()) {\n session()->flash('fail', 'Your post was NOT created. Please fix errors.');\n return redirect()->back()->withInput()->withErrors($v);\n }\n $venue = new Venue();\n $venue->name = $request->get('name');\n $venue->address = $request->get('address');\n $venue->phone = $request->get('phone');\n $venue->website = $request->get('website');\n $venue->email = $request->get('email');\n $venue->save();\n\n//TODO: Add features logic\n// $venuefeatures = new Feature();\n// $venuefeatures->venue_id = $venue->id;\n// $venueinput = $request->input('features');\n// $venueinput = explode(',', $barinput);\n//\n// foreach($venueinput as $key => $feature){\n// $venuefeatures->$feature = 1;\n// }\n// $venuefeatures->save();\n session()->flash('success', 'Your post was created successfully!');\n return redirect()->action('VenueController@show', $venue->id);\n }", "title": "" }, { "docid": "4b4991206d04e6aadb03f180d12144a1", "score": "0.6152276", "text": "public function action_create() \n {\n $this->page_title = \"Create Venue\";\n\n $view = View::factory(\"pages/admin/venue/create\");\n\n if( ! $_POST)\n {\n $this->_content = $view;\n }\n else \n {\n $client = REST_client::instance('api_writer');\n $data = array();\n\n // @TODO: insert validation here...\n\n $response = $client->post('venue', $_POST);\n\n $data = XML::factory(NULL, NULL, $response->data);\n\n if($response->status == '200')\n {\n Request::instance()->redirect(Request::instance()->uri(array('action' => 'edit', 'id' => $data->venue->attributes('id'))));\n }\n else\n {\n $message = $data->status->value();\n $view->bind('message', $message);\n $this->_content = $view;\n }\n }\n }", "title": "" }, { "docid": "2fa5a41de83bafeeb6b51061a1d862a9", "score": "0.5741232", "text": "function createVenue($connection, $venueName){\n\t\t$query = \"INSERT INTO venues (VenueName) VALUES (\".$venueName.\")\";\n\t\tif(is_null($connection->query($query))){\n\t\t\techo \"Error adding \".$venueName.\": \".$connection->error;\n\t\t}\n\t\t$query = \"CREATE TABLE '\".$venueName.\"_events' (\n\t\t\tEventID INT(11) AUTO_INCREMENT PRIMARY KEY,\n\t\t\tDetails VARCHAR(750) NOT NULL UNIQUE KEY,\n\t\t\tDate\tVARCHAR(20),\n\t\t\tTime\tVARCHAR(20),\n\t\t\tPrice\tVARCHAR(5)\n\t\t)\";\n\t\t$connection->query($query);\n\t\tif(is_null($connection->query($query))){\n\t\t\techo \"Error creating \".$venueName.\" event table: \".$connection->error;\n\t\t}\n\t}", "title": "" }, { "docid": "4d03bd2893165227e63ce8b73d6c729d", "score": "0.5540914", "text": "function _te_get_event_venue($post)\n{\n $venue = false;\n\n if(isset($post->venues) && count($post->venues))\n {\n $venue = $post->venues[0];\n }\n else\n {\n $venues = array();\n\n if(function_exists('p2p_type'))\n {\n $q = p2p_type(P2PIntegration::E_TO_V)->get_connected($post->ID);\n if($q->have_posts())\n {\n $venue = $q->posts[0];\n $venues = $q->posts;\n }\n }\n\n // set this so we don't have to through the above again.\n $post->venues = $venues;\n }\n\n return $venue;\n}", "title": "" }, { "docid": "2bae452c5183e05040b4b12e28892d72", "score": "0.5529841", "text": "public function store(Request $request)\n\t{\n\t\t$rules = [\n\t\t\t'name'\t\t\t\t=> 'required',\n\t\t\t'address_1'\t\t\t=> 'required',\n\t\t\t'address_street' \t=> 'required',\n\t\t\t'address_city' \t\t=> 'required',\n\t\t\t'address_postcode' \t=> 'required',\n\t\t\t'image.*' \t\t\t=> 'image',\n\t\t];\n\t\t$messages = [\n\t\t\t'name.required' \t\t\t=> 'Venue Name is Required',\n\t\t\t'address_1.required' \t\t=> 'Address is Required',\n\t\t\t'address_street.required' \t=> 'Street name is Required',\n\t\t\t'address_city.required' \t=> 'City name is Required',\n\t\t\t'address_postcode.required' => 'Postcode is Required',\n\t\t\t'image.*.image' \t\t\t=> 'Venue Image must be of Image type',\n\t\t];\n\t\t$this->validate($request, $rules, $messages);\n\n\t\t$venue\t\t\t\t\t\t= new EventVenue();\n\t\t$venue->display_name \t\t= $request->name;\n\t\t$venue->address_1 \t\t\t= $request->address_1;\n\t\t$venue->address_2 \t\t\t= $request->address_2;\n\t\t$venue->address_street \t\t= $request->address_street;\n\t\t$venue->address_city \t\t= $request->address_city;\n\t\t$venue->address_postcode \t= $request->address_postcode;\n\t\t$venue->address_country \t= $request->address_country;\n\n\t\tif (Input::file('images')) {\n\t\t\tforeach(Input::file('images') as $image){\n\t\t\t\t$venue->images()->create([\n\t\t\t\t\t'path' => str_replace('public/', '/storage/', Storage::put('public/images/venues/' . $venue->slug, $image)),\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\n\t\tif (!$venue->save()) {\n\t\t \tSession::flash('alert-danger', 'Cannot save Venue!');\n \t\treturn Redirect::back();\n\t\t}\n\n\t Session::flash('alert-success', 'Successfully saved venue!');\n\t return Redirect::to('admin/venues/' . $venue->slug);\n\t}", "title": "" }, { "docid": "da178a7cd533f8bd01f168a2d6ce442e", "score": "0.5518457", "text": "public function save()\n {\n try {\n //init\n $input = Input::all();\n //save all record\n if($input)\n {\n $current = date('Y-m-d H:i:s');\n if(isset($input['id']) && $input['id'])\n {\n if(Venue::where('slug','=',$input['slug'])->where('id','!=',$input['id'])->count())\n return ['success'=>false,'msg'=>'There was an error saving the venue.<br>That slug is already in the system.','errors'=>'slug'];\n $venue = Venue::find($input['id']);\n $venue->updated = $current;\n $location = $venue->location;\n $location->updated = $current;\n }\n else\n {\n if(Venue::where('slug','=',$input['slug'])->count())\n return ['success'=>false,'msg'=>'There was an error saving the venue.<br>That slug is already in the system.','errors'=>'slug'];\n $venue = new Venue;\n $venue->audit_user_id = Auth::user()->id;\n $venue->created = $current;\n $location = new Location;\n $location->created = $current;\n $location->updated = $current;\n }\n //save location\n $location->address = strip_tags($input['address']);\n $location->city = strip_tags($input['city']);\n $location->state = strip_tags(strtoupper($input['state']));\n $location->zip = $input['zip'];\n $location->set_lng_lat();\n $location->save();\n //save venue\n $venue->location()->associate($location);\n $venue->name = trim(strip_tags($input['name']));\n $venue->slug = strip_tags($input['slug']);\n $venue->accounting_email = strip_tags(preg_replace('/\\s+/','',$input['accounting_email']));\n $venue->weekly_email = strip_tags(preg_replace('/\\s+/','',$input['weekly_email']));\n $venue->description = trim(strip_tags($input['description'],'<p><a><br>'));\n $venue->ticket_info = trim(strip_tags($input['ticket_info']));\n $venue->is_featured = $input['is_featured'];\n $venue->restrictions = $input['restrictions'];\n $venue->facebook = strip_tags($input['facebook']);\n $venue->twitter = strip_tags($input['twitter']);\n $venue->googleplus = strip_tags($input['googleplus']);\n $venue->yelpbadge = strip_tags($input['yelpbadge']);\n $venue->youtube = strip_tags($input['youtube']);\n $venue->instagram = strip_tags($input['instagram']);\n $venue->cutoff_text = (!empty(strip_tags($input['cutoff_text'])))? strip_tags($input['cutoff_text']) : null;\n $venue->daily_sales_emails = $input['daily_sales_emails'];\n $venue->weekly_sales_emails = $input['weekly_sales_emails'];\n $venue->enable_weekly_promos = $input['enable_weekly_promos'];\n $venue->default_processing_fee = $input['default_processing_fee'];\n $venue->default_percent_pfee = $input['default_percent_pfee'];\n $venue->default_fixed_commission = $input['default_fixed_commission'];\n $venue->default_percent_commission = $input['default_percent_commission'];\n $venue->default_processing_fee_pos = $input['default_processing_fee_pos'];\n $venue->default_percent_pfee_pos = $input['default_percent_pfee_pos'];\n $venue->default_fixed_commission_pos = $input['default_fixed_commission_pos'];\n $venue->default_percent_commission_pos = $input['default_percent_commission_pos'];\n $venue->default_sales_taxes_percent = $input['default_sales_taxes_percent'];\n $venue->cutoff_hours_start = intval($input['cutoff_hours_start']);\n $venue->cutoff_hours_end = intval($input['cutoff_hours_end']);\n if(!empty($input['logo_url']))\n {\n if(preg_match('/media\\/preview/',$input['logo_url']))\n {\n $venue->delete_image_file('logo');\n $venue->set_image_file('logo',$input['logo_url']);\n }\n }\n else\n return ['success'=>false,'msg'=>'There was an error saving the venue.<br>You must set up a logo for it.'];\n if(!empty($input['header_url']))\n {\n if(preg_match('/media\\/preview/',$input['header_url']))\n {\n $venue->delete_image_file('header');\n $venue->set_image_file('header',$input['header_url']);\n }\n }\n else\n return ['success'=>false,'msg'=>'There was an error saving the venue.<br>You must set up a header for it.'];\n $venue->let = (empty($input['let']))? 0 : 1;\n $venue->save();\n //return\n if(isset($input['id']) && $input['id'])\n return ['success'=>true,'msg'=>'Venue saved successfully!'];\n return $this->get($venue->id);\n }\n return ['success'=>false,'msg'=>'There was an error saving the venue.<br>The server could not retrieve the data.'];\n } catch (Exception $ex) {\n throw new Exception('Error Venues Save: '.$ex->getMessage());\n }\n }", "title": "" }, { "docid": "b74aa97f34539d32014d47e652946f6f", "score": "0.54224366", "text": "public function setVenueId($venue_id);", "title": "" }, { "docid": "e0451985a4c53bc36c0f60068027aad9", "score": "0.53668696", "text": "public function store(VenueRequest $request)\n {\n if ($this->venue->create($request->all())) {\n return redirect()->route('venue.index')->with('success', 'Venue created successfully.');\n }\n\n return redirect()->route('venue.create')->with('error', 'Venue could not be created.');\n }", "title": "" }, { "docid": "80c13fb0f1c10596868d3a9ac292b2c4", "score": "0.5358621", "text": "public function create()\n {\n \n return view('admin.venue.create');\n }", "title": "" }, { "docid": "4114d23977fa305e0f9853a6aa647748", "score": "0.5273764", "text": "public function create()\n {\n return view('venues.create');\n }", "title": "" }, { "docid": "4114d23977fa305e0f9853a6aa647748", "score": "0.5273764", "text": "public function create()\n {\n return view('venues.create');\n }", "title": "" }, { "docid": "4114d23977fa305e0f9853a6aa647748", "score": "0.5273764", "text": "public function create()\n {\n return view('venues.create');\n }", "title": "" }, { "docid": "72fab175f935c6d678fc876b91241d9b", "score": "0.5266348", "text": "function ol_create_post() {\n\tif ( ! isset( $_POST['btn_post'] ) ) {\n\t\treturn;\n\t}\n\n\tol_check_empty_form();\n\n\tif ( ol_get_check_error() ) {\n\t\treturn;\n\t}\n\n\t$new_name_file = ol_save_photo();\n\n\t$result = ol_loading_restaurant_db(\n\t\tarray(\n\t\t\t'name' => esc_html( $_POST['name'] ),\n\t\t\t'type' => esc_html( $_POST['type'] ),\n\t\t\t'phone' => esc_html( $_POST['phone'] ),\n\t\t\t'address' => esc_html( $_POST['address'] ),\n\t\t\t'start_time' => esc_html( $_POST['start_time'] ),\n\t\t\t'end_time' => esc_html( $_POST['end_time'] ),\n\t\t\t'rating' => esc_html( $_POST['rating'] ),\n\t\t\t'reviews' => esc_html( $_POST['reviews'] ),\n\t\t\t'url_photo' => $new_name_file,\n\t\t\t'lat' => esc_html( $_POST['lat'] ),\n\t\t\t'lon' => esc_html( $_POST['lon'] ),\n\t\t)\n\t);\n\n\tif ( $result ) {\n\t\tol_add_errors( 'The post has been added to the database', 'success' );\n\t\tol_clear_url();\n\t} else {\n\t\tol_add_errors( 'The post has not added to the database' );\n\t}\n}", "title": "" }, { "docid": "e6ea738682eab0aaa6c8861634c2ddcc", "score": "0.5251643", "text": "function updateVenue_put() {\n $venue_data = array(\n 'pubid' => $this->put('id'),\n 'name' => $this->put('name'),\n 'address' => $this->put('address'),\n 'location' => $this->put('location'),\n 'pubcatid' => $this->put('pubcatid'),\n 'image' => $this->put('image')\n );\n\n foreach($venue_data as $key => $data) {\n if(!$data) {\n $this->response(\"You missed $key, enter it... ya prick...\", 400);\n }\n }\n\n if($this->admin_model->updateVenue($venue_data['pubid'], $venue_data)) {\n $this->response('Venue Updated', 200);\n } else {\n $this->response('Venue info could not be updated', 501);\n }\n }", "title": "" }, { "docid": "652b88e08f999c8b06f1837366189a0d", "score": "0.5238221", "text": "public function store(Request $request)\n {\n $venue = $request->input('venue');\n $user_id = Auth::id();\n $venue_category_id = 1;\n $location = $request->input('location');\n $description = $request->input('description');\n $charges = $request->input('charges');\n $image = $this->saveImage($request->input('image'));\n $status = Status::where('name', 'inactive')->first();\n\n Venue::create([\n 'user_id' => $user_id,\n 'name' => $venue,\n 'venue_category_id' => $venue_category_id,\n 'location' => $location,\n 'description' => $description,\n 'charges' => $charges,\n 'image' => $image,\n 'status' => $status\n ]);\n }", "title": "" }, { "docid": "11a9ab220f3aa89c2d2583beebe42b2e", "score": "0.5218319", "text": "static function venueSignup($app,$type=\"venue\") {\n $isValidVenue = self::addVenue($app, 0, true,$type);\n $venue = false;\n if ($isValidVenue) {\n\n $result = AuthControllerNative::signup($app,$type);\n if (!$result['registered']) {\n return $app->render(400, $result);\n }\n\n if (isset($result['user']->teams[0])) {\n ApiMailer::sendWebsiteSignupJoinTeamConfirmation($result['user']->teams[0]->name, $result['user']->email, \"{$result['user']->nameFirst} {$result['user']->nameLast}\");\n } else {\n ApiMailer::sendWebsiteSignupConfirmation($result['user']->email, \"{$result['user']->nameFirst} {$result['user']->nameLast}\");\n }\n $venue = self::addVenue($app, $result['user']->id);\n\n }\n\n if (!$venue) {\n return $app->render(400, array('msg' =>\"Could not add venue. Check your parameters and try again.\"));\n }\n $venue_reponse['venue'] = (object) [];\n $venue_reponse['venue']->id = $venue;\n AuthHooks::venue_signup($app, $venue_reponse);\n self::addVenueGroupToUser($result['user']->id);\n self::addVenueRole($result['user']->id, $venue, 'owner');\n\t\t$result['user']->venueId= $venue;\n return $app->render(200, $result);\n }", "title": "" }, { "docid": "7551ada20f11042620cd7a68dc1e233b", "score": "0.5198041", "text": "public function run()\n {\n $data = array(\n \tarray(\n \t\t'name' => 'Miền Bắc',\n 'slug' => 'mien-bac'\n \t),\n \tarray(\n \t\t'name' => 'Miền Trung',\n 'slug' => 'mien-trung'\n \t),\n \tarray(\n \t\t'name' => 'Miền Nam',\n 'slug' => 'mien-nam'\n \t),\n );\n Region::insert($data);\n }", "title": "" }, { "docid": "92c4d2dfe4e43f152ef87f418bb0ec38", "score": "0.5192994", "text": "function addVenueCategory_post() {\n $category_data = array(\n 'pubcatname' => $this->post('name'),\n 'image' => $this->post('image')\n );\n\n if(!$category_data['pubcatname']) {\n $this->response('The Category needs a name atleast, pfhhhh...', 400);\n }\n\n\n if($this->admin_model->addVenueCategory($category_data)) {\n $this->response('Venue Category Added', 200);\n } else {\n $this->response('Something went wrong, go fix it', 501);\n }\n }", "title": "" }, { "docid": "fbea878afb40dc52a291a3a5cb1ad433", "score": "0.5167227", "text": "public function postCreate(Request $request)\n\t{\n\t\t$region = new Region;\n\t\t$region->name = $request->input('region.name');\n\t\t$region->slug = str_slug($request->input('region.name'));\n\t\t$region->save();\n\t\treturn redirect()->route('region_index');\n\t}", "title": "" }, { "docid": "380d692d77b1b66a6edb4e67d718226b", "score": "0.5165099", "text": "public function createAction()\n\t{\n\t\t// Get json body\n\t\tif($json = $this->request->getJsonRawBody())\n\t\t{\n\t\t\t// Authenticate API key\n\t\t\tif(!isset($json->api_key) || $this->authenticate($json->api_key))\n\t\t\t{\n\t\t\t\treturn $this->response(400, 'Bad Request', ['error' => ['API key is incorrect or missing']]);\n\t\t\t}\n\n\t\t\t// Find post - this can be replaced by a front-end check\n\t\t\t$post = Post::findFirst($json->post_id);\n\n\t\t\t// Check voter not equal to poster\n\t\t\tif($post->user_id == $json->user_id)\n\t\t\t{\n\t\t\t\t// Return conflict\n\t\t\t\treturn $this->response(409, 'Conflict', ['error' => ['User cannot vote on their own post']]);\n\t\t\t}\n\t\t\t\n\t\t\t// Initialze vote\n\t\t\t$vote = new Vote();\n\t\t\t$vote->post_id = $json->post_id;\n\t\t\t$vote->user_id = $json->user_id;\n\t\t\t$vote->vote = $json->vote;\n\t\t\t$vote->created_at = date('Y-m-d H:i:s');\n\n\t\t\t// Create vote\n\t\t\tif($vote->create() == true)\n\t\t\t{\n\t\t\t\t// Return created\n\t\t\t\treturn $this->response(201, 'Created', ['response' => ['vote' => $vote]]);\n\t\t\t}\n\t\t\t\n\t\t\t// Return conflict\n\t\t\treturn $this->response(409, 'Conflict', ['error' => $this->fetchErrors($vote)]);\n\t\t}\n\t\t\n\t\t// Return bad request\n\t\treturn $this->response(400, 'Bad Request', ['error' => ['Request body should be sent as JSON']]);\n\t}", "title": "" }, { "docid": "ea58f56d50474a73c906298df85d5852", "score": "0.51646113", "text": "public function create()\n {\n try{\n return view('admin.venue.add_venue');\n }catch(\\Exception $e){\n return redirect()->route('admin.dashboard')->with('error','Something went wrong.');\n }\n }", "title": "" }, { "docid": "306fc8ecd849cd4529df6f46e1a22ca8", "score": "0.512311", "text": "private function createWebcast(array $post_data)\n {\n $user = Auth::getCurrentUser();\n\n // Makes sure it is saved to the calendar you made it on\n $post_data['v_location_save_calendar'] = 'on';\n $calendar = $this->calendar;\n\n // Validates the virtual location data\n $this->validateLocation($post_data);\n\n // Makes the new virtual location\n WebcastUtility::addWebcast($post_data, $user, $calendar);\n }", "title": "" }, { "docid": "98c6110788059fae27b2a004f6589bb2", "score": "0.50921494", "text": "function createPost();", "title": "" }, { "docid": "bc3d7f516699b4285c106b54b1381484", "score": "0.5041924", "text": "public function store(Request $request)\n {\n $request->validate([\n 'name'=>'required',\n 'capacity'=>'required|integer',\n 'location'=>'required'\n ]);\n $venue = new Venue([\n 'name'=>$request->get('name'),\n 'capacity'=>$request->get('capacity'),\n 'location'=>$request->get('location')\n ]);\n $venue->save();\n return redirect('/venues')->with('success','venue added');\n \n }", "title": "" }, { "docid": "5083df1db16b87a96d4db0f3fea0d7e8", "score": "0.5027654", "text": "public function setVenue($venue)\n {\n $this->venue = $venue;\n }", "title": "" }, { "docid": "0b0dec434eaf0c869afa2352cafe6f97", "score": "0.49845526", "text": "public static function create(array $_post) {\n\n // Construct a url for the new data source.\n if (isset($_post['channel_id'])) {\n $_post['url'] = YOUTUBE_CHANNEL_URL . '?channel_id=' . $_post['channel_id'];\n $_post['type'] = YOUTUBE;\n unset($_post['channel_id']);\n }\n\n if (isset($_post['wp-site-url'])) {\n $_post['url'] = $_post['wp-site-url'] . WP_JSON_URL;\n $_post['type'] = POSTS;\n unset($_post['wp-site-url']);\n }\n\n if (isset($_post['instagram-account'])) {\n $_post['url'] = INSTAGRAM_URL . '/' . $_post['instagram-account'] . '/';\n $_post['type'] = INSTAGRAM;\n unset($_post['instagram-account']);\n }\n\n\n if (isset($_post['twitter-account'])) {\n $_post['url'] = TWITTER_URL . '/' . $_post['twitter-account'] . '/';\n $_post['type'] = Twitter;\n }\n\n\n $source = self::loadSource($_post);\n $source->save();\n\n $importMethod = 'import' . $_post['type'];\n self::$importMethod($_post);\n\n }", "title": "" }, { "docid": "7b5af0b6571f11d7790dba472c3bb2a8", "score": "0.49573517", "text": "public function create()\n\t{\n\t\trequirePermission('canCreate');\n\n\t\t$data[\"vote_sitename\"] = $this->input->post(\"vote_sitename\");\n\t\t$data[\"vote_url\"] = $this->input->post(\"vote_url\");\n\t\t$data[\"vote_image\"] = $this->input->post(\"vote_image\");\n\t\t$data[\"hour_interval\"] = $this->input->post(\"hour_interval\");\n\t\t$data[\"points_per_vote\"] = $this->input->post(\"points_per_vote\");\n\t\t$data[\"callback_enabled\"] = $this->input->post(\"callback_enabled\");\n\n\t\t$this->vote_model->add($data);\n\n\t\t// Add log\n\t\t$this->logger->createLog('Added topsite', $data['vote_sitename']);\n\n\t\t$this->plugins->onCreateSite($data);\n\n\t\tdie('window.location.reload(true)');\n\t}", "title": "" }, { "docid": "c2d15bf3381a19784f884d3d6546f81c", "score": "0.49418572", "text": "public function associateWithACustomer($post);", "title": "" }, { "docid": "61fbcd3e410bff7724b5d1b29cfc5b36", "score": "0.4927058", "text": "public function store(Request $request)\n {\n $post = new Post;\n $post->title = $request->title;\n $post->save(); \n /*\n $plant = new Plant(['name' => 'happy']);\n $post = Post::find(1);\n $post->plants()->save($plant);\n $post->plants()->saveMany([\n new Plant(['name' => 'rose']),\n new Plant(['name' => 'sunflower']),\n ]);\n */\n\n /*\n $plant = $post->plants()->create([\n 'name' => 'happy',\n ]);\n \n $post->plants()->createMany([\n [\n 'name' => 'rose',\n ],\n [\n 'name' => 'sunflower',\n ],\n ]);\n */\n \n /*\n $post = Post::find(1);\n $post->plants()->attach($plantId);\n \n $post->plants()->detach($plantId);\n $post->plants()->sync([1, 2, 3]);\n $post->plants()->syncWithoutDetaching([1, 2, 3]);\n //関連の切り替え \n $post->plants()->toggle([1, 2, 3]);\n\n $post->plants()->updateExistingPivot($plantId, $attributes);\n */\n\n }", "title": "" }, { "docid": "e7e1131dd6c9b2ca47fce9c41453f8a0", "score": "0.4914764", "text": "public function create()\n\t\t{\n\t\t\t\n\t\t\t$post = new post(4);\n\t\t\t$r = $post->show();\n\t\t\t\n\t\t\tprint_r($r);\n\t\t\t\n\t\t\t//echo 'post-created:'. $post->get('id');\n\t\t}", "title": "" }, { "docid": "2c1ec959b1fabe3653cce3fa8d8319e0", "score": "0.48966837", "text": "public static function save( $post_id, $post ) {\n\t\tif ( empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( sanitize_key( wp_unslash( $_REQUEST['_wpnonce'] ) ), 'update-post_' . $post_id ) ) {\n\t\t\twp_die( esc_html__( 'Action failed. Please refresh the page and retry.', 'woocommerce-pos-host' ) );\n\t\t}\n\n\t\t$outlet = new POS_HOST_Outlet( $post_id );\n\n\t\t// Generate a unique post slug.\n\t\t$slug = wp_unique_post_slug( sanitize_title( $post->post_title ), $post_id, $post->post_status, $post->post_type, $post->post_parent );\n\n\t\t$base_country = WC()->countries->get_base_country();\n\t\t$base_state = '*' === WC()->countries->get_base_state() ? '' : WC()->countries->get_base_state();\n\n\t\t// Country/state fields should not be empty.\n\t\tif ( empty( $_POST['country'] ) ) {\n\t\t\t$state = $base_state;\n\t\t\t$country = $base_country;\n\t\t} elseif ( empty( $_POST['state'] ) ) {\n\t\t\t$state = $base_state;\n\t\t\t$country = wc_clean( wp_unslash( $_POST['country'] ) );\n\t\t} else {\n\t\t\t$state = wc_clean( wp_unslash( $_POST['state'] ) );\n\t\t\t$country = wc_clean( wp_unslash( $_POST['country'] ) );\n\t\t}\n\n\t\t/*\n\t\t * At this point, the post_title has already been saved by wp_insert_post().\n\t\t */\n\t\t$outlet->set_props(\n\t\t\tarray(\n\t\t\t\t'slug' => $slug,\n\t\t\t\t'address_1' => isset( $_POST['address_1'] ) ? wc_clean( wp_unslash( $_POST['address_1'] ) ) : '',\n\t\t\t\t'address_2' => isset( $_POST['address_2'] ) ? wc_clean( wp_unslash( $_POST['address_2'] ) ) : '',\n\t\t\t\t'city' => isset( $_POST['city'] ) ? wc_clean( wp_unslash( $_POST['city'] ) ) : '',\n\t\t\t\t'postcode' => isset( $_POST['postcode'] ) ? wc_clean( wp_unslash( $_POST['postcode'] ) ) : '',\n\t\t\t\t'state' => $state,\n\t\t\t\t'country' => $country,\n\t\t\t\t'email' => isset( $_POST['email'] ) ? wc_clean( wp_unslash( $_POST['email'] ) ) : '',\n\t\t\t\t'phone' => isset( $_POST['phone'] ) ? wc_clean( wp_unslash( $_POST['phone'] ) ) : '',\n\t\t\t\t'fax' => isset( $_POST['fax'] ) ? wc_clean( wp_unslash( $_POST['fax'] ) ) : '',\n\t\t\t\t'website' => isset( $_POST['website'] ) ? wc_clean( wp_unslash( $_POST['website'] ) ) : '',\n\t\t\t\t'wifi_network' => isset( $_POST['wifi_network'] ) ? wc_clean( wp_unslash( $_POST['wifi_network'] ) ) : '',\n\t\t\t\t'wifi_password' => isset( $_POST['wifi_password'] ) ? wc_clean( wp_unslash( $_POST['wifi_password'] ) ) : '',\n\t\t\t\t'social_accounts' => isset( $_POST['social_accounts'] ) ? array_map( 'sanitize_text_field', $_POST['social_accounts'] ) : '',\n\t\t\t)\n\t\t);\n\n\t\t$outlet->save();\n\n\t\tdo_action( 'pos_host_outlet_options_save', $post_id, $outlet );\n\t}", "title": "" }, { "docid": "4003652bbcd431446b59180d8e66946a", "score": "0.48862422", "text": "public function saveVenue(Request $request, ElasticsearchUtility $elasticsearchUtility, FilesController $filesController)\n {\n\n $venueData = ['venue_name' => $request->venue_name, \"address\" => $request->venue_location, 'additional_information' => $request->additional_information, 'email' => $request->email];\n $image = time() * rand() . \".png\";\n\n if ($filesController->uploadBase64Image(request()->image, 'venue_category/' . $image))\n $venueData['image'] = $image;\n\n $venue_id = rand(1111, 999999);\n\n if ($request->is_edit == 0) {\n Venue::create(array_merge($venueData, ['venue_id' => $venue_id, \"company_id\" => $request->company_id, \"store_news_id\" => 0]));\n\n /**** Create index on elastic search $req *****/\n /*try {\n if ($request->venue_id && $request->company_id)\n $elasticsearchUtility->createIndex($elasticsearchUtility->generateIndexName($request->company_id, $venue_id));\n } catch (Exception $e) {\n return ['status' => false, 'message' => 'Error occurred while creating index.'];\n }*/\n /******* end of create index on elastic search ****/\n\n if (!empty($request->level)) {\n $level_venues = DB::table('levels_venues')->where('company_id', '=', $request->company_id)->where('level_id', '=', $request->level)->first();\n if (!empty($level_venues))\n DB::table('levels_venues')->where('id', $level_venues->id)->update(['company_id' => $request->company_id, 'venue_id' => $venue_id, 'level_id' => $request->level]);\n else\n DB::table('levels_venues')->insertGetId(['level_id' => $request->level, 'company_id' => $request->company_id, 'venue_id' => $venue_id, \"created_at\" => date(\"Y-m-d H:i:s\"), \"updated_at\" => date(\"Y-m-d H:i:s\")]);\n }//..... end if() .....//\n } else {\n $venue_id = $request->is_edit;\n VenueShops::where(\"venue_id\", $request->is_edit)->delete();\n Store::where(\"venue_id\", $request->is_edit)->delete();\n Venue::where([\"venue_id\" => $request->is_edit])->update($venueData);\n }//..... end if-else() .....//\n if ($request->has('list_assign_categories')) {\n DB::table('venue_category')->where([\"venue_id\" => $request->is_edit])->delete();\n $r = json_decode($request->list_assign_categories);\n foreach ($r as $key => $value) {\n $cat_data = [\n 'category_id' => $value->id,\n 'venue_id' => $venue_id\n ];\n DB::table('venue_category')->insert($cat_data);\n }//..... end of foreach() ......//\n }\n\n return ['status' => true, 'message' => 'Venue saved successfully!'];\n }", "title": "" }, { "docid": "f8033ad6e9268f627b8fe7739b53a0bd", "score": "0.48816696", "text": "public function create(Request $request, Venue $venue)\n {\n $styles = Style::all();\n return view('rooms.create', compact('venue','styles'));\n }", "title": "" }, { "docid": "d8c088c32815055d963bc6b927bb831c", "score": "0.48715815", "text": "public function store(Request $request)\n {\n Validator::make($request->all(), [\n 'nama_venue' => 'required|min:5|max:15',\n 'alamat_venue' => 'required|min:5|max:100',\n 'telp_venue' => 'required',\n 'info_venue' => 'required',\n ])->validate();\n \n $venue = new venue;\n $venue->nama_venue = $request->input('nama_venue');\n $venue->alamat_venue = $request->input('alamat_venue');\n $venue->telp_venue = $request->input('telp_venue');\n $venue->info_venue = $request->input('info_venue');\n $venue->lapangan_id = 0;\n $venue->lokasi_id = 0;\n $venue->save();\n \n $request->session()->flash('success', 'The venue was successfully saved!');\n return redirect('dashboard/venue');\n }", "title": "" }, { "docid": "4f89ad6fcf6d4cdf7472c5419fdb30e7", "score": "0.48694786", "text": "public function create()\n {\n $this->data = [\n 'title' => 'Add New Hotel',\n 'page_icon' => '<i class=\"fa fa-book\"></i>',\n 'objData' => '',\n ];\n\n\t\t$this->data['districts'] = District::all();\n\n\t\t$this->layout('create');\n }", "title": "" }, { "docid": "d0dc95cbc18164bf8c0b1417e95974af", "score": "0.48552948", "text": "public function RegisterPostVikCal()\n {\n register_post_type( $this->VikCalPostTypeName,\n array(\n 'labels' => array(\n 'name' => __( 'VikCal' ),\n 'singular_name' => __( 'VikCal Event', 'vikcal' ),\n 'add_new_item' => __( 'Add new VikCal Event', 'vikcal' )\n ),\n 'capability_type' => 'post',\n 'supports' => array( 'title', 'thumbnail', 'editor'),\n 'public' => true,\n 'has_archive' => true,\n 'rewrite' => array(\n 'slug' => 'vcevent',\n ),\n 'menu_icon' => 'dashicons-calendar-alt',\n )\n );\n }", "title": "" }, { "docid": "2c9cb0983f4e4aa0b2144616b4f2ac58", "score": "0.48495212", "text": "public function created(Post $post)\n {\n //\n }", "title": "" }, { "docid": "2c9cb0983f4e4aa0b2144616b4f2ac58", "score": "0.48495212", "text": "public function created(Post $post)\n {\n //\n }", "title": "" }, { "docid": "67fe36b8f40122921a39d8406a6beb8d", "score": "0.48403668", "text": "public function importVenue($contentsArray = null): array\n {\n $venue = \\App\\Venue::where('name', $contentsArray['name'])->first();\n\n // Handle overwrite\n if ($venue) {\n $overwrite = $this->option('overwrite') ?: $this->choice(\"Venue {$venue->name} ({$venue->id}) exists, overwrite?\", ['Y', 'N'], 1);\n if ($overwrite === 'N') {\n return [\n 'message' => 'Done',\n 'exitCode' => 0,\n ];\n }\n } else {\n $venue = new Venue;\n }\n\n // Venue has State\n if (empty($contentsArray['stateAbbr'])) {\n return [\n 'message' => 'Missing state.',\n 'exitCode' => 0,\n ];\n }\n\n if ($this->isStateValid($contentsArray['stateAbbr']) === false) {\n return [\n 'message' => \"State invalid: {$contentsArray['stateAbbr']}\",\n 'exitCode' => 0,\n ];\n }\n\n // Create state if not exists.\n $state = \\App\\State::where('abbr', $contentsArray['stateAbbr'])->first();\n if ($state === null) {\n $this->comment(\"State does not exists, creating state...\");\n $state = new State;\n $state->name = $this->states()[ $contentsArray['stateAbbr'] ];\n $state->abbr = $contentsArray['stateAbbr'];\n $state->save();\n $this->info(\"State ID: {$state->id}.\");\n }\n\n // Create city if not exists.\n $city = \\App\\City::where('name', $contentsArray['city'])->first();\n if ($city === null) {\n $this->comment(\"City does not exists, creating city...\");\n $city = new City;\n $city->name = $contentsArray['city'];\n $city->save();\n $this->info(\"City ID: {$city->id}.\");\n }\n\n // Link CityState.\n $state->cities()->syncWithoutDetaching([ $city->id ]);\n $state->save();\n\n // Assign venue.\n $venue->name = $contentsArray['name'];\n $venue->district = $contentsArray['district'] ?? null;\n $venue->usabmx_id = $contentsArray['id'];\n $venue->website = $contentsArray['websiteUri'] ?? null;\n $venue->image_uri = $contentsArray['logoUri'] ?? null;\n $venue->description = $contentsArray['description'] ?? null;\n $venue->street_address = $contentsArray['street'] ?? null;\n $venue->zip_code = $contentsArray['zipCode'] ?? null;\n $venue->lat = $contentsArray['lat'] ?? null;\n $venue->long = $contentsArray['long'] ?? null;\n $venue->email = $contentsArray['email'] ?? null;\n $venue->primary_contact = $contentsArray['primaryContact'] ?? null;\n $venue->phone_number = $contentsArray['phone'] ?? null;\n\n // Associate city.\n $venue->city()->associate($city->id);\n\n // Update DB record.\n $saved = $venue->save();\n\n // $venue->country = $contentsArray['country'];\n // $venue->scheduleUri = $contentsArray['scheduleUri'];\n // $venue->mapUri = $contentsArray['mapUri'];\n\n // Handle saved.\n if ($saved === false) {\n return [\n 'message' => \"Failed to save: {$venue->name}.\",\n 'exitCode' => 0,\n ];\n }\n return [\n 'message' => 'Imported',\n 'exitCode' => 1\n ];\n }", "title": "" }, { "docid": "e3967fda22221349dd24b8da16372aa7", "score": "0.48339593", "text": "function onThisStepProcessPage()\n\t{\n\t\tif ($this->request->request->get('action') == 'setvenue') {\n\t\t\t$this->draftEvent->setDetailsValue('where.mode', $this->MODE_VENUE);\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->request->request->get('action') == 'setnewvenue') {\n\t\t\t$this->draftEvent->setDetailsValue('where.mode', $this->MODE_NEWVENUE);\n\n\t\t\t$venueModel = new VenueModel();\n\t\t\t$venueModel->setSiteId($this->site->getId());\n\t\t\t$venueModel->setCountryId($this->draftEvent->getDetailsValue('event.country_id'));\n\t\t\t$venueModel->setTitle($this->request->request->get('fieldTitle'));\n\t\t\t$venueModel->setAddress($this->request->request->get('fieldAddress'));\n\t\t\t$venueModel->setAddressCode($this->request->request->get('fieldAddressCode'));\n\n\t\t\tif ($this->request->request->get('fieldAreaSlug') && $this->request->request->get('fieldAreaSlug') != -1) {\n\t\t\t\t$areaRepo = new AreaRepository();\n\t\t\t\t$area = $areaRepo->loadBySlug($this->site, $this->request->request->get('fieldAreaSlug'));\n\t\t\t\tif ($area) {\n\t\t\t\t\t$venueModel->setAreaId($area->getId());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($this->application['extensions']->getExtensionsIncludingCore() as $extension) {\n\t\t\t\t$extension->addDetailsToVenue($venueModel);\n\t\t\t}\n\n\t\t\t$this->draftEvent->setDetailsValue('venue.title', $venueModel->getTitle());\n\t\t\t$this->draftEvent->setDetailsValue('venue.address', $venueModel->getAddress());\n\t\t\t$this->draftEvent->setDetailsValue('venue.address_code', $venueModel->getAddressCode());\n\t\t\t$this->draftEvent->setDetailsValue('venue.field_area_search_text', $this->request->request->get('fieldAreaSearchText'));\n\t\t\t$this->draftEvent->setDetailsValue('venue.area_id', $venueModel->getAreaId());\n\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->request->request->get('action') == 'setarea') {\n\t\t\t// User may have been setting venue and realised they didn't know it. Clear data to make sure it's kept clean.\n\t\t\t$this->draftEvent->unsetDetailsValue('event.newvenue');\n\t\t\t$this->draftEvent->unsetDetailsValue('venue.title');\n\t\t\t$this->draftEvent->unsetDetailsValue('venue.address');\n\t\t\t$this->draftEvent->unsetDetailsValue('venue.address_code');\n\t\t\t$this->draftEvent->unsetDetailsValue('venue.description');\n\t\t\t$this->draftEvent->unsetDetailsValue('venue.field_area_search_text');\n\t\t\t$this->draftEvent->unsetDetailsValue('venue.area_id');\n\t\t\t// Do we ask user for area or not?\n\t\t\t$countryRepository = new CountryRepository();\n\t\t\t$country = $countryRepository->loadById($this->draftEvent->getDetailsValue('event.country_id'));\n\t\t\t$areaRepository = new AreaRepository();\n\t\t\tif ($areaRepository->doesCountryHaveAnyNotDeletedAreas($this->site, $country)) {\n\t\t\t\t$this->draftEvent->setDetailsValue('where.mode', $this->MODE_AREA);\n\t\t\t} else {\n\t\t\t\t$this->draftEvent->setDetailsValue('event.noareavenue', true);\n\t\t\t\t$this->isAllInformationGathered = true;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\n\t\t// Secondly, any thing actually set?\n\n\t\tif ($this->request->request->get('action') == 'setthisarea') {\n\t\t\t$ar = new AreaRepository();\n\t\t\t$area = $ar->loadBySlug($this->site, $this->request->request->get('area_slug'));\n\t\t\tif ($area) {\n\t\t\t\t$this->draftEvent->setDetailsValue('area.id', $area->getId());\n\t\t\t\t$this->draftEvent->setDetailsValue('area.title', $area->getTitle());\n\t\t\t\t$this->isAllInformationGathered = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->request->request->get('action') == 'setthisvenue') {\n\t\t\t$vr = new VenueRepository();\n\t\t\t$venue = $vr->loadBySlug($this->site, $this->request->request->get('venue_slug'));\n\t\t\tif ($venue) {\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.id', $venue->getId());\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.title', $venue->getTitle());\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.address', $venue->getAddress());\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.address_code', $venue->getAddressCode());\n\t\t\t\t$this->isAllInformationGathered = true;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->request->request->get('action') == 'setthisnewvenue') {\n\n\n\t\t\t$venueModel = new VenueModel();\n\t\t\t$venueModel->setSiteId($this->site->getId());\n\t\t\t$venueModel->setCountryId($this->draftEvent->getDetailsValue('event.country_id'));\n\t\t\t$venueModel->setTitle($this->request->request->get('fieldTitle'));\n\t\t\t$venueModel->setAddress($this->request->request->get('fieldAddress'));\n\t\t\t$venueModel->setAddressCode($this->request->request->get('fieldAddressCode'));\n\t\t\t$venueModel->setDescription($this->request->request->get('fieldDescription'));\n\n\t\t\t$areaRepo = new AreaRepository();\n\n\t\t\t// Slightly ackward we have to set Area ID on venue object, then when extensions have done we need to reload the area object again.\n\t\t\tif ($this->request->request->get('fieldAreaSlug') && $this->request->request->get('fieldAreaSlug') != -1) {\n\t\t\t\t$area = $areaRepo->loadBySlug($this->site, $this->request->request->get('fieldAreaSlug'));\n\t\t\t\tif ($area) {\n\t\t\t\t\t$venueModel->setAreaId($area->getId());\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->request->request->get('fieldChildAreaSlug') && $this->request->request->get('fieldChildAreaSlug') != -1) {\n\t\t\t\t$areaChild = $areaRepo->loadBySlug($this->site, $this->request->request->get('fieldChildAreaSlug'));\n\t\t\t\tif ($areaChild) {\n\t\t\t\t\t$area = $areaChild;\n\t\t\t\t\t$venueModel->setAreaId($areaChild->getId());\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($this->application['extensions']->getExtensionsIncludingCore() as $extension) {\n\t\t\t\t$extension->addDetailsToVenue($venueModel);\n\t\t\t}\n\t\t\t$area = null;\n\t\t\tif ($venueModel->getAreaId() && (!$area || $area->getId() != $venueModel->getAreaId())) {\n\t\t\t\t$area = $areaRepo->loadById($venueModel->getAreaId());\n\t\t\t}\n\n\t\t\t$this->draftEvent->setDetailsValue('venue.title', $venueModel->getTitle());\n\t\t\t$this->draftEvent->setDetailsValue('venue.address', $venueModel->getAddress());\n\t\t\t$this->draftEvent->setDetailsValue('venue.address_code', $venueModel->getAddressCode());\n\t\t\t$this->draftEvent->setDetailsValue('venue.description', $venueModel->getDescription());\n\t\t\tif ($venueModel->hasLatLng()) {\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.lat', $venueModel->getLat());\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.lng', $venueModel->getLng());\n\t\t\t} else {\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.lat', null);\n\t\t\t\t$this->draftEvent->setDetailsValue('venue.lng', null);\n\t\t\t}\n\t\t\t$this->draftEvent->setDetailsValue('venue.field_area_search_text', $this->request->request->get('fieldAreaSearchText'));\n\t\t\tif ($area) {\n\t\t\t\t$this->draftEvent->setDetailsValue('area.id', $area->getId());\n\t\t\t\t$this->draftEvent->setDetailsValue('area.title', $area->getTitle());\n\t\t\t} else {\n\t\t\t\t$this->draftEvent->setDetailsValue('area.id', null);\n\t\t\t\t$this->draftEvent->setDetailsValue('area.title', null);\n\t\t\t}\n\n\t\t\t// are we done? if user has selected -1 for \"none\" or there are no child areas. oh, and title needed\n\t\t\tif ($this->request->request->get('fieldChildAreaSlug') == -1 && trim($venueModel->getTitle())) {\n\t\t\t\t$this->draftEvent->setDetailsValue('event.newvenue',true);\n\t\t\t\t$this->isAllInformationGathered = true;\n\t\t\t} else if (count($this->getChildAreasForArea($area, 1)) == 0 && trim($venueModel->getTitle())) {\n\t\t\t\t$this->draftEvent->setDetailsValue('event.newvenue',true);\n\t\t\t\t$this->isAllInformationGathered = true;\n\t\t\t}\n\n\t\t\t$this->draftEvent->setDetailsValue('where.setthisnewvenue.submitted', true);\n\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->request->request->get('action') == 'setnoareavenue') {\n\t\t\t$this->draftEvent->setDetailsValue('event.noareavenue', true);\n\t\t\t$this->isAllInformationGathered = true;\n\t\t\treturn true;\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "c41962e31205b284446a3ba375722b34", "score": "0.48286828", "text": "public function store(RegionRequest $request)\n {\n if(Region::where('vk_id', $request->vk_id)->count() > 0) {\n return redirect()->back()->with('prohibited', 'Регион с VK ID ' . $request->vk_id . ' уже существует');\n }\n $country = Country::findOrFail($request->country_id);\n $region = new Region();\n $region->name = $request->name;\n $region->country_id = $request->country_id;\n $region->vk_id = $request->vk_id;\n $region->save();\n $regionIds = [\n ['region_id' => $region->id, 'vk_id' => $region->vk_id]\n ];\n EventController::cityLoading($regionIds, $country);\n return redirect()->route('adminchik.regions.index', ['country_id' => $request->country_id])->with('success', 'Регион добавлен, города загружаются в фоновом режиме');\n }", "title": "" }, { "docid": "d90d09257ab21be45a735daa7a9c1b19", "score": "0.48165345", "text": "public function store()\n {\n $attributes = $this->validateVenue();\n // Create a new Venue, as long as attributes are valid. \n $venue = Venue::create($attributes);\n \n // Mailable to 'admin' user when a new Venue is created. \n \\Mail::to('[email protected]')->send(\n \n new VenueCreated($venue)\n \n );\n \n // event(new VenueCreated($venue));\n \n return redirect('/venues');\n }", "title": "" }, { "docid": "0c7d22678ef30e0cd5a52c3f4d3b1516", "score": "0.47966817", "text": "public function store(Request $request)\n {\n // Loading user infos\n $user = $request->user();\n\n // Only DA & Admin can create venues\n if (!($user[0] == 'Admin' || $user[0] == 'Artistic Director')) {\n return response('Unauthorized.', 401);\n }\n\n $venue = Venue::create($request->input());\n\n $venueAddress = VenueAddress::create($request->input('address'));\n $venueHours = VenueHours::create($request->input('hours'));\n $venueType = VenueType::create($request->input('type'));\n $venueAppVisibility = VenueAppVisibility::create($request->input('appVisibility'));\n\n $venue->address_id = $venueAddress->id;\n $venue->hours_id = $venueHours->id;\n $venue->type_id = $venueType->id;\n $venue->visibility_id = $venueAppVisibility->id;\n $venue->save();\n\n return Venue::find($venue->id)->with(['address', 'hours', 'type', 'appVisibility'])->get();\n }", "title": "" }, { "docid": "96e102c7d72c934392672ef5ede74562", "score": "0.47938955", "text": "public function run()\n\t{\n\t\tDB::table('venues')->truncate();\n\n\t\t$venues = array(\n\t\t\t//1\n\t\t\tarray(\n\t\t\t\t'name'=>'2625 Main',\n\t\t\t\t'link'=> 'https://www.google.com/maps/preview#!q=2625+Main+St%2C+Dallas%2C+TX&data=!4m11!1m10!2i18!4m8!1m3!1d4770!2d-96.8709037!3d32.7750398!3m2!1i2246!2i1092!4f13.1',\n\t\t\t\t'image'=>'/images/venues/main-street.png',\n\t\t\t\t'address_1' =>'2625 Main St',\n\t\t\t\t'city'=>'Dallas'\n\t\t\t),\n\n\t\t\t//2\n\t\t\tarray(\n\t\t\t\t'name'=>'Common Desk Deep Ellum',\n\t\t\t\t'link'=>'https://www.google.com/maps/preview#!q=2919+Commerce+St%2C+Dallas%2C+Texas+75226&data=!4m11!1m10!4m8!1m3!1d6991602!2d-100.0768425!3d31.1689339!3m2!1i1024!2i768!4f13.1!17b1',\n\t\t\t\t'image'=>'/images/venues/common-desk.png',\n\t\t\t\t'address_1' =>'2919 Commerce St',\n\t\t\t\t'city'=>'Deep Ellum'\n\t\t\t),\n\n\t\t\t//3\n\t\t\tarray(\n\t\t\t\t'name'=>'The Wyly Theater',\n\t\t\t\t'link'=>'https://www.google.com/maps/preview#!data=!4m13!3m12!1m0!1m1!1s2400+Flora+St%2C+Dallas%2C+TX+75201!3m8!1m3!1d6991602!2d-100.0768425!3d31.1689339!3m2!1i1024!2i768!4f13.1',\n\t\t\t\t'image'=>'/images/venues/wyly-theater.png',\n\t\t\t\t'address_1' =>'2400 Flora St',\n\t\t\t\t'city'=>'Dallas'\n\t\t\t)\n\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t);\n\n\t\t// Uncomment the below to run the seeder\n\t\tDB::table('venues')->insert($venues);\n\t}", "title": "" }, { "docid": "9959dc6a5d5532d2f89251e987858d27", "score": "0.47833768", "text": "public function store(Request $request)\n {\n $this->validate($request,[ 'name'=>'required', 'location'=>'required', 'mincapacity'=>'required', 'maxcapacity'=>'required']);\n \\App\\models\\Venue::create($request->all());\n return redirect()->route('venues.index')->with('success','Registro creado satisfactoriamente');\n }", "title": "" }, { "docid": "358aa1d55ee1bc8b152cde8c2b4bf88a", "score": "0.4783334", "text": "public function store(PostRequest $request)\n {\n //Transaction to create record\n DB::transaction(function () use ($request)\n {\n $post = new Post();\n $post = $this->assign($post,$request);\n $post->save();\n $post->tags()->sync($request->tags); //Create the relation\n\n });\n return response()->json(['success' => true]);\n }", "title": "" }, { "docid": "0d6caae65dc5f41eb6d7d6ebc254b84e", "score": "0.4782254", "text": "public function create()\n {\n// if (!Auth::check()) {\n// session()->flash('error', 'You must be logged in to view this page!');\n// return redirect('auth.login');\n// }\n return view('venues.create');\n }", "title": "" }, { "docid": "ff331bbee23e98eeebe2cee58a3c93e3", "score": "0.47766817", "text": "function addEvents($connection, $venueName, $info){\n\t\tif($connection->query(\"SELECT 1 FROM venues WHERE VenueName = '\".$venueName.\"' LIMIT 1\") != FALSE){\n\t\t\tvar_dump($connection);\n\t\t\t$stmt = $connection->prepare(\"INSERT INTO \".$venueName.\"_events (Details, Date, Time, Price) VALUES (?,?,?,?)\");\n\t\t\t$stmt->bind_param(\"ssss\", $details, $date, $time, $price);\n\t\t\t\n\t\t\tforeach($info as $event){\n\t\t\t\t$details = $event[\"details\"];\n\t\t\t\t$date = $event[\"date\"];\n\t\t\t\t$time = $event[\"time\"];\n\t\t\t\t$price = $price[\"price\"];\n\t\t\t\t$stmt->execute();\n\t\t\t}\n\t\t\t\n\t\t\t$stmt->close();\n\t\t}\n\t\telse{\n\t\t\techo $venueName.\" event table doesn't exist. Error: \".$connection->error.\"(\".$connection->errno.\")\";\n\t\t\tcreateVenue($connection, $venueName);\n\t\t\taddEvents($connection, $venueName, $info);\n\t\t}\n\t}", "title": "" }, { "docid": "3265a6b89afa723a4ce6ba67710eee12", "score": "0.476028", "text": "private function getFilteredZoneIds($post)\n {\n /**\n * some basic transformation of the POSTed contents\n */\n $category_id = intval($post['category']);\n $country_id = intval($post['country']);\n $region_id= intval($post['region']);\n $area_id = intval($post['area']);\n $population_filter = $post['population_filter'];\n if (!empty($post['sub_categories']) && is_array($post['sub_categories'])) {\n $venue_sub_categories = $post['sub_categories'];\n } else {\n $venue_sub_categories = [];\n }\n\n /**\n * search the venues which match the POSTed filter criteria\n */\n $venueQuery = new Venue;\n // $filtered_venues = $venueQuery->where('capture_start', '<', time());\n\n $filtered_venues = $venueQuery->whereHas('venue_tracking', function ($query) {\n $query->where('capture_start', '<', time());\n });\n\n $userVenue = $this->ci->currentUser->primaryVenue;\n\n /**\n * then apply filters to the current query\n */\n if ($category_id != 0) {\n $filtered_venues->where('category_id', $category_id);\n };\n\n if (count($venue_sub_categories) > 0) {\n $filtered_venues->whereHas('sub_categories', function ($query) use($venue_sub_categories) {\n $query->whereIn('sub_category.id', $venue_sub_categories);\n });\n };\n\n if ($country_id != 0) {\n $filtered_venues->where('country_id', $country_id);\n };\n\n if ($region_id != 0) {\n $filtered_venues->where('region_id', $region_id);\n };\n\n if ($area_id != 0) {\n $filtered_venues->where('area_id', $area_id);\n };\n\n if ($population_filter != 'false') {\n $population_from = $userVenue->population * 0.85;\n $population_to = $userVenue->population * 1.15;\n\n $filtered_venues->where('population', '>=', $population_from)->where('population', '<=', $population_to);\n };\n \n\n /**\n * - get the National Stats tag id from the settings table which\n * we will use to filter on\n * - lastly we filter on the zone tag\n */\n $fetch_settings = new SiteConfiguration;\n $tag_filter = $fetch_settings->where('plugin', 'national_stats')\n ->where('name', 'national_stats_tag_id')\n ->first()->value;\n\n $filtered_venues->whereHas('zones.tags', function($q) use ($tag_filter) {\n $q->where('tag.id', $tag_filter);\n });\n\n /**\n * fetch the final results from the venue query\n */\n $filtered_venues = $filtered_venues->get();\n\n /**\n * then create an array containing venue ids that passed the filters,\n * filtering out the National Stats zone for the current venue\n */\n $allowed_zone_ids = [];\n $zone_query = new Zone;\n\n foreach ($filtered_venues as $venue) {\n if ($venue->id != $this->ci->currentUser->primary_venue_id) {\n $include_zones = $zone_query->where('venue_id', $venue->id)\n ->whereHas('tags', function($q) use ($tag_filter) {\n $q->where('tag.id', $tag_filter);\n })->get();\n\n foreach ($include_zones as $zone) {\n $allowed_zone_ids[] = $zone->id;\n }\n }\n }\n\n return $allowed_zone_ids;\n }", "title": "" }, { "docid": "29f78319637c55e5ee327802730ae169", "score": "0.4749717", "text": "protected function setupIAvenue() {\n\t\t$page = $this->formidable->addWizardPage('iAvenue', array('id'=>'iavenue_page'));\n\t\t$page->addNote(\"Please enter your opportunity ID to begin the proposal.<br/>If you prefer, you may click <b>Next</b> to continue without entering an Opportunity ID.\");\n\t\t$page->addMultifieldRow('opportunity_id_row', 'Opportunity ID');\n\t\t$page->addMultifieldItem('opportunity_id_row', 'opportunity_id', 'text', '');\n\t\t$page->addMultifieldItem('opportunity_id_row', 'opportunity_id_button', 'inputbutton', 'Lookup');\n\t\t$page->addMultifieldItem('opportunity_id_row', 'opportunity_id_clear', 'inputbutton', 'Clear');\n\t\t$page->addHTML('<tr><td colspan=\"3\" id=\"iavenue_response\"></td></tr>');\n\t}", "title": "" }, { "docid": "8867b2056d91f8f5d8356cabc6ad09ae", "score": "0.47485667", "text": "public function creating(Post $post)\n {\n $post->user_id = Auth::id();\n }", "title": "" }, { "docid": "42848e4bcfc52b19e67413653b4dde34", "score": "0.47231507", "text": "function lfe_insert_structured_data() {\n\tglobal $post;\n\n\tif ( $post->post_parent || 'page' != $post->post_type ) {\n\t\treturn;\n\t}\n\n\t$dt_date_start = new DateTime( get_post_meta( $post->ID, 'lfes_date_start', true ) );\n\t$dt_date_end = new DateTime( get_post_meta( $post->ID, 'lfes_date_end', true ) );\n\t$country = wp_get_post_terms( $post->ID, 'lfevent-country' );\n\tif ( $country ) {\n\t\t$country = $country[0]->name;\n\t}\n\n\t$image_url = get_post_meta( $post->ID, '_social_image_url', true );\n\tif ( ! $image_url ) {\n\t\t$image_url = get_the_post_thumbnail_url();\n\t}\n\n\t$out = '';\n\n\t$out .= '<script type=\"application/ld+json\">';\n\t$out .= '{';\n\t$out .= '\"@context\": \"http://schema.org/\",';\n\t$out .= '\"@type\": \"Event\",';\n\t$out .= '\"name\": \"' . esc_html( $post->post_title ) . '\",';\n\t$out .= '\"startDate\": \"' . $dt_date_start->format( 'Y-m-d' ) . '\",';\n\t$out .= '\"endDate\": \"' . $dt_date_end->format( 'Y-m-d' ) . '\",';\n\t$out .= '\"location\": {';\n\t$out .= ' \"@type\": \"Place\",';\n\t$out .= ' \"name\": \"' . esc_html( get_post_meta( $post->ID, 'lfes_venue', true ) ) . '\",';\n\t$out .= ' \"address\": {';\n\t$out .= '\t\"@type\": \"PostalAddress\",';\n\t$out .= '\t\"streetAddress\": \"' . esc_html( get_post_meta( $post->ID, 'lfes_street_address', true ) ) . '\",';\n\t$out .= '\t\"addressLocality\": \"' . esc_html( get_post_meta( $post->ID, 'lfes_city', true ) ) . '\",';\n\t$out .= '\t\"postalCode\": \"' . esc_html( get_post_meta( $post->ID, 'lfes_postal_code', true ) ) . '\",';\n\t$out .= '\t\"addressRegion\": \"' . esc_html( get_post_meta( $post->ID, 'lfes_region', true ) ) . '\",';\n\t$out .= '\t\"addressCountry\": \"' . esc_html( $country ) . '\"';\n\t$out .= ' }';\n\t$out .= '},';\n\t$out .= '\t\"image\": [ ';\n\t$out .= '\t \"' . esc_html( $image_url ) . '\"';\n\t$out .= '\t ],';\n\t$out .= '\t\"description\": \"' . esc_html( get_post_meta( $post->ID, 'lfes_description', true ) ) . '\"';\n\t$out .= '}';\n\t$out .= '</script>';\n\n\techo $out; //phpcs:ignore\n}", "title": "" }, { "docid": "cf01e3e5c53941de4b99e747811da637", "score": "0.4713409", "text": "public function store(PostRequest $request)\n {\n try{\n $post = new Post($request->all());\n $post->save();\n\n foreach($request['tags'] as $tag){\n $post->tags()->attach($tag);\n }\n\n flash()->success('Se agregó un nuevo post: '.$post->titulo);\n }catch(\\Exception $ex){\n flash()->error('Ocurrió un problema al agregar...'.$ex->getMessage());\n }\n\n return redirect()->route('admin.post.index');\n }", "title": "" }, { "docid": "e7897113055c1e8039a76b44f90bbd47", "score": "0.47053936", "text": "public function setVenue(VenueInterface $venue);", "title": "" }, { "docid": "d4639ca28f68e1e3931ba9eec9e86a55", "score": "0.47018245", "text": "public function store(Request $request)\n {\n if (!Auth::user()->email_verified_at) {\n return redirect()->to('/email/verify');\n }\n //Validate, but only non-drafts\n $validation_errors = PostController::PostValidate($request);\n if (count($validation_errors) > 0) {\n return back()->withInput()->withErrors($validation_errors);\n }\n\n //Cuisines empty?\n if (!$request->cuisine && $request->action == 'Publish') {\n return back()->withInput()->withErrors(\"Please select at least one cuisine\");\n }\n\n\n //Create A New Post Object, assume Draft\n $newPost = new Post();\n $newPost = PostController::PostAssigner($request, $newPost);\n //$newPost->user_id = Auth::user()->id; //Editor of this version\n\n //Set Maps\n $newPost->place_location = $request->place_location;\n $newPost->place_name = $request->place_name;\n $newPost->place_icon = $request->place_icon;\n $newPost->place_adress = $request->place_adress;\n $newPost->save();\n\n //Store Cuisines\n PostController::updateCuisines($request, $newPost);\n\n //Generate opening hours, if any\n OpeningController::new($request, $newPost->id);\n\n //Images\n PostController::updateImages($request, $newPost);\n\n //Publish\n if ($request->action == 'Publish') {\n $newPost->is_draft = false;\n $review = ReviewController::new($newPost);\n $newPost->review_id = $review->id;\n $newPost->save();\n\n return redirect()->route('posts.review')->with('success', 'Post successfully stored and is now under review.');\n }\n //Draft\n else {\n return redirect()->route('posts.draft')->with('success', 'Draft successfully saved.');\n }\n return back()->withInput()->withErrors('Unexpected Error, while ' . $request->action . '/post ' . $newPost->id . '.');\n\n /**\n * THIS SHULD NOT BE EXECUTED ANYMORE!\n */\n\n\n\n //Publish?\n if ($request->action == 'Publish') {\n $newPost->is_draft = 0;\n //Create and assign review\n $review = ReviewController::new($newPost);\n $newPost->review_id = $review->id;\n $newPost->save();\n }\n //Draft\n else {\n $newPost->is_draft = 1;\n $newPost->save();\n }\n return redirect()->route('posts.index')->with('success', 'Post Saved');\n }", "title": "" }, { "docid": "6a2eb148588f5a6e37a3453fe8b84a1b", "score": "0.47014967", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'required|max:255',\n 'body' => 'required',\n 'user_id' => 'required',\n 'category_id' => 'required',\n ]);\n\n $post = new Post();\n\n $language = App::getLocale();\n\n $post->translateOrNew($language)->title = $request->title;\n $post->translateOrNew($language)->body = $request->body;\n $post->translateOrNew($language)->description = 'Test';\n $post->user_id = $request->user_id;\n $post->chapter_id = isset($request->chapter_id) ? $request->chapter_id : null;\n $post->category_id = $request->category_id;\n $post->course_id = $request->course_id;\n $post->position = $request->position;\n $post->searchable = ($request->searchable == 1) ? true : false;\n\n if ($post->save()) {\n Session::flash('flash_message', 'Post has been created');\n }\n\n $post->tags()->attach($request->tags);\n\n return redirect()->route('posts.admin.show', ['post' => $post->id]);\n }", "title": "" }, { "docid": "848ce6ae1e5427940247ad3877c565d1", "score": "0.46921998", "text": "public function createing(Post $post)\n {\n if (! \\App::runningInConsole()) {\n $post->user_id=auth()->user()->id;\n }\n }", "title": "" }, { "docid": "8a5c03cc33383c29b5a5458fa3f15e12", "score": "0.4684301", "text": "private static function insert_or_update_post($event_data) {\n // Look for preexisting post\n if (empty(self::$existing_events)) {\n self::create_event_id_mapping();\n }\n $post_id = null;\n if (array_key_exists(intval($event_data['ID']), self::$existing_events)) {\n $post_id = self::$existing_events[$event_data['ID']];\n }\n\n // Set the post data\n $post_params = array(\n 'post_title' => $event_data['Name'],\n 'post_name' => sanitize_title($event_data['Name']),\n 'post_content' => $event_data['Description'],\n 'post_status' => 'publish',\n 'post_author' => 1,\n 'post_type' => 'events'\n );\n\n if (!$post_id) {\n $post_id = wp_insert_post($post_params);\n } else {\n $post_params['ID'] = $post_id;\n wp_update_post($post_params);\n }\n\n // Report errors\n if (is_wp_error($post_id)) {\n error_log(\"[VSEI Plugin] Failed to insert/update \" . $event_data['NAME'] . \".\");\n $messages = $post_id->get_error_messages();\n foreach ($messages as $message) {\n error_log(\"[VSEI Plugin] $message\");\n }\n }\n\n return !empty($post_id) && !(is_wp_error($post_id)) ? $post_id : false;\n }", "title": "" }, { "docid": "829a084a217fc73dcc31ae66870a69bf", "score": "0.46830964", "text": "function insertNewEvent($post_data=array(),$event_data=array()){\n\t\tglobal $EO_Errors;\n\n\t\t//Perform some checks\n\t\tif (!current_user_can('edit_events')) \n\t\t\twp_die( __('You do not have sufficient permissions to create events') );\n\n\t\tif(empty($post_data)||empty($event_data))\n\t\t\twp_die( __('Inserting event error: Post or Event data must be supplied.') );\n\n\n\t\t/*\n\t\t* First of all 'create' the event - this performs necessary validation checks and populates the event object\n\t\t* We either use EO_Event::create if dates are given by strings (assumed to be blog local-time)\n\t\t* Or we use EO_Event::createFromObject if dates are given by DateTime objects\n\t\t*/\n\t\t$event = new EO_Event(0);\n\t\tif(!empty($event_data['dateObjects'])):\n\t\t\t$result = $event->createFromObjects($event_data);\n\t\telse:\n\t\t\t\n\t\t\t$result = $event->create($event_data);\n\t\tendif;\n\n\t\tif($result):\n\t\t\t//Event is valid, now create new 'event' post\n\t\t\t$post_data_preset=array('post_type'=>'event');\n\t\t\t$post_input = array_merge($post_data,$post_data_preset);\n\n\t\t\tif(empty($post_input['post_title']))\n\t\t\t\t$post_input['post_title']='untitled event';\n\t\t\t\n\t\t\t$post_id = wp_insert_post($post_input);\n\n\t\t\t//Did the event insert correctly?\n\t\t\tif ( is_wp_error( $post_id) || $post_id==0) :\n\t\t\t\t$EO_Errors->add('eo_error', \"Event was <strong>not </strong> created\");\n\t\t\t\t$EO_Errors->add('eo_error', $post_id->get_error_message());\n\n\t\t\telse:\n\t\t\t\t//Insert event date details. \n\t\t\t\t$event->insert($post_id);\n\t\t\tendif;\n\n\t\telse:\n\t\t\t$EO_Errors->add('eo_error', \"Event was <strong>not </strong> created\");\n\t\t\treturn false;\n\n\t\tendif;\n\n\treturn $post_id;\n\t}", "title": "" }, { "docid": "f36cce62af09d83fe99aa6d20679f5ac", "score": "0.46808553", "text": "function addVenue( $addName, $addCapacity ) {\n\n // Executes query\n try {\n\n $stmt = $this->dbh->prepare(\"\n INSERT INTO venue \n ( name, capacity ) \n VALUES( '{$addName}', {$addCapacity} )\n \");\n\n $stmt->execute();\n\n } catch (PDOException $e) {\n echo $e->getMessage();\n die();\n } // Ends try catch\n\n }", "title": "" }, { "docid": "0ceeba0e2ce2ad991ebbe6222ca3f32d", "score": "0.4680475", "text": "public function run()\n {\n Venue::create([\n 'name' => 'Computer Lab',\n 'description' => 'Computer Lab has a large place to carry ouy activities.',\n 'capacity' => 300,\n 'air_conditioned' => true,\n 'active' => true,\n 'venue_image_path' => null,\n ]);\n\n for ($x = 0; $x <= 20; $x++) {\n factory(Venue::class)->create();\n }\n }", "title": "" }, { "docid": "46624343d526d0086c43c9b28f9f08f3", "score": "0.46747425", "text": "public function run()\n {\n Region::insert([\n [\n 'title' => 'Arica y Parinacota' \n ],\n [\n 'title' => 'Tarapacá' \n ],\n [\n 'title' => 'Antofagasta' \n ],\n [\n 'title' => 'Atacama' \n ],\n [\n 'title' => 'Coquimbo' \n ],\n [\n 'title' => 'Valparaíso' \n ],\n [\n 'title' => 'Libertador Gral Bernardo Ohiggins' \n ],\n [\n 'title' => 'Maule' \n ],\n [\n 'title' => 'BioBío' \n ],\n [\n 'title' => 'La Araucanía' \n ],\n [\n 'title' => 'Los Ríos' \n ],\n [\n 'title' => 'Los Lagos' \n ],\n [\n 'title' => 'Aisén' \n ],\n [\n 'title' => 'Magallanes y la Antártica Chilena' \n ],\n [\n 'title' => 'Metropolitana de Santiago' \n ]\n ]);\n\n }", "title": "" }, { "docid": "8afcfdd8255b30cbfbed85564102040d", "score": "0.4670898", "text": "public function run()\n {\n City::create(['name' => 'Nikolaev', 'country_id' => Country::create(['name' => 'Ukraine'])->id]);\n }", "title": "" }, { "docid": "33fe6f48289149d987b3e9baa0bb6159", "score": "0.46665433", "text": "public function create()\n {\n return view('/interface.page.revenues.create');\n }", "title": "" }, { "docid": "ddf091df4ace711364a77a9533328ce9", "score": "0.46360603", "text": "public function register($post)\n {\n\n //some data needs parsing\n $specialisations = $post['school-first'] . ', ' . $post['school-second'] . ', ' . $post['school-third'];\n\n $languages = array();\n if (isset($post['languages_en']) && $post['languages_en'] == \"en\") $languages[] = \"en\";\n if (isset($post['languages_de']) && $post['languages_de'] == \"de\") $languages[] = \"de\";\n if (isset($post['languages_ru']) && $post['languages_ru'] == \"ru\") $languages[] = \"ru\";\n\n\n //prepare db table row data\n $db_array = array();\n\n $db_array['first_name'] = $post['first_name'];\n $db_array['last_name'] = $post['last_name'];\n $db_array['birth_date'] = date(\"Y-m-d\", strtotime($post['birth_date'])); //MySQL date format is Y-m-d\n $db_array['birth_place'] = $post['birth_place'];\n $db_array['addr_street'] = $post['addr_street'];\n $db_array['addr_city'] = $post['addr_city'];\n $db_array['addr_zip'] = $post['addr_zip'];\n $db_array['addr_province'] = $post['addr_province'];\n $db_array['addr_region'] = intval($post['region']);\n $db_array['pesel'] = $post['pesel'];\n $db_array['specs'] = $specialisations;\n $db_array['sel_langs'] = self::encode_langs($languages);\n $db_array['secondary_name'] = $post['secondary_name'];\n $db_array['secondary_langs'] = $post['secondary_langs'];\n $db_array['tel'] = $post['tel'];\n\n //database part\n $keys = array_keys($db_array);\n $values = array_values($db_array);\n\n $query = DB::insert('applications', $keys)->values($values);\n list($insert_id, $affected_rows) = $query->execute();\n\n if ($affected_rows != 1)\n throw new Kohana_Exception('Query ' . $query . ' probably failed! Check it! Affected rows = ' . $affected_rows . ' and last insert id = ' . $insert_id);\n\n return $insert_id;\n }", "title": "" }, { "docid": "4796b127d0dfaf6a4748b00224bc4f53", "score": "0.46265993", "text": "public function store(Request $request)\n {\n $validator = $request->validate([\n 'venue_name' => 'required|string|unique:venues',\n 'venue_address' => 'required|string',\n 'digital_venue_address' => 'nullable|string',\n 'venue_logo' => 'required|image|dimensions:max_height=60,max_width=90',\n 'venue_header_image' => 'required|image|dimensions:max_height=340,max_width=540'\n ]);\n\n try{\n $input = $request->all();\n $venue_logo = \"\";\n $venue_header_image = \"\";\n\n if($request->hasFile('venue_logo')){\n $file = $request->file('venue_logo');\n $originalname = $file->getClientOriginalName();\n $file_name = time().\"_\".$originalname;\n $file->move('public/uploads/venue_logo',$file_name);\n $venue_logo = \"venue_logo/\".$file_name;\n }\n\n if($request->hasFile('venue_header_image')){\n $file = $request->file('venue_header_image');\n $originalname = $file->getClientOriginalName();\n $file_name = time().\"_\".$originalname;\n $file->move('public/uploads/venue_header_image',$file_name);\n $venue_header_image = \"venue_header_image/\".$file_name;\n }\n\n $venue = new Venue();\n $venue->venue_name = $request->venue_name;\n $venue->venue_address = $request->venue_address;\n $venue->digital_venue_address = $request->digital_venue_address;\n $venue->venue_logo = $venue_logo;\n $venue->venue_header_image = $venue_header_image;\n $venue_details = $venue->save();\n \n return redirect('admin/list-venue')->with('success','Venue Added Successfully.'); \n }catch(\\Exception $e){\n return redirect()->route('admin.dashboard')->with('error','Something went wrong.');\n }\n }", "title": "" }, { "docid": "36187b465037f2750c63ff91b7c5c1d6", "score": "0.46249044", "text": "public function creating(Post $post)\n {\n if (!$post->user_id)\n $post->user()->associate(auth()->user());\n }", "title": "" }, { "docid": "45f67ec83560d7eaedd6e330a95b1376", "score": "0.4615492", "text": "public function run()\n {\n $post1 = Post::create([\n 'published' => 1,\n 'locale' => 'fr',\n 'image' => 'compresse.jpg',\n 'title' => 'Fest-noz solidaire le 29 octobre à Poullaouen',\n 'content' => 'Yalla! Pour les Enfants vous convie le samedi 29 octobre à un fest-noz de levée de fonds dont les entiers bénéfices reviendront à son école d’Aley, située au Liban, à quelques kilomètres de Beyrouth.\n\nVous pourrez y apprécier les talents des musiciens et chanteurs, Marie-Hélène Baron, Laurent Bigot, Yann Boulanger, Jean-Daniel Bourdonnay, Pierre Crépillon, Annie Ebrel, Ifig Flatrès, Marie-Laurence Fustec, Riwal Fustec, Yann Goasdoué, Maurice Guillou, Jean-Paul Guyomarc’h, Jean Herrou, Brigitte Le Corre, Yann Le Corre, Bruno Le Manach, Marie-Noëlle Le Mapihan, Pierre-Yves Le Panse, François Perennes, Iffig Poho, Christian Rivoalen, qui s’engagent bénévolement pour soutenir Yalla! Pour les Enfants.\n\nCette fête traditionnelle bretonne où règnent la bonne humeur, la convivialité, la gaieté fait écho au dialogue interculturel mené par Yalla ! Pour les Enfants qui entend réunir au travers de projets culturels communs la communauté d’accueil libanaise et la communauté syrienne en exil pour construire une paix durable. Avec la participation active de : Maryam Samaan, Cyrille Flejou, AFPS Centre Bretagne, la mairie de Poullaouen, Le Télégramme, Ouest-France, Radio Montagne Noire, Radio Kreiz Breizh, Radio Bleu Breizh Izel',\n 'slug' => 'fest-noz-solidaire-le-29-octobre-a-poullaouen',\n 'summary' => 'Yalla! Pour les Enfants vous convie le samedi 29 octobre à un fest-noz de levée de fonds dont les entiers bénéfices reviendront à son école d’Aley, située au Liban, à quelques kilomètres',\n 'media_id' => 1,\n 'card' => 'summary',\n 'meta_robots' => 0,\n 'meta_description' => 'Yalla! pour les enfants vous convie le samedi 29 octobre à un fest-noz de levée de fonds pour l\\'école d\\'Aley, située au Liban',\n 'category_id' => 1,\n 'alt' => 'Yolo image representant alt',\n \"view\" => 567\n ]);\n\n $post1->tags()->sync([1, 2]);\n\n $post1->views()->sync([1, 2, 3, 4]);\n\n $post2 = Post::create([\n 'published' => 1,\n 'locale' => 'fr',\n 'image' => 'yallapourlesenfantsweb.jpg',\n 'title' => 'Assemblée Générale de Yalla ! Pour les Enfants jeudi 29 septembre 2016 à 19h, à Paris',\n 'content' => 'Chers adhérents, chers amis,\n\nNous vous invitons à l’Assemblée Générale de Yalla ! Pour les Enfants, qui se tiendra le jeudi 29 septembre 2016 à 18h30 à « La Trockette », 125, rue du Chemin Vert 75011 Paris, métro Père Lachaise.\n\nL’ordre du jour sera le suivant :\n\nRapport moral,\nRapport financier,\nPrésentation du budget prévisionnel,\nInformation sur la relation bancaire avec la Société Générale,\nPrésentation du projet de l’école d’Aley et du programme « apprends-moi Maman »,\n\nAppel à bénévolat :\n\n1 / Recrutement d’une personne venant collaborer à la communication de Yalla !\n2 / Recrutement d’une personne pouvant répondre aux appels à projet des bailleurs de fonds,\n3/ Recrutement d’une personne apportant une aide aux travaux administratifs,\nQuestions diverses,\n\nLes documents ayant servi à l’élaboration de cette Assemblée Générale sont consultables, sur RDV au siège de l’association pendant tout le mois d’octobre.\n\nNous vous remercions de nous faire part de votre participation en nous renvoyant les informations suivantes :\n\nMadame, Monsieur\n\nParticipera à l’Assemblée Générale du jeudi 29 septembre 2016\n\nNe participera pas à l’Assemblée Générale du jeudi 29 septembre 2016*\n\nDonne pouvoir à :\n\n \n\n*veuillez barrer la mention inutile\n\n \n\nBien cordialement,\nMary Lemeland-Mellionec,\nPrésidente',\n 'slug' => 'article-n-2',\n 'summary' => 'Chers adhérents, chers amis, Nous vous invitons à l’Assemblée Générale de Yalla ! Pour les Enfants, qui se tiendra le jeudi 29 septembre 2016',\n 'card' => 'summary_large',\n 'media_id' => '2',\n 'meta_robots' => 1,\n 'meta_description' => 'Chers adhérents, chers amis, Nous vous invitons à l’Assemblée Générale de Yalla ! Pour les Enfants, qui se tiendra le jeudi 29 septembre 2016 à 18h30 à « La Trockette », 125, rue du Chemin Vert',\n 'category_id' => 2,\n\t 'alt' => 'Yolo image representant alt',\n\t 'view' => 209\n ]);\n\n $post2->tags()->sync([1]);\n\n $post2->views()->sync([5, 6, 7, 8]);\n\n\t $post3 = Post::create([\n\t\t 'published' => 1,\n\t\t 'locale' => 'fr',\n\t\t 'image' => 'guerre.jpg',\n\t\t 'title' => 'Pétition « Ban Ki-moon : STOPPONS LA GUERRE EN SYRIE »',\n\t\t 'content' => 'Nous relayons l’appel citoyen adressé au Secrétaire Général des Nations Unies Ban Ki-moon. Pour vous aussi signer cette pétition, cliquez ici.\n\n« Nous citoyens du monde, demandons aujourd’hui, l’arrêt immédiat des bombardements en Syrie et la protection des zones civiles, ainsi que l’aide d’urgence aux populations durement touchées par cette guerre génocidaire.\nParce qu’il n’est plus humainement possible pour nous, d’assister en spectateurs impuissants au massacre de cette population. Nous nous unissons ce jour pour hurler notre désaccord et notre volonté de voir cesser de telles atrocités.\nNous demandons à Monsieur Ban Ki-moon, Secrétaire Général de l’ONU, de porter notre message auprès des représentants des nations du monde, afin de faire stopper immédiatement les bombardement en Syrie. »',\n\t\t 'slug' => 'petition-petitionban-ki-moon-stoppons-la-guerre-en-syrie',\n\t\t 'summary' => 'Nous relayons l’appel citoyen adressé au Secrétaire Général des Nations Unies Ban Ki-moon. Pour vous aussi signer cette pétition, cliquez ici.',\n\t\t 'card' => 'summary',\n\t\t 'alt' => 'Yolo image representant alt',\n\t\t 'meta_robots' => 0,\n 'meta_description' => 'Nous relayons l’appel citoyen adressé au Secrétaire Général des Nations Unies Ban Ki-moon. Pour vous aussi signer cette pétition, cliquez ici.',\n 'category_id' => 1,\n\t\t \"view\" => 12\n\t ]);\n\n\t $post3->tags()->sync([1, 2]);\n\n\t $post3->views()->sync([9, 10]);\n\n\t $post4 = Post::create([\n\t\t 'published' => 1,\n\t\t 'locale' => 'en',\n\t\t 'image' => 'yallapourlesenfantsweb.jpg',\n\t\t 'title' => 'Recruiting Manager for Yalla! Center in Aley (ASAP)',\n\t\t 'content' => '<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><span style=\"box-sizing: border-box; color: #000000;\"><strong style=\"box-sizing: border-box;\">Mission: Director of Yalla! Center in Aley</strong></span></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><span style=\"box-sizing: border-box; color: #000000;\">Starting date : October 1<span style=\"box-sizing: border-box; font-size: 10.5px; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em;\">st</span>, 2016</span></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">&nbsp;</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><u style=\"box-sizing: border-box;\">The Association:</u></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><strong style=\"box-sizing: border-box;\">Yalla! Pour Les Enfants</strong>&nbsp;is an independent, impartial and secular association established under French law in July 2013 by a group of French citizens concerned by the lack of education opportunities for Syrian refugee children in Lebanon. Yalla! seeks to enhance capacities of existing education initiatives within the Syrian and Lebanese communities by supporting Syrian teachers, providing classrooms and enhancing teaching capacities.&nbsp;<strong style=\"box-sizing: border-box;\">Yalla! Learning Center in Aley is a bridge for the Syrian children to integrate the Lebanese formal schooling system.</strong></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">Yalla! also aims at participating to build peaceful relationships between the host and the refugee communities, notably through artistic and sportive activities.</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">&nbsp;</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><u style=\"box-sizing: border-box;\">The Project:</u></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">Yalla! opened a learning center in Aley in October 2014. Yalla! center welcomes over a hundred of Syrian refugee children, aged from 5 to 13 years old from Monday to Friday. They are taught Arabic, Mathematics, Sciences, English and French languages. Extracurricular activities (drawing, sports, theatre, photography, circus, etc.) with special focus to trauma-affected children are organized by Lebanese, Syrian and international volunteers.</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">On Saturdays, Yalla! Center opens its doors to the mothers and provides them with English and Mathematics classes, while artistic and sportive activities are providing to the children of Aley.</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">The Yalla! team works with a team composed of five Lebanese and Syrian teachers, with the support of the authorities of Aley. Everyone is committed to protecting the children&rsquo;s interests and supporting them throughout their personal, academic and civic development.</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">&nbsp;</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><u style=\"box-sizing: border-box;\">The Task:</u></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">The Director of Yalla! Learning Center will manage the Learning Center from Monday to Friday afternoon, as well as half a day on Saturdays, in cooperation with Yalla!&rsquo;s Field Coordinator.</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">Some extra-hours will be required, on a voluntary basis, to accompany the children in extra-curricular activities or prepare the center&rsquo;s events.</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">&nbsp;</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><u style=\"box-sizing: border-box;\">Qualities sought:</u></p>\n<ul style=\"box-sizing: border-box; margin: 16px 0px; padding: 0px 0px 0px 40px; list-style-type: square; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">\n<li style=\"box-sizing: border-box;\">excellent communication skills with children and patience</li>\n<li style=\"box-sizing: border-box;\">leadership and diplomacy</li>\n<li style=\"box-sizing: border-box;\">excellent organizational skills</li>\n<li style=\"box-sizing: border-box;\">being dedicated to the education of children</li>\n<li style=\"box-sizing: border-box;\">willingness to work in a multi-cultural environment</li>\n<li style=\"box-sizing: border-box;\">willingness to work in a secular and non-political environment</li>\n<li style=\"box-sizing: border-box;\">flexibility and adaptability</li>\n</ul>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">&nbsp;</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><u style=\"box-sizing: border-box;\">Qualifications sought:</u></p>\n<ul style=\"box-sizing: border-box; margin: 16px 0px; padding: 0px 0px 0px 40px; list-style-type: square; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">\n<li style=\"box-sizing: border-box;\">degree in Education Sciences</li>\n<li style=\"box-sizing: border-box;\">experience in administration of educational project and/or a solid teaching experience (particularly with young children)</li>\n<li style=\"box-sizing: border-box;\">Arabic (mother tongue)</li>\n<li style=\"box-sizing: border-box;\">English (good level)</li>\n</ul>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">&nbsp;</p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><u style=\"box-sizing: border-box;\">What we offer:</u></p>\n<ul style=\"box-sizing: border-box; margin: 16px 0px; padding: 0px 0px 0px 40px; list-style-type: square; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\">\n<li style=\"box-sizing: border-box;\">An amazing human experience with a multicultural team of dedicated volunteers</li>\n<li style=\"box-sizing: border-box;\">Trainings according to the needs of the volunteer in order to develop his skills</li>\n<li style=\"box-sizing: border-box;\">A monthly stipend</li>\n</ul>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><strong style=\"box-sizing: border-box;\">&nbsp;</strong></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><strong style=\"box-sizing: border-box;\">Interviews will be conducted on&nbsp;<u style=\"box-sizing: border-box;\">Friday September 2<span style=\"box-sizing: border-box; font-size: 10.5px; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em;\">nd</span></u>&nbsp;and on&nbsp;<u style=\"box-sizing: border-box;\">Friday September 9<span style=\"box-sizing: border-box; font-size: 10.5px; line-height: 0; position: relative; vertical-align: baseline; top: -0.5em;\">th</span></u>&nbsp;in Aley.</strong></p>\n<p style=\"box-sizing: border-box; margin: 0px 0px 24px; color: #575757; font-family: \\'Open Sans\\', Helvetica, sans-serif;\"><strong style=\"box-sizing: border-box;\">If you fulfill these requirements, please send your CV in English at this address: [email protected].</strong></p>',\n\t\t 'slug' => 'recruiting-manager',\n\t\t 'alt' => 'Alt yala! logo',\n\t\t 'summary' => 'Mission: Director of Yalla! Center in Aley Starting date : October 1st, 2016 The Association: Yalla! Pour Les Enfants is an independent, impartial and secular association established under French law in',\n\t\t 'card' => 'summary',\n\t\t 'meta_robots' => 0,\n 'meta_description' => 'We are',\n 'category_id' => 3,\n\t\t \"view\" => 1009\n\t ]);\n\n\t $post4->tags()->sync([4]);\n\n\t $post4->views()->sync([11, 12]);\n\n\t $post5 = Post::create([\n\t\t 'published' => 1,\n\t\t 'locale' => 'en',\n\t\t 'image' => 'newsletter.png',\n\t\t 'title' => 'Our last newsletter in English (September 2016)',\n\t\t 'content' => 'Dear English-speaking friends or members, click here to read our last newsletter in English.',\n\t\t 'slug' => 'last-newsletter',\n\t\t 'alt' => 'Yolo image representant alt',\n\t\t 'summary' => 'Dear English-speaking friends or members, click here to read our last newsletter in English.',\n\t\t 'card' => 'summary',\n\t\t 'meta_robots' => 0,\n 'meta_description' => 'Last update newsletter available online in english',\n 'category_id' => 3,\n\t\t 'media_id' => 3,\n\t\t \"view\" => 107\n\t ]);\n\n\t $post5->tags()->sync([3, 5]);\n\n\t $post5->views()->sync([13, 14]);\n\n\t $post6 = Post::create([\n\t\t 'published' => 1,\n\t\t 'locale' => 'ar',\n\t\t 'image' => 'compresse.jpg',\n\t\t 'title' => 'مهرجان Noz التضامن 29 أكتوبر في Poullaouen',\n\t\t 'content' => 'موقع Yalla! للأطفال يدعوك السبت 29 أكتوبر في جمع التبرعات مهرجان-Noz التي الأرباح بالكامل سيعود إلى مدرسته عاليه، وتقع في لبنان، على بعد بضعة كيلومترات من بيروت.\n\nيمكنك التمتع مواهب الموسيقيين والمطربين، ماري هيلين البارون لورينت بيغوت، يان بوولنجر، جان-دانيال Bourdonnay بيير CREPILLON، أني إبريل، Ifig FLATRES، ماري-لورنس Fustec، Riwal Fustec يان غيو Goasdoué موريس، جون بول Guyomarc\\'h جين هيرو بريجيت لو كور، يان لو كور برونو لو Manach، ماري نويل وMapihan، بيير إيف لو Panse فرانسوا Perennes، Iffig Poho مسيحي Rivoalen، الذين يرتكبون طوعا إلى الدعم موقع Yalla! للأطفال.\n\nهذا المهرجان التقليدي بريتون روح الدعابة تنتشر والود، وردد البهجة الحوار بين الثقافات من قبل يلا أدى! للأطفال الذين يعتزم لقاء من خلال مشاريع ثقافية مشتركة للمجتمع المضيف اللبناني والمجتمع المنفى السوري لبناء سلام دائم. بمشاركة نشطة من مريم سمعان، سيريل Flejou، AFD الوسطى بريتاني، بلدة Poullaouen، وبرقية، كويست، فرنسا، أسود راديو الجبل، راديو Kreiz BREIZH BREIZH عز الراديو الأزرق \"\n \\'سبيكة\\' => \\'مهرجان-Noz-التضامن-على-29-أكتوبر على بعد poullaouen',\n\t\t 'alt' => 'Yolo image representant alt',\n\t\t 'slug' => 'solidary-poullaouen',\n\t\t 'summary' => ' وتقع في لبنان، على بعد بضعة كيلومترات من بيروت.',\n\t\t 'card' => 'summary',\n\t\t 'meta_robots' => 0,\n 'meta_description' => 'وتقع في لبنان، على بعد بضعة كيلومترات من بيروت.',\n 'category_id' => 4,\n\t\t \"view\" => 457\n\t ]);\n\n\t $post6->tags()->sync([6]);\n $post6->views()->sync([14, 15]);\n\n\t $post7 = Post::create([\n\t\t 'published' => 1,\n\t\t 'locale' => 'ar',\n\t\t 'image' => 'yallapourlesenfantsweb.jpg',\n\t\t 'alt' => 'Yolo image representant alt',\n\t\t 'title' => 'المساهمين موقع Yalla! للأطفال الخميس 29 سبتمبر، 2016 في 19H في باريس',\n\t\t 'content' => 'أعزائي الأعضاء، أيها الأصدقاء الأعزاء،\n\nونحن ندعوك إلى اجتماع الجمعية العمومية السنوي للموقع Yalla! للأطفال، المقرر عقده الخميس 29 سبتمبر، 2016 في الساعة 18:30 في \"وTrockette، 125، شارع دو جيمن فير 75011 باريس والمترو بير لاشيه.\n\nوجدول الأعمال على النحو التالي:\n\nتقرير الأخلاقي،\nالتقرير المالي\nعرض الميزانية المؤقتة،\nمعلومات عن علاقة مصرفية مع بنك سوسيتيه جنرال،\nعرض مشروع المدرسة عاليه وبرنامج \"علمني أمي\"\n\nدعوة للعمل التطوعي:\n\n1 / توظيف شخص من الاتصالات العاملة يلا!\n2 / التوظيف شخص يمكن أن تستجيب لدعوات لتقديم مقترحات من الجهات المانحة،\n3 / توظيف شخص تقديم المساعدة إلى العمل الإداري،\nمسائل أخرى،\n\nهي المستندات المستخدمة في إعداد هذا الاجتماع العام المتاحة، عن طريق التعيين في مقر الجمعية خلال شهر اكتوبر تشرين الاول.\n\nشكرا منك أن ترسل لنا المشاركة عن طريق ارسال لنا المعلومات التالية:\n\nسيداتي سادتي\n\nالمشاركة في اجتماع الجمعية العمومية في الخميس سبتمبر 29، 2016\n\nلن تشارك في اجتماع الجمعية العمومية في الخميس سبتمبر 29، 2016 *\n\nتعيين بموجب:\n\n \n\n* الرجاء حذف حسب الاقتضاء\n\n \n\nمع خالص التقدير،',\n\t\t 'slug' => 'event-paris',\n\t\t 'summary' => 'الرجاء حذف حسب الاقتضاء',\n\t\t 'card' => 'summary',\n\t\t 'meta_robots' => 0,\n 'meta_description' => 'الرجاء حذف حسب الاقتضاء',\n 'category_id' => 4,\n\t\t \"view\" => 19\n\t ]);\n\n\t $post7->tags()->sync([6, 7]);\n $post7->views()->sync([16, 17]);\n\n\t $post8 = Post::create([\n\t\t 'published' => 1,\n\t\t 'locale' => 'fr',\n\t\t 'image' => 'nps2.jpg',\n\t\t 'alt' => 'Yolo image representant alt',\n\t\t 'title' => 'Les enfants à Bamako ont trouvé des dons',\n\t\t 'content' => 'Le contenu de l\\'article sur les enfants à Bamako',\n\t\t 'slug' => 'article-n-8',\n\t\t 'summary' => 'Enfants ecole de bamako',\n\t\t 'card' => 'summary',\n\t\t 'meta_robots' => 0,\n 'meta_description' => 'We are',\n 'category_id' => 1,\n\t\t \"view\" => 988\n\t ]);\n\n\t $post8->tags()->sync([1, 2]);\n $post8->views()->sync([18, 19]);\n }", "title": "" }, { "docid": "9f26b010090e29fed6c2b07ea27fa92e", "score": "0.46151486", "text": "public function store(Request $request, Venue $venue)\n {\n $this->validate($request, [\n 'name' => 'required',\n ]);\n\n $room = new Room([\n 'name' => $request->get('name'),\n 'total_area' => $request->get('total_area'),\n 'capacity' => $request->get('capacity'),\n 'venue_id' => $request->get('venue_id'),\n 'style_id' => $request->get('style_id'),\n\n ]);\n $room->save();\n\n return redirect()->route('rooms.create', $venue->id)->with('success', 'Room added successfully');\n }", "title": "" }, { "docid": "55e9fa1f4111b786960336aa0c4aa242", "score": "0.46111506", "text": "public function created(SystemRegion $systemRegion)\n {\n //\n }", "title": "" }, { "docid": "5643d2cca1177f9849131cf5e3f453f1", "score": "0.46097594", "text": "public static function newReserva($post) {\n\n //Quitamos action de $post si se manda con Ajax una acción\n array_pop($post);\n\n $consulta = \"INSERT INTO reservas (\";\n foreach($post as $key => $value) {\n $consulta .= $key.\", \";\n }\n $consulta = substr($consulta, 0, -2); //Quitamos última coma y el espacio\n $consulta .= \") VALUES (\";\n foreach($post as $key => $value) {\n $consulta .= \":\".$key.\", \";\n }\n $consulta = substr($consulta, 0, -2); //Quitamos última coma y el espacio\n $consulta .= \");\";\n\n $conexion = ConexionDB::conectar(\"reservasguli\");\n\n try {\n $stmt = $conexion->prepare($consulta);\n\n foreach($post as $key => $value) {\n $param = \":\".$key;\n $stmt->bindValue($param,$value); //Ojo aquí que es bindValue\n }\n\n $stmt->execute();\n } catch (PDOException $e){\n\t\t echo $e->getMessage();\n } \n \n ConexionDB::desconectar(); \n }", "title": "" }, { "docid": "366597913ec5722fee2f05c4f39c00ae", "score": "0.46065488", "text": "public function run()\n {\n //\n Posttype::create([\n 'name' => 'メンバー募集',\n ]);\n\n Posttype::create([\n 'name' => '相手募集',\n ]);\n }", "title": "" }, { "docid": "d1733d4f8b515365ffb3811926763e67", "score": "0.45833197", "text": "function venueList( $venue_id, $venue_token )\n{\n\tPodio::authenticate_with_app( $venue_id, $venue_token );\n\t\n\t$venueResult = PodioItem::filter( $venue_id );\n\t\n\t$venues = array();\n\t\n\tforeach ($venueResult as $v)\n\t{\n\t\t$vMod = new Venue();\n\t\t$vMod -> id = $v -> item_id;\n\t\t$vMod -> name = $v -> fields['title'] -> values;\n\t\t$vMod -> address = $v -> fields['address'] -> text;\n\t\n\t\t$venues[ $vMod -> id ] = $vMod;\n\t}\n\t\n\treturn $venues;\n}", "title": "" }, { "docid": "3e9944fe0ece1528fe7c7d6728ac635e", "score": "0.45773986", "text": "function add_event( $event ) {\n\n\t// quick and dirty way to convert multi-dimensional object to array\n\t$event = json_decode( json_encode( $event ), true );\n\n\t// check against custom id field to see if post already exists\n\t$event_id = $event['id'];\n\n\t// meta query to check if the Gid already exists\n\t$duplicate_check = new \\WP_Query( array(\n\t\t'post_type' => 'event',\n\t\t'meta_query' => array(\n\t\t\tarray(\n\t\t\t\t'key' => 'event_id',\n\t\t\t\t'value' => $event_id\n\t\t\t)\n\t\t),\n\t) );\n\n\t/*\n\t * Construct arguments to use for wp_insert_post()\n\t*/\n\t$args = array();\n\n\tif ( $duplicate_check->have_posts() ) {\n\n\t\t$duplicate_check->the_post();\n\t\t$args['ID'] = get_the_ID(); // existing post ID (otherwise will insert new)\n\n\t}\n\n\t$args['post_title'] = $event['title']; // post_title\n\t$args['post_content'] = $event['description']; // post_content\n\t// $args['post_status'] = 'draft'; // default is draft\n\t$args['post_type'] = 'event';\n\n\tif ( defined( 'WP_DEBUG' ) && WP_DEBUG ) {\n\t\t$args['post_status'] = 'publish'; // automatically publish posts on servers with debug enabled\n\t}\n\n\t/*\n\t * Create the Event and grab post id (for post meta insertion)\n\t */\n\t$post_id = wp_insert_post( $args );\n\n\t// Insert data into custom fields\n\tadd_post_meta( $post_id, 'event_id', $event['id'], true);\n\n\t// Raw data for development\n\tadd_post_meta( $post_id, 'event_raw_data', $event, true);\n\n\t// Event friendly URL\n\tadd_post_meta( $post_id, 'event_url', $event['url']['public'], true);\n\n\t// @todo use this for subject?\n\t// Set category in XX taxonomy and create if it doesn't exist\n\t// $category = $event['category'];\n\t// wp_set_object_terms( $event_id, $category, 'XX' );\n\t// Add Subjects to custom taxonomy\n\tif ( array_key_exists( 'subjects', $event ) ) {\n\t\t$subjects_array = array();\n\t\tforeach ( $event['subjects'] as $subject ) {\n\t\t\t$subjects_array[] = $subject['name'];\n\t\t}\n\t\t// Add subject name to subject taxonomy\n\t\twp_set_object_terms( $post_id, $subject['name'], 'subject' );\n\t}\n\n\tif ( $duplicate_check->have_posts() ) {\n\t\treturn \"added\";\n\t} else {\n\t\treturn \"updated\";\n\t}\n}", "title": "" }, { "docid": "c66f700fa96f436162b96b22ca54d9ef", "score": "0.4576231", "text": "public function inserirPost(Request $request){\n // $cidade->nomecidade = $request->nomecidade ; // nomecidade = id e name no formulario\n // $cidade->save(); // Biblioteca Eloquente - ORM \n\n // Somente uma linha\n // Cidade::create($request->all());\n \n // $cidade = new Cidade(['nomecidade'=>'RIO DE JANEIRO']);\n // dd($cidade);\n // dd($request->all());\n \n // Duas linhas\n // $post = new Post($request->all());\n // $post->save(); // Biblioteca Eloquente - ORM \n\n $obj_titulo = new Titulo;\n $obj_titulo->titulo = $request->titulo ; // O titulo eh a id e name no formulario\n $obj_titulo->save(); // Biblioteca Eloquente - ORM \n\n\n \n $obj_post = new Post;\n $obj_post->titulo_id = $request->titulo ; // O titulo eh a id e name no formulario\n $obj_post->save(); // Biblioteca Eloquente - ORM \n\n // return redirect()->route('consultarPostApelido');\n}", "title": "" }, { "docid": "cdfe28b85ef333f3319426aedfa371b5", "score": "0.45698017", "text": "public function run()\n {\n Post::create([\n 'title' => 'Information Technology',\n 'description' => 'Information Technology',\n 'status' => 1,\n 'created_user_id' => 1,\n 'updaed_user_id' => 1,\n ]);\n }", "title": "" }, { "docid": "4c6665515b454335a0e25de6f893aa23", "score": "0.45636195", "text": "function create_ride_post() {\n\t\t$message = array ();\n\t\t\n\t\t// get the values through post\n\t\t$access_token = $this->post ( 'access_token' );\n\t\t$rider_user_id = $this->post ( 'rider_user_id' );\n\t\t$source = $this->post ( 'source' );\n\t\t$destination = $this->post ( 'destination' );\n\t\t$price = $this->post ( 'price' );\n\t\t$depart_time = $this->post ( 'depart_on_date_time' );\n\t\t\n\t\t// call a model function to create a new wishlist in the DB.\n\t\t$create_ride = $this->riderpassenger_model->create_ride ( $access_token, $rider_user_id, $source, $destination, $price, $depart_time );\n\t\t\n\t\t// if result:1 wishlist is sucessfully created.\n\t\t// if result:0 wishlist already exists.\n\t\t// if result:2 user invalid request.\n\t\tif ($create_ride == '1') {\n\t\t\t$message ['message'] = 'ride is successfully created';\n\t\t\t$message ['status'] = true;\n\t\t}\n\t\t\n\t\t$this->response ( $message, 200 ); // send the final response array.\n\t}", "title": "" }, { "docid": "58ed10588ebca981adf1f2db3d8bc46e", "score": "0.45593977", "text": "public function store()\n\t{\n\t\t$post = new Post();\n\t\t$this->validateAndSave($post);\n\n\t}", "title": "" }, { "docid": "9201905749393e47165341ee3145d23c", "score": "0.45560333", "text": "function mc_create_event_post( $data, $event_id ) {\n\t$post_id = mc_get_event_post( $event_id );\n\tif ( ! $post_id ) {\n\t\t$categories = mc_get_categories( $event_id );\n\t\t$terms = array();\n\t\t$term = null;\n\t\t$privacy = 'publish';\n\t\tforeach ( $categories as $category ) {\n\t\t\t$term = mc_get_category_detail( $category, 'category_term' );\n\t\t\t// if any selected category is private, make private.\n\t\t\tif ( 'private' != $privacy ) {\n\t\t\t\t$privacy = ( 1 == mc_get_category_detail( $category, 'category_private' ) ) ? 'private' : 'publish';\n\t\t\t}\n\t\t\t$terms[] = (int) $term;\n\t\t}\n\n\t\t$title = $data['event_title'];\n\t\t$template = apply_filters( 'mc_post_template', 'details', $term );\n\t\t$data['shortcode'] = \"[my_calendar_event event='$event_id' template='$template' list='']\";\n\t\t$description = isset( $data['event_desc'] ) ? $data['event_desc'] : '';\n\t\t$excerpt = isset( $data['event_short'] ) ? $data['event_short'] : '';\n\t\t$location_id = ( isset( $_POST['location_preset'] ) ) ? (int) $_POST['location_preset'] : 0;\n\t\t$post_status = $privacy;\n\t\t$auth = $data['event_author'];\n\t\t$type = 'mc-events';\n\t\t$my_post = array(\n\t\t\t'post_title' => $title,\n\t\t\t'post_content' => $description,\n\t\t\t'post_status' => $post_status,\n\t\t\t'post_author' => $auth,\n\t\t\t'post_name' => sanitize_title( $title ),\n\t\t\t'post_date' => date( 'Y-m-d H:i:s', current_time( 'timestamp' ) ),\n\t\t\t'post_type' => $type,\n\t\t\t'post_excerpt' => $excerpt,\n\t\t);\n\t\t$post_id = wp_insert_post( $my_post );\n\t\twp_set_object_terms( $post_id, $terms, 'mc-event-category' );\n\t\t$attachment_id = ( isset( $_POST['event_image_id'] ) && is_numeric( $_POST['event_image_id'] ) ) ? $_POST['event_image_id'] : false;\n\t\tif ( $attachment_id ) {\n\t\t\tset_post_thumbnail( $post_id, $attachment_id );\n\t\t}\n\t\tmc_update_event( 'event_post', $post_id, $event_id );\n\t\tmc_update_event( 'event_location', $location_id, $event_id );\n\t\tdo_action( 'mc_update_event_post', $post_id, $_POST, $data, $event_id );\n\t\twp_publish_post( $post_id );\n\t}\n\n\treturn $post_id;\n}", "title": "" }, { "docid": "1bba9353c204d4f0047033248fbb1745", "score": "0.45549524", "text": "public function run()\n {\n DB::table('post')->insert(\n [\n 'title' => 'Estrategias de planeación',\n 'author' => 'Jorge Gonzalez',\n 'introduction' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'content' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'image_url' => 'seed/banner.jpg',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'site_id' => 1,\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Cómo organizar los presupuestos de oficina',\n 'author' => 'Jorge Gonzalez',\n 'introduction' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'content' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'image_url' => 'seed/banner.jpg',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'site_id' => 1,\n ]\n );\n DB::table('post')->insert(\n [\n 'title' => 'Segmentando el mercado meidante indicadores financieros de alto rendimiento',\n 'author' => 'Jorge Gonzalez',\n 'introduction' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'content' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'image_url' => 'seed/banner.jpg',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'site_id' => 1,\n ],\n );\n DB::table('post')->insert(\n [\n 'title' => 'Prueba',\n 'author' => 'Jorge Gonzalez',\n 'introduction' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'content' => 'En Icono Consultoría estamos en una constante búsqueda de herramientas que\n ayuden a las organizaciones a lograr la optimización de sus procesos,\n contribuyendo al logro de los objetivos planeado',\n 'image_url' => 'seed/banner.jpg',\n 'created_at' => date(\"Y-m-d H:i:s\"),\n 'updated_at' => date(\"Y-m-d H:i:s\"),\n 'site_id' => 1,\n ],\n );\n }", "title": "" }, { "docid": "e6113cb7c5e7db3aad2332182f8ef916", "score": "0.4551348", "text": "public function run()\n {\n collect(json_decode(file_get_contents(__DIR__.'/ecovillages.json'), true))->each(function($village) {\n $village['natural'] = is_bool($village['natural']) ? $village['natural'] : null;\n $village['green'] = is_bool($village['green']) ? $village['green'] : null;\n $village['languages'] = json_encode(array_wrap($village['languages']));\n\n DB::table('villages')->insert($village);\n });\n }", "title": "" }, { "docid": "c6b5a687cb893b261c78bfa27b83a52b", "score": "0.4549782", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'post_content' => 'required',\n 'country' => 'required'\n ]);\n \\Auth::user()->posts()->create($request->all());\n\n// return response(new PostsResource($post), 201);\n return redirect()->route('posts.create')->with('success', 'New post uploaded');\n }", "title": "" }, { "docid": "4510318d166873f201512bf22135afb9", "score": "0.45479116", "text": "public function actionCreate() {\n\t\t$model = new Post();\n\t\t$seo = new SeoTool();\n\n\t\tif ( $model->load( Yii::$app->request->post() ) && $seo->load( Yii::$app->request->post() ) ) {\n\n\t\t\t$seo->save();\n\n\t\t\t$model->seo_tool_id = $seo->id;\n\n\t\t\t$model->user_id = $this->user->id;\n\n\t\t\tif ($model->save()) {\n\t\t\t\tif ($model->images) {\n\t\t\t\t\tforeach (json_decode($model->images) as $key => $value ) {\n\t\t\t\t\t\t$image = new Image();\n\t\t\t\t\t\t$image->avatar = $value;\n\t\t\t\t\t\t$image->post_id = $model->id;\n\t\t\t\t\t\t$image->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$model->slug = FunctionHelper::slug( $model->title ) . '-' . $model->id;\n\n\t\t\t\t$model->save();\n\n\t\t\t\treturn $this->redirect( [ 'index' ] );\n\t\t\t}\n\t\t}\n\n\t\treturn $this->render( 'create', [\n\t\t\t'model' => $model,\n\t\t\t'seo' => $seo\n\t\t] );\n\t}", "title": "" }, { "docid": "6da69aafb7496e6eca7fc7445b59d01c", "score": "0.45429838", "text": "public function create()\n {\n \t$states = $this->states->getList();\n \treturn view('admin.villages.add', compact('states'));\n }", "title": "" }, { "docid": "78f2d7b86f2f07409f29126cc7b37458", "score": "0.45405298", "text": "public function venueConfigurationsAdd(Request $request)\n {\n\n $data = $request->all();\n\n if (Session::get(\"user_lvl\") == \"venue\") {\n $list = array(\n 'venue_name' => $data['dataArray']['account_id'],\n 'facebook_id' => $data['dataArray']['facebook_id'],\n 'instagram_id' => $data['dataArray']['instagram_id'],\n 'twitter_id' => $data['dataArray']['twitter_id']\n );\n } else {\n $list = array(\n 'venue_name' => $data['dataArray']['account_id'],\n 'facebook_id' => $data['dataArray']['facebook_id'],\n 'instagram_id' => $data['dataArray']['instagram_id'],\n 'twitter_id' => $data['dataArray']['twitter_id'],\n 'pointme_sender_id' => $data['dataArray']['pointme_sender_id'],\n 'sms_sender_id' => $data['dataArray']['sms_sender_id'],\n 'email_sender_id' => $data['dataArray']['email_sender_id'],\n );\n }\n\n\n $time_array = array(\n '0' => $data['dataArray']['sunday_venue'],\n '1' => $data['dataArray']['monday_venue'],\n '2' => $data['dataArray']['tuesday_venue'],\n '3' => $data['dataArray']['wednesday_venue'],\n '4' => $data['dataArray']['thursday_venue'],\n '5' => $data['dataArray']['friday_venue'],\n '6' => $data['dataArray']['saturday_venue'],\n );\n\n $is_open_array = array(\n '0' => $data['dataArray']['open_sunday'],\n '1' => $data['dataArray']['open_monday'],\n '2' => $data['dataArray']['open_tuesday'],\n '3' => $data['dataArray']['open_wednesday'],\n '4' => $data['dataArray']['open_thursday'],\n '5' => $data['dataArray']['open_friday'],\n '6' => $data['dataArray']['open_saturday'],\n );\n $days_array = array(\n '0' => 'sunday',\n '1' => 'monday',\n '2' => 'tuesday',\n '3' => 'wednesday',\n '4' => 'thursday',\n '5' => 'friday',\n '6' => 'saturday',\n );\n $venue_detail = DB::table('venues')->where('venue_id', $data['dataArray']['venue_id'])->first();\n if ($venue_detail) {\n DB::table('venues')->where('venue_id', $venue_detail->venue_id)->update($list);\n } else {\n DB::table('venues')->insertGetId($list);\n }\n\n $venue_detail = DB::table('venues')->where('venue_id', $data['dataArray']['venue_id'])->first();\n if ($venue_detail) {\n DB::table('venues')->where('venue_id', $venue_detail->venue_id)->update($list);\n $venue_detail->venue_id;\n } else {\n DB::table('venues')->insertGetId($list);\n }\n\n /* * **************Add Oprations Hours**************** */\n if (!empty($time_array) && !empty($is_open_array))\n DB::table('venue_operating_hours')->where('venue_id', '=', $data['dataArray']['venue_id'])->delete();\n foreach ($time_array as $key => $val) {\n\n $exp_time_arr = explode(';', $val);\n $open_time = $exp_time_arr[0] / 1000;\n $close_time = $exp_time_arr[1] / 1000;\n date_default_timezone_set(\"Asia/Karachi\");\n $start_time = date('Y-m-d H:i', $open_time);\n $end_time = date('Y-m-d H:i', $close_time);\n date_default_timezone_set(\"UTC\");\n DB::table('venue_operating_hours')->insertGetId(['venue_id' => $data['dataArray']['venue_id'], 'is_open' => $is_open_array[$key], 'days' => $days_array[$key], 'start_time' => $start_time, 'end_time' => $end_time, 'updated_at' => date(\"Y-m-d H:i:s\")]);\n }\n /* * **************Add Oprations Hours**************** */\n Session::flash('success_message', 'Venue confiuration Added Successfully');\n return 'success';\n }", "title": "" }, { "docid": "0df2b287115670651dce22300de9c457", "score": "0.4540498", "text": "function addVenue($Input = array())\r\n {\r\n $InsertArray = array_filter(array(\r\n 'VenueName' => @$Input['VenueName'],\r\n 'VenueIDLive' => get_guid(),\r\n 'VenueSource' => 'Manual',\r\n 'VenueAddress' => @$Input['VenueAddress'],\r\n 'VenueCity' => @$Input['VenueCity'],\r\n 'VenueCapicity' => @$Input['VenueCapicity'],\r\n 'VenueImage' => @$Input['VenueImage'],\r\n 'CreatedAt' => date('Y-m-d H:i:s')\r\n ));\r\n $this->db->insert('football_sports_venues', $InsertArray);\r\n $VenueID = $this->db->insert_id();\r\n if(!$VenueID){\r\n return FALSE;\r\n }\r\n return $VenueID;\r\n }", "title": "" }, { "docid": "589b6f14e4ecc45c05bdc542f0ec6de9", "score": "0.45378458", "text": "public function run()\n {\n DB::table('venues')->insert([\n [\n 'name' => 'Multi Alarm SE Tollaslabda Csarnok',\n 'short_name' => 'Multi',\n 'address' => '7630 Pécs, Basamalom út 33.',\n 'courts' => 9\n ],\n [\n 'name' => 'Hodos Tamás Tollaslabda Csarnok',\n 'short_name' => 'Hodos',\n 'address' => '1044 Budapest, Váci út 102.',\n 'courts' => 10\n ],\n [\n 'name' => 'Living Sport Tollaslabda Csarnok',\n 'short_name' => 'Cegléd',\n 'address' => '2700 Cegléd, Mizsei út',\n 'courts' => 9\n ]\n ]);\n }", "title": "" }, { "docid": "1f923704da10568537268dc730c2b252", "score": "0.45345938", "text": "public function crearRegion(){\n \treturn view('administrador.regiones.create');\n }", "title": "" }, { "docid": "6a9fd9e020a8d681848a33023988382b", "score": "0.4532807", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n\n 'section_id'=>'required',\n 'body'=>'required',\n 'category'=>'required',\n 'civil'=>'required',\n 'act'=>'required',\n ]);\n $post = new post();\n $post->title = $request->title;\n $post->section_id = $request->section_id;\n $post->body = $request->body;\n $category = category::find($request->category)->name;\n $post->category = $category;\n $civil = civil::find($request->civil)->civil_name;\n $post->civil =$civil;\n $act = act::find($request->act)->name;\n $post->act = $act;\n $section = section::find($request->section_id)->name;\n $post->section = $section;\n $post->reference = $request->reference;\n $post->save();\n\n\n\n Toastr::success('post successfully Created','Success');\n return redirect()->route(\"admin.post.index\");\n }", "title": "" }, { "docid": "413657368163684133751e0bd2a6db4a", "score": "0.45299995", "text": "public function store(CreatePost $request): JsonResponse\n {\n $post = $request->user()->posts()\n ->save(new Post($request->validated()));\n\n return (new PostResource($post))\n ->response()\n ->setStatusCode(201);\n }", "title": "" }, { "docid": "74a1516b1f1f55be8ff1ecc27f769ba4", "score": "0.45285735", "text": "public function run()\n {\n $s1 = Post::create([\n 'titulo'=>'rerum facil jlñj is est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit',\n 'contenido'=>'th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/f4KzA5G89zpAAKLqK5uRMNLHCSjzh14LeqwhWGXg.jpg\",\n 'titulo_en'=>'Interpretative skills are the foundation of interacting in the target',\n 'contenido_en'=>'Our services will help you build the foundation of a new language or brush up on your skills in a previously acquired language that’s been out of practice. Our targeted, goal-based teaching methodologies provide an engaging, motivating environment. Our services are facilitated by modern technology, offering both at home and on the go access Our services will help you build the foundation of a new language or brush up on your skills in a previously acquired language that’s been out of practice. Our targeted, goal-based teaching methodologies provide an engaging, motivating environment. Our services are facilitated by modern technology, offering both at home and on the go access',\n 'titulo_it'=>'Questo sito realizza la motivante possibilità di imparare nuove lingue',\n 'contenido_it'=>'Questo sito realizza la motivante possibilità di imparare nuove lingue straniere grazie a una stimolante tecnologia, disponibile sia per chi vuole acquisire le basi di una lingua che per chi desidera ampliare le conoscenze sviluppate nei percorsi scolastici Questo sito realizza la motivante possibilità di imparare nuove lingue straniere grazie a una stimolante tecnologia, disponibile sia per chi vuole acquisire le basi di una lingua che per chi desidera ampliare le conoscenze sviluppate nei percorsi scolastici'\n\n ]);\n $s1 = Post::create([\n 'titulo'=>'quasi architect jñ ñ o beatae vitae dicta sunt explicabo. Nemo eore, cum sol nihil impedit',\n 'contenido'=>' the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, \n because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences \n that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, \n because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure.\n To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of\n human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain\n  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but bec\n ause those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyo\n ne who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur \n in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes labo\n rious physical exercise, except to obtain ',\n 'imagen'=>\"upload-posts/4GnlYKHTf78DgqLk5KPJaO8yUwI4as19gjsoz8uC.jpg\",\n 'titulo_en'=>'language. We offer texts and accompanying exercises that will test your',\n 'contenido_en'=>'Interpretative skills are the foundation of interacting in the target language. We offer texts and accompanying exercises that will test your reading comprehension and improve your abilities to interpret vocabulary and cultural information in context. Exposure to authentic reading materials solidifies vocabulary recognition, provides access to varied sentence structures, and engages learners with intriguing cultural information and anecdotes. Interpretative skills are the foundation of interacting in the target language. We offer texts and accompanying exercises that will test your reading comprehension and improve your abilities to interpret vocabulary and cultural information in context. Exposure to authentic reading materials solidifies vocabulary recognition, provides access to varied sentence structures, and engages learners with intriguing cultural information and anecdotes.',\n 'titulo_it'=>'straniere grazie a una stimolante tecnologia, disponibile sia per chi vuole',\n 'contenido_it'=>'Qual è il tuo livello di comprensione di una lingua? Con il supporto del sito potrai accedere a numerosi testi e valutare la tua comprensione nella lettura grazie agli esercizi annessi Qual è il tuo livello di comprensione di una lingua? Con il supporto del sito potrai accedere a numerosi testi e valutare la tua comprensione nella lettura grazie agli esercizi annessi Qual è il tuo livello di comprensione di una lingua? Con il supporto del sito potrai accedere a numerosi testi e valutare la tua comprensione nella lettura grazie agli esercizi annessi'\n ]);\n $s1 = Post::create([\n 'titulo'=>'d quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquia dolor',\n 'contenido'=>' s est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere posth righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/fwuoNxGs7MVEbgMFN3BkrTUFDYhHmYIbcvy68r2u.jpg\",\n 'titulo_en'=>'reading comprehension and improve your abilities to interpret vocabulary',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'acquisire le basi di una lingua che per chi desidera ampliare le conoscenze',\n 'contenido_it'=>'I testi variano per il livello di difficoltà: da quelli più semplici a quelli di livello intermedio ed elevato. I primi includono articoli e racconti adatti ai principianti, composti da vocaboli di base e contraddistinti da una grammatica semplice I testi variano per il livello di difficoltà: da quelli più semplici a quelli di livello intermedio ed elevato. I primi includono articoli e racconti adatti ai principianti, composti da vocaboli di base e contraddistinti da una grammatica semplice I testi variano per il livello di difficoltà: da quelli più semplici a quelli di livello intermedio ed elevato. I primi includono articoli e racconti adatti ai principianti, composti da vocaboli di base e contraddistinti da una grammatica semplice'\n\n ]);\n\n $s1 = Post::create([\n 'titulo'=>'s est et expñkjk edita . Nam libero temporoluta nobis optio cumque nihil impedit',\n 'contenido'=>'th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/f4KzA5G89zpAAKLqK5uRMNLHCSjzh14LeqwhWGXg.jpg\",\n 'titulo_en'=>'and cultural information in context. Exposure to authentic reading',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'Qual è il tuo livello di comprensione di una lingua? Con il supporto del sito',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n $s1 = Post::create([\n 'titulo'=>'quakj kk k si architecta sunt explicabo. Nemo eore, cum sol nihil impedit',\n 'contenido'=>' the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, \n because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences \n that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, \n because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure.\n To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of\n human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain\n  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but bec\n ause those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyo\n ne who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur \n in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes labo\n rious physical exercise, except to obtain ',\n 'imagen'=>\"upload-posts/4GnlYKHTf78DgqLk5KPJaO8yUwI4as19gjsoz8uC.jpg\",\n 'titulo_en'=>'materials solidifies vocabulary recognition, provides access to varied',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'potrai accedere a numerosi testi e valutare la tua comprensione nella',\n 'contenido_it'=>' Hai inoltre la possibilità di utilizzare efficientemente questo strumento per concentrarti sui termini specifici di un dato contesto o argomento, salvando i vocaboli che vuoi approfondire nella tua lista personale Hai inoltre la possibilità di utilizzare efficientemente questo strumento per concentrarti sui termini specifici di un dato contesto o argomento, salvando i vocaboli che vuoi approfondire nella tua lista personale'\n\n ]);\n $s1 = Post::create([\n 'titulo'=>' dolores eos ñlkjjl ñl qui ratione voluptatem sequi nesciunt. Neque porro quisquia dolor',\n 'contenido'=>' s est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere posth righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/fwuoNxGs7MVEbgMFN3BkrTUFDYhHmYIbcvy68r2u.jpg\",\n 'titulo_en'=>'sentence structures, and engages learners with intriguing cultural',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'I testi variano per il livello di difficoltà: da quelli più semplici a quelli di',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n\n\n $s1 = Post::create([\n 'titulo'=>'reñlkj ñlkj kj ññlrum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit',\n 'contenido'=>'th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/f4KzA5G89zpAAKLqK5uRMNLHCSjzh14LeqwhWGXg.jpg\",\n 'titulo_en'=>'We offer a range of reading materials and text types at varied difficulty',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n $s1 = Post::create([\n 'titulo'=>'quañlkj jl lñk si architecto beatae vitae dicta sunt explicabo. Nemo eore, cum sol nihil impedit',\n 'contenido'=>' the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, \n because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences \n that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, \n because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure.\n To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of\n human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain\n  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but bec\n ause those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyo\n ne who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur \n in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes labo\n rious physical exercise, except to obtain ',\n 'imagen'=>\"upload-posts/4GnlYKHTf78DgqLk5KPJaO8yUwI4as19gjsoz8uC.jpg\",\n 'titulo_en'=>'Our vocabulary builder tool will teach language learners new vocabulary',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'consolidare il tuo lessico. Questo strumento è in grado di riconoscere le',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n $s1 = Post::create([\n 'titulo'=>'ñjlkj d quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt. Neque porro quisquia dolor',\n 'contenido'=>' s est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere posth righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/fwuoNxGs7MVEbgMFN3BkrTUFDYhHmYIbcvy68r2u.jpg\",\n 'titulo_en'=>'For learners who prefer to concentrate on specific topics, we empower you',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n\n $s1 = Post::create([\n 'titulo'=>'s estt expedita libero tempoluta nobis optiomque nihil impedit',\n 'contenido'=>'th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/f4KzA5G89zpAAKLqK5uRMNLHCSjzh14LeqwhWGXg.jpg\",\n 'titulo_en'=>'to choose one of our previously created, contextualized vocabulary lists in',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'Hai inoltre la possibilità di utilizzare efficientemente questo strumento per',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n $s1 = Post::create([\n 'titulo'=>'quasisunt expl Nemore, cum sol nihil impedit',\n 'contenido'=>' the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, \n because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences \n that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, \n because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure.\n To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of\n human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but because those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyone who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes laborious physical exercise, except to obtain\n  the master-builder of human happiness. No one rejects, dislikes, or avoids pleasure itself, because it is pleasure, but bec\n ause those who do not know how to pursue pleasure rationally encounter consequences that are extremely painful. Nor again is there anyo\n ne who loves or pursues or desires to obtain pain of itself, because it is pain, but because occasionally circumstances occur \n in which toil and pain can procure him some great pleasure. To take a trivial example, which of us ever undertakes labo\n rious physical exercise, except to obtain ',\n 'imagen'=>\"upload-posts/4GnlYKHTf78DgqLk5KPJaO8yUwI4as19gjsoz8uC.jpg\",\n 'titulo_en'=>'should be fun and accessible to everyone. We develop exercises, content',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'Offriamo gli strumenti e le risorse necessari per l',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n $s1 = Post::create([\n 'titulo'=>' di ratione volupsequi nescit. Neque porro quisquia dolor',\n 'contenido'=>' s est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere posth righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse th righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so blinded by desire, that they cannot foresee the pain and trouble that are bound to ensue; and equal blame belongs to those who fail in their duty through weakness of will, which is the same as saying through shrinking from toil and pain. These cases are perfectly simple and easy to distinguish. In a free hour, when our power of choice is untrammelled and when nothing prevents our being able to do what we like best, every pleasure is to be welcomed and every pain avoided. But in certain circumstances and owing to the claims of duty or the obligations of business it will frequently occur that pleasures have to be repudiated and annoyances accepted. The wise man therefore always holds in these matters to this principle of selection: he rejects pleasures to secure other greater pleasures, or else he endures pains to avoid worse ',\n 'imagen'=>\"upload-posts/fwuoNxGs7MVEbgMFN3BkrTUFDYhHmYIbcvy68r2u.jpg\",\n 'titulo_en'=>'As part of our teaching philosophy, we believe that language learning',\n 'contenido_en'=>'Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language. Our vocabulary builder tool will teach language learners new vocabulary while reviewing previously instructed words to encourage mastery. Our aims are to learn efficiently. As such, our process establishes a basis of key vocabulary, recognizes words you already know, and targets the words that require repeated use and more practice. Using this method, you will continue to solidify your vocabulary acquisition in the target language.',\n 'titulo_it'=>'concentrarti sui termini specifici di un dato contesto o argomento,',\n 'contenido_it'=>'A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci A tua disposizione troverai lo strumento lessicale per espandere e consolidare il tuo lessico. Questo strumento è in grado di riconoscere le parole e concentrarsi su di esse, consentendo di focalizzarsi sui termini più importanti e su quelli che ancora non conosci'\n\n ]);\n\n \n \n \n }", "title": "" }, { "docid": "09f375fe967671d9b42618bb9c95f857", "score": "0.4528433", "text": "public function store(PostStoreRequest $request)\n {\n $post= Post::create($request->all());\n //Image\n if($request->file('file')){\n $path= Storage::disk('public')->put('image',$request->file('file'));\n\n $post->fill(['file'=>asset($path)])->save();//asse... crea la ruta completa donde se guarda laimage\n }\n //tags\n\n $post->tags()->attach($request->get('tags'));//syc: sincroniza la relacion que hay entre post y etiquetas //evalua para saber si la relacion esta \n\n\n return redirect()->route('posts.edit',$post->id)//redireciona y envia el id de la etiqueta que recien se creo\n ->with('info','Entrada creada con éxito');\n }", "title": "" }, { "docid": "cb1771c5eee57044bf4f8fdebceea557", "score": "0.4527842", "text": "public function getVenue();", "title": "" }, { "docid": "cf61087b7aee2485c998e5d2d8eba759", "score": "0.4524732", "text": "private static function make_post() {\n $post = array(\n 'post_title' => __('WP Router Placeholder Page', 'wp-router'),\n 'post_status' => 'publish',\n 'post_type' => self::POST_TYPE,\n );\n $id = wp_insert_post($post);\n if ( is_wp_error($id) ) {\n return 0;\n }\n return $id;\n }", "title": "" }, { "docid": "b6869560172c5b892bdc5d2009fde6c6", "score": "0.45232993", "text": "public function create()\n {\n //\n return view('master.region.create');\n \n }", "title": "" }, { "docid": "32292ea316931032f03e3002ec4ac591", "score": "0.4523265", "text": "public function store(CreateRegionRequest $request)\n {\n $input = $request->all();\n\n $region = $this->getRepositoryObj()->create($input);\n if ($region instanceof Exception) {\n return redirect()->back()->withInput()->withErrors(['error', $region->getMessage()]);\n }\n\n Flash::success(__('messages.saved', ['model' => __('models/regions.singular')]));\n\n return redirect(route('base.regions.index'));\n }", "title": "" }, { "docid": "3040825a8faded96cfd7c48cbe5b6b7c", "score": "0.45214158", "text": "public function postCreate()\r\n\t{\r\n\t\t// Declare the rules for the form validation\r\n\t\t$rules = array(\r\n\t\t\t'name' => 'required|min:3',\r\n\t\t\t'address' => 'required|min:3'\r\n\t\t);\r\n\r\n\r\n\t\t// Create a new validator instance from our validation rules\r\n\t\t$validator = Validator::make(Input::all(), $rules);\r\n\r\n\t\t// If validation fails, we'll exit the operation now.\r\n\t\tif ($validator->fails())\r\n\t\t{\r\n\t\t\t// Ooops.. something went wrong\r\n\t\t\t// return Redirect::back()->withInput()->withErrors($validator);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$slug = e(Str::slug(Input::get('name')));\r\n\t\t$place = Place::where('slug', $slug)->first();\r\n\r\n\t\t// if(!is_null($place))\r\n\t\t// {\r\n\t\t// \treturn $place->toJson();\r\n\t\t// } else {\r\n\t\t// \tif(!Sentry::check())\r\n\t\t// \t\treturn 'Place dont exist!';\r\n\t\t// }\r\n\r\n\t\tif(is_null($place)) {\r\n\t\t\t$place = new Place;\r\n\t\t\t$place->name \t\t= e(Jinput::get('name'));\r\n\t\t\t$place->slug \t\t= $slug;\r\n\t\t\t$place->gid \t\t= e(Input::get('gid'));\r\n\t\t\t$place->parent_id \t= e(Input::get('parent_id'));\r\n\t\t\t$place->address \t= e(Input::get('address'));\r\n\t\t\t$place->country \t= e(Input::get('country'));\r\n\t\t\t$place->lat \t\t= e(Input::get('lb'));\r\n\t\t\t$place->lng \t\t= e(Input::get('mb'));\r\n\t\t\t$place->type \t\t= e(Input::get('type'));\r\n\t\t\t$place->url \t\t= e(Input::get('url'));\r\n\t\t\t$place->follows \t= 0;\r\n\t\t\t$place->status \t\t= \"open\";\r\n\t\t\t$place->user_id \t= Sentry::getId();\r\n\t\t\t$place->save();\r\n\t\t} else {\r\n\t\t\t$place->lat \t\t = e(Input::get('lb'));\r\n\t\t\t$place->lng \t\t = e(Input::get('mb'));\r\n\t\t\t$place->search_count = $place->search_count + 1;\r\n\t\t\t$place->parent_id \t = e(Input::get('parent_id'));\r\n\t\t\t$place->save();\r\n\t\t}\r\n\t\treturn $place->toJson();\r\n\t}", "title": "" }, { "docid": "a6e300c69b568a3787805ddb9e02078e", "score": "0.45197496", "text": "public function create()\n { \n $region = Region::all();\n $this->viewData = array(\n 'region' => $region\n );\n return view ( 'admin.city.create', $this->viewData );\n }", "title": "" }, { "docid": "9cab980e1117fbd4805905f1d56d975f", "score": "0.45196152", "text": "public function store(Request $request, Venue $venue)\n {\n\n //add an event to a venue\n //$venue->addVenue(request('event_type')); \n // Event::create(request(['venue_id', 'event_type']));\n $venue = Venue::find($venue->id);\n $event = new Event;\n $event->event_type = request('event_type');\n $event->user_id = Auth::id();\n $event->venue_id = $venue->id;\n $event->date = request('date');\n $event->head_count = request('head_count');\n $event->message = request('message');\n //Save it to the database\n $event->save();\n //dd($event);\n \n //send an email to the owner about the booking on request\n //$user = Auth::user();\n //\\Mail::to($venue->user)->send(new RequestVenue($user));\n\n //flash message. Thankyou for booking. We will get back to you in a jiffy!\n\n session()->flash('message', 'Thanks for the quote. Owners will get back to you in a jiffy!');\n //And then redirect to the previous page\n return redirect('/sms/send/{to}');\n }", "title": "" } ]
3cb57d300048148099e5339af7223650
Get the read preference for this database
[ { "docid": "18f1fcb870172e748dc46c8faf9e3fd8", "score": "0.8063661", "text": "public function getReadPreference()\n {\n }", "title": "" } ]
[ { "docid": "53a5c1acae18ab26f0578257a1352eee", "score": "0.8394219", "text": "public function getReadPreference();", "title": "" }, { "docid": "7c5c8f9cae366fbf9225b8cdd2fc4746", "score": "0.82071406", "text": "public function getReadPreference () {}", "title": "" }, { "docid": "7c5c8f9cae366fbf9225b8cdd2fc4746", "score": "0.82071406", "text": "public function getReadPreference () {}", "title": "" }, { "docid": "7c5c8f9cae366fbf9225b8cdd2fc4746", "score": "0.82071406", "text": "public function getReadPreference () {}", "title": "" }, { "docid": "7c5c8f9cae366fbf9225b8cdd2fc4746", "score": "0.82071406", "text": "public function getReadPreference () {}", "title": "" }, { "docid": "7c5c8f9cae366fbf9225b8cdd2fc4746", "score": "0.82071406", "text": "public function getReadPreference () {}", "title": "" }, { "docid": "7c5c8f9cae366fbf9225b8cdd2fc4746", "score": "0.82071406", "text": "public function getReadPreference () {}", "title": "" }, { "docid": "7c5c8f9cae366fbf9225b8cdd2fc4746", "score": "0.82071406", "text": "public function getReadPreference () {}", "title": "" }, { "docid": "38d5697c893c5cb53a7ee8fe5be06bed", "score": "0.81213695", "text": "public function getReadPreference() {\n \treturn $this->mongoClient->getReadPreference();\n }", "title": "" }, { "docid": "ebddfc5c2790e1138500fd71294338d3", "score": "0.81011957", "text": "public function getReadPreference()\n {\n return $this->mongoCursor->getReadPreference();\n }", "title": "" }, { "docid": "b86e962772158f8915d3b13dbd9a5cc8", "score": "0.66781336", "text": "public function getReadPdo()\n {\n if ($this->transactions >= 1) {\n return $this->getPdo();\n }\n return $this->readPdo ?: $this->getPdo();\n }", "title": "" }, { "docid": "ff65a1c6b93a897ad1806d583f5a6390", "score": "0.65557325", "text": "public function getReadConnection()\n {\n if (static::$readAdapter === NULL) {\n static::$readAdapter = $this->getConnection(self::DB_CONNECTION_READ);\n }\n\n return static::$readAdapter;\n }", "title": "" }, { "docid": "e8114709833f085a97903e0e9ff0631b", "score": "0.6409261", "text": "public function getReadReplicasSettings()\n {\n return $this->read_replicas_settings;\n }", "title": "" }, { "docid": "66b3a34c127cd2d7809d69e252e1a94d", "score": "0.64029557", "text": "public function getReadCheck()\n {\n return $this->readCheck;\n }", "title": "" }, { "docid": "3de1825440d754809459f08330dd435e", "score": "0.63415813", "text": "public function getReadConnection()\r\n\t{\r\n\t\treturn $this->_readConnection;\r\n\t}", "title": "" }, { "docid": "22c6a4309e7d63e6bed60b94b944d165", "score": "0.62312186", "text": "public function getRead()\n {\n return $this->_ldap;\n }", "title": "" }, { "docid": "e05cbbfdb978bdf4d01d91b355a31769", "score": "0.6144242", "text": "public function getReadAccessFromForeignTable(){\n\t\t\treturn $this->read_access_from_foreign_table;\n\t\t}", "title": "" }, { "docid": "97025d03394991021c3fe7936f9bfa02", "score": "0.61436355", "text": "public function getPreference()\n {\n return isset($this->preference) ? $this->preference : null;\n }", "title": "" }, { "docid": "e7b2af2379496ec1c0ab3359e2deca82", "score": "0.601125", "text": "public function getReadClient()\n {\n return $this->getReadPdo();\n }", "title": "" }, { "docid": "4e00cbd86d6da421ad039f8f28612433", "score": "0.5780987", "text": "public function getReadOptions()\n {\n return $this->read_options;\n }", "title": "" }, { "docid": "4e00cbd86d6da421ad039f8f28612433", "score": "0.5780987", "text": "public function getReadOptions()\n {\n return $this->read_options;\n }", "title": "" }, { "docid": "366a35fe6bfae57fe7f3c0360b2c001b", "score": "0.57472163", "text": "public function getPreference() {\n try {\n $response = $this->sendRequest(\"getPreference\", array(\"ticket\" => $this->getTicket()));\n }\n catch (SMSGlobalException $e) {\n return false;\n }\n return $response[\"preference\"];\n }", "title": "" }, { "docid": "674c2d5e9ef39cc09d5fa3538d20a51a", "score": "0.5699775", "text": "public function getMarkRead()\n {\n return $this->getProperty('read');\n }", "title": "" }, { "docid": "19647a021a0aadcc1018bf78e62cf338", "score": "0.56989235", "text": "public function getSettingsRecord()\n {\n $item = UserPreference::forUser();\n $record = $item\n ->scopeApplyKeyAndUser($this->model, $this->recordCode, $item->userContext)\n ->remember(1440, $this->getCacheKey())\n ->first();\n\n return $record ?: null;\n }", "title": "" }, { "docid": "55df3c7dbc297b1d497de955be5ec7a2", "score": "0.56706816", "text": "public function getReadAttribute($read)\n {\n return (int) $read;\n }", "title": "" }, { "docid": "774cbda161f5804626502c68d8dbb507", "score": "0.5659789", "text": "public static function getReadPdo()\n {\n //Method inherited from \\Illuminate\\Database\\Connection\n return \\Illuminate\\Database\\MySqlConnection::getReadPdo();\n }", "title": "" }, { "docid": "741db8e247e3f9470085262594e8c958", "score": "0.5580583", "text": "public function read() {\n\t\tif ((bool) $this->_resource) return mysql_fetch_array($this->_resource);\n\t\telse return false;\n\t}", "title": "" }, { "docid": "97d3c4d6dac3ed948d6e22ee2c3438da", "score": "0.55774415", "text": "public function getReadScope();", "title": "" }, { "docid": "429674c1ba4ef225eb32739e825af7cb", "score": "0.5563271", "text": "public static function getReadPdo()\n { //Method inherited from \\Illuminate\\Database\\Connection \n /** @var \\Illuminate\\Database\\MySqlConnection $instance */\n return $instance->getReadPdo();\n }", "title": "" }, { "docid": "e4089052abf04dfdb5ce7060b4bc23d8", "score": "0.5553546", "text": "public function setReadPreference ($read_preference, array $tags = null) {}", "title": "" }, { "docid": "e4089052abf04dfdb5ce7060b4bc23d8", "score": "0.5553546", "text": "public function setReadPreference ($read_preference, array $tags = null) {}", "title": "" }, { "docid": "e4089052abf04dfdb5ce7060b4bc23d8", "score": "0.5553546", "text": "public function setReadPreference ($read_preference, array $tags = null) {}", "title": "" }, { "docid": "e4089052abf04dfdb5ce7060b4bc23d8", "score": "0.5553546", "text": "public function setReadPreference ($read_preference, array $tags = null) {}", "title": "" }, { "docid": "e4089052abf04dfdb5ce7060b4bc23d8", "score": "0.5553546", "text": "public function setReadPreference ($read_preference, array $tags = null) {}", "title": "" }, { "docid": "e4089052abf04dfdb5ce7060b4bc23d8", "score": "0.5553546", "text": "public function setReadPreference ($read_preference, array $tags = null) {}", "title": "" }, { "docid": "e4089052abf04dfdb5ce7060b4bc23d8", "score": "0.5553546", "text": "public function setReadPreference ($read_preference, array $tags = null) {}", "title": "" }, { "docid": "3dfc5d2fa58c1dd6fcadbfafe185f250", "score": "0.55105114", "text": "protected function get_db_connection_settings ($database_id, $read_query) {\n\t\t$Config = Config::instance();\n\t\t$Core = Core::instance();\n\t\t/**\n\t\t * Choose right mirror depending on system configuration\n\t\t */\n\t\t$is_mirror = false;\n\t\t$mirror_index = $this->choose_mirror($database_id, $read_query);\n\t\tif ($mirror_index === self::MASTER_MIRROR) {\n\t\t\tif ($database_id == 0) {\n\t\t\t\t$database_settings = [\n\t\t\t\t\t'type' => $Core->db_type,\n\t\t\t\t\t'name' => $Core->db_name,\n\t\t\t\t\t'user' => $Core->db_user,\n\t\t\t\t\t'password' => $Core->db_password,\n\t\t\t\t\t'host' => $Core->db_host,\n\t\t\t\t\t'prefix' => $Core->db_prefix\n\t\t\t\t];\n\t\t\t} else {\n\t\t\t\t$database_settings = $Config->db[$database_id];\n\t\t\t}\n\t\t} else {\n\t\t\t$database_settings = $Config->db[$database_id]['mirrors'][$mirror_index];\n\t\t\t$is_mirror = true;\n\t\t}\n\t\treturn [\n\t\t\t$database_settings,\n\t\t\t$is_mirror\n\t\t];\n\t}", "title": "" }, { "docid": "198c758204f0172ec064ac4559717b22", "score": "0.55025864", "text": "public function getPersistentMode()\n {\n return $this->persistent_mode;\n }", "title": "" }, { "docid": "cdec84905dbd2dca1f4e0922412957a4", "score": "0.550152", "text": "function readOnlySettingsCheck()\n {\n return $this->ReadOnlySettingsCheck;\n }", "title": "" }, { "docid": "58e3966894cb57076544a041313e86f1", "score": "0.5499586", "text": "private function isReadMode()\n {\n return $this->mode === self::READ;\n }", "title": "" }, { "docid": "910ea65941c22e15cef33087d8dd5fc8", "score": "0.5475451", "text": "public function getReadOnly()\n {\n return $this->readOnly;\n }", "title": "" }, { "docid": "f7d2b7f2d8aea42e4bc062b1ff0c9617", "score": "0.54467046", "text": "public function getReadConnection() : ExtendedPdoInterface\n {\n return $this->table->getReadConnection();\n }", "title": "" }, { "docid": "66fa824dbd5c343438eb53a266ddcd9a", "score": "0.544197", "text": "public function getPreferences()\n {\n return $this->{ 'get' . $this->_getPreferenceClassName() . 's' }();\n }", "title": "" }, { "docid": "e41780f53af16d05398882210413758b", "score": "0.54361033", "text": "public function getReadWorkflowSettings()\n {\n return $this->reply->readWorkflowSettingsReturn->workflowSettings;\n }", "title": "" }, { "docid": "54bb2d1ab63c3e2e4bfce0f9ec4e5cd7", "score": "0.5398159", "text": "public function getReadOnly()\n {\n return isset($this->read_only) ? $this->read_only : false;\n }", "title": "" }, { "docid": "5851e3e0c7785ec9e7ea44c19c440925", "score": "0.5394013", "text": "public function setReadPreference($readPreference, array $tags = null);", "title": "" }, { "docid": "d3234ad21b9955be19eff2f809ab1866", "score": "0.53679657", "text": "public function read()\n {\n // select all query\n $query = \"SELECT * FROM \" . $this->table . \"WHERE NOT `role` = 0\";\n // getquery statement\n return parent::getQuery($query);\n }", "title": "" }, { "docid": "2748ebcea00c8d053e25d714723d0eca", "score": "0.5367235", "text": "public function getReadOnly(){\n\t\treturn $this->read_only;\n\t}", "title": "" }, { "docid": "3129737768991bc2c19241cd6a6a5609", "score": "0.5366087", "text": "public function getReader()\n {\n return $this->orm['reader'];\n }", "title": "" }, { "docid": "9b692228ebb29c2b7b18246fa45dca24", "score": "0.5362969", "text": "public function getFetchMode()\n {\n return $this->_master->getFetchMode();\n }", "title": "" }, { "docid": "cd781a4638d36407dd397e1e88e26147", "score": "0.53559583", "text": "public function getReadCheckOf($name)\n {\n $session = parent::offsetGet($name);\n if (!is_array($session)) {\n return null;\n }\n\n return $session['readCheck'];\n }", "title": "" }, { "docid": "158ee2a51642d7452414a472a18997d7", "score": "0.5338686", "text": "public function preference()\n {\n return $this->post($this->env.'/assinaturas/v1/users/preferences/retry');\n }", "title": "" }, { "docid": "8a4657ac26b2477145a07ae70025f353", "score": "0.5322604", "text": "public function getRead(string $name = \"\"): ConnectionInterface\n {\n return $this->getConnection(\"read\", $name);\n }", "title": "" }, { "docid": "204b76a7af2c08718b3a0983973b20b7", "score": "0.53028136", "text": "function getReadOnly()\n {\n return $this->readonly;\n }", "title": "" }, { "docid": "841cde7ca3e49eec9d2e86a583455d8f", "score": "0.52582264", "text": "private function getDbConnection()\n {\n if ($this->connection) {\n return $this->connection;\n }\n $this->connection = Mage::getSingleton('core/resource')->getConnection('core_read');\n\n return $this->connection;\n }", "title": "" }, { "docid": "bc802f12605b466649e1aa41d4584010", "score": "0.52462715", "text": "function readfromDatabase() {\n }", "title": "" }, { "docid": "f816a0f9c55634303c1727ad28d540d6", "score": "0.5245473", "text": "public function read()\n\t{\n\t\tif ($this->storage !== null)\n\t\t{\n\t\t\treturn $this->storage->read();\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f531a73ed4389dea26e8958602ac0096", "score": "0.5238673", "text": "public function getUserReadStatusAttribute()\n {\n if (!$this->old && auth()->check()) {\n if (is_null($this->reader)) {\n return self::STATUS_UNREAD;\n }\n\n return ($this->updatedSince($this->reader)) ? self::STATUS_UPDATED : false;\n }\n\n return false;\n }", "title": "" }, { "docid": "0af2441317fca12a54661bc9f73d3cde", "score": "0.5205115", "text": "private function getPreferences() {\n\t\t$this->preference = diy_get_model_data(Preference::class);\n\t}", "title": "" }, { "docid": "33e9e3e4154f3a67997dbde79d7d6470", "score": "0.519797", "text": "public function isRead() {\n\t\t$notification = Notification::where('reply_id', '=', $this->id)->where('user_id', '=', Auth::user()->id)->first();\n\t\treturn ($notification->has_read == 1) ? 1 : 0;\n\t}", "title": "" }, { "docid": "bcf903560540516551eb4c7bdfea4ae2", "score": "0.5196828", "text": "public function readOne()\n {\n // Se hace la consullta para llevar a cabo la acción\n $sql = 'SELECT id_cliente, nombre_cliente, apellido_cliente, correo_cliente, dui_cliente, telefono_cliente, fecha_nacimiento_cliente, direccion_cliente, estado_cliente\n FROM clientes\n WHERE id_cliente = ?';\n $params = array($this->id);\n return Database::getRow($sql, $params);\n }", "title": "" }, { "docid": "11fe40a624a30111cab12478cf787fac", "score": "0.519418", "text": "public function getFetchMode ()\n {\n return $this->adapter->getFetchMode();\n }", "title": "" }, { "docid": "0e6806182fcc2bbbf01d2c9c01d90a0b", "score": "0.51938725", "text": "public function getRead() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "4f8ed97902800f95fe9c5a805139c841", "score": "0.5184848", "text": "public function getPreferences()\r\n {\r\n return $this->preferences;\r\n }", "title": "" }, { "docid": "c5691ad7d39e2148aa3fcb8e644307da", "score": "0.5179814", "text": "public function readOnly()\n {\n return $this->config(['readOnly' => true]);\n }", "title": "" }, { "docid": "947cd0ca3606ee62018a022dddd2a0b8", "score": "0.5162117", "text": "protected function choose_mirror ($database_id, $read_query = true) {\n\t\t$Config = Config::instance(true);\n\t\t/**\n\t\t * $Config might be not initialized, so, check also for `$Config->core`\n\t\t */\n\t\tif (\n\t\t\t!@$Config->core['db_balance'] ||\n\t\t\t!isset($Config->db[$database_id]['mirrors'][0])\n\t\t) {\n\t\t\treturn self::MASTER_MIRROR;\n\t\t}\n\t\t$mirrors_count = count($Config->db[$database_id]['mirrors']);\n\t\t/**\n\t\t * Main db should be excluded from read requests if writes to mirrors are not allowed\n\t\t */\n\t\t$selected_mirror = mt_rand(\n\t\t\t0,\n\t\t\t$read_query && $Config->core['db_mirror_mode'] == self::MIRROR_MODE_MASTER_SLAVE ? $mirrors_count - 1 : $mirrors_count\n\t\t);\n\t\t/**\n\t\t * Main DB assumed to be in the end of interval, that is why `$select_mirror < $mirrors_count` will correspond to one of available mirrors,\n\t\t * and `$select_mirror == $mirrors_count` to master DB itself\n\t\t */\n\t\treturn $selected_mirror < $mirrors_count ? $selected_mirror : self::MASTER_MIRROR;\n\t}", "title": "" }, { "docid": "2c35aa43659f2e86f02dbab0db0f3902", "score": "0.5151365", "text": "public function Read() {\n return $this->Collection[$this->GetCurrentIndex()];\n }", "title": "" }, { "docid": "5ecb66c4d19934ba6d9ef9fb1137ee34", "score": "0.5150321", "text": "public function getPreferences()\n {\n return $this->preferences;\n }", "title": "" }, { "docid": "231c39ede21cb0df6f5effacb39f580f", "score": "0.5142562", "text": "public function getProStoresPreference()\n {\n return $this->proStoresPreference;\n }", "title": "" }, { "docid": "ed84341daebcbbd06208951b750ef58a", "score": "0.51340514", "text": "public function defaultFetchMode()\n {\n $cls = self::$ext . strtoupper( bcDB::resource( 'EXTENSION' ) );\n return $cls::getAttribute( 'default_fetch_mode' );\n }", "title": "" }, { "docid": "757fb81b436fe5921db807111328a994", "score": "0.51325375", "text": "public static function getRawReadPdo()\n { //Method inherited from \\Illuminate\\Database\\Connection \n /** @var \\Illuminate\\Database\\MySqlConnection $instance */\n return $instance->getRawReadPdo();\n }", "title": "" }, { "docid": "871b9830e0e90754d9a2dd6e8b157e5f", "score": "0.51294184", "text": "public function getPreferLevel()\n {\n return $this->preferLevel;\n }", "title": "" }, { "docid": "8cd21fa626b1485b4597186f474cdb8d", "score": "0.51242507", "text": "public function get($key) {\n return $this->readconnection->get($key);\n }", "title": "" }, { "docid": "dd986baaebace0afc85c2cb7560b073c", "score": "0.5122508", "text": "protected function get_db_cache() {\n\t\t\treturn get_option( $this->get_cache_id(), array() );\n\t\t}", "title": "" }, { "docid": "1bcf2463b426959b50f3bc4163406af7", "score": "0.51203424", "text": "public function setReadPreference($read_preference, $tags = array())\n {\n }", "title": "" }, { "docid": "417f97e84d3e8db3dd6944aaff19be43", "score": "0.51155466", "text": "function getPrefsMapping()\n {\n SGL::logMessage(null, PEAR_LOG_DEBUG);\n $query = \"\n SELECT preference_id, name\n FROM {$this->conf['table']['preference']}\";\n $aRes = $this->dbh->getAssoc($query);\n if (!PEAR::isError($aRes)) {\n return array_flip($aRes);\n } else {\n return $aRes;\n }\n }", "title": "" }, { "docid": "d5e3f292723424c8883ff107effcadd3", "score": "0.5103225", "text": "function readLanguage() { return $this->_language; }", "title": "" }, { "docid": "7f3a68170403487fbc949565d497cf4a", "score": "0.5078268", "text": "public function fetch_preferences()\n {\n $q = $this->EE->db->get_where($this->table_name, array('site_id' => $this->EE->config->item('site_id')));\n if($q->num_rows() > 0)\n {\n $arr = $q->result_array();\n $this->preferences = $arr[0];\n }\n }", "title": "" }, { "docid": "59d17d8906e7fa26408a1e217e5a7454", "score": "0.5067016", "text": "public function get() {\n if(Validator::isa($this->con,\"null\")) $this->open();\n return $this->con;\n }", "title": "" }, { "docid": "b9bec458cb7f231dfa741304430cbbf7", "score": "0.5066856", "text": "function setting() {\n return \\App\\Models\\Settings::orderBy('id', 'desc')->first();\n }", "title": "" }, { "docid": "4cbea35e7c356c73175dc48a51c834af", "score": "0.5062415", "text": "public function getReader()\n {\n return $this->hasOne(Reader::className(), ['id' => 'reader_id']);\n }", "title": "" }, { "docid": "ea1f77416d6dd391b070c320770eafb3", "score": "0.5052798", "text": "public function getIsRead() : ?bool;", "title": "" }, { "docid": "2582bec6188716664d17f171ce6d69cf", "score": "0.50304353", "text": "public function getMode()\n {\n return $this->get(self::MODE);\n }", "title": "" }, { "docid": "632ef3a11fbf40040bc791054d7227b7", "score": "0.5024732", "text": "function getprop() {\n\t\t$conn = new Gamedb();\n\t\tif (!$conn->connect()) {\n\t\t\tdie('Error: ' . mysqli_error($conn));\n\t\t}\n\t\t$sql=\"SELECT * FROM armies WHERE ArmyID = '$this->aid'\";\n\t\treturn $conn->select($sql)[\"0\"];\n\t\t$conn->close();\n\t}", "title": "" }, { "docid": "a7bcf77d78e067d22d0076f59d10c6e8", "score": "0.50169176", "text": "function readDataSource() { return $this->_datasource; }", "title": "" }, { "docid": "e65552187f9183fcd8f14d089c9329ed", "score": "0.50103205", "text": "public function getRw()\n {\n return isset($this->rw) ? $this->rw : 0;\n }", "title": "" }, { "docid": "22de6681532f751dd7c1666d48222eb0", "score": "0.50044006", "text": "public function getFetchMode()\n {\n return $this->_fetchMode;\n }", "title": "" }, { "docid": "22de6681532f751dd7c1666d48222eb0", "score": "0.50044006", "text": "public function getFetchMode()\n {\n return $this->_fetchMode;\n }", "title": "" }, { "docid": "a3718c4c0679688f5528a5a89175dd36", "score": "0.5003976", "text": "public function getDbSettings()\n {\n return $this->_dbSettings;\n }", "title": "" }, { "docid": "7d3b2757e7c628efbc1bb1ff103507d1", "score": "0.500064", "text": "public function readonly()\n {\n return $this->readOnly;\n }", "title": "" }, { "docid": "8c48d15297b9e2e4a2eb9672a9f1705c", "score": "0.49791688", "text": "public function readOnly()\n\t{\n\t\treturn $this->_readOnly;\n\t}", "title": "" }, { "docid": "afd7b8b7f2dc5ca4e224bbb07c995387", "score": "0.49615905", "text": "public function readByDatabaseName($dbname)\n {\n return $this->repository->findOneByDbname($dbname);\n }", "title": "" }, { "docid": "f01ea843305889f943b1e0619c204e75", "score": "0.49541715", "text": "public function getStaleReadOnly()\n {\n return $this->readOneof(3);\n }", "title": "" }, { "docid": "2d20e4644a552f08c1c77bd89408fe99", "score": "0.49502647", "text": "public function getReadWorkflow()\n {\n return $this->reply->readWorkflowInformationReturn->workflow;\n }", "title": "" }, { "docid": "b4c8fef0741135dd59787f041aa831ce", "score": "0.49444777", "text": "public function get_database()\n {\n return $this->database ?: Config::read('config')['application']['database'];\n }", "title": "" }, { "docid": "8e74c764de829b99f0c3f9b59bf659df", "score": "0.49443808", "text": "public static function getDatabase()\n {\n return self::$databases['database'];\n }", "title": "" }, { "docid": "a15bc0e0af22896100c1e9c5fd425514", "score": "0.49397212", "text": "private function read()\r\n\t{\r\n\t\t$this->enableLocalUserAdministration($this->storage->get('lua_enabled',$this->isLocalUserAdministrationEnabled()));\r\n\t\t$this->restrictUserAccess($this->storage->get('lua_access_restricted',$this->isUserAccessRestricted()));\r\n\t}", "title": "" }, { "docid": "9f74bcf604e07e4d31a8464e28a40b94", "score": "0.49354187", "text": "function getLockDatabase()\n\t{\n\t\treturn $this->lock_database;\n\t}", "title": "" }, { "docid": "9a9e5ad0505b48c1e5c5b67585c33177", "score": "0.49296457", "text": "public function getSqlMode()\n {\n return $this->dbResultFetchOneRowOnly(\n $this->simpleQuery(\"SELECT @@sql_mode AS sql_mode\"))['sql_mode'];\n }", "title": "" }, { "docid": "a3eac097bf266e03a5d0da24580e516b", "score": "0.4929407", "text": "public static function read($key)\n {\n return self::$adapter->read($key);\n }", "title": "" } ]
9bbad4532c0f892c5dd11ee34a985de4
Get providers and regions
[ { "docid": "abf598f27cae686c734bc6ddc97e8dda", "score": "0.0", "text": "private function getShippingProviderPrice(ShippingGroup $configuration, $providerIdent, $countryId) {\n $providerIndex = $configuration->getProviderIndex($providerIdent);\n if ($providerIndex === null) {\n // Provider not found\n return null;\n }\n $arRegionsSelected = $configuration->getRegions();\n $arCountryGroups = (array_key_exists(\"country_group\", $arRegionsSelected) ? $arRegionsSelected[\"country_group\"] : array());\n $arCountries = (array_key_exists(\"country\", $arRegionsSelected) ? $arRegionsSelected[\"country\"] : array());\n $arRegions = $this->getRegionList($configuration, $arCountryGroups, $arCountries);\n // Prepare price fallback\n $arPriceFallback = array(null);\n // Add region rows\n foreach ($arRegions as $regionIndex => $regionData) {\n $arResult = array();\n // Remove obsolete fallbacks\n array_splice($arPriceFallback, $regionData[\"NS_LEVEL\"]);\n // Get current price\n $priceCurrent = null;\n if (array_key_exists(\"ID_COUNTRY\", $regionData)) {\n $priceCurrent = $configuration->getProviderPriceForCountry($providerIdent, $regionData[\"ID_COUNTRY\"]);\n }\n if (array_key_exists(\"ID_COUNTRY_GROUP\", $regionData)) {\n $priceCurrent = $configuration->getProviderPriceForCountryGroup($providerIdent, $regionData[\"ID_COUNTRY_GROUP\"]);\n }\n $priceCurrentFinal = ($priceCurrent === null ? $arPriceFallback[ $regionData[\"NS_LEVEL\"]-1 ] : $priceCurrent);\n // Store as fallback for child categories\n $arPriceFallback[ $regionData[\"NS_LEVEL\"] ] = $priceCurrentFinal;\n // Check for target region\n if (array_key_exists(\"ID_COUNTRY\", $regionData) && ($regionData[\"ID_COUNTRY\"] == $countryId)) {\n // Return result\n return ($priceCurrentFinal >= 0 ? $priceCurrentFinal : null);\n }\n }\n return null;\n }", "title": "" } ]
[ { "docid": "c9dd54cbed27f72724d5fafacc5ffbda", "score": "0.7708287", "text": "public function getProviders();", "title": "" }, { "docid": "778a160940c37cb3dcee1253174091dd", "score": "0.7436383", "text": "public function getRegions()\n {\n //echo time2s().\"eh.getRegions()\\n\";\n return $this->client->gatherCached(\n $this->client->getRootEndpoint()->regions->href,\n function ($region) {\n return static::parseTrailingIdFromUrl($region->href);\n },\n null,\n static::REGION_COLLECTION_REPRESENTATION\n );\n }", "title": "" }, { "docid": "c4d70fbd37dbb22dd82c3cc5cd338607", "score": "0.7214816", "text": "public function getRegions() {\n $curl = new Curl();\n $apiUrl = $this->getApiUrl();\n $fullUrl = $apiUrl . 'regions';\n $header = $this->getHeader();\n $regions = $curl->curlGet($fullUrl,$header);\n return $regions;\n }", "title": "" }, { "docid": "aebe12b0b3f47023dfc27dfa4bc25523", "score": "0.7150662", "text": "protected function getRegions() {\n\t\t$this->progress->setMessage(\"Fetching regions...\");\n\t\t$this->progress->advance();\n\t\t$ec2client = new Ec2Client([\n\t\t\t'version' => 'latest',\n\t\t\t'region' => getenv('AWS_DEFAULT_REGION'),\n\t\t]);\n\t\treturn $ec2client->describeRegions()->search('Regions[].RegionName');\n\t}", "title": "" }, { "docid": "492967371e2d8c6e90d85892b3eedcac", "score": "0.7146545", "text": "public function get_providers(){\n\n\t\treturn $this->providers;\n\n\t}", "title": "" }, { "docid": "d8e8920ba77ff6aed26c0151342ed595", "score": "0.71062595", "text": "public function getProviders()\n {\n return static::$providers;\n }", "title": "" }, { "docid": "dc621d8aef53975bc45d8a946f6df8c5", "score": "0.70296115", "text": "public function getRegions()\n {\n return $this->scopeConfig->getValue('carriers/express/regions', ScopeInterface::SCOPE_STORE);\n }", "title": "" }, { "docid": "08023c9dded374d1c3e62b9770a9132d", "score": "0.7005489", "text": "public function registeredProviders()\n {\n return Setting::lists('provider');\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.69952166", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.69952166", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.69952166", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.69952166", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.69952166", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "da1597cf104ee6f44e48b94cd873dcdb", "score": "0.69952166", "text": "public function getProviders()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "2ce9fcd45239c40e1c8aa5bee00ffcaa", "score": "0.6933577", "text": "public function get_cloud_providers() {\n\t\treturn apply_filters( 'wpcd_get_cloud_providers', self::$providers );\n\t}", "title": "" }, { "docid": "c86d5921bfaeaca4a415c98d95baa7c5", "score": "0.6858432", "text": "protected function loadProviders()\n {\n return [\n 'Bitbucket',\n 'Facebook',\n 'Google',\n 'GitHub',\n 'Linkedin',\n 'Twitter',\n 'Xing',\n\n ];\n }", "title": "" }, { "docid": "576fa57daa6a4c440de3ec498b29cb34", "score": "0.6820532", "text": "public function providers()\n {\n return $this->providers;\n }", "title": "" }, { "docid": "fb9bb9f8f5fafdb9730336f2e740585e", "score": "0.6812593", "text": "protected function get_provider_list() {\n\t\t\treturn array_keys( $this->config );\n\t\t}", "title": "" }, { "docid": "c1dc66c3651f85d20ecaa6a4ec652a1c", "score": "0.6776119", "text": "public function get_regions()\n\t{\n\t\tglobal $db;\n\n\t\t$query = \"SELECT * FROM `{$cfg['db']['prefix']}regions`\";\n\t\t$db->connect();\n\t\t$result = $db->query($query);\n\t\t$db->close();\n \n\t\twhile($row = $result->fetch_array())\n {\n $res[] = $row;\n }\n \n\t\treturn $res;\n\t}", "title": "" }, { "docid": "425e3aa106cf792ee2694cd2c2f48341", "score": "0.66959995", "text": "public function getRegions()\n {\n return $this->regions;\n }", "title": "" }, { "docid": "425e3aa106cf792ee2694cd2c2f48341", "score": "0.66959995", "text": "public function getRegions()\n {\n return $this->regions;\n }", "title": "" }, { "docid": "a45cfecfa467a068bdc9b996469b4bfd", "score": "0.66723055", "text": "function provider_config(): array\n {\n return config('providers');\n }", "title": "" }, { "docid": "a6d344504f6cef97533d9d9302d7d05a", "score": "0.6660872", "text": "public function getSocialProviders();", "title": "" }, { "docid": "2355c901ab603a331e1e548fc07845c1", "score": "0.66232866", "text": "public function getProviders() {\n $this->setJSONHeaders();\n $providers = $this->UserAccount->find('all', array(\n 'conditions' => array(\n 'UserAccount.role_id' => array(\n EMR_Roles::PHYSICIAN_ROLE_ID,\n EMR_Roles::PHYSICIAN_ASSISTANT_ROLE_ID,\n EMR_Roles::NURSE_PRACTITIONER_ROLE_ID,\n EMR_Roles::REGISTERED_NURSE_ROLE_ID,\n ),\n ),\n ));\n \n $data = array();\n \n foreach ($providers as $p) {\n $data[] = array(\n 'user_id' => $p['UserAccount']['user_id'],\n 'full_name' => $p['UserAccount']['full_name'],\n 'role' => $p['UserRole']['role_desc'],\n );\n }\n \n echo json_encode($data);\n \n $this->__cleanUp();\n exit;\n }", "title": "" }, { "docid": "1330102507a819f877ca79d13a68b42d", "score": "0.6610679", "text": "public function providers()\n {\n return array_keys($this->_providers);\n }", "title": "" }, { "docid": "52c19fe2b01d5c0300b2b2f1cf1ac3a7", "score": "0.65991074", "text": "public function getRegions() {\n return $this->regions;\n }", "title": "" }, { "docid": "0b880566b63e0aad958086e84ee67617", "score": "0.6594489", "text": "public function get_all()\n {\n return Region::get();\n }", "title": "" }, { "docid": "e2a0e24142f9b2595333f48050ac45f8", "score": "0.6583979", "text": "function get_available_providers()\n{\n $repo = new ProviderRepository;\n\n return $repo->getAvailable();\n}", "title": "" }, { "docid": "ab7323bb362c6a3713e44cf8a950b5f3", "score": "0.6578106", "text": "public function getRegions() {\n $url = $this->buildUrl( AGENT_API_AREA );\n\n $response = $this->get( $url )->getResponse();\n \n // Make sure there are some results to display\n if( !isset( $response['meta'] ) ) return null;\n \n $response = $response['meta']['areas'];\n \n return $response;\n }", "title": "" }, { "docid": "460e6c03bd1ae927a41c6ea4568bd6d1", "score": "0.6560834", "text": "public function getRegions()\n {\n return $this->_getRegionsHash('Regions');\n }", "title": "" }, { "docid": "0a6a17bdd1dd3270adaee5f502c3aa82", "score": "0.65568227", "text": "public static function get_regions() {\n global $DB;\n\n $regions = array();\n if ($options = $DB->get_field('user_info_field', 'param1', array('shortname' => 'region'))) {\n $regions = explode(\"\\n\", $options);\n }\n return $regions;\n }", "title": "" }, { "docid": "c5a5a15de8f76539e3b7f3aaeef8447d", "score": "0.65532625", "text": "public function providers() \n\t\t{\n\t\t\t$response = $this->curl_get('https://noembed.com/providers');\n\t\t\treturn json_decode($response);\n\t\t}", "title": "" }, { "docid": "0ff1f829495cc144dc37c2d7dfb3a69b", "score": "0.65382093", "text": "public function getProvider();", "title": "" }, { "docid": "0ff1f829495cc144dc37c2d7dfb3a69b", "score": "0.65382093", "text": "public function getProvider();", "title": "" }, { "docid": "0ff1f829495cc144dc37c2d7dfb3a69b", "score": "0.65382093", "text": "public function getProvider();", "title": "" }, { "docid": "c1cf8b2cea95a90535df5d237a12e4bb", "score": "0.6513469", "text": "public function get_provider_selectors() {\n\n\t\t\t$providers = ava_smart_filters()->providers->get_providers();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $providers as $provider_id => $provider ) {\n\t\t\t\tif ( $provider->get_wrapper_selector() ) {\n\t\t\t\t\t$result[ $provider_id ] = array(\n\t\t\t\t\t\t'selector' => $provider->get_wrapper_selector(),\n\t\t\t\t\t\t'action' => $provider->get_wrapper_action(),\n\t\t\t\t\t\t'inDepth' => $provider->in_depth(),\n\t\t\t\t\t\t'idPrefix' => $provider->id_prefix(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result;\n\n\t\t}", "title": "" }, { "docid": "0ebb808937a6db1d60dd0ea2e67d8dd4", "score": "0.65093386", "text": "public function get_provider_selectors() {\n\n\t\t\t$providers = jet_smart_filters()->providers->get_providers();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $providers as $provider_id => $provider ) {\n\t\t\t\tif ( $provider->get_wrapper_selector() ) {\n\t\t\t\t\t$result[ $provider_id ] = array(\n\t\t\t\t\t\t'selector' => $provider->get_wrapper_selector(),\n\t\t\t\t\t\t'action' => $provider->get_wrapper_action(),\n\t\t\t\t\t\t'inDepth' => $provider->in_depth(),\n\t\t\t\t\t\t'idPrefix' => $provider->id_prefix(),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $result;\n\n\t\t}", "title": "" }, { "docid": "16b9ea2e01c2a1ce24a984ee20ec904a", "score": "0.64691496", "text": "function init_providers() {\r\n\r\n $_ci =& get_instance();\r\n\r\n $_ci->load->model('auth/OAuth2_model');\r\n\r\n $data = $_ci->OAuth2_model->get_all();\r\n\r\n if ($data) {\r\n require APPPATH . 'vendor/PHPLeague-OAuth2/autoload.php';\r\n\r\n $i=0;\r\n foreach ($data as $row) {\r\n $_ci->load->library('OAuth2/'. $row->name);\r\n $data['providers'][strtolower($row->name)]['url'] = $_ci->{strtolower($row->name)}->loadProviderClass($row);\r\n $data['providers'][strtolower($row->name)]['name'] = $row->name;\r\n $_SESSION[strtolower($row->name) .'state'] = $_ci->{strtolower($row->name)}->getState();\r\n $i++;\r\n }\r\n\r\n return $data;\r\n }\r\n\r\n return array();\r\n }", "title": "" }, { "docid": "c0eb4ccb4f31081c552cda6ef4af15b9", "score": "0.6417988", "text": "public function content_providers() {\n\n\t\t\t$providers = ava_smart_filters()->providers->get_providers();\n\t\t\t$result = array();\n\n\t\t\tforeach ( $providers as $provider_id => $provider ) {\n\t\t\t\t$result[ $provider_id ] = $provider->get_name();\n\t\t\t}\n\n\t\t\treturn $result;\n\n\t\t}", "title": "" }, { "docid": "aed9c4cf37e8096dc7ba47e6483d7f50", "score": "0.6410437", "text": "public function getLoadedProviders()\n {\n return $this->loadedProviders;\n }", "title": "" }, { "docid": "c870044408d7bb37108aff0099f0931c", "score": "0.64034426", "text": "public static function getAllRegions()\n {\n return self::$_regionList;\n }", "title": "" }, { "docid": "44a631edd9f13e10ca7b49691c42e92f", "score": "0.6401271", "text": "public function getAllRegions()\n {\n return Region::orderBy('name')->get();\n }", "title": "" }, { "docid": "64588eb34548eb46c5d9ebcc704aa9be", "score": "0.638779", "text": "public function getAllRegions() {\n\t\treturn $this->region->all();\n\t}", "title": "" }, { "docid": "12a5a64b4a13f51aef767796cd37e5a0", "score": "0.63803136", "text": "public function listProviders()\n {\n\n return $this->providers = array_diff( $this->providers, $this->registeredProviders() );\n }", "title": "" }, { "docid": "1eb4cf96d769772a4ba606413b05ad14", "score": "0.6340031", "text": "public function get_regions(){\n\t\ttry{\n\t\t\t$res = $this->client->get(\n\t\t\t\tsprintf( \n\t\t\t\t\t\"%s?country_id=%s&count=%s&access_token=%s\",\n\t\t\t\t\t$this->_get_method('get_regions'),\n\t\t\t\t\t$this->country,\n\t\t\t\t\t$this->count,\n\t\t\t\t\t$this->token\n\t\t\t\t)\n\t\t\t);\n\t\t} catch ( \\GuzzleHttp\\Exception\\ClientException $e ){\n\t\t\treturn false;\n\t\t}\n\t\treturn json_decode( $res->getBody() );\n\t}", "title": "" }, { "docid": "abb2598b95c8fbeeb1e650c2436f3e2b", "score": "0.6338274", "text": "public function getAll()\n {\n return DB::table('regions')->get()->all();\n }", "title": "" }, { "docid": "10e93cb876c71d3aec700269850a113d", "score": "0.6306746", "text": "public function getRegions()\n {\n return Region::getCollection($this->apiUrl() . '/regions', 0, [], $this->getConnector()->getClient());\n }", "title": "" }, { "docid": "9a28b259c779501a783fa2c8542bf756", "score": "0.6299144", "text": "public function getLoadedProviders(): array\n {\n return $this->loadedProviders;\n }", "title": "" }, { "docid": "c6be55a661180202a15cfb001b188d75", "score": "0.62885916", "text": "public static function GetRegions()\n\t\t{\n\t\t\t//requete\n\t\t\t$sql = 'CALL get_regions()';\n\t\t\t//excution et renvoie le resultat\n\t\t\treturn DatabaseHandler::GetAll($sql);\n\t\t}", "title": "" }, { "docid": "d7c24a1fc036571eb38a65e32baeaea7", "score": "0.62762994", "text": "public function providers(): array\n\t{\n\t\treturn array_keys($this->managers);\n\t}", "title": "" }, { "docid": "d830e5dddf60a334627c8ae121d9161d", "score": "0.6267475", "text": "public function loadedProviders()\n {\n $loadedProviders = $this->reflectLoadedProviders();\n return $loadedProviders->getValue($this->app);\n }", "title": "" }, { "docid": "5eb2e5dac2e7e5d8202652909277a62f", "score": "0.62635195", "text": "public function getRegionsAllowed();", "title": "" }, { "docid": "a4e7453afba336386eee9aae5ddcac1f", "score": "0.62601805", "text": "public function Regions()\r\n {\r\n return $this->arrRegions;\r\n }", "title": "" }, { "docid": "782804ab0c89c4c3e951f6954be3cac0", "score": "0.625388", "text": "public function inspectProvider()\n {\n return [\n 'user' => [\n 'user',\n TypesRegistry::SINGLE_OBJECT,\n ],\n 'users' => [\n 'users',\n TypesRegistry::OBJECTS_LIST,\n ],\n 'role' => [\n 'role',\n TypesRegistry::SINGLE_RESOURCE,\n ],\n 'roles' => [\n 'roles',\n TypesRegistry::RESOURCES_LIST,\n ],\n 'guatavo' => [\n 'gustavo',\n false,\n ],\n ];\n }", "title": "" }, { "docid": "7be48dc0f4b9ec6b0f7dc507343f7b49", "score": "0.62434876", "text": "public function retrieveAllProvider()\n {\n return [\n [1, 20, 30],\n [2, 2, 20],\n [3, 4, 12]\n ];\n }", "title": "" }, { "docid": "ea36c3c0e6b49406bee9b7f3bb5156f7", "score": "0.6223709", "text": "public static function getRegions()\n {\n return array(\n 'BE-BRU' => _t('BelgianGeoUtils.BEBRU', 'Bruxelles-Capitale'),\n 'BE-VLG' => _t('BelgianGeoUtils.BEVLG', 'Vlaanderen'),\n 'BE-WAL' => _t('BelgianGeoUtils.BEWAL', 'Wallonie'),\n );\n }", "title": "" }, { "docid": "b76466df3e75e37a8a7401f14d449c15", "score": "0.62137675", "text": "public function provides()\n {\n return [self::PROVIDER_NAME];\n }", "title": "" }, { "docid": "95e906c82d80cbcb4f22e2a3cb84ab12", "score": "0.6209304", "text": "public static function getAllProviders() {\n return array_keys(self::getProviderRequirements());\n }", "title": "" }, { "docid": "ce8c073b0c81ea33aaf99a3f29233951", "score": "0.62013847", "text": "public function foundProvider()\n {\n return [\n ['/foo', '/foo', '/'],\n ['foo', '/foo', '/'],\n ['/foo', '/foo/bar', '/bar'],\n ['/foo/bar', '/foo/bar', '/'],\n ['foo/bar', '/foo/bar', '/'],\n ['/foo/bar', '/foo/bar/zet', '/zet'],\n ['/f', '/f/foo', '/foo'],\n ['f', '/f/foo', '/foo'],\n ];\n }", "title": "" }, { "docid": "03913708bfb01002d31621057f9184d6", "score": "0.6199893", "text": "public function providerSet() {\n return [\n ['FOO', 'BAR'],\n ['FOO', NULL],\n ];\n }", "title": "" }, { "docid": "1d6abe63189a4d19554f672110c1fc1f", "score": "0.6193", "text": "public function getAcceptedProviders()\n {\n return [\n 'bitbucket',\n 'facebook',\n 'google',\n 'github',\n 'linkedin',\n 'twitter',\n ];\n }", "title": "" }, { "docid": "9a9fc2fa9d389f9fa3c2cf3b66c847b7", "score": "0.61876345", "text": "abstract public function getProvider();", "title": "" }, { "docid": "cf734d528082a12ccfefeedee8e25652", "score": "0.61799204", "text": "public function listProviders()\n {\n if ($this->providers === null)\n $this->loadProviders();\n\n return $this->providers;\n }", "title": "" }, { "docid": "c137bad64fe8fe8610f43def50c80c9d", "score": "0.61785656", "text": "function getRegion();", "title": "" }, { "docid": "117260f2329854c726f96cc0b0dba8cf", "score": "0.6169829", "text": "public static function getProviders()\n\t{\n\t\t$iterator = new \\DirectoryIterator(__DIR__ . '/../providers');\n\t\tforeach ($iterator as $item) {\n\t\t\tif ($item->isFile() && 'Basic.php' !== $item->getFilename() && 'php' === $item->getExtension()) {\n\t\t\t\t$providers[] = self::getProviderInstance($item->getBasename('.php'), '');\n\t\t\t}\n\t\t}\n\t\treturn $providers;\n\t}", "title": "" }, { "docid": "58727e66212f9316a21435a8a412f756", "score": "0.61678773", "text": "public function provides()\n\t{\n\t\t$providers = array();\n\t\tforeach ($this->providers as $key => $value) {\n\t\t\t$providers[] = $key;\n\t\t}\n\t\treturn $providers;\n\t}", "title": "" }, { "docid": "62fd4c6bb3de454486fe1c279e15935d", "score": "0.61627865", "text": "function getRegions($int_uid = null, $int_country_id = null)\n {\n printf(\"getRegions: This function is not implemented yet.\\n\");\n }", "title": "" }, { "docid": "a540efe17affdeee254ec749dcb372aa", "score": "0.61542153", "text": "public function content_providers() {\n\n\t\t\t$providers = jet_smart_filters()->providers->get_providers();\n\t\t\t$result = array(\n\t\t\t\t'' => esc_html__( 'Select...', 'jet-smart-filters' ),\n\t\t\t);\n\n\t\t\tforeach ( $providers as $provider_id => $provider ) {\n\t\t\t\t$result[ $provider_id ] = $provider->get_name();\n\t\t\t}\n\n\t\t\treturn $result;\n\n\t\t}", "title": "" }, { "docid": "487dc619c7238cce0c79696515754982", "score": "0.61487347", "text": "public function providerGet() {\n return [\n ['FOO', 'BAR'],\n ['FOO', NULL],\n ];\n }", "title": "" }, { "docid": "7683172117ffdd9c585121152fa38569", "score": "0.6147582", "text": "function c24_regions() {\n return array(\n 'East Midlands',\n 'East of England',\n 'London',\n 'North East',\n 'North West',\n 'Northern Ireland',\n 'Scotland',\n 'South East',\n 'South West',\n 'Wales',\n 'West Midlands',\n 'Yorkshire',\n );\n}", "title": "" }, { "docid": "5efd0df0511e5f4db10e58228a2dd345", "score": "0.61454564", "text": "public function getProvider()\n {\n return $this->getData('config/provider');\n }", "title": "" }, { "docid": "042a3ac77a354c447b8cab28af94eda0", "score": "0.6139122", "text": "public function regions() {\n $parentId = $this->request->query('parent_id');\n if (empty($parentId)) {\n $regions = $this->regionService->getAllRegions();\n } else {\n $regions = $this->regionService->getSubRegions($parentId);\n }\n\n return json_encode($regions);\n }", "title": "" }, { "docid": "502e0add3ef28fb5f4d5c8c1c7735316", "score": "0.6132335", "text": "public static function getRegions()\n {\n // Los lenguages soportados por la aplicación\n \n $regions = array('Catalunya', 'Madrid', 'Canarias');\n\n return $regions[array_rand($regions)];\n }", "title": "" }, { "docid": "eed06acd2c9bf7444af1ddc9e5daddd5", "score": "0.6107742", "text": "public static function getProviderSettings(): array\n {\n return self::$providerSettings;\n }", "title": "" }, { "docid": "12351d6563ff67ed11c09d8310d06fc1", "score": "0.6096768", "text": "public function GetProviders() {\n $Providers = JsConnectPlugin::GetProvider();\n $JsConnectProviders = array();\n foreach ($Providers as $Provider) {\n $Data = $Provider;\n $Target = Gdn::Request()->Get('Target');\n if (!$Target)\n $Target = '/'.ltrim(Gdn::Request()->Path());\n\n if (StringBeginsWith($Target, '/entry/signin'))\n $Target = '/';\n\n $ConnectQuery = array('client_id' => $Provider['AuthenticationKey'], 'Target' => $Target);\n $Data['Target'] = Url('entry/jsconnect', TRUE);\n if(strpos($Data['Target'],'?') !== FALSE) {\n $Data['Target'] .= '&'.http_build_query($ConnectQuery);\n } else {\n $Data['Target'] .= '?'.http_build_query($ConnectQuery);\n }\n $Data['Target'] = urlencode($Data['Target']);\n $Data['Name'] = Gdn_Format::Text($Data['Name']);\n $Data['SignInUrl'] = FormatString(GetValue('SignInUrl', $Provider, ''), $Data);\n $JsConnectProviders[] = $Data;\n }\n return empty($JsConnectProviders) ? FALSE: $JsConnectProviders;\n }", "title": "" }, { "docid": "de82be1a0d658e0e54762993321a7f5d", "score": "0.6087325", "text": "private function _loadProviders()\n {\n if($this->_providersLoaded)\n {\n return;\n }\n\n\n // providers\n\n foreach($this->getProviderSources() as $providerSource)\n {\n $lcHandle = strtolower($providerSource->getHandle());\n\n $record = $this->_getProviderRecordByHandle($providerSource->getHandle());\n\n $provider = Oauth_ProviderModel::populateModel($record);\n $provider->class = $providerSource->getHandle();\n\n\n // source\n\n if($record && !empty($provider->clientId))\n {\n // client id and secret\n\n $clientId = false;\n $clientSecret = false;\n\n // ...from config\n\n $oauthConfig = craft()->config->get('oauth');\n\n if($oauthConfig)\n {\n\n if(!empty($oauthConfig[$providerSource->getHandle()]['clientId']))\n {\n $clientId = $oauthConfig[$providerSource->getHandle()]['clientId'];\n }\n\n if(!empty($oauthConfig[$providerSource->getHandle()]['clientSecret']))\n {\n $clientSecret = $oauthConfig[$providerSource->getHandle()]['clientSecret'];\n }\n }\n\n // ...from provider\n\n if(!$clientId)\n {\n $clientId = $provider->clientId;\n }\n\n if(!$clientSecret)\n {\n $clientSecret = $provider->clientSecret;\n }\n\n // source\n $providerSource->initProviderSource($clientId, $clientSecret);\n $provider->setSource($providerSource);\n $this->_configuredProviders[$lcHandle] = $provider;\n }\n else\n {\n $provider->setSource($providerSource);\n }\n\n $this->_allProviders[$lcHandle] = $provider;\n }\n\n $this->_providersLoaded = true;\n }", "title": "" }, { "docid": "2dd010e6ee5ac131097853daafe45a4b", "score": "0.60687894", "text": "function snax_slog_get_providers() {\n\t$folder_uri = trailingslashit( snax()->css_url ) . 'snaxicon/svg/';\n\n\t$providers = array(\n\t\t'Facebook' => array(\n\t\t\t'name' => 'Facebook',\n\t\t\t'icon' => $folder_uri . 'ue00a-facebook.svg',\n 'keys' => array( 'id', 'secret' ),\n\t\t),\n\t\t'Google' => array(\n\t\t\t'name' => 'Google',\n\t\t\t'icon' => $folder_uri . 'ue081-google.svg',\n 'keys' => array( 'id', 'secret' ),\n\t\t),\n\t\t'Twitter' => array(\n\t\t\t'name' => 'Twitter',\n\t\t\t'icon' => $folder_uri . 'ue00b-twitter.svg',\n 'keys' => array( 'id', 'secret' ),\n\t\t),\n\t\t'Instagram' => array(\n\t\t\t'name' => 'Instagram',\n\t\t\t'icon' => $folder_uri . 'ue029-instagram.svg',\n 'keys' => array( 'id', 'secret' ),\n\t\t),\n\t\t'LinkedIn' => array(\n\t\t\t'name' => 'LinkedIn',\n\t\t\t'icon' => $folder_uri . 'ue080-linkedin.svg',\n 'keys' => array( 'id', 'secret' ),\n\t\t),\n\t\t'Vkontakte' => array(\n\t\t\t'name' => 'VKontakte',\n\t\t\t'icon' => $folder_uri . 'ue02e-vk.svg',\n 'keys' => array( 'id', 'secret' ),\n\t\t),\n 'Odnoklassniki' => array(\n 'name' => 'Odnoklassniki',\n 'icon' => $folder_uri . 'ue082-odnoklassniki.svg',\n 'keys' => array( 'id', 'key', 'secret' ),\n ),\n\n//\t\t'AOLOpenID',\n//\t\t'Blizzard',\n//\t\t'Disqus',\n//\t\t'GitHub',\n//\t\t'OpenID',\n//\t\t'Spotify',\n//\t\t'SteemConnect',\n//\t\t'WordPress',\n//\t\t'Amazon',\n//\t\t'BlizzardAPAC',\n//\t\t'Dribbble',\n//\t\t'GitLab',\n//\t\t'Mailru',\n//\t\t'Paypal',\n//\t\t'StackExchange',\n//\t\t'Tumblr',\n//\t\t'WeChat',\n//\t\t'Yahoo',\n//\t\t'Authentiq',\n//\t\t'BlizzardEU',\n//\t\t'MicrosoftGraph',\n//\t\t'PaypalOpenID',\n//\t\t'StackExchangeOpenID',\n//\t\t'TwitchTV',\n//\t\t'WeChatChina',\n//\t\t'YahooOpenID',\n//\t\t'BitBucket',\n//\t\t'Discord',\n//\t\t'Foursquare',\n//\t\t'Reddit',\n//\t\t'Steam',\n//\t\t'WindowsLive',\n//\t\t'Yandex',\n\t);\n\n\treturn apply_filters( 'snax_slog_providers', $providers );\n}", "title": "" }, { "docid": "8e107e50074a14490a1bde7ecbe1a434", "score": "0.6065049", "text": "function snax_slog_get_active_providers() {\n\treturn (array) get_option( 'snax_slog_active_providers', array() );\n}", "title": "" }, { "docid": "2b3ae8abde7fb5fcacbe3755817833c6", "score": "0.60439026", "text": "public function registerConfiguredProviders();", "title": "" }, { "docid": "b8fd66eafab41027ab8781459f506e2f", "score": "0.6023785", "text": "public function getRegion();", "title": "" }, { "docid": "b8fd66eafab41027ab8781459f506e2f", "score": "0.6023785", "text": "public function getRegion();", "title": "" }, { "docid": "0355c7adeb70e645fb0dd8fa3ef5b3b6", "score": "0.6000638", "text": "function getAWSGeneralSettings() {\n\t$db = getDBConnection();\n\t\n\ttry {\n\t\t$result = $db->query(sprintf(\"select * from martini_general_aws_config\"));\t\n\t\t\n\t\tif ($result->rowCount() != '0') {\n\t\t\tforeach ($result as $row) {\n\t\t\t\t$provider = new stdClass();\n\t\t\t\t$provider->region = $row['region'];\n\t\t\t\t$provider->accesskey = $row['accesskey'];\n\t\t\t\t$provider->secretkey = $row['secretkey'];\n\t\t\t}\n\t\t\t\n\t\t\treturn $provider;\n\t\t}\n\t} catch (PDOException $ex) {\n\t\tprint \"Got error\";\n\t\tprint var_dump($ex);\n\t}\n}", "title": "" }, { "docid": "ad99c24657cc31f2167919d3f5e40b5e", "score": "0.6000067", "text": "function getAllRegions() {\n global $pdo;\n\n // Prepare SQL statement to select all regions\n $stmt = $pdo->prepare(\"SELECT region_id AS id, region_name AS name\n \t\t\t\t\t FROM region\");\n\n // Execute SQL statement\n $stmt->execute();\n\n // Return the results\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "4a0bc3e254fd31b57bbc9625388cb864", "score": "0.59949857", "text": "public function list_all_regions(){\n\t\t$regions = [];\n\t\t$r = Zones::orderBy(\"id\", \"desc\")->get();\n\t\tforeach ($r as $key => $value) {\n\t\t\t$x = json_decode($value->regions);\n\t\t\tforeach ($x as $z) {\n\t\t\t\tarray_push($regions, $z);\n\t\t\t}\n\t\t}\n\t\treturn [\"success\"=>true, \"response\"=>$regions];\n\t}", "title": "" }, { "docid": "58d0feabe5bfd3d8b2f53688e107af0b", "score": "0.598659", "text": "public function getRegion()\n {\n if (!in_array($this->session->userdata('user_level_8'), $this->common->csiUserRole())) {\n redirect('auth');\n }\n\n $divisionId = $this->input->get('id');\n $rows = $this->common->find('csi_region', 'division_id', $divisionId, 'region_name');\n echo json_encode($rows);\n }", "title": "" }, { "docid": "07bae72c5fbcbefb1d0cedb8ad083bc0", "score": "0.5986587", "text": "public function getOAuthProviders()\n {\n return [\n 'Dukt\\OAuth\\Providers\\Bitbucket',\n 'Dukt\\OAuth\\Providers\\Dribbble',\n 'Dukt\\OAuth\\Providers\\Facebook',\n 'Dukt\\OAuth\\Providers\\Github',\n 'Dukt\\OAuth\\Providers\\Google',\n 'Dukt\\OAuth\\Providers\\Instagram',\n 'Dukt\\OAuth\\Providers\\Linkedin',\n 'Dukt\\OAuth\\Providers\\Twitter',\n 'Dukt\\OAuth\\Providers\\Vimeo'\n ];\n }", "title": "" }, { "docid": "31b39c39eec774ef15be61ca13640f43", "score": "0.5980604", "text": "public static function collect(): array\n {\n return self::$providers;\n }", "title": "" }, { "docid": "0c6a54ded82e312e931392104d53bf21", "score": "0.5979338", "text": "public static function getAllRegion()\n \t{\n \t\t$region = DB::table('REGION')\n \t\t\t\t\t->select('REGION.*')\n \t\t\t\t\t->get();\n \t\treturn $region;\n \t}", "title": "" }, { "docid": "bba0b32dbf89b11d602e19f1f6caa0d0", "score": "0.5977843", "text": "public function providerCollection();", "title": "" }, { "docid": "84f7692b3e9a2927a8451f73ec54bdad", "score": "0.5941358", "text": "public function authProviders()\n {\n $providers = AuthProviders::select(['name', 'callback_url'])->get();\n\n return response()->json([\n \"status\" => HTTPMessages::SUCCESS,\n \"data\" => $providers\n ]);\n }", "title": "" }, { "docid": "ef619a265d612d80a89acf2544dee68c", "score": "0.5936935", "text": "function fetch_regions() {\n\t\t$stmt = $this->_conn->query(\"select name from regions\");\n\t\t$result = $stmt->fetchAll(PDO::FETCH_COLUMN, 'name');\n\t\t$stmt = null;\n\t\treturn $result;\n\t }", "title": "" }, { "docid": "a33aca54d66c08e5d7741658d16b2dc8", "score": "0.59310955", "text": "function wp_get_sitemap_providers() {\n\t$sitemaps = wp_sitemaps_get_server();\n\treturn $sitemaps->registry->get_providers();\n}", "title": "" }, { "docid": "a714dc6357e2484e181617364528bee6", "score": "0.59280354", "text": "public function provides()\n {\n return ['countries'];\n }", "title": "" }, { "docid": "a714dc6357e2484e181617364528bee6", "score": "0.59280354", "text": "public function provides()\n {\n return ['countries'];\n }", "title": "" }, { "docid": "51970c9483d4950bddec0c742ef13c31", "score": "0.5919004", "text": "public static function getAllowedProviders()\n {\n return [\n self::FAKER_PROVIDER_PREFIX_PATH . self::DEFAULT_LOCALE . '\\Person',\n self::FAKER_PROVIDER_PREFIX_PATH . 'Payment',\n self::FAKER_PROVIDER_PREFIX_PATH . self::DEFAULT_LOCALE . '\\Address',\n self::FAKER_PROVIDER_PREFIX_PATH . self::DEFAULT_LOCALE . '\\PhoneNumber',\n self::FAKER_PROVIDER_PREFIX_PATH . 'Internet',\n self::FAKER_PROVIDER_PREFIX_PATH . 'DateTime'\n ];\n }", "title": "" }, { "docid": "6cca2440385d46d1b21809d85914b3c9", "score": "0.5912264", "text": "public static function awsSesRegions()\r\n {\r\n return [\r\n 'us-east-2' => 'US East (Ohio)',\r\n 'us-east-1' => 'US East (N. Virginia)',\r\n 'us-west-1' => 'US West (N. California)',\r\n 'us-west-2' => 'US West (Oregon)',\r\n 'ap-south-1' => 'Asia Pacific (Mumbai)',\r\n 'ap-northeast-2' => 'Asia Pacific (Seoul)',\r\n 'ap-southeast-1' => 'Asia Pacific (Singapore)',\r\n 'ap-southeast-2' => 'Asia Pacific (Sydney)',\r\n 'ap-northeast-1' => 'Asia Pacific (Tokyo)',\r\n 'ca-central-1' => 'Canada (Central)',\r\n 'eu-central-1' => 'Europe (Frankfurt)',\r\n 'eu-west-1' => 'Europe (Ireland)',\r\n 'eu-west-2' => 'Europe (London)',\r\n 'eu-west-3' => 'Europe (Paris)',\r\n 'eu-north-1' => 'Europe (Stockholm)',\r\n 'me-south-1' => 'Middle East (Bahrain)',\r\n 'sa-east-1' => 'South America (São Paulo)',\r\n 'us-gov-west-1' => 'AWS GovCloud (US)',\r\n ];\r\n }", "title": "" }, { "docid": "16ba0e4d459a8f10473b3611d8681e82", "score": "0.5909075", "text": "public function get_provider_types() {\n\n\t\t$provider_types = array(\n\t\t\t'digital-ocean' => 'Digital Ocean',\n\t\t);\n\n\t\t/*\n\t\t$provider_types = array(\n\t\t\t\t\t\t'digital-ocean'\t=> 'Digital Ocean',\n\t\t\t\t\t\t'linode'\t\t=> 'Linode',\n\t\t\t\t\t\t'vultr'\t\t\t=> 'Vultr',\n\t\t\t\t\t\t'awsec2'\t\t=> 'AWS EC2',\n\t\t\t\t\t\t'awslightsail'\t=> 'AWS Lightsail',\n\t\t\t\t\t);\n\t\t*/\n\n\t\treturn apply_filters( 'wpcd_provider_types', $provider_types );\n\n\t}", "title": "" }, { "docid": "6e92b3f3a7c06f7227bfd54ba2d181f5", "score": "0.5901387", "text": "public function getRegion()\n {\n return Mage::registry('current_region');\n }", "title": "" }, { "docid": "f1cac3d9254d8db18e1877701e7a06f7", "score": "0.5897389", "text": "public function provides()\n\t{\n\t\treturn array('state', 'city');\n\t}", "title": "" }, { "docid": "d9132df6d5414727e8f5fab5124cf64b", "score": "0.58969164", "text": "private function getGeneralProviders(): array\n {\n return [\n DatabaseProviderInterface::class => create(DatabaseProvider::class)\n ->constructor(get('settings.db'))\n ->method('addToDebugger', get(DebuggerProviderInterface::class)),\n\n MailerProviderInterface::class => static function (ContainerInterface $container): MailerProviderInterface {\n /** @var array<string,string>|null $settings */\n $settings = $container->get('settings.mail');\n if (!is_array($settings)) {\n throw new RuntimeException('Missing settings.mail');\n }\n if (!isset($settings['fromname']) || !is_string($settings['fromname'])) {\n throw new RuntimeException('Missing settings.mail.fromname');\n }\n if (!isset($settings['fromaddress']) || !is_string($settings['fromaddress'])) {\n throw new RuntimeException('Missing settings.mail.fromaddress');\n }\n $provider = new MailerProvider(\n $container->get(MailerTransportProviderInterface::class),\n $settings['fromname'],\n $settings['fromaddress']\n );\n $provider->addToDebugger($container->get(DebuggerProviderInterface::class));\n\n return $provider;\n },\n MailerTransportProviderInterface::class => create(MailerTransportProvider::class)\n ->constructor(get('settings.mail')),\n DebuggerProviderInterface::class => create(DebuggerProvider::class)\n ->constructor(get('settings.debug')),\n CheckTypeProviderInterface::class => autowire(CheckTypeProvider::class)\n ->constructorParameter('logger', get('logger.providers')),\n WikiParserProviderInterface::class => autowire(WikiParserProvider::class)\n ->constructorParameter('logger', get('logger.providers'))\n\n ];\n }", "title": "" }, { "docid": "498475d7b2f73fbb3bf57d4d79971dab", "score": "0.58864254", "text": "function ViewProvidersList(){\n\t\t#include default providers list\n\t \tinclude(\"../includes/tpl/ViewProviders.tpl\");\n\t}", "title": "" } ]
4793b419bd0cbc2b05cc51b2f9692661
Returns a string of muscle id seperated by commas
[ { "docid": "1d47fa202623ba9812eba2bdbb8a84ff", "score": "0.5438223", "text": "public function getMuscles($output){\n\n\t\t\t$eId = $this->_eId;\n\t\t\t\n\t\t\t$query = DB::getInstance()->prep(\"SELECT * FROM muscle\n\t\t\t\tINNER JOIN muscle2exercise on muscle2exercise.MuscleId = muscle.MuscleId\n\t\t\t\tWHERE muscle2exercise.exerciseId=? \n\t\t\t\t\");\n\t\t\t$query -> bindValue(1,$eId);\n\t\t\t$query->execute();\n\t\t\t$result_array = $query->fetchall(PDO::FETCH_ASSOC);\n\t\t\t$stringMusclesId = \"\";\n\t\t\t$stringMusclesName = \"\";\n\n\t\t\tif ($output == 'id'){\n\t\t\t\tforeach($result_array as $result){\n\t\t\t\t\t$stringMusclesId = $result['MuscleId'].','.$stringMusclesId;\n\t\t\t\t}\n\t\t\t\treturn $stringMusclesId;\n\t\t\t}else{ //$output ='name'\n\t\t\t\tforeach($result_array as $result){\n\t\t\t\t $stringMusclesName = $result['Name'].\"<br>\".$stringMusclesName;\n\t\t\t}\n\t\t\treturn $stringMusclesName;\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" } ]
[ { "docid": "2aa64507c9b1fe77503b00e4ae3fc15b", "score": "0.6844255", "text": "function get_productid_list() {\n\n\t\t$productid_list = \"\";\n\n\t\tforeach ($this->items as $id => $item) {\n\t\t\t$productid_list .= \",'\" . $id . \"'\";\n\t\t}\n\n\t\t// need to strip off the leading comma \n\t\treturn substr($productid_list, 1);\n\t}", "title": "" }, { "docid": "c1ced549d5379657170883cdfc1e5082", "score": "0.6561093", "text": "function get_id_csv ($ids)\n{\n\t$ids = array_values((array) $ids);\n\tarray_deep($ids, 'intval', 'one-dimensional');\n\treturn (string) join(',', $ids);\n}", "title": "" }, { "docid": "8458db424b81b1dcff0011fbe4bf07bd", "score": "0.6240346", "text": "public function president_dingid_list_bycomma()\n {\n\t\t$president_list = User::where('role_id', '<', 3)\n ->where('dealer_id', $this->id)\n ->get();\n\t\t$id_list = [];\n\t\tforeach($president_list as $president){\n\t\t\t$id_list[] = $president->dd_account;\n\t\t}\n return implode(\",\", $id_list);\n }", "title": "" }, { "docid": "107d39e8ea7dab7ddf04be401b88b539", "score": "0.6150022", "text": "private function idName() {\r\n\t\treturn(json_encode($this->extractIDs()));\r\n\t}", "title": "" }, { "docid": "6c330f19e28cc1192e882877568a036b", "score": "0.60896367", "text": "private function parseGenre($ids)\n {\n $genre = [];\n\n foreach($ids as $id) {\n $genre[] = isset($this->genreList()[$id]) ? $this->genreList()[$id] : '';\n }\n\n return implode($genre, ', ');\n }", "title": "" }, { "docid": "325334bb5697b0c1dd41ede52abf95ec", "score": "0.60361224", "text": "function makeIdPropStr($propArrNoLimit){\n $str=\"\";\n if($propArrNoLimit!=false){\n $str=implode(\",\", $propArrNoLimit);\n// foreach ($propArrNoLimit as $key=>$value) {\n// $str.=\",\".$value['id'];\n// echo $value;\n// }\n// $str[0]=\" \";\n }else return false;\n return $str;\n }", "title": "" }, { "docid": "bd61d25f591ba9f23e298805e7630cd8", "score": "0.5878321", "text": "public static function returnListIds($array) :string\n {\n $a = [];\n\n foreach ($array as $e) {\n $a[] = $e->id;\n }\n\n return implode(', ', $a);\n }", "title": "" }, { "docid": "a2e193a78118c7596e7f8ddbc33c4687", "score": "0.58404005", "text": "function markerCurrentIds()\n {\n if (is_array($this->arrCurrentIds)) {\n $strOutput = implode(',', $this->arrCurrentIds);\n }\n\n return $strOutput;\n }", "title": "" }, { "docid": "8912c24efbf06a746eaaa4c9d144a957", "score": "0.5808814", "text": "public function getContentElementIdList()\n {\n $idList = [];\n $contentElements = $this->getContentElements();\n if ($contentElements) {\n foreach ($this->getContentElements() as $contentElement) {\n $idList[] = $contentElement->getUid();\n }\n }\n return implode(',', $idList);\n }", "title": "" }, { "docid": "8a3f2e7e5544a0d4f39cbe44ab25d2bb", "score": "0.5785169", "text": "private function getDataIdValues()\n {\n return implode(' ', collect($this->data)->map(function ($data) {\n return $data['data_id'];\n })->all());\n }", "title": "" }, { "docid": "d841f2e771cfe180f37c30c16ac1f8f0", "score": "0.5763484", "text": "public static function getCollectionIdsSeparatedByComma(iterable $items)\n {\n $itemsIds = [];\n foreach ($items as $item) {\n array_push($itemsIds, $item->id);\n }\n $ret = implode(',', $itemsIds);\n\n return $ret;\n }", "title": "" }, { "docid": "69e1f180661c81f80e2842d91f3ae85f", "score": "0.57408565", "text": "public function toString(): string\n {\n return $this->id;\n }", "title": "" }, { "docid": "10fd47cd2ca62d62f762b24c5ddecc32", "score": "0.5729813", "text": "public function getIdString() : string;", "title": "" }, { "docid": "e034b6f2bab47ccfc5b2e778d3ed82b9", "score": "0.5652038", "text": "protected function getAllChatsIds() {\n $result = \\Drupal::state()->get('telegram_bot.chat_ids');\n if (!empty($result)) {\n return $result;\n }\n // Connect to telegram bot.\n $telegram = $this->connect();\n // Get all chat data.\n $telegram->useGetUpdatesWithoutDatabase();\n $data = $telegram->handleGetUpdates();\n $chat_ids = [];\n foreach ($data->getResult() as $value) {\n $chat_ids[] = $value\n ->getMessage()\n ->getChat()\n ->getId();\n }\n $result = implode(',', $chat_ids);\n \\Drupal::state()->set('telegram_bot.chat_ids', $result);\n\n return $result;\n }", "title": "" }, { "docid": "6e5d3a01aeb45dd3c9b317cc76495dc6", "score": "0.5585011", "text": "function getIdList($filterFieldIdMixed) {\n\t\t$idString = '';\n\t\tif (is_array($filterFieldIdMixed)) {\n\t\t\tif (count($filterFieldIdMixed) > 0) {\n\t\t\t\t$comma = '';\n\t\t\t\tforeach ($filterFieldIdMixed as $filterFieldId) {\n\t\t\t\t\tif (!$filterFieldId) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$idString .= ($comma . $filterFieldId);\n\t\t\t\t\t$comma = ',';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$idString = $filterFieldIdMixed;\n\t\t}\n\t\treturn $idString;\n\t}", "title": "" }, { "docid": "43b2d75afa77680ca52babff25a0cf07", "score": "0.5580226", "text": "function demande_id(){\n $al = '0123456789';\n return substr(str_shuffle(str_repeat($al, 10)), 0, 10);\n }", "title": "" }, { "docid": "bd8b3345ce2dac0fc186a43445e40571", "score": "0.5574233", "text": "function _getIdArrayRes()\n {\n return implode('.', $this->idArray);\n }", "title": "" }, { "docid": "b1e8ecff1238ac5b83443ea6383ce123", "score": "0.5571833", "text": "private function cohortsNamesToId($names) {\n global $DB;\n if (empty($names)) {\n return '';\n }\n $rs = $DB->get_recordset_list('cohort', 'idnumber', $names, '', 'id');\n $ids = array();\n foreach ($rs as $row) {\n $ids[] = $row->id;\n }\n return join(',', $ids);\n }", "title": "" }, { "docid": "658971c1dc7631be7ed4291be39652d5", "score": "0.5556899", "text": "protected function getIdAttribute(): string\n {\n if ($this->emoji->id === null) {\n return $this->emoji->name;\n }\n\n return \":{$this->emoji->name}:{$this->emoji->id}\";\n }", "title": "" }, { "docid": "760761437d6f1d824250d8bb05e7bd8d", "score": "0.5528953", "text": "function all_tune_uri() {\n\tglobal $tunes;\n\t$spotify_id = array();\n\tforeach ($tunes as $tune) {\n\t\tarray_push($spotify_id, end(explode(\":\",$tune['uri'])));\n\t}\n\techo implode(\",\", $spotify_id);\n}", "title": "" }, { "docid": "1fd1ee9bd9b4513a8180c26cc18e1cd3", "score": "0.55258954", "text": "public function getId()\n {\n return (substr($this->_id, 0, 12));\n }", "title": "" }, { "docid": "988713432ca6ecca755e597a2cbcc288", "score": "0.5493136", "text": "public function getID() : string\n {\n return $this->iD;\n }", "title": "" }, { "docid": "553c6875bcc40cca7d96fda5255af870", "score": "0.54739714", "text": "function getName(){\n $a = preg_split(\"/,/\", $this->listby ); // OK\n $s = \"\";\n foreach( $a as $name ){\n if( $name == \"id\" ){\n $s .= $this->id.\" \";\n continue;\n }\n $s .= $this->aFields[$name]->toString().\" \";\n }\n return trim( $s );\n }", "title": "" }, { "docid": "2667ef7b44371dc35a8aef639fc9eea9", "score": "0.5442196", "text": "public function message()\n {\n return 'アカウントIDは半角英数字・4文字以上で入力してください';\n }", "title": "" }, { "docid": "ceaa6cb2ae04cbd3b010fdb10fd6a763", "score": "0.54320043", "text": "public function getAllChampionsID()\n {\n // init data dragon\n $response = [];\n $riotEntity = new RiotEntity($this->locale);\n $champions = DataDragonAPI::getStaticChampions($riotEntity->localeMutator());\n foreach ($champions['data'] as $c) {\n $response[] = $c['id'];\n }\n return $response;\n }", "title": "" }, { "docid": "535e9b5e6d2b646140f5b97c63061864", "score": "0.54214436", "text": "public function uniqueId(): string\n {\n return strval($this->travel->id);\n }", "title": "" }, { "docid": "38a29c2fc3469f6d4859eaef522813b3", "score": "0.5415241", "text": "private function getMembers()\n {\n $member = $this->_parser->find('span[class=\"numbers members\"] strong', 0)->plaintext;\n\n return str_replace(',', '', $member);\n }", "title": "" }, { "docid": "de952faa74776cdd91dff7b76a85d96e", "score": "0.5413459", "text": "function getIds() {\n $data = $this->conn->getIds();\n die(\"{data : \" . json_encode($data) . \"}\");\n }", "title": "" }, { "docid": "cc45c6de6bc3b9380d363913c11a7b19", "score": "0.5406998", "text": "function simplecal_get_ids_rubriques_exclues(){\n\t$ids = \"\";\n\tif (defined('_DIR_PLUGIN_ACCESRESTREINT')){\n\t\tinclude_spip('inc/acces_restreint');\n\t\t$id_auteur = $GLOBALS['visiteur_session']['id_auteur'];\n\t\t$rub_exclues = accesrestreint_liste_rubriques_exclues(false, $id_auteur);\n\n\t\tif (count($rub_exclues)>0){\n\t\t\t$ids = join(',', $rub_exclues);\n\t\t}\n\t}\n\treturn $ids;\n}", "title": "" }, { "docid": "ada8b7990a8e8226efc9c25353afefd6", "score": "0.54066575", "text": "public function getId()\n {\n $id = $this->props['attribs']['id'];\n $sepChar = '_'; // character to join prefix and id\n $repChar = '_'; // replace \\W with this char\n if (!$id && $this->props['attribs']['name']) {\n $id = \\preg_replace('/\\W/', $repChar, $this->props['attribs']['name']);\n $id = \\preg_replace('/' . $repChar . '+/', $repChar, $id);\n $id = \\trim($id, $repChar);\n if ($id && $this->props['idPrefix']) {\n $prefix = $this->props['idPrefix'];\n if (\\preg_match('/[a-z]$/i', $prefix)) {\n $prefix = $prefix . $sepChar;\n }\n $id = $prefix . $id;\n }\n if ($id) {\n $this->props['attribs']['id'] = $id;\n }\n }\n return $id;\n }", "title": "" }, { "docid": "c787fa8399900ad7a827fed3eb7cfc15", "score": "0.5389442", "text": "public function getId(): string\n {\n return $this->response['sub'] ?? '';\n }", "title": "" }, { "docid": "72c8496b7715fe7c2485c53150acd116", "score": "0.5374691", "text": "public function listId() {\n\t\treturn $this->division->all()->pluck('id')->all();\n\t}", "title": "" }, { "docid": "c8aa2bee88dddc7570dbb36974e4310f", "score": "0.5367265", "text": "public function id_complain(){\n $query = $this->db->query('SELECT MAX(id_complain) AS MaxIdComp FROM tbl_complain');\n $data = $query->row_array(); \n\n $idMaxComplain = $data['MaxIdComp'];\n\n $urut = (int) substr($idMaxComplain, 1, 4);\n \n $urut++;\n \n $newidMaxComplain = sprintf(\"%04s\", $urut);\n return $newidMaxComplain;\n\n }", "title": "" }, { "docid": "c3d8f9825e6ee5750244561af3920877", "score": "0.5351464", "text": "public function __toString()\n {\n return (string)$this->getId();\n }", "title": "" }, { "docid": "cfe9b5cbe680ef352879b5e651be1a53", "score": "0.53498596", "text": "function getNameAndID() \n {\n $surname = $this->getSurname();\n $givenName = $this->getPreferedName();\n // retrieve the staffid\n $staffID = $this->getStaffAccount();\n return $surname.', '.$givenName.' - '.$staffID ;\n }", "title": "" }, { "docid": "fb91e658c87ba0db20769f8093773d37", "score": "0.53465325", "text": "public function __toString()\r\n {\r\n return (string)$this->getId();\r\n }", "title": "" }, { "docid": "285f3763774d8cb5f2225a5b46da58ea", "score": "0.5341728", "text": "public function getId(): string\n {\n return $this->id ?? '';\n }", "title": "" }, { "docid": "075d480d686b69fb3a0949e58450225d", "score": "0.53415996", "text": "public function getTrackingId()\n {\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $charactersLength = strlen($characters);\n $trackingId = '';\n for ($i = 0; $i < 10; $i++) {\n $trackingId .= $characters[rand(0, $charactersLength - 1)];\n }\n return $trackingId;\n }", "title": "" }, { "docid": "b64309defafb01dae981bc44280bb261", "score": "0.53389615", "text": "public function getArrayIDs() {\n\t\treturn explode(\n\t\t\t',',\n\t\t\tstr_replace(\n\t\t\t\tarray( ';', ' ' ),\n\t\t\t\tarray( ',', '' ),\n\t\t\t\t$this->getID()\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "3b581aca44f6a287abb4473ea061963b", "score": "0.53322774", "text": "function getMobileNo($file){\n\t\t\n\t\t$filedata=file_get_contents($file);\n\t\t$mobilenostr=preg_replace(\"/[\\n\\r]/\", ',', $filedata);\n\t\treturn $mobilenostr;\n\t}", "title": "" }, { "docid": "c8a448efa7357c7da4e5d4dda1518bed", "score": "0.53306216", "text": "function getIdsms()\n {\n return $this->idsms;\n }", "title": "" }, { "docid": "e9dd95b003a79b86583c76029a59a7a5", "score": "0.53266114", "text": "public function getSongID(){\n $idList = array();\n foreach ($this->song_array as $each_song) {\n # code...\n $each_id = $each_song[\"songID\"];\n array_push($idList, $each_id);\n }\n return $idList;\n }", "title": "" }, { "docid": "d62d128afa19c4aa8c1e99f13d7a5a50", "score": "0.5304327", "text": "public function __toString() {\n return (string) $this->getId();\n }", "title": "" }, { "docid": "9e2caeae589ce239bb11280b75746458", "score": "0.52823216", "text": "public function getUsersString()\n {\n $users = [];\n foreach ($this->users as $user) \n array_push($users, $user->username);\n\n return implode(', ', $users);\n }", "title": "" }, { "docid": "1c45d8fe944bdd66c28c0726aa9722b9", "score": "0.52528024", "text": "public function getId(): string\n {\n return (string) $this->id;\n }", "title": "" }, { "docid": "b8bff4278867e9bf2ed26f3168d92f06", "score": "0.52278", "text": "public function getIdentifier(): string\n {\n return (string)$this->id;\n }", "title": "" }, { "docid": "e538c841750d6fb54301df95ac6e6c38", "score": "0.5226857", "text": "public function __toString() {\n\t\treturn $this->getUid();\n\t}", "title": "" }, { "docid": "42f70dc5efcdbae7358eb9e2864260df", "score": "0.52245957", "text": "public function __toString() {\n return $this->ID;\n }", "title": "" }, { "docid": "ed6298d5e82adcb7dae5a6d5144748a6", "score": "0.52186066", "text": "public function getCrmCategory_multipicklist(): string\n\t{\n\t\t$parsedCategories = '';\n\t\tif (false === $this->category) {\n\t\t\t$this->category = new \\App\\Integrations\\Magento\\Synchronizator\\Category();\n\t\t\t$this->category->getCategoryMapping();\n\t\t}\n\t\t$categories = $this->getCustomAttributeValue('category_ids');\n\t\tforeach ($categories as $category) {\n\t\t\tif (!empty($this->category->mapCategoryYF[$category])) {\n\t\t\t\t$parsedCategories .= ',T' . $this->category->mapCategoryYF[$category];\n\t\t\t}\n\t\t}\n\t\treturn !empty($parsedCategories) ? $parsedCategories . ',' : '';\n\t}", "title": "" }, { "docid": "32c6f7bd17b39a61d9b821db22f67533", "score": "0.5214788", "text": "public function __toString(): string\n {\n return $this->mbid;\n }", "title": "" }, { "docid": "504383138d0bbd506bd661db10d333ed", "score": "0.52024466", "text": "public function __toString()\n {\n return $this->identifier();\n }", "title": "" }, { "docid": "315de97de646c0d24b024c5c17c3b238", "score": "0.51960343", "text": "function toString(){\r\n\t\treturn $this->aDATA['lteamid'].' '.$this->aDATA['lplayerid'];\r\n\t}", "title": "" }, { "docid": "5f4b3ff3c59ea60a0122abadf89aeb46", "score": "0.51887083", "text": "private function _getIdSummary() {\n return 'num-'.$this->_number->short();\n }", "title": "" }, { "docid": "885af77433c95b316266f753682506d6", "score": "0.5184765", "text": "public function getMedlemId()\n\t{\n\t\t\n\t\tif ($this->isApproved()) {\n\t\t\treturn substr($this->getNamn() , strlen(self::PREFIX) , -4);\n\t\t} else {\n\t\t\treturn substr($this->getNamn() , strlen(self::PREFIX . self::UNAPPROVED_PREFIX) , -4);\n\t\t}\n\t}", "title": "" }, { "docid": "25edfca74a6b6f9e86bc469deb51de83", "score": "0.51844895", "text": "private function getParticipantUuid()\n {\n $uuid = [];\n for ($i = 1; $i < 15; $i++) {\n // get a random digit, but always a new one, to avoid duplicates\n $character = [$this->getFaker()->randomDigit, $this->getFaker()->randomLetter];\n $uuid[] = $character[mt_rand(0, 1)];\n }\n $uuid = implode('', $uuid);\n\n return $uuid;\n }", "title": "" }, { "docid": "3c4b6657f571b31ac429faf5b1b2e2d2", "score": "0.5178431", "text": "function queryInteractionss($conn, $id) {\n // AND id_interaction IN (6416, 2318, 9043, 5871, 1326, 207, 23162, 4296, 4216, 409)';\n\n $queryx = 'SELECT DISTINCT id, id_interaction FROM interactions WHERE id IN ('. htmlspecialchars(implode($id, ','),ENT_QUOTES, \"UTF-8\") .')\n AND id_interaction IN ('. htmlspecialchars(implode($id, ','),ENT_QUOTES, \"UTF-8\") .')';\n\n $rows = query($conn, $queryx);\n\n return $rows;\n}", "title": "" }, { "docid": "86c35f1f49f4146bbe71e6164b41e749", "score": "0.5175567", "text": "function get_id_max_tugas() {\n return \"ND_\". \"_\" . round(microtime(true) * 1000);\n }", "title": "" }, { "docid": "ae636c4e66f228c11d5eb722df7515b2", "score": "0.5175566", "text": "public function __toString() {\n\t\treturn $this->getSteamID64();\n\t}", "title": "" }, { "docid": "8b4d8b04d32aeccb97e54271208861ff", "score": "0.5170546", "text": "public function __toString()\n {\n return strval($this->id);\n }", "title": "" }, { "docid": "751ac861fef7d623402531e73b3c3c00", "score": "0.51449674", "text": "public function __toString()\n {\n return $this->getId();\n }", "title": "" }, { "docid": "6ea85aaa7c84724f471ebbcb09f6e93d", "score": "0.51449215", "text": "public function getId() : string\n {\n return $this->id;\n }", "title": "" }, { "docid": "6ea85aaa7c84724f471ebbcb09f6e93d", "score": "0.51449215", "text": "public function getId() : string\n {\n return $this->id;\n }", "title": "" }, { "docid": "6ea85aaa7c84724f471ebbcb09f6e93d", "score": "0.51449215", "text": "public function getId() : string\n {\n return $this->id;\n }", "title": "" }, { "docid": "4d9f8467a29d7b8917a16333a55327ec", "score": "0.5144512", "text": "function tidy_id($cdata)\n{\n $cdata = trim($cdata);\n $cdata = str_replace(['[', ']'], '.', $cdata);\n\n return $cdata;\n}", "title": "" }, { "docid": "99249ec932f85fa8c544e4c5cde5f58c", "score": "0.5139608", "text": "public static function toString()\n {\n $stringArr = [];\n collect(self::all())->each(function($item, $key) use (&$stringArr) {\n $stringArr[] = $key . ': ' . $item;\n });\n\n return implode(',', $stringArr);\n }", "title": "" }, { "docid": "de771bb0383700cccbd1af53d3b9917c", "score": "0.5138227", "text": "function getCidsArray()\r\n{\r\n $cids = getPostVar('cid');\r\n return array_filter(explode(\",\", $cids));\r\n}", "title": "" }, { "docid": "d65a09316ebfc9e34aa4ac1e192c7c77", "score": "0.51341003", "text": "private function ___getIDsFormatted( $aisIDs ) {\n if ( is_scalar( $aisIDs ) ) {\n return $this->getStringIntoArray( $aisIDs, ',' );\n }\n // The Auto-insert feature passes ids with an array.\n if ( is_array( $aisIDs ) ) {\n return $aisIDs;\n }\n return $this->getAsArray( $aisIDs );\n }", "title": "" }, { "docid": "955b3c831737b87567bd567080e27e46", "score": "0.5133031", "text": "public function getUniqueId()\n {\n return (string) $this->uniqueId;\n }", "title": "" }, { "docid": "4a9ac0bbb5908d81d1d7924b7489cb3d", "score": "0.51310384", "text": "function get_all_tune_uri() {\n\tglobal $tunes;\n\t$spotify_id = array();\n\tforeach ($tunes as $tune) {\n\t\tarray_push($spotify_id, end(explode(\":\",$tune['uri'])));\n\t}\n\treturn implode(\",\", $spotify_id);\n}", "title": "" }, { "docid": "163d76b961e51d63432fa58967ca0379", "score": "0.51260906", "text": "public function getIdsAndName()\n\t{\n\t\treturn $this->entityManager->getRepository(Medicine::class)\n\t\t\t->findPairs([], \"name\", [], \"id\");\n\t}", "title": "" }, { "docid": "6fe64850f9ee3124d4fbcc7d0a7d0223", "score": "0.5120616", "text": "protected function getUniqueIdentifierSeparator(): string\n {\n return static::UNIQUE_IDENTIFIER_SEPARATOR;\n }", "title": "" }, { "docid": "3dea3f6357062a6583d956f6496dbed7", "score": "0.5110228", "text": "public function getId() : string\n {\n return $this->identifier;\n }", "title": "" }, { "docid": "29415f43611ee1b1ba16b795e022aa6b", "score": "0.5109994", "text": "public function getPriceGroupsString() {\n $user_price_groups = \"\";\n foreach($this->price_groups as $group)\n $user_price_groups .= $group->getId(). \", \";\n\n $user_price_groups = substr($user_price_groups, 0, -2);\n return $user_price_groups;\n }", "title": "" }, { "docid": "89180ac62595fa58d43bfa04476e80f8", "score": "0.5105734", "text": "public function categoriesString()\n {\n $cats = $this->getCategories();\n // print_r($cats);\n // die();\n $output = [];\n foreach ($cats as $cat) {\n $output[] = $cat->name;\n }\n return implode(', ', $output);\n }", "title": "" }, { "docid": "29e3bacce7fa47bb8e57e6a804b13fd4", "score": "0.5103196", "text": "public function convertIdListToTelMobileList($sIdList = \"\"){\r\n\t\t$sTelMobileList = \"\";\r\n\t\tif (trim($sIdList) != \"\"){\r\n\t\t\t//chuyen doi mang danh sach ten can bo ra mang mot chieu\r\n\t\t\t$arrId = explode(\",\",$sIdList);\r\n\t\t\tfor ($index = 0; $index<sizeof($arrId); $index++){\r\n\t\t\t\tforeach($_SESSION['arr_all_staff_keep'] as $id){\r\n\t\t\t\t\tif (trim($id['id']) == trim($arrId[$index])){\r\n\t\t\t\t\t\t$sTelMobileList .= $id['tel_mobile'] . \",\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t$sTelMobileList = substr($sTelMobileList,0,-1); \r\n\t\t}\r\n\t\treturn $sTelMobileList;\r\n\t}", "title": "" }, { "docid": "e180a9f2dff4a86f51410306eda73caf", "score": "0.510094", "text": "function delete(){\n\n \t$cids = implode(\",\", JFactory::getApplication()->input->get(\"cid\"));\n \t\n }", "title": "" }, { "docid": "0591f811bd0566f35bb796eb9ab6327b", "score": "0.51001924", "text": "public function getId(): string\n {\n return $this->id ?? ($this->id = (string) (static::$incrementId++));\n }", "title": "" }, { "docid": "b90bae211ada210de6e251f14e881065", "score": "0.5097734", "text": "protected function stringify(array $items): string\n {\n return implode(',', $items);\n }", "title": "" }, { "docid": "fa33c1bfd1cb9d6b3d17eecd7c8d3f4c", "score": "0.5096676", "text": "public function __toString()\n {\n return $this->id;\n }", "title": "" }, { "docid": "fa33c1bfd1cb9d6b3d17eecd7c8d3f4c", "score": "0.5096676", "text": "public function __toString()\n {\n return $this->id;\n }", "title": "" }, { "docid": "fa33c1bfd1cb9d6b3d17eecd7c8d3f4c", "score": "0.5096676", "text": "public function __toString()\n {\n return $this->id;\n }", "title": "" }, { "docid": "fa33c1bfd1cb9d6b3d17eecd7c8d3f4c", "score": "0.5096676", "text": "public function __toString()\n {\n return $this->id;\n }", "title": "" }, { "docid": "e3d21e52a7b2356bcc64d15179c71e7a", "score": "0.5096498", "text": "public function getIdAttribute(): string\n {\n return $this->person_id . '-' . $this->year;\n }", "title": "" }, { "docid": "1a1c11ce8e8118313b3b1af7afc78068", "score": "0.50917464", "text": "public function unitsIDName(){\n\t\t\t\n\t\t$sql = \"select id, name from core_units\";\n\t\t$units = $this->runRequest($sql);\n\t\treturn $units->fetchAll();\n\t}", "title": "" }, { "docid": "dea214b0d8b167dd368c2913df74a669", "score": "0.50889456", "text": "private function getValidatorsRolesIds() {\n global $DB;\n if (!$this->addValidators) {\n return '';\n }\n $rs = $DB->get_recordset(\n 'role_capabilities',\n array('capability' => self::validatorCapacity, 'permission' => 1),\n '', // sort\n 'roleid'\n );\n $ids = array();\n foreach ($rs as $row) {\n $ids[] = $row->roleid;\n }\n return join(',', $ids);\n }", "title": "" }, { "docid": "6304db259d6740b867d32879edf7f8e2", "score": "0.5087961", "text": "public static function getStringFromArraySeparatedByComma(iterable $items)\n {\n $ret = '';\n $i = 0;\n $len = count($items); // to put \",\" to all items except the last\n\n foreach ($items as $key => $item) {\n $ret .= $item;\n if ($i != $len - 1) { // not last\n $ret .= ', ';\n }\n $i++;\n }\n\n return $ret;\n }", "title": "" }, { "docid": "c9fffb9adc6a268546ddca689f4829ab", "score": "0.508554", "text": "function getUniqueId();", "title": "" }, { "docid": "81e9befb5a1c8865aee2aab380467900", "score": "0.5084631", "text": "private function random()\n {\n $characters = 'abcdefghijklmnopqrstuvwxyz';\n\n $id = '';\n\n while (strlen($id) < 7 || in_array($id, array_keys($this->_commands))) {\n $id .= $characters[rand(0, strlen($characters) - 1)];\n }\n\n return $id;\n }", "title": "" }, { "docid": "264c5cc21b7b55c74479601e01073197", "score": "0.5084224", "text": "private static function getCoursesString() {\r\n return \"(\" . implode(\",\", array_keys(enrol_get_my_courses())) . \") \";\r\n }", "title": "" }, { "docid": "76dcb070efd4fa4c30f18cf939a1ca73", "score": "0.5083154", "text": "public static function generateRamdonids() {\n $rango = 9;\n $longitud = $rango;\n $id = '';\n $pattern = '1234567890';\n $max = strlen($pattern) - 1;\n for ($i = 0; $i < $longitud; $i++) {\n $id .= $pattern{mt_rand(0, $max)};\n }\n return $id;\n }", "title": "" }, { "docid": "3abdf4b5d25b7bffe17072371ccd12ca", "score": "0.50784314", "text": "public function __toString()\n {\n return $this->getGuid();\n }", "title": "" }, { "docid": "7cce1eacbad354941d79d185694e348d", "score": "0.5077189", "text": "public static function getMortgageExpertIds()\n {\n return static::pluck('id');\n }", "title": "" }, { "docid": "5c58251b5f73ae8c7108a43ba75a7850", "score": "0.5074951", "text": "public function get_adv_id($id){\n\t\treturn str_pad($id, 3, 0, STR_PAD_LEFT);\t\t\n\t}", "title": "" }, { "docid": "99095a6e828ff4b2e17b9b83fdbe84a9", "score": "0.50718576", "text": "public function idProvider()\n {\n return [[\"4bb13d30-4f4c-11e9-bd6e-f45c899bcb9d\"]];\n }", "title": "" }, { "docid": "5d8ab0fd48ce3bf4045c9b5759ee85c2", "score": "0.5062079", "text": "public function __toString()\n\t{\n\t\treturn $this->id;\n\t}", "title": "" }, { "docid": "9542d159e3edc039a84dec87f3a16457", "score": "0.50533056", "text": "public function get_cas_id() {\n if(!isset($this->attributes[$this->id_attribute])) {\n return '';\n }\n return trim($this->attributes[$this->id_attribute]);\n }", "title": "" }, { "docid": "2e78f3d4b8f54f642a8fed607d749355", "score": "0.504965", "text": "public function convertUnitNameListToUnitIdList($sUnitNameList = \"\"){\r\n\t\t$sUnitIdList = \"\";\r\n\t\tif (trim($sUnitNameList) != \"\"){\r\n\t\t\t//chuyen doi mang danh sach ten can bo ra mang mot chieu\r\n\t\t\t$arrUnitName = explode(\";\",$sUnitNameList);\r\n\t\t\t//var_dump($_SESSION['arr_all_unit_keep']); //exit;\r\n\t\t\tfor ($index = 0; $index<sizeof($arrUnitName); $index++){\r\n\t\t\t\tforeach($_SESSION['arr_all_unit_keep'] as $unit){\r\n\t\t\t\t\tif (trim($unit['name']) == trim($arrUnitName[$index])){\r\n\t\t\t\t\t\t$sUnitIdList .= $unit['id'] . \",\";\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\t\r\n\t\t\t$sUnitIdList = substr($sUnitIdList,0,-1); \r\n\t\t}\r\n\t\treturn $sUnitIdList;\r\n\t}", "title": "" }, { "docid": "9ee623d344ffe53b5cc1dc8bfa7106c8", "score": "0.5045937", "text": "public function getId(): string\n {\n return $this->data['id'];\n }", "title": "" }, { "docid": "f915f5e34c2ad167771466291093862b", "score": "0.50400144", "text": "function getPlayerEntityIds(){\n $ids = $this->conn->send_and_receive(\"world.getPlayerIds\");\n $idArray = explode(\"|\", $ids);\n return $idArray;\n }", "title": "" }, { "docid": "ae1a7f4214f99a7c8c3dfef50a97305c", "score": "0.5039861", "text": "public function getId() : string\n\t{\n\t}", "title": "" } ]
71562342452f92f82b87f099fcb49baf
///Pricing, Quantity & Cheque Info
[ { "docid": "7c5a34408d86541f7042140e4e97fcbd", "score": "0.0", "text": "public function softwareHTML()\n\t\t{\n\t\t\tif($this->cheque->type == Cheque::TYPE_MANUAL){return \"\";}\n\t\t\treturn '<p style=\"font-family:Arial; font-size:10pt; text-align:left; margin:0px; padding:0px;\">Software:&nbsp;<b></b>'. $this->software() .'</b></p>';\n\t\t}", "title": "" } ]
[ { "docid": "0faeea81fd4d7faad0cf294570356b77", "score": "0.68344045", "text": "public function getQty();", "title": "" }, { "docid": "df04f08d3cf41537f1eb1e35e7616f30", "score": "0.6738177", "text": "public function fetchCompetitivePricing();", "title": "" }, { "docid": "a4d521305af83ee94965910e39595fc4", "score": "0.6701815", "text": "public function quantity();", "title": "" }, { "docid": "8e512b6971f0060855fe6dea487b75c7", "score": "0.66768575", "text": "function mysite_netcomp_build_pricing_info($data){\n $priceOutput = array();\n if ($data->Count){\n $prices = $data->Prices;\n foreach ($prices as $key=>$price){\n\n $priceOutput[] = '<div class=\"quantity\">'.$price->MinQty.'</div><div class=\"price\">'.$price->Price.'</div>';\n }\n }\n $pricingHeaders = '<h3>Pricing</h3>\n <h4>Currency:'. $data->Currency .'</h4>\n <div class=\"label quantity\"></div><div class=\"label price\"></div>';\n $priceOutput = '<div class=\"price-wrapper\">' . $pricingHeaders.implode('', $priceOutput) . '</div>';\n return $priceOutput;\n\n}", "title": "" }, { "docid": "eddedc24cbb3edd7fbcc6aca7a27d321", "score": "0.6640009", "text": "public function getQuantityCalculation();", "title": "" }, { "docid": "e52f9abdafa6bbba325b704d44072f4b", "score": "0.6603688", "text": "public function getRestockQty();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.65891206", "text": "public function getQuantity();", "title": "" }, { "docid": "d6b46fdd2d76e520f2340cd1b330b5f2", "score": "0.65891206", "text": "public function getQuantity();", "title": "" }, { "docid": "e1ee80a4fd8c708db95c57c9959f1dc4", "score": "0.631023", "text": "public function getStock();", "title": "" }, { "docid": "7e182120c8daa612ce57c9dad2553e01", "score": "0.62898856", "text": "public function getTotalQty();", "title": "" }, { "docid": "096ccd1cd3b75d66614e99400c3b404c", "score": "0.62870073", "text": "public function getTotalQuantity();", "title": "" }, { "docid": "ae22cba6ec12f8a7e832d90e389e9397", "score": "0.6241107", "text": "public function getQtyToShip();", "title": "" }, { "docid": "2a393e83ad3653df54af6a5dba4122c6", "score": "0.60538715", "text": "function m_updateInvoiceDetails() {\n\t\t#NOTE: PRICE FOR QTY BOX HAS ADDED AFTER CALCULATION\n\t\t#PRICE ACCORDING TO PRODUCT QUANTITY FROM ORDER PRODUCT\n\t\t$this->obDb->query= \"SELECT SUM((fPrice*iQty)-fDiscount) as subtotal FROM \".ORDERPRODUCTS.\" WHERE iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t$rs = $this->obDb->fetchQuery();\n\t\t$this->subTotal=$rs[0]->subtotal;\n\n\t\t#TAX TOTAL FROM PRODUCT ORDERED\n\t\t$this->obDb->query= \"SELECT SUM(fPrice*iQty) as subtotal FROM \".ORDERPRODUCTS.\" WHERE iOrderid_FK='\".$this->request['orderid'].\"' AND iTaxable=1\";\n\t\t$rs1 = $this->obDb->fetchQuery();\n\n\t\t#TAX ON SUB TOTAL ONLY\n\t\t$this->taxTotal=$rs1[0]->subtotal;\n\t\t#TAX TOTAL FROM PRODUCT ORDERED\n\t\t$this->obDb->query= \"SELECT SUM(fPrice*iQty) as subtotal FROM \".ORDERPRODUCTS.\" WHERE iOrderid_FK='\".$this->request['orderid'].\"' AND iFreeShip!=1\";\n\t\t$rs1 = $this->obDb->fetchQuery();\n\t\t#OMITING FREESHIPED PRODUCT\n\t\t$this->postageTotal=$rs1[0]->subtotal;\n\n\t\t#OPTIONS PRICE\n\t\t$this->obDb->query= \"SELECT SUM(O.fPrice*iQty) as optTotal FROM \".ORDEROPTIONS.\" O,\".ORDERPRODUCTS.\" WHERE iProductOrderid_FK=iOrderProductid_PK AND O.iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t$rsopt = $this->obDb->fetchQuery();\n\t\n\t\t#CHOICES PRICE FOR SIMPLE\n\t\t$this->obDb->query= \"SELECT SUM(O.fPrice*iQty) as optTotal FROM \".ORDERCHOICES.\" O,\".ORDERPRODUCTS.\" WHERE iProductOrderid_FK=iOrderProductid_PK AND O.iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t$rschoice = $this->obDb->fetchQuery();\n\t\t$totalPrice=$rschoice[0]->optTotal+$rsopt[0]->optTotal;\n\t\n\t\t#OPTIONS TAXABLE AMOUNT\n\t\t$this->obDb->query= \"SELECT SUM(O.fPrice*iQty) as optTotal FROM \".ORDEROPTIONS.\" O,\".ORDERPRODUCTS.\" WHERE iProductOrderid_FK=iOrderProductid_PK AND iTaxable=1 AND O.iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t$rsoptTax = $this->obDb->fetchQuery();\n\t\t\n\t\t$this->obDb->query= \"SELECT SUM(O.fPrice*iQty) as optTotal FROM \".ORDERCHOICES.\" O,\".ORDERPRODUCTS.\" WHERE iProductOrderid_FK=iOrderProductid_PK AND iTaxable=1 AND O.iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t$rschoiceTax = $this->obDb->fetchQuery();\n\t\t$totalPriceTax=$rschoiceTax[0]->optTotal+$rsoptTax[0]->optTotal;\n\n\t\t#OPTIONS FREESHIP\n\t\t$this->obDb->query= \"SELECT SUM(O.fPrice*iQty) as optTotal FROM \".ORDEROPTIONS.\" O,\".ORDERPRODUCTS.\" WHERE iProductOrderid_FK=iOrderProductid_PK AND iFreeShip!=1 AND O.iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t$rsoptNotFree = $this->obDb->fetchQuery();\n\n\t\t\n\t\t$this->obDb->query= \"SELECT SUM(O.fPrice*vChoiceValue*iQty) as optTotal FROM \".ORDERCHOICES.\" O,\".ORDERPRODUCTS.\" WHERE iProductOrderid_FK=iOrderProductid_PK AND iFreeShip!=1 AND O.iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t$rschoiceNotFree = $this->obDb->fetchQuery();\n\n\t\t$totalPriceNotFree=$rschoiceNotFree[0]->optTotal+$rsoptNotFree[0]->optTotal;\n\n\t\t$this->subTotal+=$totalPrice;\n\t\t$this->taxTotal+=$totalPriceTax;\n\t\t$this->postageTotal+=$totalPriceNotFree;\n\n\t\t#promotions on sub total no postage included\n\t\t$this->grandTotal=$this->subTotal;\n\t\t\n\t\t#PROMOTION DISCOUNTS % ON SUBTOTAL\n\t\t$promotionDiscount=$this->comFunc->m_calculatePromotionDiscount($this->subTotal);\n\t\tif($promotionDiscount<0)\n\t\t\t$promotionDiscount=0;\n\t\t$this->grandTotal-=$promotionDiscount;\n \t\t$this->postageTotal-=$promotionDiscount;\n\t\t$this->taxTotal-=$promotionDiscount;\n\t\t#SELECTING FROM ORDERS TABLE TO MANPULATE\n\t\t$this->obDb->query =\"SELECT iInvoice,fShipByWeightPrice,fTaxRate,vDiscountCode,iGiftcert_FK,\";\n\t\t$this->obDb->query.=\"vShipMethod_Id,vShipDescription,fMemberPoints,fShipByWeightKg,fCodCharge FROM \".ORDERS;\n\t\t$this->obDb->query.=\" WHERE iOrderid_PK='\".$this->request['orderid'].\"'\";\n\t\t$rsOrder= $this->obDb->fetchQuery();\n\t\t#UPDATING TOTAL ACC TO MEMBER POINTS\n\t\t$this->grandTotal-=$rsOrder[0]->fMemberPoints;\n\t\t$this->postageTotal-=$rsOrder[0]->fMemberPoints;\t\n\n\t\t$this->comFunc->grandTotal=$this->postageTotal;\n\n\t\t$this->obDb->query= \"SELECT COUNT(*) as notFreeCnt FROM \".ORDERPRODUCTS.\" WHERE iOrderid_FK='\".$this->request['orderid'].\"' AND iFreeShip!=1\";\n\t\t$rs1 = $this->obDb->fetchQuery();\n\t\t#OMITING FREESHIPED PRODUCT\n\t\t$this->notFreeCnt=$rs1[0]->notFreeCnt;\n\n\t\tif($this->notFreeCnt>0)\n\t\t{\t \n\t\t\t#TRAVERSING THROUGH ORDERED PRODUCTS\n\t\t\t$this->obDb->query= \"SELECT vShipCode,O.iFreeShip,iQty FROM \".ORDERPRODUCTS.\" O,\".PRODUCTS.\" P WHERE iProdid_PK =iProductid_FK && iOrderid_FK='\".$this->request['orderid'].\"'\";\n\t\t\t#IF CURRENT METHOD IS POSTAGE CODE /HIGHEST POSTAGE\n\t\t\tif(DEFAULT_POSTAGE_METHOD=='codes')\n\t\t\t{\n\t\t\t\t$rsShip =$this->obDb->fetchQuery();\n\t\t\t\t$rCount=$this->obDb->record_count;\n\n\t\t\t\tif($rCount>0)\n\t\t\t\t{\n\t\t\t\t\tfor($i=0;$i<$rCount;$i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($rsShip[$i]->iFreeShip !=1){\n\t\t\t\t\t\t\tif(!empty($rsShip[$i]->vShipCode))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->comFunc->qty=$rsShip[$i]->iQty;\n\t\t\t\t\t\t\t\t$this->comFunc->postageId=$this->queryResult[$i]->vShipCode;\n\t\t\t\t\t\t\t\t$this->postagePrice=$this->comFunc->m_postageCodePrice();\n\t\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}elseif(DEFAULT_POSTAGE_METHOD=='highest'){\n\t\t\t\t$rsShip =$this->obDb->fetchQuery();\n\t\t\t\t$rCount=$this->obDb->record_count;\n\n\t\t\t\tif($rCount>0)\n\t\t\t\t{\n\t\t\t\t\tfor($i=0;$i<$rCount;$i++)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($rsShip[$i]->iFreeShip !=1){\n\t\t\t\t\t\t\tif($this->maxPostage<$rsShip[$i]->fPostagePrice){\n\t\t\t\t\t\t\t\t$this->maxPostage=$rsShip[$i]->fPostagePrice;\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$this->postagePrice=$this->maxPostage;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($this->postagePrice==0)\n\t\t\t{\n\t\t\t\t$this->postagePrice=$this->comFunc->m_postagePrice();\n\t\t\t}\n\n\t\t\t//SPECIAL_POSTAGE\n\t\t\t#IF POSTAGE NAME IS DEFAULT THEN APPLY OTHER METHOD\n\t\t\tif($this->postagePrice==0 || SPECIAL_POSTAGE==1)\n\t\t\t{\n\t\t\t\t$this->obDb->query =\"SELECT vField1,vField2 FROM \".POSTAGE.\" P,\".POSTAGEDETAILS.\" PD WHERE iPostId_PK=iPostId_FK AND vKey='special' AND PD.iPostDescId_PK='\".$rsOrder[0]->vShipMethod_Id.\"'\";\n\t\t\t\t$rsPostage=$this->obDb->fetchQuery();\n\t\t\t\t$rsCount=$this->obDb->record_count;\n\t\t\t\tif($rsCount>0)\n\t\t\t\t{\n\t\t\t\t\tfor($j=0;$j<$rsCount;$j++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$addtional=$this->request['qty']-1;\n\t\t\t\t\t\tif($addtional>0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->specialPrice=$rsPostage[$j]->vField1+($rsPostage[$j]->vField2*$addtional);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$this->specialPrice=$rsPostage[$j]->vField1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}#END FOR\n\t\t\t\t}#END IF\n\t\t\t\tif(SPECIAL_POSTAGE==1){\n\t\t\t\t\t$this->postagePrice+=$this->specialPrice;\n\t\t\t\t}else{\n\t\t\t\t\t$this->postagePrice=$this->specialPrice;\n\t\t\t\t}\n\t\t\t}#END IF\n\t\t} \n\t\t#CAR WEIGHT UPDATE\n\t\tif($this->newProductAdded==1){\t\n\t\t\t$this->cartWeight=$rsOrder[0]->fShipByWeightKg+$this->queryResult[0]->fItemWeight;\n\t\t}\n\t\t#CALCULATE WEIGHT PRICE\n\t\tif($this->newProductAdded==1){\n\t\t\t$this->cartWeightPrice+=$rsOrder[0]->fShipByWeightPrice;\n\t\t}\n \t\t\n\t\t#UPDATING WEIGHT PRICE\n\t\t$this->grandTotal+=$this->cartWeightPrice;\n\t\tif(VAT_POSTAGE_FLAG)\n\t\t$this->taxTotal+=$this->cartWeightPrice;\n\t\tif($this->grandTotal<0)\n\t\t{\n\t\t\t$this->grandTotal=0;\n\t\t}\n\t\t#HANDLING FREE SHIP PROMOTION DISCOUNT\n\t\tif($rsOrder[0]->vShipDescription!=\"Free P&amp;P\" && $this->notFreeCnt>0)\n\t\t{\n\t\t\t$this->grandTotal+=$this->postagePrice;\n\t\t\tif(VAT_POSTAGE_FLAG)\n\t\t\t$this->taxTotal+=$this->postagePrice;\n\t\t}\t\t\n\t\t\n\t\tif(!empty($rsOrder[0]->vDiscountCode))\n\t\t{\n\t\t\t$this->discountPrice=$this->comFunc->m_calculateDiscount($rsOrder[0]->vDiscountCode);\n\t\t}\n\t\tif(!empty($rsOrder[0]->iGiftcert_FK))\n\t\t{\n\t\t\t$this->giftCertPrice=$this->comFunc->m_calculateGiftCertPrice($rsOrder[0]->iGiftcert_FK);\n\t\t}\n\t\t#COD PRICE DISCOUNTABLE\n\t\t$this->grandTotal+=$rsOrder[0]->fCodCharge;\n\t\t#CHECK FOR DISCOUNTS\n\t\tif($this->discountPrice!=0)\n\t\t{\n\t\t\t$this->discountedPrice=$this->discountPrice*$this->grandTotal/100;\n\t\t\t$this->grandTotal-=$this->discountedPrice;\n\t\t\t$this->taxTotal-=$this->discountedPrice;\n\t\t}\n\t\t#CHECK FOR GIFTCERTIFICATES\n\t\tif($this->giftCertPrice!=0)\n\t\t{\n\t\t\tif($this->grandTotal<$this->giftCertPrice)\n\t\t\t{\n\t\t\t\t$this->giftCertPrice=$this->grandTotal;\n\t\t\t}\n\t\t\t$this->grandTotal-=$this->giftCertPrice;\n\t\t\t$this->taxTotal-=$this->giftCertPrice;\n\t\t}\n\t\t#SUBTRACTING MEMBER POINTS FROM VAT TOTAL\n\t\t$this->taxTotal-=$rsOrder[0]->fMemberPoints;\n\t\tif($this->taxTotal<0)\n\t\t{\n\t\t\t$this->taxTotal=0;\n\t\t}\n\t\t#VAT TAX\n\t\t$this->vatTotal=($rsOrder[0]->fTaxRate*$this->taxTotal)/100;\n\t\t\n\t\t$this->grandTotal+=$this->vatTotal;\n\t\t\n\t\tif($this->grandTotal<0)\n\t\t{\n\t\t\t$this->grandTotal=0;\n\t\t}\n\n\t\t$this->obDb->query=\"UPDATE \".ORDERS.\" SET \";\n\t\t$this->obDb->query.=\"fShipByWeightKg ='\".$this->cartWeight.\"',\";\n\t\t$this->obDb->query.=\"fShipByWeightPrice ='\".$this->cartWeightPrice.\"',\";\n\t\t$this->obDb->query.=\"fGiftcertTotal='\".$this->giftCertPrice.\"',\";\n\t\t$this->obDb->query.=\"fDiscount='\".$this->discountedPrice.\"',\";\n\t\t$this->obDb->query.=\"fTaxPrice ='\".$this->vatTotal.\"',\";\n\t\t$this->obDb->query.=\"fPromoValue='\".$promotionDiscount.\"',\";\n\t\t$this->obDb->query.=\"fTotalPrice='\".$this->grandTotal.\"',\";\n\t\t$this->obDb->query.=\"fShipTotal='\".$this->postagePrice.\"'\";\n\t\t$this->obDb->query.=\" WHERE iOrderid_PK='\".$this->request['orderid'].\"'\";\n\t\t$this->obDb->updateQuery();\n\n\t\t$this->libFunc->m_mosRedirect(SITE_URL.\"order/adminindex.php?action=orders.dspDetails&orderid=\".$rsOrder[0]->iInvoice);\t\n\t}", "title": "" }, { "docid": "2b5fe323c8f24142da28819d1554a42e", "score": "0.59694916", "text": "public function getQty()\n { \n return $this->qty;\n }", "title": "" }, { "docid": "4a38224720b18cd4756e734d4c663526", "score": "0.5871385", "text": "public function totalQuantity(){\r\n return $this->getCart()->totalQty;\r\n }", "title": "" }, { "docid": "eba9bc37577d084ddf70b70f5cee76cd", "score": "0.5867638", "text": "public static function viewPorductInpurchaseCar(){\n\n \t// It determines the product total for user\n \t$iduserController = $_SESSION[\"id\"];\n\n \t// VER PRODUCTOS EN EL CARRITO DE COMPRAS\n \t$answer = viewsProductsModel::viewPurchaseCarView($iduserController, \"carritocompras\");\n\n \t// VER EL SUB TOTAL\n \t// ----------------------------------------------- \n \t$totalPrice = viewsProductsModel::TotalSumPurchaseCarView($iduserController,\"carritocompras\");\n\n\n \t#CALCULO DE IVA\n \t#-------------------------------------------------------------------------\n \t $iva = iva::viewIvaModel(\"iva\");\n \t $totalIva= ($iva[\"iva\"] * $totalPrice[\"total\"]) / 100; \n \t#-------------------------------------------------------------------------\n\n \t // VER EL IMPUESTO DE ENVIO\n \t// ------------------------------------------------------------------------\n \t$answerTax = deliveryTaxModel::viewDeliveryTaxModel(\"envios\");\n \t$totalTax = $totalIva + $answerTax[\"tax\"] + $totalPrice[\"total\"];\n\n \t // TRAE EL VALOR DE LA TASA $ DEL DÍA\n \t // ------------------------------------------------------------------------\n \t $convertion = viewsProductsModel::conversionDollarModel(\"tasa\");\n\n \t // CONVERSION TOTAL EN $\n \t // ------------------------------------------------------------------------\n \t $totalConvertion = ($totalPrice['total']+ $totalIva + $answerTax[\"tax\"]) / $convertion[\"tasa\"];\n\n \t #TOTAL PURCHASE\n \t #-------------------------------------------------------------------------\n \t $totalPurchase = $totalIva+$totalPrice['total']+$answerTax[\"tax\"];\n\n \t #SI EL SUBTOTAL VIENE VACIO COLOCA LOS MONTOS EN CERO\nif ($totalPrice[\"total\"] == \"\") {\n\t \t$totalTax = 0;\n\t \t$totalPurchase =0;\n\t \t$totalConvertion=0;\n\n}\n\nif ($answerTax[\"tax\"]==0) {\n\n\t$tax = \"Gratis\";\n\t\n}\nelse {\n\t\t$tax = \"\";\n}\n\n\n \t$num = 0;\n \t\n \t\n\n\t \techo '<thead style=\"background:; font-family:Pavanam-Regular\">\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<th style=\"font-size: 15px; font-weight: bold\">Producto</th>\n\t\t\t\t\t<th style=\"font-size: 15px; font-weight: bold\">Cant.</th>\n\t\t\t\t\t<th style=\"font-size: 15px; font-weight: bold\">Precio</th>\n\t\t\t\t\t<th style=\"font-size: 15px; font-weight: bold\">Total</th>\n\t\t\t\t\t<th style=\"font-size: 15px; font-weight: bold;\"></th>\n\t\t\t\t</tr>\n\t\t\t</thead>';\n\n\t\t\tforeach ($answer as $row =>$item) {\n\t\t\t\t$num++;\n\n\t\t\t\n\t\t\techo '<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t<input type=\"text\" name=\"deleteProduct\" value=\"'.$item[\"idproduct\"].'\" style=\"display: none\">\n\t\t\t\t\t\n\t\t\t\t\t<td style=\"font-size: 14px; font-family:Pavanam-Regular; text-align:left\">'.$item[\"title\"].'</td>\n\t\t\t\t\t<td style=\"font-size: 14px; font-family:Pavanam-Regular; text-align: center\">'.$item[\"cant\"].'</td>\n\t\t\t\t\t<td style=\"font-size: 14px; font-family:Pavanam-Regular\">'.number_format($item[\"price\"], 0, \",\", \".\").' </td>\n\n\t\t\t\t\t<td style=\"font-size: 14px; font-family:Pavanam-Regular\">'.number_format($item[\"total\"], 0, \",\", \".\").' </td>\n\n\t\t\t\t\t\n\t\t\t\t\t<td><a href=\"#delete'.$num.'\" data-toggle=\"modal\">\n\t\t\t\t\t<button class=\"btn btn-danger fa fa-remove\"></button></a>\n\n\n\t\t\t\t<div class=\"modal fade\" id=\"delete'.$num.'\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" ariahidden=\"true\">\n\t\t\t\t<div class=\"modal-dialog\" role=\"document\" style=\"\">\n\t\t\t\t<div class=\"modal-content\">\n\t\t\t\t<div class=\"modal-header\">\n\t\t\t\t<button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-label=\"Close\">\n\t\t\t\t<span aria-hidden=\"true\">&times;</span> </button>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"modal-body\" style=\"text-align: center; margin: 0%;\">\n\n\t\t\t\t<h4>¿Desea borrar este producto?</h4>\n\t\t\t\t<br>\n\t\t\t\t<form method=\"post\" enctype=\"multipart/form-data\">\n\t\t\t\t<input type=\"text\" name=\"deleteIdProduct\" value=\"'.$item[\"idproduct\"].'\" style=\"display:none; \">\n\t\t\t\t<label for=\"productTitle\" class=\"col-sm-12 col-form-label\" style=\"font-size:20px;\" name =\"productTitle\">'.$item[\"title\"].'</label>\n\t\t\t\t<p>El producto se borarrá del carrito de compras</p>\n\n\t\t\t\t\n\n\t\t\t\t<div class=\"form-group row\">\n\n\t\t\t\t<br>\n\t\t\t\t<br>\n\n\t\t\t\t<div class=\"col-sm-6\">\n\t\t\t\t<button type=\"submit\" class=\"fa fa-check form-control btn-success\" \taria-label=\"close\"></button>\n\t\t\t\t</div>\n\t\t\t\t</form>\n\n\n\n\t\t\t\t<div class=\"col-sm-6\">\n\t\t\t\t<button type=\"button\" class=\"fa fa-close form-control btn-danger\" class=\"close\" data-dismiss=\"modal\" aria-label=\"close\"></button>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t</td>\t\n\n\n\t\t\t\t</tr>\n\t\t\t</tbody>';\t\n\n\t \t\t\t}\n\n\t \t\techo \n\t \t\t'<thead style=\"background:\">\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold\">Sub-Total</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">'.number_format($totalPrice['total'], 0, \",\", \".\").'</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">Bs</th> \t\n\t\t\t\n\t\t\t\t</tr>\n\t\t\t</thead>';\n\n\n\t\t\techo \n\t \t\t'<thead style=\"background:\">\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold\">Iva 12 %</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">'.number_format($totalIva, 0, \",\", \".\").'</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">Bs</th> \t\n\t\t\t\n\t\t\t\t</tr>\n\t\t\t</thead>';\n\n\n\t\t\techo \n\t \t\t'<thead style=\"background:\">\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold\">Envío '.$tax.' </th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">'.number_format($answerTax[\"tax\"], 0, \",\", \".\").'</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">Bs</th> \t\n\t\t\t\n\t\t\t\t</tr>\n\t\t\t</thead>';\n\n\t\t\techo\n\t\t\t '<thead style=\"background:\">\n\t\t\t\t<tr>\n\t\t\t\t\t\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold\">Total a pagar</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">'.number_format($totalPurchase, 0, \",\", \".\").'</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">Bs</th> \t\n\t\t\t\n\t\t\t\t</tr>\n\t\t\t</thead>';\n\n\n\n\t\t\t\techo \n\t \t\t'<thead style=\"background:\">\n\t\t\t\t<tr>\n\t\t\t\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 12px; font-weight: bold\"></th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold\">Cambio</th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">'.number_format($totalConvertion,2).' </th>\n\t\t\t\t\t<th style=\"font-size: 14px; font-weight: bold; font-family:Pavanam-Regular\">$</th> \t\n\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t</tr>\n\t\t\t</thead>';\n\t\t\n\t\n\n\n\t\t }", "title": "" }, { "docid": "e0ba163b49bb48c6a86c1342f40a4a5c", "score": "0.5861206", "text": "public function question1()\n\t{\n print_r(\"Question 1\\n\");\n $result = new ElectronicItems($this->items);\n $items = $result->getSortedItems('price');\n\n self::outputResult($items);\n echo 'Total price = ' . $result->getTotalPrice($items) . \"\\n\\n\";\n }", "title": "" }, { "docid": "cec4b98d42cc259bf6a9b229141f5aeb", "score": "0.58181113", "text": "public function quantity( $v = NULL );", "title": "" }, { "docid": "62a3981e2f889baa5e4368749755e37b", "score": "0.5810398", "text": "public function AddItemCharges() {\n\t$qRows = $this->RowCount();\n\t$nItemSaleTot = 0;\n\t$nItemShipTot = 0;\n\t$nPkgShip = 0;\n\t$sSaleText = NULL;\n\t$sShipText = NULL;\n\twhile ($this->NextRow()) {\n\t $rcItem = $this->ItemRecord();\n\n\t // accumulate item sale total\n\t $nItemSale = $this->LineAmount_ItemCost();\n\t $nItemSaleTot += $nItemSale;\n\t \t \n\t // accumulate item s/h total\n\t $nItemShip = $this->LineAmount_ItemShip();\n\t $nItemShipTot += $nItemShip;\n\n\t // assemble descriptions for totals\n\t if (!is_null($sSaleText)) {\n\t\t$sSaleText .= '+';\n\t\t$sShipText .= '+';\n\t }\n\t if ($qRows > 1) {\n\t\t$sSaleText .= '(';\n\t\t$sShipText .= '(';\n\t }\n\t $qty = $this->QtySold();\n\t $sSaleText .= $qty.'x'.$this->CostSale();\n\t $sShipText .= $qty.'x'.$this->ShipPerItem();\n\t if ($qRows > 1) {\n\t\t$sSaleText .= ')';\n\t\t$sShipText .= ')';\n\t }\n\n\t // calculate package s/h amount\n\t $nPkgShip_line = $this->ShipPerPackage();\n\t if ($nPkgShip_line > $nPkgShip) {\n\t\t$nPkgShip = $nPkgShip_line;\n\t }\n\t}\n\t\n\t$sDescr = 'SALE TOTAL: '.$sSaleText;\n\t$arTrx[] = $this->SpawnTransaction(vcraOrderTrxType::ITEM,$nItemSaleTot,$sDescr);\n\n\t$sDescr = 'PER-ITEM S/H: '.$sShipText;\n\t$arTrx[] = $this->SpawnTransaction(vcraOrderTrxType::SH_EA,$nItemShipTot,$sDescr);\n\t\n\t$sDescr = 'PER-PACKAGE S/H';\n\t$arTrx[] = $this->SpawnTransaction(vcraOrderTrxType::SH_PK,$nPkgShip,$sDescr);\n\t\n\treturn $arTrx;\n }", "title": "" }, { "docid": "0edbf4456e29ca147e9f0810f2550887", "score": "0.5800325", "text": "public function getQty()\n {\n \treturn Mage::helper('ajaxcart')->getQty($this, parent::getQty()); \n }", "title": "" }, { "docid": "06c07423fd99782d3fb9d04e9e1ca997", "score": "0.5799183", "text": "public function getStock(PracticeProductItem $practiceProductItem);", "title": "" }, { "docid": "b8aa157bf132b300b94be5d35ea2dcc7", "score": "0.5794555", "text": "public function getQuantity(): QuantityInterface;", "title": "" }, { "docid": "797d1054e1f5ac4d7b44e51e7a58a51b", "score": "0.5764385", "text": "function showItem($id, $prodName, $price, $qty) {\n echo \"<tr>\\n\";\n echo \"<td>$prodName</td>\\n<td>$\".number_format($price, 2).\"</td>\\n<td>\";\n $f = new FormLib();\n $data = array();\n for ($i = 1; $i <= MAX_QTY; $i++) {\n $data[$i] = $i;\n }\n echo \"</tr>\\n\";\n }", "title": "" }, { "docid": "a9198a61aed90c0b7fadaa690ea567f2", "score": "0.57190865", "text": "public function getQuantidade() {\n return $this->nQuantidade;\n }", "title": "" }, { "docid": "e473300665e9a4b7377dbc2eb7faf132", "score": "0.57101965", "text": "public function price();", "title": "" }, { "docid": "10a7f05fd4e56b331e394db6b877258c", "score": "0.5700164", "text": "public static function getQuantityClassName(): string;", "title": "" }, { "docid": "d1684829240db916f0cb8ca6056ec824", "score": "0.5700059", "text": "public function getPrice ()\n\t{\n\n\t\t$cost = 'Error';\n\n\t\t$upsAction = \"3\"; //3 Price a Single Product OR 4 Shop entire UPS product range\n\t\t$upsProduct = $this->shipping_type; //set UPS Product Code See Chart Above\n\t\t$OriginPostalCode = $this->postal_from; //zip code from where the client will ship from\n\t\t$DestZipCode = $this->postal_to; //set where product is to be sent\n\t\t$PackageWeight = $this->weight; //weight of product\n\t\t$OrigCountry = \"US\"; //country where client will ship from\n\t\t$DestCountry = $this->country_to; //set to country whaere product is to be sent\n\t\t$RateChart = \"Regular+Daily+Pickup\"; //set to how customer wants UPS to collect the product\n\t\t$Container = \"00\"; //Set to Client Shipping package type\n\t\t$ResCom = \"2\"; //See ResCom Table\n\n\t\t$port = 80;\n\t\t$domain = \"www.ups.com\";\n\t\t$request = \"/using/services/rave/qcostcgi.cgi\";\n\t\t$request .= \"?\";\n\t\t$request .= \"accept_UPS_license_agreement=yes\";\n\t\t$request .= \"&\";\n\t\t$request .= \"10_action=$upsAction\";\n\t\t$request .= \"&\";\n\t\t$request .= \"13_product=$upsProduct\";\n\t\t$request .= \"&\";\n\t\t$request .= \"14_origCountry=$OrigCountry\";\n\t\t$request .= \"&\";\n\t\t$request .= \"15_origPostal=$OriginPostalCode\";\n\t\t$request .= \"&\";\n\t\t$request .= \"19_destPostal=$DestZipCode\";\n\t\t$request .= \"&\";\n\t\t$request .= \"22_destCountry=$DestCountry\";\n\t\t$request .= \"&\";\n\t\t$request .= \"23_weight=$PackageWeight\";\n\t\t$request .= \"&\";\n\t\t$request .= \"47_rateChart=$RateChart\";\n\t\t$request .= \"&\";\n\t\t$request .= \"48_container=$Container\";\n\t\t$request .= \"&\";\n\t\t$request .= \"49_residential=$ResCom\";\n\n\t\t$errcode = '';\n\t\t$url = \"http://$domain$request\";\n\t\t$buffer = file_get_contents($url);\n\t\tif (substr($buffer, 0, 9) == 'UPSOnLine') {\n\t\t\t$result = explode(\"%\", $buffer);\n\t\t\t$errcode = substr(\"$result[0]\", -1);\n\t\t\tif (in_array ($errcode, array ('3', '4', '5', '6'))) {\n\t\t\t\t$cost = trim ($result[8]);\n\t\t\t}\n\t\t}\n\t\t/*\n\t\t echo \"<!--\\n\";\n\t\t echo \"UPS Shipping:\\n\";\n\t\t echo \"URL=$url\\n\";\n\t\t echo \"BUFFER=$buffer\\n\";\n\t\t echo \"COST=$cost\\n\";\n\t\t echo \"ERRCODE=$errcode\\n\";\n\t\t echo \"-->\\n\";\n\t\t */\n\t\treturn $cost;\n\t}", "title": "" }, { "docid": "66fb5456d39db6870a81ad097a024641", "score": "0.5689146", "text": "public function toString()\n {\n return 'Default qty for sub products in grouped product displays according to dataset on product page.';\n }", "title": "" }, { "docid": "062fb9c794745f15131bb42c75ddae07", "score": "0.5663257", "text": "public function qk(){\r\n\t $bonus->qd();\t\t//清空签到\r\n \t$bonus->fhsf();\t\t//查看孵化仓\r\n \t$bonus->fhc();\t\t//孵化仓升息\r\n $bonus->moneyup(); //币价升值\r\n $this->success(\"孵化仓生息成功\");\r\n }", "title": "" }, { "docid": "06a7dfafff03bafacbcd710af87d7559", "score": "0.56589496", "text": "public function getSubtotalPrice();", "title": "" }, { "docid": "2cf24216f3426b7a8066af426df5c289", "score": "0.5654678", "text": "public function getQuantidad()\n {\n return $this->quantidad;\n }", "title": "" }, { "docid": "73cf442c7f9765dccc8047fb7471f847", "score": "0.56541055", "text": "function get_order_info($product_id, $product_type)\n{\n global $order_info;\n global $db;\n\n $dp = new TMySQLQuery;\n $dp->connection = $db;\n $dt = new TMySQLQuery;\n $dt->connection = $db;\n $order_info[\"product_subtotal\"] = 0;\n $order_info[\"product_shipping\"] = 0;\n $order_info[\"product_discount\"] = 0;\n $order_info[\"product_tax\"] = 0;\n $order_info[\"product_total\"] = 0;\n $order_info[\"product_name\"] = 0;\n\n if ($product_type == \"credits\") {\n $sql = \"select credits,title from credits_list where id_parent=\" . (int)$product_id;\n $dp->open($sql);\n if (!$dp->eof) {\n $sql = \"select price from credits where id_parent=\" . $dp->row[\"credits\"];\n $dt->open($sql);\n if (!$dt->eof) {\n $order_info[\"product_total\"] = $dt->row[\"price\"];\n $order_info[\"product_subtotal\"] = $order_info[\"product_total\"];\n }\n }\n }\n\n if ($product_type == \"subscription\") {\n $sql = \"select subscription,title from subscription_list where id_parent=\" . (int)$product_id;\n $dp->open($sql);\n if (!$dp->eof) {\n $sql = \"select price from subscription where id_parent=\" . $dp->row[\"subscription\"];\n $dt->open($sql);\n if (!$dt->eof) {\n $order_info[\"product_total\"] = $dt->row[\"price\"];\n $order_info[\"product_subtotal\"] = $order_info[\"product_total\"];\n }\n }\n }\n\n if ($product_type == \"order\") {\n $sql = \"select total,subtotal,discount,shipping,tax,id from orders where id=\" . (int)$product_id;\n $dp->open($sql);\n if (!$dp->eof) {\n $order_info[\"product_total\"] = $dp->row[\"total\"];\n $order_info[\"product_subtotal\"] = $dp->row[\"subtotal\"];\n $order_info[\"product_shipping\"] = $dp->row[\"shipping\"];\n $order_info[\"product_tax\"] = $dp->row[\"tax\"];\n $order_info[\"product_discount\"] = $dp->row[\"discount\"];\n }\n }\n\n\n}", "title": "" }, { "docid": "23c741f365ac553faa5dccc5db6ee059", "score": "0.5636343", "text": "public function getQuantity(): int\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "7a674d9cbc4c781c2d0eb73ed0c88fd7", "score": "0.5626593", "text": "public static function TotalChild($pro_id = 0 , $qnt = 0,$conf = array())\n\t\t{\n\t\t\t$disc = 0;$totalRow = 0;$fees = 0;$ResArr = array();\n\t\t\t\n\t\t\t$offer = Orders::GetProdOffer($pro_id);\n\t\t\t$ProdData = Orders::GetProdData($pro_id);\n\t\t\t$BuPayType = Orders::GetBuPayType($ProdData['BUID']);\n\t\t\t\n\t\t\t$price = $ProdData['ProdPrice'];\n\t\t\t$totalRow = $price * $qnt;\n\t\t\t\n\t\t\tif(!empty($conf)){\n\t\t\t\t\t\n\t\t\t\t$SumCoSql = \" SELECT IFNULL(SUM(pdconfv_value * \".$qnt.\"),0) AS ConfVal FROM pd_conf_v WHERE pdconfv_id IN (\".implode(',',$conf).\")\";\n\t\t\t\t$SumCoData = Yii::app() -> db -> createCommand($SumCoSql)->queryRow();\n\t\t\t\t\n\t\t\t\tif(!empty($SumCoData)){\n\t\t\t\t\t$fees = $SumCoData['ConfVal'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$totalRow = $totalRow + $fees ;\n\t\t\t\n\t\t\tif(isset($offer) && !empty($offer)){\n\t\t\t\t\n\t\t\t\t$disc = $offer['discount'];\n\t\t\t\t\n\t\t\t\t$disc_val = $totalRow * ($disc / 100);\n\t\t\t\t\n\t\t\t\t$totalRow = $totalRow - $disc_val ;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t$ResArr['item'] = $ProdData['ProdName'];\n\t\t\t$ResArr['price'] = $ProdData['ProdPrice'];\n\t\t\t$ResArr['Buid'] = $ProdData['BUID'];\n\t\t\t$ResArr['BuPayType'] = $BuPayType;\n\t\t\t$ResArr['discount'] = $disc;\n\t\t\t$ResArr['fees'] = $fees;\n\t\t\t$ResArr['f_price'] = $totalRow;\n\t\t\t\n\t\t\t/*\n\t\t\t$CurrArr = Currency::ConvertCurrency($ProdData['BUCurrency'], $curr, $totalRow);\n\t\t\t$c_price = $CurrArr['ValTo'];\n\t\t\t\n\t\t\t$ResArr['c_price'] = $c_price;\n\t\t\t\n\t\t\t$CurrArr = Currency::ConvertCurrency($ProdData['BUCurrency'], 'USD', $totalRow);\n\t\t\t$USD_price = $CurrArr['ValTo'];\n\t\t\t\n\t\t\t$ResArr['USD_price'] = $USD_price;*/\n\t\t\t\n\t\t\t\n\t\t\treturn $ResArr;\n\t\t}", "title": "" }, { "docid": "064a8f3d664ae9da6bae48f993f5f6b7", "score": "0.56146306", "text": "protected function _getItemData()\n {\n $data = $this->getRequest()->getParam('creditmemo');\n if (!$data) {\n $data = Mage::getSingleton('adminhtml/session')->getFormData(true);\n }\n\n if (isset($data['items'])) {\n\t\t\t \n if(Mage::getStoreConfig('carebyzinc/general/enabled')){\n\t\t\t\tforeach($data['items'] as $key=>$value){\n\t\t\t\t\t$orderItem = Mage::getModel('sales/order_item')->load($key);\n\t\t\t\t\tif($orderItem->getProductId() == Mage::getStoreConfig('carebyzinc/general/warranty_product')){\n\t\t\t\t\t\tif($data['items'][$key]['qty']==0){\n\t\t\t\t\t\t\tif($data['items'][$orderItem->getCarebyzincParentid()]['qty'] == 0){}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$data['items'][$key]['qty'] = 1;\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\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\t\n\t\t\t}\n\t\t\t$qtys = $data['items'];\n\t\t\t\n } else {\n $qtys = array();\n }\n return $qtys;\n }", "title": "" }, { "docid": "905507f29b9f1b5fa453c8475d6f4496", "score": "0.5608544", "text": "public function getCartData();", "title": "" }, { "docid": "c37ec0281799fa3e7d0927d9577cdebd", "score": "0.56017536", "text": "public final function getQuantidade() {\n return $this->nQuantidade;\n }", "title": "" }, { "docid": "63e69ef7c68dffd80ef5d072704bfff9", "score": "0.5600601", "text": "public function getDiscountedPricePerQuantity();", "title": "" }, { "docid": "0fc94bfe7e6f373b77d49df822f47032", "score": "0.5597461", "text": "public function getQuantity()\n {\n return $this->Quantity;\n }", "title": "" }, { "docid": "d2cf627da17d676ed97e910faa771e34", "score": "0.5589644", "text": "public function getQuantite()\n {\n return $this->quantite;\n }", "title": "" }, { "docid": "bb7c48c4692e6e7c30a3a6680825a378", "score": "0.5566874", "text": "public function getReadablePriceInfo() {\n if (is_null($this->getId())) {\n return \"\";\n }\n $small = 100000;\n $big = 0;\n $small_size = \"\";\n $big_size = \"\";\n foreach ($this->getSizes() as $size) {\n $cost = intval($size['cost']);\n\n if ($small > $cost) {\n $small = $cost;\n $small_size = $size['name'];\n }\n\n if ($big < $cost) {\n $big = $cost;\n $big_size = $size['name'];\n }\n }\n\n if ($big == $small) {\n return intToPrice($big) . \" &euro;\";\n } else {\n return sprintf(\"von %s&euro; (%s) bis %s&euro; (%s)\", intToPrice($small), $small_size, intToPrice($big), $big_size\n );\n }\n }", "title": "" }, { "docid": "efd31b94f3c3c34eff41f975df5ff5e6", "score": "0.55666137", "text": "function invoiced_quantity($CPI_id, $item_id)\n\t\t{\n\t\t\t$ci =& get_instance();\n\t\t $ci->load->database();\n\n\t\t\t$quantity = $ci->db->select_sum('qty_per_box')->get_where('packing_list_item',array( 'cust_pi'=> $CPI_id, 'item_id'=> $item_id ))->row('qty_per_box');\n\n\t\t\tif(!$quantity)\n\t\t\t\t{\n\t\t\t\t\t$quantity = 0;\n\t\t\t\t}\n\n\t\t\treturn $quantity;\n\t\t}", "title": "" }, { "docid": "e5aa29acca6d4aae9b3e66bc36ae4d11", "score": "0.5559345", "text": "public function getDiscountsPerQuantity() : DiscountsPerQuantity;", "title": "" }, { "docid": "0f29f6f2e5ed8d94b40aba3fc36b3be8", "score": "0.5547211", "text": "public function calculateStock() {\r\n $this->stock = $this->livestock + $this->crops;\r\n }", "title": "" }, { "docid": "7230ba129b7dc4459f85f9e626062996", "score": "0.55455154", "text": "public function getQuantidade(): int;", "title": "" }, { "docid": "08c8636571b610ecdf1243db61bfd558", "score": "0.5542977", "text": "public function getAvailableStock();", "title": "" }, { "docid": "936c02c9cdaa3dea5124a2510957ab79", "score": "0.5540182", "text": "function yv_order_item_quantity_html( $str, $item ) {\n\treturn '<strong class=\"product-quantity\">' . sprintf( 'Qty: %s', $item->get_quantity() ) . '</strong>';\n}", "title": "" }, { "docid": "bbbd94ade4c154422fdbd2b0eb3294d1", "score": "0.55400926", "text": "function getFormulationQtyPKG($company_id,$material_id,$b_id,$wh){\n\t$Get_set_PKG = mysql_query(\"SELECT * FROM `tbl_formulation_header_feeds` WHERE company_id = '$company_id' AND branch_id = '$b_id' AND `packaging_material_id` = '$material_id' AND isDefault = '1' AND warehouse_id = '$wh'\");\n\n\twhile ($row = mysql_fetch_array($Get_set_PKG)) {\n\t\t$getFPJ = mysql_fetch_array(mysql_query(\"SELECT * FROM tbl_fp_projection_feeds WHERE company_id = '$company_id' AND product_id = '$row[finish_stock_id]'\"));\n\t\t$FPJqty = $getFPJ['quantity'];\n\t}\n\n\treturn $FPJqty;\n\n}", "title": "" }, { "docid": "6c998347dca551a325a0c812a3c31a94", "score": "0.5538076", "text": "public function getStockData() //cRud\n {\n //$stockData->poll_question =\"just testing...\"; // om te testen zonder database\n //$stockData->yes =0; // om te testen zonder database\n //$stockData->no=0; // om te testen zonder database\n\n $sql = \"SELECT product, aankoop, verkoop FROM voorraad WHERE SKU =1\";\n $statement = $this->db->prepare($sql);\n $statement-> execute();\n $stockData = $statement->fetchObject();\n $stockData->voorraad =$stockData->aankoop - $stockData->verkoop;\n if($stockData->voorraad < 5) {\n $stockData->waarschuwing = '<li class=\"list-group-item\">Voorraad is laag ! Bijbestellen aub</li>';\n } else {$stockData->waarschuwing = ''; }\n\n\n return $stockData;\n }", "title": "" }, { "docid": "baac06b941b4a1e169ba1b0d47eb39b7", "score": "0.55354804", "text": "abstract public function getInfoProduk();", "title": "" }, { "docid": "99345a51c93cc83d91fdbb191e9294c4", "score": "0.5512511", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "1c02799cb169f90d8329b41e350928d3", "score": "0.5509359", "text": "public function toString()\n {\n return 'Product qty was decreased after creditmemo creation.';\n }", "title": "" }, { "docid": "706c6953af38ad531da7ad22d72c24b5", "score": "0.55030316", "text": "public function getPrice()\n {\n }", "title": "" }, { "docid": "0512d72cae6e7107adff9f30302639d0", "score": "0.55009294", "text": "public function execute()\n { \n $quoteName = $this->getRequest()->getParam('quote-name');\n $commentText = $this->getRequest()->getParam('quote-message');\n \n $quoteId = $this->getRequest()->getParam('quote_id');\n \n if ($quoteId) {\n try {\n $files = $this->fileProcessor->getFiles();\n $quote = $this->quoteRepository->get($quoteId, ['*']);\n $items = $quote->getAllItems();\n $this->removeAddresses($quote);\n $grandTotal =0; \n foreach ($items as $item) {\n $item = $quote->getItemById($item->getId());\n if ($item->getParentItem()) {\n $item = $item->getParentItem();\n }\n if (!$item) {\n continue;\n }\n \n $expectedType = $this->getRequest()->getParam('expected-type-'.$item->getId());\n $expectedPrice = $this->getRequest()->getParam('expected-price-'.$item->getId());\n if($expectedType == 'amount') {\n if($expectedPrice && $expectedPrice < $item->getPrice() && $expectedPrice > 0 ) { \n /*\n $item->setCustomPrice($expectedPrice);\n $item->setOriginalCustomPrice($expectedPrice);\n $item->getProduct()->setIsSuperMode(true);\n $item->calcRowTotal();\n $item->checkData();\n $item->save(); \n */\n $params = array( \n 'qty' => $item->getQty(),\n 'custom_price' => $expectedPrice,\n 'original_custom_price' => $expectedPrice\n );\n $quote->updateItem($item->getId(),$params);\n\n }\n } else if($expectedType == 'percentage') {\n if($expectedPrice && $expectedPrice < 100 && $expectedPrice > 0 ) {\n $expectedPrice = $item->getPrice() - ($expectedPrice/100)*$item->getPrice();\n /*\n $item->setCustomPrice($expectedPrice);\n $item->setOriginalCustomPrice($expectedPrice);\n $item->getProduct()->setIsSuperMode(true);\n $item->calcRowTotal();\n $item->checkData();\n $item->save(); \n */\n $params = array( \n 'qty' => $item->getQty(),\n 'custom_price' => $expectedPrice,\n 'original_custom_price' => $expectedPrice\n );\n $quote->updateItem($item->getId(),$params);\n\n }\n }\n \n } \n// $quote->setTotalsCollectedFlag(false)->collectTotals()->save(); \n// $this->quoteRepository->save($quote);\n \n $this->negotiableQuoteManagement->create($quoteId, $quoteName, $commentText, $files); \n $this->checkoutSession->clearQuote(); \n $url = $this->_url->getUrl('rquotation/quote/success/quote_id/'.$quoteId); \n $this->_redirect($url); \n } catch (\\Magento\\Framework\\Exception\\LocalizedException $e) {\n $this->messageManager->addErrorMessage($e->getMessage()); \n $this->_redirect('negotiable_quote/quote');\n } catch (\\Exception $e) {\n $this->messageManager->addExceptionMessage(\n $e,\n __('The quote could not be created. Please try again later.')\n );\n $this->_redirect('negotiable_quote/quote');\n }\n } \n }", "title": "" }, { "docid": "4b1ed52d35a56cf4035671d9abe9ee22", "score": "0.5499372", "text": "public function getQuantity() \n\t{\n\t\treturn $this->_quantity;\n\t}", "title": "" }, { "docid": "4b1ed52d35a56cf4035671d9abe9ee22", "score": "0.5499372", "text": "public function getQuantity() \n\t{\n\t\treturn $this->_quantity;\n\t}", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "a52ff91d801cd84b835eb55c35b5659e", "score": "0.5497779", "text": "public function getQuantity()\n {\n return $this->quantity;\n }", "title": "" }, { "docid": "6392e1679b5e34862c5dd9cb5c53699a", "score": "0.54847044", "text": "protected function GetItemCost()\n { $cartContent = array();\n\n $sess = $this->session->Open();\n\n if( isset( $sess[ 'cart' ] ) )\n {\n $cartContent = $sess[ 'cart' ];\n }\n\n unset( $sess );\n\n $totalPrice = '0.0';\n\n foreach( $cartContent as $prodId => $unitCount )\n {\n $prod = $this->app->db->GetProduct( $prodId );\n $totalPrice = bcadd( $totalPrice, $prod->GetPrice( $unitCount ), 2 );\n }\n\n return $totalPrice;\n }", "title": "" }, { "docid": "f51133cdbbda531669837972c3d65690", "score": "0.54801935", "text": "public function getFormFields() {\n\t\t// the amount shown in the cart (ensure same rounding methods are used etc).\n\t\t// Magento uses a fixed value of 2 decimal places.\n\t\t// CityPay system requires amount in minor units, to get this from number_format pass both the\n\t\t// decimal and thousands seperator as empty strings and then cast the result to an int.\n\t\t$price\t\t= (int)number_format($this->getOrder()->getGrandTotal(),2,'','');\n\t\t$currency\t= $this->getOrder()->getOrderCurrencyCode();\n\t\t$billing\t= $this->getOrder()->getBillingAddress();\n\t\t$conf\t\t= $this->getCurrencyConfig($currency);\n\n\t\tif (is_array($conf) && !empty($conf)) {\n\t\t\t$mid\t= (int)$conf[0];\t// Ensure merchant ID is an int and not a string\n\t\t\t$key\t= $conf[1];\n\t\t} else {\n\t\t\t$message = 'Currency '.$currency.' not configured';\n\t\t\tMage::throwException($message);\n\t\t}\n\t\t$locale = explode('_', Mage::app()->getLocale()->getLocaleCode());\n\t\tif (is_array($locale) && !empty($locale)) {\n\t\t\t$locale = $locale[0];\n\t\t} else {\n\t\t\t$locale = $this->getDefaultLocale();\n\t\t}\n\t\t$order_id = $this->getOrder()->getRealOrderId();\n\n\t\t// Use product description as transaction description if only 1 item has been\n\t\t// ordered, otherwise use the generic pre-configured transaction description.\n\t\t$items=$this->getOrder()->getAllVisibleItems();\n\t\t$tran_desc='';\n\t\tif (count($items)==1) {\n\t\t\tforeach ($items as $item) {\n\t\t\t\tif ($item->getQtyOrdered()==1) {\n\t\t\t\t\t$tran_desc=trim($item->getName());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (empty($tran_desc)) {\n\t\t\t$tran_desc = trim($this->getConfigData('tran_desc'));\n\t\t\tif (empty($tran_desc) || (strcasecmp($tran_desc,'Your purchase from StoreName')==0)) {\n\t\t\t\t$tran_desc = 'Your purchase from '.Mage::app()->getStore()->getName();\n\t\t\t}\n\t\t\t$tran_desc = str_replace('{order}', $order_id, $tran_desc);\n\t\t}\n\n\n\t\t$params =\tarray(\n\t\t\t'merchantid'\t=> $mid,\n\t\t\t'licenceKey'\t=> $key,\n\t\t\t'identifier'\t=> $order_id,\n\t\t\t'amount'\t=> $price,\n\t\t\t//'test'\t=> 'simulator',\n\t\t\t'test'\t\t=> ($this->getConfigData('transaction_testmode') == '0') ? 'false' : 'true',\n\t\t\t'clientVersion'\t=> 'Magento '.Mage::getVersion(),\n\t\t\t'cardholder'\t=> array(\n\t\t\t\t'firstName'\t=> Mage::helper('core')->removeAccents($billing->getFirstname()),\n\t\t\t\t'lastName'\t=> Mage::helper('core')->removeAccents($billing->getLastname()),\n\t\t\t\t'email'\t\t=> $this->getOrder()->getCustomerEmail(),\n\t\t\t\t//'phone'\t=> $billing->getTelephone(),\n\t\t\t\t'address'\t=> array (\n\t\t\t\t\t'address1'\t=> Mage::helper('core')->removeAccents($billing->getStreet(1)),\n\t\t\t\t\t'address2'\t=> Mage::helper('core')->removeAccents($billing->getStreet(2)),\n\t\t\t\t\t'address3'\t=> Mage::helper('core')->removeAccents($billing->getCity()),\n\t\t\t\t\t'area'\t\t=> Mage::helper('core')->removeAccents($billing->getRegion()),\n\t\t\t\t\t'postcode'\t=> $billing->getPostcode(),\n\t\t\t\t\t'country'\t=> $billing->getCountry())\n\t\t\t\t),\n\t\t\t'cart'\t\t=> array(\n\t\t\t\t'productInformation'\t=> $tran_desc),\n\t\t\t'config'\t=> array(\n\t\t\t\t'lockParams'\t=> array('cardholder'),\n\t\t\t\t'redirect_params' => false,\n\t\t\t\t'postback_policy' => 'sync',\n\t\t\t\t'postback' => $this->_buildUrl('paylink/processing/response'),\n\t\t\t\t'redirect_success' => $this->_buildUrl('paylink/processing/success'),\n\t\t\t\t'redirect_failure' => $this->_buildUrl('paylink/processing/cancel'))\n\t\t);\n\n\t\t$json= json_encode($params);\n\t\t$client = new Varien_Http_Client();\n\t\t$result = new Varien_Object();\n\t\t$client->setUri('https://secure.citypay.com/paylink3/create')\n\t\t\t->setMethod(Zend_Http_Client::POST)\n\t\t\t->setConfig(array('timeout'=>30));\n\t\t$client->setRawData($json, \"application/json;charset=UTF-8\");\n\n\t\ttry {\n\t\t\t$response = $client->request();\n\t\t\t$responseBody = $response->getBody();\n\t\t} catch (Exception $e) {\n\t\t\t$result->setResponseCode(-1)\n\t\t\t\t->setResponseReasonCode($e->getCode())\n\t\t\t\t->setResponseReasonText($e->getMessage());\n\t\t\t//Mage::log($result->getData());\n\t\t\tMage::throwException('Error connecting to PayLink');\n\t\t}\n\n\t\t$results = json_decode($responseBody,true); \n\t\tif ($results['result']!=1) {\n\t\t\tMage::throwException('Invalid response from PayLink');\n\t\t}\n\t\t$paylink_url=$results['url'];\n\t\tif (empty($paylink_url)) {\n\t\t\tMage::throwException('No URL obtained from PayLink');\n\t\t}\n\t\treturn $paylink_url;\n\t}", "title": "" }, { "docid": "d58462edf0e112e00740b21ed5561e81", "score": "0.54679424", "text": "function shopping_cart_calculate($idx, $cart='default'){\n\tglobal $shopping_cart, $fl, $ln, $qr, $productTable, $_settings, $addCartMode, $GPPSchema, $developerEmail, $fromHdrBugs;\n\t$shopping_cart_calculate_version='1.00';\n\tif(!($a=$_SESSION['shopCartSubItems'][$cart][$idx])){\n\t\treturn false;\n\t}\n\n\n\t//------------------------- codeblock \"Tasmanian Devil\" ----------------------------------\n\t//2013-04-24: new coding - this correctly calculates any combination\n\t$setPrices=$scalable=$scalablePrices=$scaledPrices=$lastPrice=$listTotal=$packageTotal=0;\n\t$i=0;\n\t$pricingType=strtolower($rdp['PricingType']);\n\tforeach($a as $n=>$v){\n\t\t$comparison=$a[$n]['comparison']=($v['SalePrice']>0 ? $v['SalePrice'] : $v['RetailPrice']);\n\t\t$childPricingType=$a[$n]['PricingType']=strtolower($v['PricingType']);\n\t\tif($pricingType=='no price change'){\n\t\t\tif($v['BonusItem']){\n\t\t\t\t//------------ cblock 1 -------------\n\t\t\t\tif($childPricingType=='free'){\n\t\t\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $comparison,2);\n\t\t\t\t\t$a[$n]['YourPriceColumn']=round(0,2);\n\t\t\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\t\t\t$packageTotal+=0;\n\t\t\t\t}else if($childPricingType=='price'){\n\t\t\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $comparison,2);\n\t\t\t\t\t$a[$n]['YourPriceColumn']=round($v['Quantity'] * $v['PriceValue'],2);\n\t\t\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\t\t\t$packageTotal+=$a[$n]['YourPriceColumn'];\n\t\t\t\t}else if($childPricingType=='percent'){\n\t\t\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $comparison,2);\n\t\t\t\t\t$a[$n]['YourPriceColumn']=round($v['Quantity'] * $comparison * (1 - $v['PriceValue']/100),2);\n\t\t\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\t\t\t$packageTotal+=$a[$n]['YourPriceColumn'];\n\t\t\t\t}\n\t\t\t\t$setPrices+=$a[$n]['YourPriceColumn'];\n\t\t\t\t//------------------------------------\n\t\t\t}else{\n\t\t\t\t//\n\t\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $v['RetailPrice'],2);\n\t\t\t\t$a[$n]['YourPriceColumn']=round($v['Quantity'] * ($v['SalePrice']>0?$v['SalePrice']:$v['RetailPrice']),2);\n\t\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\t\t$packageTotal+=$a[$n]['YourPriceColumn'];\n\t\t\t\t$scaledPrices+=$a[$n]['YourPriceColumn'];\n\t\t\t}\n\t\t}else if($pricingType=='specific package price'){\n\t\t\tif($v['BonusItem']){\n\t\t\t\t//these are NOT adjusted based on the package price\n\t\t\t\t//------------ cblock 1 -------------\n\t\t\t\tif($childPricingType=='free'){\n\t\t\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $comparison,2);\n\t\t\t\t\t$a[$n]['YourPriceColumn']=round(0,2);\n\t\t\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\t\t\t$packageTotal+=0;\n\t\t\t\t}else if($childPricingType=='price'){\n\t\t\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $comparison,2);\n\t\t\t\t\t$a[$n]['YourPriceColumn']=round($v['Quantity'] * $v['PriceValue'],2);\n\t\t\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\t\t\t$packageTotal+=$a[$n]['YourPriceColumn'];\n\t\t\t\t}else if($childPricingType=='percent'){\n\t\t\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $comparison,2);\n\t\t\t\t\t$a[$n]['YourPriceColumn']=round($v['Quantity'] * $comparison * (1 - $v['PriceValue']/100),2);\n\t\t\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\t\t\t$packageTotal+=$a[$n]['YourPriceColumn'];\n\t\t\t\t}\n\t\t\t\t$setPrices+=$a[$n]['YourPriceColumn'];\n\t\t\t\t//------------------------------------\n\t\t\t}else{\n\t\t\t\t$scalable++;\n\t\t\t\t$scalablePrices+=round($v['Quantity'] * $comparison,2);\n\t\t\t\tcontinue;//calculated later\n\t\t\t}\n\t\t}\n\t}\n\tif($pricingType=='specific package price'){\n\t\t$rootPrice=($rdp['SalePrice']>0?$rdp['SalePrice']:$rdp['RetailPrice']);\n\t\tforeach($a as $n=>$v){\n\t\t\tif($v['BonusItem'])continue;\n\t\t\t$i++;\n\t\t\t$comparison=$a[$n]['comparison']=($v['SalePrice']>0 ? $v['SalePrice'] : $v['RetailPrice']);\n\t\t\t$a[$n]['ListPriceColumn']=round($v['Quantity'] * $comparison,2);\n\t\t\t$listTotal+=$a[$n]['ListPriceColumn'];\n\t\t\tif($i<$scalable){\n\t\t\t\t$a[$n]['YourPriceColumn']=round(\n\t\t\t\t/*your price = comparison price * ( package price - setPrices / scalablePrices )*/\n\t\t\t\t$v['Quantity'] * $comparison * ($rootPrice - $setPrices)/$scalablePrices\n\t\t\t\t,2);\n\t\t\t\t$packageTotal+=$a[$n]['YourPriceColumn'];\n\t\t\t\t$scaledPrices+=$a[$n]['YourPriceColumn'];\n\t\t\t}else{\n\t\t\t\t//last item - whatever is left\n\t\t\t\t$lastPrice = $a[$n]['YourPriceColumn']=$rootPrice - $setPrices - $scaledPrices;\n\t\t\t\t$packageTotal+=$a[$n]['YourPriceColumn'];\n\t\t\t}\n\t\t}\n\t}\n\t//-------------------------------------------------------------------------------------------\n\t\n\t\n}", "title": "" }, { "docid": "2fc89da7acb569e8de9c6d656dc01af2", "score": "0.5467502", "text": "function addMjobPrice(){\n if( isset($_REQUEST['jid']) ){\n $mjob = mJobAction()->get_mjob($_REQUEST['jid']);\n if( !empty($mjob) ) {\n return $mjob->et_budget_text;\n }\n }\n return '[service-price]';\n}", "title": "" }, { "docid": "99d8b71eca4477f236e23a6415e9e2c5", "score": "0.5459408", "text": "public function getCostTotals();", "title": "" }, { "docid": "7541785598de9c50574e5a204b88154b", "score": "0.5458309", "text": "public function price()\n {\n echo \" price:10000\";\n }", "title": "" }, { "docid": "7a48c803def89e7c60e94ae90edf0225", "score": "0.54552555", "text": "public function getAvailableStock(): float;", "title": "" }, { "docid": "0d8c19d502760ec4446103412ada23d3", "score": "0.5454089", "text": "public function toString()\n {\n return 'Product price was correctly.';\n }", "title": "" }, { "docid": "2903571f7528a5d2310b961ca3152173", "score": "0.545004", "text": "public function toString()\n {\n return 'Product qtys are correct.';\n }", "title": "" }, { "docid": "496212bbb77cae6f8c2b0df24ac334c2", "score": "0.5448287", "text": "function getsizeqty()\n {\n $this->autoLayout = false;\n $this->autoRender = false;\n $itemId = $_POST['id'];\n $seltsize = $_POST['size'];\n $itemstable = TableRegistry::get('Items');\n $itemModel = $itemstable->find('all')->contain('Forexrates')->where(['Items.id' => $itemId])->first();\n $sizeqty = $itemModel['size_options'];\n $sizeQty = json_decode($sizeqty, true);\n $prices = $sizeQty['price'][$seltsize];\n if ($prices == 0 || $prices == '')\n $price = $itemModel['price'];\n else\n $price = $sizeQty['price'][$seltsize];\n $qty = $sizeQty['unit'][$seltsize];\n $qtyOptions = '' . '<option value=\"\" >' . __d('user', 'QUANTITY') . '</option>';\n for ($i = 1; $i <= $qty; $i++) {\n $qtyOptions .= '<option value=\"' . $i . '\">' . $i . '</option>';\n }\n $date = date('d');\n $month = date('m');\n $year = date('Y');\n $today = date('m/d/Y');\n $tdy = strtotime($month . '/' . $date . '/' . $year);\n if(isset($itemModel->dealdate) && $itemModel->dealdate != '' )\n {\n $dealdate = $itemModel->dealdate->format('Y-m-d');\n $dealstrtime = strtotime(date('Y-m-d',strtotime($dealdate)));\n $todaystrtime = strtotime(date('Y-m-d',$tdy));\n }else{\n $dealstrtime = '';\n $todaystrtime = strtotime(date('Y-m-d',$tdy));\n }\n if (($itemModel['discount_type'] == 'daily' && $todaystrtime == $dealstrtime ) || ($itemModel['discount_type'] == 'regular')) {\n if (isset($_SESSION['currency_code'])) {\n $dealprice = $price * (1 - $itemModel['discount'] / 100);\n $dealprice = $this->Currency->conversion($itemModel['forexrate']['price'], $_SESSION['currency_value'], $dealprice);\n $price = $this->Currency->conversion($itemModel['forexrate']['price'], $_SESSION['currency_value'], $price);\n $convertprice = round($price, 2);\n $convertdealprice = round($dealprice, 2);\n } else {\n $price = $price;\n $dealprice = $price * (1 - $itemModel['discount'] / 100);\n $convertprice = round($price, 2);\n $convertdealprice = round($dealprice, 2);\n }\n $convertprice = $convertdealprice;\n $priceval = $price * (1 - $itemModel['discount'] / 100);\n $deal = \"deal\";\n if (isset($_SESSION['currency_symbol'])){\n $price = $_SESSION['currency_symbol'] . \"&nbsp;\" . $price;\n $convertprice=$_SESSION['currency_symbol'] . \"&nbsp;\" . $convertprice;\n }\n else{\n $price = $itemModel['forexrate']['currency_symbol'] . \"&nbsp;\" . $price;\n $convertprice = $itemModel['forexrate']['currency_symbol'] . \"&nbsp;\" . $convertprice;\n }\n\n //echo \"HERE\".$price;\n } else {\n $price = $price;\n $convertprice = round($price * $itemModel['forexrate']['price'], 2);\n $priceval = $price;\n if (isset($_SESSION['currency_symbol'])){\n $price = $_SESSION['currency_symbol'] . \"&nbsp;\" . $this->Currency->conversion($itemModel['forexrate']['price'], $_SESSION['currency_value'], $price);\n $convertprice = $_SESSION['currency_symbol'] . \"&nbsp;\" . $this->Currency->conversion($itemModel['forexrate']['price'], $_SESSION['currency_value'], $convertprice);\n }\n else{\n $price = $itemModel['forexrate']['currency_symbol'] . \"&nbsp;\" . $price;\n $convertprice = $itemModel['forexrate']['currency_symbol'] . \"&nbsp;\" . $convertprice;\n }\n $deal = \"nodeal\";\n //echo \"THERE\";\n }\n // echo \"PRICE=\".$price.\"CUR\".$_SESSION['currency_symbol'].\"==\".$itemModel['forexrate']['currency_symbol'];\n\n $output = array();\n $output[] = $qtyOptions;\n $output[] = $price;\n $output[] = $priceval . \"&nbsp;\";\n $output[] = $convertprice;\n $output[] = $deal;\n if ($oldprice != $price && $price_old == 1)\n $output[] = '<span style=\"text-decoration:line-through;color:#8D8D8D;\"><span style=\"font-size:20px;\">' . $oldprice . '</span>' . $_SESSION['currency_code'] . '</span>';\n else\n $output[] = '';\n echo json_encode($output);\n }", "title": "" }, { "docid": "dd53d47a548ed501cda8bced957caaad", "score": "0.54467064", "text": "function InvEggsQtyp($stock_id,$company_id,$branch_id,$date){\n\t\n\t$fetch = mysql_query(\"SELECT * FROM tbl_inventory_entry_production WHERE company_id='$company_id' AND branch_id='$branch_id' AND item='$stock_id' AND date < '$date'\");\n\twhile($result = mysql_fetch_array($fetch)){\n\t\t$qty2 += $result[\"qty\"];\n\t}\n\t$fetch = mysql_query(\"SELECT * FROM tbl_inventory_entry_rtl WHERE company_id='$company_id' AND branch_id='$branch_id' AND item='$stock_id' AND date < '$date'\");\n\twhile($result = mysql_fetch_array($fetch)){\n\t\t$qty3 += $result[\"qty\"];\n\t}\n\t\n\t$totalegg = $qty3 + $qty2;\n\t\n\treturn $totalegg;\n}", "title": "" }, { "docid": "772d7026fc1a655d4fca430dec3c267a", "score": "0.5432468", "text": "public function getQuantidade() {\n return !empty($this->qtd) ? $this->qtd : null;\n }", "title": "" }, { "docid": "a782bef8b9419e933fca212f8bde495e", "score": "0.5430093", "text": "public function get_prix()\r\n {\r\n return $this->_prix;\r\n }", "title": "" }, { "docid": "d86c91a12f0f83e14c0f7c780d57a61c", "score": "0.54273975", "text": "function goods_rpt(){\n $sql = \"select count(product_id) as sum, product_name, product_price, product_quantity from ordered where sp_id=:sp_id and product_type=:product_type group by product_name\";\n $args = [':sp_id'=>$this->sp_id, ':product_type'=>$this->type];\n return $this->run($sql, $args);\n }", "title": "" }, { "docid": "f5b5e5f2a08661a3163f01637401f87b", "score": "0.5425555", "text": "public function __toString()\r\n\t{\r\n\t\treturn \"$this->partName [Rs. $this->price]\";\r\n\t}", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5423402", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5423402", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5423402", "text": "public function getPrice();", "title": "" }, { "docid": "bf56ca3a377094d90f294ebcae13c0c3", "score": "0.5423402", "text": "public function getPrice();", "title": "" }, { "docid": "db21f0f778d86da2cbcf02109d39c5c8", "score": "0.5419603", "text": "private function get_final_booking_price_details($Fare, $multiplier,$currency_obj, $deduction_cur_obj, $module) {\r\n $data = array();\r\n //debug($Fare);\r\n\r\n $core_agent_commision = ($Fare['TotalDisplayFare'] - $Fare['NetFare']); \t \r\n $commissionable_fare = $Fare['TotalDisplayFare'];\r\n if ($module == 'b2c') {\r\n \t\r\n $trans_total_fare = $this->total_price($Fare, false, $currency_obj); \r\n\r\n $markup_total_fare = $currency_obj->get_currency($trans_total_fare, true, false, true, $multiplier);\r\n $ded_total_fare = $deduction_cur_obj->get_currency($trans_total_fare, true, true, false, $multiplier);\r\n $admin_markup = roundoff_number($markup_total_fare['default_value'] - $ded_total_fare['default_value']);\r\n $admin_commission = $Fare['AgentCommission'];\r\n $agent_markup = 0;\r\n $agent_commission = 0;\r\n } else {\r\n //B2B Calculation\r\n \t //debug($Fare);\r\n $trans_total_fare = $Fare['TotalDisplayFare']; \r\n $this->commission = $currency_obj->get_commission();\r\n //echo \"commission\";\r\n //debug($this->commission);\r\n\r\n $AgentCommission = $this->calculate_commission($core_agent_commision);\r\n //debug($AgentCommission);\r\n\r\n $admin_commission = roundoff_number($core_agent_commision - $AgentCommission); //calculate here\r\n $agent_commission = roundoff_number($AgentCommission);\r\n \r\n $admin_net_rate=($trans_total_fare-$agent_commission);\r\n //echo \"admin_net_rate\".$admin_net_rate.'<br/>';\r\n\r\n $markup_total_fare = $currency_obj->get_currency($admin_net_rate, true, true, false, $multiplier);\r\n \r\n //debug($markup_total_fare);\r\n\r\n $admin_markup = abs($markup_total_fare['default_value'] - $admin_net_rate);\r\n $agent_tds = $currency_obj->calculate_tds($agent_commission);\r\n //adding tds with net rate by ela\r\n $agent_net_rate=(($trans_total_fare + $admin_markup)-$agent_commission+$agent_tds);\r\n $ded_total_fare = $deduction_cur_obj->get_currency($agent_net_rate, true, false, true, $multiplier);\r\n $agent_markup = roundoff_number($ded_total_fare['default_value'] - $agent_net_rate);\r\n \r\n \r\n }\r\n //TDS Calculation\r\n $admin_tds = $currency_obj->calculate_tds($admin_commission);\r\n $agent_tds = $currency_obj->calculate_tds($agent_commission);\r\n\r\n $data['commissionable_fare'] = $commissionable_fare;\r\n $data['trans_total_fare'] = $trans_total_fare;\r\n $data['admin_markup'] = $admin_markup;\r\n $data['agent_markup'] = $agent_markup;\r\n $data['admin_commission'] = $admin_commission;\r\n $data['agent_commission'] = $agent_commission;\r\n $data['admin_tds'] = $admin_tds;\r\n $data['agent_tds'] = $agent_tds;\r\n //debug($data);\r\n //exit;\r\n return $data;\r\n }", "title": "" }, { "docid": "288004fc8f8ababb7aec9c25c8a8765a", "score": "0.541364", "text": "function getCartNrQtd(){\n\n $cart = Cart::getFromSession(); //pegar o carrinho que esta na sessao\n\n $totals = $cart->getProductsTotals(); //soma todos os valores do carrinho\n\n return $totals['nrqtd'];\n\n}", "title": "" }, { "docid": "1fc41f237f5eb3244bfc4f3db50ce2e5", "score": "0.5413355", "text": "function cria_item($pedido, $produto, $produtoquantidade_id){\r\r\n\t\tif(!empty($pedido['Itempedido']))\r\r\n\t\t\tforeach($pedido['Itempedido'] as $item){\r\r\n\t\t\t\tif($item['produto_id'] == $produto['Produto']['id']){\r\r\n\t\t\t\t\treturn false;\r\r\n\t\t\t\t}\r\r\n\t\t\t}\r\r\n $item = array();\r\r\n\t\t$item['Itempedido']['pedido_id'] = $pedido['Pedido']['id'];\r\r\n\t\t$item['Itempedido']['produto_id'] = $produto['Produto']['id'];\r\r\n\t\t$item['Itempedido']['produtoquantidade_id'] = $produtoquantidade_id;\r\r\n $item['Itempedido']['quantidade'] = 1;\r\r\n\t\tif($produto['Produto']['promocao'] == 1){\r\r\n $item['Itempedido']['desconto'] = $produto['Produto']['desconto'];\r\r\n\t\t\t$item['Itempedido']['valor_total'] = $produto['Produto']['valor']*(100-$produto['Produto']['desconto'])/100;\r\r\n $item['Itempedido']['valor_unitario'] = $produto['Produto']['valor']*(100-$produto['Produto']['desconto'])/100;\r\r\n\t\t} else {\r\r\n $item['Itempedido']['desconto'] = 0;\r\r\n\t\t\t$item['Itempedido']['valor_total'] = $produto['Produto']['valor'];\r\r\n $item['Itempedido']['valor_unitario'] = $produto['Produto']['valor'];\r\r\n\t\t}\r\r\n\t\t$item['Itempedido']['valor_total_form'] = number_format($item['Itempedido']['valor_total'],2, ',', '.');\r\r\n $item['Itempedido']['valor_unitario_form'] = number_format($item['Itempedido']['valor_unitario'],2, ',', '.');\r\r\n if($this->save($item)){\r\r\n //apaga o valor do frete do produto\r\r\n $pedido = $this->Pedido->read(null, $pedido['Pedido']['id']);\r\r\n $pedido['Pedido']['frete'] = null;\r\r\n $pedido['Pedido']['frete_form'] = null;\r\r\n $this->Pedido->save($pedido); \r\r\n return $item;\r\r\n }else{\r\r\n return false;\r\r\n }\r\r\n\t}", "title": "" }, { "docid": "fafe52539df9d2aa79359371423231ea", "score": "0.54129994", "text": "function cataloginventory_stock_item( $array )\n{\n $product_id = $array[0]; // ID of Product\n $stock_id = $array[1]; // ID of Stock\n $qty = '' . $array[2] . ''; // Quantity of stock\n $min_qty = '' . $array[3] . ''; // Minimum st quantity\n $use_config_min_qty = $array[4]; // ??\n $is_qty_decimal = $array[5]; // Check if can be ! INT\n $backorders = $array[6];\n $use_config_backorders = $array[7]; \n $min_sale_qty = '' . $array[8] . ''; \n $use_config_min_sale_qty = $array[9];\n $max_sale_qty = '' . $array[10] . '';\n $use_config_max_sale_qty = $array[11];\n $is_in_stock = $array[12];\n $low_stock_date = '' . $array[13] . ''; // NULL\n $notify_stock_qty = $array[14];\n $use_config_notify_stock_qty = $array[15];\n $manage_stock = $array[16];\n $use_config_manage_stock = $array[17]; \n $stock_status_changed_auto = $array[18];\n $use_config_qty_increments = $array[19]; \n $qty_increments = $array[20];\n $qty = '' . $array[21] . '';\n $use_config_enable_qty_inc = $array[22];\n $enable_qty_increments = $array[23];\n $is_decimal_divided = $array[24];\n $website_id = $array[25];\n\n\n $q = \"INSERT INTO `cataloginventory_stock_item` (`item_id`, `product_id`, `stock_id`, `qty`, `min_qty`, `use_config_min_qty`, `is_qty_decimal`, `backorders`, `use_config_backorders`, `min_sale_qty`, `use_config_min_sale_qty`, `max_sale_qty`, `use_config_max_sale_qty`, `is_in_stock`, `low_stock_date`, `notify_stock_qty`, `use_config_notify_stock_qty`, `manage_stock`, `use_config_manage_stock`, `stock_status_changed_auto`, `use_config_qty_increments`, `qty_increments`, `use_config_enable_qty_inc`, `enable_qty_increments`, `is_decimal_divided`, `website_id`) \n VALUES ('', $product_id, $stock_id, '$qty', '$min_qty', $use_config_min_qty, $is_qty_decimal, $backorders, $use_config_backorders, '$min_sale_qty', $use_config_min_sale_qty, '$max_sale_qty', $use_config_max_sale_qty, $is_in_stock, $low_stock_date, '$notify_stock_qty', $use_config_notify_stock_qty, $manage_stock, $use_config_manage_stock, $stock_status_changed_auto, $use_config_qty_increments, '$qty_increments', $use_config_enable_qty_inc, $enable_qty_increments, $is_decimal_divided, $website_id)\";\n\n $r = $insert;\n \n\n// check row inserted\n $insert = true;\n\n // get the key=>value pairs and insert into db\n return ( $insert )? true : false;\n}", "title": "" }, { "docid": "84cced7e49e29d5c9803f4ebe17d013f", "score": "0.54108566", "text": "public function getQuantity() {\n return $this->Quantity;\n }", "title": "" }, { "docid": "5b57233c1fb9ed753087aa8bf72c43f2", "score": "0.54002887", "text": "public function getQuantity():int\r\n {\r\n return $this->getProductStocks()\r\n ->sum('quantity');\r\n }", "title": "" }, { "docid": "75f44875963c52a2e50e4b86aaaa6d3b", "score": "0.5400252", "text": "protected function buildStocksFields(): void\n {\n //====================================================================//\n // PRODUCT STOCKS\n //====================================================================//\n\n //====================================================================//\n // Stock Reel\n $this->fieldsFactory()->create(SPL_T_INT)\n ->identifier(\"qty\")\n ->name(\"Stock\")\n ->group(\"Stocks\")\n ->microData(\"http://schema.org/Offer\", \"inventoryLevel\")\n ;\n //====================================================================//\n // Out of Stock Flag\n $this->fieldsFactory()->create(SPL_T_BOOL)\n ->identifier(\"outofstock\")\n ->name('Out of stock')\n ->group(\"Stocks\")\n ->microData(\"http://schema.org/ItemAvailability\", \"OutOfStock\")\n ->isReadOnly()\n ;\n //====================================================================//\n // Minimum Order Quantity\n $this->fieldsFactory()->Create(SPL_T_INT)\n ->Identifier(\"min_sale_qty\")\n ->Name('Min. Order Quantity')\n ->Group(\"Stocks\")\n ->MicroData(\"http://schema.org/Offer\", \"eligibleTransactionVolume\")\n ;\n }", "title": "" }, { "docid": "bb75691089e226cab4b6716790796402", "score": "0.5399223", "text": "function printed($data)\n{\n $total = 0;\n echo \"Stock Name | Per Share Price | No. Of Shares | Stock Price\\n\";\n foreach ($data as $key) {\n echo $key->name . \"\\n\";\n echo $key->share . \"\\n\";\n echo $key->price . \"\\n\";\n echo \"the stock value:\" . $key->share * $key->price . \"\\n\";\n $total = $total + $key->share * $key->price;\n }\n echo \"Total Value Of Stocks is : \" . $total . \" rs\\n\";\n}", "title": "" }, { "docid": "93976e177bbec8ea673560f03c46132d", "score": "0.5390685", "text": "public function getPurchaseQuantity()\n {\n return $this->purchaseQuantity;\n \n }", "title": "" }, { "docid": "7597b3cd1d91a2dcdf6f8d84ccec68be", "score": "0.5390284", "text": "function getProductPricing($productID, $currency)\r\n{\r\n\t\tif((int)trim($currency) == 0){\r\n\t\t\t$currency = 1;\r\n\t\t}\r\n\t\t// get products pricing.\r\n\t\t$query = \"SELECT * FROM prices a, currencies b, product c WHERE a.productId='{$productID}' AND a.productId=c.id AND a.currencyInt='{$currency}' AND a.currencyInt=b.id\";\r\n\t\t//echo $query;\r\n\t\t$result = mysql_query($query);\r\n\t\tif(!$result) error_message(sql_error());\r\n\t\t\t\r\n\t\twhile($qdata = mysql_fetch_array($result)){\r\n\t\t\t$price = $qdata[\"price\"];\r\n\t\t\t$quantDesc = $qdata[\"unitQuant\"] .\" \" .$qdata[\"productName\"] .\" for \" .str_replace(\"€\",\"EURO\", $qdata[\"symbol\"]) .$qdata[\"price\"];\r\n\t\t}\r\n\t\treturn array($price, $quantDesc);\r\n}", "title": "" }, { "docid": "4d25095775ae56c02aaa1ce105be8b57", "score": "0.5389362", "text": "public function getVirtualStock(): float;", "title": "" }, { "docid": "eddcd9890697ffa008413864c5729f28", "score": "0.53883535", "text": "function InvCost($stock_id,$company_id,$branch_id){\n\t$result = mysql_query(\"select * from tbl_productmaster where product_id = '$stock_id' and company_id='$company_id' and branch_id='$branch_id'\") or die (mysql_error());\n\t$row = mysql_fetch_assoc($result);\n\t\n\treturn $row[\"cost\"];\n}", "title": "" }, { "docid": "73f8c824cd22d7db5f3113caa553da7d", "score": "0.53876716", "text": "public function getItemBreakdown() {\n echo 'Soda type: '.$this->sodaType['name'].'- $'.number_format($this->sodaType['price'], 2).\"\\n\";\n echo \"Flavors used:\\n\";\n foreach ($this->scoops as $scoop) {\n echo ' '.$scoop['name'].' - $'.number_format($scoop['price'], 2).\"\\n\";\n }\n echo \"\\n\\n\";\n }", "title": "" }, { "docid": "ecc01560a8485eb72a6849f58c810141", "score": "0.53865916", "text": "function show_order_content($product_type, $product_id)\n{\n global $db;\n global $site_credits;\n\n $dp = new TMySQLQuery;\n $dp->connection = $db;\n $dt = new TMySQLQuery;\n $dt->connection = $db;\n $product_subtotal = 0;\n $product_shipping = 0;\n $product_discount = 0;\n $product_tax = 0;\n $product_total = 0;\n $product_name = 0;\n\n if ($product_type == \"credits\") {\n $sql = \"select title,subtotal,discount,taxes,total from credits_list where id_parent=\" . (int)$product_id;\n $dp->open($sql);\n if (!$dp->eof) {\n $product_name = word_lang(\"credits\") . \": \" . $dp->row[\"title\"];\n $product_total = $dp->row[\"total\"];\n $product_subtotal = $dp->row[\"subtotal\"];\n $product_tax = $dp->row[\"taxes\"];\n $product_discount = $dp->row[\"discount\"];\n }\n }\n\n if ($product_type == \"subscription\") {\n $sql = \"select title,subtotal,discount,taxes,total from subscription_list where id_parent=\" . (int)$product_id;\n $dp->open($sql);\n if (!$dp->eof) {\n $product_name = word_lang(\"subscription\") . \": \" . $dp->row[\"title\"];\n $product_total = $dp->row[\"total\"];\n $product_subtotal = $dp->row[\"subtotal\"];\n $product_tax = $dp->row[\"taxes\"];\n $product_discount = $dp->row[\"discount\"];\n }\n }\n\n if ($product_type == \"order\") {\n $sql = \"select total,subtotal,discount,shipping,tax,id from orders where id=\" . (int)$product_id;\n $dp->open($sql);\n if (!$dp->eof) {\n $product_name = word_lang(\"order\") . \"#\" . $dp->row[\"id\"];\n $product_total = $dp->row[\"total\"];\n $product_subtotal = $dp->row[\"subtotal\"];\n $product_shipping = $dp->row[\"shipping\"];\n $product_tax = $dp->row[\"tax\"];\n $product_discount = $dp->row[\"discount\"];\n }\n }\n\n\n $order_text = \"<div class='table_t2'><div class='table_b'><div class='table_l'><div class='table_r'><div class='table_bl'><div class='table_br'><div class='table_tl'><div class='table_tr'><table border='0' cellpadding='0' cellspacing='0' class='profile_table' width='100%'>\n\t<tr>\n\t<th width='50%'><b>\" . word_lang(\"Items\") . \"</b></th>\n\t<th><b>\" . word_lang(\"quantity\") . \"</b></th>\n\t<th><b>\" . word_lang(\"price\") . \"</b></th>\n\t<th><b>\" . word_lang(\"total\") . \"</b></th>\n\t</tr>\";\n\n\n if ($product_type == \"credits\" or $product_type == \"subscription\") {\n $order_text .= \"<tr>\n\t\t<td><b>\" . $product_name . \"</b></td>\n\t\t<td>1</td>\n\t\t<td>\" . currency(1, false) . float_opt($product_total, 2) . \" \" . currency(2, false) . \"</td>\n\t\t<td>\" . currency(1, false) . float_opt($product_total, 2) . \" \" . currency(2, false) . \"</td>\n\t\t</tr>\";\n } else {\n $sql = \"select price,item,quantity,prints from orders_content where id_parent=\" . (int)$product_id;\n $dp->open($sql);\n while (!$dp->eof) {\n $order_text .= \"<tr>\n\t\t\t<td>\";\n\n if ($dp->row[\"prints\"] == 0) {\n $sql = \"select name,id_parent from items where id=\" . $dp->row[\"item\"];\n $dt->open($sql);\n if (!$dt->eof) {\n $order_text .= \"#\" . $dt->row[\"id_parent\"] . \" &mdash; \" . $dt->row[\"name\"];\n }\n } else {\n $sql = \"select title,itemid from prints_items where id_parent=\" . $dp->row[\"item\"];\n $dt->open($sql);\n if (!$dt->eof) {\n $order_text .= \"#\" . $dt->row[\"itemid\"] . \" \" . word_lang(\"prints\") . \" \" . $dt->row[\"title\"];\n }\n }\n\n $order_text .= \"</td>\n\t\t\t<td>\" . $dp->row[\"quantity\"] . \"</td>\n\t\t\t<td>\" . currency(1, false) . float_opt($dp->row[\"price\"], 2) . \" \" . currency(2, false) . \"</td>\n\t\t\t<td>\" . currency(1, false) . float_opt($dp->row[\"price\"] * $dp->row[\"quantity\"], 2) . \" \" . currency(2, false) . \"</td>\n\t\t\t</tr>\";\n $dp->movenext();\n }\n }\n\n $order_text .= \"<tr>\n\t<td><b>\" . word_lang(\"subtotal\") . \"</b></td>\n\t<td></td>\n\t<td></td>\n\t<td>\" . currency(1, false) . float_opt($product_subtotal, 2) . \" \" . currency(2, false) . \"</td>\n\t</tr>\";\n\n if ($product_type == \"credits\" or $product_type == \"subscription\" or (!$site_credits and $product_type == \"order\")) {\n $order_text .= \"<tr>\n\t\t<td><b>\" . word_lang(\"discount\") . \"</b></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td>\" . currency(1, false) . float_opt($product_discount, 2) . \" \" . currency(2, false) . \"</td>\n\t\t</tr>\";\n }\n\n if ($product_type == \"order\" and !$site_credits) {\n $order_text .= \"<tr>\n\t\t<td><b>\" . word_lang(\"shipping\") . \"</b></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td>\" . currency(1, false) . float_opt($product_shipping, 2) . \" \" . currency(2, false) . \"</td>\n\t\t</tr>\";\n }\n\n if ($product_type == \"credits\" or $product_type == \"subscription\" or (!$site_credits and $product_type == \"order\")) {\n $order_text .= \"<tr>\n\t\t<td><b>\" . word_lang(\"taxes\") . \"</b></td>\n\t\t<td></td>\n\t\t<td></td>\n\t\t<td>\" . currency(1, false) . float_opt($product_tax, 2) . \" \" . currency(2, false) . \"</td>\n\t\t</tr>\";\n }\n\n\n $order_text .= \"<tr class='snd'>\n\t<td><b>\" . word_lang(\"total\") . \"</b></td>\n\t<td></td>\n\t<td></td>\n\t<td>\" . currency(1, false) . float_opt($product_total, 2) . \" \" . currency(2, false) . \"</td>\n\t</tr>\n\n\t</tr>\n\t</table></div></div></div></div></div></div></div></div>\";\n\n return $order_text;\n}", "title": "" }, { "docid": "9eb063dcf05a414b8b636afe4f9c67ee", "score": "0.5385372", "text": "function GetItemDetails($argWhere) {\n $arrClms = array('pkOrderItemID', 'SubOrderID','fkShippingIDs', 'ItemType', 'ItemName', 'ItemPrice', 'ItemImage', 'AttributePrice', 'Quantity', 'ShippingPrice', 'DiscountPrice', 'ItemDetails', 'ItemTotalPrice', 'fkItemID');\n $arrRes = $this->select(TABLE_ORDER_ITEMS, $arrClms, $argWhere);\n\n foreach ($arrRes as $k => $v) {\n if ($v['ItemType'] <> 'gift-card') {\n $jsonDet = json_decode(html_entity_decode($v['ItemDetails']));\n $varDet = '';\n foreach ($jsonDet as $jk => $jv) {\n\n $arrCols = array('AttributeLabel', 'OptionValue');\n $argWhr = \" fkOrderItemID = '\" . $v['pkOrderItemID'] . \"' AND fkProductID = '\" . $jv->pkProductID . \"'\";\n $arrOpt = $this->select(TABLE_ORDER_OPTION, $arrCols, $argWhr);\n $optNum = count($arrOpt);\n if ($optNum > 0 || $v['ItemType'] == 'package') {\n $varDet .= $jv->ProductName;\n }\n\n\n if ($optNum) {\n $varDet .= ' (';\n $i = 1;\n foreach ($arrOpt as $ok => $ov) {\n $varDet .= $ov['AttributeLabel'] . ': ' . str_replace('@@@', ',', $ov['OptionValue']);\n if ($i < $optNum)\n $varDet .=' | ';\n $i++;\n }\n\n $varDet = $varDet . ')';\n }\n $varDet .= '<br />';\n if ($v['ItemType'] == 'product') {\n $getImage = $this->select(TABLE_PRODUCT, array('ProductImage'), 'pkProductID=\"' . $jv->pkProductID . '\"');\n $arrRes[$k]['ProductImage'] = $getImage[0]['ProductImage'];\n } else if ($v['ItemType'] == 'package') {\n $getImage = $this->select(TABLE_PACKAGE, array('PackageImage'), 'pkPackageId=\"' . $v['fkItemID'] . '\"');\n $arrRes[$k]['ProductImage'] = $getImage[0]['PackageImage'];\n }\n }\n $arrRes[$k]['OptionDet'] = $varDet;\n //pre($arrRes);\n } else {\n $arrRes[$k]['OptionDet'] = 'Gift Card';\n }\n }\n\n\n //pre($arrRes);\n return $arrRes;\n }", "title": "" } ]
b14070ec297c28b8b63a6f28478615ca
Efface un like sur une photo par son ID
[ { "docid": "e55e61998f17ef5c5a310989f5600015", "score": "0.5298446", "text": "public function delete($id)\n {\n $req = $this->_db->prepare('DELETE FROM picture_like WHERE picture_like_id=:id LIMIT 1');\n $req->bindValue(':id', $id);\n $req->execute();\n }", "title": "" } ]
[ { "docid": "57735172b58828794c1344ee85fa065b", "score": "0.65185785", "text": "function update_like($img_id, $likes)\n {\n $bdd = data();\n $req = $bdd->prepare(\"UPDATE `pictures` SET likes=:likes WHERE ID=:id\");\n $req->bindValue(\"id\", $img_id, PDO::PARAM_INT);\n $req->bindValue(\"likes\", $likes, PDO::PARAM_STR);\n $req->execute();\n }", "title": "" }, { "docid": "a85eb4567a3e40d275d345b9a36e030d", "score": "0.6203751", "text": "function reprovaImg($id_media) {\n $data = array('status'=>0);\n $this->db->where('id_usuario', $id_media);\n return $this->db->update('imagens', $data);\n }", "title": "" }, { "docid": "a8708cab6984ccbbf901ce23059289e5", "score": "0.6175683", "text": "public function unlike($id){\n \t//nalazimo post u 'posts' tabeli po id-u koji je stigao kao argument(mada mislim da je ovo suvisno posto nam je stigao id posta kao \n \t//argument a samo nam on treba za post_id kolonu 'likes' tabele)\n \t$post = Post::find($id);\n //brisemo red u 'likes' tabeli gde je kolona user_id jednaka id-u ulogovanog usera a kolona post_id jednaka id-u posta koji je stigao kao\n //argumenat\n \t$like = Like::where('user_id', Auth::id())\n \t\t ->where('post_id', $post->id)\n \t\t ->first();\n \t//brisemo pronadjeni like\n \t$like->delete();\n \treturn $like->id; //vracamo id obrisanog posta da bi komponenta mogla da ga odstrani iz DOM-a \t\n }", "title": "" }, { "docid": "3450d635f69ae5fcf061889ca954071e", "score": "0.6141658", "text": "public function actionLike()\r\n {\r\n /**\r\n * @var Like $model\r\n */\r\n if (isset($_REQUEST['photoId']) && $_REQUEST['photoId']) {\r\n $photo = Photo::findOne($_REQUEST['photoId']);\r\n\r\n if ($photo && !$photo->likedAlready()) {\r\n $model = new Like();\r\n $model->photoId = $photo->id;\r\n $model->userId = Yii::$app->user->id;\r\n if ($model->save()) {\r\n echo json_encode(['message' => 'liked']);\r\n Yii::$app->end();\r\n }\r\n }\r\n }\r\n echo json_encode(['message' => 'not liked']);\r\n Yii::$app->end();\r\n }", "title": "" }, { "docid": "0bffff9a3b069ed25e815ed189b802dd", "score": "0.6130959", "text": "public function like($id){\n //nalazimo post koji je lajkovan(mada mislim da je ovo suvisno posto nam je stigao id posta kao argument a samo nam on treba za post_id \n //kolonu 'likes' tabele)\n $post = Post::find($id);\n //upisujemo red u 'likes' tabelu tjj kolone user_id(trenutno ulogovani user) i post_id(id posta ciji je id stigao kao argument)\n $like = Like::create([\n 'user_id' => Auth::id(),\n 'post_id' => $post->id\t\n ]);\n //vracamo like koji je upisan u 'likes' tabelu a sa njim i usera koji a je napravio(to je moguce zbog eager loadinga)a taj user nam treba-\n // da bi store.js mogao da upise sta treba u likes array\n return Like::find($like->id);\n }", "title": "" }, { "docid": "95660e9ada751dba838fb324acf9ded4", "score": "0.6029776", "text": "function put_photo_by_id($photo)\n\t\t{\n\t\t\tif($photo!=\"\")\n\t\t\t{\n\t\t\t\treturn \"images/users/\".$photo;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn \"images/user.png\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "c9421d6146288b557e730dc171e1b0f2", "score": "0.6019194", "text": "function afficher_photo_annonce($id_annonce)\n{\n if(dossier_existe('../../img/annonces/' . $id_annonce))\n {\n $a_images = mettre_fichier_dossier_dans_tableau('../../img/annonces/' . $id_annonce . '/');\n\n for($i=0;$i<count($a_images);$i++)\n {\n $photos[$i] = '<img src=\"../../img/annonces/' . $id_annonce . '/' . $a_images[$i] .'\"/>';\n }\n }\n \n if(count($photos) > 1)\n {\n $photos[count($photos)] = 'multi';\n }\n else\n {\n $photos[count($photos)] = 'single';\n }\n \n return $photos;\n}", "title": "" }, { "docid": "2278a43f19d37b70b8a29331bd5d3309", "score": "0.5887759", "text": "public function getIdPicture()\n{\nreturn $this->idPicture;\n}", "title": "" }, { "docid": "8e01e0319c77a8e2f21a11ae8823b427", "score": "0.5833506", "text": "public function getIdLike(){\n $codigoFanPage='519504951472584';\n return $codigoFanPage;\n }", "title": "" }, { "docid": "e6dca4631061c3bd5e10e5034a4238a0", "score": "0.581421", "text": "function chekcLikeUser($id_content)\n {\n $user = JFactory::getUser();\n $id_user = $user->id;\n $db = JFactory::getDbo();\n $sql = \"select like_p as p from #__tz_pinboard_like where id_content=$id_content AND id_user_p =$id_user\";\n $db->setQuery($sql);\n $row = $db->loadAssoc();\n return $row;\n }", "title": "" }, { "docid": "268da6d6e34bda7040ebd92978880ae6", "score": "0.5799046", "text": "public function handleLike($id) {\r\n $this->cars[$id]->liked = 1;\r\n $this->flashMessage(sprintf('Liked %s', $this->cars[$id]->name));\r\n if(!$this->isAjax()) {\r\n $this->redirect('this');\r\n } else {\r\n $this->invalidateControl();\r\n }\r\n }", "title": "" }, { "docid": "f85b89106f18f6beb455d60c3cfc6392", "score": "0.57620406", "text": "function affichComOeuvreFromId($id_artiste){ \n$req = \"SELECT * FROM commentaire WHERE id_membre = $id_artiste ORDER by date_updated DESC\";\n$res = mysql_query($req);\n$titre = \"\";\n\twhile($ligne = mysql_fetch_assoc($res))\n\t{\n\t$req_o = \"SELECT titre FROM oeuvre WHERE id_oeuvre = \".$ligne['id_oeuvre'].\" ORDER by date_updated DESC\";\n\t$res_o = mysql_query($req_o);\n\t$ligne_o = mysql_fetch_assoc($res_o);\n\t$heure = conversionToHourFacebook(new DateTime($ligne['date_updated']));\n\t$type = getTypeId($ligne['id_membre']);\n\t$src = getSrcAvatar($ligne['id_membre'],$type);\n\t$id_commentaire = $ligne['id_commentaire'];\n\t$titre = ($titre == $ligne_o['titre'])? \" \" : $ligne_o['titre'];\n\techo \"<div>$titre</div>\";\n\t\techo \"<div class='pane post' id='$id_commentaire'>\n\t\t\t<img src='$src'\t\talt='avatar' id='img_mini' width='50px' height='50px'>\n\t\t\t<div id='post_text'>\n\t\t\t\t<div>\".$ligne['txt_com'].\"</div>\n\t\t\t\t<span><a href='#'>\".getPseudo($ligne['id_membre'],$type).\"</a></span>\n\t\t\t\t<span>$heure</span>\n\t\t\t</div>\";\n\t\techo \"</div>\";\n\t}\n}", "title": "" }, { "docid": "c58f99478bcd71386899168e20511958", "score": "0.5746576", "text": "public function likeUp($id, $likes){\n $data = array(\n 'likes' => $likes + 1\n );\n $this->db->where('id', $id);\n return $this->db->update('comentario', $data);\n }", "title": "" }, { "docid": "0b3f3cd76d67489c169cf1973878f930", "score": "0.574002", "text": "function userLiked($post_id){\r\n $db = connect();//Datenbank verbindung\r\n\r\n $userid = $_SESSION['userdata']['ID_User'];//ID des aktuellen User\r\n \r\n $sql = \"SELECT count(*) FROM liken WHERE User_ID = ? AND Post_ID = ?;\";\r\n $statement = $db->prepare($sql);\r\n $statement->bind_param('ii',$userid,$post_id);\r\n $statement->execute();\r\n $statement->bind_result($userLikeCheck);\r\n\r\n while($statement->fetch()){\r\n $check = array('userLike' => $userLikeCheck);\r\n }\r\n \r\n //Wen er den Beitrag schon geliket hat, wird true zurück gegeben\r\n if ($check['userLike'] == 1) {\r\n return true;\r\n }else{ //Wen er den BEitrag noch nich geliket hat, wird false zurück gegeben \r\n return false;\r\n }\r\n \r\n}", "title": "" }, { "docid": "e147b1a8c48045e96dad1ab701005ad5", "score": "0.57352465", "text": "public function Lire_photo(&$img, $id)\n\t {\n\t\t$res=mysql_query(\"select * from photos where id='\".$id.\"'\"); die(\"select * from photos where id='\".$id.\"'\");\n\t\t\t\t\t//\tor die(\"Erreur sur la requ&ecirc;te: \".mysql_error());\n\t\tif(mysql_num_rows($res)>0)\n\t\t{\n\t\t\twhile(mysql_fetch_assoc($res))\n\t\t\t{\n\t\t\t\t$img['image']=$row['photo'];\n\t\t\t\t$img['size']=$row['size'];\n\t\t\t\t$img['type']=$row['type'];\n\t\t\t}\t\t\n\t\t\tmysql_free_result($res);\n\t\t\treturn true;\n\t\t}\n\t\telse\n\t\t\treturn false;\n\t }", "title": "" }, { "docid": "6dde343dd65eae9fb4284178d2b04433", "score": "0.5732049", "text": "public function affichimg($id){\n $req = $this->createQueryBuilder('a');\n $req->innerJoin('a.images', 'img')\n ->addSelect('img');\n\n $req->where('a.id= :id')\n ->setParameter('id', $id);\n\n return $req->getQuery()->getResult();\n }", "title": "" }, { "docid": "669062fab4d3fbb7e758d4a6b6e8b28a", "score": "0.57251453", "text": "function getIdPhotoTag($nb,$idMedia){\r\n\t$this->connection->connect();\r\n\t$id = 0;\r\n\t$path = $this->getPathNbiemePhoto($nb,$idMedia);\r\n\t// On verifie la photo\t\r\n\tif(@fopen($path,\"r\")==false){\r\n\t\t$id = -1;\r\n\t}\r\n\telse{\r\n $formatPath = str_replace(\"/sd\",\"\",str_replace(\"../v2.0/photos/\",\"\",str_replace(\".jpg\",\"\",$path)));\r\n\r\n \t$result=mysql_query(\"select ID_PHOTO_TAG from PhotoTag where FK_ID_PHOTOS = \" . $idMedia . \" and PATH_PHOTO = '\" . $formatPath . \"'\");\r\n \tif(mysql_num_rows($result) == 0){\r\n \t\t$id = -1;\r\n \t}\r\n \telse{\r\n \t\t$id = mysql_result($result,0,0);\r\n \t}\r\n\t}\r\n\t$this->connection->close();\r\n\treturn $id;\r\n}", "title": "" }, { "docid": "529720ab411d2176b0516ca7b5edadda", "score": "0.5725053", "text": "function getLikes($id)\r\n{\r\n\tglobal $con;\r\n\t$sql = $con->prepare(\"SELECT COUNT(*) FROM rating_info WHERE post_id = $id AND rating_action='like'\");\r\n\t$sql ->execute();\r\n\t$result = $sql ->fetch();\r\n\t$total = $result[0];\r\n\t$sql2 = $con->prepare(\"UPDATE posts SET likes=$total WHERE post_id = $id\");\r\n\t$sql2 ->execute();\r\n\treturn $result[0];\r\n\r\n}", "title": "" }, { "docid": "e4bafa0f20e74eebb7104d6d54e90058", "score": "0.5716606", "text": "function DeleteEnlargedPicture($photoID)\n {\n $q = db_query(\"select enlarged from \".PRODUCT_PICTURES.\" where photoID=\".(int)$photoID);\n if ($enlarged = db_fetch_row($q))\n {\n if ($enlarged[\"enlarged\"] != \"\" && $enlarged[\"enlarged\"] != null)\n {\n if (file_exists(\"data/big/\".$enlarged[\"enlarged\"])) unlink(\"data/big/\".$enlarged[\"enlarged\"]);\n }\n db_query(\"update \".PRODUCT_PICTURES.\" set enlarged=''\".\" where photoID=\".(int)$photoID[\"enlarged\"]);\n }\n }", "title": "" }, { "docid": "7feaaf408fd9209f92227ace0904f5d8", "score": "0.57117504", "text": "public function indicarImagen($idUser)\n {\n $result = $this->db->manipulacion(\"UPDATE user SET image = '$idUser' WHERE idUser = '$idUser'\");\n return $result;\n }", "title": "" }, { "docid": "e0edbafd5ed51faacd3191fb98f0582b", "score": "0.5702196", "text": "public function likeRecipe($id)\n {\n $like = Like::where('recipe_id', $id)->where('profile_id', Auth::user()->id)->first();\n $recipe = Recipe::find($id);\n if (!$like) {\n $like = new Like();\n $like->recipe_id = $recipe->id;\n $like->profile_id = Auth::user()->id;\n $like->save();\n $recipe->likes++;\n } else {\n $like->delete();\n $recipe->likes--;\n }\n $recipe->save();\n\n return Redirect::route('recipes.details', $recipe->id);\n }", "title": "" }, { "docid": "315168945d4e3b9619a1fc5c8d67a29b", "score": "0.57015824", "text": "public function getLikeID(){\n\t\t\treturn $this->like_id;\n\t\t}", "title": "" }, { "docid": "d2a6f7e932834e21ba531f5a86ee6090", "score": "0.56851685", "text": "private function interaction($id,$isLike){\n $me = Auth::user();\n //Encuentra a las mascota gustada\n $petSeleccionado = Pet::find($id);\n //Nueva notificación con los datos\n $interaction = new Interaction();\n $interaction->is_like = $isLike;\n $interaction->user_id = $me->id;\n $interaction->pet_id = $petSeleccionado->id;\n $interaction->save();\n\n $owner = $petSeleccionado->owner;\n $pets = $me->pets;\n $myPetsIds = $pets->pluck('id');\n $hasMatch = Interaction::where('user_id',$owner->id)\n ->where('is_like',true)\n ->whereIn('pet_id',$myPetsIds)->first();\n if($hasMatch != null && $isLike){\n $checkBefore = Match::where('user_id',$me->id)->where('match_user_id',$owner->id)->first();\n if($checkBefore != null){\n return redirect(route('patitas.index'))->with('message','Ya has hecho match con:'.$owner->name );\n }\n $checkBefore = Match::where('match_user_id',$me->id)->where('user_id',$owner->id)->first();\n if($checkBefore != null){\n return redirect(route('patitas.index'))->with('message','Ya has hecho match con:'.$owner->name );\n }\n $match = new Match();\n $match->user_id = $me->id;\n $match->match_user_id = $owner->id;\n $match->save();\n return redirect(route('patitas.index'))->with('message','Ha hecho match con:'.$owner->name );\n }else{\n return redirect(route('patitas.index'))->with('message','Like registrado!');\n }\n }", "title": "" }, { "docid": "75be56bfc17b34d67273dc794effba84", "score": "0.56751066", "text": "public function chooseAvatar()\n {\n $this->objTable = new Model($this->getLangAndID['lang'].'_album_images');\n $select = array('id', 'src_link');\n $this->objTable->where('id',$this->id);\n $this->objTable->where('idw',$this->idw);\n $result = $this->objTable->getOne(null,$select);\n if ($result) {\n return $result;\n }\n \n }", "title": "" }, { "docid": "cc74b608b6b0d443c38a45c00c9b4117", "score": "0.5629373", "text": "function hapus($id){\n $conn = koneksi();\n //menghapus gambar\n $sis = query(\"SELECT * FROM siswa WHERE id = $id\");\n if ($sis['profile'] != 'nophoto.jpg') {\n unlink('img/' . $sis['profile']);\n }\n \n\n mysqli_query($conn, \"DELETE FROM siswa WHERE id = $id\") or die(mysqli_error($conn));\n return mysqli_affected_rows($conn);\n}", "title": "" }, { "docid": "69d3cc0eddc1a85facac24fe41b58b2d", "score": "0.5612642", "text": "public static function user_liked_photo($comment_id, $user_id) {\n\n global $db;\n\n $sql = $db->build_select(\n Comment_Like::$db_table,\n \"*\",\n [Comment_Like::$db_prefix.\"comment_id\" => $comment_id, Comment_Like::$db_prefix.\"user_id\" => $user_id],\n \"\",\n 1\n );\n\n $result_set = $db->query($sql);\n\n $row = mysqli_fetch_assoc($result_set);\n\n return ($row) ? true : false;\n }", "title": "" }, { "docid": "e7ab0c0a7b114a5d20837f9e00a1ab5a", "score": "0.56001824", "text": "public function LikeNoticia($id)\n {\n //Comprueba que no haya dado like ya a esa noticia\n if (!Session::has('liked') || !in_array($id, Session::get('liked'))) {\n $noticia = Noticia::find($id);\n $noticia->likes = $noticia->likes + 1;\n $noticia->save();\n Session::push('liked', $noticia->id);\n return response()->json(array('success' => true));\n }\n\n return response()->json(array('success' => false));\n }", "title": "" }, { "docid": "6fb2d91a78481cab71e334305a848131", "score": "0.5579781", "text": "function set_photo($photo, $id, $title = 'ok', $description = 'No_description')\n {\n if ($title == 'ok') {\n return mysqli_query($this->db, \"UPDATE users SET photo='$photo' WHERE id='$id'\");\n } else {\n return mysqli_query($this->db, \"INSERT INTO images (image,title,description,user_id) VALUES ('$photo','$title','$description','$id')\");\n }\n }", "title": "" }, { "docid": "69ae02a4ccc1b965a45dc34bd9c4fcee", "score": "0.5563001", "text": "function get_picture_byid($id)\n {\n\t\t$afield=array(\n\t\t $this->table.'.picture',\n\t\t);\n\t\t$this->db->select($afield);\n\t\t$this->db->where_in($this->table.'.'.$this->id, $id);\n\t\t$this->db->where_not_in($this->id,$this->id_super_admin);\n\t\treturn $this->db->get($this->table)->result();\n }", "title": "" }, { "docid": "65194ef144512eb1e939ddb132c7ff2c", "score": "0.5543244", "text": "function affichComOeuvreById_O($id_oeuvre){\n$req = \"SELECT * FROM commentaire WHERE id_oeuvre = $id_oeuvre ORDER by date_updated DESC\";\n$res = mysql_query($req);\n\t\n\twhile($ligne = mysql_fetch_assoc($res))\n\t{\n\t$heure = conversionToHourFacebook(new DateTime($ligne['date_updated']));\n\t$type = getTypeId($ligne['id_membre']);\n\t$src = getSrcAvatar($ligne['id_membre'],$type);\n\t$id_commentaire = $ligne['id_commentaire'];\n\t$com = html_entity_decode($ligne['txt_com']);\n\t\techo \"<div class='pane post' id='$id_commentaire'>\n\t\t\t<img src='$src'\t\talt='avatar' id='img_mini' width='50px' height='50px'>\n\t\t\t<div id='post_text'>\n\t\t\t\t<div>\".$com.\"</div>\n\t\t\t\t<span><a href='#'>\".getPseudo($ligne['id_membre'],$type).\"</a></span>\n\t\t\t\t<span>$heure</span>\n\t\t\t</div>\";\n\t\techo \"</div>\";\n\t}\n}", "title": "" }, { "docid": "a26301fbc168b7a3097f466f865e30c2", "score": "0.5542705", "text": "function comprobarLike($dbh, $userID,$ID)\n{\n $data = array('userID' => $userID, 'publicacionID' => $ID);\n $stmt = $dbh->prepare(\"SELECT * FROM Likes\n WHERE ID_Usuario= :userID\n AND ID_Pregunta= :publicacionID;\");\n $stmt->setFetchMode(PDO::FETCH_OBJ);\n $stmt->execute($data);\n return $stmt;\n}", "title": "" }, { "docid": "8f9924c3192b23ba8423531510735b8b", "score": "0.55416", "text": "public function getPhotoByPhotoId($photo_id);", "title": "" }, { "docid": "b00c5be1d118844b432438cac8233732", "score": "0.5538547", "text": "function pic_info($pic_id, $comm_all, $like_count, $is_liked) {\n\t$pic = new pics();\n\tif (!$pic->get_1($pic_id))\n\t\texit(display_warning(\"no post at this address\"));\n\telse\n\t\thtml_pic($pic->new, $_SERVER['QUERY_STRING'], $comm_all, $like_count, $is_liked, $pic_id);\n}", "title": "" }, { "docid": "5a2ee86c1f9d3c15c703e856dd13ca3f", "score": "0.5521189", "text": "function deleteImageFromImovel($id,$indice){\n //die();\n try {\n $sql = 'update locacoes set '.$indice.' = NULL where id = :id';\n $p_sql = Conexao::getInstancia()->prepare($sql);\n $p_sql->bindValue(':id', $id);\n if ($p_sql->execute())\n return true;\n return null;\n } catch (Exception $ex) {\n return 'deu erro na conexão:' . $ex;\n }\n}", "title": "" }, { "docid": "c3314b972acf1f6924b353af75106208", "score": "0.55106443", "text": "public function delimage()\n\t{\n\t\tif (!$this->auth($_SESSION['leveluser'], 'pengumuman', 'delete')) {\n\t\t\techo $this->pohtml->error();\n\t\t\texit;\n\t\t}\n\t\tif (!empty($_POST)) {\n\t\t\t$pengumuman = array(\n\t\t\t\t'picture' => ''\n\t\t\t);\n\t\t\t$query_pengumuman = $this->podb->update('pengumuman')\n\t\t\t\t->set($pengumuman)\n\t\t\t\t->where('id_pengumuman', $this->postring->valid($_POST['id'], 'sql'));\n\t\t\t$query_pengumuman->execute();\n\t\t}\n\t}", "title": "" }, { "docid": "0f76cac50600a660b78234e46dc82a85", "score": "0.5506872", "text": "public function setLikeID($value){\n\t\t\t$this->like_id = $value;\n\t\t}", "title": "" }, { "docid": "ecabbd030e2ac18c2afb622bc9998f53", "score": "0.54973954", "text": "public function dislike($slug){\n\n $post = Post::where('slug', $slug)->pluck('id')->first();\n $like = Likes::where('post_id', $post)->first();\n $likex = Likes::where('post_id', $post)->get();\n $likey = Likes::where('post_id', $post)->pluck('id')->first();\n \n $iplike2 = IpLikes::where('like_id', $likey)->get();\n $iplike = IpLikes::where('like_id', $likey)->first();\n\n \n foreach ($likex as $value) {\n $like1 = $value->like;\n $like2 = $value->dislike;\n }\n foreach ($iplike2 as $value) {\n $ip1 = $value->REMOTE_ADDR_like;\n $ip2 = $value->REMOTE_ADDR_dislike;\n }\n\n if ($ip1 == 0 && $ip2 == 0) {\n \n if ($like1 >= 0) {\n $like->dislike +=1;\n $like->save();\n\n $iplike->REMOTE_ADDR_dislike = request()->ip();\n $iplike->save();\n }\n\n return back();\n }\n \n\n if ($ip1 == request()->ip()) {\n \n if ($like1 >= 0 || $like2 >= 0) {\n $like->like -=1;\n $like->dislike +=1;\n $like->save();\n \n $iplike->REMOTE_ADDR_like = 0;\n $iplike->REMOTE_ADDR_dislike = request()->ip();\n $iplike->save();\n \n }\n return back();\n }\n\n return back();\n\n }", "title": "" }, { "docid": "dda17470c8a28a880ca762906a59c70b", "score": "0.5496473", "text": "public function update_gallery($id,$img){\n $conn= new connect();\n $sql=\" update gallery set img='$img' where id='$id'\";\n $result=$conn->action($sql);\n return $result;\n }", "title": "" }, { "docid": "3a33549d179eb0e3fb9211fc8ba7d8ac", "score": "0.5494196", "text": "public function likePost(){\n\t\t$post = $this->model('post');\n\t\t$post = $post->where('post_id', '=', $_POST['post_id'])->get();\n\t\t$post = $post[0];\n\t\t$like = $this->model('post_like');\n\t\t$like->where(\"post_id\", \"=\", $_POST['post_id']);\n\t\t$like->where(\"user_id\", \"=\", $_SESSION['userID']);\n\t\t$results = $like->get();\n\t\tif(count($results )==0){\n\t\t\t$post->likes = ($post->likes)+1;\n\t\t\t$post->update();\n\t\t\t$like->id = 0;\n\t\t\t$like->post_id = $_POST['post_id'];\n\t\t\t$like->user_id = $_SESSION['userID'];\n\t\t\t$like->insert();\n\t\t}else{\n\t\t\t$post->likes = ($post->likes)-1;\n\t\t\t$post->update();\n\t\t\t$like->ID = $results[0]->id;\n\t\t\t$like->delete();\n\t\t}\n\t\t$this->view('home/main');\n\t}", "title": "" }, { "docid": "414abb13f8a6a651fb5af01a6cebfc62", "score": "0.54876596", "text": "function checking_profile_item_photo( $id ) {\n global $cbphoto;\n if ( $cbphoto->photo_exists( $id ) ) {\n if ( userid() != $cbphoto->get_photo_owner( $id ) ) {\n e( lang('Unable to set photo as profile item') );\n return false;\n }\n return true;\n } else {\n e( lang('Photo does not exists') );\n return false;\n }\n}", "title": "" }, { "docid": "00cf6d49aecc7a4ffc74e55651e35e8f", "score": "0.54780084", "text": "public function setIdPicture($idPicture)\n{\n$this->idPicture = $idPicture;\n\nreturn $this;\n}", "title": "" }, { "docid": "adca3946196eb972e14d0b363fa04682", "score": "0.5475291", "text": "public function findImageById($id);", "title": "" }, { "docid": "490e5af9bfda0e93f291ad5611eda412", "score": "0.5469909", "text": "function slika($adresaSlike)\n {\n if ($adresaSlike == \"<img src='images/1.jpg'>\") {\n echo \"<img src='images/1.jpg'>\";\n } else if ($adresaSlike == \"<img src='images/2.jpg'>\") {\n echo \"<img src='images/2.jpg'>\";\n } else if ($adresaSlike == \"<img src='images/3.jpg'>\") {\n echo \"<img src='images/3.jpg'>\";\n } else {\n echo \"You did not enter the picture address\";\n }\n }", "title": "" }, { "docid": "87617eb407bcf711bd62e5691a3ba31c", "score": "0.54660296", "text": "function like()\n {\n if ( request(\"userid\") && is_int((int)request(\"userid\")) && request(\"type\") ) \n {\n // remove both like & ignore first\n $whoLikes = user()[\"id\"];\n $whomLiked = request(\"userid\");\n $db = new DB();\n $r = $db->query(\"DELETE FROM likes WHERE user_id=$whoLikes AND subject_user_id=$whomLiked\");\n \n \n $whoLikes = user()[\"id\"];\n $whomLiked = request(\"userid\");\n $db = new DB();\n $r = $db->query(\"INSERT INTO `likes`(`user_id`, `subject_user_id`, `type`) VALUES ($whoLikes,$whomLiked, 'like')\");\n if ( $r ) \n {\n $this->backup();\n response([\"msg\" => \"success\", \"type\" => \"liked\"]);\n }\n else \n {\n response([\"msg\" => \"failed\"]);\n }\n }\n else \n {\n response([\"msg\" => \"failed\"]);\n }\n }", "title": "" }, { "docid": "9b2a5c5a0b417c31f9471875a657e734", "score": "0.5464466", "text": "public function likeReceiver($like,$commentid){\r\n \r\n $comment = comment::find_by_id($commentid);\r\n \r\n if($like == 1){\r\n $comment->likes ++;\r\n }else{\r\n $comment->dislikes ++;\r\n }\r\n $comment->save();\r\n \r\n }", "title": "" }, { "docid": "7d75f78a482fa89fe098092d12e43e9d", "score": "0.5463546", "text": "function updateImageProfil($id, $filename) {\n\t\tglobal $dbh;\n\t\t$sql = \"UPDATE utilisateur\n\t\t\t\tSET photo = :filename\n\t\t\t\tWHERE id = :id\";\n\t\t$stmt = $dbh->prepare( $sql );\n\t\t$stmt->bindValue(\":filename\", $filename);\n\t\t$stmt->bindValue(\":id\", $id);\n\t\t$stmt->execute();\n\t}", "title": "" }, { "docid": "4d80e76097f104e2557ce151bf74146d", "score": "0.54609394", "text": "public function getPhotoId()\n {\n return $this->_photo_id;\n }", "title": "" }, { "docid": "94649af700c8224c9476d5678f159b8a", "score": "0.54363304", "text": "function DeleteThumbnailPicture($photoID)\n {\n $q = db_query(\"select thumbnail from \".PRODUCT_PICTURES.\" where photoID=\".(int)$photoID);\n if ($thumbnail = db_fetch_row($q))\n {\n if ($thumbnail[\"thumbnail\"] != \"\" && $thumbnail[\"thumbnail\"] != null)\n {\n if (file_exists(\"data/medium/\".$thumbnail[\"thumbnail\"])) unlink(\"data/medium/\".$thumbnail[\"thumbnail\"]);\n }\n db_query(\"update \".PRODUCT_PICTURES.\" set thumbnail=''\".\" where photoID=\".(int)$photoID);\n }\n }", "title": "" }, { "docid": "3423b3ab235907ea9e45a89c4bfd6737", "score": "0.54318655", "text": "function h4c_annonymous_like_addtext($contentData) {\n\n if ( is_single() && ! is_attachment() ) {\n global $wpdb;\n $table_name = $wpdb->h4c_wp_plugin_annonymous_like_table;\n\n $isLiked = false;\n $postid = get_the_id();\n $clientip = $_SERVER['REMOTE_ADDR'];\n \n $result = $wpdb->get_results( \"SELECT id FROM $table_name WHERE postid = '$postid' AND clientip = '$clientip'\");\n if(!empty($result)){\n $isLiked = true;\n }\n\n $img_like = '<img class=\"pp_like_like\" src=\"' . plugins_url('/images/icon_like.png', __FILE__ ) . ($isLiked ? '\" style=\"display:none\" />' : '\" />');\n $img_liked = '<img class=\"pp_like_liked\" src=\"' . plugins_url('/images/icon_liked.png', __FILE__ ) . ($isLiked ? '\" />' : '\" style=\"display:none\" />') ;\n \n $result = $wpdb->get_results( \"SELECT id FROM $table_name WHERE postid = '$postid'\");\n $total_like = $wpdb->num_rows;\n \n $str = '<div class=\"post_like\">';\n $str .= '<a class=\"pp_like\" href=\"#\" data-id=' . $postid . '>' . $img_like . $img_liked. '</a> <span>' . $total_like . ' like' . ( ($total_like>1) ? 's' : '' ) . '</span>';\n $str .= '</div>';\n \n $contentData = $contentData . $str;\n\n }\n return $contentData;\n}", "title": "" }, { "docid": "a49e0976609afa5f1646bd533297b892", "score": "0.542007", "text": "public function likePost($id)\n {\n\n $this->handleLike('App\\Models\\Multimedia', $id);\n return redirect()->back();\n }", "title": "" }, { "docid": "f189debd8ec18030ea36ed49cacea5ea", "score": "0.5419617", "text": "public function changePhoto() {\n $query = 'UPDATE `15968k4_establishment` '\n . 'SET `companyPicture` = :companyPicture '\n . 'WHERE `id_15968k4_users` = :id_15968k4_users';\n $ChangePhoto = $this->db->prepare($query);\n $ChangePhoto->bindValue(':companyPicture', $this->companyPicture, PDO::PARAM_STR);\n $ChangePhoto->bindValue(':id_15968k4_users', $this->id_15968k4_users, PDO::PARAM_INT);\n return $ChangePhoto->execute();\n }", "title": "" }, { "docid": "e34f6c5b525405482bc238f76dba4da7", "score": "0.54177547", "text": "public function getPicturesLikes()\n {\n $likes = [];\n $query = $this->_db->query('SELECT * FROM picture_like');\n while ($data = $query->fetch(PDO::FETCH_ASSOC)) {\n $likes[] = new PictureLike($data);\n }\n\n return $likes;\n }", "title": "" }, { "docid": "5535c9dd7a306923927e3c0addc544ce", "score": "0.54161906", "text": "function hapus($id){\n\tglobal $conn;\n\t$sql = mysqli_query($conn, \"SELECT * FROM tabel_barang WHERE id=$id\");\n\tforeach ($sql as $key) {\n\t\techo $key['gambar'];\n\t\tunlink(\"../frontend/data_input_barang/images/\".$key['gambar']);\n\t}\n\tmysqli_query($conn, \"DELETE FROM tabel_barang WHERE id=$id\");\n\treturn mysqli_affected_rows($conn);\n}", "title": "" }, { "docid": "913729ff40e2c0c25a5dfd4bb0c729e6", "score": "0.5413319", "text": "public function deleteMyImage(){\n\n $coordinadorAuth = Coordinador::find(Auth::userCoord()->get()->id);\n $imagenPerfil = $coordinadorAuth->imgperfil;\n\n $date = Carbon::now();\n $dateModif = $date->toDateTimeString();\n\n $model = new Coordinador;\n $imagen = $model->where('imgperfil','=',$imagenPerfil);\n\n $dieleteImage = $imagen->update(array(\n 'imgperfil' => null,\n 'last_modification' => $dateModif,\n 'UserUpdated' => Auth::userCoord()->get()->Nombre.' '.Auth::userCoord()->get()->Apellidos\n ));\n\n return Redirect::to('coordinador/userProfile')->with('message', ' Información: ¡ La imágen se elimino correctamente !');\n\n }", "title": "" }, { "docid": "ba549b10f126dfc6e34ec7d4158a7a95", "score": "0.5412048", "text": "public function prepareAddPicture($id);", "title": "" }, { "docid": "5e92b17ebba5193afc9fc056118844fb", "score": "0.54119", "text": "public function unlike()\n {\n $attribute = ['user_id' => auth()->id()];\n\n $id = $this->likes()->where($attribute)->pluck('id')->toArray();\n Like::destroy($id);\n }", "title": "" }, { "docid": "8491831a44745389628096ff13addcb2", "score": "0.54093283", "text": "function comptelikes($info_msg)\n {\n $id_message = $info_msg[\"id\"];\n\n $connexionbdd = connexionbdd();\n $requete_likes = \"SELECT COUNT(id) FROM likes WHERE id_message=$id_message\";\n $query_likes = mysqli_query($connexionbdd, $requete_likes);\n $nb_likes = mysqli_fetch_row($query_likes);\n \n echo $likes = $nb_likes[0];\n }", "title": "" }, { "docid": "a475084714daceb51913d4fe75b44e36", "score": "0.54012704", "text": "function delete_like($entry_id) {\r\r\r\r\n\t$this->fetch(\"/api/like/delete\", null, array(\r\r\r\r\n \"entry\" => $entry_id,\r\r\r\r\n\t));\r\r\r\r\n }", "title": "" }, { "docid": "bd51887518296bf357bdbbb5578059e3", "score": "0.54008406", "text": "public function picUpdate()\n {\n $return['success'] = false;\n $return['error'] = true;\n if($this->getLangAndID['lang']!=$this->lang){\n $id_lang = $this->id;\n }else{\n $id_lang = '';\n }\n $this->objTable = new Model($this->getLangAndID['lang'].'_album_images');\n if($this->title){\n $data = array(\n 'idw' => $this->idw,\n 'title' => $this->title,\n 'id_lang' => $id_lang,\n 'update_uid' => $this->B['uid'],\n 'update_time' => $this->update_time\n ); \n }\n if($this->description){\n $data = array(\n 'idw' => $this->idw,\n 'description' => $this->description,\n 'id_lang' => $id_lang,\n 'update_uid' => $this->B['uid'],\n 'update_time' => $this->update_time\n ); \n }\n /*\n if(!empty($this->id)){\n $this->objTable->where($this->getLangAndID['field_id'],$this->id);\n $this->objTable->where('idw',$this->idw);\n $result = $this->objTable->update($data);\n }\n */\n //Kiểm tra xem bản ghi đã tồn tại bên ngôn ngữ này chưa. \n //True : update\n //false: insert\n $checkExist = $this->ifExist($this->id, $this->getLangAndID['lang'],'_album_images');\n if($checkExist==true){\n $this->objTable->where($this->getLangAndID['field_id'], $this->id);\n $this->objTable->where('idw',$this->idw);\n $result = $this->objTable->update($data); \n }else{\n $result = $this->objTable->insert($data);\n }\n \n if($this->getLangAndID['lang']!=$this->lang){\n $return['last_id'] = $this->id;\n }else{\n $return['last_id'] = $result;\n }\n \n if($result){\n $return['success'] = true;\n $return['error'] = false;\n }else{\n $return['success'] = false;\n $return['error'] = $this->objTable->getLastError();\n } \n \n return $return;\n }", "title": "" }, { "docid": "3e92a8691256dc9739cf01e79e3a4f8e", "score": "0.53981036", "text": "public function likeObject($id) {\r\n return $this->graphApiClient->api('/' . $id . '/likes', 'POST', array('user_likes' => true));\r\n }", "title": "" }, { "docid": "42fd74a4c35fce3ab97bd0bfbbebbebe", "score": "0.5394818", "text": "public function getImage($id, $force = 0) {\r\n \r\n }", "title": "" }, { "docid": "5014babb7c0184a37551d4900e0f2cfb", "score": "0.53945804", "text": "function afficher_photo_miniature_modifier($tableau, $id_annonce)\n{\n $affichage = '';\n if(dossier_existe('../../img/annonces/' . $id_annonce))\n {\n $a_images = mettre_fichier_dossier_dans_tableau('../../img/annonces/' . $id_annonce . '/');\n \n for($i=1;$i<count($tableau)-1;$i++)\n {\n $affichage .= '<div class=\"gp_miniature\"><div class=\"modifier_img_miniature\">';\n $affichage .= $tableau[$i];\n $affichage .= '</div>';\n $affichage .= '<div class=\"supprimer_photo_miniature\"><a href=\"modifier_annonce.php?id_annonce='.$id_annonce.'&photo_supprimer='. $a_images[$i] . '\">x</a></div></div>';\n }\n }\n $affichage .= '<div class=\"gp_miniature\">' .\n '<form action=\"modifier_annonce.php?id_annonce='.$id_annonce.'\" method=\"post\" enctype=\"multipart/form-data\">' .\n '<input type=\"file\" name=\"photos[]\" multiple onchange=\"this.form.submit();\"/><br/>' .\n '</form>' .\n '</div>';\n return $affichage;\n}", "title": "" }, { "docid": "19dc4fe7c02cdad4e782afd5489172c9", "score": "0.5387047", "text": "public function image($file_name,$id)\n \t{\n \n \t\t$obj = new BaseController();\n \t\t$sql = \"UPDATE `Personal_details` SET `s_img_name` ='\".$file_name.\"' WHERE `i_stud_id` ='\".$id.\"'\"; \n \t\tif( $result = $obj->conn->query($sql))\n \t\t{\n \t\t\treturn true;\n \t\t}\n \t}", "title": "" }, { "docid": "7bf9b748bd91dbc9fe2b3b714044bb94", "score": "0.5380576", "text": "function update_noimg() {\n\t\t$sql = \"UPDATE article\n\t\t\t\tSET\tart_title = ? ,\n\t\t\t\t\tart_body = ?\t\t\t\t\t\n\t\t\t\tWHERE art_id = ? \";\n\t\t$this->db->query($sql, array($this->art_title, $this->art_body,$this->art_id));\n\t\t$this->last_insert_id = $this->db->insert_id();\t\t\n\t}", "title": "" }, { "docid": "459ea52bd84223ff35a21f8b432371a7", "score": "0.5371656", "text": "public function likeComment(){\n\t\t$comment = $this->model('comments');\n\t\t$comment->where('id', '=', $_POST['comment_id']);\n\t\t$comment = $comment->get();\n\t\t$comment = $comment[0];\n\t\t$like = $this->model('comment_like');\n\t\t$like->where(\"comment_id\", \"=\", $_POST['comment_id']);\n\t\t$like->where(\"user_id\", \"=\", $_SESSION['userID']);\n\t\t$results = $like->get();\n\t\tif(count($results )==0){\n\t\t\t$comment->likes = ($comment->likes)+1;\n\t\t\t$comment->update();\n\t\t\t$like->comment_id = $_POST['comment_id'];\n\t\t\t$like->user_id = $_SESSION['userID'];\n\t\t\t$like->id = 0;\n\t\t\t$like->insert();\n\t\t}else{\n\t\t\t$comment->likes = ($comment->likes)-1;\n\t\t\t$comment->update();\n\t\t\t$like->id = $results[0]->id;\n\t\t\t$like->delete();\n\t\t}\n\t\t$this->view('home/main');\n\t}", "title": "" }, { "docid": "5bc4f367b137aaf5abb389bf502d18ad", "score": "0.53635895", "text": "public function addLike($article_id) {\n\t\tglobal $pdo;\n\t\t\n\t\t$query = $pdo -> prepare(\"UPDATE article_likes SET article_like_amount = article_like_amount + 1 WHERE article_id = ? \");\n\t\t$query -> bindValue(1, $article_id);\n\t\t$query -> execute();\n\t}", "title": "" }, { "docid": "1d843ac5b3a48b74b4d6f139871789b1", "score": "0.53626204", "text": "public function getExif($photoId) {\r\n \r\n }", "title": "" }, { "docid": "f95d0e35ba183ae383cfc65c56301324", "score": "0.53590584", "text": "function deletePic($picIndx) {\n if(!isset($this->id) || ($this->id <= 0)) {\n $this->Error[\"Application Error ClssOffrDltPcID-Invalid Argument\"] = \"Class hotel: In deletePic hotel_ID is not set\";\n return false;\n }\n\n if(!isset($picIndx) || ($picIndx <= 0)) {\n $this->Error[\"Application Error ClssOffrDltPcPcIndx-Invalid Argument\"] = \"Class hotel: In deletePic PIC_INDEX is not set\";\n return false;\n }\n\n $picFile = $this->ih.\"_\".$picIndx.\".jpg\";\n $thumbnail = $this->ih.\"_\".$picIndx.\"_thumb.jpg\";\n\n if(strlen($picFile) > 0) {\n if(is_file('../pics/hotels/'.$picFile))\n if(!@unlink('../pics/hotels/'.$picFile)) {\n $this->Error[\"Application Error ClssOffrDltPc-Invalid Operation\"] = \"Class hotel: In deletePic -> The file \".$picFile.\" cannot be deleted!\";\n return false;\n }\n else \n { \n\t $sql=sprintf(\"DELETE FROM hotel_pics WHERE url_big = '%s'\", $picFile);\n\t\t\t\t$this->conn->setsql($sql);\n\t\t\t\t$this->conn->updateDB();\n }\n }\n\n if(strlen($thumbnail) > 0) {\n if(is_file('../pics/hotels/'.$thumbnail)) if(!@unlink('../pics/hotels/'.$thumbnail)) {\n $this->Error[\"Application Error ClssOffrDltPc-Invalid Operation\"] = \"Class hotel: In deletePic -> The file \".$thumbnail.\" cannot be deleted!\";\n return false;\n }\n }\n\t\t\n $offPcs = glob('../pics/hotels/'.$this->ih.\"_*\");\n if($offPcs == 1) {// da oprawim has_../pics - ako iztrie 1wa snimka, znachi niama snimki.\n $this->conn->setsql(sprintf(\"UPDATE hotels SET has_pic = 0 WHERE id = %d\",$this->id));\n $this->conn->updateDB();\n }\n \n\t \n\t \n\t \n\t \n return true;\n }", "title": "" }, { "docid": "ece6d6c35448ba9cb8d4ccb64b6d51d6", "score": "0.53579414", "text": "function add_like($entry_id) {\r\r\r\r\n\t$this->fetch(\"/api/like\", null, array(\r\r\r\r\n \"entry\" => $entry_id,\r\r\r\r\n\t));\r\r\r\r\n }", "title": "" }, { "docid": "895c7fd095db9e3673c0d52cf00f08ef", "score": "0.53547746", "text": "private function _deleteLikes()\n\t{\n\t\t$alllikes = $this->db2->fetch_all('SELECT iduser FROM likes WHERE iditem='.$this->id.' AND typeitem=2');\n\t\tforeach($alllikes as $onelike) {\n\t\t\t$this->db2->query('UPDATE users SET num_likes=num_likes-1 WHERE iduser='.$onelike->iduser.' LIMIT 1');\n\t\t}\n\t\t$this->db2->query('DELETE FROM likes WHERE iditem='.$this->id.' AND typeitem=2');\n\t\t/************************************************/\t\n\t}", "title": "" }, { "docid": "5726737bdf2df84a483ca79fa0d23cbd", "score": "0.53499585", "text": "public function getImage($id=null)\n {\n $qb = $this->searchAnnonces($id);\n if( $id ) { $qb->where('u.id = :auteur')->setParameter('auteur', $id); } // On peut ajouter ce qu'on veut avant \n else{\n $qb = $this->whereIsActivated($qb); \n }\n $qb->orderBy('l.id','ASC');\n return $qb->getQuery()->getResult();\n }", "title": "" }, { "docid": "3abd4b5e325cee65eb5e16d7dd8928c7", "score": "0.5338657", "text": "function updatePicture($image, $id){\n\n\tesc($image);\n\n\t$result = mysql_query(\"UPDATE articles SET image = '$image' WHERE id = $id\");\n\n\tif(!$result){\n\n\t\terror_log(mysql_error());\n\t\treturn false;\n\n\t}\n\telse\n\t{\n\t\treturn true;\n\n\t}\n\n}", "title": "" }, { "docid": "9b5cbdbcf17beb53ecf1663384b0d2f2", "score": "0.53359944", "text": "function imageList($table, $id,$welcome='ok')\n {\n if($id == 'none'){\n $list = mysqli_query($this->db, \"SELECT * from $table ORDER BY id DESC\");\n $set= true;\n }else{\n $list = mysqli_query($this->db, \"SELECT * from $table WHERE user_id='$id' ORDER BY id DESC\");\n $set=false;\n }\n if ($list) {\n while ($row = mysqli_fetch_assoc($list)) {\n if($set)\n {\n $return = mysqli_fetch_assoc(mysqli_query($this->db,\"SELECT * FROM users WHERE id='{$row['user_id']}'\"));\n $prof = $return['photo'];\n $email = $return['email'];\n $name = ucfirst($return['name']);\n echo \"<div><a href='view_profile.php?email={$email}'><img src='img/profile/{$prof}' height='70' width='50' alt='(Image)'><b>&nbsp;&nbsp;{$name}</b></a> <i>posted on : {$row['created']}</i></div>\";\n }\n ?>\n <div class=\"post_image mt-1\">\n <?php if($welcome == 'delete_button'){ ?>\n <a href=\"../actions/del_post_image.php?id=<?= $row['id'] ?>\"\n onclick=\"return confirm('Are you sure you want to delete this image?')\">&times;</a>\n <?php }?>\n <h4 class=\"ml-4 pt-1\" style=\"font-weight: bold\"><?= $row['title'] ?></h4>\n <img src=\"img/uploads/<?= $row['image'] ?>\" alt=\"post image\">\n <p class=\"ml-3\"><b>Description:</b> <?= $row['description'] ?></p>\n <?php\n $this->commentView($row['id']);\n echo \"</div>\";\n }\n }\n }", "title": "" }, { "docid": "90ec5b95ace5558e7ddff3de210cd45e", "score": "0.53316563", "text": "public function Ecrire_photo($img, $id)\n\t {\n\t\t$res=mysql_query(\"insert into photos (id, photo, type, size) values ('\".$id.\"', '\".$img['image'].\"', '\".$img['type'].\"', '\".$img['size'].\"')\")\n\t\t\t\t\t\tor die(\"Erreur sur la requ&ecirc;te: \".mysql_error());\n\t\treturn $res;\n\t }", "title": "" }, { "docid": "0d3c26f8d93a38fa165860437daa09aa", "score": "0.5328733", "text": "public function like(Request $request, $slug){\n\n\n $post = Post::where('slug', $slug)->pluck('id')->first();\n $like = Likes::where('post_id', $post)->first();\n $likex = Likes::where('post_id', $post)->get();\n $likey = Likes::where('post_id', $post)->pluck('id')->first();\n \n $iplike2 = IpLikes::where('like_id', $likey)->get();\n $iplike = IpLikes::where('like_id', $likey)->first();\n\n \n foreach ($likex as $value) {\n $like1 = $value->like;\n $like2 = $value->dislike;\n }\n foreach ($iplike2 as $value) {\n $ip1 = $value->REMOTE_ADDR_like;\n $ip2 = $value->REMOTE_ADDR_dislike;\n }\n\n if ($ip1 == 0 && $ip2 == 0) {\n \n if ($like2 >= 0) {\n $like->like +=1;\n $like->save();\n\n $iplike->REMOTE_ADDR_like = request()->ip();\n $iplike->save();\n }\n\n return back();\n }\n\n \n if ($ip2 == request()->ip()) {\n\n if ($like1 >= 0 || $like2 >= 0) {\n $like->like +=1;\n $like->dislike -=1;\n $like->save();\n \n $iplike->REMOTE_ADDR_dislike = 0;\n $iplike->REMOTE_ADDR_like = request()->ip();\n $iplike->save();\n }\n return back();\n }\n return back();\n\n }", "title": "" }, { "docid": "6017908a8e0d64599066910754e6cc78", "score": "0.53286535", "text": "function getIdfoto() { return $this->idfoto;\n }", "title": "" }, { "docid": "4c688fec4f5fbb6a1a879d67064df12e", "score": "0.53278965", "text": "function check_login_image($image_id){\n if(!isset($_SESSION['username'])){\n header( 'Location: login.php'); \n }\n $link = spoj_s_db();\n \n /* overime, ci dany album patri prihlasenemu pouzivatelovi */\n \n $result = mysql_query(\"SELECT * FROM `Album` JOIN \t`User` ON (User.id = Album.owner_id) JOIN `Photo` ON (`Album`.id = `Photo`.album_id) WHERE (owner_id = \".$_SESSION['user_id'].\" AND `Photo`.id = \".mysql_escape_string($image_id).\")\",$link); \n \n if(mysql_num_rows($result) == 1){\n return true; \n }\n \n /* overime, ci dana fotka je zdielana s prihlasenym pouzivatelom, pripadne ci je verejna */ \n \n $result = mysql_query(\"(SELECT DISTINCT Photo.id FROM `Album` JOIN `Share` ON (Share.album_id = Album.id) JOIN `Photo` ON (`Album`.id = `Photo`.album_id) \n JOIN `GroupMembers` ON (GroupMembers.group_id = Share.group_id) \n WHERE member_id=\".$_SESSION['user_id'].\" AND `Photo`.id=\".$image_id.\")\".\n \" UNION\n (SELECT Photo.id FROM `Photo` JOIN `Album` ON (Photo.album_id = Album.id) WHERE Photo.id=\".$image_id.\" AND public=1)\", $link); \n if(mysql_num_rows($result) > 0){\n return true; \n } \n \n return false;\n}", "title": "" }, { "docid": "58a1f743f668e05b33d0f2e238de5871", "score": "0.53270304", "text": "public function edit_photo($param = '')\n {\n if (($this->dx_auth->is_logged_in()) || ($this->facebook_lib->logged_in()))\n {\n\n $data['room_id'] = $room_id = $param;\n\n if ($room_id == \"\")\n {\n redirect('info/deny');\n }\n\n $result = $this->Common_model->getTableData('list', array('id' => $room_id));\n if ($result->num_rows() == 0 or $result->row()->user_id != $this->dx_auth->get_user_id())\n {\n redirect('info/deny');\n }\n\n if ($this->input->post())\n {\n $listId = $param;\n $images = $this->input->post('image');\n $is_main = $this->input->post('is_main');\n\n $fimages = $this->Gallery->get_imagesG($listId);\n if ($is_main != '')\n {\n foreach ($fimages->result() as $row)\n {\n if ($row->id == $is_main)\n $this->Common_model->updateTableData('list_photo', $row->id, NULL, array(\"is_featured\" => 1));\n else\n $this->Common_model->updateTableData('list_photo', $row->id, NULL, array(\"is_featured\" => 0));\n }\n }\n\n if (!empty($images))\n {\n foreach ($images as $key => $value)\n {\n $image_name = $this->Gallery->get_imagesG(NULL, array('id' => $value))->row()->name;\n unlink($this->path . '/' . $listId . '/' . $image_name);\n\n $conditions = array(\"id\" => $value);\n $this->Common_model->deleteTableData('list_photo', $conditions);\n }\n }\n\n if (isset($_FILES[\"userfile\"][\"name\"]))\n {\n\n $allowed_ext = array('jpg', 'jpeg', 'png', 'gif');\n\n $insertData['list_id'] = $listId;\n\n if (!is_dir($this->path . '/' . $listId))\n {\n mkdir($this->path . '/' . $listId, 0777, true);\n $insertData['is_featured'] = 1;\n }\n\n foreach ($_FILES[\"userfile\"][\"error\"] as $key => $error)\n {\n if ($error == UPLOAD_ERR_OK)\n {\n $tmp_name = $_FILES[\"userfile\"][\"tmp_name\"][$key];\n $name = $_FILES[\"userfile\"][\"name\"][$key];\n if (move_uploaded_file($tmp_name, \"images/{$listId}/{$name}\"))\n {\n ///////////////////////\n $config['image_library'] = 'gd2';\n $config['source_image'] = $this->path . '/' . $listId . '/' . $name;\n $config['encrypt_name'] = TRUE;\n\n $this->image_lib->initialize($config);\n $this->image_lib->clear();\n $this->load->library('upload', $config);\n ///////////////////////////////\n $insertData['name'] = $name;\n $insertData['created'] = local_to_gmt();\n if ($name != '')\n $this->Common_model->insertData('list_photo', $insertData);\n $this->watermark($listId, $name);\n }\n }\n }\n }\n\n $rimages = $this->Gallery->get_imagesG($listId);\n $i = 1;\n $replace = '<ul class=\"clearfix\">';\n foreach ($rimages->result() as $rimage)\n {\n if ($rimage->is_featured == 1)\n $checked = 'checked=\"checked\"';\n else\n $checked = '';\n\n $url = base_url() . 'images/' . $rimage->list_id . '/' . $rimage->name;\n $replace .= '<li><p><label><input type=\"checkbox\" name=\"image[]\" value=\"' . $rimage->id . '\" /></label>';\n $replace .= '<img src=\"' . $url . '\" width=\"150\" height=\"150\" /><input type=\"radio\" ' . $checked . ' name=\"is_main\" value=\"' . $rimage->id . '\" /></p></li>';\n $i++;\n }\n $replace .= '</ul>';\n\n echo $replace;\n }\n else\n {\n $data['list_images'] = $this->Gallery->get_imagesG($param);\n $data['list'] = $this->Common_model->getTableData('list', array('id' => $param))->row();\n\n $data['title'] = get_meta_details('Add_photo_for_this_listing', 'title');\n $data[\"meta_keyword\"] = get_meta_details('Add_photo_for_this_listing', 'meta_keyword');\n $data[\"meta_description\"] = get_meta_details('Add_photo_for_this_listing', 'meta_description');\n\n $data['message_element'] = \"rooms/view_edit_photo\";\n $this->load->view('template', $data);\n }\n }\n else\n {\n redirect('users/signin');\n }\n }", "title": "" }, { "docid": "9d9c81fb893acaa2aa36550972b5e1ec", "score": "0.532583", "text": "public function getimagebyid($id)\n{\nreturn $query;\n}", "title": "" }, { "docid": "3977dbb969bf338d23939f401ca98fe0", "score": "0.5325623", "text": "function modifier_abonnes($nomprenom,$date_inscription,$email,$photo,$id){\n try{\n $link= connecter_db();\n if(!empty($photo)){\n $rp=$link->prepare(\"update abonnes set nom_prenom=? , date_inscription=? , email=? , photo=? where id=?\");\n $rp->execute([$nomprenom,$date_inscription,$email,$photo,$id]);\n }else{\n $rp=$link->prepare(\"update abonnes set nom_prenom=? , date_inscription=? , email=? where id=?\");\n $rp->execute([$nomprenom,$date_inscription,$email,$id]);\n }\n}catch(PDOException $e ){\ndie (\"erreur de modification de l'abonne dans la base de donnees \".$e->getMessage());\n}\n}", "title": "" }, { "docid": "9ecb0e697ac57cdfbdfad392d163b2d6", "score": "0.53245527", "text": "public function deleteNewShoesPicture($id){\n\n\t\tDB::table('footwears')->where('id',$id)->limit(1)->update(array('statusPicture' => 0));\n\t\treturn redirect()->back()->withSuccess('Uspešno ste uklonili sliku');\n\t}", "title": "" }, { "docid": "642254a99036ee9f117cc7ea6b1f7126", "score": "0.5324502", "text": "public function update_banner($id,$img){\n $conn= new connect();\n $sql=\" update banner set img='$img' where id_img='$id'\";\n $result=$conn->action($sql);\n return $result;\n }", "title": "" }, { "docid": "56c8203d5c69508a1fa0d456cfead90e", "score": "0.5321436", "text": "private function loadPicture($aMatche, $id) {\n\t\t\n\t\t$picId = PropRetriever::getProp($_POST,\"rank\");\n\t\t$upFile = new UploadedFile(\"picture\");\n\t\t$check = $upFile->checkFile();\n\t\tif ($check !== True)\n\t\t\treturn $this->displayForm($aMatche,$id,$check);\n\t\t\n\t\t$tmpFile = $upFile->getTempName();\n\t\t$aMatche->unloadPicture($picId);\n\t\tif ( ! $aMatche->loadPicture($picId,$tmpFile))\n\t\t\treturn $this->displayForm($aMatche, $id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Impossible de manipuler l'image chargée !\");\n\t\telse {\n\t\t\t$aMatche->update();\n\t\t\treturn $this->displayForm($aMatche,$id,\"Chargement effectué avec succès\");\n\t\t}\n\t}", "title": "" }, { "docid": "9a2902419b302b6380a705e09b2a047c", "score": "0.53206724", "text": "function GetNewsIdByImgId( $img )\n {\n $tmp_db = new DB();\n $q = \"SELECT * FROM `\".TblModNewsImg.\"` WHERE 1 AND `id`='$img'\";\n $res = $tmp_db->db_Query($q);\n //echo '<br>q='.$q.' res='.$res.' $tmp_db->result='.$tmp_db->result;\n if ( !$res or !$tmp_db->result ) return false;\n //$rows = $tmp_db->db_GetNumRows();\n // echo '<br>$rows='.$rows;\n $row = $tmp_db->db_FetchAssoc();\n $id = $row['id_news'];\n return $id;\n }", "title": "" }, { "docid": "23bd23746c1734f8771298b24df02264", "score": "0.5316879", "text": "function get_image_owner($image_id){\n $link = spoj_s_db();\n $result = mysql_query(\"SELECT `owner_id` FROM `Album` JOIN `Photo` ON `Photo`.album_id = `Album`.id WHERE `Photo`.id = \".mysql_escape_string($image_id),$link);\n return mysql_fetch_assoc($result)['owner_id'];\n}", "title": "" }, { "docid": "bc6d61a362e39e705204eab8b5bd5148", "score": "0.53157246", "text": "function getUrl($id_img){\n $sentencia = $this->db->prepare(\"SELECT url FROM imagen WHERE id_imagen = ?\");\n $sentencia->execute(array($id_img[0]));\n return $sentencia->fetch(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "192867ad8fb167c9128c7a1f54f0c3f0", "score": "0.5312397", "text": "public function updateavatar($id) {\n parent::Conectar();\n $foto = str_replace(\" \", \"_\", $_FILES[\"foto\"][\"name\"]);\n copy($_FILES[\"foto\"][\"tmp_name\"], \"upload/\" . $id . '_' . $foto);\n $imagen = $id . '_' . $foto;\n \n $resultado = $this->mysqli->query(\"UPDATE usuarios SET avatar = '$imagen' WHERE id = $id\");\n // Cambaimos el tamañao de todos los avatares subidos\n include_once('class/thumb.php');\n $mythumb = new thumb();\n $mythumb->loadImage('upload/'.$imagen);\n $mythumb->resize(70, 'width');\n $mythumb->save('upload/'.$imagen, 100);\n \n \n echo \"<script type='text/javascript'>\n\t\t\twindow.location='perfil.php';\n\t\t\t</script>\";\n }", "title": "" }, { "docid": "a274c6f027c700e6b3a079b7394d1f43", "score": "0.5309102", "text": "function setPicture($id_team , $picture) {\n\tglobal $_CONF , $resetPicture;\n\t$db = new Db();\n\t$file = $id_team.'.png';\n\t\n\tif(!$resetPicture) {\n\t\tif($picture['error'] != UPLOAD_ERR_OK || !is_uploaded_file($picture['tmp_name'])) {return false;}\n\t\tresamplePicture($picture['tmp_name'] , 300 , $_CONF['medias']['teamPictsRoot'].$file , $picture['name']);\n\t}\n\t\n\t$query = 'UPDATE equipes SET picture = '.(($resetPicture) ? 'NULL' : '\"'.$file.'\"').' WHERE id_equipe = \"'.$db->real_escape_string($id_team).'\"';\n\t$db->query($query);\n\t\n\t$db->close();\n\treturn true;\n}", "title": "" }, { "docid": "e24dc0d817f7b0f4c8dc7596daa51355", "score": "0.53008986", "text": "public function like($id)\n {\n $review = Review::find($id);//find out the review based on its id\n $user_ids_like = explode(',', $review->like);//convert the string of user ids who like the review to array\n $user_ids_dislike = explode(',', $review->dislike);//convert the string of user ids who dislike the review to array\n $current_user_id = Auth::user()->id;//get current user id(int) who clicks on the like button\n \n if ($review->like === NULL) \n {\n //check if the review did not liked by anyone\n if (!in_array($current_user_id, $user_ids_dislike))\n {\n //check if the logged in user has disliked the review before\n $review->like = strval($current_user_id);\n }\n\n } \n elseif ($review->like != NULL && !in_array($current_user_id, $user_ids_like) && !in_array($current_user_id, $user_ids_dislike))\n { \n //if the review has likes before, check if the logged user like or dislike the review before\n $review->like = $review->like . \",\" . strval($current_user_id);\n }\n \n $review->save();\n $review = Review::find($id);\n $item_id = $review->item_id;\n return redirect(\"item/$item_id\");\n }", "title": "" }, { "docid": "d1b094bd62bebae612b57bdd6967d5d8", "score": "0.5294246", "text": "public function getUserLikes($limit = 0) {\nreturn $this->_makeCall('users/self/media/liked', true, array('count' => $limit));\n}", "title": "" }, { "docid": "fb8179e59dc69324beca028a6654bf7d", "score": "0.52930325", "text": "public function likeAction()\n {\n $request = $this->container->get('request');\n if(!$request->isXmlHttpRequest())\n {\n return false;\n }\n \n $user = $this->getUser();\n if(!$user)\n {\n $data = array();\n $data['notConnected'] = true ;\n $data['title'] = \"Information\";\n $data['message'] = \"Vous devez vous connecter pour aimer ce contenu\";\n return new Response(json_encode($data),200,array('Content-Type'=>'application/json'));\n }\n else\n {\n $postid = $request->get('postid');\n $em = $this->getDoctrine()->getManager();\n $post = $em->getRepository('NoobPostBundle:Post')->findOneById($postid);\n if($post)\n {\n $postsLiked = $user->getPostsLiked();\n $alreadyLiked = false;\n foreach($postsLiked as $p){\n if($p->getId() == $post->getId()){\n $alreadyLiked = true;\n break;\n }\n }\n if($alreadyLiked == false){\n $user->addPostsLiked($post);\n $action = 1;\n } else {\n $user->removePostsLiked($post);\n $action = 0;\n }\n $em->persist($user);\n $em->flush();\n $content = array('action' => $action);\n return new Response(json_encode($content),200,array('Content-Type'=>'application/json'));\n }\n }\n $content = 'Erreur';\n return new Response(json_encode($content),500,array('Content-Type'=>'application/json'));\n }", "title": "" }, { "docid": "bd993077f658cddf7a9d5359f609c07a", "score": "0.52903664", "text": "public function updateThumbs() {\n\t\t\n\t\t//MAKE QUERY\n $select = $this->select()\n\t\t\t\t\t\t\t\t\t->from($this->info('name'), array('document_id'))\n\t\t\t\t\t\t\t\t\t->where('status = ?', 1)\n\t\t\t\t\t\t\t\t\t->where('photo_id = ?', 0)\n\t\t\t\t\t\t\t\t\t->order('document_id DESC')\n\t\t\t\t\t\t\t\t\t->limit(5);\n\n\t\t//FETCH DOCUMENTS\n $thumbDocs = $select->query()->fetchAll(Zend_Db::FETCH_COLUMN);\n\t\tforeach($thumbDocs as $document_id) {\n\t\t\t$photo_id = Engine_Api::_()->getItem('document', $document_id)->setPhoto();\n\t\t\t$this->update(array('photo_id' => $photo_id), array('document_id = ?' => $document_id));\n\t\t}\n }", "title": "" }, { "docid": "4bc7a9291cba9aefa51db06d39df217a", "score": "0.5275834", "text": "function get_foto_by_id($koneksi, $id){\n\t\t$query = \"SELECT foto FROM barang WHERE id = :id\";\n\t\t\n\t\t$statement = $koneksi->prepare($query);\n\t\t$statement->bindParam(':id', $id);\n\t\t$statement->execute();\n\t\t$result = $statement->fetch(PDO::FETCH_ASSOC);\n\t\ttutup_koneksi($koneksi);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "ccbbef27eaea4a41be95a5766517972b", "score": "0.5272439", "text": "function set_image($post_id, $file_id)\n {\n $data = array('status' => 0, 'message' => 'La imagen no fue asignada'); //Resultado inicial\n $row_file = $this->Db_model->row_id('file', $file_id);\n \n $arr_row['image_id'] = $row_file->id;\n \n $this->db->where('id', $post_id);\n $this->db->update('post', $arr_row);\n \n if ( $this->db->affected_rows() )\n {\n $data = array('status' => 1, 'message' => 'La imagen del post fue asignada');\n $data['src'] = URL_UPLOADS . $row_file->folder . $row_file->file_name; //URL de la imagen cargada\n }\n\n return $data;\n }", "title": "" }, { "docid": "2404d47c18e7a6d06aac5e8feab6b018", "score": "0.52709335", "text": "function getLikes($post_id)\n{\n global $connection;\n $sql = \"SELECT COUNT(*) FROM rating \n \t\t WHERE post_id = $post_id AND rating_action='like'\";\n $rs = mysqli_query($connection, $sql);\n $result = mysqli_fetch_array($rs);\n return $result[0];\n}", "title": "" }, { "docid": "067bef01787e3f59a2b0a9f6eb8d6889", "score": "0.52284217", "text": "public function actionThumbsup($id)\n {\n \t$model=$this->findModel($id);\n \t$model->updateCounters(['thumbsup'=>1]);\n \n \treturn $this->redirect(yii::$app->request->referrer);\n }", "title": "" }, { "docid": "d8db442c6736ccc83fda42c28e82dfa1", "score": "0.5227126", "text": "function unlike()\n {\n $whoLikes = user()[\"id\"];\n $whomLiked = request(\"userid\");\n $db = new DB();\n $r = $db->query(\"DELETE FROM likes WHERE user_id=$whoLikes AND subject_user_id=$whomLiked\");\n if ($r) \n {\n $this->backup();\n response([\"msg\" => \"success\", \"type\" => \"unliked\"]);\n } \n else \n {\n response([\"msg\" => \"failed\"]);\n }\n }", "title": "" }, { "docid": "753c807188c257aace7af56b227e4f54", "score": "0.522256", "text": "public function deleteThisPic($pic_id){\n if(!empty ($pic_id)){\n $this->pic_id = $pic_id;\n $this->sql = \"select * from \".USERS_GALLERY_TABLE.\" where photo_id=\". $this->pic_id;\n\n if ( !($this->result = $this->db->query($this->sql))){\n printf('Could not select record at line %s file: %s <br> sql:%s', __LINE__, __FILE__, $this->sql);\n exit;\n }\n $this->row = mysql_fetch_assoc($this->result);\n $this->picname = $this->row['photo_filename'];\n $this->photo_uid = $this->row['photo_uid'];\n list($this->id,$this->basename,$this->ext) = split('[.-]',$this->picname);\n\n //-- create the names of the various files: square, medium, small, large\n $this->basename = $this->id.'.'.$this->basename;\n $this->squarepic = $this->basename.'_sq.'.$this->ext;\n $this->medpic = $this->basename.'_m.'.$this->ext;\n $this->smpic = $this->basename.'_s.'.$this->ext;\n $this->largestpic = $this->basename.'_l.'.$this->ext;\n $this->dirname = MEMBER_IMG_DIR_URL.'/'.$this->photo_uid;\n\n $this->filestocheck = array($this->squarepic,$this->medpic,$this->smpic,$this->largestpic);\n foreach($this->filestocheck as $this->thispic){\n if (file_exists(MEMBER_IMG_DIR_PATH.'/'. $this->photo_uid.'/'. $this->thispic)) {\n echo \"Deleting: \".MEMBER_IMG_DIR_PATH.'/'.$this->photo_uid.'/'.$this->thispic.\"<br>\";\n unlink(MEMBER_IMG_DIR_PATH.'/'.$this->photo_uid.'/'.$this->thispic);\n }\n }\n $this->sql = \"delete gal, tags, com \"\n .\" FROM \".USERS_GALLERY_TABLE.\" AS gal\"\n .\" LEFT JOIN \".TAGS_TO_GALLERY_TABLE.\" AS tags ON tags.photo_id=gal.photo_id\"\n .\" LEFT JOIN \".USERS_GALLERY_COMMENTS_TABLE.\" AS com on com.photo_id=gal.photo_id\"\n .\" WHERE gal.photo_id=\".$this->pic_id;\n\n if ( !($this->result = $this->db->query($this->sql))){\n printf('Could not delete record at line %s file: %s <br> sql:%s', __LINE__, __FILE__, $this->sql);\n exit;\n }\n\n\n return 1;\n }else{\n echo 'pic id is empty for delete_this_pic<br>';\n return 0;\n }\n }", "title": "" }, { "docid": "b6c1118aa665c298d04e79e2fb50f4fc", "score": "0.52117217", "text": "function getLikeQuestion($idQuestion) {\n $con = connexionBdd();\n\n #count(*) GROUP BY\n $query = $con->prepare(\"SELECT count(`#Id_question`) as likecounter FROM `likes` WHERE `#Id_question` = $idQuestion\");\n $query->execute();\n return $query->fetch();\n }", "title": "" }, { "docid": "48d4e253a8e24504ac3a4ed251007a5a", "score": "0.5209984", "text": "function mwt_inc_post_like_callback() {\n\t\tcheck_ajax_referer( 'increment-post-likes', 'security' );\n\t\t$pID = intval( $_POST['pID'] );\n\t\tmwt_set_post_likes( $pID );\n\t\techo mwt_print_post_likes( mwt_get_post_likes( $pID ) );\n\n\t\tdie(); // this is required to return a proper result\n\t}", "title": "" } ]
fee9892e6ca2f06f7fc6d698b90e5947
Start on drip campaign The additional optional parameters for $args are as follows: 'sender' Default is null. Array ('address', 'name', 'reply_to') of sender. 'cc' Default is null. Array of ('address', 'name') for carbon copy. 'bcc' Default is null. Array of ('address', 'name') for blind carbon copy. 'tags' Default is null. Array of strings to tag email send with. 'esp' Default is null. Value of ('esp_account': 'esp_id')
[ { "docid": "c74801b87ab31fab143130fb1c0bbeb5", "score": "0.62149876", "text": "public function startOnDripCampaign($recipientAddress, $dripCampaignId, $data = null, $args = null)\n {\n $endpoint = 'drip_campaigns/' . $dripCampaignId . '/activate';\n\n $payload = array(\n 'recipient_address' => $recipientAddress\n );\n\n if (is_array($data)) {\n $payload['email_data'] = $data;\n }\n\n if (is_array($args)) {\n $payload = array_merge($args, $payload);\n }\n\n return $this->apiRequest($endpoint, self::HTTP_POST, $payload);\n }", "title": "" } ]
[ { "docid": "4dfee70f60e4386e08ac21f20177d058", "score": "0.5312908", "text": "public function debugWpActionInitial($args = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('debugWpActionInitial', func_get_args()));\n }", "title": "" }, { "docid": "dc91fc90c905aa2ef0132d781c74a0bc", "score": "0.5248777", "text": "public static function sendSOAP($args) {\n\t\t\n\t\t$args = self::_setDefaultArgs($args);\n\t\t\t\n\t\t$content = array(\n\t\t\t'subject' => $args['subject'],\n\t\t\t'html' => $args['html_message'],\n\t\t\t'text' => $args['text_message']\n\t\t);\n\t\t\n\t\t$options = array(\n\t\t\t'tag'=> $args['tags'], \n\t\t\t'mailfrom'=> $args['sender'],\n\t \t\t'mailfrom_friendly'=> $args['mailfrom_friendly'], \n\t \t\t'replyto'=>$args['reply_to'], \n\t \t\t'replyto_filtered'=> true\n\t\t);\n\t\t\n\t\t$emails = array(\n\t\t\tarray('email' => $args['receiver'])\n\t\t);\n\t\t\n\t\t$connect = new MxmConnect(self::$_configuration['user'], self::$_configuration['password']);\n\t\t$result = $connect -> sendCampaign($content, $options , $emails);\n\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "79f0a43ba17331daaf1d57e517757138", "score": "0.52067477", "text": "public function get_campaigns( $args = array() ) {\n\t\t\treturn $this->build_request( 'marketing/campaigns', $args )->fetch();\n\t\t}", "title": "" }, { "docid": "7970fe3d09efd819051b0a2ce617704e", "score": "0.51345384", "text": "public function debugWpFilterInitial($args = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('debugWpFilterInitial', func_get_args()));\n }", "title": "" }, { "docid": "1c692ec475a853b3834825ba34c2213d", "score": "0.5110642", "text": "public function render_mailchimp_field_campaign_template( $args )\n\t{\n\t\t$this->render_field( 'settings-template', $args );\n\t}", "title": "" }, { "docid": "9ee376f3ef8efa11199d16e37238a8a0", "score": "0.5096278", "text": "public function __construct()\n\t{\n\t\t// I set campaign code here\n\n\t\t$campaign_code = \"invite_leads_camp\"; // campaign code\n\t\t$delivery_time = config('email_campaigns.defaults.deliver_time'); // delivery time ex: \"12:00\"\n\n\t\tparent::__construct($campaign_code, $delivery_time);\n\n\t\t// here I set the sequence of emails to sent\n\n\t\t$this->addToSequence(\n\t\t\t\"l-01\", // code of the letter\n\t\t\t\"We are live!\", // subject\n\t\t\t\"email/html/email_campaign/lead_invitation\", // template html\n\t\t\t\"email/html/email_campaign/lead_invitation\" // template text\n\t\t);\n\n\t\t// who will recieve this email?\n\n\t\t$this->selectUsers();\n\n\t}", "title": "" }, { "docid": "91f843c9b5a47bb4fdafbe0813b04dc4", "score": "0.5063797", "text": "public static function logFunctionStart($args) {\n global $gDebugMode, $gDebugFunctionColor;\n\n if ($gDebugMode) {\n $callee = lib_get::callee();\n echo(\"<p style='color:\" . $gDebugFunctionColor . \";' >\" . $callee . \", args: \");\n print_r($args);\n echo(\"</p>\");\n }\n }", "title": "" }, { "docid": "8072c1c2149ea208b31975ffec9e40a8", "score": "0.50098634", "text": "public function __construct( array $args ) {\n\n\t\t$this->option_name = $args['option_name'];\n\t\t$this->endpoint = $args['endpoint'];\n\n\t\t$this->feedpress_option = get_option('feedpress_option');\n\n\t\tif(!empty($this->feedpress_option)) {\n\t\t\t$this->request();\n\t\t}\n\n\t}", "title": "" }, { "docid": "3f7035710145a08e2d2d4f08303f8cac", "score": "0.4993616", "text": "private function worker(array $args): array\n {\n # 1. Create the envelope request object\n $envelope_definition = $this->make_envelope($args[\"envelope_args\"]);\n\n # 2. call Envelopes::create API method\n # Exceptions will be caught by the calling function\n $envelope_api = $this->clientService->getEnvelopeApi();\n $results = $envelope_api->createEnvelope($args['account_id'], $envelope_definition);\n $envelope_id= $results->getEnvelopeId();\n\n # 3. Create the Recipient View request object\n $authentication_method = 'None'; # How is this application authenticating\n # the signer? See the `authentication_method' definition\n # https://developers.docusign.com/esign-rest-api/reference/Envelopes/EnvelopeViews/createRecipient\n $recipient_view_request = $this->clientService->getRecipientViewRequest(\n $authentication_method,\n $args[\"envelope_args\"]\n );\n\n # 4. Obtain the recipient_view_url for the embedded signing\n # Exceptions will be caught by the calling function\n $results = $this->clientService->getRecipientView($args['account_id'], $envelope_id, $recipient_view_request);\n\n return ['envelope_id' => $envelope_id, 'redirect_url' => $results['url']];\n }", "title": "" }, { "docid": "b59fdcd1737d8da0f3ae48d565c9943b", "score": "0.4979642", "text": "public function printDebugInfo($args)\n {\n echo \"Task: \\n\";\n echo \"service path: {$args[0]}\\n\";\n echo \"service args: {\\n\";\n var_dump($args[1]);\n echo \"}\\n\";\n }", "title": "" }, { "docid": "1666b4ce6f34ea989fff0218f32438d0", "score": "0.49772024", "text": "public function start($args, $assoc_args) {\n\t\t\\WP_CLI::log(\"Starting queue worker: {$args[0]}\");\n\n $worker = Worker::getInstance($args[0]);\n\n\t\tif(empty($worker)) {\n\t\t\t\\WP_CLI::error('Queue does not exist');\n\t\t}\n\n $worker->start();\n\n\t\t\\WP_CLI::log(\"Queue worker stopped\");\n\t}", "title": "" }, { "docid": "352a56e91e85f2d207fc8f5c36fb75b5", "score": "0.49552536", "text": "function acf_request_args($args = array())\n{\n}", "title": "" }, { "docid": "e84132da59c58d892506f4500c59a4b1", "score": "0.49465904", "text": "function callback( $args )\r\n\t{\r\n\t\t$autoresponders = MP_Autoresponder::get_from_event( $this->id );\r\n\t\tif ( empty( $autoresponders ) ) return;\r\n\r\n\t\tforeach( $autoresponders as $autoresponder )\r\n\t\t{\r\n\t\t\tif ( !$this->to_do( $autoresponder, $args ) ) continue;\r\n\r\n\t\t\t$_mails = MP_Autoresponder::get_term_objects( $autoresponder->term_id );\r\n\r\n\t\t\tif ( !isset( $_mails[0] ) ) continue;\r\n\r\n\t\t\t$term_id = $autoresponder->term_id;\r\n\r\n\t\t\t$time = time();\r\n\t\t\t$schedule = $this->schedule( $time, $_mails[0]['schedule'] );\r\n\t\t\t$meta_id = MP_User_meta::add( $this->mp_user_id, '_MailPress_autoresponder_' . $term_id, $time );\r\n\r\n\t\t\t$this->trace = new MP_Log( 'mp_process_autoresponder_'. $term_id, array( 'option_name' => 'autoresponder' ) );\r\n\r\n\t\t\t$this->trace->log( '!' . str_repeat( '-', self::bt ) . '!' );\r\n\t\t\t$bm = \"Batch Report autoresponder #$term_id meta_id : $meta_id mail_order : 0\";\r\n\t\t\t$this->trace->log( '!' . str_repeat( ' ', 5 ) . $bm . str_repeat( ' ', self::bt - 5 - strlen( $bm ) ) . '!' );\r\n\t\t\t$this->trace->log( '!' . str_repeat( '-', self::bt ) . '!' );\r\n\t\t\t$bm = \" mp_user ! $this->mp_user_id\";\r\n\t\t\t$this->trace->log( '!' . $bm . str_repeat( ' ', self::bt - strlen( $bm ) ) . '!' );\r\n\t\t\t$bm = \" event ! \" . $this->event;\r\n\t\t\t$this->trace->log( '!' . $bm . str_repeat( ' ', self::bt - strlen( $bm ) ) . '!' );\r\n\t\t\t$bm = \" 1st sched. ! \";\r\n\t\t\t$bm .= ( '000000' == $_mails[0]['schedule'] ) ? __( 'now', 'MailPress' ) : date( 'Y-m-d H:i:s', $schedule );\r\n\t\t\t$this->trace->log( '!' . $bm . str_repeat( ' ', self::bt - strlen( $bm ) ) . '!' );\r\n\t\t\t$this->trace->log( '!' . str_repeat( '-', self::bt ) . '!' );\r\n\r\n\t\t\t$this->trace->end( true );\r\n\r\n\t\t\t$_args = array( 'meta_id' => $meta_id, 'mail_order'=> 0 );\r\n\t\t\tif ( '000000' == $_mails[0]['schedule'] )\r\n\t\t\t\tdo_action ( 'mp_process_autoresponder_' . $this->id, $_args );\r\n\t\t\telse\r\n\t\t\t\twp_schedule_single_event( $schedule, 'mp_process_autoresponder_' . $this->id, \tarray( 'args' => $_args ) );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "3ee8c1a2f8690a82fd46323ca29a78c5", "score": "0.49395603", "text": "public function run()\n {\n Campaign::create([\n 'user_id' => 1,\n 'name' => 'Test Campaign',\n 'date' => '2021-02-19',\n 'daily_budget' => 100,\n 'total_budget' => 1000\n ]);\n }", "title": "" }, { "docid": "a6579e1403d23688ac427afd693bdd71", "score": "0.48460656", "text": "protected static function _setDefaultArgs($args) {\n\t\t$defaults=array(\n\t\t\t'receiver'=>'',\n\t\t\t'carboncopy'=>'',\n\t\t\t'blindcopy'=>'',\n\t\t\t'reply_to'=>'',\n\t\t\t'attachment'=>'',\n\t\t\t'attachment_name'=>'',\n\t\t\t'message'=>'',\n\t\t\t'html_message'=>'',\n\t\t\t'text_message'=>'',\n\t\t\t'errors_to'=>'',\n\t\t\t'return_path'=>'',\n\t\t\t'message_id'=>'',\n\t\t\t'eol'=>\"\\r\\n\",\n\t\t\t'tags' => array(self::_generateMessageID()),\n\t\t\t'mailfrom_friendly' => $_SERVER['SERVER_NAME']\n\t\t);\n\t\t\n\t\t$args += $defaults;\n\t\t\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "aff8ffbdfea5fe236268c3dded936efb", "score": "0.48181167", "text": "public function __construct()\n {\n if (29 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->from = func_get_arg(1);\n $this->to = func_get_arg(2);\n $this->cc = func_get_arg(3);\n $this->bcc = func_get_arg(4);\n $this->bodyUrl = func_get_arg(5);\n $this->accountId = func_get_arg(6);\n $this->userId = func_get_arg(7);\n $this->mailThreadId = func_get_arg(8);\n $this->subject = func_get_arg(9);\n $this->snippet = func_get_arg(10);\n $this->mailTrackingStatus = func_get_arg(11);\n $this->mailLinkTrackingEnabledFlag = func_get_arg(12);\n $this->readFlag = func_get_arg(13);\n $this->draft = func_get_arg(14);\n $this->draftFlag = func_get_arg(15);\n $this->syncedFlag = func_get_arg(16);\n $this->deletedFlag = func_get_arg(17);\n $this->hasBodyFlag = func_get_arg(18);\n $this->sentFlag = func_get_arg(19);\n $this->sentFromPipedriveFlag = func_get_arg(20);\n $this->smartBccFlag = func_get_arg(21);\n $this->messageTime = func_get_arg(22);\n $this->addTime = func_get_arg(23);\n $this->updateTime = func_get_arg(24);\n $this->hasAttachmentsFlag = func_get_arg(25);\n $this->hasInlineAttachmentsFlag = func_get_arg(26);\n $this->hasRealAttachmentsFlag = func_get_arg(27);\n $this->writeFlag = func_get_arg(28);\n }\n }", "title": "" }, { "docid": "b2d3c55096d7a36767c8f274d63bdbf6", "score": "0.48048562", "text": "private function worker(array $args): array\n {\n # 1. Create the envelope request object\n $envelope_definition = $this->make_envelope($args[\"envelope_args\"]);\n\n # 2. call Envelopes::create API method\n # Exceptions will be caught by the calling function\n $envelope_api = $this->clientService->getEnvelopeApi();\n $results = $envelope_api->createEnvelope($args['account_id'], $envelope_definition);\n\n return ['envelope_id' => $results->getEnvelopeId()];\n }", "title": "" }, { "docid": "8327c64b857c8113babb638c85061612", "score": "0.47776195", "text": "function bp_cpt_tracking_args()\n{\n if (! bp_is_active('activity')) {\n return;\n }\n \n bp_activity_set_post_type_tracking_args('contest', array(\n 'action_id' => 'new_contest',\n 'bp_activity_admin_filter' => __('Published a new contest', 'afriflow'),\n 'bp_activity_front_filter' => __('Contests', 'afriflow'),\n 'contexts' => array( 'activity', 'member' ),\n 'activity_comment' => true,\n 'bp_activity_new_post' => __('%1$s posted a new <a href=\"%2$s\">contest</a>', 'afriflow'),\n 'bp_activity_new_post_ms' => __('%1$s posted a new <a href=\"%2$s\">contest</a>, on the site %3$s', 'afriflow'),\n 'comment_action_id' => 'new_contest_comment',\n 'bp_activity_comments_admin_filter' => __('Commented a contest', 'afriflow'),\n 'bp_activity_comments_front_filter' => __('Contests Comments', 'afriflow'),\n 'bp_activity_new_comment' => __('%1$s commented on the <a href=\"%2$s\">contest</a>', 'afriflow'),\n 'bp_activity_new_comment_ms' => __('%1$s commented on the <a href=\"%2$s\">contest</a>, on the site %3$s', 'afriflow'),\n 'position' => 100,\n ));\n\n bp_activity_set_post_type_tracking_args('contest', array(\n 'action_id' => 'new_entry',\n 'bp_activity_admin_filter' => __('Published a new entry', 'afriflow'),\n 'bp_activity_front_filter' => __('Submissionss', 'afriflow'),\n 'contexts' => array( 'activity', 'member' ),\n 'activity_comment' => true,\n 'bp_activity_new_post' => __('%1$s posted a new <a href=\"%2$s\">entry</a>', 'afriflow'),\n 'bp_activity_new_post_ms' => __('%1$s posted a new <a href=\"%2$s\">entry</a>, on the site %3$s', 'afriflow'),\n 'comment_action_id' => 'new_blog_page_comment',\n 'bp_activity_comments_admin_filter' => __('Commented an entry', 'afriflow'),\n 'bp_activity_comments_front_filter' => __('Entries Comments', 'afriflow'),\n 'bp_activity_new_comment' => __('%1$s commented on the <a href=\"%2$s\">entry</a>', 'afriflow'),\n 'bp_activity_new_comment_ms' => __('%1$s commented on the <a href=\"%2$s\">entry</a>, on the site %3$s', 'afriflow'),\n 'position' => 100,\n ));\n\n bp_activity_set_post_type_tracking_args('submission', array(\n 'action_id' => 'like_entry',\n 'bp_activity_admin_filter' => __('Liked a contest entry', 'afriflow'),\n 'bp_activity_front_filter' => __('Submissions', 'afriflow'),\n 'contexts' => array( 'activity', 'member' ),\n 'activity_comment' => true,\n 'bp_activity_new_post' => __('%1$s posted a new <a href=\"%2$s\">entry</a>', 'afriflow'),\n 'bp_activity_new_post_ms' => __('%1$s posted a new <a href=\"%2$s\">entry</a>, on the site %3$s', 'afriflow')\n ));\n\n bp_activity_set_post_type_tracking_args('submission', array(\n 'action_id' => 'dislike_entry',\n 'bp_activity_admin_filter' => __('Disiked a contest entry', 'afriflow'),\n 'bp_activity_front_filter' => __('Submissions', 'afriflow'),\n 'contexts' => array( 'activity', 'member' ),\n 'activity_comment' => true,\n 'bp_activity_new_post' => __('%1$s posted a new <a href=\"%2$s\">entry</a>', 'afriflow'),\n 'bp_activity_new_post_ms' => __('%1$s posted a new <a href=\"%2$s\">entry</a>, on the site %3$s', 'afriflow')\n ));\n\n\n bp_activity_set_post_type_tracking_args('contest', array(\n 'action_id' => 'vote_entry',\n 'bp_activity_admin_filter' => __('Voted for a contest entry', 'afriflow'),\n 'bp_activity_front_filter' => __('Submissions', 'afriflow'),\n 'contexts' => array( 'activity', 'member' ),\n 'activity_comment' => true,\n 'bp_activity_new_post' => __('%1$s posted a new <a href=\"%2$s\">entry</a>', 'afriflow'),\n 'bp_activity_new_post_ms' => __('%1$s posted a new <a href=\"%2$s\">entry</a>, on the site %3$s', 'afriflow')\n ));\n}", "title": "" }, { "docid": "82998220ece9874ebee6a2c3a322cb39", "score": "0.47608614", "text": "public function worker($args): string\n {\n # Step 3 Start\n $env = new EnvelopeDefinition([\n 'workflow' => new Workflow(['workflow_status' => 'in_progress'])\n ]);\n $envelope_api = $this->clientService->getEnvelopeApi();\n $envelope_option = new UpdateOptions();\n\n # Update resend envelope parameter\n $envelope_option -> setResendEnvelope('true');\n # Step 3 End\n\n # Step 4 Start\n # Call Envelopes::update API method to unpause signature workflow\n $envelope = $envelope_api->update(\n $args['account_id'],\n $args['pause_envelope_id'],\n $envelope=$env,\n $options=$envelope_option\n );\n $envelope_id = $envelope['envelope_id'];\n # Step 4 End\n\n return $envelope_id;\n }", "title": "" }, { "docid": "a2798ca45f37397339615caf6c5f2279", "score": "0.47342375", "text": "public static function wcap_capture_email_address_from_url( $args ) {\n\t\t\t// First, we read the option\n\t\t\t$ac_capture_email_address_from_url = get_option( 'ac_capture_email_address_from_url' );\n\t\t\t// Next, we update the name attribute to access this element's ID in the context of the display options array.\n\t\t\t// We also access the show_header element of the options collection in the call to the checked() helper function.\n\t\t\tprintf(\n\t\t\t\t'<input type=\"text\" id=\"ac_capture_email_address_from_url\" name=\"ac_capture_email_address_from_url\" value=\"%s\" />',\n\t\t\t\tisset( $ac_capture_email_address_from_url ) ? esc_attr( $ac_capture_email_address_from_url ) : ''\n\t\t\t);\n\t\t\t// Here, we'll take the first argument of the array and add it to a label next to the checkbox.\n\t\t\t$html = '<label for=\"ac_capture_email_address_from_url_label\"> ' . $args[0] . '</label>';\n\t\t\techo $html;\n\t\t}", "title": "" }, { "docid": "cda0f0739b6aaf9a2b4b8787a4042fd0", "score": "0.47321314", "text": "public function __construct()\n {\n if (6 == func_num_args()) {\n $this->applicationId = func_get_arg(0);\n $this->to = func_get_arg(1);\n $this->from = func_get_arg(2);\n $this->text = func_get_arg(3);\n $this->media = func_get_arg(4);\n $this->tag = func_get_arg(5);\n }\n }", "title": "" }, { "docid": "0b8530ed694ff0ab143b392334a61d7d", "score": "0.47198424", "text": "public function render_mailchimp_campaigns_section( $args )\n\t{\n\t\t?>\n\t\t<p><?php esc_html_e( 'Any changes related to Groupings (taxonomies and terms) that are saved will delete all Campaigns created by Chimplet. They must be re-generated manually, below. The syncing process is separate from the principal saving of settings to reduce page load times.', 'chimplet' ); ?></p>\n\t\t<?php\n\t}", "title": "" }, { "docid": "64088b6b353d24b45e3b81403f481493", "score": "0.46998954", "text": "function lds_travel_acf_date_generator($args=array()) {\n // Functional module does not have any view part. We will not include any tpl here.\n // if ( ! $args ) {\n // return false;\n // }\n // $content = false;\n // $section_title = false;\n // $trip_args = array();// use?\n // $content = apply_filters('the_content', $content);//use?\n // extract($args, EXTR_OVERWRITE);//use?\n\n //include('tpl/featured-trip--default.tpl.php');\n \n}", "title": "" }, { "docid": "7c84df86052f3fcb4aeb5cff3543ac64", "score": "0.46973887", "text": "public function render_mailchimp_field_campaign_schedule( $args )\n\t{\n\t\t$this->render_field( 'settings-schedule', $args );\n\t}", "title": "" }, { "docid": "4792eabad48a870fc4e255d448e8507d", "score": "0.46784985", "text": "public static function setUp_wp_mail( $args ) {\n\t\tif ( isset( $_SERVER[ 'SERVER_NAME' ] ) ) {\n\t\t\tself::$cached_SERVER_NAME = $_SERVER[ 'SERVER_NAME' ];\n\t\t}\n\n\t\t$_SERVER[ 'SERVER_NAME' ] = 'example.com';\n\n\t\t// passthrough\n\t\treturn $args;\n\t}", "title": "" }, { "docid": "f9faf96bbe7a3b2b48ba9b6186a6efa1", "score": "0.4662022", "text": "public function run(array $args=null);", "title": "" }, { "docid": "067b837aa9262ba6e5ec2b30a772799d", "score": "0.46396148", "text": "public function __construct( $args = array() ) {\n $this->_args = wp_parse_args( $args, array(\n\t\t'form_id' => false,\n\t \t'email_field_id' => false,\n\t \t'redirect_url' => false,\n ) );\n\n // do version check in the init to make sure if GF is going to be loaded, it is already loaded\n add_action( 'init', array( $this, 'init' ) );\n\n }", "title": "" }, { "docid": "43e30950cccadaa60e1b89096604fc81", "score": "0.46393177", "text": "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->domain = func_get_arg(0);\n $this->envelopeName = func_get_arg(1);\n }\n }", "title": "" }, { "docid": "1777419e324f7ecf957e3c2a2cf5e62f", "score": "0.4636233", "text": "function mailsubscribers_args_action(){\n\t$email = _request('email');\n\t$arg = _request('arg');\n\n\tif (is_null($arg) OR is_null($email)){\n\t\t$query = $_SERVER[\"QUERY_STRING\"];\n\t\t// cas du arg coupe\n\t\tif (strpos($query,\"arg%\")!==false){\n\t\t\t$query = str_replace(\"arg%\",\"arg=\",$query);\n\t\t}\n\t\t// cas du & transorme en &amp;\n\t\tif (strpos($query,'&amp;')!==false){\n\t\t\t$query = str_replace(\"&amp;\",\"&\",$query);\n\t\t}\n\t\tparse_str($query,$args);\n\t\t$arg = strtolower($args['arg']);\n\t\t$email = $args['email'];\n\t\tif (strlen($arg)>40)\n\t\t\t$arg = substr($arg,-40);\n\t\tif ($arg AND $email){\n\t\t\tspip_log(\"mailsubscriber : query_string mal formee, verifiez votre service d'envoi de mails [\".$_SERVER[\"QUERY_STRING\"].\"]\",\"mailsubscribers\"._LOG_INFO_IMPORTANTE);\n\t\t}\n\t}\n\n\treturn array($email,$arg);\n}", "title": "" }, { "docid": "c07e6d59e6b533f52d96d1baaa458757", "score": "0.46282077", "text": "public function cc_sender()\n\t{\n\t\tif (!count($this->recipients))\n\t\t{\n\t\t\ttrigger_error('No email recipients specified');\n\t\t}\n\t\tif (!$this->sender_address)\n\t\t{\n\t\t\ttrigger_error('No email sender specified');\n\t\t}\n\n\t\t$this->recipients[] = array(\n\t\t\t'lang'\t\t\t=> $this->sender_lang,\n\t\t\t'address'\t\t=> $this->sender_address,\n\t\t\t'name'\t\t\t=> $this->sender_name,\n\t\t\t'username'\t\t=> $this->sender_username,\n\t\t\t'jabber'\t\t=> $this->sender_jabber,\n\t\t\t'notify_type'\t=> $this->sender_notify_type,\n\t\t\t'to_name'\t\t=> $this->recipients[0]['to_name'],\n\t\t);\n\t}", "title": "" }, { "docid": "e0eb3f58ad23c27b8341a8dea46fe78d", "score": "0.4626999", "text": "public function __construct()\n {\n if (21 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->gseEnabled = func_get_arg(1);\n $this->portfolioId = func_get_arg(2);\n $this->customerType = func_get_arg(3);\n $this->customerId = func_get_arg(4);\n $this->requestId = func_get_arg(5);\n $this->title = func_get_arg(6);\n $this->requesterName = func_get_arg(7);\n $this->type = func_get_arg(8);\n $this->status = func_get_arg(9);\n $this->createdDate = func_get_arg(10);\n $this->startDate = func_get_arg(11);\n $this->endDate = func_get_arg(12);\n $this->days = func_get_arg(13);\n $this->seasoned = func_get_arg(14);\n $this->institutions = func_get_arg(15);\n $this->cashFlowBalanceSummary = func_get_arg(16);\n $this->cashFlowCreditSummary = func_get_arg(17);\n $this->cashFlowDebitSummary = func_get_arg(18);\n $this->cashFlowCharacteristicsSummary = func_get_arg(19);\n $this->possibleLoanDeposits = func_get_arg(20);\n }\n }", "title": "" }, { "docid": "768eebe4b0868c74fa6082fad501be7a", "score": "0.46268475", "text": "public function __construct(\\Fonolo\\Client $_client, array $_args)\n {\n $this->init($_client);\n\n $this->m_call_id = array_shift($_args);\n }", "title": "" }, { "docid": "cb306022b77612aa12ce9a45af0aa163", "score": "0.46248823", "text": "private function make_envelope(array $args): EnvelopeDefinition\n {\n # create the envelope definition with the template_id\n $envelope_definition = new EnvelopeDefinition([\n 'status' => 'sent', 'template_id' => $args['template_id']\n ]);\n\n # Set the values for the fields in the template\n $check1 = new Checkbox([\n 'tab_label' => 'ckAuthorization', 'selected' => \"true\"]);\n $check3 = new Checkbox([\n 'tab_label' => 'ckAgreement', 'selected' => \"true\"]);\n $number1 = new Number([\n 'tab_label' => \"numbersOnly\", 'value' => '54321']);\n $radio_group = new RadioGroup(['group_name' => \"radio1\",\n # You only need to provide the radio entry for the entry you're selecting\n 'radios' => [\n new Radio(['value' => \"white\", 'selected' => \"true\"]),\n ]]);\n $text = new Text([\n 'tab_label' => \"text\", 'value' => \"Jabberwocky!\"]);\n\n # We can also add a new field to the ones already in the template:\n $text_extra = new Text([\n 'document_id' => \"1\", 'page_number' => \"1\",\n 'x_position' => \"280\", 'y_position' => \"172\",\n 'font' => \"helvetica\", 'font_size' => \"size14\", 'tab_label' => \"added text field\",\n 'height' => \"23\", 'width' => \"84\", 'required' => \"false\",\n 'bold' => 'true', 'value' => $args['signer_name'],\n 'locked' => 'false', 'tab_id' => 'name']);\n\n # Pull together the existing and new tabs in a Tabs object:\n $tabs = new Tabs([\n 'checkbox_tabs' => [$check1, $check3], 'number_tabs' => [$number1],\n 'radio_group_tabs' => [$radio_group], 'text_tabs' => [$text, $text_extra]]);\n\n # Create the template role elements to connect the signer and cc recipients\n # to the template\n $signer = new TemplateRole([\n 'email' => $args['signer_email'], 'name' => $args['signer_name'],\n 'role_name' => 'signer',\n 'client_user_id' => $args['signer_client_id'], # change the signer to be embedded\n 'tabs' => $tabs # Set tab values\n ]);\n # Create a cc template role.\n $cc = new TemplateRole([\n 'email' => $args['cc_email'], 'name' => $args['cc_name'],\n 'role_name' => 'cc'\n ]);\n\n # Add the TemplateRole objects to the envelope object\n $envelope_definition->setTemplateRoles([$signer, $cc]);\n\n # Create an envelope custom field to save the our application's\n # data about the envelope\n $custom_field = new TextCustomField([\n 'name' => 'app metadata item',\n 'required' => 'false',\n 'show' => 'true', # Yes, include in the CoC\n 'value' => '1234567']);\n $custom_fields = new CustomFields([\n 'text_custom_fields' => [$custom_field]]);\n $envelope_definition->setCustomFields($custom_fields);\n\n return $envelope_definition;\n }", "title": "" }, { "docid": "14997aecfc8d5a105fc04a4ee4dc48a6", "score": "0.46130005", "text": "public function __construct($args)\n {\n # Step 2 start\n # Exceptions will be caught by the calling function\n $config = new Configuration();\n $config->setHost('https://demo.rooms.docusign.com/restapi');\n $config->addDefaultHeader('Authorization', 'Bearer ' . $args['ds_access_token']);\n $this->apiClient = new ApiClient($config);\n # Step 2 end \n $this->routerService = new RouterService();\n }", "title": "" }, { "docid": "9e574662009f424bcf74050c09a7aab4", "score": "0.46121413", "text": "private function send($view, $args=[])\n\t{\n //\\App\\Classes\\LogToFile::add(__FILE__, json_encode(self::$text, JSON_PRETTY_PRINT));\n\t\t$args = array_merge([\n\t\t\t'to' => [\n\t\t\t\t'address' => null,\n\t\t\t\t'name' => null,\n\t\t\t],\n\t\t\t'from' => self::$from,\n\t\t\t'reply' => self::$reply,\n\t\t\t'subject' => null,\n\t\t], $args);\n\n\t\ttry {\n\t\t $data = [\n\t\t 'args' => $args,\n // info.bale.php variables array. Accessed via $text in blade\n 'text' => [\n 'title' => self::$text['title'],\n 'message' => self::$text['message'],\n 'link' => self::$text['link'],\n 'linkText' => self::$text['linkText']\n ]\n ];\n\t\t\tMail::send($view, $data, function ($message) use ($data) {\n\t\t\t $message->to($data['args']['to']['address'], $data['args']['to']['name']);\n\t\t\t $message->sender($data['args']['from']['address'], $data['args']['from']['name']);\n\t\t\t $message->replyTo($data['args']['reply']['address'], $data['args']['reply']['name']);\n\t\t\t $message->subject($data['args']['subject']);\n\t\t\t});\n\t\t\treturn true;\n\t\t} catch (\\Exception $e) {\n\t\t\tLog::error('Error sending email: '.$e->getMessage());\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "10e4bf8c23f0ebf4da571745c1ae14b4", "score": "0.46042565", "text": "public function __construct()\n {\n if (7 == func_num_args()) {\n $this->applicationId = func_get_arg(0);\n $this->to = func_get_arg(1);\n $this->from = func_get_arg(2);\n $this->text = func_get_arg(3);\n $this->media = func_get_arg(4);\n $this->tag = func_get_arg(5);\n $this->priority = func_get_arg(6);\n }\n }", "title": "" }, { "docid": "8a55ff8a171e874759cc4f97af0d1e75", "score": "0.46006167", "text": "public function __construct($args = array())\n\t{\n\t\t$default_args = array('consumerKey' => null, 'sharedSecret' => null);\n\t\t$args = array_merge($default_args, $args);\n\n\t\t$this->credentials('client', $args['consumerKey'], $args['sharedSecret']);\n\n\t\tif (isset($args['xxx'])) {\n\t\t\t$this->signatureWithPost = $args['xxx'];\n\t\t}\n\t}", "title": "" }, { "docid": "39fea9bc1a62e681810dfa88465fde75", "score": "0.45867527", "text": "protected function core_source($sender, $args = array())\n {\n $this->addMessageToQue('You can get the source for this bot at https://github.com/IBurn36360/PHP_BurnBot');\n }", "title": "" }, { "docid": "e2824feea2d6520eea69c3fbee5ae9f2", "score": "0.45627373", "text": "public function __construct($args = []) {\n $this->firstname = $args['firstname'] ?? 'voornaam onbekend';\n $this->infix = $args['infix'] ?? 'tussenvoegsel onbekend';\n $this->lastname = $args['lastname'] ?? 'achternaam onbekend';\n $bodymass = $args['bodymass'] ?? 0;\n $this->set_bodymass($bodymass);\n $this->bodylength = $args['bodylength'] ?? 1;\n }", "title": "" }, { "docid": "6753779a0cc1b08f04cbfa6d249224ee", "score": "0.4560185", "text": "public function __construct( $args = array() ) {\n\t\t$this->_args = wp_parse_args( $args, array(\n\t\t\t'form_id' => false,\n\t\t\t'target_field_id' => false,\n\t\t\t'source_field_id' => false,\n\t\t\t'format' => '',\n\t\t\t'modifier' => false,\n\t\t\t'min_date' => false,\n\t\t\t'enable_i18n' => false,\n\t\t\t'override_on_submission' => false,\n\t\t) );\n\n\t\t$this->_field_values = array();\n\n\t\tif ( ! $this->_args['form_id'] || ! $this->_args['target_field_id'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// time for hooks\n\t\tadd_action( 'init', array( $this, 'init' ) );\n\n\t}", "title": "" }, { "docid": "d460af343a54a8563eb5979ea9b4a8c2", "score": "0.45590514", "text": "public function __construct($args = []);", "title": "" }, { "docid": "bd79235fb8023c045a5c86303d33e1a1", "score": "0.4557882", "text": "public function __construct(array $arguments = [])\n {\n parent::__construct($arguments);\n $this->receiver = array_get($arguments, 'receiver');\n $this->sender = array_get($arguments, 'sender');\n }", "title": "" }, { "docid": "bf5370fd32d5cce1d4ef895a9f4515bd", "score": "0.455646", "text": "public static function wcap_from_email_callback( $args ) {\n\t\t\t// First, we read the option\n\t\t\t$wcap_from_email = get_option( 'wcap_from_email' );\n\t\t\t// Next, we update the name attribute to access this element's ID in the context of the display options array\n\t\t\t// We also access the show_header element of the options collection in the call to the checked() helper function\n\t\t\tprintf(\n\t\t\t\t'<input type=\"text\" id=\"wcap_from_email\" name=\"wcap_from_email\" value=\"%s\" />',\n\t\t\t\tisset( $wcap_from_email ) ? esc_attr( $wcap_from_email ) : ''\n\t\t\t);\n\t\t\t// Here, we'll take the first argument of the array and add it to a label next to the checkbox\n\t\t\t$html = '<label for=\"wcap_from_email_label\"> ' . $args[0] . '</label>';\n\t\t\techo $html;\n\t\t}", "title": "" }, { "docid": "dfa328ab706d7675003bf5d214963f01", "score": "0.45475888", "text": "public function __construct($args=[]) {\n $this->home = $args['home'] ?? 'Home';\n $this->opponent = $args['away'] ?? 'Opponent';\n $this->date = $args['date'] ?? '';\n $this->time = $args['time'] ?? '';\n $this->link = $args['link'] ?? 'https://rsl.com/tickets';\n\n }", "title": "" }, { "docid": "a9be9b1f2476e680c252ee4da1db6e97", "score": "0.45439616", "text": "private function make_envelope(array $args): EnvelopeDefinition\n {\n # Order form constants\n $l1_name = \"Harmonica\";\n $l1_price = 5;\n $l1_description = \"{$l1_price} each\";\n $l2_name = \"Xylophone\";\n $l2_price = 150;\n $l2_description = \"{$l2_price} each\";\n $currency_multiplier = 100;\n\n # read the html file from a local directory\n # The read could raise an exception if the file is not available!\n $doc1_file = 'order_form.html';\n $doc1_html_v1 = file_get_contents(self::DEMO_DOCS_PATH . $doc1_file);\n\n # Substitute values into the HTML\n # Substitute for: {signerName}, {signerEmail}, {cc_name}, {cc_email}\n $doc1_html_v2 = str_replace(\n ['{signer_email}' , '{cc_name}' , '{cc_email}' ],\n [$args['signer_email'], $args['cc_name'], $args['cc_email']],\n $doc1_html_v1\n );\n\n # create the envelope definition\n $envelope_definition = new EnvelopeDefinition([\n 'email_subject' => 'Please complete your order',\n 'status' => 'sent']);\n\n # add the document\n $doc1_b64 = base64_encode($doc1_html_v2);\n $doc1 = new Document([\n 'document_base64' => $doc1_b64,\n 'name' => 'Order form', # can be different from actual file name\n 'file_extension' => 'html', # Source data format.\n 'document_id' => '1' # a label used to reference the doc\n ]);\n $envelope_definition->setDocuments([$doc1]);\n\n # create a signer recipient to sign the document\n $signer1 = new Signer([\n 'email' => $args['signer_email'], 'name' => $args['signer_name'],\n 'recipient_id' => \"1\", 'routing_order'=> \"1\"]);\n # create a cc recipient to receive a copy of the documents\n $cc1 = new CarbonCopy([\n 'email' => $args['cc_email'], 'name' => $args['cc_name'],\n 'recipient_id' => \"2\", 'routing_order' => \"2\"]);\n\n # Create signHere fields (also known as tabs) on the documents,\n # We're using anchor (autoPlace) positioning\n $sign_here1 = new SignHere([\n 'anchor_string' => '/sn1/',\n 'anchor_y_offset' => '10', 'anchor_units' => 'pixels',\n 'anchor_x_offset' =>'20']);\n\n $list1 = new ModelList([\n 'font' => \"helvetica\",\n 'font_size' => \"size11\",\n 'anchor_string' => '/l1q/',\n 'anchor_y_offset' => '-10', 'anchor_units' => 'pixels',\n 'anchor_x_offset' => '0',\n 'list_items' => [\n ['text' => \"Red\" , 'value' => \"red\" ], ['text' => \"Orange\", 'value' => \"orange\"],\n ['text' => \"Yellow\", 'value' => \"yellow\"], ['text' => \"Green\" , 'value' => \"green\" ],\n ['text' => \"Blue\" , 'value' => \"blue\" ], ['text' => \"Indigo\", 'value' => \"indigo\"]\n ],\n 'required' => \"true\",\n 'tab_label' => \"l1q\"\n ]);\n\n $list2 = new ModelList([\n 'font' => \"helvetica\",\n 'font_size' => \"size11\",\n 'anchor_string' => '/l1q/',\n 'anchor_y_offset' => '-10', 'anchor_units' => 'pixels',\n 'anchor_x_offset' => '0',\n 'list_items' => [\n ['text' => \"Red\" , 'value' => \"red\" ], ['text' => \"Orange\", 'value' => \"orange\"],\n ['text' => \"Yellow\", 'value' => \"yellow\"], ['text' => \"Green\" , 'value' => \"green\" ],\n ['text' => \"Blue\" , 'value' => \"blue\" ], ['text' => \"Indigo\", 'value' => \"indigo\"]\n ],\n 'required' => \"true\",\n 'tab_label' => \"l2q\"\n ]);\n\n # create two formula tabs for the extended price on the line items\n $formulal1e = new FormulaTab([\n 'font' => \"helvetica\",\n 'font_size' => \"size11\",\n 'anchor_string' => '/l1e/',\n 'anchor_y_offset' => '-8', 'anchor_units' => 'pixels',\n 'anchor_x_offset' => '105',\n 'tab_label' => \"l1e\",\n 'formula' => \"[l1q] * {$l1_price}\",\n 'round_decimal_places' => \"0\",\n 'required' => \"true\",\n 'locked' => \"true\",\n 'disable_auto_size' => \"false\",\n ]);\n $formulal2e = new FormulaTab([\n 'font' => \"helvetica\",\n 'font_size' => \"size11\",\n 'anchor_string' => '/l2e/',\n 'anchor_y_offset' => '-8', 'anchor_units' => 'pixels',\n 'anchor_x_offset' => '105',\n 'tab_label' => \"l2e\",\n 'formula' => \"[l2q] * {$l2_price}\",\n 'round_decimal_places' => \"0\",\n 'required' => \"true\",\n 'locked' => \"true\",\n 'disable_auto_size' => \"false\",\n ]);\n # Formula for the total\n $formulal3t = new FormulaTab([\n 'font' => \"helvetica\",\n 'bold' => \"true\",\n 'font_size' => \"size12\",\n 'anchor_string' => '/l3t/',\n 'anchor_y_offset' => '-8', 'anchor_units' => 'pixels',\n 'anchor_x_offset' => '50',\n 'tab_label' => \"l3t\",\n 'formula' => '[l1e] + [l2e]',\n 'round_decimal_places' => \"0\",\n 'required' => \"true\",\n 'locked' => \"true\",\n 'disable_auto_size' => \"false\",\n ]);\n # Payment line items\n $payment_line_iteml1 = new PaymentLineItem([\n 'name' => $l1_name, 'description' => $l1_description,\n 'amount_reference' => \"l1e\"]);\n $payment_line_iteml2 = new PaymentLineItem([\n 'name' => $l2_name, 'description' => $l2_description,\n 'amount_reference' => \"l2e\"]);\n $payment_details = new PaymentDetails([\n 'gateway_account_id' => $args['gateway_account_id'],\n 'currency_code' => \"USD\",\n 'gateway_name' => $args['gateway_name'],\n 'line_items' => [$payment_line_iteml1, $payment_line_iteml2]]);\n # Hidden formula for the payment itself\n $formula_payment = new FormulaTab([\n 'tab_label' => \"payment\",\n 'formula' => \"([l1e] + [l2e]) * {$currency_multiplier}\",\n 'round_decimal_places' => \"0\",\n 'payment_details' => $payment_details,\n 'hidden' => \"true\",\n 'required' => \"true\",\n 'locked' => \"true\",\n 'document_id' => \"1\",\n 'page_number' => \"1\",\n 'x_position' => \"0\",\n 'y_position' => \"0\"]);\n\n # Tabs are set per recipient / signer\n $signer1_tabs = new Tabs([\n 'sign_here_tabs' => [$sign_here1],\n 'list_tabs' => [$list1, $list2],\n 'formula_tabs' => [$formulal1e, $formulal2e,\n $formulal3t, $formula_payment]]);\n $signer1->setTabs($signer1_tabs);\n\n # Add the recipients to the envelope object\n $recipients = new Recipients([\n 'signers' => [$signer1], 'carbon_copies' => [$cc1]]);\n $envelope_definition->setRecipients($recipients);\n\n return $envelope_definition;\n }", "title": "" }, { "docid": "737bbc0e2aac33216438755555c45189", "score": "0.45344537", "text": "public function __construct( $args )\n {\n parent::__construct( 'participant', $args );\n\n $this->add_column( 'uid', 'string', 'Unique ID', true );\n // sorting by source name will require more work if needed because\n // participant::select_for_site() doesn't join the source table\n $this->add_column( 'source.name', 'string', 'Source', false );\n $this->add_column( 'first_name', 'string', 'First Name', true );\n $this->add_column( 'last_name', 'string', 'Last Name', true );\n $this->add_column( 'status', 'string', 'Condition', true );\n }", "title": "" }, { "docid": "c22348139c60e8097a55b3a934aa7664", "score": "0.45328176", "text": "public static function log(...$args)\n {\n self::$debugMessages[] = self::getCopier()->copy($args);\n }", "title": "" }, { "docid": "4e88a85e96b9199fc63b8779795784d9", "score": "0.4532474", "text": "public function __construct()\n {\n if (7 == func_num_args()) {\n $this->customerIdentifier = func_get_arg(0);\n $this->accountIdentifier = func_get_arg(1);\n $this->label = func_get_arg(2);\n $this->ipAddress = func_get_arg(3);\n $this->creditCard = func_get_arg(4);\n $this->billingAddress = func_get_arg(5);\n $this->contactInformation = func_get_arg(6);\n }\n }", "title": "" }, { "docid": "7673552ae4f72958b81a21cf1638f7c7", "score": "0.45250222", "text": "public function run($args = [], ?ActionContext $context = null);", "title": "" }, { "docid": "3e8238bc818363da4da6bdbd8785f550", "score": "0.45224246", "text": "public function __construct(Campaign $campaign)\n {\n $this->campaign = $campaign;\n }", "title": "" }, { "docid": "20a1c8dddd128739d80bc5171a296898", "score": "0.45193416", "text": "public function run()\n {\n $campaign = new Campaign();\n $campaign->name = 'Semana do Destravar do Emagrecimento 28/09 a 01/10 L3';\n $campaign->start = '2020-09-28 00:00:00';\n $campaign->end = '2020-10-01 23:59:59';\n $campaign->start_monitoring = '2020-09-22 00:00:00';\n $campaign->stop_monitoring = '2020-10-08 23:59:59';\n $campaign->description = 'Campanha voltada para venda do Programa Acelerador de Emagrecimento - R$4.000,00';\n $campaign->save();\n unset($campaign);\n\n // $campaign = new Campaign();\n // $campaign->name = 'Semana da Riqueza Digital 28/09 a 01/10 L1';\n // $campaign->start = '2020-09-28 00:00:00';\n // $campaign->end = '2020-10-01 23:59:59';\n // $campaign->start_monitoring = '2020-09-22 00:00:00';\n // $campaign->stop_monitoring = '2020-10-08 23:59:59';\n // $campaign->description = 'Campanha voltada para captação de afiliado para o produto Desafio 14 dias - R$97,00';\n // $campaign->save();\n // unset($campaign);\n }", "title": "" }, { "docid": "6f50ef1ca160cab543705211d4ac917c", "score": "0.45111832", "text": "private function arguments( $args = array() ) {\n\t\t$this->class = isset( $args['class'] ) ? $args['class'] : '';\n\t\t$this->method = isset( $args['method'] ) ? $args['method'] : '';\n\t\t$this->mode = isset( $args['mode'] ) ? $args['mode'] : '';\n\t\t$this->options = isset( $args['options'] ) ? $args['options'] : array();\n\t\t$this->params = isset( $args['params'] ) ? $args['params'] : array();\n\t\t$this->expect = isset( $args['expect'] ) ? $args['expect'] : '';\n\t}", "title": "" }, { "docid": "b43e23303d4236a411b7939f9323f959", "score": "0.45045498", "text": "function triberr_setSourceID($args) {\n\t\t$this->escape($args); // passed $args reference\n\t\t\n\t\t$post_id = $args[0];\n\t\t$source_id = $args[1];\n\t\t\n\t\t// create a hook in case we need it\n\t\tdo_action('xmlrpc_call', 'Triberr.setSourceID');\n\n\t\t// this data does not require authentication\n\t\tadd_post_meta($post_id, '_triberr_id', $source_id, true) ;\n\t\t\n\t\tlogIO('O', \"Assigned Triber ID: $source_id to post $post_id\");\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "776bb52e42be7423946e3c77093e72c1", "score": "0.4500139", "text": "public function setActionArgs($args = array());", "title": "" }, { "docid": "5c7795df2f9eb3e57e0931e0b8af8e1f", "score": "0.44994804", "text": "public function __construct(array $args)\n {\n $this->setRegion(isset($args[\"region\"]) ? $args[\"region\"] : \"\");\n $this->setProjectId(isset($args[\"projectId\"]) ? $args[\"projectId\"] : \"\");\n $this->setBaseUrl(isset($args[\"baseUrl\"]) ? $args[\"baseUrl\"] : \"https://api.ucloud.cn\");\n $this->setUserAgent(isset($args[\"userAgent\"]) ? $args[\"userAgent\"] : \"\");\n $this->setTimeout(isset($args[\"timeout\"]) ? $args[\"timeout\"] : 30);\n $this->setMaxRetries(isset($args[\"maxRetries\"]) ? $args[\"maxRetries\"] : 0);\n $this->setLogger(isset($args[\"logger\"]) ? $args[\"logger\"] : new DefaultLogger());\n }", "title": "" }, { "docid": "8a4c134bdd13f778f28b70695248e197", "score": "0.44988123", "text": "public function __construct()\n {\n if (9 == func_num_args()) {\n $this->to = func_get_arg(0);\n $this->supportPhone = func_get_arg(1);\n $this->subject = func_get_arg(2);\n $this->firstName = func_get_arg(3);\n $this->brandColor = func_get_arg(4);\n $this->brandLogo = func_get_arg(5);\n $this->institutionName = func_get_arg(6);\n $this->institutionAddress = func_get_arg(7);\n $this->signature = func_get_arg(8);\n }\n }", "title": "" }, { "docid": "465e375ebcdea94a08eb428d6d41777a", "score": "0.44777912", "text": "public function run($args) {\r\n $this_month = $today = date(\"Y-m-d\", mktime(0, 0, 0, date(\"m\"), date(\"d\") - 1, date(\"Y\")));\r\n $unix_time = strtotime($this_month);\r\n $month = date('m', $unix_time);\r\n $year = date(\"Y\", $unix_time);\r\n //ambil member yang qualified\r\n $reward_member = $this->getMemberReward($month, $year);\r\n if (is_array($reward_member)) {\r\n foreach ($reward_member as $row) {\r\n //cek member aktif atau enggak\r\n $cek_is_suspended = dbHelper::getOne('member_is_suspended', 'mlm_member', 'member_network_id=' . $row['reward_log_network_id']);\r\n if ($cek_is_suspended === '0') {\r\n //masukan ke bonus log\r\n $reward_log_count = $row['reward_log_count'] + 1;\r\n //cek bonus log \r\n $cek = dbHelper::getOne('bonus_log_id', 'mlm_bonus_log', 'bonus_log_network_id = \\'' . $row['reward_log_network_id'] . '\\' AND bonus_log_date = \\'' . $today . '\\'');\r\n if (!$cek) {\r\n $data_insert = array('bonus_log_network_id' => $row['reward_log_network_id'],\r\n 'bonus_log_date' => $today,\r\n 'bonus_log_reward' => $row['reward_nominal']);\r\n Yii::app()->db->createCommand()->insert('mlm_bonus_log', $data_insert);\r\n } else {\r\n Yii::app()->db->createCommand('UPDATE mlm_bonus_log SET bonus_log_reward = bonus_log_reward + ' . $row['reward_nominal'] . ' WHERE bonus_log_id = \\'' . $cek . '\\'')->execute();\r\n }\r\n //masukkan ke mlm_bonus\r\n Yii::app()->db->createCommand('UPDATE mlm_bonus SET bonus_reward_acc = bonus_reward_acc + ' . $row['reward_nominal'] . ' WHERE \r\n bonus_network_id = \\'' . $row['reward_log_network_id'] . '\\'')->execute();\r\n //update kek mlm reward_log\r\n if ($reward_log_count >= 12) {\r\n //update juga reward_log_is_end\r\n $data_update_reward_log = array('reward_log_count' => $reward_log_count,\r\n 'reward_log_is_end' => '1');\r\n } else {\r\n $data_update_reward_log = array('reward_log_count' => $reward_log_count);\r\n }\r\n Yii::app()->db->createCommand()->update('mlm_reward_log', $data_update_reward_log, 'reward_log_id=:reward_log_id', array(':reward_log_id' => $row['reward_log_id']));\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "54da9b4ea28ed88675792ee576a8a538", "score": "0.44765455", "text": "public function post($args, $user_id = null) {}", "title": "" }, { "docid": "766409c49b76e9af9d9764ddcecee16f", "score": "0.44709176", "text": "public static function sendEmail($args) {\n\t\t\n\t\tif(self::$_configuration['method'] == 'soap') {\n\t\t\t$result = self::sendSOAP($args);\n\t\t} else if(self::$_configuration['method'] == 'smtp') {\n\t\t\t$result = self::sendSMTP($args);\n\t\t}\n\t\t\n\t\tself::_notify('Critsend::sendEmail', $args, $result);\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "46f027d2e9d4969bcf5930bcd3acc7a5", "score": "0.44701576", "text": "public function __construct( $args = array() ) {\n\t\t$this->_args = wp_parse_args( $args, array(\n\t\t\t'form_id' => false,\n\t\t\t'target_field_id' => false,\n\t\t\t'source_field_id' => false,\n\t\t\t'count' => 0,\n\t\t) );\n\n\t\t// do version check in the init to make sure if GF is going to be loaded, it is already loaded\n\t\tadd_action( 'init', array( $this, 'init' ) );\n\n\t}", "title": "" }, { "docid": "00569305f7c473ee7633c629b5aac304", "score": "0.44509566", "text": "public function run()\n {\n SenderGate::create(['name'=>'Aung Min ga lar']);\n SenderGate::create(['name'=>'Aung San']);\n SenderGate::create(['name'=>'Hlaing thar yar']);\n }", "title": "" }, { "docid": "98b08669aa08bd02272cab6b2647e323", "score": "0.44501585", "text": "public function startCollectingMail();", "title": "" }, { "docid": "f745643a39fc658e5e8b589ee1033ce4", "score": "0.4449876", "text": "public function options_saved_test_email( $args ) {\n if ( isset($_REQUEST['cs_test_recipient']) && $_REQUEST['cs_test_recipient'] ) {\n $args['cs_test_recipient'] = urlencode(stripslashes($_REQUEST['cs_test_recipient']));\n }\n\n return $args;\n }", "title": "" }, { "docid": "76b633519d3fda2e0605c09618a52145", "score": "0.44471505", "text": "function __construct($args){\n\t\t\techo \"I am a Constructor in Person class. \".$args;\n\t\t}", "title": "" }, { "docid": "0a6c2013f198ceef44c348bbdcdf5c15", "score": "0.44443303", "text": "public function single_view( $args = array() )\n\t{\n /** @var vca_asm_geography $vca_asm_geography */\n /** @var vca_asm_finances $vca_asm_finances */\n\t\tglobal $vca_asm_finances, $vca_asm_geography;\n\n\t\t$default_args = array(\n\t\t\t'city_id' => 0,\n\t\t\t'account_type' => 'donations',\n\t\t\t'type' => 'donation',\n\t\t\t'messages' => array(),\n\t\t\t'active_tab' => 'all',\n\t\t\t'page' => 'vca-asm-finances-accounts-donations'\n\t\t);\n\t\t$args = wp_parse_args( $args, $default_args );\n\t\textract( $args );\n\n\t\t$back = in_array( $this->cap_lvl, array( 'global', 'nation' ) ) ? true : false;\n\n\t\t$donation_tabs = array( 'all', 'donation', 'transfer' );\n\t\t$econ_tabs = array( 'all', 'revenue', 'expenditure', 'transfer' );\n\t\t$possible_tabs = 'donations' === $account_type ? $donation_tabs : $econ_tabs;\n\t\tif ( isset( $_GET['tab'] ) && in_array( $_GET['tab'], $possible_tabs ) ) {\n\t\t\t$active_tab = $_GET['tab'];\n\t\t} elseif ( ! in_array( $active_tab, $possible_tabs ) ) {\n\t\t\t$active_tab = 'all';\n\t\t}\n\n\t\t$output = '';\n\n\t\t$city_name = $vca_asm_geography->get_name( $city_id );\n\t\t$tabs = array(\n\t\t\tarray(\n\t\t\t\t'title' => _x( 'All entries', ' Admin Menu', 'vca-asm' ),\n\t\t\t\t'value' => 'all',\n\t\t\t\t'icon' => 'icon-summary'\n\t\t\t)\n\t\t);\n\t\tif ( 'donations' === $account_type ) {\n\t\t\t$title = sprintf( _x( 'Donation Account of %s', ' Admin Menu', 'vca-asm' ), $city_name );\n\t\t\t$tabs[] = array(\n\t\t\t\t'title' => _x( 'Donations', ' Admin Menu', 'vca-asm' ),\n\t\t\t\t'value' => 'donation',\n\t\t\t\t'icon' => 'icon-finances'\n\t\t\t);\n\t\t} else {\n\t\t\t$title = sprintf( _x( 'Economical Account of %s', ' Admin Menu', 'vca-asm' ), $city_name );\n\t\t\t$tabs[] = array(\n\t\t\t\t'title' => _x( 'Revenues', ' Admin Menu', 'vca-asm' ),\n\t\t\t\t'value' => 'revenue',\n\t\t\t\t'icon' => 'icon-revenue'\n\t\t\t);\n\t\t\t$tabs[] = array(\n\t\t\t\t'title' => _x( 'Expenditures', ' Admin Menu', 'vca-asm' ),\n\t\t\t\t'value' => 'expenditure',\n\t\t\t\t'icon' => 'icon-expenditure'\n\t\t\t);\n\t\t}\n\t\t$tabs[] = array(\n\t\t\t'title' => _x( 'Transfers', ' Admin Menu', 'vca-asm' ),\n\t\t\t'value' => 'transfer',\n\t\t\t'icon' => 'icon-transfer'\n\t\t);\n\t\t$button = '';\n\n\t\tif ( $this->has_cap ) {\n\t\t\tif ( $active_tab !== 'all' ) {\n\t\t\t\t$button .= '<form method=\"post\" action=\"admin.php?page=' . $page . '&todo=new&tab=' . $active_tab . '&type=' . $active_tab . '&acc_type=' . $account_type . '&cid=' . $city_id . '\">' .\n\t\t\t\t\t'<input type=\"submit\" class=\"button-secondary\" value=\"+ ' . sprintf( __( 'add %s', 'vca-asm' ), $vca_asm_finances->types_to_nicenames[$active_tab] ) . '\" />' .\n\t\t\t\t'</form>';\n\t\t\t} else {\n\t\t\t\t$button .= '<div>';\n\t\t\t\tforeach ( $possible_tabs as $tab ) {\n\t\t\t\t\tif ( 'all' !== $tab ) {\n\t\t\t\t\t\t$button .= '<form method=\"post\" style=\"display:inline\" action=\"admin.php?page=' . $page . '&todo=new&tab=' . $active_tab . '&type=' . $tab . '&acc_type=' . $account_type . '&cid=' . $city_id . '\">' .\n\t\t\t\t\t\t\t'<input type=\"submit\" class=\"button-secondary margin\" value=\"+ ' . sprintf( __( 'add %s', 'vca-asm' ), $vca_asm_finances->types_to_nicenames[$tab] ) . '\" />' .\n\t\t\t\t\t\t'</form>';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$button .= '</div>';\n\t\t\t}\n\t\t}\n\n\t\t$list_args = array(\n\t\t\t'city_id' => $city_id,\n\t\t\t'account_type' => $account_type,\n\t\t\t'transaction_type' => $active_tab,\n\t\t\t'page' => $page,\n\t\t\t'active_tab' => $active_tab\n\t\t);\n\n\t\t$back_url = '?page=' . $page;\n\t\tif ( isset( $_GET['referrer'] ) ) {\n\t\t\tswitch ( $_GET['referrer'] ) {\n\t\t\t\tcase 'overview-summary':\n\t\t\t\t\t$back_url = '?page=vca-asm-finances&tab=summary';\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'overview-tabular':\n\t\t\t\t\t$back_url = '?page=vca-asm-finances&tab=tabular';\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'overview-city':\n\t\t\t\t\t$back_url = '?page=vca-asm-finances';\n\t\t\t\t\tif ( ! empty( $_GET['cid'] ) ) {\n\t\t\t\t\t\t$back_url .= '&cid=' . $_GET['cid'];\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'overview-cities': // deprecated\n\t\t\t\t\t$back_url = '?page=vca-asm-finances&tab=cities';\n\t\t\t\tbreak;\n\n\t\t\t\tcase 'tasks':\n\t\t\t\t\t$back_url = '?page=vca-asm-home&tab=tasks';\n\t\t\t\tbreak;\n\n\t\t\t\tdefault:\n\t\t\t\t\t$back_url = '?page=' . $page;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t$adminpage = new VCA_ASM_Admin_Page( array(\n\t\t\t'icon' => 'icon-finances',\n\t\t\t'title' => $title,\n\t\t\t'messages' => $messages,\n\t\t\t'url' => '?page=' . $page . '&cid=' . $city_id,\n\t\t\t'back' => $back,\n\t\t\t'back_url' => $back_url,\n\t\t\t'tabs' => $tabs,\n\t\t\t'active_tab' => $active_tab\n\t\t));\n\n\t\t$output .= $adminpage->top();\n\n\t\t$output .= '<br />' . $button . '<br />';\n\n\t\t$output .= $this->list_entries( $list_args );\n\n\t\t$output .= '<br />' . $button;\n\n\t\t$output .= $adminpage->bottom();\n\n\t\techo $output;\n\t}", "title": "" }, { "docid": "02a141d56586869b5a3f52a75a11d177", "score": "0.44406828", "text": "public function __construct($args = [])\n {\n $this->base_uri = $args['base_uri'] ?? 'http://84.211.194.175/';\n $client_id = $args['client_id'] ?? '1_1pfu7sn7doqscw4kksow8sgco8ko0kk00cks8w4wkccko8ggg4';\n $secret = $args['secret'] ?? '299q4wk2zxxcs4cg40wg0o4ocs4044s4ows4w40008kck88g0o';\n $user = $args['user'] ?? 'kimbm';\n $password = $args['password'] ?? 'ikkeSikker123';\n\n $clientbuilder = new \\Akeneo\\Pim\\ApiClient\\AkeneoPimClientBuilder($this->base_uri);\n $this->client = $clientbuilder->buildAuthenticatedByPassword($client_id, $secret, $user, $password);\n\n }", "title": "" }, { "docid": "eab270154621aed715eee846bc7cd3c5", "score": "0.4426163", "text": "public static function main()\n {\n // into the constants above.\n $options = (new ArgumentParser())->parseCommandArguments([\n ArgumentNames::CUSTOMER_ID => GetOpt::REQUIRED_ARGUMENT,\n ArgumentNames::CAMPAIGN_IDS => GetOpt::MULTIPLE_ARGUMENT,\n ArgumentNames::LABEL_ID => GetOpt::REQUIRED_ARGUMENT\n ]);\n\n // Generate a refreshable OAuth2 credential for authentication.\n $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();\n\n // Construct a Google Ads client configured from a properties file and the\n // OAuth2 credentials above.\n $googleAdsClient = (new GoogleAdsClientBuilder())\n ->fromFile()\n ->withOAuth2Credential($oAuth2Credential)\n // We set this value to true to show how to use GAPIC v2 source code. You can remove the\n // below line if you wish to use the old-style source code. Note that in that case, you\n // probably need to modify some parts of the code below to make it work.\n // For more information, see\n // https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.\n ->usingGapicV2Source(true)\n ->build();\n\n try {\n self::runExample(\n $googleAdsClient,\n $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID,\n $options[ArgumentNames::CAMPAIGN_IDS] ?:\n [self::CAMPAIGN_ID_1, self::CAMPAIGN_ID_2],\n $options[ArgumentNames::LABEL_ID] ?: self::LABEL_ID\n );\n } catch (GoogleAdsException $googleAdsException) {\n printf(\n \"Request with ID '%s' has failed.%sGoogle Ads failure details:%s\",\n $googleAdsException->getRequestId(),\n PHP_EOL,\n PHP_EOL\n );\n foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) {\n /** @var GoogleAdsError $error */\n printf(\n \"\\t%s: %s%s\",\n $error->getErrorCode()->getErrorCode(),\n $error->getMessage(),\n PHP_EOL\n );\n }\n exit(1);\n } catch (ApiException $apiException) {\n printf(\n \"ApiException was thrown with message '%s'.%s\",\n $apiException->getMessage(),\n PHP_EOL\n );\n exit(1);\n }\n }", "title": "" }, { "docid": "3b195310c0e682bf22cef973f326ab94", "score": "0.44227737", "text": "function setArgs($args) { $this->args = $args; }", "title": "" }, { "docid": "1a5c082a4d8b167b1e3dae6acc7cb065", "score": "0.44194427", "text": "public function thing(array $args, array $options) : void {\n WP_CLI::success(sprintf('You passed: %s', $args[0]));\n }", "title": "" }, { "docid": "1b3e94fb09dd9ae02d771db748d23f99", "score": "0.44158414", "text": "function prepare($args)\n {\n if (! parent::prepare($args)) {return false;}\n\n $this->user = $this->auth_user;\n\n if (empty($this->user)) {\n $this->clientError('无此用户!', 404, $this->format);\n return false;\n }\n\n $this->status = $this->trimmed('status');\n\n if (empty($this->status)) {\n $this->clientError(\n '客户端应当提供 参数\\'status\\'的值.',\n 400,\n $this->format\n );\n return false;\n }\n\n $this->source = $this->trimmed('source', 'api');\n\n $this->in_reply_to_status_id = intval($this->trimmed('in_reply_to_status_id')); \n\t\t\n return true;\n }", "title": "" }, { "docid": "839f52b945fc3608dc5a01057f7aff94", "score": "0.44123518", "text": "public function request(array $data)\n {\n if(! is_array($data))\n return;\n $this->from = $data['email'];\n $this->view = 'emails.appointment-request';\n $this->data = [ 'body' => $data['body'], 'name' => $data['name'] ];\n $this->subject = '[Client Query][IP:' . $data['ip'] . '][' . $data['subject'] . ']';\n $this->name = $data['name'];\n $this->to = config('mail.admin.address');\n $this->deliver();\n Log::info('[PortfolioMaker][ip:' . $data['ip'] . '][Email sent for appointment]');\n }", "title": "" }, { "docid": "cb02ceb50fa9a9b313bfed4e32371251", "score": "0.44105458", "text": "public function __construct()\n {\n if (5 == func_num_args()) {\n $this->address = func_get_arg(0);\n $this->shippingMethodCode = func_get_arg(1);\n $this->shippingCarrierCode = func_get_arg(2);\n $this->extensionAttributes = func_get_arg(3);\n $this->customAttributes = func_get_arg(4);\n }\n }", "title": "" }, { "docid": "88268638f3d26da6140d6afb0809389d", "score": "0.43955868", "text": "public function __construct(Sender $sender) {\n $this->readUrls();\n $this->sender = $sender;\n foreach ($this->url_list as $url) {\n if($url == '') continue;\n print \"$url enqueued\\n\";\n $curlo = $this->sender->addRecipient($url, $this);\n //print_r($curlo);\n // set parameters option for $curlo ... but even not\n //unset($curlo);\n }\n }", "title": "" }, { "docid": "4c1a86afd30153f1091e11738c8f447e", "score": "0.4394383", "text": "function prepare($args)\n {\n parent::prepare($args);\n\t\t\n\t\t$this->nickname = Nickname::normalize($this->arg('nickname'));\n $this->email = $this->arg('email');\n $this->fullname = $this->arg('fullname');\n $this->homepage = $this->arg('homepage');\n $this->bio = $this->arg('bio');\n $this->location = $this->arg('location');\n\t\t// We don't trim these... whitespace is OK in a password!\n $this->password = $this->arg('password');\n $this->confirm = $this->arg('confirm');\n\n return true;\n }", "title": "" }, { "docid": "8985020125cb1775ca43f5450f0ac7ae", "score": "0.43879372", "text": "function startup($args)\n {\n if (empty($args['action']) && empty($_SESSION['user_id']) &&\n !empty($_SERVER['REMOTE_USER']) &&\n !empty($_SERVER['AUTH_TYPE'])) {\n $args['action'] = 'login';\n }\n\n return $args;\n }", "title": "" }, { "docid": "18b08b5f66986422908ea103feefedb3", "score": "0.43834394", "text": "private function sanatizeParams($args){\n\t\t$requiredKeys = ['patient_id_notes', 'service_id_notes', 'insurance_claim_id_notes', 'invoice_id_notes', 'other_payments_id_notes', 'associated_date', 'type', 'note'];\n\n\n\t\t//deal with the special case of patient_id\n\t\tif( !array_key_exists('patient_id_notes', $args) ){\n\n\t\t\t$this->setFlash( array(\"Error\", \"Failed in notes.php::create - No patient ID given\"));\n\t\t\treturn false;\n\n\t\t}elseif( !array_key_exists('note', $args ) ){\n\n\t\t\t$this->setFlash( array(\"error\", \"Failed in notes.php::create - No note given\"));\n\t\t\treturn false;\n\n\t\t}\n\t\t\n\t\t$args['completed'] = 1;\n\n\t\tforeach( $requiredKeys as $value){\n\t\t\t\n\t\t\tif( !array_key_exists($value, $args) ){\n\n\t\t\t\t$args[$value] = null;\n\n\t\t\t}\n\n\t\t}\n\n\t\treturn $args;\n\n\n\t}", "title": "" }, { "docid": "447ccaa5ca2120f5ec85a7bae18d7897", "score": "0.43799606", "text": "function __construct($args, iEstatedClient $client = null){\n\n if (is_null($client)) {\n $this->client = new EstatedClient();\n } else {\n $this->client = $client;\n }\n\n foreach ($args as $key => $value) {\n $this->$key = $value;\n }\n\n $this->validate();\n }", "title": "" }, { "docid": "fb08f2334c05c71449ed9a914ebf623f", "score": "0.43791485", "text": "public function main(array $args /*, \\DirectMailTeam\\DirectMail\\Dmailer $parent */)\n {\n $markerArray = &$args['markers'];\n $subscriber = \\DMK\\Mkpostman\\Factory::getSubscriberRepository()->createNewModel($args['row']);\n $doubleOptInUtil = $this->getDoubleOptInUtility($subscriber);\n $unsubscribeKey = $doubleOptInUtil->buildUnsubscribeKey(true);\n $markerArray['###MKPOSTMAN_UNSUBSCRIBE_PARAMS###'] = '&mkpostman[unsubscribe]='.$unsubscribeKey;\n }", "title": "" }, { "docid": "df0a84966c1bb2b0eca85c5183fbc894", "score": "0.43744844", "text": "public function __construct()\n {\n if (10 == func_num_args()) {\n $this->id = func_get_arg(0);\n $this->requestedAmount = func_get_arg(1);\n $this->approvedAmount = func_get_arg(2);\n $this->recipient = func_get_arg(3);\n $this->pgid = func_get_arg(4);\n $this->createdAt = func_get_arg(5);\n $this->updatedAt = func_get_arg(6);\n $this->paymentDate = func_get_arg(7);\n $this->status = func_get_arg(8);\n $this->timeframe = func_get_arg(9);\n }\n }", "title": "" }, { "docid": "8b5a06ad3a448a25cae2b55409ffaf6b", "score": "0.43737152", "text": "function va_appthemes_send_email( $id, $args = array() ) {\r\n\t$defaults = array(\r\n\t\t'to' => '',\r\n\t\t'subject' => '',\r\n\t\t'message' => '',\r\n\t\t'attachments' => array(),\r\n\t\t'headers' => array(\r\n\t\t\t'type' => 'Content-Type: text/html; charset=\"' . get_bloginfo( 'charset' ) . '\"',\r\n\t\t),\r\n\t);\r\n\r\n\t$args = wp_parse_args( apply_filters( $id, $args ), $defaults );\r\n\r\n\tappthemes_send_email( $args['to'], $args['subject'], $args['message'] );\r\n}", "title": "" }, { "docid": "c8a158dcdb0de78fe9a23f71f5f43834", "score": "0.43586832", "text": "function prepare_args($args)\n {\n }", "title": "" }, { "docid": "866f8942816fe198c2a053177d773852", "score": "0.43582824", "text": "public function inscription($args) {\r\n\t\t$services=JurisdictionModel::getAllServices();\r\n\t\t$countries=JurisdictionModel::getAllCountries();\r\n\r\n\r\n\t\t$login = $args->read('inscLogin');\r\n\t\t$password = $args->read('inscPassword');\r\n\t\t$surname = $args->read('inscSurname');\r\n\t\t$name = $args->read('inscName');\r\n\t\t$email = $args->read('inscEmail');\r\n\t\t$service = $args->read('inscService');\r\n\t\tif($service == ''){\r\n\t\t\t$service='#serv';\r\n\t\t}\r\n\t\t$country = $args->read('inscCountry');\r\n\t\tif($country == ''){\r\n\t\t\t$country='#count';\r\n\t\t}\r\n\r\n\t\tif(isset($services) && isset($countries)){\r\n\t\t//Language management\r\n\t\t\t\t\tif (isset($_GET['lang']) && $_GET['lang']!= '#' ) {\r\n\t\t\t\t\t\t$this->language = $_GET['lang'];\r\n\t\t\t\t\t\t// register the session and set the cookie\r\n\t\t\t\t\t\t$_SESSION['lang'] = $this->language;\r\n\t\t\t\t\t\tsetcookie('lang', $this->language, time() + (3600 * 24 * 30));\r\n\r\n\t\t\t\t\t}else if(isSet($_SESSION['lang']) && $_SESSION['lang']!= '#'){\r\n\t\t\t\t\t\t$this->language = $_SESSION['lang'];\r\n\t\t\t\t\t}else if(isSet($_COOKIE['lang']) && $_COOKIE['lang']!= '#'){\r\n\t\t\t\t\t\t$this->language = $_COOKIE['lang'];\r\n\t\t\t\t\t}else{\r\n\t\t\t\t\t\t$tab_lang = explode(“_”, $_SERVER[‘HTTP_ACCEPT_LANGUAGE’]);\r\n\t\t\t\t\t\tif($tab_lang[0] == en || $tab_lang[0] == fr || $tab_lang[0] == es){\r\n\t\t\t\t\t\t\t$this->language = $tab_lang[0];\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t$this->language = 'en';\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t$view = new AnonymousView($this, 'inscription');\r\n\t\t\t$view->setArg('login',$login);\r\n\t\t\t$view->setArg('password',$password);\r\n\t\t\t$view->setArg('surname',$surname);\r\n\t\t\t$view->setArg('name',$name);\r\n\t\t\t$view->setArg('email',$email);\r\n\t\t\t$view->setArg('service',$service);\r\n\t\t\t$view->setArg('country',$country);\r\n\r\n\t\t\t$view->setArg('services',$services);\r\n\t\t\t$view->setArg('countries',$countries);\r\n\r\n\t\t\t$view->setArg('language',$this->language);\r\n\r\n\t\t\t$view->render();\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "74b9358eee3f8e7937d45797cf8a43de", "score": "0.4358034", "text": "public function run( $args = null, $assoc_args = null ){\n\t\t\t#print_r($assoc_args);\n\t\t\t\n\t\t\t$switches = '';\n\t\t\tif ( isset( $assoc_args['exclude'] ) ){\n\t\t\t\t$excludes = explode( ',', $assoc_args['exclude'] );\n\t\t\t\tforeach ( $excludes as $avoid ):\n\t\t\t\t\t$switches .= '--exclude ' . $avoid . ' ';\n\t\t\t\tendforeach;\n\t\t\t}\n\t\t\t$switches .= '--progress ';\n\t\t\t\n\t\t\tif ( null === $args[0] ):\n\t\t\t\tWP_CLI::error( 'Usage: wp phpdcd run [switches] <folder>' );\n\t\t\telse:\n\t\t\t\t# WP_CLI::launch( 'phpcs -i' );\n\t\t\t\t$cmd = 'phpcpd ' . $switches . $args[0];\n\t\t\t\tWP_CLI::launch( $cmd );\n\t\t\tendif;\n\t\t}", "title": "" }, { "docid": "65869225c513a062724b2f952b0fcc41", "score": "0.43479922", "text": "public function call(array $args = null);", "title": "" }, { "docid": "da7106f7c2760dfc3857ba4f8dbf442e", "score": "0.43418902", "text": "public static function main()\n {\n // into the constants above.\n $options = (new ArgumentParser())->parseCommandArguments([\n ArgumentNames::CUSTOMER_ID => GetOpt::REQUIRED_ARGUMENT,\n ArgumentNames::CHAIN_ID => GetOpt::REQUIRED_ARGUMENT,\n ArgumentNames::CAMPAIGN_ID => GetOpt::REQUIRED_ARGUMENT,\n ArgumentNames::DELETE_EXISTING_FEEDS => GetOpt::OPTIONAL_ARGUMENT\n ]);\n\n // Generate a refreshable OAuth2 credential for authentication.\n $oAuth2Credential = (new OAuth2TokenBuilder())->fromFile()->build();\n\n // Construct a Google Ads client configured from a properties file and the\n // OAuth2 credentials above.\n $googleAdsClient = (new GoogleAdsClientBuilder())\n ->fromFile()\n ->withOAuth2Credential($oAuth2Credential)\n // We set this value to true to show how to use GAPIC v2 source code. You can remove the\n // below line if you wish to use the old-style source code. Note that in that case, you\n // probably need to modify some parts of the code below to make it work.\n // For more information, see\n // https://developers.devsite.corp.google.com/google-ads/api/docs/client-libs/php/gapic.\n ->usingGapicV2Source(true)\n ->build();\n\n try {\n self::runExample(\n $googleAdsClient,\n $options[ArgumentNames::CUSTOMER_ID] ?: self::CUSTOMER_ID,\n $options[ArgumentNames::CHAIN_ID] ?: self::CHAIN_ID,\n $options[ArgumentNames::CAMPAIGN_ID] ?: self::CAMPAIGN_ID,\n filter_var(\n $options[ArgumentNames::DELETE_EXISTING_FEEDS]\n ?: self::DELETE_EXISTING_FEEDS,\n FILTER_VALIDATE_BOOLEAN\n )\n );\n } catch (GoogleAdsException $googleAdsException) {\n printf(\n \"Request with ID '%s' has failed.%sGoogle Ads failure details:%s\",\n $googleAdsException->getRequestId(),\n PHP_EOL,\n PHP_EOL\n );\n foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) {\n /** @var GoogleAdsError $error */\n printf(\n \"\\t%s: %s%s\",\n $error->getErrorCode()->getErrorCode(),\n $error->getMessage(),\n PHP_EOL\n );\n }\n exit(1);\n } catch (ApiException $apiException) {\n printf(\n \"ApiException was thrown with message '%s'.%s\",\n $apiException->getMessage(),\n PHP_EOL\n );\n exit(1);\n }\n }", "title": "" }, { "docid": "7c5adca4a8271977ae72944b6e5f10c0", "score": "0.4338836", "text": "public function kingdom_execute($command, CommandSender $sender, $args) {\n\t\tunset($args[0]);\n\t\t$args = implode(\" \", $args);\n\t\t$args = explode(\" \", $args);\n\t\t$this->kingdomCommands[$command]->execute($sender, $args);\n\t}", "title": "" }, { "docid": "d4f42ab540de4df4d959b78f88208a0f", "score": "0.4335287", "text": "function prepare($args)\n {\n parent::prepare($args);\n\n $this->nickname = common_canonical_nickname($this->trimmed('nickname'));\n\n $this->fullname = $this->trimmed('fullname');\n $this->homepage = $this->trimmed('homepage');\n $this->description = $this->trimmed('description');\n $this->location = $this->trimmed('location');\n $this->aliasstring = $this->trimmed('aliases');\n\n $this->user = $this->auth_user;\n $this->group = $this->getTargetGroup($this->arg('id'));\n\n return true;\n }", "title": "" }, { "docid": "c4157de1d9eef1d253e432a846f75585", "score": "0.432769", "text": "private function __construct($args) {\r\n $this->configure($args);\r\n }", "title": "" }, { "docid": "e2678e548ccf20a8fd52eb23b4abe7da", "score": "0.43266848", "text": "public function initialize(...$args)\n {\n \n }", "title": "" }, { "docid": "cbfdb73e6f691698b05bd0a55cf294ba", "score": "0.43248862", "text": "public function create($args);", "title": "" }, { "docid": "e6eaf4dd05937c48b43fa2624d0c7ddc", "score": "0.4323288", "text": "public function __construct()\n {\n if (1 == func_num_args()) {\n $this->requestId = func_get_arg(0);\n }\n }", "title": "" }, { "docid": "5215a920c039e6fc374c66c2c13b48a4", "score": "0.43154845", "text": "public function worker($args)\n {\n #Step 1. Create an API client with headers\n $rooms_api = $this->clientService->getRoomsApi();\n\n # Step 2. Get Default Admin role id\n $roles_api = $this->clientService->getRolesApi();\n\n try{\n $roles = $roles_api->getRoles($args[\"account_id\"]);\n } catch (ApiException $e) {\n error_log($e);\n $this->clientService->showErrorTemplate($e);\n exit;\n }\n $role_id = $roles['roles'][0]['role_id'];\n\n # Step 3. Create RoomForCreate object\n $room = new RoomForCreate(\n [\n 'name' => $args[\"room_name\"],\n 'role_id' => $role_id,\n 'template_id' => $args[\"template_id\"],\n 'field_data' => new FieldDataForCreate(\n ['data' =>\n [\n 'address1' => '111',\n 'city' => 'Galaxian',\n 'state' => 'US-HI',\n 'postalCode' => '88888',\n ]\n ]\n )\n ]\n );\n\n # Step 4. Post the room using SDK\n try {\n $response = $rooms_api->createRoom($args['account_id'], $room);\n } catch (ApiException $e) {\n $this->clientService->showErrorTemplate($e);\n exit;\n }\n return $response;\n }", "title": "" }, { "docid": "7e1c166ca97c391e0e11eaaec68ddb1b", "score": "0.4313476", "text": "public function debug($message, $args=array());", "title": "" }, { "docid": "0e710e526e89748917ef43fbcc85b719", "score": "0.43092296", "text": "public function run()\n {\n $accountIds = Account::pluck('id');\n $campaigns = [];\n $campaignDetails = [\n 1 => ['Outbound', 'This campaign is for leads that were researched internally.' ],\n 2 => ['Inbound', 'This campaign is for leads that came from client\\'s marketing efforts.'],\n 3 => ['Event X', 'This campaign is for leads obtained from X event.']\n ];\n\n foreach ($accountIds as $key => $value) {\n for ($i=1; $i <= mt_rand(2, 3); $i++) {\n $campaigns[] = [\n 'name' => $campaignDetails[$i][0],\n 'description' => $campaignDetails[$i][1],\n 'account_id' => $value\n ];\n };\n }\n\n Campaign::insert($campaigns);\n $campaignIds = Campaign::pluck('id');\n $campaignSchedules = [];\n foreach ($campaignIds as $key => $value) {\n for ($i=1; $i <= 4; $i++) {\n $campaignSchedules[] = [\n 'campaign_id' => $value,\n 'schedule_id' => $i\n ];\n }\n }\n\n CampaignSchedule::insert($campaignSchedules);\n }", "title": "" }, { "docid": "32547a46c1309cb9a1bdc13dd519dbc4", "score": "0.43083918", "text": "public function __construct(array $args = [])\n {\n if (empty($args['environment'])) {\n $args['environment'] = 'staging';\n }\n $this->checkCredentials($args);\n $this->args = $args;\n $this->urlRegistry = new UrlRegistry($args['environment']);\n $this->httpClient = http_client();\n $this->manifest = new Manifest();\n $this->token = data_get($args, 'credentials.token', null);\n }", "title": "" }, { "docid": "135d26bb3cc5ce8a85e8113b4dac176c", "score": "0.43013108", "text": "public function __invoke( $args = null, $assoc_args = null ){\n\t\t\tif (\n\t\t\t\tisset( $assoc_args['flags'] ) ||\n\t\t\t\tisset( $assoc_args[$args[0]]['flags'] )\n\t\t\t\t):\n\t\t\t\t$custom = isset( $assoc_args[$args[0]]['flags'] ) ? $assoc_args[$args[0]]['flags'] : $assoc_args['flags'];\t\t\t\t\n\t\t\t\t$default_flags = $custom . ' ';\n\t\t\telse :\n\t\t\t\t$default_flags = '--progress ';\n\t\t\tendif;\n\t\t\tif ( null !== $args[0] ):\n\t\t\t\tself::_run_phpcpd( $args[0], $default_flags );\n\t\t\telse :\n\t\t\t\tWP_CLI::error( 'Missing plugin/theme slug.' );\n\t\t\tendif;\n\t\t}", "title": "" }, { "docid": "98cc042af23c5a5d500c08e08ea5d0a5", "score": "0.42995006", "text": "public static function wcap_capture_email_from_forms( $args ) {\n\t\t\t// First, we read the option.\n\t\t\t$capture_email_forms = get_option( 'ac_capture_email_from_forms' );\n\t\t\t// This condition added to avoid the notice displyed while Check box is unchecked.\n\t\t\tif ( isset( $capture_email_forms ) && '' === $capture_email_forms ) {\n\t\t\t\t$capture_email_forms = 'off';\n\t\t\t}\n\t\t\t// Next, we update the name attribute to access this element's ID in the context of the display options array.\n\t\t\t// We also access the show_header element of the options collection in the call to the checked() helper function.\n\t\t\tprintf(\n\t\t\t\t'<input type=\"checkbox\" id=\"ac_capture_email_from_forms\" name=\"ac_capture_email_from_forms\" value=\"on\"\n ' . checked( 'on', $capture_email_forms, false ) . ' />'\n\t\t\t);\n\t\t\t// Here, we'll take the first argument of the array and add it to a label next to the checkbox.\n\t\t\techo '<label for=\"ac_capture_email_from_forms\"> ', esc_attr( $args[0] ), '</label>';\n\t\t}", "title": "" }, { "docid": "4c56f73004b4d93b23558c6dfeda2e79", "score": "0.42941877", "text": "public function beforeCheckout(\\Enlight_Event_EventArgs $args)\n {\n /** @var \\Enlight_Controller_Action $controller */\n $controller = $args->get('subject');\n $request = $controller->Request();\n\n if ($request->getActionName() != 'finish') {\n return;\n }\n\n if (!$this->checkoutAllowed()) {\n $controller->forward('confirm');\n }\n }", "title": "" }, { "docid": "af9530be0b6dc6f04f3a099d38e35a3d", "score": "0.42925254", "text": "public function requestToBecomeMember(){\n\n\t\t$reply_email = '[email protected]';\n\n\t\t$viewDataController = new ViewDataController();\n\t\t$data = $viewDataController->buildData();\n\n\t\t$email_arr = array();\n\n\t\t$params = array();\n\t\tfor ($i=0; $i <2 ; $i++) { \n\n\t\t\tif ($i ==0) {\n\t\t\t\t$email_arr = array('email' => '[email protected]', \n\t\t\t\t\t 'name' => 'Sina Shayesteh',\n\t\t\t\t\t 'type' =>'to');\n\t\t\t}else{\n\t\t\t\t$email_arr = array('email' => '[email protected]', \n\t\t\t\t\t 'name' => 'College Services',\n\t\t\t\t\t 'type' =>'to');\n\t\t\t}\n\t\t\tif (isset($data['school_name']) && !empty($data['school_name'])) {\n\t\t\t\t$params['COLLNAME'] = $data['school_name'];\n\t\t\t\t$user_table = Session::get('user_table');\n\t\t\t\t$params['ADMNPHONE'] = $user_table['phone'];\n\t\t\t}else{\n\t\t\t\t$params['COLLNAME'] = $data['agency_collection']->name;\n\t\t\t\t$params['ADMNPHONE'] = $data['agency_collection']->phone;\n\t\t\t}\n\t\t\t\n\t\t\t$params['ADMNNAME'] = $data['fname']. ' '.$data['lname'];\n\t\t\t$params['ADMNEMAIL'] = $data['email'];\n\n\t\t\t\n\t\t\t$this->template_name = 'paid_member_request_to_sales';\n\t\t\t$this->sendMandrillEmail('paid_member_request_to_sales',$email_arr, $params, $reply_email);\n\t\t}\n\n\t}", "title": "" }, { "docid": "41870b5a14924b5186943e14fad25bc7", "score": "0.42842108", "text": "public function requestCampaign($id, $leads, $tokens = array(), $args = array(), $returnRaw = false)\n {\n $args['id'] = $id;\n\n $args['input'] = array('leads' => array_map(function ($id) {\n return array('id' => $id);\n }, (array) $leads));\n\n if (!empty($tokens)) {\n $args['input']['tokens'] = $tokens;\n }\n\n return $this->getResult('requestCampaign', $args, false, $returnRaw);\n }", "title": "" } ]
4c00e1105936933d77c33cc2779e5d36
Tests rounding a price with an unknown currency. ::covers round.
[ { "docid": "109b00f1b521aae1ef12ed986e575d5d", "score": "0.7391384", "text": "public function testUnknownCurrency() {\n $this->expectException(\\InvalidArgumentException::class);\n $this->rounder->round(new Price('10', 'EUR'));\n }", "title": "" } ]
[ { "docid": "2d4236a88c3222b6ec92660d41ed0189", "score": "0.74100417", "text": "public function testValid() {\n $rounded_price = $this->rounder->round(new Price('3.3698', 'USD'));\n $this->assertEquals('3.37', $rounded_price->getNumber());\n $this->assertEquals('USD', $rounded_price->getCurrencyCode());\n }", "title": "" }, { "docid": "34cb488779487baaf5b77bb2c47e6f05", "score": "0.72191244", "text": "public function testDiscountRoundingError()\n {\n // the displayed unit price not to match the charged price at\n // large quantities.\n Product::add_extension(ProductTest_FractionalDiscountExtension::class);\n DataObject::flush_and_destroy_cache();\n $tshirt = Product::get()->byID($this->tshirt->ID);\n Config::modify()->set(Order::class, 'rounding_precision', 2);\n $this->assertEquals(24.99, $tshirt->sellingPrice());\n Config::modify()->set(Order::class, 'rounding_precision', 3);\n $this->assertEquals(24.985, $tshirt->sellingPrice());\n Product::remove_extension('ProductTest_FractionalDiscountExtension');\n }", "title": "" }, { "docid": "79996a7206584835fea41991d79f2238", "score": "0.6702865", "text": "function money__round_test() {\n \n $values = array(\n array('input' => '1520.1423', 'output' => 1520.14), // Round down 4 to 2 decimal places\n array('input' => '100.123', 'output' => 100.12), // Round down 3 to 2 decimal places\n array('input' => '10', 'output' => 10.00), // Round out to 2 digits \n array('input' => '100,000.999', 'output' => 100001.00), // Round up 3 to 2 decimlal places.\n array('input' => '1,000.1451', 'output' => 1000.15), // Round up 4 to 2 decimal places.\n );\n \n foreach ($values as $value) {\n $this->assert_equal($value['output'], money::round($value['input']));\n }\n }", "title": "" }, { "docid": "01898c35a0ac111a66dab4bee02f1866", "score": "0.6278623", "text": "public function roundPrice($price)\n {\n $priceRounded = Mage::app()->getStore()->roundPrice($price);\n return $priceRounded;\n }", "title": "" }, { "docid": "d15c165fd55ef35d8ae73fe339b07a9b", "score": "0.6230268", "text": "protected function _convertPriceToBaseCurrency($price, $round = true)\n {\n try {\n $baseCurrency = $this->getBaseCurrency()->getCode();\n $currentCurrency = $this->getCurrentCurrency()->getCode();\n\n $rates = $this->_getCurrencyRates($baseCurrency);\n $price = $price / $rates[$currentCurrency];\n\n if ($round) {\n return $this->getStore()->roundPrice($price);\n }\n\n return $price;\n } catch (Innobyte_EmagMarketplace_Exception $e) {\n throw new Innobyte_EmagMarketplace_Exception('Invalid currency settings. Please check you currency rates.');\n }\n }", "title": "" }, { "docid": "3c7ecc5c4bf10477b30f227752d6d777", "score": "0.60995317", "text": "function ps_round($value, $precision = 0)\n{\n static $method = null;\n\n if ($method == null) $method = PS_PRICE_ROUND_MODE;\n\n if ($method == 0) return ceilf($value, $precision);\n elseif ($method == 1) return floorf($value, $precision);\n return round($value, $precision);\n}", "title": "" }, { "docid": "e33262188ddd0190be5f284683243075", "score": "0.6084892", "text": "public function testPriceConversion()\n {\n // so test a number of automatic conversions, based on\n // assumptions of what is supplied.\n\n // Integer.\n $this->assertSame(123, Item::convertPriceInteger(123));\n $this->assertSame(123, Item::convertPriceInteger('123', 'EUR'));\n\n // Float.\n $this->assertSame(12300, Item::convertPriceInteger(123.0, 'EUR'));\n $this->assertSame(12300, Item::convertPriceInteger('123.0', 'EUR'));\n\n // Other currencies: 0, 2 and 3 decimal digits.\n $this->assertSame(123, Item::convertPriceInteger('123.0', 'JPY'));\n $this->assertSame(12300, Item::convertPriceInteger('123.0', 'EUR'));\n $this->assertSame(123000, Item::convertPriceInteger('123.0', 'IQD'));\n\n // Money.\n $this->assertSame(123, Item::convertPriceInteger(Money::EUR(123)));\n $this->assertSame(12345, Item::convertPriceInteger('123.45', new Currency('EUR')));\n }", "title": "" }, { "docid": "7b15621d1952c71e36900a217025f558", "score": "0.59542036", "text": "public function isRoundedPrice() {\n return Mage::getStoreConfig('pricemotion_options/default/rounded_prices');\n }", "title": "" }, { "docid": "99bbbbc0f825d9779b269869d2f8b2e7", "score": "0.5942372", "text": "function mo_ps_round($val)\n{\n static $ps_price_round_mode;\n if (empty($ps_price_round_mode)) {\n $ps_price_round_mode = Db::getInstance()->getValue('SELECT value\n\t\t\tFROM `' . _DB_PREFIX_ . 'configuration`\n\t\t\tWHERE name = \"PS_PRICE_ROUND_MODE\"');\n }\n\n switch ($ps_price_round_mode) {\n case 0:\n return ceil($val * 100) / 100;\n case 1:\n return floor($val * 100) / 100;\n default:\n return round($val, 2);\n }\n}", "title": "" }, { "docid": "b4dcb25d041ae1cb59420f4969c95707", "score": "0.5871372", "text": "public function testRoundingUpToTwoCharacters(){\n\t\tverify((string)round(22.33315,2))->contains('.33');\n\t}", "title": "" }, { "docid": "6ef4ccd8afd65f9a0fe5f0bc04953805", "score": "0.577975", "text": "function progo_price_helper( $price ) {\r\n\tglobal $wpdb;\r\n\t$sep = get_option( 'wpsc_decimal_separator' );\r\n\t// even though WPeC stores the \"decimal separator\" in the DB, the price is always stored with a \".\" separator...\r\n\t$dot = strrpos( $price, '.' );\r\n\t\r\n\tif ( $dot !== false ) {\r\n\t\t$price = substr( $price, 0, $dot ) .'<u>'. substr( $price, $dot + 1 ).'</u>';\r\n\t} else {\r\n\t\t$price .= '<u>00</u>';\r\n\t}\r\n\t$currency_data = $wpdb->get_results( \"SELECT `symbol`,`symbol_html`,`code` FROM `\" . WPSC_TABLE_CURRENCY_LIST . \"` WHERE `id`='\" . absint( get_option( 'currency_type' ) ) . \"' LIMIT 1\", ARRAY_A );\r\n\tif ( $currency_data[0]['symbol'] != '' ) {\r\n\t\t$currency_sign = $currency_data[0]['symbol_html'];\r\n\t} else {\r\n\t\t$currency_sign = $currency_data[0]['code'];\r\n\t}\r\n\t\r\n\treturn '<span>'.$currency_sign.'</span>'. $price;\r\n}", "title": "" }, { "docid": "8159d5f3e6e48edabd3fd46c8eff3e5b", "score": "0.5605169", "text": "function presentPrice($price)\n{\n return presentCurrency() . formattedPrice($price);\n}", "title": "" }, { "docid": "aedeba28885686ce8858505926d72e30", "score": "0.55482244", "text": "function clean_decimal(?string $value)\n{\n\tif (round ( $value ) == $value) {\n\t\t$value = round ( $value );\n\t}\n\treturn $value;\n}", "title": "" }, { "docid": "5f03072672cc6d792965ca521b5e3a2a", "score": "0.55253524", "text": "public function testMakeWrongCurrencyRefund() {\n $wrong_currency = 'GBP';\n $this->assertNotEquals($this->original_currency, $wrong_currency);\n wmf_civicrm_mark_refund(\n $this->original_contribution_id, 'refund',\n TRUE, NULL, NULL,\n $wrong_currency, $this->original_amount\n );\n }", "title": "" }, { "docid": "874dbf424a0ad20ceaf043c38a98170d", "score": "0.55173314", "text": "public function price($decimals = null, $decimalPoint = null, $thousandSeperator = null): string;", "title": "" }, { "docid": "2ac0ba88b2160e30337fe34848956451", "score": "0.550901", "text": "public function testConversionToACurrencyWhichIsNotOrigCurrency()\n {\n $converted = $this->converter->convertEurToUsd(100);\n $this->assertEquals(139.7310, $converted);\n }", "title": "" }, { "docid": "28bcc3313bf931d294dfb0b1c4776cb4", "score": "0.55080014", "text": "protected function escapeCurrency($price)\n {\n preg_match(\"/^\\\\D*\\\\s*([\\\\d,\\\\.]+)\\\\s*\\\\D*$/\", $price, $matches);\n return (isset($matches[1])) ? $matches[1] : null;\n }", "title": "" }, { "docid": "0c0d700f60427f6c290518a1117d690b", "score": "0.5504157", "text": "function priceInSatoshi($price) {\n $tempPrice = $price / 100000000;\n $priceInSats = 1 / $tempPrice;\n\n if (round((double) $priceInSats) > 0) {\n return round((double) $priceInSats);\n } elseif (round((double) $priceInSats) <= 0) {\n return round((double) $priceInSats, 4);\n }\n\n return $price;\n }", "title": "" }, { "docid": "e4efbaa938f75c14f8fbe22a0d35253a", "score": "0.54943776", "text": "function get_price($digits=2)\n {\n return Model_base::round_up($this->price, $digits);\n }", "title": "" }, { "docid": "b6ad8f2bda83e7872c921f1c557b9a1d", "score": "0.5458153", "text": "public function testPrice()\n\t{\n\t\t$condition = factory(Condition::class)->make(['price_modifier' => 0.10]);\n\t\t$rentalPeriod = factory(RentalPeriod::class)->make(['price_modifier' => 0.90]);\n\t\t$retailPrice = 100;\n\t\t$suggester = new PriceSuggester($condition, $rentalPeriod, $retailPrice);\n\n\t\t$this->assertEquals(100, $suggester->price());\n\t}", "title": "" }, { "docid": "b7b9aec76206d19989c3d857b496502c", "score": "0.5442123", "text": "protected function checkCurrency() {\n $orderCurrency = $this->getOrder()->getOrderCurrencyCode();\n $receivedCurrency = $this->api->getOperationCurrency();\n if ($orderCurrency !== $receivedCurrency) {\n die('MAGENTO1 - FAIL CURRENCY ('.$orderCurrency.' <> '.$receivedCurrency.')');\n }\n }", "title": "" }, { "docid": "e9c9e98543ba2129389fc2dbecc46387", "score": "0.543638", "text": "public function convert($value, $targetCurrency, $round = true, $valueCurrency = null)\n {\n if (null == $valueCurrency) {\n $valueCurrency = $this->getDefaultCurrency();\n }\n\n if (!isset($this->adapter[$targetCurrency])) {\n throw new CurrencyNotFoundException($targetCurrency);\n }\n\n if ($targetCurrency != $valueCurrency) {\n if ($this->getDefaultCurrency() == $valueCurrency) {\n $value *= $this->adapter[$targetCurrency]->getRate();\n }\n else {\n $value /= $this->adapter[$valueCurrency]->getRate(); // value in the default currency\n\n if ($this->getDefaultCurrency() != $targetCurrency) {\n $value *= $this->adapter[$targetCurrency]->getRate();\n }\n }\n }\n\n return $round ? round($value, 2) : $value;\n }", "title": "" }, { "docid": "1963d5a0c4671bd4b1928cf251a2c39a", "score": "0.54235315", "text": "public function round($roundingMode);", "title": "" }, { "docid": "afbd54b8dc9bc708ddb402f39cc132af", "score": "0.5410105", "text": "function money__cleanse_test() {\n $values = array(\n array('input' => '100.00', 'output' => '100.00'),\n array('input' => '10,00', 'output' => '1000'),\n array('input' => '15,2000', 'output' => '152000'),\n array('input' => '10*_00', 'output' => '1000'),\n array('input' => '$100,000.00', 'output' => '100000.00'),\n array('input' => '-$100.00', 'output' => '-100.00'),\n array('input' => '$-100.30', 'output' => '-100.30')\n );\n \n foreach ($values as $value) {\n $this->assert_equal($value['output'], money::cleanse($value['input']));\n }\n }", "title": "" }, { "docid": "d97dce82ee07754cab78ba1ed5426670", "score": "0.5388611", "text": "public function testConvertSingleStock()\n {\n $stock = 27.3;\n $convertedStock = $this->currencyStockConverter->convertSingleStock($stock);\n $this->assertEquals(24.64, $convertedStock);\n $this->assertTrue(gettype($convertedStock) === 'double');\n }", "title": "" }, { "docid": "a225f3fad648aa745f0896685b3ad9ff", "score": "0.53839487", "text": "function paymentnepal_usd_currency_symbol( $currency_symbol, $currency ) {\n if($currency == \"USD\") {\n $currency_symbol = '$';\n }\n return $currency_symbol;\n}", "title": "" }, { "docid": "bba456b02630734d17f127758648fd14", "score": "0.53809255", "text": "public function testBadStringPrice()\n {\n $this->item->setPrice(\"456\");\n $this->assertSame(456.0, $this->item->getPrice());\n\n // Accepts float string without leading integer\n $this->item->setPrice(\".99\");\n $this->assertSame(0.99, $this->item->getPrice());\n $this->item->setPrice(\".0\");\n $this->assertSame(0.0, $this->item->getPrice());\n\n // Accepts float string without decimal numbers\n $this->item->setPrice(\"9.\");\n $this->assertSame(9.0, $this->item->getPrice());\n\n // Arbitrary precision\n $this->item->setPrice(\"9.4329082\");\n $this->assertSame(9.4329082, $this->item->getPrice());\n\n // Try with different locale\n setlocale(LC_NUMERIC, 'it_IT');\n\n // Accepts floats\n $this->item->setPrice(9.99);\n $this->assertSame(9.99, $this->item->getPrice());\n\n // Accepts integers\n $this->item->setPrice(9);\n $this->assertSame(9.0, $this->item->getPrice());\n\n // Accepts standard float string\n $this->item->setPrice(\"9.99\");\n $this->assertSame(9.99, $this->item->getPrice());\n\n // Accepts standard integer string\n $this->item->setPrice(\"456\");\n $this->assertSame(456.0, $this->item->getPrice());\n\n // Accepts float string without leading integer\n $this->item->setPrice(\".99\");\n $this->assertSame(0.99, $this->item->getPrice());\n $this->item->setPrice(\".0\");\n $this->assertSame(0.0, $this->item->getPrice());\n\n // Accepts float string without decimal numbers\n $this->item->setPrice(\"9.\");\n $this->assertSame(9.0, $this->item->getPrice());\n\n // Arbitrary precision\n $this->item->setPrice(\"9.4329082\");\n $this->assertSame(9.4329082, $this->item->getPrice());\n setlocale(LC_NUMERIC, 'en_US');\n }", "title": "" }, { "docid": "2e0972da2fb13a8df61eb4a7d3add30a", "score": "0.53629994", "text": "public function testFormatNumberWithInvalidPriceData($number, $currency)\n {\n $this->cldrLocale->formatPrice($number, $currency);\n }", "title": "" }, { "docid": "509dabd91c25d366a0887bc0388cc24c", "score": "0.53483707", "text": "public function test_square_charge_non_existant_currency(): void\n {\n $this->expectException(Exception::class);\n $this->expectExceptionMessageMatches('/This merchant can only process payments in USD, but amount was provided in XXX/i');\n $this->expectExceptionCode(400);\n\n Square::charge(['amount' => 5000, 'source_id' => 'cnon:card-nonce-ok', 'location_id' => env('SQUARE_LOCATION'), 'currency' => 'XXX']);\n }", "title": "" }, { "docid": "4e6492c6b58ffa1cefe4cca1f2760e11", "score": "0.53462636", "text": "public function testCheckSumPlayerNotHundred()\n {\n $round = new Round(2, 15, 10);\n\n $res = $round->checkSum(\"player\");\n $exp = \"Play dice\";\n $this->assertEquals($res, $exp);\n }", "title": "" }, { "docid": "258f1c9f6d3dafcfc3af809bc1d9f92c", "score": "0.5324173", "text": "public static function displayPrice($price, $currency = NULL, $no_utf8 = false)\n\t{\n\t\tif ($currency === NULL)\n\t\t\t$currency = Currency::getCurrent();\n\t\t/* if you modified this function, don't forget to modify the Javascript function formatCurrency (in tools.js) */\n\t\tif (is_int($currency))\n\t\t\t$currency = Currency::getCurrencyInstance((int)$currency);\n\n\t\t$price = self::convertPrice($price);\n\t\tif (is_array($currency))\n\t\t{\n\t\t\t$c_char = $currency['sign'];\n\t\t\t$c_format = $currency['format'];\n\t\t\t$c_decimals = 2;\n\t\t\t$c_blank = '';\n\t\t}\n\t\telseif (is_object($currency))\n\t\t{\n\t\t\t$c_char = $currency->sign;\n\t\t\t$c_format = $currency->format;\n\t\t\t$c_decimals = 2;\n\t\t\t$c_blank = '';\n\t\t}\n\t\telse\n\t\t\treturn false;\n\n\t\t$c_char = '<span class=\"sign\">' . $c_char . '</span>';\n\t\t$blank = ($c_blank ? ' ' : '');\n\t\t$ret = 0;\n\t\tif (($isNegative = ($price < 0)))\n\t\t\t$price *= -1;\n\t\t$price = round($price, $c_decimals);\n\t\tswitch ($c_format)\n\t \t{\n\t \t \t/* X 0,000.00 */\n\t \t \tcase 1:\n\t\t\t\t$ret = $c_char . $blank .number_format($price, $c_decimals, '.', ',');\n\t\t\t\tbreak;\n\t\t\t/* 0 000,00 X*/\n\t\t\tcase 2:\n\t\t\t\t$ret = number_format($price, $c_decimals, ',', ' ').$blank.$c_char;\n\t\t\t\tbreak;\n\t\t\t/* X 0.000,00 */\n\t\t\tcase 3:\n\t\t\t\t$ret = $c_char.$blank.number_format($price, $c_decimals, ',', '.');\n\t\t\t\tbreak;\n\t\t\t/* 0,000.00 X */\n\t\t\tcase 4:\n\t\t\t\t$ret = number_format($price, $c_decimals, '.', ',').$blank.$c_char;\n\t\t\t\tbreak;\n\t\t}\n\t\tif ($isNegative)\n\t\t\t$ret = '-'.$ret;\n\t\tif ($no_utf8)\n\t\t\treturn str_replace('€', chr(128), $ret);\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "5e6d71602d810a5b637bcbcb38647bab", "score": "0.5316609", "text": "function format_price($price) {\n return number_format($price, 2, '.', '');\n }", "title": "" }, { "docid": "48ce63e46862f1ee62d985426a50c734", "score": "0.53134716", "text": "function test_change_currency_fail(){\n\n\t\t$order = new APP_Draft_Order();\n\t\t$default_currency = $order->get_currency();\n\n\t\t$return_value = $order->set_currency( '543' );\n\t\t$this->assertFalse( $return_value );\n\n\t\t$this->assertEquals( $default_currency, $order->get_currency() );\n\t}", "title": "" }, { "docid": "0a1105c8111be8583c88a4728ba58c3e", "score": "0.5309036", "text": "private function getCurrency($price)\n {\n $currency = Yii::t('document', 'EUROS');\n $number = intval($price);\n if (strlen($number) <= 0) {\n return $currency;\n }\n\n $lastNumber = substr($number, -1, 1);\n if (substr($number, -2, 1) == 1) {\n return $currency;\n }\n\n switch ($lastNumber) {\n case 0:\n return Yii::t('document', 'EUROS');\n case 1:\n return Yii::t('document', 'EURO');\n default:\n return $currency;\n }\n }", "title": "" }, { "docid": "79eb244fab9f7e45a5eb1b528d308239", "score": "0.5306959", "text": "function price($price,$currency = \"zł\"){\n $price = (float)$price;\n return number_format($price,2,'.',' ').' '.$currency;\n }", "title": "" }, { "docid": "cd10b827607d3e6b5cdad492edeb566d", "score": "0.5305761", "text": "public function testPrice()\n {\n $this->assertNull($this->kitty->getPrice());\n $returnedKitty = $this->kitty->setPrice(13.37);\n $this->assertSame($this->kitty, $returnedKitty);\n $this->assertEquals(13.37, $this->kitty->getPrice());\n }", "title": "" }, { "docid": "c642d92d0ae68fffd9b55563369cd8fb", "score": "0.53028435", "text": "function onlyPrice($price)\n{\n $sc = session('currency');\n if ($sc != null) {\n $id = $sc;\n } else {\n $id = (int)getSystemSetting('default_currencies')->value;\n }\n\n $currency = Currency::find($id);\n $p = $price * $currency->rate;\n return $p;\n\n}", "title": "" }, { "docid": "f7c43fc46a777d0cc22e55e00a0fc4a4", "score": "0.5302676", "text": "function testDecimal()\n\t{\n\t\t$price = $this->sqlmap->queryForObject(\"GetDecimal\", 1);\n\t\t$this->assertIdentical(1.56, $price);\n\t}", "title": "" }, { "docid": "36199bf2c53ae4f19bc3f6670ce96c2c", "score": "0.52872574", "text": "public function testSingleCurrency() {\n $this->drupalGet('/commerce_price_test/price_test_form');\n $this->assertSession()->fieldExists('amount[number]');\n // Default value.\n $this->assertSession()->fieldValueEquals('amount[number]', '99.99');\n\n // Invalid submit.\n $edit = [\n 'amount[number]' => 'invalid',\n ];\n $this->submitForm($edit, 'Submit');\n $this->assertSession()->pageTextContains('Amount must be a number.');\n\n // Valid submit.\n $edit = [\n 'amount[number]' => '10.99',\n ];\n $this->submitForm($edit, 'Submit');\n $this->assertSession()->pageTextContains('The number is \"10.99\" and the currency code is \"USD\".');\n\n // Ensure that the form titles are displayed as expected.\n $elements = $this->xpath('//input[@id=\"edit-amount-hidden-title-number\"]/preceding-sibling::label[@for=\"edit-amount-hidden-title-number\" and contains(@class, \"visually-hidden\")]');\n $this->assertTrue(isset($elements[0]), 'Label preceding field and label class is visually-hidden.');\n\n $elements = $this->xpath('//input[@id=\"edit-amount-number\"]/preceding-sibling::label[@for=\"edit-amount-number\" and not(contains(@class, \"visually-hidden\"))]');\n $this->assertTrue(isset($elements[0]), 'Label preceding field and label class is not visually visually-hidden.');\n }", "title": "" }, { "docid": "25470c0011b8ef4ca1d1061c9621e5c7", "score": "0.5286887", "text": "function woo_bto_cart_item_price( $price, $values, $cart_item_key ) {\n\n\t\tglobal $woocommerce;\n\n\t\tif ( isset( $values[ 'composite_parent' ] ) && ! empty( $values[ 'composite_parent' ] ) ) {\n\n\t\t\t$parent_cart_key = $values[ 'composite_parent' ];\n\n\t\t\tif ( $woocommerce->cart->cart_contents[ $parent_cart_key ][ 'data' ]->per_product_pricing == 'no' )\n\t\t\t\treturn '';\n\t\t}\n\n\t\tif ( isset( $values[ 'composite_children' ] ) && ! empty( $values[ 'composite_children' ] ) ) {\n\n\t\t\tif ( $values[ 'data' ]->per_product_pricing == 'yes' ) {\n\n\t\t\t\t$composite_price = '';\n\n\t\t\t\tforeach ( $values[ 'composite_data' ] as $composite_item_id => $composite_item_data ) {\n\t\t\t\t\t$composite_price += $composite_item_data[ 'price' ] * $composite_item_data[ 'quantity' ];\n\t\t\t\t}\n\n\t\t\t\treturn woocommerce_price( $composite_price );\n\n\t\t\t}\n\t\t}\n\n\t\treturn $price;\n\t}", "title": "" }, { "docid": "8bfae825a1e12f013a1bdcd1319f6918", "score": "0.528574", "text": "function testDouble()\n\t{\n\t\t$price = $this->sqlmap->queryForObject(\"GetDouble\", 1);\n\t\t$this->assertIdentical(99.5, $price);\n\t}", "title": "" }, { "docid": "036df82bdbd7c899b64b90549572ac2f", "score": "0.52730656", "text": "public function testProcessPaymentWithWrongCurrency()\n {\n $this->_paymentProcessor->setCurrency('EURonen');\n\n $this->assertFalse($this->ProcessPayment());\n $this->assertEquals('Exception thrown from paymill wrapper.', $this->_actualLoggingMessage);\n $this->_paymentObject->delete($this->_paymentId);\n $this->_clientObject->delete($this->_clientId);\n }", "title": "" }, { "docid": "a832fe2acc2ca8b651e76824eea513a5", "score": "0.52683204", "text": "function testDecimalWithoutResultClass()\n\t{\n\t\t$price = $this->sqlmap->queryForObject(\"GetDecimalWithoutResultClass\", 1);\n\t\t$this->assertIdentical(1.56, (float)$price);\n\t}", "title": "" }, { "docid": "a0887e4a62f6622afb41dc5ac016d9fe", "score": "0.5259142", "text": "public function convert($value, $targetCurrency, $round = true, $valueCurrency = null);", "title": "" }, { "docid": "6b75dda798d61458464151066db5011e", "score": "0.52534276", "text": "public function test_create_order_default_currency(){\n\n\t\tadd_theme_support( 'app-price-format', array(\n\t\t\t'currency_default' => 'GBP'\n\t\t) );\n\n\t\t$order = new APP_Draft_Order();\n\t\t$this->assertEquals( 'GBP', $order->get_currency() );\n\n\t}", "title": "" }, { "docid": "a8fb448e27318b2aff8ecada221ed972", "score": "0.5249581", "text": "public function formatMoneyRound($value)\n {\n return $this->formatCurrency($value, 'primary', 0);\n }", "title": "" }, { "docid": "d1fefd8686b06eb5e3bf496fa3f8e67b", "score": "0.52380437", "text": "function webseo24h_tie_format_price_discount_unitprice($price,$discount)\n{\n $price = intval($price);\n $discount = intval($discount);\n\n if($price<1)\n return 0;\n\n if($discount<1 || $discount>=$price)\n {\n return $price;\n }\n else if($discount>1 && $discount < $price)\n {\n return $discount;\n }\n}", "title": "" }, { "docid": "744672cb825abee5cf8c33aba19cb2c7", "score": "0.5233965", "text": "function format_price($price)\r\n {\r\n return '$' . number_format($price, 2, '.', '');\r\n }", "title": "" }, { "docid": "7a5de34529a8f4e342bd79640c9e59e4", "score": "0.52190506", "text": "function pmpro_formatPrice($price)\n{\n\tglobal $pmpro_currency, $pmpro_currency_symbol, $pmpro_currencies;\n\n\t//start with the price formatted with two decimals\n\t$formatted = number_format($price, 2);\n\n\t//settings stored in array?\n\tif(!empty($pmpro_currencies[$pmpro_currency]) && is_array($pmpro_currencies[$pmpro_currency]))\n\t{\n\t\t//format number do decimals, with decimal_separator and thousands_separator\n\t\t$formatted = number_format($price,\n\t\t\t(isset($pmpro_currencies[$pmpro_currency]['decimals']) ? (int)$pmpro_currencies[$pmpro_currency]['decimals'] : 2),\n\t\t\t(isset($pmpro_currencies[$pmpro_currency]['decimal_separator']) ? $pmpro_currencies[$pmpro_currency]['decimal_separator'] : '.'),\n\t\t\t(isset($pmpro_currencies[$pmpro_currency]['thousands_separator']) ? $pmpro_currencies[$pmpro_currency]['thousands_separator'] : ',')\n\t\t);\n\t\t\n\t\t//which side is the symbol on?\n\t\tif(!empty($pmpro_currencies[$pmpro_currency]['position']) && $pmpro_currencies[$pmpro_currency]['position']== 'left')\n\t\t\t$formatted = $pmpro_currency_symbol . $formatted;\n\t\telse\n\t\t\t$formatted = $formatted . $pmpro_currency_symbol;\n\t}\n\telse\n\t\t$formatted = $pmpro_currency_symbol . $formatted;\t//default to symbol on the left\n\n\t//filter\n\treturn apply_filters('pmpro_format_price', $formatted, $price, $pmpro_currency, $pmpro_currency_symbol);\n}", "title": "" }, { "docid": "ff4fa3016f4988aa41ec3d95efd62744", "score": "0.52170897", "text": "public function testCheckSumComputerNotHundred()\n {\n $round = new Round(2, 15, 10);\n\n $res = $round->checkSum(\"computer\");\n $exp = \"Play dice\";\n $this->assertEquals($res, $exp);\n }", "title": "" }, { "docid": "5852f0304f8cecb4e38dc1cf2a229417", "score": "0.5181298", "text": "public function getNetRetailPrice() {\n \n $baseRetailPrice = 0.000000; // (double)\n $netCustSpecPrice = $this->getNetCustomerSpecificPrice(); // (double)\n \n // use orderArchiveNetPrice if this is set currently\n if (isset($this->orderArchiveNetPrice)) {\n \n $netRetailPrice = (double)$this->orderArchiveNetPrice;\n \n // use price calculation if no orderArchiveNetPrice is set\n } else {\n \n // use special offer price if offer exists and is valid for the current date\n if ($this->get_specialOfferFlag() == 1 && $this->get_specialOfferStartDate() <= $this->date && $this->get_specialOfferEndDate() >= $this->date) {\n $baseRetailPrice = $this->get_specialOfferRetailPrice();\n \n // else use default price of the given price category (if this price is 0, use next lower price category > 0)\n } else {\n $priceCategoryToUse = $this->priceCategory;\n while ($baseRetailPrice == 0 && $priceCategoryToUse >= 1) {\n $basicRetailPriceCategoryGetter = 'get_basicRetailPriceCategory'.(string)$priceCategoryToUse;\n $baseRetailPrice = (double)$this->$basicRetailPriceCategoryGetter(); // method call results e.g. in get_basicRetailPriceCategory1()\n if (! $baseRetailPrice > 0) {\n $priceCategoryToUse -= 1;\n }\n }\n }\n \n // calcute net online retail price if price is marked as gross [ARTIKEL.PRBRUTTO: 0=net, 1=gross]\n if ($this->grossPriceFlag == 1) {\n $netDefaultRetailPrice = tx_pttools_finance::getNetPriceFromGross($baseRetailPrice, $this->getTaxRate(), 6); // we need precision 6 here for the case of double conversion (gross price in database (flag), net base price retrieval from this gross price, gross price retrieval from this base net price)\n // else use base net retail price\n } else {\n $netDefaultRetailPrice = $baseRetailPrice;\n }\n \n // if a valid customer specific price is set AND the shop is configured to use it always OR it is lower the default retail price: use customer specific price\n if ($netCustSpecPrice >= 0 && ($this->classConfigArr['custSpecPriceOverridesDefaultPrice'] == 1 || $netCustSpecPrice < $netDefaultRetailPrice)) {\n $netRetailPrice = $netCustSpecPrice;\n trace('Using customer specific price for article '.$this->id.'...');\n // if no valid customer specific price is set or the above conditions do not match: use default retail price\n } else {\n $netRetailPrice = $netDefaultRetailPrice;\n }\n \n }\n \n // HOOK: allow multiple hooks to modify netRetailPrice [NOTICE 04/07: do not rename 'article_hooks' to 'baseArticle_hooks' here since \"old\" hooks of this class are called 'article_hooks', too]\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsashop']['article_hooks']['getNetRetailPriceHook'])) {\n foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['pt_gsashop']['article_hooks']['getNetRetailPriceHook'] as $className) {\n $hookObj = &t3lib_div::getUserObj($className); // returns an object instance from the given class name\n $netRetailPrice = $hookObj->getNetRetailPriceHook($this, $netRetailPrice); // object params are passed as a reference (since PHP5) and can be manipulated in the hook method\n }\n }\n \n trace($netRetailPrice, 0, '$netRetailPrice'); \n return $netRetailPrice;\n \n }", "title": "" }, { "docid": "e1a24f2cf06d88aedd863f42fa15afc1", "score": "0.51775974", "text": "function getBitcoinPrice()\n{\n\n $bitcoinData = getBitcoinData();\n\n $price = str_replace('#', ',', str_replace(',', '', $bitcoinData->bpi->EUR->rate));\n\n return number_format((float)$price, 2, '.', '');\n}", "title": "" }, { "docid": "df3b73e1a241c7be6486079122b53f62", "score": "0.515192", "text": "function validateCurrency($value)\n {\n $value = round($value, 2);\n\n if(is_numeric($value)) {\n\n } else {\n $error = \"Invalid Amount\";\n array_push($_SESSION['errors'], $error);\n }\n }", "title": "" }, { "docid": "0f1de4d75055eb500bbaedd5774f886f", "score": "0.5127231", "text": "public function hasCurrency() : bool;", "title": "" }, { "docid": "42fe095f1c4e8328d19695575751395d", "score": "0.5120635", "text": "public function test_getPriceForNextDraw_called_returnTotalPriceForNextDrawWithDiscount()\n {\n list($playConfig,$euroMillionsDraw) = $this->getPlayConfigAndEuroMillionsDraw(true);\n $lottery = new Lottery();\n $lottery->setSingleBetPrice(new Money(250, new Currency('EUR')));\n $sut = $this->getSut();\n $actual = $sut->getPriceForNextDraw([$playConfig,$playConfig,$playConfig]);\n $expected = new Money(717,new Currency('EUR'));\n $this->assertEquals($expected,$actual);\n }", "title": "" }, { "docid": "694c653fc9f2eef0dabc2e569b498e77", "score": "0.51139826", "text": "public function testPricesIncludeNoTax() : void {\n $order = $this\n ->setPricesIncludeTax(FALSE, ['FI'])\n ->createOrder($this->createGatewayPlugin());\n\n $request = $this->getRequest($order);\n // Taxes should be added to unit price.\n $this->assertTaxes($request, 2728, 1364, 24);\n }", "title": "" }, { "docid": "fb1110fddaa6504129e4b86d37f56bbc", "score": "0.5106805", "text": "function validatePrice($price) \n{\n return preg_match('/^\\d+(\\.\\d{2})?$/', $price);\n}", "title": "" }, { "docid": "bf0024442ead8e960b2722dd80454f72", "score": "0.5105887", "text": "function single_pixel_price_formatted()\r\n {\r\n global $lang;\r\n $s = number_format($this->single_pixel_price(), 8, $lang->decimal_point, $lang->thousands_separator);\r\n return preg_replace('/0+$/', '', $s);\r\n }", "title": "" }, { "docid": "fbb8af35143e5552ae18cdd223baf3ad", "score": "0.50980365", "text": "function currency($value){\n\t\t$value = preg_replace('@[^\\-0-9.]@','',$value);\n\t\t$value = round((float)$value,2);\n\t}", "title": "" }, { "docid": "8b726f785f6fb094069e8975956a6a6c", "score": "0.50885814", "text": "private function getEuroCents($price)\n {\n $number = str_replace('.', ',', $price);\n $position = strrpos($number, ',');\n if ($position) {\n return number_format(intval(substr($price, $position + 1)), 0) . ' ct';\n }\n return '00 ct';\n }", "title": "" }, { "docid": "377e94417e9f5f938c1f368ded0cc5ed", "score": "0.5079575", "text": "public function __construct(Round $round)\n {\n $this->round = $round;\n }", "title": "" }, { "docid": "6032d4a72399c24e05018ac0ea2cbf17", "score": "0.507805", "text": "function testDoubleWithoutResultClass()\n\t{\n\t\t$price = $this->sqlmap->queryForObject(\"GetDoubleWithoutResultClass\", 1);\n\t\t$this->assertIdentical(99.5, (float)$price);\n\t}", "title": "" }, { "docid": "f37ce26712616f3181899c0446e8ce44", "score": "0.5077789", "text": "public function testLesserWrongCurrencyRefund() {\n $epochtime = time();\n $dbtime = wmf_common_date_unix_to_civicrm($epochtime);\n $this->setExchangeRates($epochtime, array('USD' => 1, 'COP' => .01));\n\n $result = $this->callAPISuccess('contribution', 'create', array(\n 'contact_id' => $this->contact_id,\n 'financial_type_id' => 'Cash',\n 'total_amount' => 200,\n 'currency' => 'USD',\n 'contribution_source' => 'COP 20000',\n 'trxn_id' => \"TEST_GATEWAY {$this->gateway_txn_id} \" . (time() + 20),\n ));\n\n wmf_civicrm_mark_refund(\n $result['id'],\n 'refund',\n TRUE,\n $dbtime,\n NULL,\n 'COP',\n 5000\n );\n\n $contributions = $this->callAPISuccess('Contribution', 'get', array(\n 'contact_id' => $this->contact_id,\n 'sequential' => TRUE,\n ));\n $this->assertEquals(3, $contributions['count'], print_r($contributions, TRUE));\n $this->assertEquals(200, $contributions['values'][1]['total_amount']);\n $this->assertEquals('USD', $contributions['values'][2]['currency']);\n $this->assertEquals($contributions['values'][2]['total_amount'], 150);\n $this->assertEquals('COP 15000', $contributions['values'][2]['contribution_source']);\n }", "title": "" }, { "docid": "d35cb45b7438029f914f79e0d9491eeb", "score": "0.50757414", "text": "public function testUnitPriceNetModeON()\n {\n $shipping = new BasketItem(0, 0, '', 0, 0, '', 16.6, 10, 1, 16);\n $shipping->setNetMode(true);\n\n $this->assertEquals(10.0, $shipping->getUnitPrice());\n }", "title": "" }, { "docid": "9f0f3e1c3d77845ec28a428f5425e106", "score": "0.50740916", "text": "public function testConvertStockCollection()\n {\n $closingStocks = $this->databaseData->getClosingStockPriceData();\n $convertedClosingStocks = $this->currencyStockConverter->convertStocks($closingStocks);\n $this->assertNotEquals($closingStocks[0]['closing_price'], $convertedClosingStocks[0]['closing_price']);\n }", "title": "" }, { "docid": "a238e071ce8c07f2e4de1f0c27ccfacc", "score": "0.50698686", "text": "public function testResetSpecialPrice()\n {\n $this->_markTestAsRestOnly(\n 'In order to properly run this test for SOAP, XML must be used to specify <value></value> ' .\n 'for the special_price value. Otherwise, the null value gets processed as a string and ' .\n 'cast to a double value of 0.0.'\n );\n $productData = $this->getSimpleProductData();\n $productData['custom_attributes'] = [\n ['attribute_code' => self::KEY_SPECIAL_PRICE, 'value' => 5.00],\n ];\n $this->saveProduct($productData);\n $response = $this->getProduct($productData[ProductInterface::SKU]);\n $customAttributes = array_column($response['custom_attributes'], 'value', 'attribute_code');\n $this->assertEquals(5, $customAttributes[self::KEY_SPECIAL_PRICE]);\n $productData['custom_attributes'] = [\n ['attribute_code' => self::KEY_SPECIAL_PRICE, 'value' => null],\n ];\n $this->saveProduct($productData);\n $response = $this->getProduct($productData[ProductInterface::SKU]);\n $customAttributes = array_column($response['custom_attributes'], 'value', 'attribute_code');\n $this->assertArrayNotHasKey(self::KEY_SPECIAL_PRICE, $customAttributes);\n }", "title": "" }, { "docid": "5865972b80718ba4be7a246a1d35fd37", "score": "0.50680476", "text": "public function round($precision = 1, $function = 'round');", "title": "" }, { "docid": "eeb8348aec4d8965c74e042b0f6e3008", "score": "0.50558186", "text": "function getPriceWithDiscount ($price){\n// and 5% for prices greater than or equal 1000\nif ($price<1000) {\n return $dis=$price*(10/100);\n}elseif($price>=1000){\n\n return $dis=$price*(5/100);\n}\n\n\n}", "title": "" }, { "docid": "a98f6cb5ffd076cdb29caa4cd571396f", "score": "0.50525504", "text": "public function testUnitPriceNetModeOFF()\n {\n $shipping = new BasketItem(0, 0, '', 0, 0, '', 16.6, 10, 1, 16);\n $shipping->setNetMode(false);\n\n $this->assertEquals(16.6, $shipping->getUnitPrice());\n }", "title": "" }, { "docid": "2f488ab850a57efd727da588b298e8cb", "score": "0.5050018", "text": "function test_change_currency(){\n\n\t\t$order = new APP_Draft_Order();\n\n\t\t$order->set_currency( 'EUR' );\n\t\t$this->assertEquals( 'EUR', $order->get_currency() );\n\n\t}", "title": "" }, { "docid": "142a2189cdeedca5300520f6f305422d", "score": "0.5048309", "text": "public function formatAltMoneyRound($value)\n {\n return $this->formatCurrency($value, 'secondary', 0);\n }", "title": "" }, { "docid": "4a1ae04f3fe5bb8baff89078c5324169", "score": "0.5042207", "text": "public static function priceWithoutDiscount($currentPrice, $discount, $round_num = null)\n {\n $res = $currentPrice * (100 / (100 - $discount));\n\n return ($round_num >= 1) ? self::round($res, $round_num) : $res;\n }", "title": "" }, { "docid": "cf7a3593ae2a19929cc2766eed5d57bf", "score": "0.5042103", "text": "function currencyToDisplay($value, $symbol = null) {\r\n $ret = number_format(round($value, 2, PHP_ROUND_HALF_UP), 2);\r\n if (is_null($symbol) === false)\r\n $ret = $symbol . $ret;\r\n return $ret;\r\n}", "title": "" }, { "docid": "11dc873c58e20da1a67c7ad460fce5ae", "score": "0.50412786", "text": "public function testGetValueTypeFixedWithoutSelectionPriceType($useRegularPrice)\n {\n $this->setupSelectionPrice($useRegularPrice);\n $regularPrice = 100.125;\n $discountedPrice = 70.453;\n $convertedValue = 100.247;\n $actualPrice = $useRegularPrice ? $convertedValue : $discountedPrice;\n $expectedPrice = $useRegularPrice ? round($convertedValue, 2) : round($discountedPrice, 2);\n\n $this->bundleMock->expects($this->once())\n ->method('getPriceType')\n ->will($this->returnValue(\\Magento\\Bundle\\Model\\Product\\Price::PRICE_TYPE_FIXED));\n $this->productMock->expects($this->once())\n ->method('getSelectionPriceType')\n ->will($this->returnValue(false));\n $this->productMock->expects($this->any())\n ->method('getSelectionPriceValue')\n ->will($this->returnValue($regularPrice));\n\n $this->priceCurrencyMock->expects($this->once())\n ->method('convert')\n ->with($regularPrice)\n ->will($this->returnValue($convertedValue));\n\n if (!$useRegularPrice) {\n $this->discountCalculatorMock->expects($this->once())\n ->method('calculateDiscount')\n ->with(\n $this->equalTo($this->bundleMock),\n $this->equalTo($convertedValue)\n )\n ->will($this->returnValue($discountedPrice));\n }\n\n $this->priceCurrencyMock->expects($this->once())\n ->method('round')\n ->with($actualPrice)\n ->will($this->returnValue($expectedPrice));\n\n $this->assertEquals($expectedPrice, $this->selectionPrice->getValue());\n }", "title": "" }, { "docid": "68263fc56c42c80dbd4eef055d95488a", "score": "0.50399834", "text": "public function getFormattedPrice($price)\n {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $priceHelper = $objectManager->create('Magento\\Framework\\Pricing\\Helper\\Data');\n $formattedPrice = $priceHelper->currency($price, true, false);\n return $formattedPrice;\n }", "title": "" }, { "docid": "23b834588a96633e9ab43516e24b3c1e", "score": "0.5039888", "text": "public function testFixedPercentage()\n\t{\n\n\t\t$bundle = $this->getSimpleTwoProductWithQuote(50, 100, self::RULE_DIRECTION_FIXED, 10, self::RULE_ADJUSTER_PRICE);\n\n\t\t$priceFromProductDetails = $bundle['priceFromProductDetails'];\n\t\t$priceFromQuote = $bundle['priceFromQuote'];\n\n\t\t// assert the the calculation is : (0.1 * priceof(productA)) + priceof(productB)\n\t\t$expectedPrice = 110;\n\t\t$this->assertEquals($expectedPrice, $priceFromProductDetails, \"Incorrect product details calculation\");\n\t\t// check that the cart is getting the same result\n\t\t$this->assertEquals($priceFromProductDetails, $priceFromQuote, \"Product Details price and Quote price doesn't match.\");\n\n\t}", "title": "" }, { "docid": "0c42493dbe6168c9dfa48461aea0ce6f", "score": "0.5033757", "text": "public function round(string $number, Currency $currency): string\n {\n $precision = $this->getRoundPrecision($currency);\n $offset = 0.5;\n if ($precision !== 0) {\n $offset /= pow(10, $precision);\n }\n $ceil = (string) round((float) $number + $offset, $precision, PHP_ROUND_HALF_DOWN);\n\n return bcadd($ceil, '0', $precision);\n }", "title": "" }, { "docid": "b406099dbc9b2437b9a69513470cf675", "score": "0.5029414", "text": "public function testCalculateChanceOfFindingCard() {\n\t\t$numberTest1 = number_format(1 * 100 / 52, 2);\n\t\t\n\t\t//4 cards left\n\t\t$numberTest2 = number_format(1 * 100 / 4, 2);\n\t\t\n\t\t//2 cards left\n\t\t$numberTest3 = number_format(1 * 100 / 2, 2);\n\n\t\t$this->assertSame('1.92', $numberTest1);\n\t\t$this->assertSame('25.00', $numberTest2);\n\t\t$this->assertSame('50.00', $numberTest3);\n\t}", "title": "" }, { "docid": "e122af08f577722f534a32c30d12ea82", "score": "0.5023118", "text": "public function toCurrentCurrency($price) {\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n $priceHelper = $objectManager->get('Magento\\Framework\\Pricing\\Helper\\Data');\n return $priceHelper->currency($price, true, false);\n }", "title": "" }, { "docid": "1c6e156c22773550fab500fc8867fe2a", "score": "0.50224125", "text": "public function getDefaultCurrency();", "title": "" }, { "docid": "8335f933cf280062be0246c3b8de3cdf", "score": "0.5006969", "text": "public function round($value, $precision);", "title": "" }, { "docid": "82c5ec1d5f68e0cb2d529c433efa310d", "score": "0.49953714", "text": "function priceToShow($price) {\n $ci =& get_instance();\n if ($ci->config->item('currency_position') == 'before') {\n return $ci->config->item('currency') . $price;\n } else {\n return $price . $ci->config->item('currency');\n }\n}", "title": "" }, { "docid": "af463aa78b8c6950a7f54436d64ef766", "score": "0.4978716", "text": "public function testStylePercent()\n {\n $numberFormatter = new \\NumberFormatter('en_US', \\NumberFormatter::PERCENT);\n $moneyFormatter = new MoneyFormatter($numberFormatter);\n $this->assertEquals('500%', $moneyFormatter->toCurrency(new Money(5, new Currency('EUR'))));\n }", "title": "" }, { "docid": "de65e66a007563d56e141c9044efaacd", "score": "0.49781224", "text": "public function testTotals()\n {\n $this->assertEquals(0, $this->getPurchasePrice(''));\n $this->assertEquals(50, $this->getPurchasePrice('A'));\n $this->assertEquals(80, $this->getPurchasePrice('AB'));\n $this->assertEquals(115, $this->getPurchasePrice('CDBA'));\n\n $this->assertEquals(100, $this->getPurchasePrice('AA'));\n $this->assertEquals(130, $this->getPurchasePrice('AAA'));\n $this->assertEquals(180, $this->getPurchasePrice('AAAA'));\n $this->assertEquals(230, $this->getPurchasePrice('AAAAA'));\n $this->assertEquals(260, $this->getPurchasePrice('AAAAAA'));\n\n $this->assertEquals(160, $this->getPurchasePrice('AAAB'));\n $this->assertEquals(175, $this->getPurchasePrice('AAABB'));\n $this->assertEquals(190, $this->getPurchasePrice('AAABBD'));\n $this->assertEquals(190, $this->getPurchasePrice('DABABA'));\n }", "title": "" }, { "docid": "fe67a3803dc2c42e9bf93dc078f7c28b", "score": "0.497554", "text": "function getUnitPriceRoundingPrecision($currency = null){\n\t\tif(is_null($currency)){\n\t\t\t$currency = Currency::GetDefaultCurrency();\n\t\t}\n\n\t\t// Standardne se zaokrouhluje na 2 mista\n\t\t// a prida se k tomu pocet nul u nasobku pro zobrazeni.\n\t\t// Tim dosahneme u cm: 2 + 2 -> 4 des. mista, coz by odpovidalo 2 mistum u metru.\n\t\t// Standardni hodnota by mela vychazet z pouzite meny.\n\t\t$precision = $currency->getDecimals() + ceil(log10($this->getDisplayUnitMultiplier()));\n\t\treturn (int)$precision;\n\t}", "title": "" }, { "docid": "8bb45094a4ed4b90bd8a114f666362ad", "score": "0.4972569", "text": "public function testFormatPrice($number, $currencyCode, $expected)\n {\n $price = $this->cldrLocale->formatPrice($number, $currencyCode);\n\n $this->assertSame($expected, $price);\n }", "title": "" }, { "docid": "34e3c05bd68101bb455fcb478b462d07", "score": "0.4971149", "text": "function update_price($exclspec = 0, $roundingadjust = -1) {\n global $conf;\n \n if ($roundingadjust < 0 && isset($conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND))\n $roundingadjust = $conf->global->MAIN_ROUNDOFTOTAL_NOT_TOTALOFROUND;\n if ($roundingadjust < 0)\n $roundingadjust = 0;\n\n $err = 0;\n\n // List lines to sum\n $fieldtva = 'total_tva';\n $fieldlocaltax1 = 'total_localtax1';\n $fieldlocaltax2 = 'total_localtax2';\n if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier')\n $fieldtva = 'tva';\n\n $sql = 'SELECT qty, total_ht, ' . $fieldtva . ' as total_tva, ' . $fieldlocaltax1 . ' as total_localtax1, ' . $fieldlocaltax2 . ' as total_localtax2, total_ttc,';\n $sql.= ' tva_tx as vatrate';\n $sql.= ' FROM ' . MAIN_DB_PREFIX . $this->table_element_line;\n $sql.= ' WHERE ' . $this->fk_element . ' = ' . $this->rowid;\n $sql.= \" AND entity = \".$conf->entity;\n //TODO Se comento porque fallaba\n //if ($exclspec)\n //$sql.= ' AND product_type <> 9';\n \n Syslog::log(\"CommonObject::update_price sql=\" . $sql);\n \n $resql = $this->db->query($sql);\n if ($resql) {\n $this->total_ht = 0;\n $this->total_tva = 0;\n $this->total_localtax1 = 0;\n $this->total_localtax2 = 0;\n $this->total_ttc = 0;\n\n // Descuento general de la factura\n $this->total_remise_proveedor = 0;\n\n // IVA que se debe descontar\n $this->total_iva_remise_proveedor = 0;\n\n //\tretencion de IVA\n $this->total_retencion_iva = 0;\n\n $num = $this->db->num_rows($resql);\n $i = 0;\n while ($i < $num) {\n $obj = $this->db->fetch_object($resql);\n\n // Total sin IVA \n $this->total_ht += $obj->total_ht;\n\n // Total del IVA, solo en valor del IVA\n $this->total_tva += $obj->total_tva;\n\n $this->total_localtax1 += $obj->total_localtax1;\n $this->total_localtax2 += $obj->total_localtax2;\n\n // Total con IVA incluido\n $this->total_ttc += $obj->total_ttc;\n\n // Sacar el descuento que es general de la factura\n // este descuento se debe aplicar por cada fila\n if ($this->remise_proveedor > 0) {\n $this->total_remise_proveedor += ($obj->total_ht * $this->remise_proveedor) / 100;\n\n // Debo calcular otra vez el IVA pero con el descuento general aplicado\n $total_tmp = $obj->total_ht - (($obj->total_ht * $this->remise_proveedor) / 100);\n\n // Guardo los ivas con los descuentos\n $this->total_iva_remise_proveedor += (($total_tmp * $obj->vatrate) / 100);\n }\n\n // TODO Also fill array by vat rate\n $varates[$this->vatrate][] = array('total_ht' => $obj->total_ht, 'total_tva' => $obj->total_tva, 'total_ttc' => $obj->total_ttc,\n 'total_localtax1' => $obj->total_localtax1, 'total_localtax2' => $obj->total_localtax2);\n $i++;\n }\n\n $this->db->free($resql);\n\n // Si tiene descuento general debo recalcular el IVA\n if ($this->remise_proveedor > 0) {\n $this->total_ht -= $this->total_remise_proveedor;\n $this->total_tva = $this->total_iva_remise_proveedor;\n $this->total_ttc = $this->total_ht + $this->total_tva;\n }\n\n // Si tiene asignado retencion de IVA entonces lo calculo, si y solo si no tiene la retencion ANULADA\n if ($this->tva_retencion_iva != -1) {\n $this->total_retencion_iva = ($this->tva_retencion_iva / 100) * $this->total_tva;\n //$this->total_ttc = $this->total_ttc - $this->total_tva;\n //$this->total_ttc = $this->total_ttc + ($this->total_tva - $this->total_retencion_iva);\n }\n\n // TODO\n if ($roundingadjust) {\n // For each vatrate, calculate if two method of calculation differs\n // If it differs\n if (1 == 2) {\n // Adjust a line and update it\n }\n }\n\n // Now update field total_ht, total_ttc and tva\n $fieldht = 'total_ht';\n $fieldtva = 'tva';\n $fieldlocaltax1 = 'localtax1';\n $fieldlocaltax2 = 'localtax2';\n $fieldttc = 'total_ttc';\n if ($this->element == 'facture' || $this->element == 'facturerec')\n $fieldht = 'total';\n if ($this->element == 'facture_fourn' || $this->element == 'invoice_supplier')\n $fieldtva = 'total_tva';\n if ($this->element == 'propal')\n $fieldttc = 'total';\n // TODO REVISAR CODIGO\n /*\n if ($this->table_element == 'facture_fourn') {\n // Si es factura de proveedor entonces guardo los totales de retenciones\n $sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';\n $sql .= \" \" . $fieldht . \"='\" . Price::price2num($this->total_ht) . \"',\";\n $sql .= \" \" . $fieldtva . \"='\" . Price::price2num($this->total_tva) . \"',\";\n $sql .= \" \" . $fieldlocaltax1 . \"='\" . Price::price2num($this->total_localtax1) . \"',\";\n $sql .= \" \" . $fieldlocaltax2 . \"='\" . Price::price2num($this->total_localtax2) . \"',\";\n $sql .= \" \" . $fieldttc . \"='\" . Price::price2num($this->total_ttc) . \"',\";\n $sql .= \" total_retencion_iva='\" . Price::price2num($this->total_retencion_iva) . \"',\";\n $sql .= \" total_retencion_islr='\" . Price::price2num($this->total_retencion_islr) . \"',\";\n $sql .= \" total_remise_proveedor='\" . Price::price2num($this->total_remise_proveedor) . \"',\";\n $sql .= \" remise_proveedor='\" . Price::price2num($this->remise_proveedor) . \"'\";\n $sql .= ' WHERE rowid = ' . $this->rowid;\n $sql.= \" AND entity = \".$conf->entity;\n } else {\n $sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';\n $sql .= \" \" . $fieldht . \"='\" . Price::price2num($this->total_ht) . \"',\";\n $sql .= \" \" . $fieldtva . \"='\" . Price::price2num($this->total_tva) . \"',\";\n $sql .= \" \" . $fieldlocaltax1 . \"='\" . Price::price2num($this->total_localtax1) . \"',\";\n $sql .= \" \" . $fieldlocaltax2 . \"='\" . Price::price2num($this->total_localtax2) . \"',\";\n $sql .= \" \" . $fieldttc . \"='\" . Price::price2num($this->total_ttc) . \"'\";\n $sql .= ' WHERE rowid = ' . $this->rowid;\n $sql.= \" AND entity = \".$conf->entity;\n }\n */\n \n $this->db->begin();\n Syslog::log(\"CommonObject::update_price sql=\" . $sql);\n $resql = $this->db->query($sql);\n if ($resql) {\n $this->db->commit();\n return 1;\n } else {\n $this->error = $this->db->error();\n Syslog::log(\"CommonObject::update_price error=\" . $this->error, LOG_ERR);\n $this->db->rollback();\n return -1;\n }\n } else {\n $this->error = $this->db->error();\n Syslog::log(\"CommonObject::update_price error=\" . $this->error, LOG_ERR);\n return -1;\n }\n }", "title": "" }, { "docid": "29233a0156bde61fb5bdfa88f4839b36", "score": "0.49677044", "text": "function roundTwoDecimal($num) { //SIN REDONDEO OK number_format =redondea a 2 :D\n $valor = number_format($num, 4);\n $redondeo = round(($valor * 100));\n return ($redondeo / 100);\n}", "title": "" }, { "docid": "165a7a2409071483e2639d8261039143", "score": "0.49608445", "text": "public function testAmounts()\n {\n echo PHP_EOL;\n\n $amounts = array(\n //value, expected\n [12.6529, 12.65],\n [12.86512, 12.87],\n [12.744623, 12.74],\n [12.8752, 12.88],\n [12.8150, 12.82],\n [12.8050, 12.80],\n [12.5, 12.50],\n [12.3, 12.30],\n [12.33, 12.33],\n [12, 12],\n [0.025, 0.02],\n [0.036, 0.04],\n [0.046, 0.05],\n [0.026, 0.03],\n [0.2345645, 0.23],\n );\n\n foreach ($amounts as $index => $amountInfo) {\n $rounded = AbntNbr5891::round($amountInfo[0]);\n $this->assertEquals($amountInfo[1], $rounded);\n }\n }", "title": "" }, { "docid": "8af7d18551cac6962735a3e80f24f7e0", "score": "0.49520168", "text": "function ef_format_currency($amount) {\n return ef_msg(\"M_FMT_CURR\",ef_currency_round($amount));\n}", "title": "" }, { "docid": "c9d0286e330cf43fa4c44b2bb885b5cf", "score": "0.49510664", "text": "function currency_safe($value, $ndec = 2, $sep = \".\"){\n\t$value = preg_replace('/[^0-9., ]/', \"\", $value); // remove anything that's not a number, a comma, a dot or a space\n\t$value = trim($value); // remove whitespaces at start and end\n\t$value = preg_replace('/[., ]/', $sep, $value); // replace commas, dots and spaces (in between) with a separator sign\n\t$p = explode($sep, $value); // split string by separator sign\n\t\n\tif(count($p) > 1){\n\t\t$dec = array_pop($p); // get decimals \n\t\t$dec = myRound($dec, $ndec); // round and truncate decimals to two (p.e. 2345 becomes 24)\n\t\t$int = implode(\"\", $p);\n\t\t$number = $int.\".\".$dec;\n\t}else{\n\t\t$number = $parts[0];\n\t}\n\t\n\treturn number_format($number, $ndec, \".\", \"\");\n}", "title": "" }, { "docid": "e0e5a9fbec819703b2114838617a89e9", "score": "0.49356288", "text": "function getPrice($price)\n{\n require 'constants.php';\n $price = $price/1000;\n return($price);\n}", "title": "" }, { "docid": "b219703a2fc3d2c104c6346442865a00", "score": "0.49354228", "text": "public function testPricePerPlayer()\n {\n $pricingsRepository = $this->createMock(PricingRepository::class);\n $pricingsRepository->expects($this->any())->method('findAll')->willReturn($this->pricings);\n\n // create 9 passed UserPlayGames\n $upgs = new ArrayCollection();\n for ($i = 0; $i<9; $i++) {\n $upgs->add($this->createMock(UserPlayGame::class));\n }\n\n // create mock User\n $user = $this->createMock(User::class);\n $user->expects($this->any())->method('getUserPlayGames')->willReturn($upgs);\n\n // create mock Game\n $game = $this->createMock(Game::class);\n $game->expects($this->any())->method('getUserPlayGames')->willReturn($upgs);\n\n // create new UserPlayGame\n $newUpg = $this->createMock(UserPlayGame::class);\n $newUpg->expects($this->any())->method('getUser')->willReturn($user);\n $newUpg->expects($this->any())->method('getGame')->willReturn($game);\n\n $priceCalculator = new GamePriceCalculator($pricingsRepository);\n\n // test fidelity pricing\n // add the new UserPlayGame to the User's UserPlayGames (now count = 10 OK for fidelity pricing)\n $upgs->add($newUpg);\n $result = $priceCalculator->pricePerPlayer($newUpg);\n $this->assertEquals(0, $result);\n\n // test standard pricing\n // add 1 new upg (now count = 11, standard pricing should apply)\n $upgs->add($this->createMock(UserPlayGame::class));\n $result = $priceCalculator->pricePerPlayer($newUpg);\n $this->assertEquals(30, $result);\n\n // test group pricing\n // add 1 new upg (now count = 12, standard pricing should apply)\n $upgs->add($this->createMock(UserPlayGame::class));\n $result = $priceCalculator->pricePerPlayer($newUpg);\n $this->assertEquals(25, $result);\n }", "title": "" }, { "docid": "263c39772c34b224da2f585cbd80ec03", "score": "0.49272972", "text": "public function testGetRates()\n {\n $service = new CurrencyExchangeService($this->getRatesService($this->currencyRates, 'USD'), 'USD');\n $this->assertEquals($this->currencyRates, $service->getCurrencies());\n }", "title": "" }, { "docid": "3053a0a219ee2c8b053fba98fdbca9a6", "score": "0.49111605", "text": "public function convert_from($value, $from_currency, $round = 2)\n\t\t{\n\t\t\t$result = $value*$this->get_rate($from_currency, Shop_CurrencySettings::get()->code);\n\t\t\treturn $round === null ? $result : round($result, $round);\n\t\t}", "title": "" }, { "docid": "21f0b82443e936d661d31b855262eda4", "score": "0.49087825", "text": "public function test_choices_containing_dollars() {\n $q = qtype_gapselect_test_helper::make_a_currency_gapselect_question();\n $q->shufflechoices = false;\n $this->start_attempt_at_question($q, 'interactive', 1);\n\n // Check the initial state.\n $this->check_current_state(question_state::$todo);\n $this->check_current_mark(null);\n $html = $this->quba->render_question($this->slot, $this->displayoptions);\n preg_match_all('/<option value=\"([^>]*)\">([^<]*)<\\/option>/', $html, $matches);\n $this->assertEquals('$2', $matches[2][1]);\n $this->assertEquals('$3', $matches[2][2]);\n $this->assertEquals('$4.99', $matches[2][3]);\n $this->assertEquals('-1', $matches[2][4]);\n }", "title": "" }, { "docid": "6daa5e092501e0da1d17892a02b9cbf2", "score": "0.48990983", "text": "public function testRound(): void\n {\n $this->assertTrue(true);\n return;\n\n $lang = new Translations();\n $params = Connection\\Params\\Factory::getForSchema(Interfaces\\ISchema::SCHEMA_UDP, $lang);\n// $params->setTarget('ftp.vslib.cz', 21);\n// $params->setTarget('www.720k.net', 21, 60);\n// $params->setTarget('fsp.720k.net', 21, 60);\n $params->setTarget('10.0.0.30', 54321, 10);\n $processor = new Connection\\Processor(new Sockets\\Socket());\n $query = new Fsp\\Query();\n $answer = new Fsp\\Answer();\n $answer->canDump = true;\n $version = new Fsp\\Query\\Version($query);\n $version->setKey(32)->setSequence(16)->compile();\n\n $response = $processor->setConnectionParams($params)->setData($query)->process()->getResponse();\n $result = Fsp\\Answer\\AnswerFactory::getObject(\n $answer->setResponse(\n $response\n )->process()\n )->process();\n\n /** @var Fsp\\Answer\\Version $result */\n $this->assertEquals('fspd 2.8.1b29', $result->getVersion());\n $this->assertFalse($result->isReadOnly());\n }", "title": "" }, { "docid": "d33ebeb9ce2842ceb8d5e4f4d555d51f", "score": "0.48965332", "text": "abstract public function getPrice(string $coinCode);", "title": "" }, { "docid": "f525c38c0bc505aafd050b2514c2d87b", "score": "0.4895587", "text": "public function getRound()\n {\n return $this->round;\n }", "title": "" }, { "docid": "95f68e48a0f95fcf3fc410a48e4fd4b3", "score": "0.488329", "text": "public function test_it_can_convert_pounds_to_pence()\n {\n $money = Money::fromPounds('1');\n // It should equal 100 pence\n $this->assertSame($money->inPence(), '100');\n }", "title": "" } ]
d1d9e773773502ffc88271324f54f3b4
/ $var = array( "method" => "get", "path" => "the/path/no/slashes", "base" => "/" "vars" => array( "id" => "fatima" ) )
[ { "docid": "3e0151d55d79edbbee8a71e204fa2816", "score": "0.0", "text": "function profile($var){\n\tpp($var);\n}", "title": "" } ]
[ { "docid": "69e359320294917f78246253f1564dce", "score": "0.61815935", "text": "function getRestVar($var){\n\t//$method = $method? $method : '';\n\t$p = isset($_POST[ $var ])?\t$_POST[ $var ]\t: false;\n\t$g = isset($_GET[ $var ])?\t$_GET[ $var ]\t: false;\n\treturn $p? $p : $g;\n}", "title": "" }, { "docid": "74483518d19699a2ea6b23a0a3adb264", "score": "0.5844606", "text": "function query_vars($vars) {\n\t\t$vars[] = 'sfn_trk';\n\t\t$vars[] = 'sfn_data';\n\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "fefd194db4c386afcd12d8f1132d2fd1", "score": "0.57579994", "text": "function ei8_xmlrpc_admin_parse_recorder_vars($vars) {\n if(strstr($vars,'http')) {\n $parts = parse_url($vars);\n $vars = $parts['path'];\n }\n //get down to the last slash\n if(strstr($vars,'/')) {\n $parts = explode('/', $vars);\n $vars = array_pop($parts);\n }\n //make sure there is no funny business going on\n $vars = urldecode(htmlspecialchars_decode($vars));\n return $vars;\n}", "title": "" }, { "docid": "9d4ea802bf2d08579a7fa0407a8247d5", "score": "0.5623405", "text": "function query_vars( $vars ) {\n\t// Add a query var to enable hot reloading.\n\t$vars[] = 'civil-first-fleet-dev';\n\t$vars[] = 'ajax';\n\n\treturn $vars;\n}", "title": "" }, { "docid": "0bab8aaaaa7f83ae8b0fa7d0f6837f90", "score": "0.56085604", "text": "public function add_query_vars($vars){\n\t\t$vars[] = '__api';\n\t\t$vars[] = 'stamp';\n\t\t$vars[] = 'data';\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "74bd57a582c56561524e33b2c8dabdd7", "score": "0.5596951", "text": "public function getGetRequest($var='')\r\n {\r\n $request = $this->_get_request;\r\n if($var && in_array($var, $request)){\r\n return $request[$var];\r\n }\r\n return $request;\r\n }", "title": "" }, { "docid": "402c7f9ebdd938b104bc9f372748759c", "score": "0.55574876", "text": "public function getEndpointVars(): array;", "title": "" }, { "docid": "3c5c435ae4262cfcd26c49c3da070d16", "score": "0.5514396", "text": "function kino_query_vars_filter( $vars ){\n $vars[] = \"kinorole\";\n $vars[] = \"kinodate\";\n $vars[] = \"kinodebug\";\n $vars[] = \"id\";\n $vars[] = \"besointype\";\n return $vars;\n}", "title": "" }, { "docid": "d16bdcb3b6759ae4d3a90b8104d150ec", "score": "0.5509474", "text": "function getVar($index)\n{\n $tree = explode(\"/\", @$_GET['path']);\n $tree = array_filter($tree);\n\n if (is_int($index)) {\n $res = @$tree[$index - 1];\n } else {\n $res = @$_GET[$index];\n }\n return $res;\n}", "title": "" }, { "docid": "fc9a1d6816524bcc81d41193daa8f457", "score": "0.5508842", "text": "function hum_query_vars( $vars ) {\n $vars[] = 'hum';\n return $vars;\n}", "title": "" }, { "docid": "2692dab431394ab48b2507278ec1d7e3", "score": "0.5495751", "text": "function get($var) {\n\t\tglobal $routing_controller;\n\t\treturn($routing_controller->get_variable($var));\n\t}", "title": "" }, { "docid": "2157c534d5098f0da2da8776bc01aafa", "score": "0.5402369", "text": "public function query_vars( $vars ): array {\n\t\t$new_vars = array( $this->url_param );\n\t\t$vars = $new_vars + $vars;\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "1261d9cbf19b04700da7cc1d8319c8a1", "score": "0.53946334", "text": "static function sub_vars($variables) {\n\t$resultado = [];\n\tforeach ($variables as $variable => $valor) {\n\t\tif (is_array($valor)) {\n\t\t\t$resultado[] = \"var $variable = JSON.parse('\".json_encode($valor).\"');\";\n\t\t} else {\n\t\t\t$resultado[] = \"var $variable = '$valor';\";\n\t\t}\n\t}\n\t$resultado = implode(\"\\n\",$resultado);\n\techo $resultado;\n}", "title": "" }, { "docid": "ce0397bdc88a0cf9addf339d105a4d80", "score": "0.53586036", "text": "function getVars() {\n\t\t$vars = array();\n\t\t$this->parse();\n\t\tforeach ( $this->pathInfo as $path => $data ) {\n\t\t\tif ( $path[0] != '$' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$trimmedPath = substr( $path, 1 );\n\t\t\t$name = $data['name'];\n\t\t\tif ( $name[0] == '@' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( $name[0] == '$' ) {\n\t\t\t\t$name = substr( $name, 1 );\n\t\t\t}\n\t\t\t$parentPath = substr( $trimmedPath, 0,\n\t\t\t\tstrlen( $trimmedPath ) - strlen( $name ) );\n\t\t\tif ( substr( $parentPath, -1 ) == '/' ) {\n\t\t\t\t$parentPath = substr( $parentPath, 0, -1 );\n\t\t\t}\n\n\t\t\t$value = substr( $this->text, $data['valueStartByte'],\n\t\t\t\t$data['valueEndByte'] - $data['valueStartByte']\n\t\t\t);\n\t\t\t$this->setVar( $vars, $parentPath, $name,\n\t\t\t\t$this->parseScalar( $value ) );\n\t\t}\n\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "bec613bd303bbd52b3a7bb1964901855", "score": "0.5346928", "text": "public static function getall_request_vars()\n{ \n\n // Set vars\n $vars = array(\n 'host' => self::$host,\n 'port' => self::$port,\n 'protocol' => self::$protocol,\n 'method' => self::$method,\n 'content_type' => self::$content_type,\n 'uri' => self::$uri,\n 'area' => self::$area,\n 'theme' => self::$theme,\n 'http_controller' => self::$http_controller,\n 'action' => self::$action,\n 'userid' => self::$userid,\n 'language' => self::$language,\n 'timezone' => self::$timezone,\n 'currency' => self::$currency,\n 'ip_address' => self::$ip_address,\n 'user_agent' => self::$user_agent\n );\n\n // Return\n return array_merge($vars, $this->attributes);\n\n}", "title": "" }, { "docid": "959240b0c96371fd897a84661ce293c5", "score": "0.5330937", "text": "function eca_directory_query_vars( $vars ) {\n\t$vars[] = \"directory_page\";\n\treturn $vars;\n}", "title": "" }, { "docid": "1194fd86d4ba140bb4cc2d88667bd867", "score": "0.5314608", "text": "public static function query_vars($vars) {\n $vars[] = 'well-known';\n\n return $vars;\n }", "title": "" }, { "docid": "dd8c16cfc77160839078e4fc4bacf4b7", "score": "0.5299598", "text": "public function CreateVariables($vars)\n\t{\n\t\n\t\t$url = '/V';\n\t\t\n\t\tforeach ($vars as $var)\n\t\t{\n\t\t\t\n\t\t\t$url .= '/'.$var;\t\n\t\t\t\n\t\t}\n\t\t\n\t\treturn $url;\n\t\t\n\t}", "title": "" }, { "docid": "f187865c284b0492b213ca9c671e4ac0", "score": "0.52857304", "text": "function agt_add_to_query_var($vars) {\n\t $vars[] = 'reqId';\n\t return $vars;\n\t}", "title": "" }, { "docid": "c7dd379e16ad0fda7b390355a6729f52", "score": "0.5279172", "text": "private static function getInfo($var){\r\n $value = '';\r\n if(array_key_exists($var, $_SERVER)){\r\n $value = $_SERVER[$var];\r\n }else if(array_key_exists($var, $_REQUEST)){\r\n $value = $_REQUEST[$var];\r\n }\r\n return $value;\r\n }", "title": "" }, { "docid": "2b5c718bf6150f68a390b66938b4e29d", "score": "0.5272953", "text": "function getUrlVars($path = null, $number_return = false, $language_reference_file = null, $convert_to_friendy_url = false, $case = \"none\"){\n if(is_array($path)) $path = join(\"/\", $path);\n if($path === null) $path = trim(@$_SERVER[\"QUERY_STRING\"]);\n if($path === null) $path = trim(@$_SERVER[\"PATH_INFO\"]);\n $path = str_replace(\"path=\", \"\", $path);\n $path = htmlspecialchars($path);\n $tmp_array = explode('/', $path);\n\n $last_element = array_pop($tmp_array);\n if(strpos($last_element,\"?\") !== false) $last_element = str_replace(\"?\", \"\",\"&\".$last_element);\n\n $get = \"\";\n if(strpos($last_element, \"&\") !== false){\n $last_element = explode(\"&\", $last_element);\n $first_part = @array_shift($last_element);\n if($first_part) array_push($tmp_array, $first_part);\n $get = join(\"&\", $last_element);\n }else{\n array_push($tmp_array, $last_element);\n }\n $array = array();\n foreach($tmp_array as $index=>$row){\n if($index == count($tmp_array)-1 && strpos($row, \"=\") !== false ){ $row = @explode(\"&\", $row); $row = @$row[0]; }\n if($row){\n $number_value = $row;\n if($number_return){\n $number_value = (int) $row;\n if($number_value) \n array_push($array, $number_value); \n else{\n $row = explode(\".\",$row);\n $row = @$row[0];\n if(@$language_reference_file){\n $row_translated = @$this->getKeyFromValue($row, $language_reference_file);\n $row = (@$row_translated) ? @$row_translated : $row;\n if($convert_to_friendy_url) $row = $this->getFriendlyUrl($row);\n }\n if($case == \"upper\") @$row = @strtoupper($row);\n if($case == \"lower\") @$row = @strtolower($row);\n }\n }else{\n $row = explode(\".\",$row);\n $row = @$row[0];\n if(@$language_reference_file){\n $row_translated = @$this->getKeyFromValue($row, $language_reference_file);\n $row = (@$row_translated) ? @$row_translated : $row;\n if($convert_to_friendy_url) $row = $this->getFriendlyUrl($row);\n }\n if($case == \"upper\") @$row = @strtoupper($row);\n if($case == \"lower\") @$row = @strtolower($row);\n array_push($array, @$row);\n }\n } \n }\n //++ substract GET values\n if($get){\n $get = \"&\".$get; $get = str_replace(\"amp;\", \"\", $get); $get = preg_replace('/&+/', '&', $get);\n parse_str($get, $get);\n $array = array_merge($array, $get);\n }\n //--\n if(count($array)) return $array;\n else return null;\n }", "title": "" }, { "docid": "6e23f6d6256dc8ad58297a617dd0fa8f", "score": "0.5265642", "text": "private function GetgetVars() {\n\t\tforeach ($this->urlarr as $key1 => $val1) {\n\t\t\tif (strpos($val1,\"?\")!== false) {\n\t\t\t\t#we have one ore more variable we need to grab\n\t\t\t\t$val1 = substr($val1,strpos($val1, \"?\")+1);\n\t\t\t\t$val1 = explode(\"&\",$val1);\n\t\t\t\tforeach ($val1 as $key2 => $val2) {\n\t\t\t\t\t#postitie = teken\n\t\t\t\t\t$keyVar = substr($val2,0,(strpos($val2,\"=\")));\n\t\t\t\t\t$valVar = substr($val2,(strpos($val2,\"=\")+1));\n\t\t\t\t\t$this->getVars[$keyVar] = htmlentities($valVar,ENT_QUOTES,'UTF-8');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d5e33d2efa2a63e9202652b97c3a4383", "score": "0.52611274", "text": "function vars_get($url) {\n\tlist($url_script, $hash_get) = explode('?', $url);\n\t\n\tif ( !empty($hash_get) ) return '?'.$hash_get;\n}", "title": "" }, { "docid": "70a6d5999e8eda83faa165a450d22434", "score": "0.5238356", "text": "function parse_router_request(){\n $__R__ = isset($_GET['__R__'])?$_GET['__R__']:\"/\";\n return $__R__;\n}", "title": "" }, { "docid": "6e8a2e6651ce887d7d6c29de36708065", "score": "0.5225777", "text": "function pshb_query_var($vars) {\n\t$vars[] = 'hub_mode';\n\t$vars[] = 'hub_challenge';\n\t$vars[] = 'hub_topic';\n\t$vars[] = 'hub_url';\n\t$vars[] = 'pubsubhubbub';\n\treturn $vars;\n}", "title": "" }, { "docid": "d1eff4875bccb164571ddf41323e0e2e", "score": "0.5221852", "text": "public function query_vars( $vars ) {\n\t\tarray_push( $vars, 'api_position' );\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "2d5a1b5db7e568ba7a0e7d9843048b9e", "score": "0.5219755", "text": "public function query_vars( $vars ) {\n\t\t$vars[] = 'review_id';\n\t\t$vars[] = 'download_id';\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "2fbdd2895e099ee132f767803d5d62e9", "score": "0.5217126", "text": "public function getServerVars();", "title": "" }, { "docid": "58ba8b353372d934ce024a778dfa9f25", "score": "0.5201295", "text": "function addSimple($key) {\n\t\treturn array( 'GETvar' => $key );\n\t}", "title": "" }, { "docid": "7645bdaaceec246644e2927978118ac5", "score": "0.5198965", "text": "private static function parse_path_vars($section, $vars) : array\n\t{\n\t\t$cells = explode('/', $section);\n\t\t$ret = [];\n\n\t\tforeach($vars as $key => $value)\n\t\t{\n\t\t\t$ret[$value] = $cells[$key];\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "bb75f81da7c539f032a2ef8d7ef6ee6c", "score": "0.5192542", "text": "public function get($var)\n {\n return $this->info[\"$var\"];\n }", "title": "" }, { "docid": "1dcfb302dd5b7e39caa9e76a1514d442", "score": "0.51890105", "text": "public function test_build_request_from_globals() {\n $_SERVER['REQUEST_URI'] = '/albums/edit/id/1/?a=3&b=4';\n $_SERVER['REQUEST_METHOD'] = 'POST';\n $_GET['a'] = 3;\n $_GET['b'] = 4;\n $_POST['x'] = 4;\n $_POST['y'] = 5;\n $_SERVER['HTTP_CONTENT_TYPE'] = 'application/xml';\n $_SERVER['HTTP_ACCEPT'] = 'application/json';\n\n $request = http\\build_request_from_globals();\n $expected = [\n http\\request_scheme => 'http',\n http\\request_body => '',\n http\\request_path => 'albums/edit/id/1',\n http\\request_params => [\n 'a' => 3, 'b' => 4,\n 'x' => 4, 'y' => 5\n ],\n http\\request_method => 'POST',\n http\\request_headers => array('Content-Type' => 'application/xml', 'Accept' => 'application/json')\n ];\n $this->assertEquals($expected, $request);\n }", "title": "" }, { "docid": "adaec8accb3ac13ae20634ca28925706", "score": "0.51664054", "text": "function setVar( &$array, $path, $key, $value ) {\n\t\t$pathArr = explode( '/', $path );\n\t\t$target =& $array;\n\t\tif ( $path !== '' ) {\n\t\t\tforeach ( $pathArr as $p ) {\n\t\t\t\tif ( !isset( $target[$p] ) ) {\n\t\t\t\t\t$target[$p] = array();\n\t\t\t\t}\n\t\t\t\t$target =& $target[$p];\n\t\t\t}\n\t\t}\n\t\tif ( !isset( $target[$key] ) ) {\n\t\t\t$target[$key] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "f8d87980cd0d56f1aa8cd071fca7d24e", "score": "0.5142672", "text": "function query_vars( $vars ) {\n\t\treturn array_merge( $vars, array(\n\t\t\t'pcl_radius',\n\t\t\t'pcl_postal_code',\n\t\t\t'pcl_country_code',\n\t\t\t'pcl_longitude',\n\t\t\t'pcl_latitude',\n\t\t\t'pcl_distance_unit',\n\t\t\t'pcl_is_location_search',\n\t\t) );\n\t}", "title": "" }, { "docid": "b704f31425d62b5220ce9ac2e6cf64aa", "score": "0.51211727", "text": "function request()\n{\n $config = System\\Config::get('api_config');\n $base_uri = ($config['base_uri'] == '/') ? '' : $config['base_uri'];\n\n return array(\n 'base_url' => rtrim(System\\Config::get('api_config.url_front'), '/'),\n 'actual_url' => (isset($_SERVER['HTTPS']) ? 'https' : 'http').'://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'],\n 'base_uri' => System\\Config::get('api_config.base_uri'),\n 'actual_uri' => str_replace($base_uri, '', $_SERVER['REQUEST_URI'])\n );\n}", "title": "" }, { "docid": "8b419c6c2f5e86393841a3263a32e900", "score": "0.5119802", "text": "public function query_vars($vars) {\n\t\t\t$vars[] = 'template-type';\n\t\t\treturn $vars;\n\t\t}", "title": "" }, { "docid": "65d55eda3a23d26581e090d368650376", "score": "0.5118977", "text": "public static function serialize($route_vars) : array\n\t{\n\t\t$sections = explode('?', RegistryRecords::request()['URI'], 2);\n\t\t$ret['PATH'] = self::parse_path_vars($sections[0], $route_vars['PATH']);\n\n\t\tif(!empty($sections[1]))\n\t\t\t$ret['QUERY'] = self::parse_query_vars($sections[1], $route_vars['QUERY']);\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "7ee6a1a4a3c018a0e1d4cf4ac4f8d7b4", "score": "0.51029575", "text": "public static function parse_uri() {\n\t\t$path = array();\n\t\tif (isset($_SERVER['REQUEST_URI'])) {\n\t\t\t$request_path = explode('?', $_SERVER['REQUEST_URI']);\n\n\t\t\t$path['base'] = rtrim(dirname($_SERVER['SCRIPT_NAME']), '\\/');\n\t\t\t$path['call_utf8'] = substr(urldecode($request_path[0]), strlen($path['base']) + 1);\n\t\t\t$path['call'] = utf8_decode($path['call_utf8']);\n\t\t\tif ($path['call'] == basename($_SERVER['PHP_SELF'])) {\n \t\t\t\t$path['call'] = '';\n\t\t\t}\n\t\t\t$path['call_parts'] = explode('/', $path['call']);\n\t\t\t\n\t\t\tif ( sizeof($request_path) > 1 ) {\n\t\t\t\t$path['query_utf8'] = urldecode($request_path[1]);\n\t\t\t\t$path['query'] = utf8_decode(urldecode($request_path[1]));\n\t\t\t\t$vars = explode('&', $path['query']);\n\t\t\t\tforeach ($vars as $var) {\n\t\t\t\t\t$t = explode('=', $var);\n\t\t\t\t\t$path['query_vars'][$t[0]] = $t[1];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$path['query_utf8'] = NULL;\n\t\t\t\t$path['query'] = NULL;\n\t\t\t\t$path['query_vars'] = array();\n\t\t\t}\n\t\t}\n\t\treturn $path;\n\t}", "title": "" }, { "docid": "1c11d4fd7a128836c8d9432bf3ff2fd4", "score": "0.5057568", "text": "function getVars() {\r\n\t\t\treturn array(\r\n\t\t\t\t'breadcrumb'\t\t=> $this->getBreadcrumb(),\r\n\t\t\t\t'html_head'\t\t\t=> $this->page->header,\r\n\t\t\t\t'navigation_0'\t=> $this->getNavigation(0),\r\n\t\t\t\t'navigation_10'\t=> $this->getNavigation(10),\r\n \t\t\t'navigation_1'\t=> $this->getNavigation(1),\r\n \t\t\t'navigation_12'\t=> $this->getNavigation(12),\r\n \t\t\t'navigation_2'\t=> $this->getNavigation(2),\r\n \t\t\t'p'\t\t\t\t\t\t\t=> $this->pageurl,\r\n\t\t\t\t'page_title'\t\t=> $this->htmlPrepare($this->page->title),\r\n\t\t\t\t'page_text'\t\t\t=> $this->htmlPrepare($this->page->text),\r\n\t\t\t\t'page_url'\t\t\t=> $this->htmlPrepare($this->am[0].'/'.$this->page->entry),\r\n 'page_id' => $this->pageid,\r\n\t\t\t\t'top_title'\t\t\t=> $this->htmlPrepare($this->top->title),\r\n\t\t\t\t'top_text'\t\t\t=> $this->htmlPrepare($this->top->text),\r\n\t\t\t\t'top_url'\t\t\t\t=> $this->htmlPrepare($this->am[0].'/'.$this->top->entry),\r\n\t\t\t\t'passthru'\t\t\t=> $this->getPassthru(),\r\n \t\t\t'root'\t\t\t\t\t=> $this->root,\r\n\t\t\t);\r\n\t\t}", "title": "" }, { "docid": "1ba8c396cb28d6305699a52ec6808db1", "score": "0.49978977", "text": "public function testGETisFETCH() {\n $this->mockController();\n\n $_GET['var2'] = json_decode(json_encode(array('hello' => array('goodbye' => 'hi', 'robert'))));\n\n $response = $this->router->routeRequest('/routing/test/5', 'GET');\n }", "title": "" }, { "docid": "a8f351c42c70136d56c964728cce2fbb", "score": "0.49968415", "text": "public function vars($var) {\n if (is_array($var)) {\n foreach ($var as $key => $valeur) {\n $this->_var[$key] = $valeur;\n }\n }\n else if (func_num_args() == 2) {\n $args = func_get_args();\n $this->_var[$args[0]] = $args[1];\n }\n\n else if (func_num_args() == 3) {\n $args = func_get_args();\n $this->_var[$args[0]] = [$args[1], $args[2]];\n }\n }", "title": "" }, { "docid": "1387d633e6007b4fef13bac49ec9ee0b", "score": "0.49870923", "text": "function get($var)\n\t{\n\t\treturn $this->vars[$var];\n\t}", "title": "" }, { "docid": "3a0b87eb025858ba377052e9d1a4793e", "score": "0.49834272", "text": "function pnQueryStringSetVar($name, $value)\n{\n if (!isset($name)) {\n return;\n }\n // add the variable into the get superglobal\n $res = preg_match('/(.*)\\[(.*)\\]/i', $name, $match);\n if ($res != 0) {\n // possibly an array entry in the form a[0] or b[c]\n // $match[0] = a[0]\n // $match[1] = a\n // $match[2] = 0\n // this is everything we need to continue to build an array\n if (!isset($_REQUEST[$match[1]])) {\n $_REQUEST[$match[1]] = $_GET[$match[1]] = array();\n }\n $_REQUEST[$match[1]][$match[2]] = $_GET[$match[1]][$match[2]] = $value;\n } else {\n $_REQUEST[$name] = $_GET[$name] = $value;\n }\n return true;\n}", "title": "" }, { "docid": "21de7e8663c7097bb8fd5bb8a9e6e87e", "score": "0.49701443", "text": "function _uri($variable) {\n\t\t$namespace = $this->_config['storage']['namespace'];\n $host = tpl_request_host();\n $prefix = rtrim($this->_config['storage']['uri'],'/');\n\n if (isset($this->_config['storage']['auth_token_secret'])) {\n $ts = dechex(time());\n $base = $this->_relative($this->_hashns($namespace), $this->_hashkey($variable), '/');\n $token = md5($this->_config['storage']['auth_token_secret'].$base.basename_safe($variable).$ts);\n return $host.$prefix.'/'.$token.'/'.$ts.$base.rawurlencode(basename_safe($variable));\n }\n\n return $host.$prefix.$this->_relative($this->_hashns($namespace),\n $this->_hashkey($variable), '/').rawurlencode(basename_safe($variable));\n }", "title": "" }, { "docid": "974698a3084bbc12865dbd6eea275efd", "score": "0.49658856", "text": "private static function parse_query_vars($section, $vars) : array\n\t{\n\t\t$ret = [];\n\n\t\tforeach(self::safely_merge_arrays($vars) as $key => $value)\n\t\t{\n\t\t\t$ret[$value] = $_GET[$value];\n\t\t}\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "ef4692113a990c80932bf577b918da0c", "score": "0.49590617", "text": "static function getVar($variable, $default = null) {\n return self::arrayVar($_GET, $variable, $default);\n }", "title": "" }, { "docid": "a8d04db11587de6985051fa26cc55bdc", "score": "0.49302652", "text": "public function getServerVar($name);", "title": "" }, { "docid": "de37ec3525d6a50d476552c7deeda639", "score": "0.4928506", "text": "function cc_get( $var ) {\n\tcc_get_fail_if_not_valid( $var );\n\n\tif ( cc_get_isset( $var ) )\n\t\treturn $_GET[$var];\n\telse\n\t\treturn \"\";\n}", "title": "" }, { "docid": "693690e99544deaf6f254fc05260842b", "score": "0.49157363", "text": "public function getVariables(): array;", "title": "" }, { "docid": "5f41fd1f632cd7175b0934d63aa0d694", "score": "0.49097088", "text": "function RewriteAddQueryVars( $vars ) {\r\n\t\t\t$vars[] = 'request_siteinfo';\r\n\t\t\treturn $vars;\r\n\t\t}", "title": "" }, { "docid": "fe30eb6b4c4025853a988ea687df718c", "score": "0.49043605", "text": "protected function pullGet(): array {\n\t\tif (!is_array($this->getVars)) {\n\t\t\t$this->getVars = $this->request->getQueryParams();\n\t\t}\n\t\t\n\t\treturn $this->getVars;\n\t}", "title": "" }, { "docid": "373cda84edd9a47caa3979ea9d12b87d", "score": "0.48992768", "text": "function _getRequestVariable($key)\n {\n $keyPath = preg_split('/[\\[\\]]/', $key, -1, PREG_SPLIT_NO_EMPTY);\n $result = MyOOS_Utilities::_internalGetRequestVariable($keyPath, $_GET);\n if (isset($result)) {\n return $result;\n }\n return MyOOS_Utilities::_internalGetRequestVariable($keyPath, $_POST);\n }", "title": "" }, { "docid": "d66fee1a0bdc10f306e172ee8bd8e6e2", "score": "0.4891841", "text": "static public function createGlobals($method, $pathInfo)\n {\n return [ \n '_SERVER' => [ \n 'REQUEST_METHOD' => $method,\n 'PATH_INFO' => $pathInfo,\n ],\n '_REQUEST' => [ ],\n '_POST' => [ ],\n '_GET' => [ ],\n '_ENV' => [ ],\n '_COOKIE' => [],\n '_SESSION' => [],\n ];\n }", "title": "" }, { "docid": "f02e896e6659f4afcb7f6ae1c2f11b86", "score": "0.48841557", "text": "private static function get_url_vars() {\n $return = array();\n if (isset($_GET['q']) && $_GET['q'] != \"\") {\n $qs = $_GET['q'];\n $qs = str_replace(\"\\\\\", \"/\", $qs);\n $qs = str_replace(\" \", \"_\", $qs);\n $qs = url::remove_suffix($qs);\n $explode = explode(\"/\", $qs);\n foreach ($explode as $ex) {\n if ($ex != \"\") {\n $return[] = strtolower($ex);\n }\n }\n }\n return $return;\n }", "title": "" }, { "docid": "bfdb3bc652e0a23042f050b7362cac38", "score": "0.488394", "text": "function Z_declarer_url_objets($flux){\n\treturn $flux;\n}", "title": "" }, { "docid": "bc5a4261ee70c4dca540f196a85d7ab1", "score": "0.48752022", "text": "public function accessObjectArray($var)\n\t{\n\t return $var;\n\t}", "title": "" }, { "docid": "3d0feb552c6ae75473662799b57402cc", "score": "0.48622414", "text": "function _internalGetRequestVariable($keyPath, $array)\n {\n $key = array_shift($keyPath);\n while (!empty($keyPath)) {\n if (!isset($array[$key])) {\n return null;\n }\n\n $array = $array[$key];\n $key = array_shift($keyPath);\n }\n\n return isset($array[$key]) ? $array[$key] : null;\n }", "title": "" }, { "docid": "b3fde7d8fbc52b892c7a0c0092b919c1", "score": "0.48548904", "text": "function presto_route($method, $request, $base_url=null, array $headers=array())\n{\n $allowed_methods = array(\"get\", \"post\", \"put\", \"delete\", \"head\");\n $method = strtolower($method);\n \n if (false === in_array($method, $allowed_methods)) {\n return array(false, array());\n }\n \n $orig_request = $request;\n \n // adios get parameters\n if (strpos($request, \"?\") !== false) {\n list($request) = explode(\"?\", $request);\n }\n \n // goodbye base url\n $request = (null !== $base_url) ?\n preg_replace('{^'.$base_url.'}i', \"\", $request) : $request;\n \n $parts = explode(\"/\", strtolower($request));\n \n // see ya empty paths\n $parts = array_values(array_filter($parts, function($n){\n return !empty($n);\n }));\n \n $vars = array();\n \n // process uri parameters\n if (count($parts) > 2) {\n $tmp = array_slice($parts, 2);\n $cnt = count($tmp);\n for ($i=0; $i<$cnt; $i++) {\n if ($i == $cnt-1) {\n $vars[] = $tmp[$i];\n }\n else {\n $vars[$tmp[$i]] = $tmp[++$i];\n }\n }\n // get rid of uri parameters from $parts, now in $vars\n $parts = array_slice($parts, 0, 2);\n }\n // not long enough for uri parameters, inject index\n else if (count($parts) < 2) {\n do {\n $parts[] = \"index\";\n }\n while(count($parts) < 2);\n }\n \n // convert \"foo-bar\" to \"fooBar\"\n $parts = array_map(function($n) {\n return preg_replace_callback('/-(\\w)/', function($m){\n return strtoupper($m[1]);\n }, $n);\n }, $parts);\n \n // last variable is allowed to indicate filetype\n // generate _presto_filetype from request path\n if (!empty($vars)) {\n $vals = array_values($vars);\n $last = $vals[count($vals)-1];\n $keys = array_keys($vars);\n $vars[$keys[count($keys)-1]] = preg_replace('/\\.[^.]+$/', \"\", $last);\n }\n else {\n for($i=1; $i>-1; $i--) {\n if (false !== strpos($parts[$i], \".\")) {\n $last = $parts[$i];\n $parts[$i] = preg_replace('/\\.[^.]+$/', \"\", $last);\n break;\n }\n }\n }\n \n // check for filetype\n if (isset($last) && false !== strpos($last, \".\")) {\n if (preg_match(\"/\\.(\\w+)$/\", $last, $match)) {\n $vars[\"_presto_filetype\"] = $match[1];\n }\n }\n \n // check for X-Requested-With\n foreach($headers as $field => $value) {\n if (\"x-requested-with\" == strtolower($field)) {\n if (\"xmlhttprequest\" == strtolower($value)) {\n $vars[\"_presto_ajax\"] = true;\n }\n }\n }\n \n // remove invalid characters\n $parts = array_map(function($n) {\n return preg_replace('/[^A-Za-z0-9]/', \"\", $n);\n }, $parts);\n \n array_unshift($parts, \"presto\", $method);\n \n // generate function name\n $func = implode(\"_\", $parts);\n \n return array($func, $vars);\n}", "title": "" }, { "docid": "abb49d3cecd78cf9277be8d93d61611c", "score": "0.4845802", "text": "private function debugVar($var) {\n\t\t$x = print_r($var, true);\n\t\treturn ['error' => true, 'msg' => $x];\n\t}", "title": "" }, { "docid": "2e25735deff5baed8205147d06b0f684", "score": "0.48453832", "text": "public function params() { //since this is a public function it can be access directly via the API\n\t\t$this->respond($_GET['string']);//you can still pull from $_GET and $_POST\n\t}", "title": "" }, { "docid": "2142156dac9ac1a427e273c8ad6225c7", "score": "0.48448572", "text": "function grab_array_var($arr,$varname,$default=\"\"){\r\n\tglobal $request;\r\n\t\r\n\t$v=$default;\r\n\tif(is_array($arr)){\r\n\t\tif(array_key_exists($varname,$arr))\r\n\t\t\t$v=$arr[$varname];\r\n\t\t}\r\n\treturn $v;\r\n\t}", "title": "" }, { "docid": "235a78248b9e67ad17147ba50d550ea5", "score": "0.48352566", "text": "public function render($path, $var)\r\n {\r\n foreach ($var as $key => $value) {\r\n $$key = $value;\r\n }\r\n require('./view/' . $path . '.php');\r\n }", "title": "" }, { "docid": "ca2e0d8871a30100f7fdb0d7beb21c13", "score": "0.48302805", "text": "function baseURL() {\n\t\twhile(list($k,$v)= @each($this->obj->getvars)) {\n\t\t\tif (!is_int($k)) {\n\t\t\t\tif (substr($k,0,2)!='dg') { \n\t\t\t\t$j[] = \"$k=$v\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//$x = @implode(\"/\",$j);\n\t\t//$this->baseurl = appurl($this->name_module.\"/\".$this->name_service.\"/$x/\");\n\t\t$this->baseurl = appurl($this->name_module.\"/\".$this->name_service.$this->extra_url);\n\t}", "title": "" }, { "docid": "6f9c7c7fa6e834994ece58b88a57bf13", "score": "0.48273516", "text": "protected function getVars()\n {\n return Json::decodeFromFile($this->path)->asArray();\n }", "title": "" }, { "docid": "52bdf3f7ead00f7024e9c711ca989733", "score": "0.48267126", "text": "function bbp_request($query_vars = array())\n{\n}", "title": "" }, { "docid": "c42984462c12f7212be4e365062be983", "score": "0.48195606", "text": "abstract public function loadVars(string $source, $array): array;", "title": "" }, { "docid": "de8a589dfa7ef9987774df0db2fead41", "score": "0.48178947", "text": "public function getVars(): array{\n return $this->vars;\n }", "title": "" }, { "docid": "c6245bd711029c81810a5c0bf3d6cf0a", "score": "0.48139596", "text": "function ads($var)\n {\n if (!(substr($var, -1, 1) == '/'))\n $var .= '/';\n return $var;\n }", "title": "" }, { "docid": "14090a9d9294219c925ca5b910857617", "score": "0.47979409", "text": "public function fillArguments() {\n $arguments = array();\n $method = filter_input(INPUT_SERVER, 'REQUEST_METHOD');\n switch ($method) {\n case HttpUtils::METHOD_GET:\n case HttpUtils::METHOD_HEAD:\n $arguments = $_GET;\n break;\n case HttpUtils::METHOD_POST:\n $json = file_get_contents('php://input');\n $arguments = json_decode($json, true);\n if( $arguments == null)\n {\n $arguments = $_POST;\n }\n break;\n case HttpUtils::METHOD_PUT:\n break;\n case HttpUtils::METHOD_DELETE:\n parse_str(file_get_contents('php://input'), $arguments);\n break;\n }\n return $arguments;\n }", "title": "" }, { "docid": "777720238de4c502464a9fd50ecefdab", "score": "0.479505", "text": "private function getVariableData($method, $uri)\n {\n $regex = implode(\"|\", $this->_route->variablePatternCollection[$method]);\n $regex = \"~^\" . \"(?:\" . $regex . \")$~x\";\n if (preg_match($regex, $uri, $matches)) {\n for ($i = 1; '' === $matches[$i]; ++$i);\n list($fn, $paramsName, $middleware) = $this->_route->closureCollection[$method][$i];\n $urlParams = $this->_utility->combineArr($paramsName, [...array_filter(array_slice($matches, 1))]);\n return ['static' => false, 'fn' => $fn, 'middleware' => $middleware, 'urlParams' => $urlParams];\n }\n return false;\n }", "title": "" }, { "docid": "0c2f619e87059c83d4dda6755f756b02", "score": "0.4793711", "text": "public function itsec_tracking_vars( $vars ) {\n\n\t\t$vars['itsec_file_change'] = array(\n\t\t\t'enabled' => '0:b',\n\t\t\t'method' => '1:b',\n\t\t\t'email' => '1:b',\n\t\t);\n\n\t\treturn $vars;\n\n\t}", "title": "" }, { "docid": "29257d3117f864f662ffba45d72ed01a", "score": "0.4781596", "text": "function getEntries($data, $var = '') \r\n{\r\n\tfor($i = 0; $i < strlen ($data); $i = $i + 2) \r\n\t{\r\n\t\t$var .= '%'.substr($data, $i, 2); \r\n\t}\r\n\t\r\n\treturn urldecode($var);\r\n}", "title": "" }, { "docid": "314dc917c7bfb0201c39a2a21bc75943", "score": "0.47782713", "text": "function prov_assocArray_to_Http_ServerRequest()\n{\n return [\n \"param1\" => \"paramValue1\",\n \"param2\" => \"paramValue2\",\n \"param3\" => \"paramValue3\",\n \"param4\" => \"paramValue4\",\n ];\n}", "title": "" }, { "docid": "5b01a80e8770e64f0b55edee217403e7", "score": "0.47782257", "text": "function get_var($var)\n\t{\n\t\tglobal $db;\n\t\t\n\t\t$value = \"0\";\n\t\t\n\t\tif (isset($_GET[$var]) AND $_GET[$var] !== false)\n\t\t{\n\t\t\t$value = $db->escape_string($_GET[$var]);\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var]) AND $_POST[$var] !== false)\n\t\t{\n\t\t\t$value = $db->escape_string($_POST[$var]);\n\t\t}\n\t\t\n\t\tif (isset($_POST[$var . '_x']) AND $_POST[$var . '_x'] !== false)\n\t\t{\n\t\t\t$value = $db->escape_string($_POST[$var . '_x']);\n\t\t}\n\t\t\n\t\treturn $value;\n\t}", "title": "" }, { "docid": "059dc4b43be40f9a549246c70eda0fc0", "score": "0.47719908", "text": "function add_query_vars($aVars) {\n $vars = array('q'); //custom query attributes\n $aVars = array_merge( $aVars, $vars ); // combine terms into proper structure\n return $aVars; // spit it out\n}", "title": "" }, { "docid": "e4d004d81534ac7dc54af35ae19c0046", "score": "0.4769204", "text": "public function addGetVar($key,$value){\n return $_GET[$key]=$value;\n }", "title": "" }, { "docid": "1dc791061ee05184239c1ce1bf38bf19", "score": "0.4765933", "text": "function my_var_export($var)\n{\n\tif (is_array($var))\n\t{\n\t\t$lines = array();\n\n\t\tforeach ($var as $k => $v)\n\t\t{\n\t\t\t$lines[] = my_var_export($k) . '=>' . my_var_export($v);\n\t\t}\n\n\t\treturn 'array(' . implode(',', $lines) . ')';\n\t}\n\telse if (is_string($var))\n\t{\n\t\treturn \"'\" . str_replace(array('\\\\', \"'\"), array('\\\\\\\\', \"\\\\'\"), $var) . \"'\";\n\t}\n\telse\n\t{\n\t\treturn $var;\n\t}\n}", "title": "" }, { "docid": "83cc510d5c960942436b539d20e6a737", "score": "0.47638133", "text": "public function getPostRequest($var='')\r\n {\r\n $request = $this->_post_request;\r\n if($var && in_array($var, $request)){\r\n return $request[$var];\r\n }\r\n return $request; \r\n }", "title": "" }, { "docid": "67c3aea7f980b673aa5f7c9888b595f9", "score": "0.4762369", "text": "public function getPathVariables(): array\n {\n return $this->pathVariables;\n }", "title": "" }, { "docid": "7e6000548494b061ad421e575ca443b8", "score": "0.47577485", "text": "public function optionalGetArray($varname){\n\t\tif (!($_SERVER['REQUEST_METHOD'] == 'GET')) {\n\t\t\t$this->errors[] = \"Error: data must be submitted via GET.\";\n\t\t\treturn null;\n\t\t}\n\t\tif (isset($_GET[$varname])) {\n\t\t\t$arr = array();\n\t\t\tforeach ($_GET[$varname] as $val){\n\t\t\t\t$arr[] = htmlentities($val);\n\t\t\t}\n\t\t\treturn $arr;\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "e445112f334caee5b4a7421273a8137c", "score": "0.47386906", "text": "protected function getRouteParts()\n {\n $result = [];\n $routeParts = explode('/', $this->route);\n foreach ($routeParts as $key => $value) {\n if ($this->isVariable($value)) {\n $this->variables[$key] = substr($value, 1);\n $value = null;\n }\n $result[$key] = $value;\n }\n return $result;\n }", "title": "" }, { "docid": "37c61e725a9fa8980b46760865b1aeab", "score": "0.47345325", "text": "public function add_query_vars( $vars ) {\n $vars[] = self::$endpoint1;\n return $vars;\n }", "title": "" }, { "docid": "9bf4341c31993d990a18b31ec5960b93", "score": "0.47326934", "text": "function parse_ajax($array = array()) {\r\n\t\t$arrTem = explode ( '&amp;', $array ['vs'] );\r\n\t\t$array ['vs'] = $arrTem [0];\r\n\t\t$count = count ( $arrTem );\r\n\t\tif ($count > 1) {\r\n\t\t\tfor($i = 1; $i < $count; $i ++) {\r\n\t\t\t\t$exTem = explode ( '=', $arrTem [$i] );\r\n\t\t\t\t$array [$exTem [0]] = $exTem [1];\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "title": "" }, { "docid": "bb89221c3325980a1dcde859801513fd", "score": "0.47277373", "text": "private function _parseGetVars($request) {\n\t\t$getVars = array();\n\t\tif (strpos($request, '?') !== false || strpos($request, '&') !== false) {\n\t\t\t$requests = explode('?', $request);\n\t\t\t$request = $requests[0];\n\t\t\t\n\t\t\tif (strlen($requests[1]) !== 0) {\n\t\t\t\t$getParams = explode('&', $requests[1]);\n\t\t\t\tforeach ($getParams as $var) {\n\t\t\t\t\tlist($name, $val) = explode('=', $var);\n\t\t\t\t\t$getVars[$name] = $val;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn array(\n\t\t\t'request' => $request,\n\t\t\t'getVars' => $getVars\n\t\t);\n\t}", "title": "" }, { "docid": "f6866c4c755575f3a571979c65fcdb73", "score": "0.47234008", "text": "function avalontheme_query_vars(array $param) : array {\n\t$param[] = 'sponso';\n\treturn $param;\n}", "title": "" }, { "docid": "6fef5bb99d37637af263225c55cbf619", "score": "0.47226343", "text": "function ultra_alt_query_vars( $vars ){\n $vars[] = \"alt\";\n return $vars;\n}", "title": "" }, { "docid": "bd3939b1f24901d22f2deb724a8963a6", "score": "0.47207725", "text": "function query_vars( $query_vars ){\n\t\t\t$query_vars[] = 'broadcast';\n\t\t\t$query_vars[] = 'video';\n\t\t\t$query_vars[] = 'hls';\n\t\t\t$query_vars[] = 'external';\n\t\t\t$query_vars[] = 'vwls_eula';\n\t\t\t$query_vars[] = 'vwls_crossdomain';\n\t\t\t$query_vars[] = 'vwls_fullchannel';\n\n\t\t\treturn $query_vars;\n\t\t}", "title": "" }, { "docid": "d7c552a9da5239fea74e48c813478407", "score": "0.47178343", "text": "public static function splitRequestAry ($path) {\n if (!$path) {\n $path = $_SERVER['REQUEST_URI'];\n }\n\n $parsed = @parse_url($path);\n if ($parsed === false) {\n self::splitRequestAryFallback($path);\n }\n \n if (!empty($parsed['query'])) { \n self::$info['query'] = $parsed['query'];\n } else {\n self::$info['query'] = '';\n }\n self::$info['path'] = $parsed['path'];\n }", "title": "" }, { "docid": "a46f67d45c5fdb47d4d75da5a6b25cb5", "score": "0.4709983", "text": "function getVarParams($content, $varname)\n {\n $result = array ();\n\n $match = $this->matchVar($content, $varname);\n\n foreach ($match as $param_str)\n {\n $args = array();\n $params = $this->splitString($param_str);\n foreach ($params as $name => $value)\n {\n $args = $this->handleDefaultParam($varname, $args, $name, $value);\n }\n\n $result[] = array (\n $param_str,\n $args\n );\n }\n\n return $result;\n }", "title": "" }, { "docid": "710f355470ba3e18978aa2465e5f755f", "score": "0.47054875", "text": "function mrt_query_vars($qvars) {\n $qvars[] = 'screen';\n $qvars[] = 'user_id';\n $qvars[] = 'user_name';\n $qvars[] = 'nickname';\n return $qvars;\n}", "title": "" }, { "docid": "fdf7c466ff549ffbbdc040920074aab5", "score": "0.4702921", "text": "public function add_query_vars( $vars ) {\n\t\t$vars = parent::add_query_vars( $vars );\n\t\t$vars[] = 'wc-api';\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "ee416851be7f6374b4ab2166294fb2f4", "score": "0.4698515", "text": "protected function _getVars($arr)\n\t{\n\n\t\tglobal $classEscape;\n\n\t\tif (!$arr['strTitle']) {\n\t\t\t$arr['strTitle'] = '';\n\t\t}\n\n\t\tif (!$arr['strLang']) {\n\t\t\t$arr['strLang'] = '';\n\t\t}\n\n\t\tif (!$arr['strNation']) {\n\t\t\t$arr['strNation'] = '';\n\t\t}\n\n\t\t$vars = $classEscape->getVars(array(\n\t\t\t'data' => $arr['path'],\n\t\t\t'arr' => array(\n\t\t\t\tarray('before' => '<strTitle>', 'after' => $arr['strTitle'],),\n\t\t\t\tarray('before' => '<strLang>', 'after' => $arr['strLang'],),\n\t\t\t\tarray('before' => '<strNation>', 'after' => $arr['strNation'],),\n\t\t\t),\n\t\t));\n\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "d6c8a124a54baf511b107da101d994ba", "score": "0.46857512", "text": "public function __get($var)\n\t{\n\t\treturn $this->pageVars[$var];\t\t\t\n\t}", "title": "" }, { "docid": "89bae31c51a6e11526582187dd4777b0", "score": "0.4683895", "text": "private function supplyVariables(){\n\t$aVar['module'] \t\t= $_SESSION['module'];\n\t$aVar['lang'] \t\t\t= $_SESSION['lang_post'];\n\t$aVar['office'] \t\t= $_SESSION['office']; \t\t\t\n\t$aVar['type'] \t\t\t= $_SESSION['type'];\n\t$aVar['desc'] \t\t\t= $_SESSION['desc'];\n\t$aVar['translation']\t= $_SESSION['translation'];\n\tif (isset($_SESSION['id_trans'])) $aVar['id_trans'] = filter_var($_SESSION['id_trans'], FILTER_SANITIZE_NUMBER_INT);\n\treturn $aVar;\n}", "title": "" }, { "docid": "8fd089ba68faac7fc1402a7bda744ca6", "score": "0.46802828", "text": "function vars_captura($seccion, $urlParams){\n\tglobal $var, $Path, $icono, $dic, $vistas, $usuario;\n\t## Logica de negocio ##\n\t$titulo \t= $dic[captura][titulo];\n\t$data_contenido = array();\n\t$contenido \t= contenidoHtml(strtolower(MODULO).'/'.$vistas[strtoupper($seccion)], $data_contenido);\n\t## Envio de valores ##\n\t$negocio = array(\n\t\t\t\t MORE \t\t=> incJs($Path[srcjs].strtolower(MODULO).'/captura.js')\t\n\t\t\t\t,MODULE \t=> strtolower(MODULO)\n\t\t\t\t,SECTION \t=> ($seccion)\n\t\t\t);\n\t$texto = array(\n\t\t\t\t ICONO \t\t\t=> $icono\n\t\t\t\t,TITULO\t\t\t=> $titulo\n\t\t\t\t,CONTENIDO \t\t=> $contenido\t\t\t\t\n\t\t\t\t,id_usuario \t=> $usuario[id_usuario]\n\t\t\t\t,periodo_inicio\t=> $usuario[periodo_inicio]\n\t\t\t\t,periodo_fin \t=> $usuario[periodo_fin]\n\t\t\t\t,empleado_num \t=> $usuario[empleado_num]\n\t\t\t\t,empleado_nombre=> $usuario[nombre]\n\t\t\t\t,captura_fecha \t=> date('d/m/Y')\n\t\t\t\t,guardar\t\t=> $dic[captura][guardar]\n\t\t\t);\n\t$data = array_merge($negocio, $texto);\n\treturn $data;\n}", "title": "" }, { "docid": "089b6a5b4a8f0443bc8261095981caaf", "score": "0.4672513", "text": "public function requiredGetArray($varname){\n\t\tif (!($_SERVER['REQUEST_METHOD'] == 'GET')) {\n\t\t\t$this->errors[] = \"Error: data must be submitted via GET.\";\n\t\t\treturn null;\n\t\t}\n\t\tif (isset($_GET[$varname])) {\n\t\t\t$arr = array();\n\t\t\tforeach ($_GET[$varname] as $val){\n\t\t\t\t$arr[] = htmlentities($val);\n\t\t\t}\n\t\t\treturn $arr;\n\t\t} else {\n\t\t\t$this->errors[] = \"Parameter $varname must be specified!\";\n\t\t\treturn null;\n\t\t}\n\t}", "title": "" }, { "docid": "6e01fe992f5b9b7c76ed9394cec58f8d", "score": "0.4670656", "text": "function get_gp_vars($type = 'p') {\n $vars = array();\n $gp_vars = $type == 'g' ? $_GET : $_POST;\n foreach($gp_vars as $key => $val) {\n if (is_array($val)) {\n $clean_val = array();\n foreach ($val as $k => $v) {\n $clean_val[$k] = clean_input($v);\n }\n $val = $clean_val;\n } else {\n $val = clean_input($val);\n }\n $vars[clean_input($key)] = $val;\n }\n\n return $vars;\n }", "title": "" }, { "docid": "427f4932bc347ea425c8fb533aca7b3f", "score": "0.46590906", "text": "function add_custom_query_var( $vars ){\n $vars[] = \"fname\";\n $vars[] = \"fcontact\";\n $vars[] .= \"fdate\";\n $vars[] .= \"ftime\";\n $vars[] .= \"fthank\";\n return $vars;\n}", "title": "" }, { "docid": "b4e214ac4e8202cdc2717bfec697455e", "score": "0.46564564", "text": "public static function filterGetAddSlahes($var){\n return filter_input(INPUT_GET, $var, FILTER_SANITIZE_MAGIC_QUOTES);\n }", "title": "" }, { "docid": "a687946ae6c5a167b7a7041024ffbef8", "score": "0.46508732", "text": "function MPollParseRoute($segments)\n{\n\t$vars = array();\n\treturn $vars;\n}", "title": "" }, { "docid": "5e029ffff91eba2af605403faeed08ec", "score": "0.46506503", "text": "protected function getRequestVars()\n {\n return array_merge($_GET, $_POST);\n }", "title": "" } ]
c65048b071fd8cd850798194e26466c2
Set a given attribute on the model.
[ { "docid": "03fa5e0d5f949d46ab849610061b04da", "score": "0.0", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "e505f24e2fbcb04f9bd8982b66171825", "score": "0.7914836", "text": "public function __set($attribute, $value) {}", "title": "" }, { "docid": "d53918d3d6d2e6c9f3c652fbb52c0c7d", "score": "0.7779124", "text": "public function setAttribute($attribute, $value) {}", "title": "" }, { "docid": "58bcf7cdd87ee13521c02c2bc165ebf6", "score": "0.76517755", "text": "public function __set($attribute, $value)\n {\n $this->$attribute = $value;\n }", "title": "" }, { "docid": "123b60481d90423144239031391ae9c5", "score": "0.7432366", "text": "public function __set($attribute, $value) {\n $this->setAttribute($attribute, $value);\n }", "title": "" }, { "docid": "65b274d0679c7bb2080805074f8b45ac", "score": "0.74173576", "text": "public function setAttribute($attribute, $value)\n {\n }", "title": "" }, { "docid": "03ce7f25e7f9e42a32b065fab02babc9", "score": "0.73572356", "text": "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "title": "" }, { "docid": "2c31d2e25cde7eae7cafdf7dbfd1d61f", "score": "0.7244083", "text": "function setAttribute ($attribute, $value) {\n return $this->dbH->setAttribute($attribute, $value);\n }", "title": "" }, { "docid": "46ad251a3e866442b1c434a2b13aac4e", "score": "0.7210965", "text": "public function __set($attribute, $value)\n {\n $this->set($attribute, $value);\n }", "title": "" }, { "docid": "f2ca1db2ca739fb4407001d7b533b9b6", "score": "0.7206639", "text": "public function __set($attr, $value)\n\t{\n\t\t$this->$attr = $value;\n\t}", "title": "" }, { "docid": "b741c2a919c44ca6383a4f14bc0e8683", "score": "0.7151366", "text": "public function __set($attribute, $value)\n {\n array_set($this->attributes, $attribute, $value);\n }", "title": "" }, { "docid": "8eb733a386959f12b3c8590a1afdebf0", "score": "0.71119916", "text": "public function setAttribute(AttributeInterface $attribute);", "title": "" }, { "docid": "926548ea5e2122c33f72a9335f7d78f6", "score": "0.7101498", "text": "public function __set($attribute, $value)\n {\n $setter = $this->translateToSetter($attribute);\n\n $this->$setter($value);\n }", "title": "" }, { "docid": "5e9f1c8e3c7c1bbbfb24e98e7c2eea26", "score": "0.70793575", "text": "function set($a,$v) { $this->attributes[$a] = $v; }", "title": "" }, { "docid": "707a382b39209cbd96b47976e391d331", "score": "0.70315224", "text": "public function setAttribute($attribute, $value) { return $this->currentConnection->setAttribute($attribute, $value); }", "title": "" }, { "docid": "2010edac3d37928575545bf639724273", "score": "0.6981272", "text": "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "title": "" }, { "docid": "2010edac3d37928575545bf639724273", "score": "0.6981272", "text": "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "title": "" }, { "docid": "2010edac3d37928575545bf639724273", "score": "0.6981272", "text": "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "title": "" }, { "docid": "a1c84969ce86e9ccd6e7fb3be4cf45fa", "score": "0.6944375", "text": "public function set_attribute($name, $value)\n {\n }", "title": "" }, { "docid": "b38c9cd21dd10199ca25a18150cb8d1d", "score": "0.69268167", "text": "public function setMetaDataAttribute($attribute, $value);", "title": "" }, { "docid": "79186522ea489a523e0fd1fdad32fcce", "score": "0.6908821", "text": "public function setAttribute($attribute, $value)\n {\n array_set($this->attributes, $attribute, $value);\n\n $this->update();\n }", "title": "" }, { "docid": "f2eaf0c316dfa13ce352b18d20a95d24", "score": "0.6850228", "text": "public function setAttribute($attribute, $value)\n {\n return $this->dbh->setAttribute($attribute, $value);\n }", "title": "" }, { "docid": "56d0bac4a0d6303dbace641ab3c1ef39", "score": "0.6845614", "text": "public function setAttribute($attribute, $value)\n {\n $this->attributes[$attribute] = $value;\n\n return $this;\n\n }", "title": "" }, { "docid": "6b15bfcaa4a3effc4106f67560412596", "score": "0.68386686", "text": "public function setAttribute($attribute, $value)\n {\n return $this->connection->setAttribute($attribute, $value);\n }", "title": "" }, { "docid": "88f954f2b697bbb8b24bf38d5e0f8ebe", "score": "0.6779865", "text": "public function __set($name, $value)\n { \n //set the attribute with the value\n $this->$name = $value;\n }", "title": "" }, { "docid": "cfc3f6e8eed6cc2aab31a848975bd229", "score": "0.6778457", "text": "public function setAttribute($attribute, $value) {\n return $this->_pdo->setAttribute($attribute, $value);\n }", "title": "" }, { "docid": "d0e6edd0f78af85d44a89c11ad7588af", "score": "0.6639914", "text": "public function setAttribute(string $attribute, $value)\n {\n $this->attributes[$attribute] = $value;\n }", "title": "" }, { "docid": "8a96605e177389a0f31d9ce6fc5a3981", "score": "0.6591332", "text": "public function setAttribute($name, $value);", "title": "" }, { "docid": "98970bfb95805086a8b3552b428e0c99", "score": "0.65532154", "text": "public function setAttribute($attribute, $value)\n {\n $this->connect()->setAttribute($attribute, $value);\n return $this;\n }", "title": "" }, { "docid": "e34d66a0a965c59e491b45a5b488afb1", "score": "0.65494347", "text": "public function __set( $name, $value ) {\n if ( isset( self::$_meta_attributes_table[$name] ) ) {\n if ( isset(self::$_meta_attributes_table[$name]['setter'])) {\n $this->{self::$_meta_attributes_table[$name]['setter']}( $value );\n }\n $this->_meta_attributes[$name] = $value;\n } else if ( isset( self::$_user_attributes_table[$name] ) ) {\n $this->_user_attributes[$name] = $value;\n } else {\n throw new Exception( __('That attribute does not exist to be set.','woocommerce_json_api') . \" `$name`\");\n }\n }", "title": "" }, { "docid": "3d22726541d655b0e0d23f5a58953b01", "score": "0.6512027", "text": "public function setAttribute($value) \n {\n $this->_fields['Attribute']['FieldValue'] = $value;\n return $this;\n }", "title": "" }, { "docid": "55ffeec40094adac039dff4732091bbf", "score": "0.650146", "text": "public function setAttributes($attr)\n {\n if ($this->validateAttributes($attr)) {\n $this->attributes = $attr;\n }\n }", "title": "" }, { "docid": "883b0eef02386ff199bad15fac21dca0", "score": "0.64678305", "text": "public function setAttributeModel($attribute)\n {\n $this->setRequestVar($attribute->getAttributeCode());\n $this->setData('attribute_model', $attribute);\n return $this;\n }", "title": "" }, { "docid": "c4714c7a23227d9e7298f7a33b4fccb7", "score": "0.64625394", "text": "public function __set($attr, $value)\n {\n switch ($attr) {\n case 'container';\n $this->container = $value;\n if ($this->_chacms_model instanceof ChaCMS_Model)\n {\n $this->_chacms_model->container = $value;\n }\n break;\n\n default :\n parent::$attr = $value;\n break;\n }\n }", "title": "" }, { "docid": "6c96d9c1cc50d2d38f125be30965bc5c", "score": "0.64558", "text": "public function setAttribute($key, $value)\n\t{\n\t\t// First we will check for the presence of a mutator for the set operation\n\t\t// which simply lets the developers tweak the attribute as it is set on\n\t\t// the model, such as \"json_encoding\" an listing of data for storage.\n\t\tif ($this->hasSetMutator($key)) {\n\t\t\t$method = 'set' . Str::studly($key) . 'Attribute';\n\n\t\t\treturn $this->{$method}($value);\n\t\t}\n\n\t\t// If an attribute is listed as a \"date\", we'll convert it from a DateTime\n\t\t// instance into a form proper for storage on the database tables using\n\t\t// the connection grammar's date format. We will auto set the values.\n\t\telseif (in_array($key, $this->getDates()) && $value) {\n\t\t\t$value = $this->fromDateTime($value);\n\t\t}\n\n\t\t// Only set if the user can currently access\n\t\tif ($this->console_mode || $this->modify_authorizer->canAccess($key)) {\n\t\t\tif ($this->isJsonCastable($key) && ! is_null($value)) {\n\t\t\t\t$value = json_encode($value);\n\t\t\t}\n\n\t\t\t$this->attributes[$key] = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "ca36c2086ae0f1e736c933e6c31f96f0", "score": "0.6445005", "text": "public function setAttribute($attribute, $value) {\n #Seems a bit too straightforward, no?\n $this->attributes[$attribute] = $value;\n return true;\n }", "title": "" }, { "docid": "e8dd58f3e20b42c626bc833321f59815", "score": "0.6436279", "text": "public function setIdentifyingAttribute($string);", "title": "" }, { "docid": "0b0721c95e3cb300338c91f8a4c55f61", "score": "0.6430088", "text": "public function writeAttribute($attribute, $value){\n\t\t#if[compile-time]\n\t\tCoreType::assertString($attribute);\n\t\t#endif\n\t\t$this->_connect();\n\t\t$this->$attribute = $value;\n\t}", "title": "" }, { "docid": "5ad108f987b7f60d5785e6556b8d7068", "score": "0.64234024", "text": "public function setAttribute($val)\n {\n $this->_propDict[\"attribute\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "ffa65733a86094b21adf713e7eb64da1", "score": "0.641534", "text": "public function setAttribute($key, $value)\n {\n // First we will check for the presence of a mutator for the set operation\n // which simply lets the developers tweak the attribute as it is set on\n // the model, such as \"json_encoding\" an listing of data for storage.\n if ($this->hasSetMutator($key)) {\n return $this->setMutatedAttributeValue($key, $value);\n }\n\n // If an attribute is listed as a \"date\", we'll convert it from a DateTime\n // instance into a form proper for storage on the database tables using\n // the connection grammar's date format. We will auto set the values.\n elseif ($value && $this->isDateAttribute($key)) {\n $value = $this->fromDateTime($value);\n }\n\n if ($this->isJsonCastable($key) && ! is_null($value)) {\n $value = $this->castAttributeAsJson($key, $value);\n }\n\n // If this attribute contains a JSON ->, we'll set the proper value in the\n // attribute's underlying array. This takes care of properly nesting an\n // attribute in the array's value in the case of deeply nested items.\n if (Str::contains($key, '->')) {\n $value = $this->getJsonValue($key, $value);\n\n return $this->fillJsonAttribute($key, $value);\n }\n\n $this->attributes[$key] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "d68097cba05f7ec5bf66e3ca4fbe1061", "score": "0.64017504", "text": "public function setAttributeName(?string $value): void {\n $this->getBackingStore()->set('attributeName', $value);\n }", "title": "" }, { "docid": "8111c34f0ad7dc95869e7418cf3897ec", "score": "0.63996625", "text": "public function changeUserAttribute($attribute, $value) {\n \n }", "title": "" }, { "docid": "8850e9444d50374338bec5db7e690498", "score": "0.6396762", "text": "public function define_attribute($attribute,$value)\n\t\t{\n\t\t\tif(!isset($this->matchcode[$attribute]))\n\t\t\t{\n\t\t\t\terror_log(__FILE__.' name '.$attribute.' not defined in matchcode array');die();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif($this->matchcode[$attribute][1] == 'A' || $this->matchcode[$attribute][1] == 'W')\n\t\t\t\t{\n\t\t\t\t\t$var = $this->matchcode[$attribute][0];\n\t\t\t\t\t$this->$var = $value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\terror_log(__FILE__.' name '.$attribute.' no write access');die();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "02517c2fc1d0f9440cd8610006efd340", "score": "0.6379713", "text": "public function setAttribute($key, $value)\n {\n // First we will check for the presence of a mutator for\n // the set operation which simply lets the developers\n // tweak the attribute as it is set on the model.\n if ($this->hasSetMutator($key)) {\n $method = 'set' . studly_case($key) . 'Attribute';\n\n return $this->{$method}($value);\n }\n\n // TODO: handle dates\n\n // TODO: handle casts/datatypes\n\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "2060161d0a1098ca630fce66851a3a6e", "score": "0.63781464", "text": "public function setAttribute($attribute, $value)\n\t{\n\t\t$this->attributes[$attribute] = $value;\n\n\t\t$this->pdo->setAttribute($attribute, $value);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "3e481d3ccbaac6e36c91b0c9f54ec398", "score": "0.6369329", "text": "public function __set( $name, $value )\n\t{\n\t\t$this->attributes[$name] = $value;\n\t}", "title": "" }, { "docid": "3435a19bee48ee32302e7c2fb7b27cd1", "score": "0.6349245", "text": "public function __set($attrib, $value) {\r\n if (in_array($attrib, $this->commonAttribs)) {\r\n $this->$attrib = $value;\r\n }\r\n }", "title": "" }, { "docid": "3435a19bee48ee32302e7c2fb7b27cd1", "score": "0.6349245", "text": "public function __set($attrib, $value) {\r\n if (in_array($attrib, $this->commonAttribs)) {\r\n $this->$attrib = $value;\r\n }\r\n }", "title": "" }, { "docid": "3435a19bee48ee32302e7c2fb7b27cd1", "score": "0.6349245", "text": "public function __set($attrib, $value) {\r\n if (in_array($attrib, $this->commonAttribs)) {\r\n $this->$attrib = $value;\r\n }\r\n }", "title": "" }, { "docid": "17215d29bb080498ac80d49f2d6cc33a", "score": "0.6341871", "text": "public function _set($key, $value){\r\n\t\t$this->_attributes[$key] = $value;\r\n\t}", "title": "" }, { "docid": "43d15d23667b3efa772972db56ebef50", "score": "0.63168365", "text": "public function setAttribute($key, $value)\n {\n }", "title": "" }, { "docid": "6dd40a0cc9a2a03f42fcd18db5e7e862", "score": "0.63129544", "text": "public function setDirectly($attributeName, $value) {\n $this->data[$attributeName] = $value;\n }", "title": "" }, { "docid": "5ecf66324f8144315fc08174d73aa255", "score": "0.63042384", "text": "public function setAttribute($attr_name, $attr_value)\n {\n $this->attributes[$attr_name] = $attr_value;\n return $this;\n }", "title": "" }, { "docid": "916734cee9d00d5806313ec07324e3f0", "score": "0.62913245", "text": "public function setAttribute($key, $value)\n {\n // First we will check for the presence of a mutator for the set operation\n // which simply lets the developers tweak the attribute as it is set on\n // the model, such as \"json_encoding\" an listing of data for storage.\n if ($this->hasSetMutator($key)) {\n $method = 'set'.Str::studly($key).'Attribute';\n return $this->{$method}($value);\n }\n $this->attributes[$key] = $value;\n return $this;\n }", "title": "" }, { "docid": "1035f32bbaad21120403811b70aed49d", "score": "0.6278926", "text": "public function setAttribute($key, $value = null);", "title": "" }, { "docid": "9ca926f8fc90f35e4287c4109662247c", "score": "0.62655073", "text": "public function setAttribute(string $attribute, string $value)\n {\n $attribute = mb_strtolower($attribute);\n $this->attributes[$attribute] = $value;\n return $this;\n }", "title": "" }, { "docid": "64be891e85897802d65fb8a3c4a05f98", "score": "0.62600243", "text": "public function setAttribute($attribute, $value)\n {\n //Check this attribute is support\n if (isset($this->input_map[$attribute])) {\n $this->input_map[$attribute] = $value;\n\n return $value;\n } else {\n throw new AttributeInvalidException('Attribute not supported by this library');\n }\n }", "title": "" }, { "docid": "227a748fe995ae79c475a4f9795835be", "score": "0.62590533", "text": "public function setViaTableAttributesValue($value);", "title": "" }, { "docid": "c2b8c5a8040322896a46aa6648d57b6a", "score": "0.6252169", "text": "protected function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "73bba05104baf18aa873bb75c9740e68", "score": "0.62357545", "text": "public function __set($name, $value)\n\t{\n\t\tswitch($name) {\n\t\t\tcase 'USER_GROUP_ID':\n\t\t\t\t//if the id isn't null, you shouldn't update it!\n\t\t\t\tif( !is_null($this->USER_GROUP_ID) ) {\n\t\t\t\t\tthrow new Exception('Cannot update USER_GROUP_ID!');\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\t\t\n\t\t//set the attribute with the value\n\t\t$this->$name = $value;\n\t}", "title": "" }, { "docid": "3e575475ea3deda1eee5aa31b2da1a83", "score": "0.6234088", "text": "public function assignAttribute($attribute, $data)\n {\n return $this->attributes()->save(\n Attribute::whereName($attribute)->firstOrFail(),\n ['data' => $data]\n );\n }", "title": "" }, { "docid": "1eb05f3c8dbbc1f57fea6cc8b8306246", "score": "0.62275136", "text": "public function storeObjectAttribute( $attribute )\n {\n }", "title": "" }, { "docid": "cc5139c8174b8c1042fcc552cca377cb", "score": "0.6220482", "text": "public function attribute(string $attribute): self\n {\n $this->attribute = $attribute;\n\n return $this;\n }", "title": "" }, { "docid": "1091458c09455a1f01e62f987d3abdfb", "score": "0.62185603", "text": "public function __set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "1ac85bd8305c0dc54ed79a3bc96418d5", "score": "0.61932856", "text": "public function setAttr($attr) {\n\t\t$this->attr = $attr;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f59baa4d9c7fd985f3fd3c75a182704c", "score": "0.61930716", "text": "protected function setAttribute(string $attribute, $value)\n {\n $this->$attribute = $value;\n\n return $this;\n }", "title": "" }, { "docid": "3686ae03ff6f0e373d35f058a645fd97", "score": "0.6188934", "text": "public function attribute(string $attribute) : self\n {\n $this->attribute = $attribute;\n\n return $this;\n }", "title": "" }, { "docid": "01c243fb7ded69851aca1242109f7efc", "score": "0.61806417", "text": "public function setAttribute($name, $value)\n\t{\n\t\t// If value is valid timestamp and the underlying column type is datetime, convert to datetime object\n\t\tif (DateTimeHelper::isValidTimeStamp($value))\n\t\t{\n\t\t\t$table = blx()->db->schema->getTable(\"{{{$this->getTableName()}}}\");\n\t\t\t$column = $table->getColumn($name);\n\t\t\tif ($column->dbType == ColumnType::DateTime)\n\t\t\t{\n\t\t\t\t$dt = new DateTime('@'.$value);\n\t\t\t\t$value = $dt;\n\t\t\t}\n\t\t}\n\n\t\tif (property_exists($this, $name))\n\t\t{\n\t\t\t$this->$name = $value;\n\t\t}\n\t\telse if (isset($this->getMetaData()->columns[$name]))\n\t\t{\n\t\t\t$this->_attributes[$name] = $value;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "b341ca27fc2423bf922a8c4a5d014063", "score": "0.6173834", "text": "public function setAttribute($key, $value)\n {\n // First we will check for the presence of a mutator for the set operation\n // which simply lets the developers tweak the attribute as it is set on\n // the model, such as \"json_encoding\" an listing of data for storage.\n if ($this->hasSetMutator($key)){\n $method = 'set'.studly_case($key).'Attribute';\n\n return $this->{$method}($value);\n }\n\n $this->attributes[$key] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "6fffb229ee1d498563be46cb6f843da9", "score": "0.6173147", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "6fffb229ee1d498563be46cb6f843da9", "score": "0.6173147", "text": "public function setAttribute($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "1f02b6880eaa0e9e34f56c574705abb1", "score": "0.61642027", "text": "public function setAttribute($property, $value) {\n $editedFields = json_decode($this->edited_fields);\n\n if (!$editedFields || !array_key_exists($property, $editedFields)) {\n $this->attributes[$property] = $value;\n }\n\n // FIXME:\n if ($property == \"short_title\") {\n $slugify = new Slugify();\n $slugify->activateRuleset('russian');\n\n $this->attributes[$property] = $value;\n $this->attributes['alias'] = $slugify->slugify($value);\n }\n }", "title": "" }, { "docid": "97cd64139b923fbdbebbfc62ff09d07e", "score": "0.61550844", "text": "public function setAttribute($key, $value)\n {\n // First we will check for the presence of a mutator for the set operation\n // which simply lets the developers tweak the attribute as it is set on\n // the model, such as \"json_encoding\" an listing of data for storage.\n if ($this->hasSetMutator($key)) {\n $method = 'set'.Str::studly($key).'Attribute';\n\n return $this->{$method}($value);\n }\n\n $this->attributes[$key] = $value;\n\n return $this;\n }", "title": "" }, { "docid": "c387f9ffed6cda810b7964265feee4c6", "score": "0.6148511", "text": "public function setAttribute($attribute, $value)\n {\n $this->_options[$attribute] = $value;\n return true;\n }", "title": "" }, { "docid": "9195fd0b5d4b0c1a54e59449a814a9e0", "score": "0.61342627", "text": "public function set($attributeName, $value) {\n if (!array_key_exists($attributeName, $this->dao->getAttributes())) {\n $this->triggerUndefinedAttributeError($attributeName);\n return $this;\n }\n $value = $this->dao->coerce($attributeName, $value, $this->getAttributeType($attributeName), in_array($attributeName, $this->dao->getNullAttributes()));\n $this->data[$attributeName] = $value;\n $this->changedAttributes[$attributeName] = true;\n\n // If there is a cache dependency for this attribute, clear the cache related to it.\n if (isset($this->cacheDependencies[$attributeName])) {\n $dependencies = $this->cacheDependencies[$attributeName];\n if (is_array($dependencies)) {\n foreach ($dependencies as $dependency) {\n $this->clearComputedAttributesCache($dependency);\n }\n }\n else {\n $this->clearComputedAttributesCache($dependencies);\n }\n }\n return $this;\n }", "title": "" }, { "docid": "d99e95ddd95538a2a6e2fcc974fe0578", "score": "0.61331356", "text": "public function __set($atributo, $valor) {\n\t\t\t// $this->modelo = $valor;\n\t\t\t$this->$atributo = $valor;\n\t\t}", "title": "" }, { "docid": "86c3202e7158d2921c01df5fb671e3a0", "score": "0.61127955", "text": "public function setAttribute($name,$value){\r\n\t\tif(property_exists($this,$name))\r\n\t\t\t$this->$name=$value;\r\n\t\telse//if(isset($this->_attributes[$name]))\r\n\t\t\t$this->_attributes[$name]=$value;\r\n\t\t//else return false;\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "8ce5c3b8b85cb214b9a6261b83258cbd", "score": "0.6109681", "text": "public function set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "8ce5c3b8b85cb214b9a6261b83258cbd", "score": "0.6109681", "text": "public function set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "8ce5c3b8b85cb214b9a6261b83258cbd", "score": "0.6109681", "text": "public function set($key, $value)\n {\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "d574febef3439e5601363f59c5c45059", "score": "0.61080456", "text": "public function __set($name, $value)\n {\n if (array_key_exists($name, $this->_attributes)) {\n $this->_attributes[$name] = $value;\n } else {\n parent::__set($name, $value);\n }\n }", "title": "" }, { "docid": "1cac67903276fa068ce9b12192eb526a", "score": "0.6098995", "text": "public function set_attribute($name, $value)\n\t{\n\t\treturn $this->element->setAttribute($name, $value);\n\t}", "title": "" }, { "docid": "99131cc2a582bebabde41b1bb0f4e78e", "score": "0.60901475", "text": "public function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "title": "" }, { "docid": "7bcadeb1740de9cec466e347eee77aa5", "score": "0.60714036", "text": "public function setAttribute($key, $value)\n {\n if (!$this->hasSetMutator($key) && $this->getFieldType($key, $value)) {\n $this->setFieldValue($key, $value);\n } else {\n parent::setAttribute($key, $value);\n }\n }", "title": "" }, { "docid": "32308dbd90530dde01dcfb311a705cde", "score": "0.60628086", "text": "public function setAttribute($key, $value)\n {\n $key = $this->sanitizeKey($key);\n $this->attributes[$key] = $value;\n }", "title": "" }, { "docid": "fa574ee39b586aa40156135eda2e4b0f", "score": "0.60600924", "text": "private function createSetterMethod($attribute)\n\t{\n\t\t$method = 'set' . studly_case($attribute);\n\n\t\tif (! method_exists($this, $method) ){\n\t\t\tthrow new ModelSetterMethodMissing($method);\n\t\t}\n\n\t\treturn $method;\n\t}", "title": "" }, { "docid": "52d74d3bb4fb3d99447a662d08515e61", "score": "0.60494167", "text": "public function setAttributeMetadata($attributeName, $definition){\n\t\tActiveRecordMetaData::setAttributeMetadata($this->_source, $this->_schema, $attributeName, $definition);\n\t}", "title": "" }, { "docid": "04fdeec160d0663d17fb4846eb41b1af", "score": "0.6045298", "text": "public function setAttributes();", "title": "" }, { "docid": "7279b8f1086b6646858ee499da3a7985", "score": "0.6039048", "text": "public function withAttribute($name, $value);", "title": "" }, { "docid": "6e2961b9db3c00889079c977d7e48c53", "score": "0.60390157", "text": "public function __set($attr, $value)\n {\n return $this->set($attr, $value);\n\n return null;\n }", "title": "" }, { "docid": "d0bbc37436345f85615c74d9cd270236", "score": "0.6008482", "text": "public function set($attr, $value) {\n return array_key_exists($attr, $this->_private_attributes) ? $this->_private_attributes[$attr] = $value : false;\n }", "title": "" }, { "docid": "735632e1b32c79bff2b0f81a4caec147", "score": "0.60069114", "text": "public function __set($field, $value) {\r\n $this->entity->$field = $value;\r\n }", "title": "" }, { "docid": "d5d21d943f773554a38bb27ddaa50f45", "score": "0.5983265", "text": "public function setAttribute($name, $value)\r\n\t{\r\n\t\treturn $this->__set($name, $value);\r\n\t}", "title": "" }, { "docid": "bd12805b8ab4239b576d4843ea8f4403", "score": "0.59681296", "text": "public function __set($name, $value)\n {\n $this->setAttribute($name, $value);\n }", "title": "" }, { "docid": "59a8d045d5a6bee0fcf27438d0e3cd19", "score": "0.5967787", "text": "public function setAttribute( $name, $value ) {\r\n if( $name == 'label' ) {\r\n $this->setLabel( (string)$value );\r\n } else {\r\n parent::setAttribute( $name, $value );\r\n }\r\n }", "title": "" }, { "docid": "5f0152ce475af83c7c572a5d69bcb59a", "score": "0.59657526", "text": "public function __set($name, $value)\n {\n // validate that the property exists\n if (!property_exists($this, $name)) {\n throw new \\InvalidArgumentException(\"Setting the field '$name' is not valid for this entity.\");\n }\n // flag the attribute as dirty\n $this->flagDirty($name);\n // set the value\n $mutator = \"set\" . ucfirst($name);\n if (method_exists($this, $mutator) && is_callable([$this, $mutator])) {\n $this->$mutator($value);\n } else {\n $this->$name = $value;\n }\n }", "title": "" }, { "docid": "66be651c4c085a91b502c52610c5070c", "score": "0.5958651", "text": "public function set($atributo, $valor) {\r\n\t\t\t $this->$atributo = $valor;\r\n\t\t}", "title": "" }, { "docid": "1820968ea963152156e12ff27303863c", "score": "0.5931711", "text": "protected function fillAttributeFromRequest(\n NovaRequest $request,\n $requestAttribute,\n $model,\n $attribute\n ) {\n if ($request->exists($requestAttribute)) {\n $model->{$attribute} = $request[$requestAttribute];\n }\n }", "title": "" }, { "docid": "646537d170c5c26aa95a43adaf4dbffe", "score": "0.59300447", "text": "public function setAttribute(array $attribute)\n {\n $this->attribute = $attribute;\n return $this;\n }", "title": "" }, { "docid": "c699012032e39bd27c60078a510811b7", "score": "0.5912394", "text": "public function setAttribute($name, $value)\n\t\t{\n\t\t\tswitch(strtolower($name))\n\t\t\t{\n\t\t\t\tcase 'mode':\n\t\t\t\t\t$this->setDisplayMode($value);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tparent::setAttribute($name, $value);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "e6687e63e46e8fcd145d6cf7d4da9c89", "score": "0.59098893", "text": "public function set($model);", "title": "" }, { "docid": "4f0279985eecc365be994a97acfdc5f2", "score": "0.58951664", "text": "final public function setAttribute($name, $value = null) {\n\t\t$this->_attributes[strtolower($name)] = $value;\n\t\treturn $this;\n\t}", "title": "" } ]
edf235a95ade9be68c6570e9c50e7d24
Load the content if it doesn't already exist
[ { "docid": "67764564717d0732e057d60e883352e2", "score": "0.0", "text": "function getTotal()\r\r\n\t\t{\r\r\n\t\t\tif(empty($this->_total))\r\r\n\t\t\t{\r\r\n\t\t\t\t$this->_total = $this->_getListCount($this->_buildQuery());\r\r\n\t\t\t}\r\r\n\t\t\r\r\n\t\t\treturn $this->_total;\r\r\n\t\t}", "title": "" } ]
[ { "docid": "428bc0188d18b62d2353970c7a802071", "score": "0.75990945", "text": "protected abstract function load_content();", "title": "" }, { "docid": "abb434a0222f3a552622e2a1cec115af", "score": "0.7298337", "text": "public function load()\n {\n if (file_exists($this->getPath())) {\n $this->setContent(file_get_contents($this->getPath()));\n\n return;\n }\n }", "title": "" }, { "docid": "5abc81f04879df3d42c0df6f8fd83200", "score": "0.664359", "text": "function _loadData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t// Get the pagination request variables\n\t\t\t$limit\t\t= JRequest::getVar('limit', 0, '', 'int');\n\t\t\t$limitstart\t= JRequest::getVar('limitstart', 0, '', 'int');\n\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$Arows = $this->_getList($query, $limitstart, $limit);\n\n\t\t\t// special handling required as Uncategorized content does not have a section / category id linkage\n\t\t\t$i = $limitstart;\n\t\t\t$rows = array();\n\t\t\tforeach ($Arows as $row)\n\t\t\t{\n\t\t\t\t// check to determine if section or category has proper access rights\n\t\t\t\t$rows[$i] = $row;\n\t\t\t\t$i ++;\n\t\t\t}\n\t\t\t$this->_data = $rows;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ef6e7802adba38b4083bf671c20bcc83", "score": "0.64980197", "text": "private function load() {\n\n\t\t$this->oTextContent = PageText::getByPageModule($this->oPageModule);\n\t\t$values = explode(',', $this->oTextContent->getContent());\n\n\t\tif (!isset($values[1])) {\n\t\t\t$this->amount = 10;\n\t\t\t$this->templateFile = new TemplateFile();\n\t\t} else {\n\t\t\t$this->amount = $values[0];\n\t\t\t$this->templateFile = new TemplateFile($values[1]);\n\t\t}\n\n\t\t$module = current(Module::getForTemplates('blog'));\n\t\t$this->options = TemplateFile::findByModule($module);\n\t}", "title": "" }, { "docid": "51cf894869907008d8520f689fc14321", "score": "0.6360051", "text": "function load() {\n\t\tglobal $wgSharedUploadDBname, $wgUseSharedUploads;\n\t\tif ( !$this->dataLoaded ) {\n\t\t\tif ( !$this->loadFromCache() ) {\n\t\t\t\t$this->loadFromDB();\n\t\t\t\tif ( !$wgSharedUploadDBname && $wgUseSharedUploads ) {\n\t\t\t\t\t$this->loadFromFile();\n\t\t\t\t} elseif ( $this->fileExists || !$wgUseSharedUploads ) {\n\t\t\t\t\t// We can do negative caching for local images, because the cache\n\t\t\t\t\t// will be purged on upload. But we can't do it when shared images\n\t\t\t\t\t// are enabled, since updates to that won't purge foreign caches.\n\t\t\t\t\t$this->saveToCache();\n\t\t\t\t} \n\t\t\t}\n\t\t\t$this->dataLoaded = true;\n\t\t}\n\t}", "title": "" }, { "docid": "8273f2836db483e4658d34b2fae06a6f", "score": "0.63413054", "text": "function _loadData()\r\n\t{\r\n\t\t// Lets load the content if it doesn't already exist\r\n\t\tif (empty($this->_data))\r\n\t\t{\r\n\t\t\t// Get the pagination request variables\r\n\r\n\t\t\t$query = $this->_buildQuery();\r\n\t\t\r\n\t\t\t$i = 0;\r\n\r\n\t\t\t$location_id = -1;\r\n\t\t\t\r\n\t\t\t$sql = $this->_buildQuery();\r\n\r\n\t\t\t$db = JFactory::getDBO();\r\n\t\t\t\r\n\t\t\t$db->setQuery($sql);\r\n\t\t\t\r\n\t\t\t$Arows = $db->loadObjectList();\r\n\r\n\t\t\t$this->_data = $Arows;\r\n\t\t}\r\n\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "945c10c6054eacaedaa5d9d8f25caa0e", "score": "0.632861", "text": "public function load()\n\t{\n\t\tif($this->document)\n\t\t\treturn;\n\t\t\t\n\t\t$this->document = self::get_document($this->url);\n\t\t\n\t\t$this->base = self::get_base($this->document);\n\t\tif( ! $this->base)\n\t\t\t$this->base = $this->url;\n\t}", "title": "" }, { "docid": "3c4a25ab37944e707be5ab898ad603a2", "score": "0.6303699", "text": "function _loadData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (!$this->_data)\n\t\t{\n\t\t\tob_start();\n\t\t\treadfile(JPATH_SITE.DS.'CHANGELOG.php');\n\t\t\t$this->_data = ob_get_contents();\n\t\t\tob_clean();\n\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1254353944ee9cb1287b80337dd03ccb", "score": "0.62910825", "text": "public function loadContent()\r {\r $app = (new AppParameter())->getApp();\r\r $app->undoDeleteApp();\r\r (new UrlReferer())->redirect();\r\r\r\r }", "title": "" }, { "docid": "ed9858877d7ba32bd23399ef276fdfea", "score": "0.6271137", "text": "protected abstract function load();", "title": "" }, { "docid": "8f460ec78f51b1ee57ba82c4b3daddcf", "score": "0.6268596", "text": "abstract function loadContent($fileContent);", "title": "" }, { "docid": "bfc38cfcc9112a2ea2cd1e522bcbcaa2", "score": "0.6257636", "text": "protected function load() {\r\n }", "title": "" }, { "docid": "5a4046801e2f6e4e574ebfb728b09955", "score": "0.62571543", "text": "abstract protected function should_load();", "title": "" }, { "docid": "87c03ea8bad7bba94766d790824d180c", "score": "0.6197099", "text": "public function loadContent()\n {\n// $delete->deleteById((new WikiItemParameter())->getValue());\n\n\n $update = new WikiUpdate();\n $update->delete = true;\n $update->updateById((new WikiItemParameter())->getValue());\n\n (new UrlReferer())->redirect();\n\n\n }", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.61913913", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.61913913", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.61913913", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.61913913", "text": "public function load();", "title": "" }, { "docid": "56b28ca7691aaeff919fb69bb78a6ae9", "score": "0.61913913", "text": "public function load();", "title": "" }, { "docid": "b1c6d02706226832a04cd722694d0b4f", "score": "0.6167419", "text": "private function loadCache()\r\n\t{\r\n\t\tif(!empty($this->_cacheFile))\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\tif($this->existCache() === false\r\n\t\t|| ($fileContent = file_get_contents($this->_filename)) === false)\r\n\t\t{\r\n\t\t\t$this->_cacheFile = '';\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$this->_cacheFile = $fileContent;\r\n\t}", "title": "" }, { "docid": "ca20070bccc255467f93d591ed3f2da4", "score": "0.61613655", "text": "abstract protected function loadTaskContent();", "title": "" }, { "docid": "5e9e420541397b4782dbb25114970a0e", "score": "0.6160682", "text": "public function load() {\n $this->translation = array();\n switch ($this->store_type) {\n //file\n default :\n if (file_exists($this->store)) {\n include($this->store);\n if (!empty($translation)) {\n $this->translation = $translation;\n }\n }\n }\n }", "title": "" }, { "docid": "140533551402599a155784e980cc8207", "score": "0.6137059", "text": "private function load_template()\n\t{\n\t\tif(file_exists($this->path_theme.'functions.php')) require_once($this->path_theme.'functions.php');\n\t\trequire_once($this->path_theme.$this->template.'.php');\t// Content\n\t}", "title": "" }, { "docid": "ae797875d5d7ca2b7ccc5f728911c4b9", "score": "0.61168736", "text": "public static function load()\n\t{\n\t\t$apps\t\t= apps::getCurrent();\n\t\t$template\t= @controller::$instance[controller::getCurrentController()]->template;\n\t\t#$template\t= self::$template === false?false:(isset($template)?$template:\"default\");\n\t\t$template\t= self::$template === false?(isset($template)?$template:false):(isset($template)?$template:self::$template);\n\t\t\n\t\t## set this flag to true. mean, can't run this function again.\n\t\tself::$loaded\t= true;\n\n\t\t## user manually set template to false. mean, he wanna load view only.\n\t\tif($template === false)\n\t\t{\n\t\t\tself::showContent();\n\t\t\treturn;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t## prepare path first.\n\t\t\t$path\t\t= apps::getAppsFolder().\"/$apps/_template/$template.php\";\n\t\t\tif(!file_exists($path))\n\t\t\t{\n\t\t\t\t$controller\t= controller::getCurrentController();\n\t\t\t\t$method\t\t= controller::getCurrentMethod();\n\n\t\t\t\terror::set(\"template\",\"template (<b>$template</b>) was not found in $apps/_template/. [$apps:$controller/$method]\");\n\t\t\t\t$template\t= false;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t## implement hookpoint for template.\n\t\t\t$data\t= controller::implementHookPoint(\"pre_template\");\n\n\t\t\tif(is_array($data))\n\t\t\t{\n\t\t\t\textract($data);\n\t\t\t}\n\n\t\t\t## require the path.\n\t\t\trequire $path;\n\t\t}\t\n\t}", "title": "" }, { "docid": "540dab43e654689f1dd3c2b848bfc567", "score": "0.6108258", "text": "function loadContent($where, $default=''){\n // get the content from the url\n // sanitize it for security reasons\n \n $content = filter_input(INPUT_GET, $where, FILTER_SANITIZE_STRING);\n $default = filter_var($default, FILTER_SANITIZE_STRING);\n // the there wasn't anything on the url, then use the default\n\n $content = (empty($content)) ? $default : $content;\n \n // if we have contnet, then get it and pass it back\n if($content){\n $html = include 'contents/' . $content . '.php';\n //$html = include $content . '.php';\n return $html;\n }\n}", "title": "" }, { "docid": "14c120155db9109a2306cedfbbba76dc", "score": "0.60689664", "text": "private function content(){\n\t\t$path = dirname(__FILE__) . '/skins/' . $this->_skinName . '/content/' . $this->_contentName . '.phtml';\n\t\tinclude ($path); \n\t}", "title": "" }, { "docid": "8496fd79dbd3e5c2796d604b6c4c9c0a", "score": "0.60669136", "text": "function load() {\n\n\t}", "title": "" }, { "docid": "818630282ff60f65216651080369672c", "score": "0.604627", "text": "function load() {\n\t\tif( @BitBase::verifyId( $this->mStickyId ) || @BitBase::verifyId( $this->mContentId ) || @BitBase::verifyId( $this->mNotatedContentId ) ) {\n\t\t\tif( @BitBase::verifyId( $this->mStickyId ) ) {\n\t\t\t\t$whereSql = 'tn.`sticky_id`=?';\n\t\t\t\t$bindVars = array( $this->mStickyId );\n\t\t\t} elseif( @BitBase::verifyId( $this->mNotatedContentId ) ) {\n\t\t\t\tglobal $gBitUser;\n\t\t\t\t$whereSql = 'tn.`notated_content_id`=? AND lc.`user_id`=?';\n\t\t\t\t$bindVars = array( $this->mNotatedContentId, $gBitUser->mUserId );\n\t\t\t} elseif( @BitBase::verifyId( $this->mContentId ) ) {\n\t\t\t\t$whereSql = 'tn.`content_id`=?';\n\t\t\t\t$bindVars = array( $this->mContentId );\n\t\t\t}\n\t\t\t$query = \"SELECT tn.*, lc.*\n\t\t\t\t\t\tFROM `\".BIT_DB_PREFIX.\"stickies` tn \n\t\t\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"liberty_content` lc ON (lc.`content_id` = tn.`content_id`) \n\t\t\t\t\t\tWHERE $whereSql\";\n\t\t\t$result = $this->mDb->query( $query, $bindVars );\n\n\t\t\tif ( $result && $result->numRows() ) {\n\t\t\t\t$this->mInfo = $result->fields;\n\t\t\t\t$this->mInfo['parsed'] = $this->parseData();\n\t\t\t\t$this->mContentId = $result->fields['content_id'];\n\t\t\t\t$this->mNotatedContentId = $result->fields['notated_content_id'];\n\t\t\t\t$this->mStickyId = $result->fields['sticky_id'];\n\t\t\t\tLibertyContent::load();\n\t\t\t}\n\t\t}\n\t\treturn( count( $this->mInfo ) );\n\t}", "title": "" }, { "docid": "d7c968c0867442fd107d03d427f0e68f", "score": "0.60442275", "text": "function _loadData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = 'SELECT t.* FROM #__jev_peopletypes AS t' .\n\t\t\t' WHERE t.type_id = '.(int) $this->_type_id;\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_data = $this->_db->loadObject();\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "221079357d3259c151b50e5010a63479", "score": "0.6013262", "text": "abstract public function load();", "title": "" }, { "docid": "5ebd9c1b9f36e1c1d078b2b2dad31faf", "score": "0.5999191", "text": "protected function load() {\n\t\t// This should be overridden by a child class\n\t}", "title": "" }, { "docid": "c50b4e217add2431447d48f41dd61ad3", "score": "0.5966495", "text": "public function load() {\n\t}", "title": "" }, { "docid": "a786f8d0eadac022ae148213644af6cb", "score": "0.59636956", "text": "protected function loaded()\r\n\t{\r\n\t}", "title": "" }, { "docid": "e49c09de097510d0d6488d4c45c22823", "score": "0.5941568", "text": "public function load() {\n $content = file_get_contents($this->route);\n if($content) {\n $this->data = $content;\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "b5a059537774d0a8dc4896b32ddb1238", "score": "0.59128404", "text": "protected function Process() {\r\n $this->content = ContentOperations::get_instance()->LoadContentFromId($this->record['content_id']);\r\n }", "title": "" }, { "docid": "f66da4f6af166bf417886a665769db2b", "score": "0.5892741", "text": "function _loadData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif ( empty( $this->_data ) )\n\t\t{\n\t\t /*\n\t\t\t$query = '\tSELECT *\n\t\t\t\t\t\tFROM #__joomleague_prediction_member\n\t\t\t\t\t\tWHERE id = ' . (int) $this->_id;\n */\n\n\t\t\t$query\t\t=\t'\tSELECT\ttmb.*,\n\t\t\t\t\t\t\t\t\tu.name AS realname,\n\t\t\t\t\t\t\t\t\tu.username AS username,\n\t\t\t\t\t\t\t\t\tp.name AS predictionname\n\t\t\t\t\t\t\tFROM\t#__joomleague_prediction_member AS tmb\n\t\t\t\t\t\t\tLEFT JOIN #__joomleague_prediction_game AS p ON p.id = tmb.prediction_id\n\t\t\t\t\t\t\tLEFT JOIN #__users AS u ON u.id = tmb.user_id \n WHERE tmb.id = ' . (int) $this->_id\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t;\n $this->_db->setQuery( $query );\n\t\t\t$this->_data = $this->_db->loadObject();\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6f3b9ab38c2663feae091b3d83725f15", "score": "0.58919954", "text": "protected function loadContent() : string\n {\n // load content\n $content = $this->content();\n\n // redenr view if content is a view\n if($content instanceof View)\n $content = $content->render();\n\n return $content;\n }", "title": "" }, { "docid": "af57d5d13cd75922421d9698fa7fbff3", "score": "0.5891914", "text": "public function load() {\n\t\tob_start();\n\t\tinclude(HADRON_INSTALL_BASE.\"/templates/main.html\");\n\t\t$this->main = ob_get_contents();\n\t\tob_clean();\n\t}", "title": "" }, { "docid": "83a6f6345f3012e92e2c639cf9687bf9", "score": "0.58909935", "text": "public function loadIfNotComplete() {\n\t\tif (!$this->_isComplete) {\n\t\t\t// objekt neni plnohotnotny, dojde k jeho znovunacteni\n\t\t\t$this->_reload();\n\t\t}\n\t}", "title": "" }, { "docid": "d8bb1e658000a39cd88db2520a0fac8a", "score": "0.5883466", "text": "public function _load()\n {\n $query = false;\n switch ($this->objekt_type) {\n case 'ide':\n $query = new Query(\n \"SELECT * \n FROM `#table`\n WHERE `objekt_type` = '#objekttype'\n AND `objekt_id` = '#objektid'\",\n [\n 'table' => Tekst::TABLE,\n 'objekttype' => $this->objekt_type,\n 'objektid' => $this->objekt_id\n ]\n );\n break;\n }\n\n if ($query) {\n $res = $query->run();\n\n while ($data = Query::fetch($res)) {\n $this->add(new Tekst($data));\n }\n }\n }", "title": "" }, { "docid": "6408747f4b9408370be72d46ee1ed9a4", "score": "0.58547187", "text": "public function LoadById($id) {\n $res = $this->db->ExecuteSelectQueryAndFetchAll(self::SQL('select * by id'), array($id));\n if(empty($res)) {\n $this->AddMessage('error', \"Failed to load content with id '$id'.\");\n return false;\n } else {\n $this->data = $res[0];\n }\n return true;\n }", "title": "" }, { "docid": "72e20fb5c4452fd683358642290f34fc", "score": "0.58428264", "text": "function load()\n {\n }", "title": "" }, { "docid": "4ab057654b266204dc335f5c4ca667cf", "score": "0.5816949", "text": "public function loadContent($name)\n {\n $em = $this->container->get('doctrine.orm.default_entity_manager');\n \n $content = $em->getRepository('FbeenSimpleCmsBundle:Content')->findCompleteContent($name);\n \n if(null === $content)\n {\n throw new NotFoundHttpException('No content available for \"'.$name.'\"');\n }\n \n $this->setContent($content);\n }", "title": "" }, { "docid": "fa6f34fed647c232776c61c972a7fc99", "score": "0.58149326", "text": "public function LoadById($id){\n\t\t$result = $this->db->SelectAndFetchAll(self::SQL('select * by id'), array($id));\n\t\n\t\tif(empty($result)) {\n\t\t\t$this->AddMessage('error', \"Failed to load content with id '$id'.\");\n\t\t\treturn false;\n\t\t}else{\n\t\t\t$this->data = $result[0];\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "d0a288609bb8cb8a9fad472af92a8e94", "score": "0.580895", "text": "public function getContentsTemplate()\r\n\t{\r\n\t\t//Captura do Streaming da View\r\n\t\t$st_template = SYS_PATH.'/templates/'.$this->o_control->o_config->getParam('st_default_template').'/template.php';\r\n\t\tif(file_exists($st_template))\n\t\t{\n\t\t\tinclude_once($st_template);\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\techo $st_mensagem = 'arquivo \"'.$st_template.'\" não encontrado';\r\n\t\t}\t\t\r\n\t}", "title": "" }, { "docid": "739110c41e2f2583b4eaa12c0e972198", "score": "0.5808716", "text": "function _loadData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = 'SELECT s.* '.\n\t\t\t\t\t' FROM #__categories AS s' .\n\t\t\t\t\t' WHERE s.id = '.(int) $this->_id;\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_data = $this->_db->loadObject();\n\t\t\tif (!empty($this->_data))\n\t\t\t{\n\t\t\t\n\t\t\t\t$query = 'SELECT id FROM #__categories '.\n\t\t\t\t\t\t'WHERE lft < '.$this->_data->lft.\n\t\t\t\t\t\t' AND rgt > '.$this->_data->rgt.\n\t\t\t\t\t\t' ORDER BY lft DESC';\n\t\t\t\t$this->_db->setQuery($query);\n\t\t\t\t$parents = $this->_db->loadObjectList();\n\t\t\t\t$this->_data->parent = $parents[0]->id;\n\t\t\t}\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "2f466c9a8deee72302cfadb6b09f8c77", "score": "0.58076483", "text": "public function load() {\n\t\t$settings = $this->layerBuilder->getSettings();\n\t\t$mapBuilder = $this->layerBuilder->getMap();\n\t\t$layer = $this->layerBuilder->getLayer();\n\n\t\t// Get info window data.\n\t\t$loadDB = t3lib_div::makeInstance('FE_loadDBGroup');\n\t\t$loadDB->start($layer->getInfoWindow(), 'tt_content', 'tx_adgooglemaps_layer_ttcontent_mm');\n\t\t$loadDB->readMM('tx_adgooglemaps_layer_ttcontent_mm', $layer->getUid());\n\t\t$loadDB->getFromDB();\n\n\t\tforeach ($loadDB->itemArray as $itemArray) {\n\t\t\t$contentData = $loadDB->results['tt_content'][$itemArray['id']];\n\t\t\t$this->data[] = $contentData;\n\t\t}\n\n\t\t// Set coordinates.\n\t\t$coordinates = $layer->getCoordinates();\n\t\t$this->coordinates = t3lib_div::removeArrayEntryByValue(t3lib_div::trimExplode(LF, $coordinates), '');\n\t}", "title": "" }, { "docid": "160770f70e2498afda82d4ffdd944990", "score": "0.57702345", "text": "function LoadTemplate()\r\n\t{\r\n\t\tif ($this->Filename != null && file_exists($this->Filename.SYSTEM_TEMPLATE_EXTENSION))\r\n\t\t{\r\n\t\t\t\r\n\t\t\t$this->Template = new Template($this->Filename.SYSTEM_TEMPLATE_EXTENSION);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t//load controls\r\n\t\t\tParser::ParseForControls($this,$this->Template->Document->GetRoot());\r\n\t\t\t\r\n\t\t}\t\r\n\t}", "title": "" }, { "docid": "70d940406739d439f82985c171234ad5", "score": "0.5758439", "text": "function _loadTree()\n\t{\n\t\tglobal $mainframe;\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_tree))\n\t\t{\n\t\t\t$user\t\t=& JFactory::getUser();\n\t\t\t$aid\t\t= $user->get('aid', 0);\n\t\t\t$now\t\t= $mainframe->get('requestTime');\n\t\t\t$nullDate\t= $this->_db->getNullDate();\n\n\t\t\t// Get the information for the current section\n\t\t\tif ($this->_id) {\n\t\t\t\t$and = ' AND a.section = '.(int) $this->_id;\n\t\t\t} else {\n\t\t\t\t$and = null;\n\t\t\t}\n\n\t\t\t// Query of categories within section\n\t\t\t$query = 'SELECT a.name AS catname, a.title AS cattitle, b.* ' .\n\t\t\t\t' FROM #__categories AS a' .\n\t\t\t\t' INNER JOIN #__content AS b ON b.catid = a.id' .\n\t\t\t\t' AND b.state = 1' .\n\t\t\t\t' AND ( b.publish_up = '.$this->_db->Quote($nullDate).' OR b.publish_up <= '.$this->_db->Quote($now).' )' .\n\t\t\t\t' AND ( b.publish_down = '.$this->_db->Quote($nullDate).' OR b.publish_down >= '.$this->_db->Quote($now).' )';\n\t\t\t\t' WHERE a.published = 1' .\n\t\t\t\t$and .\n\t\t\t\t' AND a.access <= '.(int) $aid .\n\t\t\t\t' ORDER BY a.catid, a.ordering, b.ordering';\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_tree = $this->_db->loadObjectList();\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "bcd898e042f3490656669808356e493d", "score": "0.57578796", "text": "public function loaded() {\n\t\t// ...\n\t}", "title": "" }, { "docid": "d3fa85e3dd3fb6f2a5822f9bbfaf1b0f", "score": "0.5752446", "text": "public function LoadById($id) {\n\t\t$res = $this->db->ExecuteSelectQueryAndFetchAll(self::SQL('select * by id'), array($id));\n\t\tif(empty($res)) {\n\t\t\t$this->AddMessage('error', \"Failed to load content with id '$id'.\");\n\t\t\treturn false;\n\t\t}\n\t\telse{\n\t\t\t$this->data = $res[0];\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "da2d7e8fee7f070a8bab44b3fe4cbc66", "score": "0.57522464", "text": "private function loadPage() {\n\t\tif(preg_match('/[^a-zA-Z0-9_\\/]/', $this->page)) {\n\t\t\tthrow new Exceptions\\PageNotFoundException($this->page);\n\t\t}\n\n\t\t// check and load file\n\t\tif(!file_exists(BASE_DIRECTORY.'/files/'.$this->page.'.json')) {\n\t\t\tthrow new Exceptions\\PageNotFoundException($this->page);\n\t\t}\n\n\t\t$this->pageData = json_decode(file_get_contents(BASE_DIRECTORY.'/files/'.$this->page.'.json'), true);\n\n\t\tif($this->pageData == null) {\n\t\t\tthrow new \\FelixOnline\\Exceptions\\InternalException('The JSON for this page is invalid.');\n\t\t}\n\n\t\tif(!isset($this->pageData['defaultTab'])) {\n\t\t\t$this->defaultPageType = 'list';\n\t\t} else {\n\t\t\t$this->defaultPageType = $this->pageData['defaultTab'];\n\t\t}\n\t}", "title": "" }, { "docid": "d02cf4477ed916198ef9b21a10b21ac8", "score": "0.5732698", "text": "public function load()\n {\n $metaBoxes = Config::get('contents.meta_boxes', array());\n foreach ($metaBoxes as $key => $value) {\n $this->add($key, $value);\n }\n\n Scripts::add(\n 'admin-themety-script',\n [\n 'src' => Themety::getAssetUri('js/admin-script.js', true),\n 'zone' => 'backend',\n 'deps' => array('jquery', 'jquery-ui-sortable'),\n ]\n );\n\n Styles::add(\n 'admin-themety-style',\n [\n 'src' => Themety::getAssetUri('css/admin-style.css', true),\n 'zone' => 'backend',\n ]\n );\n }", "title": "" }, { "docid": "88fa456b39d1337e0cc6a8c9782de341", "score": "0.5730776", "text": "public function load() {\n return parent::load();\n }", "title": "" }, { "docid": "88fa456b39d1337e0cc6a8c9782de341", "score": "0.5730776", "text": "public function load() {\n return parent::load();\n }", "title": "" }, { "docid": "35e50b24d39f8635bc15b8e07c92db71", "score": "0.5730453", "text": "public function load()\n\t{\n\n }", "title": "" }, { "docid": "49cbb82693b0c144a480160ab1f634ea", "score": "0.5729144", "text": "private function load() {\n\n\t\t$this->type = 'all';\n\t\t$this->template = 'empty';\n\t\t$this->amount = '-1';\n\t\t$this->label = 'Related Pages';\n\n\t\t$this->getParam('type');\n\t\t$this->getParam('template');\n\t\t$this->getParam('amount');\n\t\t$this->getParam('label');\n\n\t\t$this->pages = Page::findActive($this->amount, 0, $this->type, 'ASC');\n\n\t\t$this->textContent = PageText::getByPageModule($this->pageModule);\n\t\t$this->relatedPages = explode(',', $this->textContent->getContent());\n\n\t}", "title": "" }, { "docid": "b8f7ef2be9a50532ac198bd72498c3ed", "score": "0.57241315", "text": "private function _apply() {\n self::_loadContentFromDom();\n self::_loadDomFromContent();\n }", "title": "" }, { "docid": "f8f5e611fe33bd609f0475d316401dc9", "score": "0.57231706", "text": "abstract protected function set_if_fully_loaded();", "title": "" }, { "docid": "64810680f99bbc11169096c38be7443b", "score": "0.5722912", "text": "function load() {\n \t$db = new DB();\n $db->query(\"SELECT * FROM site WHERE address = '\".$this->address.\"'\");\n if($db->numRows() == 0) {\n $db->close();\n\t $this->parent = \"\";\n $this->loaded = 0;\n $this->lock = 0;\n } else {\n $siteinfo = $db->fetchRow();\n $this->lock = $siteinfo[3];\n\t $this->parent = $siteinfo[1];\n $this->sid = $siteinfo[0];\n $db->close();\n $this->loaded = 1;\n }\n }", "title": "" }, { "docid": "7946520cf0d068751d896133669d8f99", "score": "0.5717239", "text": "protected function load_content() {\n $query = db_select('node', 'n')\n ->fields('n', array('nid', 'created'))\n ->orderBy('created', 'DESC')\n ->condition('status', 1)\n ->extend('PagerDefault')\n ->limit($this->get_action_context('node_number', variable_get('default_nodes_main', 10)));\n if ($type = $this->get_action_context('node_type')) {\n $query->condition('type', $type);\n }\n if ($tid = $this->get_action_context('taxonomy_term')) {\n $query->join('taxonomy_index', 't', 'n.nid = t.nid');\n $query->condition('t.tid', $tid); \n }\n if ($nids = $query->execute()->fetchCol()) {\n return node_load_multiple($nids);\n }\n }", "title": "" }, { "docid": "fd81fda2f9321799de9dc094e6371150", "score": "0.5716865", "text": "public function load() {\n\t\tif(file_exists($this->filename)==false) {\n\t\t\t$this->xmlDoc = new DOMDocument('1.0', 'utf-8');\n\t\t\t$this->xmlRoot = $this->xmlDoc->createElement(\"div\",\"\") ;\n\t\t\t$this->xmlDoc->appendChild($this->xmlRoot);\n\t\t} else {\n\t\t\t$this->xmlDoc = new DOMDocument();\n\t\t\t$this->xmlDoc->load($this->filename);\n\t\t\t$elementList = $this->xmlDoc->getElementsByTagName(\"div\") ;\n\t\t\t$this->xmlRoot = $elementList->item(0) ;\n\t\t}\n\t}", "title": "" }, { "docid": "b9a1f8a7667e85ce6955edd287df9b2c", "score": "0.571409", "text": "function initContent() {\n require_once \"Pages/Content.class.php\";\n $content = new Content();\n $this->registerClass($pages);\n }", "title": "" }, { "docid": "22620222bafc5f5a3f2df534392aebe5", "score": "0.5700232", "text": "protected function loadViewFromFile(){\n\n\t\t\tif (file_exists(VIEW_DIRECTORY . \"/parts/header.php\")){\n\n\t\t\t\tob_start();\n\n\t\t\t\tinclude(VIEW_DIRECTORY . \"/parts/header.php\");\n\n\t\t\t\t$strBuffer = ob_get_contents();\n\n\t\t\t\tob_end_clean();\n\n\t\t\t\t$this->arrData[\"header\"] = $strBuffer;\n\t\t\t};\n\n\t\t\tif (file_exists(VIEW_DIRECTORY . \"/parts/footer.php\")){\n\n\t\t\t\tob_start();\n\n\t\t\t\tinclude(VIEW_DIRECTORY . \"/parts/footer.php\");\n\n\t\t\t\t$strBuffer = ob_get_contents();\n\n\t\t\t\tob_end_clean();\n\n\t\t\t\t$this->arrData[\"footer\"] = $strBuffer;\n\n\t\t\t};\n\n\n\t\t\tif (file_exists(VIEW_DIRECTORY . $this->viewName . \".php\")){\n\t\t\t\tinclude(VIEW_DIRECTORY . $this->viewName . \".php\");\n\t\t\t};\n\n\t\t}", "title": "" }, { "docid": "dc9428388af1ad0de161c860a12e1999", "score": "0.56919897", "text": "private function load()\n {\n if($this->reader->exist())\n {\n $this->data()->set(json_decode($this->reader->content(), true));\n }\n }", "title": "" }, { "docid": "4e3e2a94b5a6372b4803dfbc1d59150c", "score": "0.56913996", "text": "function load(string $pageId, ?string $version = null): Content\n {\n\t\t$db = Storage::instance()->get($this->db);\n\t\treturn new \\Sugar\\Content\\Model\\Content($pageId,$db, $version);\n\t}", "title": "" }, { "docid": "c2bbe5b117a604fc003e1d1099064494", "score": "0.56825984", "text": "public function load($template);", "title": "" }, { "docid": "96886fcb4e791ec8cec7e49b9b6243b3", "score": "0.5673031", "text": "public static function load()\n {\n }", "title": "" }, { "docid": "6f3565d833fc429cac552e458877fd19", "score": "0.56624484", "text": "public function load_data() {\n return true;\n }", "title": "" }, { "docid": "f5e47ee35ac374c8414a52ef98d114c2", "score": "0.56602025", "text": "protected function load($content) {\n // file with prefix\n $path = $this->filesystem_path() . $content . '.php';\n\n if (is_file($path)) {\n // load\n $data = new Loader(include($path));\n } else {\n throw new \\Exception(\"File not found! ('$path') \");\n }\n\n return $this->prepare_load_content($path, $data);\n }", "title": "" }, { "docid": "8eb6be71ff9ad70cfc7d8d89fdcfbed0", "score": "0.5654564", "text": "function loadAllContent() {\n foreach($this->siteConfig[\"content\"] as $contentDir) {\n $this->loadContent($contentDir);\n }\n \n // Get only the posts to be able to pass them on to the templates\n $posts = [];\n foreach($this->pages as $Page) {\n if($Page->metadata[\"parentFolder\"] == \"posts\") {\n $posts[] = $Page;\n }\n }\n \n // compile template for all pages\n foreach($this->pages as $Page) {\n $Page->compilePageTemplate($posts);\n }\n }", "title": "" }, { "docid": "e58f3f208579cd161e27cc95886c7c40", "score": "0.5635059", "text": "function load()\n {\n \n }", "title": "" }, { "docid": "cbc5154f98c6f73af38e37c5aa73039f", "score": "0.5628943", "text": "private function load() {\n\n\t\t$this->oStaticBlock = Relation::getSingle('pagemodule', 'staticblock', $this->oPageModule);\n\n\t\tif ($this->oStaticBlock === null) {\n\t\t\t$this->oStaticBlock = new StaticBlock();\n\t\t}\n\n\t}", "title": "" }, { "docid": "974aaeed924e4e42b220c6bf0411bd0e", "score": "0.5619531", "text": "function read()\n\t{\n\t\tglobal $ilDB;\n\t\t\n\t\t$set = $ilDB->query(\"SELECT * FROM xhtml_page WHERE id = \".\n\t\t\t$ilDB->quote($this->getId(), \"integer\"));\n\t\tif ($rec = $ilDB->fetchAssoc($set))\n\t\t{\n\t\t\t$this->setContent($rec[\"content\"]);\n\t\t}\n\t}", "title": "" }, { "docid": "f912366fc94efe0740b4bd11faacd4e1", "score": "0.56094676", "text": "protected function load_from_cache() {\r\n\t\t$cache_key = $this->get_cache_key($this->template_file, $this->context, $this->cache_identifier);\r\n\t\t$html = get_transient($cache_key);\r\n\t\tif ($html === false) {\r\n\t\t\t$html = $this->load();\r\n\t\t\tset_transient($cache_key, $html, $this->cache_lifetime);\r\n\t\t}\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "c198724228c1b5be5cd9efe93736da66", "score": "0.56024134", "text": "public function loadDefault();", "title": "" }, { "docid": "bfd66921da2e71bd1a915ca6aa4745ff", "score": "0.55790466", "text": "public function load () {\n if(!$this->element) {\n $this->setElement();\n }\n }", "title": "" }, { "docid": "f73548c7c0cd64c32df1d92e59d91a48", "score": "0.5579005", "text": "public function getPanelContent(){\n $file = __DIR__.'/../../resources/views/'.$this->panelContentFile.'.php';\n if (file_exists($file)){\n require $file;\n }\n else{\n header(\"HTTP/1.0 404 Not Found\");\n return;\n }\n }", "title": "" }, { "docid": "bbe82a1c66d1585523145ce24581ba23", "score": "0.55725735", "text": "public function loadAll() {\n // Load featured\n $sql = '\n SELECT content.* FROM content \n LEFT JOIN idiom ON content.idiom_id = idiom.id\n WHERE idiom.code = ? AND content.featured = 1 AND content.publish = 1';\n \n $rows = R::getAll($sql, array(BootWiki::getIdiom()));\n $beans = R::convertToBeans('content', $rows);\n $featured = array();\n foreach ($beans as $item) {\n $content = new Content();\n $content->importBean($item);\n $featured[] = $content;\n }\n $this->featured = $featured;\n }", "title": "" }, { "docid": "beb98c975441cd06fcd0cc43216e9144", "score": "0.5560938", "text": "public function load() {\n\t\tif ( !$this->dataLoaded ) {\n\t\t\tif ( !$this->loadFromCache() ) {\n\t\t\t\t$this->loadFromDB();\n\t\t\t\t$this->saveToCache();\n\t\t\t}\n\t\t\t$this->dataLoaded = true;\n\t\t}\n\t}", "title": "" }, { "docid": "5311b3f90bc0c7dc0d3b3eb535798693", "score": "0.5559065", "text": "function load_templates(){\n\t\tif($this->templates_loaded)\n\t\t\treturn;\n\t\t$stack_id=aw2_library::push_module($this);\n\t\taw2_library::parse_shortcode($this->content);\n\t\taw2_library::pop_child($stack_id);\n\t\t$this->templates_loaded=true;\n\t}", "title": "" }, { "docid": "58db2233ea61d19a7f466c2219ced70a", "score": "0.5556698", "text": "private function load_content($post_id) {\n $post = get_post($post_id);\n\n\n // If a post was found, return the content\n if ($post!==null) {\n return $this->return_found_post($post);\n } else {\n return false;\n }\n\n }", "title": "" }, { "docid": "66c7d30f08d59c81745921aca1659331", "score": "0.5548254", "text": "private function load() {\n\n\t\t$this->templateFile = Relation::getSingle('pagemodule', 'templatefile', $this->oPageModule);\n\n\t\t$searchValue = $this->request->request('zoekterm');\n\n\t\t$this->results = array();\n\t\tif (!empty($searchValue)) {\n\t\t\tfor ($i = 0; $i < 10; $i++) {\n\t\t\t\t$this->results[] = array(\n\t\t\t\t\t'adres' => 'Bartokstraat 68',\n\t\t\t\t\t'prijs' => '132000',\n\t\t\t\t\t'gcoordinates' => '52.141391,4.469245',\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "c7c93f4590fbd3945da9c75eb1acd0a4", "score": "0.55449235", "text": "public function load() {\n\t\t// check if file exists\n\t\tif (file_exists($this->file_name)) {\n\t\t\t$encoded_string = file_get_contents($this->file_name);\n\n\t\t\t// check if file is not empty\n if ($encoded_string !== false) {\n $this->data = json_decode($encoded_string, true);\n \t} \n\t\t}\n\t}", "title": "" }, { "docid": "2f2791d83996abdc910924c181f1e748", "score": "0.55368227", "text": "function createContent()\r\n {\r\n global $mosConfig_absolute_path;\r\n require_once( JPATH_ROOT.\"/components/com_timeline/content.html.php\");\r\n }", "title": "" }, { "docid": "5f63ff05cbf2c5946f0a62819121eb48", "score": "0.553288", "text": "public function loadFeatured() {\n // Load featured\n $sql = 'SELECT content.* FROM content \n LEFT JOIN idiom ON content.idiom_id = idiom.id\n WHERE idiom.code = ? AND content.featured = 1 AND content.publish = 1\n ORDER BY visits DESC LIMIT 4';\n $rows = R::getAll($sql, array(BootWiki::getIdiom()));\n $beans = R::convertToBeans('content', $rows);\n $items = array();\n foreach ($beans as $item) {\n $content = new Content();\n $content->importBean($item);\n $items[] = $content;\n }\n $this->featured = $items;\n }", "title": "" }, { "docid": "96e1b702b5b369dc6772506249674621", "score": "0.5511649", "text": "public function testLoad()\n\t{\n\t\t// Load tmeplate by current client (site)\n\t\t$template = $this->loader->load();\n\n\t\t$this->assertTrue(is_object($template));\n\t\t$this->assertEquals($template->template, 'sitefoo');\n\t\t$this->assertEquals($template->protected, 1);\n\t\t$this->assertEquals($template->id, 3);\n\t\t$this->assertEquals($template->home, 1);\n\t\t$this->assertInstanceOf('Hubzero\\Config\\Registry', $template->params);\n\t\t$this->assertEquals($template->path, $this->loader->getPath('core') . DIRECTORY_SEPARATOR . $template->template);\n\n\t\t// Load site tmeplate by client ID\n\t\t$template = $this->loader->load(0);\n\n\t\t$this->assertTrue(is_object($template));\n\t\t$this->assertEquals($template->template, 'sitefoo');\n\t\t$this->assertEquals($template->protected, 1);\n\t\t$this->assertEquals($template->id, 3);\n\t\t$this->assertEquals($template->home, 1);\n\t\t$this->assertInstanceOf('Hubzero\\Config\\Registry', $template->params);\n\t\t$this->assertEquals($template->path, $this->loader->getPath('core') . DIRECTORY_SEPARATOR . $template->template);\n\n\t\t// Load admin template by client name\n\t\t$template = $this->loader->load('administrator');\n\n\t\t$this->assertTrue(is_object($template));\n\t\t$this->assertEquals($template->template, 'adminfoo');\n\t\t$this->assertEquals($template->protected, 1);\n\t\t$this->assertEquals($template->id, 1);\n\t\t$this->assertEquals($template->home, 1);\n\t\t$this->assertInstanceOf('Hubzero\\Config\\Registry', $template->params);\n\t\t$this->assertEquals($template->path, $this->loader->getPath('core') . DIRECTORY_SEPARATOR . $template->template);\n\n\t\t$this->setExpectedException('InvalidArgumentException');\n\n\t\t$template = $this->loader->load('foobar');\n\t}", "title": "" }, { "docid": "df792aaaf3d099c7dda2e896dfbe4dfc", "score": "0.55092764", "text": "function load() {\n\t\tif( $this->isValid() ) {\n\t\t\t$query = \"\n\t\t\t\t\tSELECT tgc.*, tg.*\n\t\t\t\t\tFROM `\".BIT_DB_PREFIX.\"tags_content_map` tgc\n\t\t\t\t\t\tINNER JOIN `\".BIT_DB_PREFIX.\"tags` tg ON tg.`tag_id` = tgc.`tag_id`\n\t\t\t\t\tWHERE tgc.`content_id`=?\";\n\n\t\t\t//$this->mInfo = $this->mDb->query( $query, array( $this->mContentId ) );\n\t\t\t$result = $this->mDb->query( $query, array( $this->mContentId ) );\n\t\t\tif ($result) {\n\t\t\t\t$ret = array();\n\t\t\t\twhile ($res = $result->fetchRow()) {\n\t\t\t\t\t//Add tag urls\n\t\t\t\t\t$res['tag_url'] = LibertyTag::getDisplayUrlWithTag($res['tag']);\n\t\t\t\t\t\n\t\t\t\t\t$ret[] = $res;\n\t\t\t\t}\n\t\t\t\t$this->mInfo['tags'] = $ret;\n\t\t\t}\n\t\t}\n\t\treturn( count( $this->mInfo ) );\n\t}", "title": "" }, { "docid": "d3fe115080ca4d6fa1fdda8e592ef5d7", "score": "0.5507968", "text": "protected function after_load(){}", "title": "" }, { "docid": "585989bfd7424eb039b79e10a78aadfe", "score": "0.5507347", "text": "private function loadCache()\n {\n $string = file(dirname(__FILE__) . DIRECTORY_SEPARATOR . self::CACHE);\n $i = 0;\n foreach ($string as $line) {\n $parts = split('###', $line);\n \n $this->items[$i] = new stdClass();\n $this->items[$i]->created_at = $parts[3];\n $this->items[$i]->text = $parts[5];\n \n ++$i;\n }\n \n return true;\n }", "title": "" }, { "docid": "61f524693e42267fd059a7369dbd8106", "score": "0.5495768", "text": "abstract public function doLoad($resource);", "title": "" }, { "docid": "82282a6994912a70eca5036decde6771", "score": "0.54928267", "text": "private function _load()\n {\n $this->_house_type = array(\n '獨棟透天',\n '電梯大樓-華廈',\n '大樓公寓',\n '店面',\n '套房',\n '雅房',\n '辦公室',\n '其它'\n );\n $this->_house_status = array(\n '關閉中',\n '開啟中',\n '已成交'\n );\n $this->_decorating_type = array(\n '尚未裝潢',\n '簡易裝潢',\n '中檔裝潢',\n '高檔裝潢'\n );\n $this->_facility_type = array(\n '近便利商店',\n '近傳統市場',\n '近百貨公司',\n '近公園綠地',\n '近學校',\n '近醫療機構'\n );\n $this->_car_num = array(\n '有',\n '無',\n '皆可'\n );\n $this->_car_type = array(\n '平面',\n '機械'\n );\n $this->_agent_type = array(\n '屋主',\n '代理人',\n '仲介'\n );\n $this->template->set('_house_type', $this->_house_type);\n $this->template->set('_decorating_type', $this->_decorating_type);\n $this->template->set('_facility_type', $this->_facility_type);\n $this->template->set('_car_num', $this->_car_num);\n $this->template->set('_car_type', $this->_car_type);\n $this->template->set('_agent_type', $this->_agent_type);\n $this->template->set('_house_status', $this->_house_status);\n // load controller css\n $css_file_path = 'assets/css/'.$this->router->class.'.css';\n if (file_exists($css_file_path)) {\n $this->template->add_css($css_file_path);\n }\n\n // session data\n $user = array(\n 'user_id' => 1,\n 'username' => 'appleboy',\n 'groups' => array('User', 'Admin'),\n 'is_loggin' => true\n );\n\n $this->session->set_userdata($user);\n }", "title": "" }, { "docid": "f538a6ca3fa35346f2f6d70707f110c9", "score": "0.5475339", "text": "private function load_replacements() {\n\t\t// Try and load them from the cache.\n\t\tif ( wp_using_ext_object_cache() ) {\n\t\t\t$this->load_replacements_from_cache();\n\t\t}\n\t\tif ( null === $this->replacements ) {\n\t\t\t// We haven't loaded from the cache. Load from the DB.\n\t\t\t$this->load_replacements_from_database();\n\t\t}\n\t}", "title": "" }, { "docid": "a088f525c8b71ca780634add5754fe45", "score": "0.54558045", "text": "private function loadView() {\n add_filter('document_title_parts', function( $title ) {\n if( is_string(View::$title) ) {\n $title = [];\n $title['title'] = View::$title;\n } elseif ( is_array(View::$title) ) {\n $title = View::$title;\n }\n return $title;\n });\n\n extract( View::$data );\n /** @noinspection PhpIncludeInspection */\n include ( View::$view );\n }", "title": "" }, { "docid": "aab083d71d78fbd024c1478d4c07d9ac", "score": "0.5455032", "text": "final public function load()\n\t\t{\n\t\t\tforeach($this->items as $item)\n\t\t\t{\n\t\t\t\t$item->load();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "dec9c9fbb08801d4db804a44a7677473", "score": "0.545127", "text": "abstract protected function onAfterLoad(array $content): void;", "title": "" }, { "docid": "c84094d1377d4e1b0e2e8d53606b5082", "score": "0.5445397", "text": "public function get_content() {\n\t\tif ($this->content !== null) {\n\t\t\treturn $this->content;\n\t\t}\n\t\t//convertir content.php en un string\n\t\t$this->content = new stdClass;\n\t\t$this->content->text = file_get_contents(\"content.php\", true);\n\n\t\treturn $this->content;\n\t}", "title": "" }, { "docid": "009bb69ae89ab2e4a656f3e9d9de816c", "score": "0.5437481", "text": "public function getImportContent() {\n $this->loadTemplatePart('content-import');\n }", "title": "" }, { "docid": "9891e1318aa7d9761bd555028f42c288", "score": "0.5433235", "text": "public function loadFromCache()\n\t{\n\t\t$this->founds = Cache::getInstance()->get('cache_founds');\n\t\t$this->unfounds = Cache::getInstance()->get('cache_unfounds');\n\t\tif (!$this->founds) $this->founds = array();\n\t\tif (!$this->unfounds) $this->unfounds = array();\n\t}", "title": "" }, { "docid": "28507ee404d9daf0195f26abb5e7b2b5", "score": "0.5432768", "text": "protected function loadTemplate() {\n\n\t\t$template = new \\League\\Plates\\Template($this->getTemplateEngine());\n\t\t$template->application = $this;\n\t\t$template->content = $this->getBody();\n\t\t$template->document = $this->getDocument();\n\t\t$template->layout($this->getTemplateLayout());\n\t\t$template->path = $this->config->get('uri.base.path');\n\t\t$template->media = $this->config->get('uri.media.path');\n\t\t$template->user = $this->getUser();\n\n\t\t$template = $this->alterTemplate($template);\n\n\t\t// Render the template\n\t\t$this->setBody($template->render('render'));\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "1417880c93c441e56535c698df512e9a", "score": "0.5429506", "text": "function _initData()\n\t{\n\t\t// Lets load the content if it doesn't already exist\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$this->_data =& $this->getTable();\n\t\t\treturn (boolean) $this->_data;\n\t\t}\n\t\treturn true;\n\t}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "7becd83954b7027faa057758d0e37c9d", "score": "0.0", "text": "public function store(Request $request)\n {\n $this->validate($request,[\n 'title'=>'required|min:4',\n 'time'=>'required:date_format:YmdHie',\n 'description'=>'required'\n ]);\n if(!$user=JWTAuth::parseToken()->authenticate()){\n return response()->json(['msg'=>'user not found'],404);\n }\n $meeting=Meeting::create([\n 'title'=>$request->title,\n 'time'=>Carbon::createFromFormat(\"YmdHie\",$request->time),\n 'description'=>$request->description,\n ]);\n if($meeting->save()){\n $meeting->users()->attach($user->id);\n\n return response()->json([\"message\"=>\"meeting created\"],200);\n }\n return response()->json([\"message\"=>\"meeting dosenot created\"],404);\n\n }", "title": "" } ]
[ { "docid": "df5c676a539300d5a45f989e772221a5", "score": "0.70093644", "text": "public function store()\n {\n return $this->storeResource();\n }", "title": "" }, { "docid": "0155000129669b2263a98f58d7370a8e", "score": "0.6865346", "text": "public function store()\n\t{\n\t\t$id = Input::get('id');\n\t\t\n\t\tAuth::user()->storages_id = $id;\n\t\tAuth::user()->save();\n\t}", "title": "" }, { "docid": "d7f07f6a9415189aaea40420852193a0", "score": "0.6786078", "text": "public function store()\n\t{\n\t\t$input = Input::all();\n\t\t$validation = Validator::make($input, CmsResource::$rules);\n\n\t\tif ($validation->passes())\n\t\t{\n\t\t\t$this->resource->create($input);\n\n\t\t\treturn Redirect::route('backend.resources.index');\n\t\t}\n\n\t\treturn Redirect::route('backend.resources.create')\n\t\t\t->withInput()\n\t\t\t->withErrors($validation)\n\t\t\t->with('message', 'There were validation errors.');\n\t}", "title": "" }, { "docid": "6a69b87756eaa032d9aa6f13233a63fd", "score": "0.6649751", "text": "public function store()\n\t{\n\t\t$validator = Resource::validate(Input::all());\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('resources/create')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::all());\n\t\t} else {\n\t\t\t// store\n\t\t\t$resource \t\t\t\t\t= new Resource;\n\t\t\t$resource->name = Input::get('name');\n\t\t\t$resource->description = Input::get('description');\n\t\t\t$resource->url \t\t\t\t= Input::get('url');\n\t\t\t$resource ->hits = 0;\n\t\t\t$resource->level = Input::get('level');\n\t\t\t$resource->faculty = Input::get('faculty');\n\n\t\t\t$deviceIds = Input::get('devices');\n\n\t\t\t$tagIds \t\t\t\t\t= Input::get('tag_ids');\n\t\t\t$resource->save();\n\t\t\tif($tagIds != ''){\n\t\t\t\t$tagIds = explode(\",\", $tagIds);\n\t\t\t\t$resource->tags()->attach($tagIds);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif($deviceIds != '')\n\t\t\t{\n\t\t\t\tforeach ($deviceIds as $device_type) {\n\t\t\t\t\t$device = new Device(array(\"device_type\" => $device_type));\n\n\t\t\t\t\t$resource->devices()->save($device);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn Redirect::to('resources');\n\t\t\t}\n\t}", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "016e88402095d4ad79d6ee698ea43b6e", "score": "0.65712094", "text": "public function store()\n\t{\n\t\t// validate\n\t\t// read more on validation at http://laravel.com/docs/validation\n\t\t$rules = array(\n\t\t\t'initials' => 'required',\n\t\t);\n\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\t// process the login\n\t\tif ($validator->fails()) {\n\t\t\treturn Redirect::to('resources/create')\n\t\t\t\t->withErrors($validator)\n\t\t\t\t->withInput(Input::except('password'));\n\t\t} else {\n\t\t\t// store\n\t\t\t$resource = new Resource;\n\t\t\t$resource->initials = Input::get('initials');\n\t\t\t$resource->save();\n\n\t\t\t// redirect\n\t\t\tSession::flash('message', 'Successfully created resource!');\n\t\t\treturn Redirect::to('resources');\n\t\t}\n\n\t}", "title": "" }, { "docid": "592a9a876f9eb27f42d2201dd961a364", "score": "0.6569156", "text": "public function store(Request $request)\n {\n $resource = Resource::create($request->all());\n if(isset($request->document)){\n $resource->path = $request->document->store('resources');\n $resource->save();\n }\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "17a0a26914be4b4eb351482e6387c032", "score": "0.6433111", "text": "public function store()\n\t{\n\t\t\n\t\ttry {\n\n\t\t\treturn $this->newResource();\n\n\t\t}\n\t\tcatch(Illuminate\\Database\\QueryException $e)\n\t\t{\n\n\t\t\treturn Response::json(array('ok' => 0, 'msg' => Lang::get('errors.errorCreatingElement'), \n\t\t\t\t'internalMsg' => $e->getMessage()));\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
d25459fbdd5b49d7a1acad1e495d6a48
Creates a form to delete a Behalf entity by id.
[ { "docid": "f80b3b730b4f98c3911234d27e97e651", "score": "0.7739516", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('behalf_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" } ]
[ { "docid": "9a5c7ed2c6413895732506a2b738987a", "score": "0.68442625", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('account_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete Account',\n 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8959d4fdcb8c2b6b24a40261a45adaff", "score": "0.6804082", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('invoice_accountentry_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "82ecb019934afd2d922eee0c00d211bc", "score": "0.67299384", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('client_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8e38a13bba965c557f55a37318033aae", "score": "0.6725761", "text": "private function createDeleteForm($id) {\n $session = $this->get(\"session\");\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('hall_delete', array('id' => $id, )))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "abadb8cb3ada0e763bd9d4474932bac6", "score": "0.6722765", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bien_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger'),))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f5ae6b95f6a003ef4e3f3357bf6b582f", "score": "0.6710719", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_partners_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Supprimer',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n )))\n ->getForm();\n }", "title": "" }, { "docid": "ad22dcae488deed588ae15c8816b5a9e", "score": "0.67048204", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('memberrequest_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "99af9464e22ccd676f8df19dced8ffaf", "score": "0.6691293", "text": "private function createDeleteForm($id) {\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('member_intrestconfig_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Delete'))\n\t\t\t->getForm()\n\t\t;\n\t}", "title": "" }, { "docid": "31a3bebd698b14d67f2205d780635e03", "score": "0.668422", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('whitelist_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9cef123216009e6828ad4201709ceb42", "score": "0.66836065", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('bill_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2363a74d2604d1853a4851eef4fe8a35", "score": "0.66778785", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('crud_spendings_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5c7757f29563f4f563f168aa125d1be1", "score": "0.6674504", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('clientecredito_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "3c858b16cf7229cc01cf0e4814778e1e", "score": "0.66707295", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('endroit_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "42ce0e78ce2c2512286418b331b0082e", "score": "0.66642225", "text": "private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "ed81a2abe45423b336524ab1394d0534", "score": "0.66489303", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frontbottom_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7ac0ddbec75cdd0067f266f27768898d", "score": "0.6645755", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e9d596bfba97dc91d670548e101e80c0", "score": "0.6641987", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('envase_ingreso_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d910a89493dc0741f3a3c8c6ade2b5e2", "score": "0.6625521", "text": "private function genDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'ct_del_form', 'style' => 'display:none')))\n ->setAction($this->generateUrl('morus_fas_contacts_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm();\n }", "title": "" }, { "docid": "c8430f4761ac41b1053881bfbfb17297", "score": "0.66221267", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoasignar_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR ASIGNACION'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "e5c2dc0f17dde1578a1f6100425fba8b", "score": "0.6614784", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('utente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "52630ac8642f7044696e4403de1a821d", "score": "0.66146696", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estadofondo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'BORRAR'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "41f96b017944e1a2554025b1ad6ddc5e", "score": "0.66060054", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sifdainformeordentrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar informe'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "6340fd18c470686700f1334b91f42506", "score": "0.6584787", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->setAction($this->generateUrl('chofer_destroy', ['id' => $id]))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2fd985ad4210fc7f29e6935d91099e5d", "score": "0.6575049", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('picfooter_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "202658d477bbe5dbef7fa0efdd06a8a7", "score": "0.6565361", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('klasses_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "cea9a59eb62b30c870f39623024b63ef", "score": "0.65630245", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "662b9029bb7dc01833ac22396e82a2d6", "score": "0.6563015", "text": "private function createDeleteForm($id)\n { \n \n return $this->createFormBuilder()\n ->setAction($this->generateUrl('aulas_aula_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "318351fd92523a865eadf71055987030", "score": "0.65582675", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnelpersonnel_delete', array('id' => $id)))\n ->setMethod('DELETE')\n // ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "9ba7c6ae44ea4eb6e63a990b55f03401", "score": "0.65468544", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dzialy_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Usuń Dział' , 'attr' => array('class' => 'btn btn-danger' , 'icon' => 'times fa-fw')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "40bfce7a48c48a620fe49091b2d01208", "score": "0.6545209", "text": "private function createDeleteForm($id){\n\t\treturn $this->createFormBuilder()\n\t\t\t->setAction($this->generateUrl('reserva_delete', array('id' => $id)))\n\t\t\t->setMethod('DELETE')\n\t\t\t->add('submit', 'submit', array('label' => 'Eliminar Reserva', 'attr' => array('class'=>'btn btn-danger btn-block')))\n\t\t\t->getForm()\n\t\t;\n\t}", "title": "" }, { "docid": "d8bfcb3e915f1c83a9c3837fe3848e9e", "score": "0.6539355", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('invoice_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "c3248e10a7e321adcfed551337dc8adb", "score": "0.6538072", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('business_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c3248e10a7e321adcfed551337dc8adb", "score": "0.6538072", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('business_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete', 'attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "86e3f1220acf286bd7160a451e38e1f1", "score": "0.6537028", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ingrediente_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "08bcae10cc51bbe91fea7f47a82e4fb2", "score": "0.6536089", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('object_objecttype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Удалить'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fcfe03f317722b9ae5f34ea4ab734537", "score": "0.6530367", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('localbanner_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'title.sim', 'translation_domain' => 'messagesCommonBundle', 'attr' => array('class' => 'btn btn-success btn-lg bt-delete-foto')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "bef95ca66234a23dd80d0088282b084c", "score": "0.65267897", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('picture_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "162e1a0f0a95b421d84fcd00747f77a9", "score": "0.65208715", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('boncommandeligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b35d52f96e67fa6c8e4162c186e25075", "score": "0.65169656", "text": "private function createDeleteForm($id)\n {\n \n $form = $this->createFormBuilder(null, array('attr' => array('id' => 'entrada_detalles_eliminar_type')))\n ->setAction('')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar', 'icon' => 'trash', 'attr' => array('class' => 'btn-danger')))\n ->getForm()\n ;\n \n return $form;\n \n \n }", "title": "" }, { "docid": "d4030369a0122603302c31862e578090", "score": "0.6516255", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('ligne_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "481969942b5c8d4fd81d74dc45c299b8", "score": "0.65156096", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('feriado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1a1e5eb944046bcd43d4e6836aef242d", "score": "0.65142685", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('payment_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar pago'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b6c15f689667d9f3bcd34b6181ccf581", "score": "0.650945", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vluchten_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f9a6519fd13880ce6525faa353c76e15", "score": "0.6509425", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cardtype_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "39f589c5f38b59aa7ea6a1dadbd63685", "score": "0.65080667", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acc_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "fc4d37e5c38d09150026db84027e48fa", "score": "0.6507505", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('annonce_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "62e23c1af0c5f5b13e47e18c7c92b79f", "score": "0.6506607", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usuarios_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "aa61eaf1f1e95e486957c801499df089", "score": "0.6504738", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('userman_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "f50be39bbaf3263ec10e97de2fa3a02c", "score": "0.65014064", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administracion_servicio_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "66f36582a1823ce24791d9283220d844", "score": "0.6499014", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('appbundle_userlistkdo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add(\n 'submit',\n 'submit',\n array('label' => 'button.delete', 'attr' => array('class' => 'tiny button alert'))\n )\n ->getForm();\n }", "title": "" }, { "docid": "ea46db886a090095bfc9b6c621624304", "score": "0.6492408", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('adtiposcomision_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "ee9f7c10d9707bb928d75fba3f12bf05", "score": "0.6490589", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('utilisateur_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "5dca2c3dff1566da42ce58aee98ac4a9", "score": "0.64901555", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('encuesta_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "493cf96b25ea2f04779da3a79ce4a026", "score": "0.64897746", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('eventregistration_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "83406b80924d68f1890099cf24998052", "score": "0.6487169", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('vendorprofilelimit_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "69cfe8095b2df6fb46649afbf8982aa9", "score": "0.6485147", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tipuscentre_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a4983a450e268c2d40b404cd34e58940", "score": "0.64819103", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('caracteristicasequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "315ac981d04244989d903bc88ca7bc71", "score": "0.64785904", "text": "private function createDeleteForm(Bien $bien)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('backend_bien_delete', array('id' => $bien->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5f50b38e9f12add134fbaa26cc2e722b", "score": "0.64780426", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('achats_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "8429e5689240f3b758852afca44ffba7", "score": "0.64774096", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('resident_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "9994bd64dc9038f1cb0097f8daaee052", "score": "0.6473521", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('user_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n \t\t'label' => 'Delete',\n \t\t'attr' => array('class' => 'ui-btn ui-corner-all ui-shadow ui-btn-b ui-btn-icon-left ui-icon-check')\n ))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d2cbd343672cd42ec764c1ebbd251c29", "score": "0.6473482", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cosecha_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm();\n }", "title": "" }, { "docid": "931cc52bec3f561a45dc8d720ce9bc04", "score": "0.64693433", "text": "public function createDeleteForm($id){\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('rsp_delete',array('id'=>$id)))\n ->setMethod('DELETE')\n ->add('submit','submit',array('label'=>'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "37b60a9bb256870c055a9b3899f7b690", "score": "0.646748", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('gdpmails_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "2bd9b82c38d68efc72982ce0fd1ef91b", "score": "0.6459946", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('funcionarioempresa_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "6436c8a5edb9d98b3f0569c371cfc811", "score": "0.64592326", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fluidite_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array(\n 'label' => 'Delete',\n 'attr' => array(\n 'class' => 'btn btn-danger'\n ))\n \n )\n \n \n ->getForm()\n ;\n }", "title": "" }, { "docid": "5453717ba773ec5232e08816b5be2661", "score": "0.64587164", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_incapacidad_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "55f50e98ac4f5251d38e70c9d2071dbf", "score": "0.6455679", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('appbundle_listkdo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add(\n 'submit',\n 'submit',\n array('label' => 'button.delete', 'attr' => array('class' => 'tiny button alert'))\n )\n ->getForm();\n }", "title": "" }, { "docid": "edc4854af6c3c54768f88c735156bff5", "score": "0.64541024", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_pays_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f384839c98abe4b09fe0087729dd9413", "score": "0.645368", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('identification_module_admin_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'form.common.btn.delete','attr' => array('class' => 'btn btn-danger')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "80cd0eec123504ba01aecd56e1a79633", "score": "0.64488465", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('api_user_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "74c3e380ad328442ed6d5560cb2830f2", "score": "0.6447807", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usertotask_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "c7f2eb9db9bfc50daa95761eeb463efd", "score": "0.6447786", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('mecz_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "f92f96c5e53bbd2932eec978e91c641a", "score": "0.64455765", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fichepatient_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'bttn')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "00d90bba8d4af5188ffb34f691844b13", "score": "0.6442471", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('viaje_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "b176c0dd4b9be9aba798ac897f2e7397", "score": "0.64329386", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('user_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "0e3fd2a6bd8c9dd4383dacd1d0de4f0f", "score": "0.64304984", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('workerdown_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "73001edafd84a2bbc68ebbc8094b7f16", "score": "0.64290816", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder(null, array('attr' => array( 'id' => 'pts_del')))\n ->setAction($this->generateUrl('morus_accetic_inventory_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => $this->get('translator')->trans('btn.delete')))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "d849b74747b48d122ed59eea54711f89", "score": "0.6425912", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('tecnoequipo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'ELIMINAR'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "dbf2627fc815e5d9e0d9bdf02729556c", "score": "0.6424384", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('visiteur_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "628dbed32d8e79200894c64f2fed7ad0", "score": "0.6421185", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('config_testimonial_delete', array('id' => $id)))\n ->setAttribute('enctype', 'multipart/form-data')\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm();\n }", "title": "" }, { "docid": "a427b6fa04f1fc85a3fb0b4e4cd70ec7", "score": "0.6419379", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cole_deletar', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "80b7a87571500f104967fc2f8d54066f", "score": "0.6418415", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_missatges_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2e05da46cb3be14dfb197415d1a78541", "score": "0.64155", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('sifda_equipotrabajo_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "910187b78456b59ba2d67bedc8a73a03", "score": "0.64116853", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl($this->mesRoutes[\"delete\"], array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a806336cce7c0c445fcf3fe7b5e7cd47", "score": "0.6409829", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('devissetup_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "96fff8bf09fe8a1182e7fb570e659a60", "score": "0.6408651", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('posgradolineas_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Eliminar'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "5aa57c1c81c3cf36972ae2754dc70cec", "score": "0.6406554", "text": "private function createDeleteForm($id)\r\n {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('admin_consulta_delete', array('id' => $id)))\r\n ->setMethod('DELETE')\r\n ->add('submit', 'submit', array('label' => 'Delete'))\r\n ->getForm()\r\n ;\r\n }", "title": "" }, { "docid": "2152921382b5a514dfff7db9f03b44b4", "score": "0.64062107", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('pifeclassique_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Supprimer'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a474fcb1010b4d4baf03b9e0058db52d", "score": "0.6405122", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('empleado_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2762f942f2e63711b5ab73af81d35c98", "score": "0.6404856", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('fileops_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "2433aca82a494bbbb04923afd87bf4ec", "score": "0.64022195", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('usuario_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "1a6443429bead9a0ad72978d7e2bd83a", "score": "0.640002", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('matches_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "efb3046bee0342eb9bcffd3573873d18", "score": "0.63962024", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('transaction_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a3d3a960ad02b4ffadeb0351291ee93f", "score": "0.6396163", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('detailsproduits_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "a3fb178ea6179425192c6d8760b664b5", "score": "0.63956577", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('premiacao_ideia_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete'))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "590e962c4f14ca0a9875063728c819aa", "score": "0.63926935", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('victoire_business_template_delete', ['id' => $id]))\n ->setMethod('DELETE')\n ->add('submit', SubmitType::class, ['label' => 'Delete'])\n ->getForm();\n }", "title": "" }, { "docid": "78515e568abf13e94cb52c38fa816850", "score": "0.6388553", "text": "private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('social_admin_resource_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => '删除','attr'=>[\n 'class'=>'btn btn-danger'\n ]))\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7b6857ee5193efddb6dcb481d1fbba93", "score": "0.63881564", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->getForm()\n ;\n }", "title": "" }, { "docid": "7b6857ee5193efddb6dcb481d1fbba93", "score": "0.63881564", "text": "private function createDeleteForm($id) {\n return $this->createFormBuilder(array('id' => $id))\n ->add('id', 'hidden')\n ->getForm()\n ;\n }", "title": "" } ]
ccbac23fe5060d65630b19e5693a41e9
Get the validation rules that apply to the request.
[ { "docid": "92449eed1353c3df1a7ad173b00c83b7", "score": "0.0", "text": "public function rules()\n {\n return [\n 'first_name' => 'required|max:255',\n 'last_name' => 'required|max:255',\n 'middle_name' => 'alpha|nullable',\n 'address1' => 'max:255',\n 'address2' => 'max:255',\n 'city' => 'max:255',\n 'state' => 'size:2',\n 'phone' => 'max:14',\n 'emergency_phone' => 'max:14',\n 'zip' => 'numeric|nullable'\n ];\n }", "title": "" } ]
[ { "docid": "d3b2366a7b2858714fb7cf00d1ba8f4f", "score": "0.8297018", "text": "public function rules()\n {\n $this->gatherRulesAndAttributes();\n\n return $this->validationRules;\n }", "title": "" }, { "docid": "f3c76174c5a69ad644c99824df4f1003", "score": "0.8072995", "text": "public function getValidationRules();", "title": "" }, { "docid": "2a965bdcd098f2de201e334092b41bbe", "score": "0.80125415", "text": "public function getValidationRules()\n {\n return $this->validationRules ?: [];\n }", "title": "" }, { "docid": "674f48033c4da89ffa7685260cca729a", "score": "0.79264987", "text": "public function rules()\n {\n return $this->validationRules;\n }", "title": "" }, { "docid": "b4568e984166910ea5aeeb0b41624537", "score": "0.78794503", "text": "function getValidationRules()\n {\n return $this->_impl->getValidationRules();\n }", "title": "" }, { "docid": "00dcff49f39356dc7ea6c5366f22fbad", "score": "0.78530145", "text": "public function getValidationRules()\n {\n return [\n 'UID' => 1,\n 'DTSTART' => 1,\n 'DTSTAMP' => 1,\n\n 'DTEND' => '?',\n 'DURATION' => '?',\n\n 'CREATED' => '?',\n 'DESCRIPTION' => '?',\n 'LAST-MODIFIED' => '?',\n 'RECURRENCE-ID' => '?',\n 'RRULE' => '?',\n 'SUMMARY' => '?',\n\n 'CATEGORIES' => '*',\n 'COMMENT' => '*',\n 'CONTACT' => '*',\n 'EXDATE' => '*',\n 'RDATE' => '*',\n\n 'AVAILABLE' => '*',\n ];\n }", "title": "" }, { "docid": "7e55d5072e556d0101f263bd65d12bda", "score": "0.7797829", "text": "public function rules()\r\n {\r\n $this->customValidates();\r\n $this->overrideValidates();\r\n \r\n return array_only($this->rules, $this->validateFields);\r\n }", "title": "" }, { "docid": "e8eb155c31aba6afb2d444e7b1758894", "score": "0.7790699", "text": "public function getValidationRules()\n {\n return [];\n }", "title": "" }, { "docid": "2a1d9b4cf4d5839ca709c58682d32581", "score": "0.77702296", "text": "public function rules()\n\t{\n\t\treturn $this->callByRequestMethod('rules');\n\t}", "title": "" }, { "docid": "8c0f172f7251052958129926c76a9a22", "score": "0.7763308", "text": "public function getRules()\n\t{\n\t\t$result = array_merge(\n\t\t\t$this->getStructureValidationRules(),\n\t\t\t$this->getUserDefinedValidationRules()\n\t\t);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f630a7e47f32b4bdf5ddb02d97f9bc2b", "score": "0.77422553", "text": "public function getRules()\n {\n $result = array_merge(\n $this->getStructureValidationRules(),\n $this->getUserDefinedValidationRules()\n );\n\n return $result;\n }", "title": "" }, { "docid": "979694cc9e5abb7888caddef316fe003", "score": "0.77380073", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n //认证类型:实名,企业,资质\n $rules = [\n 'type' => 'required|string|in:identity,company,qualification,field',\n ];\n switch ($this->type){\n case 'identity':\n $rules['name'] = 'required|string';\n $rules['number'] = 'required|string';\n $rules['front'] = 'required|string';\n $rules['back'] = 'required|string';\n break;\n case 'company':\n $rules['name'] = 'required|string';\n $rules['number'] = 'required|string';\n $rules['front'] = 'required|string';\n break;\n case 'qualification':\n $rules['front'] = 'required|string';\n break;\n case 'filed':\n break;\n }\n\n break;\n }\n return $rules;\n }", "title": "" }, { "docid": "1a8ebcbf165ce3c28c27296e870c3898", "score": "0.77157104", "text": "public function rules(\\Illuminate\\Http\\Request $request)\n {\n $rules = [];\n\n $request->merge(['user_id' => User::getCurrentUser()->id]);\n\n switch ($this->method()) {\n case 'PUT':\n case 'PATCH':\n\n $inputs = $request->all();\n\n foreach ($this->_rules as $ruleName => $ruleValidation) {\n if (isset($inputs[$ruleName])) {\n $rules[$ruleName] = $ruleValidation;\n }\n }\n\n break;\n default:\n $rules = $this->_rules;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "c8ea69ea90f7e60443be4932891ed016", "score": "0.7697522", "text": "public function rules()\n {\n $method = $this->method();\n if ($this->get('_method', null) !== null) {\n $method = $this->get('_method');\n }\n switch ($method) {\n case 'DELETE':\n case 'GET':\n break; \n case 'POST':\n $this->rules = [\n 'file' => 'required|mimetypes:image/gif,image/jpeg,image/png,image/bmp|max:2000',\n ];\n break;\n case 'PUT':\n $this->rules = [\n 'name' => 'required|string|max:128',\n ];\n break;\n case 'PATCH':\n break;\n default:\n break;\n }\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "cd5bec9e9d569a456f81970b63507111", "score": "0.7683038", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "71898638a902cf7e7072d9266e47f3df", "score": "0.76826257", "text": "public function rules()\n {\n return $this->rules;\n }", "title": "" }, { "docid": "905b10212114df25c10ea4f5f22cdfba", "score": "0.7682433", "text": "public function rules()\n {\n $rule = [\n 'title' => 'required',\n 'total_amount' => 'required|numeric',\n ];\n switch (strtolower($this->method())) {\n case 'post':\n return array_merge([\n 'order_id' => 'required'\n ], $rule);\n break;\n case 'patch':\n return $rule;\n break;\n\n default:\n return [];\n }\n }", "title": "" }, { "docid": "e0e6a230b60aaed2a47d031e47b4b9cf", "score": "0.7681943", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n case 'POST': {\n return [\n 'website' => 'required',\n 'phone_number' => 'required|numeric|digits_between:10,12',\n 'email_return' => 'required|email',\n\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [\n 'title' => 'required',\n 'content' => 'required'\n ];\n }\n }\n }", "title": "" }, { "docid": "c06440e216525b06ebc3f37a5394571d", "score": "0.7677338", "text": "public function getValidationRules() {\n $unique = Unique::amongst(get_class($this))->field('nickname')->ignoreWithId($this->getId());\n return [\n 'name' => [\n 'required',\n 'max:255'\n ],\n 'nickname' => [\n $unique\n ],\n 'preferences' => [\n 'required',\n ],\n 'permissions' => [\n ]\n ];\n }", "title": "" }, { "docid": "8e63c256c39a8c7b7a44fcd78e25c929", "score": "0.7676075", "text": "public function rules()\n {\n\n $rules = array();\n switch ($this->method()) {\n case 'POST':\n {\n $rules['fldDay'] = 'required';\n $rules['fldFromHour'] = 'required';\n $rules['fldToHour'] = 'required';\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules['fldDay'] = 'required';\n $rules['fldFromHour'] = 'required';\n $rules['fldToHour'] = 'required';\n }\n }\n return $rules;\n\n \n }", "title": "" }, { "docid": "9dce42c574aac545d07c692e9e7b21ef", "score": "0.7657698", "text": "public function rules()\n {\n if ($this->method() === 'POST') {\n return $this->rulesForCreating();\n }\n\n return $this->rulesForUpdating();\n }", "title": "" }, { "docid": "225f082f4bbd299e2cfd655fd35297af", "score": "0.7650636", "text": "public function rules()\n {\n $rules = $this->rules;\n \n return $rules;\n }", "title": "" }, { "docid": "ca4e6b765c3983a6b7fbbac1bd826cef", "score": "0.76370806", "text": "public function getRules() {\n\t\treturn [\n\t\t\t'first_name' => 'required',\n\t\t\t'last_name' => 'required',\n\t\t\t'password' => 'required',\n\t\t\t'email' => 'required|email'\n\t\t];\n\t}", "title": "" }, { "docid": "dea4d85aa6b70e8d0e669504d7658135", "score": "0.76232684", "text": "public function rules()\n {\n $rules = $this->rules;\n \n if(Request::isMethod('PATCH')){\n $rules['role_name'] = 'required|max:10';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "83ab6aecba9f3bc0aa4e1d7098d3f985", "score": "0.7612856", "text": "public function rules()\n {\n $rules = [\n 'sentence' => 'required',\n 'level' => 'required',\n 'active' => 'required'\n ];\n return $rules;\n }", "title": "" }, { "docid": "2832d07016c55f16d671c145d53275bf", "score": "0.7609934", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':{return $this->rulesForCreate();}\n case 'PUT':{return $this->rulesForUpdate();}\n default:break;\n }\n\n return [];\n }", "title": "" }, { "docid": "b6ba89d1471f3788ae8e001f907c6a37", "score": "0.76036775", "text": "public function rules()\n {\n $rules = $this->storeRules();\n if ($this->method() == 'POST') {\n return $rules;\n }\n\n unset($rules['password']);\n\n return $rules;\n }", "title": "" }, { "docid": "5fd01dbbd4ae37c1c4f693224d641939", "score": "0.75983995", "text": "public function rules()\n {\n $rules = $this->rules;\n\n return $rules;\n }", "title": "" }, { "docid": "62a740d91439d585c0e0310db0ac7325", "score": "0.7595514", "text": "public function rules()\n {\n if ($this->isMethod('POST')) {\n return $this->rules;\n }\n\n return array_merge($this->rules, [\n //\n ]);\n }", "title": "" }, { "docid": "4fc889afe6b3d290fbc7c0c719582796", "score": "0.75775623", "text": "public function getValidationRules()\n\t{\n\t\t$rules = [];\n\n\t\tforeach ($this->field_labels as $field => $options) {\n\t\t\tif($options['rules'] !== '') {\n\t\t\t\t$rules[$field] = $options['rules'];\n\t\t\t}\n\t\t}\n\n\t\treturn $rules;\n\t}", "title": "" }, { "docid": "1865b0a261ff1e89f90d2a5e1a39229c", "score": "0.7562703", "text": "public function rules()\n {\n if ($this->method() == \"POST\" || $this->method() == \"PUT\") {\n return [\n 'title' => 'required|string|max:255',\n 'is_active' => 'required|in:1,0',\n 'from_date' => 'required',\n 'expired_date' => 'required',\n 'redirect_title' => 'required|string|max:255',\n 'redirect_link' => 'required|url',\n 'content' => 'required|min:11',\n 'user_types.*' => 'required|in:'.userTypeIds(),\n ];\n } else {\n return [\n\n ];\n }\n }", "title": "" }, { "docid": "43b85539b9893fdc5901e5851d553da0", "score": "0.75518596", "text": "public function getValidationRules(): array\n {\n return []; // no extra validation rules\n }", "title": "" }, { "docid": "ec5d08f96b99d33fed46b639b84696c7", "score": "0.7551423", "text": "public function validationRules()\n {\n return [];\n }", "title": "" }, { "docid": "59d25543571a7f6bec1ebecd36bab054", "score": "0.75363225", "text": "public function rules()\n {\n if ($this->isMethod('post')) {\n return $this->createRules();\n } elseif ($this->isMethod('put')) {\n return $this->updateRules();\n }\n }", "title": "" }, { "docid": "b027930865d75e3d9ebf5846b2e0c008", "score": "0.7534956", "text": "public function rules()\n {\n $updateUserRequest = new UpdateUserRequest();\n $rules = $updateUserRequest->rules();\n foreach ($rules as &$rule) {\n if (strpos($rule, 'required') === false) {\n $rule = 'required|' . $rule;\n }\n }\n return $rules;\n }", "title": "" }, { "docid": "81a7b3715f10db8067097135a8c65324", "score": "0.7531515", "text": "public function rules()\n {\n if($this->isMethod('post')) {\n return [\n 'username' => 'required',\n 'email' => ['required', 'email','unique:users'],\n 'userRole' => 'required',\n 'userPassword' => 'required|min:8|max:20'\n ];\n }elseif($this->isMethod('put') || $this->isMethod('patch')){\n return [\n 'username' => 'required',\n 'email' => 'required|email',\n 'userRole' => 'required',\n 'userPassword' => 'min:8|max:20'\n ];\n }\n }", "title": "" }, { "docid": "58fb6a34758dce5dda77071db8d73b94", "score": "0.7518994", "text": "public function getValidationRule()\n {\n return $this->validationRules ?: [];\n }", "title": "" }, { "docid": "3e074340dee2b66bce46eed6559506f9", "score": "0.7503619", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST': {\n return [\n 'name' => 'required',\n 'profession' => 'required',\n 'email' => 'required|unique:users',\n 'start_date' => 'required',\n 'mobile_phone' => 'required|max:15',\n 'address' => 'required',\n 'password' => 'required'\n ];\n }\n break;\n case 'PATCH': {\n return [\n 'name' => 'required',\n 'profession' => 'required',\n 'email' => 'required',\n 'start_date' => 'required',\n 'mobile_phone' => 'required|max:15',\n 'address' => 'required',\n ];\n }\n break;\n default:\n break;\n }\n }", "title": "" }, { "docid": "e84bf440e9b049263f13b018798d8591", "score": "0.7502201", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET': {\n return [\n 'id' => ['required, id']\n ];\n }\n case 'POST': {\n return [\n 'product_id' => ['required'],\n 'line_user_id' => ['required'],\n 'qty' => ['required']\n ];\n }\n case 'PUT':\n case 'PATCH':\n case 'DELETE':\n default: {\n return [];\n }\n }\n }", "title": "" }, { "docid": "52f2c3ad988f4ad8d3dfb8d559b1b695", "score": "0.75012577", "text": "public static function rules() {\n\t\t\n\t\treturn self::$rules;\n\n\t}", "title": "" }, { "docid": "0e8d0e37da3aebdc56f911893782b3a9", "score": "0.74936813", "text": "public function rules()\n {\n if($this->method() == 'POST'){\n return [\n 'title' => 'required',\n 'group_id' => 'required',\n ];\n }elseif ($this->method() == 'PUT'){\n return [\n\n ];\n }\n }", "title": "" }, { "docid": "d15317952b14d7106a2fdde8b66f2e04", "score": "0.7493375", "text": "public static function getValidationRules(): array\n {\n return [\n 'restaurant_id' => 'required|int',\n 'active' => 'boolean',\n 'label' => 'required|string',\n 'notes' => 'required|string',\n ];\n }", "title": "" }, { "docid": "318249f15d3c1a0375b8b6133aa48bbe", "score": "0.7489177", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n {\n return [\n 'title_th' => 'required|max:100',\n 'detail_th' => 'required|max:150',\n 'title_en' => 'required|max:100',\n 'detail_en' => 'required|max:150',\n ];\n }\n case 'PUT':\n {\n return [\n 'title_th' => 'required|max:100',\n 'detail_th' => 'required|max:150',\n 'title_en' => 'required|max:100',\n 'detail_en' => 'required|max:150',\n ];\n }\n default:\n break;\n }\n }", "title": "" }, { "docid": "152ea4806e543e23cb4cb9356b1c30f0", "score": "0.7487346", "text": "public function rules()\n {\n $rules = [];\n $extraRules = [];\n if ($this->getMethod() == Request::METHOD_PUT || $this->getMethod() == Request::METHOD_POST) {\n $rules = [\n 'stores.*.email' => [\n 'required',\n 'email:rfc,dns'\n ],\n 'stores.*.phone' => ['nullable', 'digits_between:5,10', new OnlyNumbers()],\n 'stores.*.mobile' => ['nullable', 'digits_between:10,15', new OnlyNumbers()],\n 'stores.*.delivery_limit_km' => ['nullable', 'numeric', 'min:0'],\n 'stores.*.state_id' => 'required',\n ];\n }\n\n return array_merge($rules, $extraRules);\n }", "title": "" }, { "docid": "9eb69ac56a06f877b19a712f22f264cb", "score": "0.748095", "text": "protected function getRules()\n {\n return $rules = [\n 'title_ar' => 'required',\n 'title_en' => 'required',\n 'description' => 'required',\n 'image' => 'required'\n ];\n }", "title": "" }, { "docid": "a54a48a2e57c7dd7d44b1f7765645194", "score": "0.7472833", "text": "public function getValidationRules(): array\n {\n return [\n 'email_address' => 'required|string',\n 'email_type' => 'string',\n 'status' => 'required|string',\n ];\n }", "title": "" }, { "docid": "63bf00627f9e3a0938452f424b7dbd76", "score": "0.7469138", "text": "public function rules() {\n switch ($this->method()) {\n case 'POST':\n return $this->createItem();\n case 'PUT':\n case 'PATCH':\n $rules = $this->updateItem();\n return $rules;\n }\n }", "title": "" }, { "docid": "d8c1c3169ec4b147d356bf42d30aa96a", "score": "0.7468005", "text": "public function rules()\n {\n\n //dd($this->request);\n\n $rules = [\n 'nm_usuario' => 'string',\n 'email' => 'email|string',\n ];\n\n if ($this->password != null) {\n\n $rules['password'] = 'string';\n\n }\n\n if ($this->cd_acesso != null) {\n\n $rules['cd_acesso'] = 'numeric';\n\n }\n\n return $rules;\n }", "title": "" }, { "docid": "9c730664ac18041d74bbb696764c79c1", "score": "0.7467221", "text": "public function rules()\n {\n switch ($this->method())\n {\n case \"POST\":\n return [\n 'user_id' => ['required', 'exists:users,id'],\n 'title' => ['required', 'string', 'min:4', 'max:20'],\n 'description' => ['required', 'string', 'max:500'],\n 'isCompleted' => ['boolean']\n ];\n case \"PUT\":\n case \"PATCH\":\n return [\n 'title' => ['string', 'min:4', 'max:20'],\n 'description' => ['string', 'max:500'],\n 'isCompleted' => ['boolean']\n ];\n }\n }", "title": "" }, { "docid": "c86d9389b64357effb38928d30eab04d", "score": "0.74560094", "text": "public function rules()\n {\n $routeName = $this->route()->getName();\n switch ($routeName) {\n case \"api.member-manage.death-registration.store\":\n $rule = [\n \"member_name\" => \"required\",\n \"member_ID\" => \"required\",\n \"death_time\" => \"required|integer\",\n \"certificate_time\" => \"required|integer\",\n \"family_address\" => \"required\",\n \"contact_number\" => \"required\",\n \"check-in_main_diagnosis\" => \"required\",\n \"death_disease\" => \"required\",\n \"certificate_doctor\" => \"required\",\n ];\n break;\n case \"\":\n $rule = [];\n break;\n default:\n $rule = [];\n };\n\n return $rule;\n }", "title": "" }, { "docid": "204aecf140f319ec81ae1d870283d5d1", "score": "0.7444598", "text": "public function rules()\n {\n $rules = [\n //\n ];\n\n if ($this->route()->getName() == 'api.marketing.coupons.store') {\n $rules = [\n 'resource_id' => 'required'\n ];\n }\n\n if ($this->route()->getName() == 'api.marketing.coupons.exchange') {\n $rules = [\n 'uuid' => 'required'\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "2c53768cd394e1fe3078b15cfad2a052", "score": "0.7438663", "text": "public function validationRules( $request )\n {\n /**\n * Retreive the application if id is provided\n */\n $application = $request->route( 'id' ) ? Application::find( $request->route( 'id' ) ) : false;\n \n /**\n * If the current request process users namespace\n */\n $fields = $this->getFields( $application );\n\n if ( $request->route( 'namespace' ) == 'applications' ) {\n\n /**\n * Use UserFieldsValidation and add assign it to \"crud\" validation array\n * the user object is send to perform validation and ignoring the current edited\n * user\n */\n }\n return Helper::getFieldsValidation( $fields );\n }", "title": "" }, { "docid": "16178889a3ff8a62a21abcb92a61236c", "score": "0.74382305", "text": "public function rules()\n {\n $rules = [];\n\n if (request()->get('slack_status') == 'active') {\n $rules['slack_webhook'] = 'required|regex:/^((?:https?\\:\\/\\/)(?:[-a-z0-9]+\\.)*(slack(.*)))$/';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "a57c188a7a6be51a35a05f5c74829d1e", "score": "0.74371254", "text": "public function rules() {\n return self::$rules;\n }", "title": "" }, { "docid": "0feb272fc937507eff44d15ffcc4f344", "score": "0.7432481", "text": "public function rules()\n {\n // dd($this->request);\n $rules = [\n 'name' => ['required', 'string', 'max:255'],\n 'email' => 'nullable|email:rfc,dns|unique:users,email',\n 'mobile' => ['required', 'unique:users,mobile'],\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "ac554695466b603d20a9226bd197a29a", "score": "0.7427103", "text": "public function rules()\n {\n return $this->get('class')::getRules();\n }", "title": "" }, { "docid": "a3705ea0e0bcdc4b9e22e5e8fa33e8c9", "score": "0.7425601", "text": "public function rules() {\n $rules = [\n 'name' => ['required'],\n 'email' => ['required', 'email'],\n 'help' => ['required'],\n 'message' => ['required']\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "7539dfecf1fc038b98fd5c6c80f4598c", "score": "0.74249345", "text": "public function rules()\n {\n \n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n }\n case 'POST':\n {\n return [\n 'name' => 'required',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|alpha_num|min:6',\n 'rol' => 'required',\n ];\n }\n case 'PUT':\n {\n return [\n 'name' => 'required',\n 'email' => 'required|email|unique:users,email,'.$this->get('id'),\n 'rol' => 'required',\n ];\n }\n case 'PATCH':\n default:break;\n }\n }", "title": "" }, { "docid": "86757426aed276b0893707cfeec648aa", "score": "0.741807", "text": "protected function rules()\n {\n return [\n 'token' => 'required',\n 'email' => getRule('email', true),\n 'password' => getRule('password', true),\n ];\n }", "title": "" }, { "docid": "3be2c8ba7989476cceadf7250965af15", "score": "0.7417664", "text": "public function rules()\n {\n\n $rules = [];\n\n switch($this->method())\n {\n case 'GET':\n case 'DELETE':\n {\n return [];\n break;\n }\n case 'POST':\n {\n $rules = [\n 'branch_id' => 'exists:branches,id',\n 'member_id' => 'required|exists:members,id',\n 'loan_application_id' => 'required',\n 'guarantee_amount' => '',\n 'notes' => ''\n ];\n\n break;\n }\n case 'PUT':\n case 'PATCH':\n {\n $rules = [\n 'branch_id' => 'exists:branches,id',\n 'member_id' => 'required|exists:members,id',\n 'loan_application_id' => 'required',\n 'notes' => '',\n 'guarantee_amount' => '',\n ];\n break;\n }\n default:break;\n }\n\n return $rules;\n\n }", "title": "" }, { "docid": "db4e85aaacfb569aeee1f8589f0ad216", "score": "0.7414893", "text": "public function rules(Request $request)\n\t{\n\t\t$validationRules = [\n\t\t\t'first_name' => 'required|max:100',\n\t\t\t'last_name' => 'required|max:100',\n\t\t\t'email' => 'required|email|max:255|unique:users,email,0,id,deleted_at,NULL',\n\t\t\t'phone' => 'required|unique:user_phones,phone,0,id,deleted_at,NULL',\n\t\t\t'captcha'\t=> 'required'\n\t\t];\n\n\t\treturn $validationRules;\n\t}", "title": "" }, { "docid": "d4a1de0948ee01a60cd5658cd261ad6b", "score": "0.74105656", "text": "public function rules(\\Illuminate\\Http\\Request $request)\n {\n switch ($this->method()) {\n\n case 'GET':\n case 'DELETE':\n $rules = [];\n break;\n case 'POST':\n case 'PATCH':\n case 'PUT':\n default:\n $rules = $this->_rules;\n break;\n }\n\n return $rules;\n }", "title": "" }, { "docid": "02d72ab3c01fe03fbcf55c133753f747", "score": "0.7400313", "text": "public function rules()\n {\n $this->id = $this->route('id');\n\n if($this->input('type') == 'quota' && (!$this->filled('slp_required') || !$this->filled('frequency'))){\n $error = ValidationException::withMessages([\n 'slp_required' => ['Slp requirement is required field'],\n 'frequency' => ['Set slp Requirement is requred field'],\n ]);\n throw $error;\n }\n\n\n if($this->input('type') == 'percentage' && (!$this->filled('manager_share') || !$this->filled('scholar_share'))){\n $error = ValidationException::withMessages([\n 'manager_share' => ['Scholar share is required field'],\n 'scholar_share' => ['Manager share is requred field'],\n ]);\n throw $error;\n }\n\n return $this->getRules();\n\n }", "title": "" }, { "docid": "06a756a739a00b339f8efd629a7772d4", "score": "0.73932725", "text": "public function rules()\n {\n $rules = [\n 'user' => 'required|integer',\n 'nombre_negocio' => 'required',\n 'nombre_encargado' => 'required',\n 'direccion' => 'required',\n 'ciudad' => 'required',\n 'estado' => 'required',\n 'cp' => 'required|max:6',\n 'telefono' => 'required|max:10',\n 'status' => 'required|in:DRAFT,PUBLISHED',\n\n ];\n\n if($this->get('file'))\n $rules = array_merge($rules, ['file' => 'mimes:jpg,jpeg,png']);\n\n return $rules;\n }", "title": "" }, { "docid": "fe2ad0323a59cbdffbca4e979f3e889e", "score": "0.73884815", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [];\n }\n case 'PUT': {\n return [\n 'name' => 'required',\n 'email' => 'required|unique:users,email,'.auth()->user()->id,\n 'old_password' => 'required|min:8',\n 'password' => 'required|min:8|same:password_confirmation',\n 'password_confirmation' => 'required|min:8'\n ];\n }\n }\n }", "title": "" }, { "docid": "fa71ca10177dd1a10b56a4d16bf485de", "score": "0.73881465", "text": "public function rules()\n {\n $rules = [];\n $method = strtoupper($this->getMethod());\n $route_name = Route::currentRouteName();\n\n if ($method === \"POST\") {\n\n if ($route_name === \"web.admin.authenticate\") {\n $rules = [\n \"email\" => [\n \"required\",\n \"email:rfc\",\n function($attribute, $value, $failed) {\n $administrator = Administrator::where(\"email\", $value)->get()->first();\n // 管理者アカウントが有効かどうか\n if ($administrator !== NULL && (int)$administrator->is_displayed === Config(\"const.binary_type.on\")) {\n return true;\n }\n $failed(\":attributeは有効な管理者アカウントではありません\");\n }\n ],\n \"password\" => [\n \"required\",\n \"between:8,64\"\n ]\n ];\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "2460c1134516b2ee86e2ef51fca4a9ef", "score": "0.7382329", "text": "public function rules()\n {\n if (in_array($this->method(), ['PUT', 'PATCH'])) {\n $rules = [\n 'name' => 'required',\n 'password' => 'same:confirm-password',\n 'roles' => 'required'\n ];\n } else {\n $rules = [\n 'name' => 'required',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|same:confirm-password',\n 'roles' => 'required'\n ];\n }\n\n return $rules;\n }", "title": "" }, { "docid": "ab005af44e8b94da7dac104dc9f0b0e1", "score": "0.7375551", "text": "function getLocalValidationRules()\n {\n return $this->_impl->getLocalValidationRules();\n }", "title": "" }, { "docid": "9dfbe9ebdb22678e4707478aa856f627", "score": "0.7373734", "text": "public function rules()\n {\n $rules = $this->rules;\n // 根据不同的情况, 添加不同的验证规则\n if (Request::getPathInfo() == '/save')//如果是save方法\n {\n $rules['Student.addr'] = 'sometimes';\n }\n if (Request::getPathInfo() == '/edit')//如果是edit方法\n {\n $rules['Student.addr'] = 'required|min:5';\n }\n return $rules;\n\n }", "title": "" }, { "docid": "84cf6ebdc8d8330843e47630e7d17cd4", "score": "0.7366171", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'POST':\n return [\n 'target_type' => 'required',\n 'target_id' => 'required',\n ];\n break;\n }\n }", "title": "" }, { "docid": "e224d2c48bde4b1b289427d56f1ac062", "score": "0.73656625", "text": "public function validationRules()\n {\n return [\n 'title' => 'string|required',\n 'summary' => 'string',\n 'priority' => 'boolean',\n 'completed' => 'boolean',\n 'expires_at' => 'timestamp',\n ];\n }", "title": "" }, { "docid": "e8049aad0768569a2a2b94de690bd2e1", "score": "0.736254", "text": "public function rules()\n {\n return $this->myRules();\n }", "title": "" }, { "docid": "9b2aaac265918aa310ee18f1e38d00af", "score": "0.7362041", "text": "public function rules()\n {\n if ($this->is('api/login')) {\n return [\n 'email' => 'required|email',\n 'password' => 'required|string',\n ];\n }\n if ($this->is('api/register')) {\n return [\n 'email' => 'required|email',\n 'password' => 'required|string',\n ];\n }\n return [];\n }", "title": "" }, { "docid": "dfb33e4e30f0c7257d7e57ea97dcab2b", "score": "0.7359941", "text": "public function rules()\n {\n $this->validator->append('location_id', 'required|integer');\n $this->validator->append('building_id', 'required|integer');\n $this->validator->append('latitude', 'integer|string|is_valid_latitude');\n $this->validator->append('longitude', 'integer|string|is_valid_longitude');\n return $this->rules;\n }", "title": "" }, { "docid": "d1b997221c00cd42ced998e2360111ba", "score": "0.73579913", "text": "public function getRules() {\n return [\n 'password' => 'required',\n 'email' => 'required|email'\n ];\n }", "title": "" }, { "docid": "98a71800d0db7f318a08f571f90e6577", "score": "0.73542285", "text": "public function rules()\n {\n //NB, these are all what is required for launching\n return [\n 'lti_message_type' => ['required', Rule::in(self::$MESSAGE_TYPES)],\n 'lti_version' => ['required', Rule::in(self::$LTI_VERSIONS)],\n\n 'oauth_consumer_key' => 'required',\n 'oauth_nonce' => 'required',\n 'oauth_signature' => ['required'],\n 'oauth_signature_method' => ['required'],\n 'oauth_timestamp' => ['required'],\n 'oauth_version' => ['required'],\n\n 'resource_link_id' => 'required',\n// 'resource_link_title' => ['required'],\n//\n// 'user_id' => ['required']\n// //\n ];\n }", "title": "" }, { "docid": "2876a6fee35a46305e861d93724b0c39", "score": "0.7351532", "text": "public function rules()\n {\n $rules = array();\n $rules['username'] = $this->validarUsername();\n $rules['email'] = $this->validarEmail();\n return $rules;\n }", "title": "" }, { "docid": "11d7f6cfa134a38b4a443a0d5650f3ac", "score": "0.73482263", "text": "public function rules()\n {\n $rules = [\n 'name'=>'required|min:0|max:255',\n 'code'=>'required|min:0|max:255',\n 'logo'=>'image',\n 'country_id' => 'integer|exists:countries,id'\n\n ];\n return RuleHelper::get_rules($this->method(),$rules);\n }", "title": "" }, { "docid": "90f762d9defdeb4a87d9f52033fd121d", "score": "0.73475206", "text": "public function getFilterValidationRules();", "title": "" }, { "docid": "63e700cff3ad9e93dd5b882e70518b4b", "score": "0.7346583", "text": "public function rules()\n {\n $rules = [];\n if($this->getMethod() == 'POST' || $this->hasFile($this->prepareKey('fileRaw')))\n {\n $rules[$this->prepareKey('fileRaw')] = 'required|file|mimes:pdf|max:10240';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "0df8673c73da0ba1c50eb2b3d12831f5", "score": "0.73459685", "text": "public function rules() {\n\t\t$rules = collect([\n\t\t\t'name' => 'required|min:2',\n\t\t\t'email' => 'required|email|unique:users,email,' . $this->band->user->id,\n\t\t\t'language' => 'required|in:en,nl',\n\t\t\t'band' => 'required|array',\n\t\t\t'paymentMethod' => 'required|string|in:band,individual'\n\t\t]);\n\n\t\tif ($this->input('review') || $this->band->submitted){\n\t\t\t$requiredFieldsRules = Field::getRequiredFields(Band::class);\n\t\t\t$protectedFieldsRules = Field::getProtectedFields(Band::class);\n\t\t\t$rules = $rules->merge($requiredFieldsRules)->merge($protectedFieldsRules);\n\t\t}\n\t\treturn $rules->toArray();\n\t}", "title": "" }, { "docid": "207e1e8e770fdc018dd2c6c6dadaa075", "score": "0.7338981", "text": "public function rules()\n {\n // skip validations for DRAFT\n if ($this->isDraft()) {\n return [];\n }\n\n $rules = $this->fields->mapWithKeys(\n function ($item) {\n if ($item['field_type'] === 'multirow') {\n return $item['field_meta']['validation'] ?? null;\n }\n\n return [$item['field_name'] => $item['field_meta']['validation'] ?? null];\n }\n )->filter()->toArray();\n\n return $rules;\n }", "title": "" }, { "docid": "86cd9f1ef93be581640e4d117f5ee339", "score": "0.7338465", "text": "public function getRules()\n {\n $rules['user_id'] = ['nullable', 'exists:' . app()->make(User::class)->getTable() . ',id'];\n $rules['name'] = ['required', 'string'];\n $rules['phone'] = ['required', 'string'];\n $rules['birthdate'] = ['required', 'date'];\n $rules['pin'] = ['nullable', 'string'];\n $rules['title'] = ['nullable', 'in:MR,MRS,MS'];\n $rules['passport'] = ['nullable', 'string'];\n $rules['address'] = ['nullable', 'json'];\n\n return $rules;\n }", "title": "" }, { "docid": "b313cbd421c232a7d6fade18898d804c", "score": "0.733828", "text": "public function rules()\n {\n if ($this->isMethod('get')) {\n return [];\n }\n return [\n 'organizer_id' => 'required',\n 'title' => 'required',\n 'slug' => 'required',\n 'category_id' => 'required|exists:categories,id',\n 'event_date' => 'required|date|after:today',\n 'description_raw' => 'required',\n 'description' => 'required',\n 'street_1' => 'required',\n 'street_2' => 'nullable',\n 'city' => 'required',\n 'state' => 'required',\n 'image' => 'sometimes|required|image',\n ];\n }", "title": "" }, { "docid": "1e10ab2180ed300cc1877d62593af24f", "score": "0.7332705", "text": "public function rules()\n {\n $rules['contact.subject_id'] = 'required';\n $rules['contact.name'] = 'required|min:5';\n $rules['contact.email'] = 'required|email';\n $rules['contact.phone'] = 'required';\n $rules['contact.message'] = 'required|min:10';\n\n return $rules;\n }", "title": "" }, { "docid": "95962f107b99883013640f45d29b2999", "score": "0.7318535", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET': {\n return [];\n }\n case 'DELETE': {\n return [];\n }\n case 'POST': {\n return [\n 'message.text' => 'required|string|max:5000',\n 'message.receiver_id' => 'required|exists:users,id'\n ];\n }\n case 'PUT':\n case 'PATCH': {\n return [];\n }\n default:\n return [];\n }\n }", "title": "" }, { "docid": "6b077a028af90b715185143669366941", "score": "0.7313332", "text": "public function rules()\n {\n if ($this->method() == 'POST') {\n return [\n 'name' => 'required|max:255',\n 'code' => 'required',\n 'price' => 'required|numeric',\n 'photo' => 'required|image|mimes:jpeg,png,jpg,gif,svg|max:' . (3 * 1024)\n ];\n }\n\n if ($this->method() == 'PUT') {\n\n return [\n 'name' => 'required|max:50',\n 'code' => 'required',\n 'price' => 'required|numeric'\n ];\n }\n }", "title": "" }, { "docid": "4526a08b6c171cd56523a7a47999e93d", "score": "0.73087686", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required'\n ];\n\n if($this->get('status')=='2') {\n $rules['category'] = 'required';\n $rules['level'] = 'required';\n $rules['description'] = 'required';\n $rules['objective'] = 'required';\n $rules['requisites'] = 'required';\n $rules['audience'] = 'required';\n $rules['type_sale'] = 'required';\n $rules['video_presentation'] = 'required';\n $rules['discipline'] = 'required';\n $rules['content'] = 'required';\n }\n\n if($this->get('status')=='2' and $this->get('type_sale')=='1') {\n $rules['price'] = 'required';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "079c21fd5485f6feeee10a248414cea9", "score": "0.73061574", "text": "public function rules()\n {\n $rules = [\n 'ui_label' => 'required',\n 'data_type_id' => 'required|integer',\n 'input_type_id' => 'required|integer',\n 'input_length' => 'integer|max:50,min:1',\n 'custom_field_list' => 'custom_field',\n ];\n\n if (isset($this->existing)) {\n $rules['primary_key_id'] = 'required|integer';\n }\n\n return $rules;\n }", "title": "" }, { "docid": "2eda7ae6dc407268662525e58fbfd674", "score": "0.7302974", "text": "public function rules()\n {\n if ($this->routeIs('*.update')) {\n return [\n 'is_active' => 'required|integer'\n ];\n }\n return [\n 'title' => 'required|string',\n 'amount' => 'required|integer',\n 'use_scene' => 'required|integer',\n 'type' => 'required|integer',\n 'value' => 'nullable',\n 'desc' => 'nullable',\n ];\n }", "title": "" }, { "docid": "a3c727ecdf825b9e224221f1c4cfa06c", "score": "0.7301806", "text": "public function rules()\n {\n switch ($this->method()) {\n\n case 'POST':\n return [\n 'semester' => 'required',\n 'lesson_id' => 'required|exists:lessons,id',\n 'department_id' => 'required|exists:departments,id',\n 'student_id' => 'required|exists:students,id'\n ];\n break;\n\n case 'PUT':\n\n return [\n 'semester' => 'required',\n 'lesson_id' => 'required|exists:lessons,id',\n 'department_id' => 'required|exists:departments,id',\n 'student_id' => 'required|exists:students,id'\n ];\n\n break;\n\n }\n }", "title": "" }, { "docid": "7d93244b9e396f8905b73f9678d532de", "score": "0.7295542", "text": "public function rules()\n {\n $rules = [];\n\n if(request()->isMethod('POST') || request()->isMethod('PATCH')){\n $rules = [\n 'event' => 'required',\n 'start_date' => 'required|date',\n 'end_date' => 'required|date',\n 'days_of_the_weeks' => 'valid_days_of_the_weeks'\n ];\n\n if(count(explode('-',request()->get('start_date'))) == 3){\n $rules['end_date'] = $rules['end_date'] . '|after:start_date';\n }\n\n if(count(explode('-',request()->get('end_date'))) == 3){\n $rules['start_date'] = $rules['start_date'] . '|before:end_date';\n }\n }\n\n return $rules;\n }", "title": "" }, { "docid": "a44c40c9d9a7404e186fcabfb2b4b1ed", "score": "0.72946393", "text": "public function rules()\n {\n $rules = array();\n if ($this->exists('name')){\n $rules['name'] = $this->validateNombre();\n }\n if ($this->exists('surname')){\n $rules['surname'] = $this->validateSurname();\n }\n if ($this->exists('username')){\n $rules['username'] = $this->validateUsername();\n }\n if ($this->exists('email')){\n $rules['email'] = $this->validateEmail();\n }\n return $rules;\n }", "title": "" }, { "docid": "4056ab3cc0d650a827bf5fa28e0a5a91", "score": "0.7288796", "text": "public function rules()\n {\n $rules = [\n 'name' => 'required|string|max:255',\n 'email' => 'required|email|max:255',\n 'moving_from' => 'required|integer',\n 'moving_to' => 'required|integer',\n ];\n\n return $rules;\n }", "title": "" }, { "docid": "d503a82012827e8c13443ea68c899191", "score": "0.7286859", "text": "public function rules()\n {\n switch ($this->method()) {\n case 'GET':\n case 'DELETE':\n return [];\n case 'POST':\n return [\n 'username' => 'required|max:255|min:5',\n 'email' => 'required|email|unique:users,email',\n 'password' => 'required|max:255|min:5',\n 'passwordAgain' => 'required|same:password',\n 'address' => 'required|max:255',\n 'phonenumber' => 'required|numeric',\n 'avatar' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ];\n case 'PUT':\n case 'PATCH':\n return [\n 'username' => 'max:255|min:5',\n 'address' => 'max:255',\n 'phonenumber' => 'numeric',\n 'avatar' => 'image|mimes:jpeg,png,jpg,gif,svg|max:2048',\n ];\n default:\n break;\n }\n }", "title": "" }, { "docid": "21c7915385cb8b5ad7914db9d943ea30", "score": "0.7285941", "text": "public function rules()\n {\n return [\n 'old_url' => ['required', 'string', $this->getOldUrlRule()],\n 'new_url' => ['required', 'string'],\n 'status' => $this->getStatusRule(),\n ];\n }", "title": "" }, { "docid": "1e4e5fcc7b3bc0f8a86f1ef4ebb87778", "score": "0.72858477", "text": "public function rules(Request $request)\n {\n $validation = [];\n $validation['type'] = 'required|integer';\n $validation['title'] = 'required|max:191|min:3';\n $validation['note'] = 'max:500';\n $validation['start_date'] = 'required';\n $validation['start_time'] = 'required';\n $validation['duration'] = 'required';\n $validation['priority'] = 'required';\n $validation['assigned_to'] = 'required';\n return $validation;\n }", "title": "" } ]
261231faf77ab32b5ece07c393d64dc9
input: a string as a sentence output: array of words
[ { "docid": "e63bba4ca910b6d804b3a14daf804867", "score": "0.5734366", "text": "function tokenize($sentence,$option){\n $tokenization = new tokenization;\n if($option==\"word\" || $option==\"w\"){\n return $tokenization->getWordTokens($sentence);\n }\n return $tokenization->getGroupTokens($sentence);\n\n }", "title": "" } ]
[ { "docid": "10d4bd07fc8063c68654a4cd927b1c46", "score": "0.7167934", "text": "public function getWords()\n {\n return explode(' ', $this->text);\n }", "title": "" }, { "docid": "499f7043efb639e324edbef1c2a54c84", "score": "0.71326464", "text": "static function stringToArray($string)\n {\n $string = ContentHelper::remove2CharWords($string);\n $string = ContentHelper::removeCommonWords($string);\n $words = explode(\" \", $string); // Creat an array from $content words\n $words = preg_replace('/[0-9]+/', '', $words); // Remove numbers\n $words = array_filter($words); // Remove empty values etc\n\n return $words;\n }", "title": "" }, { "docid": "a4679d8c833482ff353b62efac374af9", "score": "0.7057464", "text": "protected static function getWords($sentence)\n {\n $words = $sentence;\n if (empty($words)) {\n return [];\n }\n\n return preg_split(\"/[\\s,]+/\", trim($words));\n }", "title": "" }, { "docid": "61a3ae2220dec670228c34e4211e0389", "score": "0.6899713", "text": "public static function splitOnWords(string $str): array\n {\n // Split on anything that is not alphanumeric, or a period, underscore, or hyphen.\n // Reference: http://www.regular-expressions.info/unicode.html\n preg_match_all('/[\\p{L}\\p{N}\\p{M}\\._-]+/u', $str, $matches);\n\n return ArrayHelper::filterEmptyStringsFromArray($matches[0]);\n }", "title": "" }, { "docid": "e561020c59f87dfae820a1a9aee6e398", "score": "0.67531466", "text": "function parse_words($lines) {\n\tglobal $reg; //use the global macro\n\n\t$allwords = array();\n\tforeach ($lines as $line) {\n\t $words = preg_split($reg, $line, -1, PREG_SPLIT_NO_EMPTY); //no need to capture the delimiters here\n\t foreach ($words as $w) {\n\t if (preg_match($reg, $w) == 0) {\n\t $allwords[] = $w;\n\t }\n\t }\n\t}\n\treturn $allwords;\t\n}", "title": "" }, { "docid": "a15e14d0fc764e72efe713dba0ab7bf1", "score": "0.67483926", "text": "private function tokenize($sentence) {\r\n\r\n //removing all the characters which ar not letters, numbers or space\r\n $sentence = preg_replace(\"/[^a-zA-Z 0-9]+/\", \"\", $sentence);\r\n\r\n //converting to lowercase\r\n $sentence = strtolower($sentence);\r\n\r\n //an empty array\r\n $keywordsArray = array();\r\n\r\n //splitting text into array of keywords\r\n //http://www.w3schools.com/php/func_string_strtok.asp\r\n $token = strtok($sentence, \" \");\r\n while ($token !== false) {\r\n\r\n //excluding elements which are present in stopWords array\r\n //http://www.w3schools.com/php/func_array_in_array.asp\r\n if (!binarySearch($this->stopWords, $token)) {\r\n array_push($keywordsArray, $token);\r\n }\r\n $token = strtok(\" \");\r\n }\r\n return $keywordsArray;\r\n }", "title": "" }, { "docid": "937da93ee6282d69ee5e8217a32effb6", "score": "0.66205305", "text": "public function get_words() {\n $questiontextnodelim = $this->questiontext;\n $l = substr($this->delimitchars, 0, 1);\n $r = substr($this->delimitchars, 1, 1);\n $text = $this->get_questiontext_exploded($this->questiontext);\n $questiontextnodelim = preg_replace('/\\\\' . $l . '/', '', $text);\n $questiontextnodelim = preg_replace('/\\\\' . $r . '/', '', $questiontextnodelim);\n /* remove any hyperlinks from candidates for selection, this means that\n * things like audio files will be rendered for the multimedia filter\n */\n $this->selectable = preg_replace('/<a.*?<\\\\/a>/', '', $questiontextnodelim);\n $this->selectable = strip_tags($this->selectable);\n\n $allwords = preg_split('@[\\s+]@u', $questiontextnodelim);\n return $allwords;\n }", "title": "" }, { "docid": "e0a240e9c4faf453cc8641018dac9ed0", "score": "0.66135263", "text": "function ic_get_search_words_array() {\n\treturn explode( ' ', wp_strip_all_tags( get_search_query( false ) ) );\n}", "title": "" }, { "docid": "80abd6e2f160c6fd5e549261ecae6da7", "score": "0.65805286", "text": "function wave($people){\n\n //good luck!\n $output = array();\n\n $words = str_split(strtolower(\"$people\"));\n $words_array = strtolower(\"$people\");\n if($words_array == \"\")\n return $output;\n\n for ($i = 0; $i < count($words); $i++){\n if($words[$i] == \" \")\n continue;\n array_push($output, substr_replace($words_array, strtoupper($words[$i]), $i, 1));\n }\n\n return $output;\n\n}", "title": "" }, { "docid": "8ae8ab767b1f0d15ccd801e4d89e331f", "score": "0.6542063", "text": "public static function wordSplit($data)\n\t{\n\t\treturn array_values(preg_grep('~\\S~', preg_split('~\\s+~', $data)));\n\t}", "title": "" }, { "docid": "477985573bf4dedf44d84b625ebe4062", "score": "0.6496662", "text": "private function words($text) {\r\n\t\t$matches = array();\r\n\t\tpreg_match_all(\"/[a-z]+/\",strtolower($text),$matches);\r\n\t\treturn $matches[0];\r\n\t}", "title": "" }, { "docid": "fa97adf9441203986718c0706d600848", "score": "0.64836067", "text": "function words($words, $delimiter = ' ')\n {\n return explode($delimiter, preg_replace('/\\s+/', ' ', $words));\n }", "title": "" }, { "docid": "45ea8e8f85630e068ef4e0cad18497b3", "score": "0.6480018", "text": "public static function words(string $string, bool $unique = true) : array\n {\n $string = static::collapse($string);\n $words = static::split($string, '/[[:space:]]+/');\n if ($unique) {\n $words = array_values(array_unique($words));\n }\n return $words;\n }", "title": "" }, { "docid": "337882baa4c634e27f15d374075ef534", "score": "0.6471511", "text": "private static function words($text)\n {\n $matches = [];\n preg_match_all(\"/[a-z]+/\", strtolower($text), $matches);\n return $matches[0];\n }", "title": "" }, { "docid": "ea24b89f6d4ddede74c805b6c153a0ff", "score": "0.6379004", "text": "public static function toWords(string $str, bool $lower = false, bool $removePunctuation = false): array\n {\n // Convert CamelCase to multiple words\n // Regex copied from Inflector::camel2words(), but without dropping punctuation\n $str = preg_replace('/(?<!\\p{Lu})(\\p{Lu})|(\\p{Lu})(?=\\p{Ll})/u', ' \\0', $str);\n\n if ($lower) {\n // Make it lowercase\n $str = mb_strtolower($str);\n }\n\n if ($removePunctuation) {\n $str = str_replace(['.', '_', '-'], ' ', $str);\n }\n\n // Remove inner-word punctuation.\n $str = preg_replace('/[\\'\"‘’“”\\[\\]\\(\\)\\{\\}:]/u', '', $str);\n\n // Split on the words and return\n return static::splitOnWords($str);\n }", "title": "" }, { "docid": "07251834aa8b91e06f95ac87555271a7", "score": "0.63646096", "text": "private function getWords()\n {\n return array(\n \"Aaye, Aiya\", \"Adan\", \"Aelin\", \"Adanedhel\", \"Aduial\", \"Aglarond\", \"Aha\", \"Ai\",\n \"Aina\", \"Ainu\", \"Aiglos\", \"Alda\", \"Aldalómë\", \"Alqua\", \"Amandil\", \"Amarth\",\n \"Ambarona\", \"Amon\", \"Ampa\", \"An\", \"Anarya\", \"Anca\", \"And\", \"Ando\", \"Andúril\",\n \"Andúnë\", \"Anga\", \"Ann-thannath\", \"Anna\", \"Anod\", \"Anto\", \"Arda\", \"Áre\", \"Asca\",\n \"Atan, Atani\", \"Avari\", \"Áze\", \"Balrog\", \"Band\", \"Bar\", \"Barad\", \"Beleg\",\n \"Bragol\", \"Bregalad\", \"Brethil\", \"Brith\", \"Calen\", \"Calma\", \"Carca\", \"Celeb\",\n \"Certar\", \"Certhas\", \"Cirth\", \"Coirë\", \"Coranar\", \"Cormallen\", \"Cormarë\",\n \"Coron\", \"Craban, Crebain\", \"Cú\", \"Cuivie\", \"Dae\", \"Dagor\", \"Daro\", \"Del\",\n \"Din\", \"Dina\", \"Dol\", \"Dôr\", \"Draug\", \"Drego\", \"Dú\", \"Duin\", \"Dúnadan, Dúnedain\",\n \"Dûr\", \"Ëar\", \"Echor\", \"Echuir\", \"Edain\", \"Edhel\", \"Edro\", \"Eithel\",\n \"Êl, Elin, Elenath\", \"Eldar\", \"Eldarin\", \"Elear\", \"Elen, Eleni, Elenion\",\n \"Elenya\", \"Emyn\", \"Endari\", \"Endóre\", \"Ennor\", \"Enquië, Enquier\", \"Enyd\",\n \"Er\", \"Ered\", \"Ereg\", \"Eryn\", \"Esgal\", \"Esse\", \"Estel\", \"Estellio\", \"Ethuil\",\n \"Falas\", \"Faroth\", \"Faug\", \"Fëa\", \"Fin\", \"Firith\", \"Formen\", \"Forn\", \"Fuin\",\n \"Gurth\", \"Gaur\", \"Gwador\", \"Luin\", \"Laer\", \"Mellon\", \"Minas\", \"Mithrin\",\n \"Namáriëor Navaer\", \"Nan\", \"Ndengina\", \"Nikerym\", \"Nimrais\", \"Numen\",\n \"Naugrim\", \"Onodrim\", \"Orodruin\", \"Parma\", \"Pelargir\", \"Quendi\", \"Quel re\",\n \"Silme\", \"Tengwa\", \"Tinco\", \"tuilë\", \"thalias\", \"Thalin\", \"Tar\", \"Úlairi\",\n \"Ulaer\", \"Urulóki\"\n );\n }", "title": "" }, { "docid": "71417b4c1e441071f4f79acfcc5306f1", "score": "0.63438207", "text": "public function words()\n {\n if(isset($this->dicionary)){\n return $this->getDicionary()->words();\n }\n\n return array();\n }", "title": "" }, { "docid": "dedd382f2237d2ae284b61fe3c696cdc", "score": "0.6325212", "text": "public function getWords(): array\n {\n return $this->words;\n }", "title": "" }, { "docid": "dedd382f2237d2ae284b61fe3c696cdc", "score": "0.6325212", "text": "public function getWords(): array\n {\n return $this->words;\n }", "title": "" }, { "docid": "cff4a3777a5b8408018da8f6fbacf33c", "score": "0.63175094", "text": "function get_words($sentence, $count = 10) {\n\tpreg_match(\"/(?:\\w+(?:\\W+|$)){0,$count}/\", $sentence, $matches);\n\treturn $matches[0];\n}", "title": "" }, { "docid": "92ca857a9803cc2d5cac59159dd44cf0", "score": "0.62900925", "text": "function extractCommonWords($string){\n $stopWords = array('i','a','about','an','and','are','as','at','be','by','com','de','en','for','from',\n 'how','in','is','it','la','of','on','or','that','the','this','to','was','what','when','where','who','will',\n 'with','und','the','www', 'also', 'you','your','yours','true','which','only','have','would','everything');\n\n $string = preg_replace('/\\s\\s+/i', '', $string); // replace whitespace\n $string = trim($string); // trim the string\n $string = preg_replace('/[^a-zA-Z0-9 -]/', '', $string); // only take alphanumerical characters, but keep the spaces and dashes too…\n $string = strtolower($string); // make it lowercase\n\n preg_match_all('/\\b.*?\\b/i', $string, $matchWords);\n $matchWords = $matchWords[0];\n\n foreach ( $matchWords as $key=>$item ) {\n if ( $item == '' || in_array(strtolower($item), $stopWords) || strlen($item) <= 3 ) {\n unset($matchWords[$key]);\n }\n }\n $wordCountArr = array();\n if ( is_array($matchWords) ) {\n foreach ( $matchWords as $key => $val ) {\n $val = strtolower($val);\n if ( isset($wordCountArr[$val]) ) {\n $wordCountArr[$val]++;\n } else {\n $wordCountArr[$val] = 1;\n }\n }\n }\n arsort($wordCountArr);\n $wordCountArr = array_slice($wordCountArr, 0, 10);\n return $wordCountArr;\n}", "title": "" }, { "docid": "65796a31ee9efc6073747a58e21de7f1", "score": "0.6269779", "text": "public function clean($input)\n {\n $words = explode(' ', $input);\n $stop_words = $this->getByLang(null, true);\n $retval = [];\n\n foreach ($words as $word) {\n $word = PMF_String::strtolower($word);\n if (!is_numeric($word) && 1 < PMF_String::strlen($word) &&\n !in_array($word, $stop_words) && !in_array($word, $retval)) {\n $retval[] = $word;\n }\n }\n\n return $retval;\n }", "title": "" }, { "docid": "31d4aa8f79e95f6072241d6f34d46fcd", "score": "0.6254956", "text": "public static function split_to_words($query)\n\t\t{\n\t\t\t$query = trim($query);\n\t\t\t\n\t\t\t$matches = array();\n\t\t\t$phrases = array();\n\t\t\tif (preg_match_all('/(\"[^\"]+\")/', $query, $matches))\n\t\t\t\t$phrases = $matches[0];\n\n\t\t\tforeach ($phrases as $phrase)\n\t\t\t\t$query = str_replace($phrase, '', $query);\n\n\t\t\t$result = array();\n\t\t\tforeach ($phrases as $phrase)\n\t\t\t{\n\t\t\t\t$phrase = trim(substr($phrase, 1, -1));\n\t\t\t\tif (strlen($phrase))\n\t\t\t\t\t$result[] = $phrase;\n\t\t\t}\n\n\t\t\t$words = explode(' ', $query);\n\t\t\tforeach ($words as $word)\n\t\t\t{\n\t\t\t\t$word = trim($word);\n\t\t\t\tif (strlen($word))\n\t\t\t\t\t$result[] = $word;\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "c2c0ec2723bd8abdf8f5adab11b9d6bc", "score": "0.6197882", "text": "public function words()\n {\n return $this->word()->oneOrMore();\n }", "title": "" }, { "docid": "eb4e658d43701a7d38155dfe3d5d1f48", "score": "0.61913", "text": "public function getSampaWords($id, $sentence = \"\") {\n $corresTab = array();\n\n if ($sentence != \"\") {\n\n $pattern = array('.', ',', '?', '!', ':', '-');\n $replace = array(' . ', ' , ', ' ? ', ' ! ', ' : ', ' - ');\n $search = str_replace($pattern, $replace, $sentence);\n $searchedWords = explode(\" \", $search);\n\n foreach ($searchedWords as $word) {\n if (in_array($word, $pattern)) {\n // punctuation\n $corresTab[] = array('word' => trim($word), 'sampa' => '');\n } else if ($entry = $this->getRepository()->getSampaEntries($id, strtolower($word))) {\n\n $corresTab[] = array('word' => $word, 'sampa' => $entry->getSampa());\n } else {\n $corresTab[] = array('word' => $word, 'sampa' => '');\n }\n }\n }\n return $corresTab;\n }", "title": "" }, { "docid": "17788ba2da3ba387ec83aba245cfe2a3", "score": "0.6169706", "text": "public static function splitIntoWords($text)\n {\n return preg_split('/[\\s.,!?]+/u', $text);\n }", "title": "" }, { "docid": "bbe8195adfa1f3e053c917501d3ce784", "score": "0.61428076", "text": "function extractFirstWord(string $sentence) {\n if ($sentence === '') return ['', ''];\n return [\n $word = explode(' ', $sentence)[0],\n substr($sentence, mb_strlen($word) + 1)\n ];\n}", "title": "" }, { "docid": "e3a62071b0aa87fe4dde673f5ad84a3d", "score": "0.61113864", "text": "function tsml_string_tokens($string) {\n\n\t//shorten words that have quotes in them instead of splitting them\n\t$string = html_entity_decode($string);\n\t$string = str_replace(\"'\", '', $string);\n\t$string = str_replace('’', '', $string);\n\t\n\t//remove everything that's not a letter or a number\n\t$string = preg_replace(\"/[^a-zA-Z 0-9]+/\", ' ', $string);\n\t\n\t//return array\n\treturn array_values(array_unique(array_filter(explode(' ', $string))));\n}", "title": "" }, { "docid": "7306316aa734de7865b8322ee22a94f8", "score": "0.6107926", "text": "protected function getEncodableWordTokens(string $string): array\n {\n $tokens = [];\n $encodedToken = '';\n // Split at all whitespace boundaries\n foreach (preg_split('~(?=[\\t ])~', $string) as $token) {\n if ($this->tokenNeedsEncoding($token)) {\n $encodedToken .= $token;\n } else {\n if ('' !== $encodedToken) {\n $tokens[] = $encodedToken;\n $encodedToken = '';\n }\n $tokens[] = $token;\n }\n }\n if ('' !== $encodedToken) {\n $tokens[] = $encodedToken;\n }\n\n return $tokens;\n }", "title": "" }, { "docid": "a7fcd54eedd1a691587b0498f5b810db", "score": "0.6073712", "text": "public function splitThaiWord( $text )\n {\n $result = array();\n $segment = new Segment();\n $splited = $segment->get_segment_array($text);\n\n return $splited;\n }", "title": "" }, { "docid": "a2ff0d60e87c363a9ed5d8a922795759", "score": "0.60551417", "text": "public function tokenize($string)\n {\n $result = new TokenArray();\n \n preg_match_all(self::WORD_REGEX, $string, $matches);\n \n if (!isset($matches[0])) return $result;\n \n foreach ($matches[0] as $match) {\n \n $match = $this->normalizeValue($match);\n \n if (isset($result[$match])) {\n $result[$match] += 1;\n } else {\n $result[$match] = 1;\n }\n }\n \n return $result;\n }", "title": "" }, { "docid": "631f64ca44c2af1f9100a103e5df713c", "score": "0.6051824", "text": "private function tokenize($text) {\n\n return explode(' ', $text);\n\n }", "title": "" }, { "docid": "cb25ce2b1bd3c018ae71dc174c264b3b", "score": "0.60325533", "text": "private static function breakAdverb($words)\n\t{\n\t\t$noun = self::getAdverb($words);\n\t\tif($noun){\n\t\t\t$adverb = trim(str_ireplace($noun, '', $words));\n\t\t\treturn [$noun, $adverb];\n\t\t}\n\t\t\n\t\treturn [];\n\t}", "title": "" }, { "docid": "a7c568bd2812875e7895cb7f225d2bef", "score": "0.60119045", "text": "public function tokenize($string);", "title": "" }, { "docid": "a7c568bd2812875e7895cb7f225d2bef", "score": "0.60119045", "text": "public function tokenize($string);", "title": "" }, { "docid": "381e180843497e3ccebce4c735554ae5", "score": "0.60021263", "text": "public function getWordFrequency($sentence){\n // explode helps to separate the words in paragraph/sentence into an array\n $sentence_arr = explode(\" \",$sentence);\n // Get the count of array in variable for use in for loop to save computation of counting in each iteration\n $count = count($sentence_arr);\n if($count>0){\n $final = array();\n // stop words from https://gist.github.com/sebleier/554280\n $stop_words = \"i,me,my,myself,we,our,ours,ourselves,you,your,yours,yourself,yourselves,he,him,his,himself,she,her,hers,herself,it,its,itself,they,them,their,theirs,themselves,what,which,who,whom,this,that,these,those,am,is,are,was,were,be,been,being,have,has,had,having,do,does,did,doing,a,an,the,and,but,if,or,because,as,until,while,of,at,by,for,with,about,against,between,into,through,during,before,after,above,below,to,from,up,down,in,out,on,off,over,under,again,further,then,once,here,there,when,where,why,how,all,any,both,each,few,more,most,other,some,such,no,nor,not,only,own,same,so,than,too,very,s,t,can,will,just,don,should,now\";\n $stop_words = explode(',', $stop_words);\n for($i =0 ;$i<$count;$i++){\n // convert to lowercase\n $sentence_arr[$i] = strtolower($sentence_arr[$i]);\n\n // consider alpha numeric and words not in stop word list\n if(ctype_alnum($sentence_arr[$i]) && !in_array($sentence_arr[$i],$stop_words)){\n if($final[$sentence_arr[$i]]){\n $final[$sentence_arr[$i]] += 1;\n } else {\n $final[$sentence_arr[$i]] = 1;\n }\n }\n }\n // sort the array in descending order of the count\n arsort($final);\n $sorted = array();\n $count = count($final);\n // merge all words with similar count into 1 string and in comma separated form\n foreach($final as $key=>$value){\n if($sorted[$value]){\n $sorted[$value] = $sorted[$value].\",\".$key;\n } else {\n $sorted[$value] = $key;\n }\n }\n if(count($sorted) > 0){\n return $sorted;\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ab6b8b69376cfea87055b1d9391844c5", "score": "0.60009605", "text": "public function testGetWordsFromString()\n {\n $string = 'Hello World';\n $data = $this->serviceTweet->getWordsFromString($string);\n $this->assertTrue(is_array($data));\n }", "title": "" }, { "docid": "d87c6addd4bc13ff8aeddef43221cd86", "score": "0.59876996", "text": "public function parse(string $string): array\n {\n $result = [];\n\n if (!preg_match_all('/[\\\\p{L}0-9_]+/u', $string, $matches, PREG_OFFSET_CAPTURE)) {\n return $result;\n }\n foreach ($matches[0] as $match) {\n [$block, $position] = $match;\n $block = trim($block, '_');\n\n // skip numbers\n if (preg_match('/^[0-9]+$/', $block)) {\n continue;\n }\n\n if (strpos($block, '_') !== false) {\n // FOO_BAR or fooBar_barBaz\n $parts = explode('_', $block);\n $underscore = true;\n } else {\n $parts = [$block];\n $underscore = false;\n }\n\n $offset = 0;\n foreach ($parts as $part) {\n if (isset(self::$exceptions[$part])) {\n // FOOBar\n $result[] = new Word($part, $underscore ? $block : null, $position + $offset);\n } elseif (preg_match('/^[\\\\p{Lu}]+$/u', $part)) {\n // FOO\n $result[] = new Word($part, $underscore ? $block : null, $position + $offset);\n } else {\n $words = array_values(array_filter(preg_split('/(?=[\\\\p{Lu}])/u', $part)));\n if (count($words) === 1) {\n // foo\n $result[] = new Word($words[0], $underscore ? $block : null, $position + $offset);\n } else {\n // fooBar\n $offset2 = 0;\n foreach ($words as $word) {\n if (preg_match('/^[0-9]+$/', $word)) {\n continue;\n }\n $result[] = new Word($word, $block, $position + $offset + $offset2);\n $offset2 += strlen($word);\n }\n }\n }\n $offset += strlen($part) + 1;\n }\n }\n\n return $result;\n }", "title": "" }, { "docid": "a8f060add7687a895d396729a420702c", "score": "0.5986532", "text": "public static function SplitWords($delim, $s)\r\n\t{\r\n\t\treturn $s=='' ? array() : preg_split(\"/\\s*($delim)\\s*/\", $s);\r\n\t}", "title": "" }, { "docid": "76656fcd4552db3b9e7c58d0cc9a0acd", "score": "0.5962396", "text": "protected function calulateString($string)\n {\n $source = preg_split(\"(\\b\\W+\\b)\", $string);\n $ignore = [ 'post', 'topic', 'http', 'www', 'com' ]; // ignore word to count\n $words = [];\n $i = null;\n\n foreach ($source as $w)\n {\n if (strlen($w) >= $this->chars && !preg_match(\"/\\A\\d+\\Z/\", $i) && !preg_match(\"/\\A(\\w)\\1+\\Z/\", $i) && !in_array($w, $ignore)) {\n $words[] = $w;\n }\n }\n\n $numWords = count($words);\n $string = strtolower(implode(' ', $words));\n $phrase = [];\n\n for ($i = 0; $i < $numWords; $i ++) {\n\n for ($j = $this->maximum; $j >= $this->minimum; $j --) {\n\n $index = $words[$i];\n if ($j > 1) {\n\n for ($k = 1; $k < $j; $k ++) {\n\n if(isset($words[$i + $k])) {\n $index .= ' ' . $words[$i + $k];\n }\n }\n }\n\n $matches = substr_count($string, $index);\n if ($matches >= $this->frequence)\n {\n $phrase[$index] = $matches;\n break;\n }\n }\n set_time_limit(1);\n }\n\n arsort($phrase);\n\n return $phrase;\n }", "title": "" }, { "docid": "d62afcca9feaa70586b362aee624f2d9", "score": "0.5942641", "text": "function stop_words($what) {\n // like a sucker. Why? Because this is a domain specific application so there's work.\n // ok ok ... what I really did was this:\n // cat title-list.txt | tr ' ' '\\n' | grep -vE '[0-9]*' | sort | uniq -c | sort -nr |\n static $word_list = ['deal', 'day', 'sell', 'obo', 'black', 'priced', 'mile', 'perfect', 'needs', 'service', 'this', 'is', 'gas', 'accident', 'luxury', 'special', 'cold', 'well', 'loaded', 'owner', 'no', 'in', 'white', 'must', 'sale', 'carfax', 'car', 'leather', 'condition', 'runs', 'payments', 'inch', 'will', 'reliable', 'inspected', 'awesome', 'or', 'new', 'price', 'on', 'all', 'mileage', 'trade', 'warranty', 'best', 'blue', 'red', 'original', 'smog', 'good', 'nice', 'under', 'mint', 'of', 'up', 'rare', 'full', 'wow', 'custom', 'the', 'with', 'like', 'miles', 'clean', 'title', 'only', 'for', 'excellent', 'great', 'very', 'one', 'fully', 'very', 'and', 'low'];\n $parts = explode(' ', $what);\n $final = [];\n foreach($parts as $word) {\n if(array_search($word, $word_list) === false && strlen($word) > 1) {\n $final[] = $word;\n }\n }\n return implode(' ', $final);\n}", "title": "" }, { "docid": "8ad39d060b582ee1f418d0cd3fb6408b", "score": "0.59402204", "text": "function createArrayOfLetters($string) {\n $array = str_split($string);\n return $array;\n}", "title": "" }, { "docid": "2a83f882b145f993af31af90d7dbd20b", "score": "0.59149957", "text": "function string_to_array($string) {\n $uc_string = ucwords($string);\n $array = explode(',', $uc_string);\n $new_array = array();\n \n foreach($array as $a) {\n array_push($new_array, trim($a));\n }\n \n return $new_array;\n}", "title": "" }, { "docid": "6aab801ac6d4c574a39233421f18d836", "score": "0.5911456", "text": "public function countWordsInString(string $fileContentString) : array\n {\n return str_word_count($fileContentString, 1);\n }", "title": "" }, { "docid": "916d1b26645487957df0388221af1d1b", "score": "0.58996016", "text": "function countWords($string){\n\n\t\t\t$string = preg_replace('/[^\\\\w\\\\s]/i', '', $string);\n\n\t\t\t$words = $chars = preg_split('/ /', $string, -1, PREG_SPLIT_NO_EMPTY);\n\n\t\t\treturn count($words);\n\n\t\t}", "title": "" }, { "docid": "2dca1d4f5106192bc3beafc46fdce8b9", "score": "0.58944297", "text": "function do_explode($text)\r\n\t{\r\n\t\treturn explode(\" \", $text);\r\n\t}", "title": "" }, { "docid": "38aa9134811e2ca1ddf56bb0833c5d1e", "score": "0.588749", "text": "function stringToArray($s) {\r\n\treturn (preg_split (\"/[\\s,]+/\", $s));\r\n}", "title": "" }, { "docid": "ab4bb58b99b1b4925db26bccf36d9a5b", "score": "0.58167523", "text": "public static function splitWords(string $text, ?int $limit = null): array\n {\n return explode(self::WHITESPACE_SEQUENCE, static::normalizeWhitespace($text), $limit ?? PHP_INT_MAX);\n }", "title": "" }, { "docid": "eb47492c430d5d2f510822943b775d42", "score": "0.57766265", "text": "function getAllWords($masterRack) {\n $racks = getSubRacks($masterRack);\n $result = [];\n foreach ($racks as &$rack) {\n $words = explode('@@',getWords($rack));\n foreach($words as $w) {\n if (!($w == null)) array_push($result,$w);\n }\n }\n return $result;\n }", "title": "" }, { "docid": "3887779e0b40e41eb9c06eb157ad2fd1", "score": "0.57758313", "text": "private function processValuesToArray($words) {\n return preg_split('/\\s+/', $words, -1, PREG_SPLIT_NO_EMPTY);\n }", "title": "" }, { "docid": "879c6bcf8a2472eaf7af296395cc4c65", "score": "0.57711065", "text": "public function parse_2words()\r\n\t{\r\n\t\t$x = explode(\" \", $this->contents);\r\n\t\t//initilize array\r\n\r\n\t\t//$y = array();\r\n\t\tfor ($i=0; $i < count($x)-1; $i++) {\r\n\t\t\t//delete phrases lesser than 5 characters\r\n\t\t\tif( (mb_strlen(trim($x[$i])) >= $this->word2WordPhraseLengthMin ) && (mb_strlen(trim($x[$i+1])) >= $this->word2WordPhraseLengthMin) )\r\n\t\t\t{\r\n\t\t\t\t$y[] = trim($x[$i]).\" \".trim($x[$i+1]);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//count the 2 word phrases\r\n\t\t$y = array_count_values($y);\r\n\r\n\t\t$occur_filtered = $this->occure_filter($y, $this->phrase2WordLengthMinOccur);\r\n\t\t//sort the words from highest count to the lowest.\r\n\t\tarsort($occur_filtered);\r\n\r\n\t\t$imploded = implode(\", \", $occur_filtered);\r\n\t\t//release unused variables\r\n\t\tunset($y);\r\n\t\tunset($x);\r\n\r\n\t\treturn $imploded;\r\n\t}", "title": "" }, { "docid": "ad0bdcb873586a6e31804e03534b9c4d", "score": "0.57551795", "text": "function txt2array($input){\n\t$tmp = preg_split('/$\\R?^/m', $input);\n\tforeach($tmp as $item){\n\t\t$output[]=array('text'=> trim($item));\n\t}\n\treturn $output;\n}", "title": "" }, { "docid": "101a89e0f91eae22635ce6a3e5036167", "score": "0.5751421", "text": "private function strSplitWordFriendly($str, $size){\r\n $str = trim(strip_tags($str));\r\n $length = strlen($str);\r\n\r\n $ex = explode(' ',$str);\r\n\r\n $op = array();\r\n\r\n $newarr = '';\r\n foreach($ex as $word){\r\n if (strlen(' '.$word) > $size){\r\n $op[] = $newarr;\r\n $newarr = '';\r\n $splitA = str_split($word, $size);\r\n $op = array_merge($op, $splitA);\r\n echo \"DASS\";\r\n }elseif (strlen($newarr.' '.$word) <= $size && !( ($size-strlen($newarr)) > $size*0.15 && strstr($newarr,'.')) ){\r\n $newarr .= ' '.$word;\r\n }else {\r\n $op[] = $newarr;\r\n $newarr = '';\r\n $newarr = $word;\r\n }\r\n\r\n }\r\n if ($newarr)$op[] = $newarr;\r\n return $op;\r\n }", "title": "" }, { "docid": "1b090cca15b58b8b7f764c5a47f8bc61", "score": "0.5720656", "text": "public function getSentences(){\n\t\treturn explode('.', $this->paragraph);\n\t}", "title": "" }, { "docid": "87a0639c6ae309119060ef8c79aa3a4b", "score": "0.5711269", "text": "private function parse(string $input) : array\n {\n $words = Number::orderedArray($input)\n + Plus::orderedArray($input)\n + Minus::orderedArray($input)\n + Multiply::orderedArray($input)\n + Divide::orderedArray($input);\n ksort($words);\n\n // get rid of messed up indices\n return array_values($words);\n }", "title": "" }, { "docid": "4dfa1d1e70b41b242a3d281ca78a9c4b", "score": "0.5710504", "text": "public function extractKeyWords($string)\n {\n mb_internal_encoding('UTF-8');\n $stopwords = array();\n $string = preg_replace('/[\\pP]/u', '', trim(preg_replace('/\\s\\s+/iu', '', mb_strtolower($string))));\n $matchWords = array_filter(explode(' ', $string), function ($item) use ($stopwords) {\n return !($item == '' || in_array($item, $stopwords) || mb_strlen($item) <= 2 || is_numeric($item));\n });\n $wordCountArr = array_count_values($matchWords);\n arsort($wordCountArr);\n return array_keys(array_slice($wordCountArr, 0, 10));\n }", "title": "" }, { "docid": "847471250fc860bd4241512e30c794e9", "score": "0.5682421", "text": "protected static function tokenize(string $input) : array\n {\n $tokens = array_filter(\n explode(\n ' ',\n str_replace(['(', ')'], [' ( ', ' ) '], $input)\n ),\n function($value) {\n return $value !== '';\n }\n );\n\n return $tokens;\n }", "title": "" }, { "docid": "7a0944ef8651d56f1bb91d048b91c1ca", "score": "0.5641156", "text": "protected function getWordList()\n {\n $this->listString = $this->extractor->extractList($this->requestSearch());\n\n //For each words in the list get the Definition\n return explode(';', $this->listString);\n }", "title": "" }, { "docid": "8e5e23a341997dc07902cbe52a2cdf6f", "score": "0.5633155", "text": "protected function separateWordsInSpans($text) \n\t{\n\t\t//print \"<br><b>enter.separateWordsInSpans</b>($text) \";\n\t\t//Filter bad chars as nl or tabs\n\t\t$pattern = '/[\\n\\t]/';\n\t\t$text = (trim(preg_replace($pattern, '', $text)));\n\t\t\n\t\t$title = lg(\"lblActionsOnWord\");\n\t\t$language_specialchars='ßÀÁÂÃÄÅàáâãäåÒÓÔÕÖØòóôõöøÈÉÊËèéêëÇçÌÍÎÏìíîïÙÚÛÜùúûüÿÑñ';\n\t\t\n\t\t$pattern = '/[A-Za-z0-9'.$language_specialchars.'\\-_]+/u';\n\t\t\n\t\t$replace = '<span class=\"result-word\" title=\"' . $title . '\"'\n\t\t.\" onmouseover=\\\"phf('$0')\\\" \"\n\t\t.\" onmouseout=\\\"puh('$0')\\\" \"\n\t\t.\" onclick=\\\"prr('$0')\\\" \"\n\t\t.'>$0</span>';\n\n\t\t$result= preg_replace($pattern, $replace, $text);\n\t\t//print \"<br><b>exit.separateWordsInSpans</b>($text):<br>(((\".htmlentities($result).')))';\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "abe892e79bbb99add002defef02ed391", "score": "0.56234896", "text": "public static function caseTransformations(string $word): iterable\n {\n $cases = [];\n\n $cases[0] = Str::lower($word);\n $cases[1] = Str::title($word);\n $cases[2] = Str::upper($word);\n $cases[3] = Str::kebab($word);\n $cases[4] = Str::snake($word);\n $cases[5] = Str::slug($word);\n $cases[6] = Str::camel($word);\n $cases[7] = Str::ucfirst(Str::camel($word));\n $cases[8] = Str::upper(Str::camel($word));\n\n return $cases;\n }", "title": "" }, { "docid": "775fa8c96e61ac861aaf027e0ad2f1d5", "score": "0.56002337", "text": "function words($str,$num)\n {\n $limit = $num - 1 ;\n $str_tmp = '';\n $str = str_replace(']]>', ']]&gt;', $str);\n $str = strip_tags($str);\n $arrstr = explode(\" \", $str);\n if ( count($arrstr) <= $num ) { return $str; }\n if (!empty($arrstr))\n {\n for ( $j=0; $j< count($arrstr) ; $j++) \n {\n $str_tmp .= \" \" . $arrstr[$j];\n if ($j == $limit) \n {\n break;\n }\n }\n }\n return $str_tmp.\"...\";\n }", "title": "" }, { "docid": "bd067c9e0adecf689d32f48acbd34058", "score": "0.5570491", "text": "function str_split_ucwords($string)\n{\n return ucwords(str_replace('_', ' ', $string));\n}", "title": "" }, { "docid": "4e816442883d61ed9772326a83a6b7ce", "score": "0.55641586", "text": "function spellcheck($string)\n{\n $words = preg_split('/[\\W]+?/',$string);\n $misspelled = $return = array();\n\n /*\n $config = pspell_config_create('en');\n pspell_config_personal($config, 'Utilities/custom.pws');\n $int = pspell_new_config($config);\n pspell_add_to_personal($int, \"GameSurge\");\n pspell_save_wordlist($int);\n */\n $int = pspell_new('en');\n\n foreach ($words as $value) {\n if (!pspell_check($int, $value)) {\n $misspelled[] = $value;\n }\n }\n foreach ($misspelled as $value) {\n $return[$value] = pspell_suggest($int, $value);\n }\n return $return;\n}", "title": "" }, { "docid": "7e082d34bd9d00f1efcc9a38b59df6f6", "score": "0.55618805", "text": "public function dataSampleWords()\n {\n return [\n ['', ''],\n // irregular\n ['ben', 'biz'],\n ['sen', 'siz'],\n ['o', 'onlar'],\n\n // If a noun ends in a vowel, make it plural by adding -s\n ['gün', 'günler'],\n ['kiraz', 'kirazlar'],\n ['kitap', 'kitaplar'],\n ['köpek', 'köpekler'],\n ['test', 'testler'],\n ['üçgen', 'üçgenler']\n ];\n }", "title": "" }, { "docid": "ea94295137dddac575de53b7c642c2ab", "score": "0.5558096", "text": "public function dataSampleWords()\n {\n return [\n ['', ''],\n // irregular\n ['chão', 'chãos'],\n ['charlatão', 'charlatães'],\n ['cidadão', 'cidadãos'],\n ['consul', 'consules'],\n ['cristão', 'cristãos'],\n ['difícil', 'difíceis'],\n ['email', 'emails'],\n\n ['patrão', 'patrões'],\n ['ladrão', 'ladrões'],\n ['casarão', 'casarões'],\n # Palavras terminadas em (r|s|z) adiciona es\n # Palavras terminadas em (a|e|o|u) + l adiciona is\n # Palavras terminadas em il adiciona is\n ['cantil', 'cantis'],\n ['canil', 'canis'],\n # Palavras terminadas em (m|n) adiciona ns\n ['afim', 'afins'],\n ['agiotagem', 'agiotagens'],\n # Pdrão simplismente adiciona s\n ['carro', 'carros'],\n ['familia', 'familias']\n\n\n ];\n }", "title": "" }, { "docid": "add087d9f60531526a4a0b345017e137", "score": "0.55501044", "text": "function ucsentences($String)\n{\n $Sentences = preg_split('/([.?!—:]+)/', $String, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\n $New_String = '';\n foreach ($Sentences as $Key => $Sentence) {\n if (( $Key & 1 ) == 0) {\n $New_String .= ucfirst(strtolower(trim($Sentence)));\n } else {\n $New_String .= $Sentence.' ';\n }\n }\n\n return trim($New_String);\n}", "title": "" }, { "docid": "c05029b537c74c571c65469b57fa265a", "score": "0.5535179", "text": "public static function splitIntoSentences($text)\n {\n return preg_split('/(?<=[.?!])\\s+(?=[a-z])/i', $text);\n }", "title": "" }, { "docid": "645e0583a231b2282474d16eb72adb07", "score": "0.5532477", "text": "public function textarea_to_array( $string ) {\n\t\treturn explode( ',', str_replace( ' ', '', $string ) );\n\t}", "title": "" }, { "docid": "cfe2b54435b477635006d161a1fefc26", "score": "0.5509806", "text": "function explode_words_into_morphemes($engtext){\n\tglobal $dic;\n\t$engtext2=array();\n\tforeach($engtext as $word){\n\t\tif(mb_substr($word,-1,1)=='s'){\n\t\t\tif(mb_substr($word,0,mb_strlen($word)-1)=='ha'){\n\t\t\t\t$engtext2[]='have';\n\t\t\t\t$engtext2[]='s';\n\t\t\t}elseif(mb_substr($word,0,mb_strlen($word)-1)=='wa'){\n\t\t\t\t$engtext2[]='be';\n\t\t\t\t$engtext2[]='ed';\n\t\t\t}elseif(mb_substr($word,0,mb_strlen($word)-1)=='i'){\n\t\t\t\t$engtext2[]='be';\n\t\t\t\t$engtext2[]='pr-si';\n\t\t\t}else{\n\t\t\t\t$engtext2[]=mb_substr($word,0,mb_strlen($word)-1);\n\t\t\t\t$engtext2[]='s';\n\t\t\t}\n\t\t}elseif(mb_substr($word,-1,1)=='n'){\n\t\t\tif(mb_substr($word,0,mb_strlen($word)-1)=='know'){\n\t\t\t\t$engtext2[]='know';\n\t\t\t\t$engtext2[]='ed-pp';\n\t\t\t}\n\t\t}elseif(mb_substr($word,-1,1)=='t'){\n\t\t\tif(mb_substr($word,0,mb_strlen($word)-1)=='me'){\n\t\t\t\t$engtext2[]='meet';\n\t\t\t\t$engtext2[]='ed-pp';\n\t\t\t}elseif(mb_substr($word,0,mb_strlen($word)-1)=='buil'){\n\t\t\t\t$engtext2[]='build';\n\t\t\t\t$engtext2[]='ed-pp';\n\t\t\t}elseif(mb_substr($word,0,mb_strlen($word)-1)=='bough'){\n\t\t\t\t$engtext2[]='buy';\n\t\t\t\t//$engtext2[]='ed-pp';//or ed ?\n\t\t\t\t//may be i will replace ed to ed-ps. no. i have tried it , but i have seen then the next elseif block , i will try that way\n\t\t\t\tif($engtext2[count($engtext2)-3]=='be'||$engtext2[count($engtext2)-3]=='have'){\n\t\t\t\t\t$engtext2[]='ed-pp';\n\t\t\t\t}else{\n\t\t\t\t\t$engtext2[]='ed';\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$engtext2[]=$word;\n\t\t\t}\n\t\t}elseif(mb_substr($word,-2,2)=='ed'){\n\t\t\t$engtext2[]=mb_substr($word,0,mb_strlen($word)-2);\n\t\t\tif(isset($engtext2[count($engtext2)-3])&&($engtext2[count($engtext2)-3]=='be'||$engtext2[count($engtext2)-3]=='have')){\n\t\t\t\t$engtext2[]='ed-pp';\n\t\t\t}else{\n\t\t\t\t$engtext2[]='ed';\n\t\t\t}\n\t\t}elseif(mb_substr($word,-2,2)=='er'){//er in teacher is also almost grammatical...\n\t\t\t$word1=mb_substr($word,0,mb_strlen($word)-2);\n\t\t\tif(isset($dic[$word1])&&$dic[$word1]['type']=='verb'){\n\t\t\t\t$engtext2[]=$word1;\n\t\t\t\t$engtext2[]='er';\n\t\t\t}else{\n\t\t\t\t$engtext2[]=$word;\n\t\t\t}\n\t\t}elseif(mb_substr($word,-1,1)=='d'){\n\t\t\tif(mb_substr($word,0,mb_strlen($word)-1)=='rea'){\n\t\t\t\t$engtext2[]='read';\n\t\t\t\t$engtext2[]='ed-pp';\n\t\t\t}\n\t\t}elseif(isset($dic[$word])&&$dic[$word]['type']=='verb'){\n\t\t\t$engtext2[]=$word;\n\t\t\t$engtext2[]='pr-si';//present simple\n\t\t}else{\n\t\t\t$engtext2[]=$word;\n\t\t}\n\t}\n\treturn $engtext2;\n}", "title": "" }, { "docid": "617d92df32b880a74903504050fdd248", "score": "0.5492274", "text": "public static function word_split($str, $words = 15)\r\n\t{\r\n\t\t$arr = preg_split(\"/[\\s]+/\", $str,$words+1);\r\n\t\t$arr = array_slice($arr,0,$words);\r\n\t\treturn join(' ',$arr).((count($arr)>$words) ? \"...\" : null);\r\n\t}", "title": "" }, { "docid": "7b6e9b734a0fa8a696d0b05efd1331a4", "score": "0.5490815", "text": "public function akkusative(string $word): array\n {\n $this->isBackWovelWord($word); // call this even not used so caching works\n return array(\"match\" => $word, \"answer\" => $word);\n }", "title": "" }, { "docid": "ffc5b62602cb1f4ac6abd300c501fded", "score": "0.5457708", "text": "private function search_split()\n\t{\n\t\t $inputStr = $this->input->post('searchInput');\n\t\t $inputArr = explode(\" \", $inputStr);\n\t\t return $inputArr;\n }", "title": "" }, { "docid": "3a729355934a3119ae47f60cde73ccd5", "score": "0.5427735", "text": "function extract_tags($text) {\r\n\t\tglobal $common_words, $other_common_words, $twitter_words;\r\n\t\t// remove urls (they are included in the entities anyway)\r\n\t\t$text = preg_replace(\"/https?:\\/\\/.+($|\\s)/i\", \"\", $text);\r\n\t\t// remove non-word characters\r\n\t\t$text = preg_replace(\"/[^a-z0-9\\s]/i\", \"\", $text);\r\n\t\t// remove common words\r\n\t\t$text = preg_replace(\"/\\b(\" . $common_words . \"|\" . $other_common_words . \"|\" . $twitter_words . \")\\b\\s?/i\", \"\", $text);\r\n\t\t// remove searched twitter handle\r\n\t\t//$text = preg_replace(\"/\\b\". $handle . \"\\b\\s?/i\", \"\", $text);\r\n\t\t\r\n\t\t$words = preg_split(\"/\\s+/\", $text);\r\n\t\treturn $words;\r\n\t}", "title": "" }, { "docid": "6288f680b81ea11306615674ec8c91e2", "score": "0.5422243", "text": "public function parse(string $word) : array\n\t{\n\t\t$html = (string) $this->httpClient->get($word, $this->httpOptions)->getBody();\n\n\t\t$dom = new Dom;\n\t\t$dom->load($html);\n\n\t\t$content = trim((string) $dom->find('.content div#article')->innerHtml());\n\n\t\treturn ['word' => $word, 'content' => $content];\n\t}", "title": "" }, { "docid": "8d611d773af7574aa522a952d6250b7f", "score": "0.5395791", "text": "protected static function tokenizeUntyped($str)\n {\n return explode(' ', $str);\n }", "title": "" }, { "docid": "0061a9ddf73eb9325dc7b4482fcc9538", "score": "0.5394804", "text": "function StemPhrase($phrase)\n\t{\n\t\t$phrase = preg_replace('/\\{.*?\\}/', '', $phrase);\n\n\t // add spaces between tags\n\t\t$phrase = str_replace(\"<\",\" <\",$phrase);\n\t\t$phrase = str_replace(\">\",\"> \",$phrase);\n\n\t\t// strip out html and php stuff\n\t\t$phrase = strip_tags($phrase);\n\n\t\t// escape meta characters\n\t\t$phrase = preg_quote($phrase);\n\n\t\t// split into words\n\t\t// strtolower isn't friendly to other charsets\n\t\t$phrase = preg_replace(\"/([A-Z]+)/e\",\n\t\t\t\t\"strtolower('\\\\1')\",\n\t\t\t\t$phrase);\n\t\t//$words = preg_split('/[\\s,!.()+-\\/\\\\\\\\]+/', $phrase);\n\t\t$words = preg_split('/[\\s,!.;:\\?()+-\\/\\\\\\\\]+/', $phrase);\n\n\t\t// ignore stop words\n\t\t$words = $this->RemoveStopWordsFromArray($words);\n\n\t\t$stemmer = new PorterStemmer();\n\n\t\t// stem words\n\t\t$stemmed_words = array();\n\t\t$stem_pref = $this->GetPreference('usestemming', 'false');\n\t\tforeach ($words as $word)\n\t\t{\n\t\t\t//trim words get rid of wrapping quotes\n\t\t\t$word = trim($word, ' \\'\"');\n\n\t\t\tif (strlen($word) <= 0)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif ($stem_pref == 'true')\n\t\t\t\t$stemmed_words[] = $stemmer->stem($word, true);\n\t\t\telse\n\t\t\t\t$stemmed_words[] = $word;\n\t\t}\n\n\t\treturn $stemmed_words;\n\t}", "title": "" }, { "docid": "4a9b73b9be112661844045435c594d7b", "score": "0.53864104", "text": "function text2words($text, $encrypt = false)\n{\n\t// Step 0: prepare numbers so they are good for search & index 1000.45 -> 1000_45\n\t$words = preg_replace('~([\\d]+)[.-/]+(?=[\\d])~u', '$1_', $text);\n\n\t// Step 1: Remove entities/things we don't consider words:\n\t$words = preg_replace('~(?:[\\x0B\\0\\x{A0}\\t\\r\\s\\n(){}\\\\[\\\\]<>!@$%^*.,:+=`\\~\\?/\\\\\\\\]+|&(?:amp|lt|gt|quot);)+~u', ' ', strtr($words, array('<br />' => ' ')));\n\n\t// Step 2: Entities we left to letters, where applicable, lowercase.\n\t$words = un_htmlspecialchars(ElkArte\\Util::strtolower($words));\n\n\t// Step 3: Ready to split apart and index!\n\t$words = explode(' ', $words);\n\n\tif ($encrypt)\n\t{\n\t\t$blocklist = getBlocklist();\n\t\t$returned_ints = [];\n\n\t\t// Only index unique words\n\t\t$words = array_unique($words);\n\t\tforeach ($words as $word)\n\t\t{\n\t\t\t$word = trim($word, '-_\\'');\n\t\t\tif ($word !== '' && !in_array($word, $blocklist) && Elkarte\\Util::strlen($word) > 2)\n\t\t\t{\n\t\t\t\t// Get a hex representation of this word using a database indexing hash\n\t\t\t\t// designed to be fast while maintaining a very low collision rate\n\t\t\t\t$encrypted = hash('FNV1A32', $word);\n\n\t\t\t\t// Create an integer representation, the hash is an 8 char hex\n\t\t\t\t// so the largest int will be 4294967295 which fits in db int(10)\n\t\t\t\t$returned_ints[$word] = hexdec($encrypted);\n\t\t\t}\n\t\t}\n\n\t\treturn $returned_ints;\n\t}\n\telse\n\t{\n\t\t// Trim characters before and after and add slashes for database insertion.\n\t\t$returned_words = array();\n\t\tforeach ($words as $word)\n\t\t{\n\t\t\tif (($word = trim($word, '-_\\'')) !== '')\n\t\t\t{\n\t\t\t\t$returned_words[] = substr($word, 0, 20);\n\t\t\t}\n\t\t}\n\n\t\t// Filter out all words that occur more than once.\n\t\treturn array_unique($returned_words);\n\t}\n}", "title": "" }, { "docid": "8bfd3f8065d0e133cfde0de08f7bf1ae", "score": "0.5374544", "text": "public function generateTyposAsArray(string $word): array\n {\n return iterator_to_array($this->generateTypos($word), false);\n }", "title": "" }, { "docid": "ba7f50f5b3a078aa66e1e16276b58509", "score": "0.5372118", "text": "private function tokenise($text) {\n mb_internal_encoding(\"utf-8\");\n mb_regex_encoding(\"utf-8\");\n $text = mb_strtolower(mb_convert_kana($text, 'as'));\n // remove all non alphanumeric characters from string\n $text = mb_ereg_replace(\"[;,.\\-\\–\\?\\!。、?!]+\", '', $text);\n return preg_split('/\\s+/', $text);\n }", "title": "" }, { "docid": "599dbdd90e3ba6675b181364c0d3513f", "score": "0.53612643", "text": "function alphabet_soup($str) {\n\t//lowercase input\n\t$str = strtolower($str);\n\t//removes special characters but not spaces\n\t$str = preg_replace(\"/[^ \\w]+/\", '', $str);\n\t// converts $str into an array with each word as an element\n\t$array1 = explode(' ', $str);\n\t// turns $str into an array, with each word as a separate element\n\t\n\t//converts each element of $array1 their own array,\n\t//then alphabetizes each array and returns the value as a string\n\tforeach ($array1 as $value) {\n\t\t// cycles through $array1 and breaks each element into its own string\n\t\t$array2 = str_split($value);\n\t\t//Alphabetizes each word separately in the string\n\t\tsort($array2);\n\t\t// echos the value from the array and puts a space between each word\n\t\t$string .= implode($array2) . ' ';\n\t}\n\treturn $string;\n}", "title": "" }, { "docid": "55d94dbe420251d4ef933daf95f9c140", "score": "0.5359675", "text": "function words($str,$num)\n {\n $limit = $num - 1 ;\n $str_tmp = '';\n $str = str_replace(']]>', ']]&gt;', $str);\n $str = strip_tags($str);\n $arrstr = explode(\" \", $str);\n if ( count($arrstr) <= $num ) { return $str; }\n if (!empty($arrstr))\n {\n for ( $j=0; $j< count($arrstr) ; $j++) \n {\n $str_tmp .= \" \" . $arrstr[$j];\n if ($j == $limit) \n {\n break;\n }\n }\n }\n return $str_tmp.\"...\";\n }", "title": "" }, { "docid": "05ccc693728fe122b4a8c30ef24ae149", "score": "0.534884", "text": "public function wordExtract($message){\n\t\t$processedMsg = \"\";\n\t\t$arr = str_word_count($message,1);\n\t\t$arrayLength = count($arr);\n\t\tfor($count=0; $count < $arrayLength; $count++){\n\t\t\tif(strlen(strval($arr[$count])) > 3){\n\t\t\t\t$processedMsg = $processedMsg.strval($arr[$count]).\" \";\n\t\t\t}else{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\treturn trim($processedMsg);\n\t}", "title": "" }, { "docid": "caa811c591d919eb9a4c531f2e0c0a32", "score": "0.53465635", "text": "public function testStringCanBeLimitedByWords()\n {\n $app = $this->getApplication();\n $str = new String($app);\n $this->assertEquals('Taylor...', $str->words('Taylor Otwell', 1));\n $this->assertEquals('Taylor___', $str->words('Taylor Otwell', 1, '___'));\n $this->assertEquals('Taylor Otwell', $str->words('Taylor Otwell', 3));\n }", "title": "" }, { "docid": "5e5da37998ecda8d5a76ff0a1db3c800", "score": "0.5341158", "text": "function getBannerArray ($bannerString) {\n\treturn preg_split('/([[:upper:]][[:lower:]]+)/', $bannerString, null, PREG_SPLIT_DELIM_CAPTURE|PREG_SPLIT_NO_EMPTY);\n}", "title": "" }, { "docid": "a70ab151010c173a1db73efeb5b34404", "score": "0.5333159", "text": "public static function shortStopWords() {\n return ['a', 'am', 'an', 'and', 'are', 'as', 'at', 'be', 'but', 'by', 'for', 'from', 'i', 'if', 'in', 'is', 'it', 'its', 'me', 'no', 'not', 'of', 'on', 'or', 'so', 'the', 'to', 'us', 'was', 'we', 'who', 'with'];\n }", "title": "" }, { "docid": "ff6fb82c1a0d8eacb82856bc5b72191b", "score": "0.53318113", "text": "static function ignoredWords(){\n return array(\"a\", \"o\", \"de\", \"da\", \"do\", \"em\", \"e\", \"para\", \"por\", \"que\");\n }", "title": "" }, { "docid": "006956b89adad802480cd66798b3cc90", "score": "0.5325425", "text": "public function testMakeTweetsFromArrayWords()\n {\n $data = [\n 'Hello',\n 'World'\n ];\n $data = $this->serviceTweet->makeTweetsFromArrayWords($data);\n $this->assertTrue(is_array($data));\n }", "title": "" }, { "docid": "80d7eafc6814b1808399c1d942987965", "score": "0.5324229", "text": "function ft_split($str)\n{\n\t$res = array();\n\t$tab = explode(\" \",$str);\n\t$tab = array_filter($tab);\n\tsort($tab);\n\tforeach($tab as $elem)\n\t{\n\t\t$res[] = $elem;\n\t}\t\n\treturn ($res);\n}", "title": "" }, { "docid": "ae239b2fba8ab697123b62da2dd2b35e", "score": "0.5308075", "text": "public function getCommonWordList()\n\t\t{\n\t\t\tif ($this->_common_words)\n\t\t\t\t{\n\t\t\t\t\treturn $this->_common_words;\n\t\t\t\t}\n\n\t\t\t$this->_common_words = array();\n\n\t\t\t$sql = 'SELECT words FROM '.$this->CFG['db']['tbl']['common_words'].' WHERE id = 1';\n\t\t\t$stmt = $this->dbObj->Prepare($sql);\n\t\t\t$rs = $this->dbObj->Execute($stmt);\n\t\t\tif (!$rs)\n\t\t\t\ttrigger_db_error($this->dbObj);\n\t\t\tif($rs->PO_RecordCount())\n\t\t\t\t{\n\t\t\t\t\t$row = $rs->FetchRow();\n\t\t\t\t\t//Convert the common words to lower and replace accentuation\n\t\t\t\t\t$this->_common_words = $this->arrayValidation($row['words'], ',');\n\t\t\t\t\t//$this->_common_words = $row['words'];\n\t\t\t\t}\n\t\t\treturn $this->_common_words;\n\t\t}", "title": "" }, { "docid": "d13c659bd7f78ceaf9112eca0c579c42", "score": "0.52979374", "text": "function separate($compositeWord, $debug = false) {\n\t\t$this->debug = $debug;\n\t\t//$compositeWord = strtolower($compositeWord); // obliterates non-ASCII characters\n\t\n\t\t$words = array();\n\t\t$currIndex = 0;\n\t\t\n\t\twhile (($word = $this->getWord($compositeWord, $currIndex)) \n\t\t\t\t&& $currIndex <= strlen($compositeWord)) {\n\t\t\t$words[] = $word;\n\t\t\tif ($this->debug) { echo(\"<p>$word FOUND</p>\"); }\n\t\t}\n\t\t\n\t\treturn $words;\n\t}", "title": "" }, { "docid": "55ff86b96c2341bfaf4896f0af0736d6", "score": "0.52948916", "text": "public function scanString($str) {\n $arr = [];\n $n = preg_match_all(\"/[^a-z0-9\\_\\>\\$]t\\(([\\\"|\\'])([^\\\"]+)[\\\"|\\'](\\,\\s*[\\\"|\\']([a-z]+)[\\\"|\\'])?/i\", $str, $matches);\n if (!$n)\n return null;\n foreach ($matches[2] as $i => $string) {\n $lang = (empty($matches[4][$i]) ? \"en\" : $matches[4][$i]);\n // Fix whitespace characters\n if ($matches[1][$i] == '\"')\n $string = str_replace([\"\\\\r\", \"\\\\n\", \"\\\\t\"], [\"\\r\", \"\\n\", \"\\t\"], $string);\n $arr[] = (object) [\n \"string\" => $string,\n \"lang\" => $lang,\n ];\n }\n return $arr;\n }", "title": "" }, { "docid": "aac0441b08bd55ea773579f5ec8a4946", "score": "0.52889", "text": "public static function getWordRepeats($phrase) {\n $counts = array();\n $words = explode(' ', $phrase);\n foreach ($words as $word) {\n if (!array_key_exists($word, $counts)) {\n $counts[$word] = 0;\n }\n $word = preg_replace(\"#[^a-zA-Z\\-]#\", \"\", $word);\n ++$counts[$word];\n }\n return $counts;\n }", "title": "" }, { "docid": "a50b5feebcee5cef1acae79bbe620caf", "score": "0.52887475", "text": "public function countWords() {\n\t\t$string = $this->_string;\n\n\t\t$string= str_replace(\"&#039;\", \"'\", $string);\n\t\t$t = array(' ', \"\\t\", '=', '+', '-', '*', '/', '\\\\', ',', '.', ';', ':', '[', ']', '{', '}', '(', ')', '<', '>', '&', '%', '$', '@', '#', '^', '!', '?', '~'); // separators\n\t\t$string= str_replace($t, \" \", $string);\n\t\t$string= trim(preg_replace(\"/\\s+/\", \" \", $string));\n\t\t$num = 0;\n\t\tif ($this->strlen() > 0) {\n\t\t\t$word_array = explode(\" \", $string);\n\t\t\t$num = count($word_array);\n\t\t}\n\t\treturn $num;\n\t}", "title": "" }, { "docid": "72f5abbf999965aef9c8309ac1151c80", "score": "0.52798724", "text": "private function get_phrase_list() {\n return preg_split('/' . $this->query_regx . '/', $this->query, null, PREG_SPLIT_DELIM_CAPTURE);\n }", "title": "" }, { "docid": "6debbe2b120d9f5c3bf24cdc82ebc31e", "score": "0.52755654", "text": "public static function words($nb = 3, $asText = false)\n {\n $words = array();\n for ($i=0; $i < $nb; $i++) {\n $words []= static::word();\n }\n\n return $asText ? implode(' ', $words) : $words;\n }", "title": "" }, { "docid": "315c4c63fcaaf17586d6bc518258f367", "score": "0.5270278", "text": "private function extractSearchTerms(string $searchQuery): array\n {\n $terms = array_unique(explode(' ', mb_strtolower($searchQuery)));\n\n return array_filter($terms, function ($term) {\n return 2 <= mb_strlen($term);\n });\n }", "title": "" }, { "docid": "315c4c63fcaaf17586d6bc518258f367", "score": "0.5270278", "text": "private function extractSearchTerms(string $searchQuery): array\n {\n $terms = array_unique(explode(' ', mb_strtolower($searchQuery)));\n\n return array_filter($terms, function ($term) {\n return 2 <= mb_strlen($term);\n });\n }", "title": "" }, { "docid": "035017930549d3578ead0fc683d3c77c", "score": "0.5268698", "text": "function getWords() {\n\t\treturn $this->words;\n\t}", "title": "" }, { "docid": "010b3c5a683c777dbd0a40db403708da", "score": "0.52644813", "text": "public function getSearchWords()\n\t{\n\t\t$aData = $this->getData(array(\n\t\t\t'dimensions' => 'ga:keyword',\n\t\t\t'metrics' => 'ga:visits',\n\t\t\t'sort' => 'ga:keyword'\n\t\t));\n\t\t// sort descending by number of visits\n\t\tarsort($aData);\n\t\treturn $aData;\n\t}", "title": "" }, { "docid": "a855cc49e3f9981ab3c705dd200e9797", "score": "0.52555233", "text": "function Find4FirstWord($line)\r\n {\r\n $line2 = $this->clean($line);\r\n $str = $this->multiexplode(array(\" \", '-', ')', ':' ,'.'),htmlentities($line2));\r\n //var_dump($str);\r\n $t = implode(\" \",($str));\r\n\r\n $t = $this->cleanSpaces(htmlentities($t));\r\n $t = $this->clean(htmlentities($t));\r\n $str = explode(\" \",htmlentities($t));\r\n $count = 0;\r\n $words = array();\r\n foreach ($str as $s)\r\n {\r\n $flag1 = 0;\r\n if($count < 4)\r\n {\r\n if(strlen($s) != 0)\r\n {\r\n if(($s != \"\") && ($s != \" \"))\r\n {\r\n\r\n $s = $this->convertPersianNumbersToEnglish($s, $line);\r\n if(!is_numeric($s))\r\n {\r\n preg_match('/[0-9]+/',$s,$matches);\r\n if(isset($matches[0]))\r\n {\r\n // echo \"<br>\";\r\n $pos1 = strpos($s,$matches[0]);\r\n $word = preg_replace(\"/[0-9]/\", \"\", $s);\r\n $pos2 = strpos($s,$word);\r\n if($pos1 < $pos2)\r\n {\r\n $words[$count++] = $matches[0];\r\n $words[$count++] = $word;\r\n }\r\n else\r\n {\r\n $words[$count++] = $word;\r\n $words[$count++] = $matches[0];\r\n }\r\n $flag1 = 1;\r\n\r\n $words[4] = substr_count($words[0], '*');\r\n if($words[4] != 0)\r\n {\r\n $words[0] = $words[1];\r\n $count--;\r\n }\r\n }\r\n }\r\n if($flag1 == 0)\r\n {\r\n $words[$count++] = $s;\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n break;\r\n }\r\n }\r\n return $words;\r\n }", "title": "" } ]
72d2b4c3810ed5a263fd587f5d4046c3
Stock controller Removes stock from the inventory (/subproducts/stock_remove/)
[ { "docid": "aff6ba521ee3652cbde7bf3db45d8e97", "score": "0.66083306", "text": "function _stockControl($data) {\r\n\t\tif(Configure::read('Shop.stock_control') == '1') {\r\n\t\t\t$controller = 'products';\r\n\t\t\t$array = 'product';\r\n\t\t\tif(!empty($data['Subproduct']['name'])) {\r\n\t\t\t\t$controller = 'subproducts';\r\n\t\t\t\t$array = 'subproduct';\r\n\t\t\t} \r\n\t\t\t$this->requestAction($controller . '/stock_remove/' . $data[$array . '_id'] . '/' . $data['quantity']);\r\n\t\t}\r\n\t}", "title": "" } ]
[ { "docid": "968925ac029f24cc53e34132534e73ad", "score": "0.79883575", "text": "public function removeFromStock() {\n \t\n \t// Load the payment object\n \t$payment = Mage::getModel('dibs/standard');\n \n \t// Load the session object\n \t$session = Mage::getSingleton('checkout/session');\n \t$session->setDibsStandardQuoteId($session->getQuoteId());\n \n \t// Load the order object\n \t$order = Mage::getModel('sales/order');\n \t$order->loadByIncrementId($session->getLastRealOrderId());\n \n \t// remove items from stock\n \t// http://www.magentocommerce.com/wiki/groups/132/protx_form_-_subtracting_stock_on_successful_payment\n \tif (((int)$payment->getConfigData('handlestock')) == 1) {\n\t $items = $order->getAllItems(); // Get all items from the order\n\t if ($items) {\n foreach($items as $item) {\n $quantity = $item->getQtyOrdered(); // get Qty ordered\n $product_id = $item->getProductId(); // get it's ID\n \n $stock = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product_id); // Load the stock for this product\n $stock->setQty($stock->getQty()-$quantity); // Set to new Qty \n $stock->save(); // Save\n continue; \n }\n\t } \n }\n }", "title": "" }, { "docid": "b594e3ab18de06c20ec01811ce41e355", "score": "0.6933787", "text": "public function executeDeleteStock(sfWebRequest $request)\n {\n $this->getCartManager()->removeFromCart((int)$request->getParameter('id'));\n $this->getUser()->setFlash('success', 'Product was removed from ' . sfConfig::get('rt_shop_cart_name', 'shopping cart') . '.');\n $this->updateUserSession();\n $this->redirect('rt_shop_order_cart');\n }", "title": "" }, { "docid": "14b0414cb2f9e9fa321a391d4bccca40", "score": "0.67774403", "text": "public function remove()\n\t{\n \n $inventory_id = $this->input->post('inventory_id');\n\n $response = array();\n if($inventory_id) {\n $delete = $this->model_inventory->remove($inventory_id);\n if($delete == true) {\n $response['success'] = true;\n $response['messages'] = \"Stock Entry Successfully removed\"; \n }\n else {\n $response['success'] = false;\n $response['messages'] = \"Error in the database while removing the stock information\";\n }\n }\n else {\n $response['success'] = false;\n $response['messages'] = \"Refersh the page again!!\";\n }\n\n echo json_encode($response);\n\t}", "title": "" }, { "docid": "c8dc08f04526b51b78a266e52b317230", "score": "0.6771646", "text": "public function destroy(ProductStockin $productStockin,$id=0)\n {\n $tab=ProductStockinInvoice::find($id);\n $invoice_id=$tab->order_tracking_id;\n\n\n $sqlLoopDel=$productStockin::where('store_id',$this->sdc->storeID())\n ->where('order_tracking_id',$invoice_id)\n ->get();\n $total_quantity_invoice=0; \n foreach($sqlLoopDel as $sqlInv): \n $quantity=$sqlInv->quantity;\n $pid=$sqlInv->product_id;\n Product::find($pid)->decrement('quantity',$quantity);\n $total_quantity_invoice+=$quantity;\n endforeach;\n\n $this->sdc->log(\"product\",\"Product stockin deleted\");\n\n RetailPosSummary::where('id',1)\n ->update([\n 'stockin_invoice_quantity' => \\DB::raw('stockin_invoice_quantity - 1'),\n 'stockin_product_quantity' => \\DB::raw('stockin_product_quantity - '.$total_quantity_invoice),\n 'product_quantity' => \\DB::raw('product_quantity - '.$total_quantity_invoice)\n ]);\n\n $invoice_date=date('Y-m-d',strtotime($tab->created_at));\n $Todaydate=date('Y-m-d');\n if((RetailPosSummaryDateWise::where('report_date',$Todaydate)->count()==1) && ($invoice_date==$Todaydate))\n {\n RetailPosSummaryDateWise::where('report_date',$Todaydate)\n ->update([\n 'stockin_invoice_quantity' => \\DB::raw('stockin_invoice_quantity - 1'),\n 'stockin_product_quantity' => \\DB::raw('stockin_product_quantity - '.$pro->quantity),\n 'product_quantity' => \\DB::raw('product_quantity - '.$pro->quantity)\n ]);\n }\n\n $invoice_tab=$productStockin::where('store_id',$this->sdc->storeID())\n ->where('order_tracking_id',$invoice_id)\n ->delete();\n $tab->delete();\n return redirect('product/stock/in/list')->with('status', $this->moduleName.' Stock Order Deleted Successfully !');\n }", "title": "" }, { "docid": "cdfa28dee2579b0f6334a5edfc2c130e", "score": "0.66969347", "text": "public function destroy(Stock $stock)\n {\n //\n }", "title": "" }, { "docid": "cdfa28dee2579b0f6334a5edfc2c130e", "score": "0.66969347", "text": "public function destroy(Stock $stock)\n {\n //\n }", "title": "" }, { "docid": "44c9b7a9e95a05d3691866c517688554", "score": "0.66807216", "text": "public function destroy(Stock $stock) {\n //\n }", "title": "" }, { "docid": "025956d392c3834247a1e98809ba1692", "score": "0.65784466", "text": "function remove_item_stock($item,$amount) {\n return $this->add_item_stock($item,$amount*-1); \n }", "title": "" }, { "docid": "889b177a53ba1d4e79e92f7cc73c4f2e", "score": "0.65007496", "text": "public function destroy($id)\n {\n $stockingrediente = StockIngrediente::find($id);\n $stockingrediente->delete();\n\n $stock = Stock::find($stockingrediente->stock_id);\n $stock->load('stockingredientes', 'stockingredientes');\n\n// recalcular el costo del stock\n $costoinsumo = 0;\n $costoingrediente = 0;\n\n foreach($stock->stockinsumos as $stockinsu){\n $costoinsumo += $stockinsu->costo;\n }\n\n foreach($stock->stockingredientes as $stocking){\n $costoingrediente += $stocking->costo;\n }\n\n $stock->costo = $costoingrediente + $costoinsumo;\n $stock->save();\n\n\n $html = view('admin.stocks.partials.insumosingredientes')\n ->with('stock', $stock);\n\n return $html;\n\n }", "title": "" }, { "docid": "8e0c2a3b58c28902137581271e9722c1", "score": "0.64843297", "text": "public function removeProductFromCartAction(){\n\t\t\t// Doctrine\\ORM\\EntityManager\n\t\t\t$manager = $this->manager; \n\t\t\t$request = $this->getRequest(); \n\n\t\t\tif($request->isPost()):\n\t\t\t\t$data = $request->getPost(); \n\n\t\t\t\t// removeAll products from cart\n\t\t\t\tif($data->removeAll == 1): \n\t\t\t\t\t$container = new Container(\"cart\"); \n\t\t\t\t\t// remove array containing products\n\t\t\t\t\tunset($container->orders); \n\t\t\t\t\techo json_encode([\"status\" => \"ok\"]); \n\n\t\t\t\t\texit(); \n\t\t\t\tendif; \n\n\t\t\t\t// product id to remove from cart\n\t\t\t\t$id = ceil($data->id); \n\t\t\t\tif(!$id):\n\t\t\t\t\techo json_encode([\"status\" => \"error\",\"error\" => \"no id was provided\"]); \n\t\t\t\t\texit(); \n\t\t\t\tendif; \n\t\t\t\t// cart session of user\n\t\t\t\t$container = new Container(\"cart\"); \n\t\t\t\tif(is_array($container->orders)):\n\t\t\t\t\t// delete product from cart session of user\n\t\t\t\t\tunset($container->orders[$id]); \n\t\t\t\t\tif(empty($container->orders)) $hideAll = 1; \n\t\t\t\t\telse $hideAll = 0; \n\t\t\t\t\techo json_encode([\"status\" => \"ok\",\"hideAll\" => $hideAll]); \n\t\t\t\t\texit(); \n\t\t\t\tendif; \n\t\t\tendif; \n\n\t\t\treturn $this->redirect()->toRoute(\"home\"); \n\t\t}", "title": "" }, { "docid": "1a3eb7345b4b7055d280ce6d405033f1", "score": "0.6422098", "text": "public function remove_product(){\n\t \t$productId = $_REQUEST['productId'];\n\t \t$attributeValueId = $_REQUEST['attributeValueId'];\n\t \t\n\t \t//remove_product\n\t \tProductExt::deleteSessionCart($productId, $attributeValueId);\n \t\t\t\n\t \t//view\n\t \tSessionMessage::addSessionMessage(SessionMessage::$SUCCESS, 'Remove product is success');\n\t \t$this->setRender('success');\n }", "title": "" }, { "docid": "68f899ffb3649da9f48edfd65e71baab", "score": "0.64065886", "text": "public function removeCartItemAction()\n {\n if (($data = \\System\\Helper::getJSONParameters()) !== false && $_SESSION['order_payment_status'] == 0) {\n $product = new \\Models\\Product();\n echo (int)$product->cartItemRemove($data['cart_item_id']); // ok\n } else {\n echo 0; // error\n }\n }", "title": "" }, { "docid": "f5a7f95bf1cb5a6694969ce4963cf100", "score": "0.6328371", "text": "public function destroy($id)\n {\n $user=auth()->user();\n $restaurant=$user->restaurant_profile;\n $consumedstock= DestroyedStock::find($id);\n $old=$consumedstock->quantity;\n $available= AvailableStock::where('restaurant_profile_id',$restaurant->id)->where('subcategory',$consumedstock->subcategory)->first();\n $newstock= $available->quantity + $old;\n $available->quantity=$newstock;\n $available->save();\n $consumedstock->delete();\n\n return redirect()->route('destroyedstocks')->with('success','Destroyed stock deleted successfully');\n }", "title": "" }, { "docid": "ea14a567b13b5bf0f42e51fdd3042ef7", "score": "0.6315967", "text": "public function sell_remove()\n\t{\n\t\t$sell_status = $this->ff->sell_status();\n\t\tif ($sell_status){\n\t\t\tif ($sell_status['up_id'] == $this->id)\n\t\t\t{\n\t\t\t\t// avslå salg\n\t\t\t\t$this->ff->sell_reject();\n\t\t\t}\n\t\t\telseif ($sell_status['init_up_id'] == $this->id)\n\t\t\t{\n\t\t\t\t// trekk tilbake salg\n\t\t\t\t$this->ff->sell_abort();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3978000b42cbeeee1581393864da4dde", "score": "0.6287479", "text": "public function deleteStock($id){\n\n $res = $this->stockRepository->removeTheStock($id);\n if($res){\n return response()->json($res);\n }\n\n }", "title": "" }, { "docid": "997cea7fb45cb437a37fdb3e2fc697e4", "score": "0.62653977", "text": "function remove()\n {\n $this->load->library(\"cart\");\n $row_id = $_POST[\"row_id\"];\n $data = array(\n 'rowid' => $row_id,\n 'qty' => 0\n );\n $this->cart->update($data);\n echo $this->view();\n }", "title": "" }, { "docid": "7fda8fd8e36dbdd80ed39ef399159d31", "score": "0.6263103", "text": "public function remove() {\n \n $user_id = Session::get('user_id');\n $cart_id = filter_input(INPUT_POST, 'cart_id');\n $res = CartProductModel::remove($cart_id, $user_id);\n \n if($res) {\n Misc::redirect('');\n } else {\n $this->set('message', 'Doslo je do greske prilikom praznjenja korpe.');\n }\n \n }", "title": "" }, { "docid": "11139021fdee62bdd606b517c8ef6e5e", "score": "0.6233182", "text": "function remove($rowid) {\n\n $this ->cart-> update(array('rowid' => $rowid, 'qty' => 0));\n\n redirect('Carrito');\n\n}", "title": "" }, { "docid": "e50278ed2adf5a1a0c7f5295993ea88f", "score": "0.6232233", "text": "public function remove_cart()\n\t{\t\n\t\t$rowid = $this->input->post('rowid');\n\n\t\t$data = array(\n 'rowid' => $rowid,\n 'qty' => 0\n );\n\t \n\t\t$update = $this->cart->update($data);\n\n\t\tif($update){\n\t\t\techo '1';\n\t\t}else{\n\t\t\techo \"0\";\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "62b700b78406191009cb2969a453c5fe", "score": "0.6202564", "text": "public function removeCartItem()\n {\n $bookId = $_GET['bookId'];\n // get the cart from the session\n $userCart = $this->session->userdata('bookCart');\n $foundArrayKeyForItem = $this->getBookKeyInCart($userCart, $bookId);\n unset($userCart[$foundArrayKeyForItem]);\n $this->session->set_userdata('bookCart', $userCart);\n $this->view_cart();\n }", "title": "" }, { "docid": "c4982b6004b6176e29625312dff93811", "score": "0.6176809", "text": "public function delete(){\n\t\t// disable layout and view\n\t\t$this->autoRender = false;\n\n\t\t// load existing cart to add/edit products\n\t\t$curCart = $this->Session->read('User.Cart');\n\n\t\t// remove selected item\n\t\tunset($curCart[$this->request->data('itemNumber')]);\n\n\t\t// store updated cart values\n\t\t$this->Session->write('User.Cart', $curCart);\n\t}", "title": "" }, { "docid": "318bc6e66a5dd525bdd22b2b89667996", "score": "0.61587346", "text": "public function destroy($id)\n { \n $sql = Invoice_Supply::where('id','=',$id)->first(); \n // return Response()->json($sql); \n $invoice = $sql->invoice_id;\n $supply = $sql->supply_id;\n $qty = $sql->qty;\n\n if(Invoice_Supply::destroy($id)){\n \n $stock=$this->IncreaseStock($supply,$qty);\n $sql = Supply::where('id', $supply)\n ->update(['stock' => $stock]);\n $this->updateGrandTotalInvoice($invoice);\n if($sql)\n return redirect('invoices/'.$invoice.'/edit')->with('success','Item deleted successfully'); \n else\n return redirect('invoices/'.$invoice.'/edit')->with('error','The stock was not updated properly, please verify'); \n \n } \n return redirect('invoices/'.$invoice.'/edit')->with('error','item was not deleted, please try again'); }", "title": "" }, { "docid": "160a4a28494d767e9ca705b96c39fc89", "score": "0.6109027", "text": "public function deletestockAction() {\r\n if ($this->getRequest()->isPost()) {\r\n $params = $this->getRequest()->getParams();\r\n $idStock = $params['idStock'];\r\n $stock = new Application_Model_DbTable_Stock();\r\n // delete the stock\r\n $verif = $stock->deleteStock($idStock);\r\n if ($verif == \"ok\") {\r\n $msg = 'L\\'utilisateur a bien été supprimé';\r\n }else\r\n $msg = $verif;\r\n\r\n // Return to the page informations\r\n $this->_helper->redirector('gestionstock', 'repas', null);\r\n }\r\n }", "title": "" }, { "docid": "aa0b0b59e68e2d7508e5ab3e72b7220a", "score": "0.60863596", "text": "function remove_from_cart() {\n\t\ttry {\n\t\t\techo $this->api_model->delete_data(\"cart\" , ['package_id' => $this->jsonvalue['package_id'], 'user_id' => $this->user_data['id']]);\n\t\t} catch(Exception $e) {\n echo json_encode(array( \n \"status\" => $this->lang->line('json_error_status'), \n \"error\" => $e->getMessage()));\n exit;\n }\n\t}", "title": "" }, { "docid": "9e85df062917b5675a85f0508aa25278", "score": "0.6074022", "text": "public function destroy(DestroyStock $request, Stock $stock)\n {\n $stock->delete();\n\n if ($request->ajax()) {\n return response(['message' => trans('brackets/admin-ui::admin.operation.succeeded')]);\n }\n\n return redirect()->back();\n }", "title": "" }, { "docid": "de06c3f3c53700be481378e7e56e3f0a", "score": "0.60692567", "text": "public function removeitem(Request $request)\n {\n \\Cart::remove([\n 'id' => $request->id,\n ]);\n return back()->with('success', 'Pack removed successfully');\n }", "title": "" }, { "docid": "9c711f18911a017a135ecd296d87c3f5", "score": "0.6055987", "text": "public function destroyStock($id)\n {\n //\n \t$stock = Stock::find($id);\n\n \t$product = Product::where('stock_id', '=', $id)->first();\n // return response($product);\n\n $cost = Cost::where('stock_id', '=', $id)->first();\n // return response($cost);\n\n if ($product === null && $cost === null) {\n\n $stock->delete();\n return redirect('/Stock/index/')->with('success', 'Stock Deleted!');\n }\n else\n {\n // return response($product);\n return redirect('/Stock/index/')->with('alert', 'something!');;\n }\n\n }", "title": "" }, { "docid": "88a06b3be0e654cbbec6ca2da0a5b427", "score": "0.60544187", "text": "function _afterDelete() {\n\t\t\t$this->deleteStock( );\n\t\t\treturn parent::_afterDelete( );\n\t\t}", "title": "" }, { "docid": "aa76c37778ddd2909476c085d4f6dcf0", "score": "0.60530245", "text": "public function delete(Request $request) { \n \n //Updating the amount in db\n /*$productController = new ProductController();\n foreach($this->items as $item)\n {\n $qtyDb = Product::select('Stock')->where('ProductID', $item[3])->get();\n $newQty = $qtyDb[0]['Stock'] + $item[1];\n $productController->updateField(\"stock\", $item[3], $newQty);\n }*/\n\n //Delete the data from sessions\n $request->session()->flush();\n \n return \"The cart is empty\";\n }", "title": "" }, { "docid": "efb919741e4788ad37d3d49617789c21", "score": "0.6042296", "text": "protected function _removeQuoteCart()\n {\n $productId = $this->_getParamFromUrl(\n $this->getRequest()->getParam('url'),\n 'id'\n );\n\n $this->_getQuote()->removeItem($productId);\n\n $result = $this->_saveQuoteUpdates();\n\n if ($this->_getQuote()->getItemsCount() >= 1) {\n $this->_addCartBlockToResponse();\n $this->_addTotalsBlockToResponse();\n $this->_addShippingBlockToResponse();\n $this->_addSveaBlockToResponse();\n\n if (!$this->_getQuote()->validateMinimumAmount()) {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_REDIRECT,\n 'Minimum amount',\n Mage::getUrl('checkout/cart')\n );\n $code = 303;\n } elseif ($result) {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_SUCCESS,\n \"Cart updated\",\n \"Successful cart update\"\n );\n $code = 200;\n } else {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_ERROR,\n \"Cart updated unsuccessful\",\n $this->_getQuoteErrors()\n );\n $this->_addAlertBlockToResponse();\n $code = 422;\n }\n } else {\n $this->_addResponseMessage(\n self::SVEA_CHECKOUT_RESPONSE_REDIRECT,\n 'Cart empty',\n Mage::getUrl('checkout/cart')\n );\n $code = 303;\n }\n\n $this->_sendResponse($code);\n }", "title": "" }, { "docid": "28d5ebe62489f59fa5e36a87e376b1de", "score": "0.60393983", "text": "public function destroy(Request $request, $id)\n {\n return redirect('/stock/in')->with('msg', '<div class=\"alert alert-info alert-dismissible fade show\" role=\"alert\"><strong>Gagal!</strong> Stock Masuk tidak Dihapus. Hubungi administrator!<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button></div>');exit;die();\n $stock_cards = StockCards::find($id);\n if($stock_cards) {\n $history = new LogHistory();\n $history->user_id = Auth::user()->user_id;\n $history->title = 'Stok Masuk';\n $history->className = 'StockInController';\n $history->functionName = 'destroy';\n $history->description = 'Menghapus Stok masuk dengan id ' . $stock_cards->stock_card_id;\n $history->ip_address = $request->ip();\n $history->save();\n\n ProductStock::where('stock_card_id', $id)->delete();\n TransferStockOutlet::where('transfer_stock_outlet_id', $stock_cards->transfer_stock_outlet_id)->delete();\n\n if($stock_cards->delete()) {\n return redirect('/stock/in')->with('msg', '<div class=\"alert alert-success alert-dismissible fade show\" role=\"alert\"><strong>Berhasil!</strong> Stock Masuk berhasil Dihapus.<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button></div>');\n } else {\n return redirect('/stock/in')->with('msg', '<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\"><strong>Gagal!</strong> Stock Masuk gagal Dihapus.<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button></div>');\n }\n } else {\n return redirect('/stock/in')->with('msg', '<div class=\"alert alert-danger alert-dismissible fade show\" role=\"alert\"><strong>Gagal!</strong> Stock Masuk ID tidak ditemukan.<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">&times;</span></button></div>');\n }\n }", "title": "" }, { "docid": "e1a36d38675668c1551a1b0ecdcb8240", "score": "0.6029916", "text": "function removeItem($rowid){\n $remove = $this->cart->remove($rowid);\n // Redirect to the cart page\n redirect(base_url());\n \n }", "title": "" }, { "docid": "93b8233ce412f0e9a57a5073967079d8", "score": "0.5999945", "text": "public function delete() {\n\t\t$mainframe = JFactory::getApplication();\n\t\t/* Load the cart helper */\n\t\t$cart = retinashopCart::getCart();\n\t\tif ($cart->removeProductCart())\n\t\t$mainframe->enqueueMessage(RText::_('COM_RETINASHOP_PRODUCT_REMOVED_SUCCESSFULLY'));\n\t\telse\n\t\t$mainframe->enqueueMessage(RText::_('COM_RETINASHOP_PRODUCT_NOT_REMOVED_SUCCESSFULLY'), 'error');\n\n\t\t$mainframe->redirect(JRoute::_('index.php?option=com_retinashop&view=cart'));\n\t}", "title": "" }, { "docid": "7a5cbbc9e62e19a4a654e9da5bcdd325", "score": "0.5998025", "text": "public function testStockDelete()\n {\n //create stock\n $record = factory(self::model)->create();\n \n //delete post\n $this->post(route(self::baseRoute . '.delete', ['product' => $record->product_id, self::singularName => $record->id]));\n\n //check not exists on db\n $this->assertFalse((self::model)::where('id', $record->id)->exists());\n }", "title": "" }, { "docid": "2d0234add8ac70bdf3ff13a1dc54eddc", "score": "0.59872633", "text": "public function updateStockAction()\n {\n $this->checkAdmin();\n $inStockid = intval($this->route['id']);\n $quantity = intval($this->route['amount']);\n if ($quantity == 0)\n $this->model->deleteStockById($inStockid);\n else\n $this->model->updateStockById($inStockid, $quantity);\n }", "title": "" }, { "docid": "6c75f9b8a96aa6856a26ab68d6cd5c77", "score": "0.59871083", "text": "public function remove(Request $request)\n {\n DB::beginTransaction();\n try {\n $cart = CartAmbil::where('user_id', Auth::id())\n ->where('to', $request->user) \n ->where('item_id', $request->item)->first();\n // $cart = Cart::session('ambil_' . $request->user)->get($request->item);\n if ( !empty($cart) ) {\n $item = ItemAmbil::find($cart->item_id);\n $item->stock = $item->stock + $cart->quantity;\n $item->save();\n\n CartAmbil::where('user_id', Auth::id())\n ->where('to', $request->user) \n ->where('item_id', $request->item)->delete();\n }\n Cart::session('ambil_' . $request->user)->remove($request->item);\n if (!empty(Cart::session('ambil_' . $request->user)->get($request->item))) {\n throw new Exception();\n } else {\n if (Cart::session('ambil_' . $request->user)->isEmpty()) {\n Cart::session('ambil_' . $request->user)->clear();\n $session = Session::get('ambil');\n $key = array_search($request->user, $session);\n unset($session[$key]);\n if (empty($session)) {\n Session::forget('ambil');\n } else {\n Session::put('ambil', $session);\n }\n }\n $alert = ['success', 'Berhasil menghapus barang dari pesanan.'];\n }\n DB::commit();\n } catch (Exception $e) {\n $alert = ['danger', 'Gagal menghapus data pesanan.'];\n DB::rollback();\n }\n return redirect()->back()->with('alert', $alert);\n }", "title": "" }, { "docid": "2cbb48c7f539ded76ceaf3da9f1aac4e", "score": "0.59481066", "text": "public function remove(): Response\n {\n $this->cartClasse->remove();\n return $this->redirectToRoute('all_products');\n }", "title": "" }, { "docid": "18389e2d98163934462c54e84a91d798", "score": "0.5947759", "text": "protected function decreaseQuantites(){\n // loop through the contents of the cart\n foreach (Cart::content() as $item){\n // find the item id that is in the cart\n $product = Product::find($item->model->id);\n // remove the cart quantity from the actual quantity\n $product->update(['quantity' => $product->quantity - $item->qty]);\n\n }\n\n }", "title": "" }, { "docid": "1655d919d9fb2f0feed2b6dbc495acd2", "score": "0.5942387", "text": "public function getRemoveItem(){\n\n if (empty(Session::get('user_id'))){\n return redirect('/SignIn');\n }\n\n $product = Product::find($_POST[\"product\"]);\n\n $number = $_POST[\"number\"];\n\n if(isset($_COOKIE[\"cart\"])) {\n $cart = unserialize($_COOKIE[\"cart\"]);\n if (array_key_exists($product->id_products, $cart)) {\n if($number == 0) {\n unset($cart[$product->id_products]);\n }else{\n $cart[$product->id_products] = $number;\n }\n }\n }\n setcookie(\"cart\",serialize($cart));\n\n\n return redirect('/shop/cart');\n }", "title": "" }, { "docid": "49afe0782a54f3d31a1c8e6146b725fa", "score": "0.59423757", "text": "private function OrderRemoveProduct()\n\t\t{\n\t\t\tif(!isset($_REQUEST['cartItemId']) || !isset($_REQUEST['orderSession'])) {\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t$orderClass = GetClass('ISC_ADMIN_ORDERS');\n\t\t\t$rowId = $orderClass->GetCartApi($_REQUEST['orderSession'])->RemoveItem($_REQUEST['cartItemId']);\n\n\t\t\t$response = array(\n\t\t\t\t'orderSummary' => $orderClass->GenerateOrderSummaryTable()\n\t\t\t);\n\t\t\techo isc_json_encode($response);\n\t\t\texit;\n\t\t}", "title": "" }, { "docid": "5fc314844878c5c464e18623cad2d683", "score": "0.5933792", "text": "public function delete()\n \n {\n FrontendSections::find($this->deleteId)->delete();\n session()->flash('message', 'Stock Deleted Successfully.');\n \n }", "title": "" }, { "docid": "2fb3cdec7c142fd78a75a3842c936b48", "score": "0.59312195", "text": "public function adminManageStockAction()\n {\n $this->checkAdmin();\n $id = intval($this->route['id']);\n //products model\n $vars['products'] = $this->model->getInstockByProductId($id);\n $vars['id'] = $id;\n $vars['admin'] = \"\";\n $this->view->render('Admin Manage Stock', $vars);\n }", "title": "" }, { "docid": "c76d8a87dd8ed9aedec18ad0503da46a", "score": "0.59269565", "text": "public function actionRemove($index)\n\t{\n\t // удаляем акционный продукт – если он идёт с данным товаром\n\t $cart_data = Yii::app()->cart->getData();\n\t if(!empty($cart_data[$index]['sale_id'])){\n\t foreach ($cart_data as $idx => $item){\n\t if($item['product_id'] == $cart_data[$index]['sale_id']){\n Yii::app()->cart->remove($idx);\n\t break;\n }\n }\n }\n\n\t\tYii::app()->cart->remove($index);\n\n\t\tif(!Yii::app()->request->isAjaxRequest)\n\t\t\tYii::app()->request->redirect($this->createUrl('index'));\n\t}", "title": "" }, { "docid": "776fdf7e8072d976006d6e55c5e372ee", "score": "0.5889823", "text": "public function decrement($id, $name, $quantity, $instock, $datum, $user) {\n $stmt = $this->db->query(\"UPDATE events SET inStock=inStock-$quantity WHERE eventId = $id\");\n \n \n \n }", "title": "" }, { "docid": "b7cfa77409dfae7497f211fa3218c824", "score": "0.5877005", "text": "public function minusQty () {\r\n\t\t$cart = new MCart();\r\n\t\t$id = $this->input->post(\"id\"); //cart id here\r\n\t\t$qty = $this->input->post(\"quantity\");\r\n\t\t\r\n\t\tif ($qty == 0) {\r\n\t\t\t$cart->delete($id);\r\n\t\t} else {\r\n\t\t\t$affectedFields = array ('quantity'=>$qty);\r\n\t\t\t$where = array ('cart_id'=>$id);\r\n\r\n\t\t\tif ($cart->update1($where, $affectedFields) > 0) {\r\n\t\t\t\techo 'Sucess!';\r\n\t\t\t} else {\r\n\t\t\t\techo 'Failed!';\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "4fcd03ac294be8f2297c205a34997bba", "score": "0.58734316", "text": "public function remove(Request $request)\n {\n $this->basket->remove($request->get('sku'));\n\n return Response::json($this->getResponseDataForBasket());\n }", "title": "" }, { "docid": "6e95ab4984c07bd438f3eb2cd4d3faf6", "score": "0.58682746", "text": "public function remove()\n {\n $basket = $_SESSION['basket'] ?? [];\n $basket = array_diff($basket,[(int) $this->variables['id']]);\n $_SESSION['basket'] = $basket;\n $this->redirect('/basket');\n }", "title": "" }, { "docid": "700b42efee7e9178a5ca9ad9fe44383d", "score": "0.58409035", "text": "public function destroy($id)\n {\n \n $item_order = Item_Order::find($id);\n $item = Item::find($item_order->item_id);\n $old_stock_item = $item->stock;\n $new_stock_item = $old_stock_item + $item_order->quantity;\n $item->stock = $new_stock_item;\n $item->save();\n \n Item_Order::destroy($id);\n return redirect()->back();\n }", "title": "" }, { "docid": "faf3b0434f188fa36dd884b1b333bce5", "score": "0.5832898", "text": "public function remove(Request $request)\n\t{\n\t\t$cart = app()->make('Cart');\n\t\t$cart->remove($request->get('product'));\n\t\treturn redirect()->back();\n\t}", "title": "" }, { "docid": "70eaba639b090cf2d08a6d25ee48bbf7", "score": "0.5829032", "text": "public function remove_detail_from_cart()\n {\n $cartDetail = new CartDetail($this->input);\n $jsonAlert = new JSONAlert();\n\n try {\n $jsonAlert->append_batch(array(\n 'model'=>$cartDetail,\n 'check_empty'=>array(\n 'id'=>'Id Needed!',\n 'cart_id'=>'Cart Id Needed!'\n )\n ));\n } catch(Exception $e) {\n echo 'Message: ' .$e->getMessage();\n }\n\n if( ! $jsonAlert->hasErrors )\n {\n $this->db->delete('t_remarketing_cart_detail', array(\n 'id'=>$cartDetail->id\n ));\n\n $cartDetailModelQuery = $this->db->get_where('t_remarketing_cart_detail', array(\n 'cart_id'=>$cartDetail->cart_id\n ));\n\n if($cartDetailModelQuery->num_rows() < 1)\n {\n $this->db->delete('t_remarketing_cart', array(\n 'id'=>$cartDetail->cart_id\n ));\n }\n else\n {\n // Get all cart details price\n $totalAmount = 0;\n\n foreach ($cartDetailModelQuery->result_object() as $cartDetail)\n {\n $totalAmount += $cartDetail->price;\n }\n $totalGST = $totalAmount*0.15;\n $totalAmountGST = $totalAmount*1.15;\n\n $this->db->update('t_remarketing_cart', array(\n 'total_amount'=>$totalAmount,\n 'gst'=>$totalGST,\n 'total_amount_gst'=>$totalAmountGST\n ), array(\n 'id'=>$cartDetail->cart_id\n ));\n }\n $jsonAlert->append(array(\n 'successMsg'=>'Product removed from cart!'\n ), FALSE);\n\n if( $cartDetailModelQuery->num_rows() > 0 )\n {\n $jsonAlert->model = array(\n 'is_cart_empty'=>$cartDetailModelQuery->num_rows() < 1 ? true : false\n );\n }\n }\n echo $jsonAlert->result();\n\t}", "title": "" }, { "docid": "0bf8f947d1324849922b8e0f92f20c47", "score": "0.58066046", "text": "public function remove($sku = \"\")\r\n\t{\r\n\t\tif($sku != \"\")\r\n\t\t{\r\n\t\t\t$this->cart_session_model->remove($sku, PLATFORMID);\r\n\t\t}\r\n\t\t$this->index();\r\n\t}", "title": "" }, { "docid": "00a51b3828442ced458ce0780613d513", "score": "0.5777059", "text": "public function destroy(StockManagement $stockManagement)\n {\n //\n }", "title": "" }, { "docid": "6744e1d0908e564910f05226b6cfb9f0", "score": "0.5774868", "text": "public function removeItemFromCart(Request $request){\n if($request->isMethod('post')){\n $products = $request->session()->get('products');\n $num_products = count($products);\n if($num_products > 0){\n for($i = 0; $i < $num_products; $i++){\n $_this = $products[$i];\n if($_this['id'] == $request->id){\n array_splice($products, $i, 1);\n $request->session()->put('products', $products);\n return json_encode(true);\n }\n }\n return json_encode(false);\n } \n else\n return json_encode(false);\n }\n else\n return redirect('/');\n }", "title": "" }, { "docid": "4631120cb6c42437e72ed503481b52e1", "score": "0.5770794", "text": "function delete_inventory() {\n // load model\n Load::loadModel(\"inventory\");\n\n // create model object\n $userObj = new UserModel();\n\n //change status\n $userObj->deleteInventory();\n\n echo json_encode(array(\"result\" => \"success\", \"title\" => \"Delete Inventory\", \"message\" => \"Inventory(s) have been deleted successfully\"));\n exit;\n }", "title": "" }, { "docid": "9cea657facda1a40d12ce5b7f8fd25fe", "score": "0.57683367", "text": "function store_ajax_remove_product_from_cart() {\n\t\tif( isset($_REQUEST['product_id']) ) {\n\t\t\t$product_id = (int) $_REQUEST['product_id'];\n\t\t}\n\t\tif( isset($_REQUEST['quantity']) ) {\n\t\t\t$quantity = (int) $_REQUEST['quantity'];\n\t\t} else {\n\t\t\t$quantity = -1;\n\t\t}\n\n\t\t// Pass into PHP function, echo results and die.\n\t\t$removed = store_remove_product_from_cart($product_id, null, $quantity);\n\n\t\t// Set api logging\n\t\t$output = array();\n\t\tif ( $removed ) {\n\t\t\t$output['success'] = true;\n\t\t\t$output['code'] = 'OK';\n\t\t\t$output['message'] = 'Product successfully removed from cart.';\n\t\t}\n\n\t\t// Set proper header, output\n\t\theader('Content-Type: application/json');\n\t\techo json_encode(store_get_json_template($output));\n\t\tdie;\n\t}", "title": "" }, { "docid": "c1631c451e9c1eed1317476fbbf1d608", "score": "0.57672656", "text": "public function deleteAction()\n {\n $id = (int)$this->getRequest()->getParam('id');\n if ($id) {\n try {\n $this->_getCart()->removeItem($id)\n ->save();\n } catch (Exception $e) {\n $this->_getSession()->addError($this->__('Cannot remove the item.'));\n }\n }\n $this->_goBack();\n }", "title": "" }, { "docid": "6da4fbf5429760352deae784e6801fcf", "score": "0.5766044", "text": "public function destroysousrubrique($RUB_NUM)\n {\n $sousrubrique = Sousrubrique::find($RUB_NUM);\n $sousrubrique->delete();\n\n return redirect('/indexsousrubrique')->with('success', 'Stock has been deleted Successfully');\n }", "title": "" }, { "docid": "a286540e27abaf824fb2f7bdd63c5cb1", "score": "0.5757142", "text": "public function removeAll($sku)\n {\n $oldCart = Session::has('cart') ? Session::get('cart') : null;\n if($oldCart)\n {\n $cart = new Cart($oldCart);\n $cart->removeAll($sku);\n Session::put('cart', $cart);\n }\n return redirect()->route('cartView');\n }", "title": "" }, { "docid": "12e0a9fba5c6425b2b9f4128005395b1", "score": "0.57549256", "text": "public function destroy()\n {\n //\n if (Auth::check()) {\n $active_basket_id = session('active_basket_id');\n BasketProduct::where('basket_id', $active_basket_id)->delete();\n }\n\n Cart::destroy();\n\n return redirect()->route('basket');\n }", "title": "" }, { "docid": "3d3d3629896da3ff2793e774b1bda3b3", "score": "0.57538074", "text": "public function removeItem($id){\n foreach ($this->items as $item){\n if($item->getId() == $id){\n $product = DAO::getById(Product::class, $item->getProduct());\n $product->setQteStock($product->getQteStock()+$item->getQuantity());//increment stock quantity\n DAO::update($product);\n DAO::delete(Item::class,$id);\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "962691585b9019ad14862319b6d9d0d4", "score": "0.5752919", "text": "public function removeProduct($request, $response, $args) {\n if (!isset($_SESSION['cart'])) {\n return;\n }\n \n $articleToRemove = (int)$args[\"article_id\"];\n \n if(!array_key_exists($articleToRemove, $_SESSION['cart'])) {\n return;\n }\n \n // if there is more than one article, we only decrement quantity\n if($_SESSION[\"cart\"][$articleToRemove] > 1) {\n $_SESSION[\"cart\"][$articleToRemove]--;\n \n } else {\n unset($_SESSION[\"cart\"][$articleToRemove]);\n }\n }", "title": "" }, { "docid": "edc7bab725f6a4b0269aa688779eedf0", "score": "0.57296413", "text": "function substract_item($ref)\n\t{\n\t\t$basket = get_basket();\n\t\tadd_stock($ref, get_products($ref), 1);\n\t\tif ($basket)\n\t\t{\n\t\t\tforeach ($basket as $key => $value) \n\t\t\t{\t\n\t\t\t\tif ($value['ref'] == $ref)\n\t\t\t\t{\n\t\t\t\t\tif ($basket[$key]['stock'] >= 1)\n\t\t\t\t\t\t$basket[$key]['stock'] -= 1;\n\t\t\t\t\tfill_basket($basket);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b08f875405293c84bdd9e1459ed18d2f", "score": "0.57284796", "text": "function remove_option_stock($option,$amount) {\n return $this->add_option_stock($option,$amount*-1); \n }", "title": "" }, { "docid": "863a95f24e4973455bbdba0df2fce0c3", "score": "0.5723635", "text": "public function removeAction()\n {\n $id = $this->params('id');\n // set product\n $product = $this->getModel('product')->find($id);\n // Check\n if ($product && !empty($id)) {\n // remove file\n $files = array(\n Pi::path(sprintf('upload/%s/original/%s/%s', $this->config('image_path'), $product->path, $product->image)),\n Pi::path(sprintf('upload/%s/large/%s/%s', $this->config('image_path'), $product->path, $product->image)),\n Pi::path(sprintf('upload/%s/medium/%s/%s', $this->config('image_path'), $product->path, $product->image)),\n Pi::path(sprintf('upload/%s/thumb/%s/%s', $this->config('image_path'), $product->path, $product->image)),\n );\n Pi::service('file')->remove($files);\n // clear DB\n $product->image = '';\n $product->path = '';\n // Save\n if ($product->save()) {\n $message = sprintf(__('Image of %s removed'), $product->title);\n $status = 1;\n } else {\n $message = __('Image not remove');\n $status = 0;\n }\n } else {\n $message = __('Please select product');\n $status = 0;\n }\n return array(\n 'status' => $status,\n 'message' => $message,\n );\n }", "title": "" }, { "docid": "0214c42f7b8f333bad86dfa7974ee1be", "score": "0.5722462", "text": "public function destroy(StockOrder $stockOrder)\n {\n //\n }", "title": "" }, { "docid": "a8223ffea320d56366dd1a1490bc8c7d", "score": "0.5710896", "text": "public function destroy($id)\n {\n // $bookdata= $this->BookModel->showqty($product_id);\n // = BookModel::find($product_id);\n // foreach ($bookdata as $book) {\n // $bookqty= $book->quantity;\n // }\n \n // $totalqty= $bookqty+$qty;\n\n // $data=array(\n // 'quantity'=>$totalqty,\n // );\n \n // $modeldata= $this->BookModel->showbook($product_id);\n \n // $this->BookModel->updatedata($data,$product_id);\n\n\n $this->CartModel->deletedata($id);\n return redirect()->route('cartview')->with('delete', 'Product deleted sucessfully!');\n }", "title": "" }, { "docid": "64223beb3b605feb28d15e475d11d475", "score": "0.5709001", "text": "public function productCartRemove(Request $request)\n {\n \\Cart::session(auth()->user()->id)->remove($request->cart_id);\n }", "title": "" }, { "docid": "382aecba892bb49a80e55beb68ea0af6", "score": "0.56923586", "text": "function removeIngredientsFromStock($conn, $item_id)\n{\n\t$query = \"SELECT ingredient_id, amount FROM recipes WHERE item_id = \" . $item_id;\n\t$recipe_results = $conn->query($query);\n\t$rows = $recipe_results->num_rows;\n\tfor ($j = 0; $j < $rows; ++$j)\n\t{\n\t\t$recipe_results->data_seek($j);\n\t\t$recipe_row = $recipe_results->fetch_array(MYSQLI_NUM);\n\t\t$ingredient_id = $recipe_row[0];\n\t\t$amount = $recipe_row[1];\n\t\t$query = \"SELECT ingredient_stock FROM ingredients WHERE ingredient_id =\". $ingredient_id; \n\t\t$ingredient_results = $conn->query($query);\n\t\t$ingredient_results->data_seek(1);\n\t\t$ingredient_row = $ingredient_results->fetch_array(MYSQLI_NUM);\n\t\t$ingredient_stock = $ingredient_row[0];\n\t\t$new_ingredient_stock = $ingredient_stock - $amount;\n\t\tif ($new_ingredient_stock < 0)\n\t\t{\n\t\t\t$new_ingredient_stock = 0;\t\n\t\t}\n\t\t$query = \"UPDATE ingredients SET ingredient_stock = \". $new_ingredient_stock . \" WHERE ingredient_id = \" . $ingredient_id;\n\t\t$update_ingredients_complete = $conn->query($query);\n\t\tif (!$update_ingredients_complete) \n\t\t{\n\t\t\techo \"INSERT failed: $query<br>\" . $conn->error . \"<br><br>\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "aafb89ac9a64983585697bad819d58f9", "score": "0.569134", "text": "public function removeCartproduct($rowId)\n {\n //\n Cart::remove($rowId);\n\n return redirect('/products/cart-show')->with('success_msg','Cart product removed successfully..!!');\n }", "title": "" }, { "docid": "1aae2d8579c10e18267a716d9926ffe0", "score": "0.56837535", "text": "public function actionRemoveMaterialDetails() {\n $flag = 0;\n if (Yii::$app->request->isAjax) {\n $material_id = $_POST['material_id'];\n $material_details = \\common\\models\\BomMaterialDetails::find()->where(['id' => $material_id])->one();\n if (!empty($material_details)) {\n $reseve = $material_details->quantity;\n $stock_view = StockView::find()->where(['material_id' => $material_details->material])->one();\n if($material_details->delete()){\n $stock_view->reserved_qty -= $reseve;\n $stock_view->available_qty += $reseve;\n if($stock_view->update()){\n $flag = 1;\n }\n }\n } else {\n $flag = 0;\n }\n }\n return $flag;\n }", "title": "" }, { "docid": "024a049c20ed2a209e7c889f4d55cf5b", "score": "0.5676688", "text": "public function action_deleteProduct() {\n $product_id = intval($_POST['form']['id']);\n $quantity = intval($_POST['form']['quantity']);\n model_cart::resetQuantity($product_id,$quantity);\n unset($_SESSION['cart'][$product_id]);\n header('Location:'. APP_URL.'cart/view');\n die();\n }", "title": "" }, { "docid": "9cf0a1e703e8c28234601ba132de0e40", "score": "0.5676591", "text": "function removeProductFromBasket($param) {\n $oshop = new OOOnlineShop();\n $res['method'] = \"removeProductFromBasket\";\n\t$res['error'] = $oshop->basket->deleteProduct($param);\n\techo json_encode($res);\t\t\n}", "title": "" }, { "docid": "141eb8549045161abe085ea960b6f440", "score": "0.5661254", "text": "public function destroy($id)\n {\n //$this->authorize('isAdmin');\n\n $stocks = Stock::findOrFail($id);\n $stocks -> delete();\n }", "title": "" }, { "docid": "7f8a614d580681943bd29f3c9939fefb", "score": "0.5660694", "text": "public function Remove($nQty) {\n\t$qNew = $this->QtyInPackage()-$nQty;\n\t$this->QtyInPackage($qNew);\n\t$arUpd = array(\n\t 'QtyShipped'\t=> $qNew,\n\t );\n\t$this->Update($arUpd);\n }", "title": "" }, { "docid": "2794652d1a7e71800b9a2e080debf6b2", "score": "0.56573635", "text": "function ajax_mini_cart_remove_func() {\n if (isset($_POST['action']) && $_POST['action'] == \"ajax_mini_cart_remove\") {\n global $woocommerce;\n echo $woocommerce->cart->remove_cart_item( $_POST['cartkey'] );\n die();\n } \n }", "title": "" }, { "docid": "6a5e98df09ff5110b8b754d95956f791", "score": "0.5657149", "text": "public function destroy($pur_inv_no)\n {\n $porducts = PurchaseDetail::where('pur_inv_no', '=', $pur_inv_no)->get();\n foreach ($porducts as $porduct) {\n (new UpdateData())->updateStock('-', $porduct->product_code, $porduct->quantity);\n }\n (new UpdateData())->deleteAll('purchase', $pur_inv_no);\n }", "title": "" }, { "docid": "b61d94bb10045fe69efacb7c3ae46354", "score": "0.56505406", "text": "function eliminarItem()\n{\n global $NOTI_ERROR;\n global $NOTI_SUCCESS;\n \n if($_GET){\n $IdProducto = $_GET['Id'];\n DAOFactory::getProductoDAO()->delete($IdProducto);\n notificacion(\"Producto Eliminado\",$NOTI_SUCCESS );\n }\n else{\n notificacion(\"Error Eliminando Producto\",$NOTI_ERROR );\n }\n \n verItems();\n \n return \"\";\n \n}", "title": "" }, { "docid": "ae5d2f6812d5f540791843867c74e1f7", "score": "0.5648861", "text": "public function update(Request $request, ProductStockin $productStockin,$id=0)\n {\n $this->validate($request,[\n 'order_no'=>'required',\n 'order_date'=>'required',\n 'vendor_id'=>'required'\n ]);\n\n $inv=ProductStockinInvoice::find($id);\n $invoice_id=$inv->order_tracking_id;\n $total_quantity_invoice=0;\n foreach($request->sid as $key=>$sid):\n $sqlInv=ProductStockin::find($sid);\n $quantity=$sqlInv->quantity;\n $pid=$sqlInv->product_id;\n Product::find($pid)->decrement('quantity',$quantity);\n $total_quantity_invoice+=$quantity;\n endforeach;\n\n $this->sdc->log(\"product\",\"Product stockin updated\");\n\n RetailPosSummary::where('id',1)\n ->update([\n 'stockin_invoice_quantity' => \\DB::raw('stockin_invoice_quantity - 1'),\n 'stockin_product_quantity' => \\DB::raw('stockin_product_quantity - '.$total_quantity_invoice),\n 'product_quantity' => \\DB::raw('product_quantity - '.$total_quantity_invoice)\n ]);\n\n\n $invoice_date=date('Y-m-d',strtotime($inv->created_at));\n $Todaydate=date('Y-m-d');\n if((RetailPosSummaryDateWise::where('report_date',$Todaydate)->count()==1) && ($invoice_date==$Todaydate))\n {\n RetailPosSummaryDateWise::where('report_date',$Todaydate)\n ->update([\n 'stockin_invoice_quantity' => \\DB::raw('stockin_invoice_quantity - 1'),\n 'stockin_product_quantity' => \\DB::raw('stockin_product_quantity - '.$total_quantity_invoice),\n 'product_quantity' => \\DB::raw('product_quantity - '.$total_quantity_invoice)\n ]);\n }\n\n $inbTab=$productStockin::where('store_id',$this->sdc->storeID())\n ->where('order_tracking_id',$invoice_id)\n ->delete();\n\n $total_quantity_invoice=0;\n foreach($request->pid as $key=>$pid):\n $pro=Product::find($pid);\n Product::find($pid)->increment('quantity',$request->quantity[$key]);\n $tab_stock=new ProductStockin;\n $tab_stock->order_tracking_id=$invoice_id;\n $tab_stock->product_id=$pid;\n $tab_stock->quantity=$request->quantity[$key];\n $tab_stock->price=$pro->price;\n $tab_stock->cost=$pro->cost;\n $tab_stock->store_id=$this->sdc->storeID();\n $tab_stock->created_by=$this->sdc->UserID();\n $tab_stock->updated_by=$this->sdc->UserID();\n $tab_stock->save();\n $total_quantity_invoice+=$request->quantity[$key];\n endforeach;\n\n $tab=ProductStockinInvoice::find($id);\n $tab->order_tracking_id=$invoice_id;\n $tab->order_date=$request->order_date;\n $tab->order_no=$request->order_no;\n $tab->vendor_id=$request->vendor_id;\n $tab->total_quantity=$total_quantity_invoice;\n $tab->store_id=$this->sdc->storeID();\n $tab->updated_by=$this->sdc->UserID();\n $tab->save();\n\n RetailPosSummary::where('id',1)\n ->update([\n 'stockin_invoice_quantity' => \\DB::raw('stockin_invoice_quantity + 1'),\n 'stockin_product_quantity' => \\DB::raw('stockin_product_quantity + '.$total_quantity_invoice),\n 'product_quantity' => \\DB::raw('product_quantity + '.$total_quantity_invoice)\n ]);\n\n if(RetailPosSummaryDateWise::where('report_date',$Todaydate)->count()==0)\n {\n RetailPosSummaryDateWise::insert([\n 'report_date'=>$Todaydate,\n 'stockin_invoice_quantity' => \\DB::raw('1'),\n 'stockin_product_quantity' => \\DB::raw($total_quantity_invoice),\n 'product_quantity' => \\DB::raw($total_quantity_invoice)\n ]);\n }\n else\n {\n RetailPosSummaryDateWise::where('report_date',$Todaydate)\n ->update([\n 'stockin_invoice_quantity' => \\DB::raw('stockin_invoice_quantity + 1'),\n 'stockin_product_quantity' => \\DB::raw('stockin_product_quantity + '.$total_quantity_invoice),\n 'product_quantity' => \\DB::raw('product_quantity + '.$total_quantity_invoice)\n ]);\n }\n\n return redirect('product/stock/in/list')->with('status', $this->moduleName.' Changed / Updated Successfully !'); \n }", "title": "" }, { "docid": "16db08d8a01f77a05a4d45657fbc91ca", "score": "0.564757", "text": "function pull_cart($cart) {\n $this->SC->load_library('Cart');\n $cart = $this->SC->Cart->explode_cart($cart); \n \n foreach ($cart as $item) {\n if ($this->item_stock_type($item['id']) === FINITE_STOCK) {\n $this->remove_item_stock($item['id'],$item['quantity']);\n }\n foreach ($item['options'] as $option) {\n if ($this->option_is_stockable($option['id'])) {\n $this->remove_option_stock($option['id'],$option['quantity']);\n }\n }\n }\n \n }", "title": "" }, { "docid": "75e300af0cc771dd906d9e7b5412bc3d", "score": "0.5645914", "text": "public function remove($itemId) {\n $item = $this->dbcart->get_cart_item($itemId);\n if (!empty($item)) {\n if ($item['qty'] > 1) {\n $this->dbcart->update_item(array('id' => $itemId, 'qty' => $item['qty'] - 1));\n } else {\n $this->dbcart->remove_item(array('id' => $itemId));\n }\n }\n set_flash_notice('Товар удалён из корзины');\n redirect_to_referral();\n }", "title": "" }, { "docid": "e565c97bc5180959ecf2f0d42146f4a1", "score": "0.5641396", "text": "public function removeOne($sku)\n {\n $oldCart = Session::has('cart') ? Session::get('cart') : null;\n if(isset($oldCart) && !empty($oldCart))\n {\n $cart = new Cart($oldCart);\n $cart->removeOne($sku);\n Session::put('cart', $cart);\n }\n return redirect()->route('cartView');\n }", "title": "" }, { "docid": "72df36caceaf53ac881640d6fc0853d9", "score": "0.56312585", "text": "public function stock()\n\t{\n\t\t$this->data['stock'] = $this->Stock_model->produit_stock();\n\t\t$this->load->view('content/gestion/produit_stock', $this->data);\n\t}", "title": "" }, { "docid": "e7bbe942c47ce7b23bf160b2cae8e3cc", "score": "0.5628496", "text": "public function edit_stock() {\n\n\n $this->autoLayout = false;\n $inst_id = $this->Session->read('inst_id');\n $site_id = $this->Session->read('site_id');\n\n\n if (isset($_GET['edit_stock'])) {\n $id = $_GET['id'];\n $product = $this->Product->find('first', array('conditions' => array('Product.id' => $id)));\n // print_r($product);\n $this->set(compact('product'));\n // exit;\n } else if (isset($_GET['save_stock'])) {\n // print_r($_GET['data']['Product']);\n // exit();\n $prod_tran_data = $_GET['data']['ProductTransaction'];\n $prod_data = $_GET['data']['Product'];\n $memberdata = $this->Session->read('memberData');\n $prod_tran_data['user_id'] = $memberdata['User']['id'];\n $prod_tran_data['transaction_timestamp'] = date('Y-m-d H:i:s');\n $prod_tran_data['inst_id'] = $this->Session->read('inst_id');\n $prod_tran_data['price'] = $prod_data['selling_price'];\n\n $this->ProductTransaction->save($prod_tran_data);\n $this->Product->save($prod_data);\n echo json_encode(array('status' => 1));\n exit;\n };\n }", "title": "" }, { "docid": "1076a66c82fb9413c4e12992da9ab7a2", "score": "0.56195104", "text": "public function removeFromCart(Request $request)\n {\n $validator = Validator::make($request->all(),\n [\n 'modelNumber' => 'required|exists:Item,modelNumber'\n ]\n );\n if (!$validator->fails()) {\n $modelNumber = $request->input(\"modelNumber\");\n $cartId = CartController::getCartId();\n $item = DB::select(\"SELECT itemName FROM Item i WHERE modelNumber='$modelNumber'\")[0];\n if ($request->has(\"quantity\")) {\n $quantity = $request->input(\"quantity\");\n DB::delete(\"DELETE FROM CartToItem WHERE modelNumber = $modelNumber AND cartID = '$cartId' LIMIT $quantity\");\n $responseData = \"Removed $quantity $item->itemName\".\"s from your cart\";\n } else {\n DB::delete(\"DELETE FROM CartToItem WHERE modelNumber = $modelNumber AND cartID = '$cartId'\");\n $responseData = \"Removed all the $item->itemName\".\"s from your cart\";\n }\n $result = \"success\";\n } else {\n $result = \"fail\";\n $responseData = $validator->errors()->messages();\n }\n return response() ->json(['result' => $result, 'data' => $responseData]);\n }", "title": "" }, { "docid": "3628f99a08f00df4eaafae6de694bfd7", "score": "0.56184256", "text": "function nm_mini_cart_remove_product() {\n\t\t$cart_item_key = $_POST['cart_item_key'];\n\t\t\n\t\t$cart = WC()->instance()->cart;\n\t\t$removed = $cart->remove_cart_item( $cart_item_key ); // Note: WP 2.3 >\n\t\t\n\t\tif ( $removed )\t{\n\t\t $json_array['status'] = '1';\n\t\t $json_array['cart_count'] = $cart->get_cart_contents_count();\n\t\t $json_array['cart_subtotal'] = $cart->get_cart_subtotal();\n\t\t} else {\n\t\t\t$json_array['status'] = '0';\n\t\t}\n\t\t\n\t\techo json_encode( $json_array );\n\t\t\t\t\n\t\texit;\n\t}", "title": "" }, { "docid": "5457a48c2e72cca2413a396b991ec921", "score": "0.56165016", "text": "public function destroy($id)\n {\n //\n $order = Order::find($id);\n \n //get all inventory items of an order to remove records in the middle table\n $order_inventories = $order->inventories;\n\n foreach($order_inventories as $order_inventory)\n {\n $order_inventory=Inventory::find($order_inventory);\n $order->inventories()->detach($order_inventory);\n }\n\n $order->delete();\n\n return response()->json('Order Deleted');\n }", "title": "" }, { "docid": "4ac779dca00da46c263e4ca638484b62", "score": "0.5610333", "text": "public function remove()\n {\n $this->authorize('delete', $this->series);\n\n $action = SeriesDeletingAction::execute([\n 'series' => $this->series,\n ]);\n\n if ($action->failed()) {\n $this->alert($action->getMessage(), 'error');\n\n return;\n }\n\n $this->flash($action->getMessage(), 'success');\n\n return redirect()->route('backstage.series.index');\n }", "title": "" }, { "docid": "4db2397eaac57d59de0d3afa1a2b38ce", "score": "0.5603166", "text": "public function delproductionadmin(){\n \t\t \n\t\t$id=$_POST['id'];\n\t\t$user_id= $_POST['user_id'];\n\t\t\n\t\t$id=$_POST['id'];\n\t\t@unlink($_SESSION['gift'][$id]['link']);\n\n\t\tunset($_SESSION['cart'][$id]);\n\t\t\tunset($_SESSION['gift'][$id]);\n\n\t $this->Adminmodel->deluserproduction($id,$user_id);\n $data=$this->Adminmodel->cartproduct($user_id,$id);\n\n\t\t\t\t\t\t\t\t\t$id= $_POST['user_id'];\n $where='user_id';\n\n $table='cart';\n\n $cart=$this->Adminmodel->select_com_where($table,$where,$id);\n if(empty($cart)){\n \tunset($_SESSION['discount']);\n \tunset($_SESSION['gift']);\n \tunset($_SESSION['subprice']);\n \tunset($_SESSION['totalprice']);\n \tunset($_SESSION['pincode']);\n \tunset($_SESSION['pincodeno']);\n \t\n \tunset($_SESSION['delievry']);\n \tunset($_SESSION['expected_days']);\n \tunset($_SESSION['del_charge']);\n \tunset($_SESSION['coupon']);\n \tunset($_SESSION['couponapplyprice']);\n \tunset($_SESSION['couponname']);\n \tunset($_SESSION['finalvolume']);\n \tunset($_SESSION['codprice']);\n \tunset($_SESSION['cod']);\n \tunset($_SESSION['allgst']);\n \tunset($_SESSION['finalgst']);\n\n\n }else{\n\n foreach ($cart as $value) {\n //pr($value);\n $id=$value['product_id'];\n\n $where='sku_code';\n\n $table='product';\n\n $product=$this->Adminmodel->select_com_where($table,$where,$id);\n\n \tif(empty($product)){\n $id=$value['product_id'];\n\n $where='sku_code';\n\n $table='product_detail';\n\n $product=$this->Adminmodel->select_com_where($table,$where,$id); \n }\n \tif(empty($product)){\n $id=$value['product_id'];\n\n $where='sku_code';\n\n $table='giftproduct';\n\n $product=$this->Adminmodel->select_com_where($table,$where,$id); \n }\n\n // pr($value);\n $cartsums+=$value['cart_price'];\n $volume=$product[0]['box_volume_weight']*$value['quantity'];\n if(!empty($value['discount_price'])){\n $disarr['disc'][]=$cart;\n\n }else{\n $pricearr['price'][]=$cart;\n }\n \n \n \n\n }\n \n foreach ($disarr['disc'] as $key ) {\n \n $allgst2+= $key['gst'];\n if($key['gstinc']==2){\n $finalgst2+= $key['gst'];\n }else{\n \n $finalgst2= 0;\n } \n $cartprice+=$key['cart_price'];\n $discount_prices+=$key['discount_price'];\n\n }\n foreach ($pricearr['price'] as $pricea ) {\n $ctprice+=$pricea['cart_price'];\n $allgst1+= $pricea['gst'];\n if($pricea['gstinc']==2){\n \n $finalgst1+= $pricea['gst'];\n }else{\n\n $finalgst1= 0;\n }\n }\n \n $finalgst=$finalgst1+$finalgst2;\n\n $_SESSION['allgst']=$allgst1+$allgst2;\n \n $totalprice=$discount_prices+$ctprice+$finalgst;\n \n $_SESSION['finalgst']= $finalgst;\n $disc=$cartprice-$discount_prices;\n $onlyprice=$discount_prices+$ctprice;\n $_SESSION['discount']=$disc;\n $_SESSION['totalprice']= $totalprice;\n $_SESSION['subprice']=$onlyprice;\n \tunset($_SESSION['couponapplyprice']);\n \tunset($_SESSION['couponname']);\n\t\t\t\t\t\t\t\t\t\t\t\t\tunset($_SESSION['coupon']);\n }\n\t}", "title": "" }, { "docid": "6f44a6bc4293d6596dc4952f3b3d3dff", "score": "0.5602507", "text": "public function delete_purchase()\r\n\t\t{\r\n\t\t\tis_ajax();\r\n\t\t\t$id=$this->input->post('rowID');\r\n\t\t\t$where = array('purchase_id' => $id);\r\n\t\t\t$result = $this->custom->updateRow(\"stock_purchase_master\",array('purchase_status'=>'D'),$where);\r\n\t\t\techo $result;\r\n\t\t}", "title": "" }, { "docid": "ca43b860e19bf5d78e79072702c8b792", "score": "0.56000835", "text": "public static function updateStock($products, $action = 'subtract')\n {\n $bundleData = $prodIds = array();\n $when1 = $when2 = $when3 = '';\n $codeLocation = 'helpers/shop.php';\n\n //Note: $key value is needed farther in case of bundle product type.\n foreach($products as $key => $product) {\n //Check first that the stock can be modified for this product.\n if($product['stock_subtract']) {\n\n\t//Ensure the query won't fail when subtracting quantity.\n\t$operation = ' - IF('.$product['quantity'].' >= stock, stock, '.$product['quantity'].') ';\n\tif($action === 'add') {\n\t $operation = ' + '.$product['quantity'].' ';\n\t}\n\n\tif($product['type'] === 'bundle') {\n\t //Set the array's key as the id of the bundle.\n\t $bundleData[$product['id']] = $product['quantity'];\n\t //The bundle products will be treated later on.\n\t continue;\n\t}\n\telseif($product['var_id']) { //Product variant\n\t $when1 .= 'WHEN prod_id='.$product['id'].' AND var_id = '.$product['var_id'].' THEN stock '.$operation;\n\t}\n\telse { //Normal product\n\t $when2 .= 'WHEN id='.$product['id'].' THEN stock '.$operation;\n\t}\n\n\t//Collect the product ids.\n\t$prodIds[] = $product['id'];\n }\n }\n\n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n //Check if someone is editing the updated products.\n if(!empty($prodIds)) {\n $query->select('id, checked_out')\n\t ->from('#__ketshop_product')\n\t ->where('id IN('.implode(',', $prodIds).')');\n $db->setQuery($query);\n $results = $db->loadAssocList();\n\n foreach($results as $result) {\n\t//Someone (in backend) is editing the product. \n\tif($result['checked_out']) {\n\t //Lock the new stock value to prevent this value to be modified by an admin\n\t //when saving in backend.\n\t $when3 .= 'WHEN id='.$result['id'].' THEN 1 ';\n\t}\n }\n }\n\n //Update the stock according to the product (normal or product variant).\n\n if(!empty($when1)) {\n $query->clear();\n $query->update('#__ketshop_product_variant')\n\t ->set('stock = CASE '.$when1.' ELSE stock END ')\n\t ->where('prod_id IN('.implode(',', $prodIds).')');\n $db->setQuery($query);\n $db->query();\n\n //Check for errors.\n if($db->getErrorNum()) {\n\tself::logEvent($codeLocation, 'sql_error', 1, $db->getErrorNum(), $db->getErrorMsg());\n\treturn false;\n }\n }\n\n $cases = $comma = '';\n if(!empty($when2)) {\n $cases .= 'stock = CASE '.$when2.' ELSE stock END ';\n $comma = ',';\n }\n\n if(!empty($when3)) {\n $cases .= $comma.' stock_locked = CASE '.$when3.' ELSE stock_locked END ';\n }\n\n if(!empty($cases)) {\n $query->clear();\n $query->update('#__ketshop_product')\n\t ->set($cases)\n\t ->where('id IN('.implode(',', $prodIds).')');\n $db->setQuery($query);\n $db->query();\n\n //Check for errors.\n if($db->getErrorNum()) {\n\tself::logEvent($codeLocation, 'sql_error', 1, $db->getErrorNum(), $db->getErrorMsg());\n\treturn false;\n }\n }\n\n $model = JModelLegacy::getInstance('Product', 'KetshopModel');\n //The bundle products have been treated. \n //Now the stock of the bundles themself must be updated.\n //Note: This condition must be checked before the recursive call or weird things occure.\n if(isset($products[$key]['bundle_ids'])) {\n $model->updateBundles($products[$key]['bundle_ids']);\n }\n\n if(!empty($bundleData)) {\n $bundleProducts = $model->getBundleProducts($bundleData);\n //Call the function one more time (recursively) to treat the bundle products.\n self::updateStock($bundleProducts, $action);\n }\n }", "title": "" }, { "docid": "1a44ebf45259eea8ba3cac1d9dce37a1", "score": "0.559986", "text": "public function remove()\n\t{\n\t\tif(!in_array('deleteSupplier', $this->permission)) {\n redirect('dashboard', 'refresh');\n }\n\n\t\t$receiving_id = $this->input->post('receiving_id');\n \n \n\n $response = array();\n if($receiving_id) {\n $delete = $this->model_receiving->remove($receiving_id);\n if($delete == true) {\n $response['success'] = true;\n $response['messages'] = \"Successfully removed\"; \n }\n else {\n $response['success'] = false;\n $response['messages'] = \"Error in the database while removing the product information\";\n }\n }\n else {\n $response['success'] = false;\n $response['messages'] = \"Refresh the page again!!\";\n }\n\n echo json_encode($response); \n\t}", "title": "" }, { "docid": "a9ca90e29badfdaf6648ccd5abbddff3", "score": "0.5598969", "text": "public function delete() {\n\t\t$mainframe = JFactory::getApplication();\n\t\t/* Load the cart helper */\n\t\t$cart = VirtueMartCart::getCart();\n\t\tif ($cart->removeProductCart())\n\t\t$mainframe->enqueueMessage(JText::_('COM_VIRTUEMART_PRODUCT_REMOVED_SUCCESSFULLY'));\n\t\telse\n\t\t$mainframe->enqueueMessage(JText::_('COM_VIRTUEMART_PRODUCT_NOT_REMOVED_SUCCESSFULLY'), 'error');\n\n\t\t$mainframe->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart', FALSE));\n\t}", "title": "" }, { "docid": "cfec708c55a20bd2cfc6382c3389f6b5", "score": "0.5598101", "text": "protected function removecart($args=null) {\n if ($this->method == 'DELETE' && $this->authstatus['authstatus']==true) {\n require_once 'removecart.php';\n } else {\n header('Content-Type: application/json');\n return $_REQUEST['qshopCallback'] . '(' . json_encode($this->retarr) . ')';\n }\n }", "title": "" }, { "docid": "8cc23838293524c757c0529c528cbf48", "score": "0.5594458", "text": "public function processRemove()\n {\n if (! $this->context->customer->isLogged()) {\n die('0');\n }\n\n // check if product exists\n $idProduct = (int)Tools::getValue('id_product');\n $idProductAttribute = (int)Tools::getValue('id_product_attribute');\n $idCustomer = (int)$this->context->customer->id;\n $customerEmail = $this->context->customer->email;\n\n if (MailAlert::deleteAlert($idCustomer, $customerEmail, $idProduct, $idProductAttribute)) {\n die('0');\n }\n\n die(1);\n }", "title": "" }, { "docid": "59e31750a26c8a176bba4f82a2bb81d5", "score": "0.55872494", "text": "public function destroy($id)\n {\n date_default_timezone_set(\"America/La_Paz\");\n $idNotaCompra = DB::table('detalle_compras')->where('id',$id)->value('idNotaCompra');\n $idProducto = DB::table('detalle_compras')->where('id',$id)->value('idProducto');\n $productoStock = DB::table('productos')->where('id',$idProducto)->value('stock');\n $cantidad = DB::table('detalle_compras')->where('id',$id)->value('cantidad');;\n \n $nuevoStock = $productoStock - $cantidad;\n DB::table('productos')->where('id',$idProducto)->update([\n 'stock'=>$nuevoStock\n ]);\n detalleCompra::destroy($id);\n\n $monto = DB::table('detalle_compras')->where('idNotaCompra',$idNotaCompra)->sum('importe');\n DB::table('nota_compras')->where('id',$idNotaCompra)->update([\n 'monto'=>$monto\n ]);\n \n return redirect(route('notaCompras.show', $compraId));\n }", "title": "" }, { "docid": "8d0f8d41267b2cb09d4e73e22ee91416", "score": "0.5585497", "text": "public function admin_remove(){\n \n $this->set(\"title_for_layout\",\"Remove a Satellite\");\n \n // Load the satellite in question\n $satellite = $this->Satellite->find('first', array('conditions' => array('Satellite.id' => $this->params->id)));\n if($satellite){\n $this->set('satellite', $satellite);\n } else {\n $this->Session->setFlash('That satellite could not be found.', 'default', array('class' => 'alert alert-error'));\n $this->redirect(array('controller' => 'satellite', 'action' => 'index', 'admin' => true));\n }\n }", "title": "" }, { "docid": "b5bca92381b5c38453fa23e89dfafb01", "score": "0.55818194", "text": "public function delete_open()\r\n\t\t{\r\n\t\t\tis_ajax();\r\n\t\t\t$id=$this->input->post('rowID');\r\n\t\t\t$where = array('open_stock_id' => $id);\r\n\t\t\t$result = $this->custom->updateRow($this->table,array('open_stock_status'=>'D'),$where);\r\n\t\t\techo $result;\r\n\t\t}", "title": "" }, { "docid": "1ec4b944486c645ef4235ab4466b875c", "score": "0.55772626", "text": "public function getRemoveitem($identifier) {\n //get reference to item object\n $item = Cart::item($identifier);\n //delete it\n $item->remove();\n //go back to the cart\n return Redirect::to('store/cart');\n }", "title": "" }, { "docid": "61280b273950e6726f3f2c1df635beee", "score": "0.5577254", "text": "public function remove($productId) \n {\n $product = $this->productModel->getProduct($productId);\n $cartItem = $this->getCartItem($product->id);\n if ($cartItem == null) {\n throw new NotFoundHttpException('Невозможно удалить товар');\n }\n $cartItem->delete($cartItem->id);\n }", "title": "" }, { "docid": "772d8f71246f3134eb6a435391ed5f26", "score": "0.5575303", "text": "public function destroy($id)\n {\n $sale = Sale::find($id);\n\n try {\n $salesDetails = SalesDetail::where('sales_id', $sale->id)->get();\n foreach ($salesDetails as $sd) {\n $stockAmount = Stock::where('product_id', $sd->product_id)->first()->stock;\n Stock::where('product_id', $sd->product_id)->update(['stock' => $stockAmount + $sd->qty ]);\n }\n SalesDetail::where('sales_id', $sale->id)->delete();\n $sale->delete();\n return redirect()->action('SaleController@index')->with('success', sprintf('%s', 'Sales number '.$sale->number.' has been deleted!'));\n } catch (\\Exception $e) {\n return redirect()->action('SaleController@index')->with('fail', sprintf('%s', 'Sales number '.$sale->number.' can not be deleted!'));\n }\n }", "title": "" } ]
3ee23d4f0eff58d0f545ff514b6f0111
replace this example code with whatever you need
[ { "docid": "2946460c77bc3462a38ed16a46ac1aff", "score": "0.0", "text": "public function indexAction(Request $request)\n {\n return $this->render('default/homepage.html.twig', [\n ]);\n }", "title": "" } ]
[ { "docid": "e4777e8430ff3d30b7ccb48d82aed57b", "score": "0.64685714", "text": "protected function main()\n\t{\n\n\t}", "title": "" }, { "docid": "b3390ea97c0b9119a6a1058a43595eae", "score": "0.6178059", "text": "function examples()\n\t{\n\n\t}", "title": "" }, { "docid": "c1c313086f1c988a4e3668115d4f45d8", "score": "0.61771333", "text": "abstract public function demo();", "title": "" }, { "docid": "0dd61039dcef1db9df53e845256fe7ca", "score": "0.6058645", "text": "function example()\n {\n }", "title": "" }, { "docid": "996e08e6bec21bff6c56ad29265e4341", "score": "0.60254097", "text": "protected function _run()\n\t{\n\t}", "title": "" }, { "docid": "2445d9c662b45206de1a689e6ba535a2", "score": "0.6006832", "text": "public function livraison()\n {\n // TODO\n }", "title": "" }, { "docid": "434b05561e72fac8551772a12880a649", "score": "0.5992189", "text": "private function __construct() {/* intentionally left blank */}", "title": "" }, { "docid": "0996f9417d224e65b25cddd299d6f4da", "score": "0.59658086", "text": "public function main()\n\t{\n\t}", "title": "" }, { "docid": "8a311fac611348f687342f9f57861163", "score": "0.58560073", "text": "public function example()\n {\n //\n }", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.58007026", "text": "protected function setup() {}", "title": "" }, { "docid": "09dbe96464fd6a693ebd6630f64a174a", "score": "0.58007026", "text": "protected function setup() {}", "title": "" }, { "docid": "9eaa75e0557acae83305ab53f1ff0b49", "score": "0.57924175", "text": "protected function accion()\n\t{\n\t}", "title": "" }, { "docid": "efee74b02d21536f9794e3494d46cf13", "score": "0.5776387", "text": "final private function __construct() {\n \n }", "title": "" }, { "docid": "2c7f310971e413362d9c3e9fc45f752c", "score": "0.5775618", "text": "private function __construct() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57480407", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57480407", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57480407", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57480407", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57480407", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57480407", "text": "protected function init() {}", "title": "" }, { "docid": "faf4a7d6149456e7e7453474cd1d0838", "score": "0.57480407", "text": "protected function init() {}", "title": "" }, { "docid": "57935b9bd57ce4fc0ce7ffdab86b3450", "score": "0.574448", "text": "private function __construct() \n\t{\n\t \n\t}", "title": "" }, { "docid": "903afe11294fb6e3b0002eda8aec2a45", "score": "0.57417494", "text": "private function __construct() {\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "9d23b793c460954ad744bba6a9ed0333", "score": "0.5724592", "text": "protected function before() {}", "title": "" }, { "docid": "4b9a73e08a620b798d91c831ff6af9d4", "score": "0.5719984", "text": "private function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "1ac5a2c6102ad8ab9e12f23847805bb8", "score": "0.57193744", "text": "public function init()\n\t{\n\n\t\t\t\n\t}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5705863", "text": "private function __() {\n }", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.5705863", "text": "private function __() {\n }", "title": "" }, { "docid": "a6616f0de4c3a2ec33f58e2c49af602f", "score": "0.5699833", "text": "private function __construct ()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.567992", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.567992", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.56717193", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "cc35a38190ee86ab85e1ab6f2444eff8", "score": "0.5666909", "text": "private function __construct()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "63ebeaadb6f2883dd23aaa891a6c9c9d", "score": "0.5637703", "text": "public static function run() {\n \n }", "title": "" }, { "docid": "8687a1e27016462338497b57dcd7b7c7", "score": "0.56374246", "text": "private function __construct ()\n {\n }", "title": "" }, { "docid": "1b3f43acb087f6d19c6177516618be50", "score": "0.5622816", "text": "protected function setup()\n \t{\n \t}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.5608053", "text": "private function __construct () {}", "title": "" }, { "docid": "2d4a863f96888ee57992ff3d59d12a11", "score": "0.5606389", "text": "private function __construct() {\n\t\t\n\t\t}", "title": "" }, { "docid": "97e6d732775ca239bc7504b43eebcee9", "score": "0.5605856", "text": "public function init()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.5605795", "text": "private function __construct(){}", "title": "" }, { "docid": "84d31b4e37874c89f74295e32a9f3c87", "score": "0.56052744", "text": "protected function init()\n {\n \n }", "title": "" }, { "docid": "7b06340460e2c298cf2f6fde5fcee5ce", "score": "0.5594568", "text": "function __construct()\n\t\t {\n\t\t }", "title": "" }, { "docid": "370f4c5664f161bcc31ad6273c8c499a", "score": "0.5585904", "text": "abstract protected function setup();", "title": "" }, { "docid": "e88b6b5b78998e4dcc843b3c08d4e6ab", "score": "0.5579539", "text": "private function __construct() {\n \n }", "title": "" }, { "docid": "66d0394efb21b2bbe8416a2ade27a465", "score": "0.55723", "text": "protected function initialize() {}", "title": "" }, { "docid": "dfe402bf83d6b83960b48810ca6833e4", "score": "0.55716807", "text": "public function sso()\n {\n }", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5565611", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.5565611", "text": "final private function __construct() {}", "title": "" }, { "docid": "0483931b02bf2110031b1ebed9086eb8", "score": "0.55510026", "text": "public function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "0483931b02bf2110031b1ebed9086eb8", "score": "0.55510026", "text": "public function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "154de4dff4276d797916855a1d1997c3", "score": "0.5550369", "text": "public function init()\n {\n\t\t\n }", "title": "" }, { "docid": "61517b0213f429081ad6d27b3598bebb", "score": "0.5541277", "text": "private function __construct() {\n\t\t}", "title": "" }, { "docid": "61517b0213f429081ad6d27b3598bebb", "score": "0.5541277", "text": "private function __construct() {\n\t\t}", "title": "" }, { "docid": "60f44aa73f8af8546ad75b8860da3711", "score": "0.55389714", "text": "public function run()\n\t{\n\t}", "title": "" }, { "docid": "7a88065cb914511f16f4df0a7d5dd7d8", "score": "0.55351967", "text": "final private function __construct()\r\n {\r\n\r\n }", "title": "" }, { "docid": "b2040a6c7ba33f53a0a674d1ae247873", "score": "0.5531632", "text": "public function init()\n {\n // jeo - DO NOT ADD THINGS HERE: You should be overriding them in your implementation. \n }", "title": "" }, { "docid": "1df4df0328b29c0c7973d613a9b1f9d3", "score": "0.55291003", "text": "private function __construct()\n {\n\treturn;\n }", "title": "" }, { "docid": "9b1554e5bbcc6a0ae0c57795d17e8fb7", "score": "0.5527037", "text": "private function __construct() {\r\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.552327", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.552327", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.552327", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.552327", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.552327", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.552327", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.552327", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "b06e4580402ffb660d69ad74c6db9490", "score": "0.55200136", "text": "private function initialize()\n\t{\n\n\t}", "title": "" }, { "docid": "80dfd361c13d2fcaf315335370ce50c5", "score": "0.55197746", "text": "private function __construct() \r\n\t{}", "title": "" }, { "docid": "a3587746767d4b16f9609807da76908c", "score": "0.55159086", "text": "private function __construct(){\n \n }", "title": "" }, { "docid": "e91b6c3cb8d98cd3a7a8577b85a46de5", "score": "0.5514577", "text": "final private function __construct() {\n\t}", "title": "" }, { "docid": "3605041a9b039df9fc1838aebc05c380", "score": "0.5514172", "text": "public function init()\r\n {\r\n\t\t\r\n }", "title": "" }, { "docid": "74e6e333c4328c1097374d72e6827a5f", "score": "0.5512019", "text": "function init()\n \t{\n \t}", "title": "" }, { "docid": "74e6e333c4328c1097374d72e6827a5f", "score": "0.5512019", "text": "function init()\n \t{\n \t}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.55020666", "text": "final private function __construct() { }", "title": "" }, { "docid": "763fff94eca613bb1a2de8bb8d749127", "score": "0.54999596", "text": "function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "263d9de8facb2e60e52d64dd5200fdae", "score": "0.5495502", "text": "public function __construct()\n\t{\n\t\t# oalala\n\t}", "title": "" }, { "docid": "263d9de8facb2e60e52d64dd5200fdae", "score": "0.5495502", "text": "public function __construct()\n\t{\n\t\t# oalala\n\t}", "title": "" }, { "docid": "e7dd922ddf4b1ac723ee9aeeba11abb7", "score": "0.5493499", "text": "public function __construct()\n\t\t{\n\t\t\t\n\t\t}", "title": "" }, { "docid": "570702f4ba8fc6d2d83babe1e9ae710c", "score": "0.54885095", "text": "public function init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "570702f4ba8fc6d2d83babe1e9ae710c", "score": "0.54885095", "text": "public function init()\r\n\t{\r\n\t}", "title": "" }, { "docid": "9fc985df8385d0af1deedbce10b8726e", "score": "0.54828054", "text": "public function ___init() \n\t{\n\t \n\t}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5481158", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5481158", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5481158", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5481158", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5481158", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.5481158", "text": "private function __construct() {}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "3d8cc1ff983294abad0a959a1a4f3cb3", "score": "0.0", "text": "public function roleDestroy($id)\n {\n $role = Role::find($id);\n $role->delete();\n return ('The role is successfully deleted!');\n }", "title": "" } ]
[ { "docid": "dcc1d6b4440ac73f55e995eb411296ea", "score": "0.6932749", "text": "public function destroy($id)\n {\n dd('Remove the specified resource from storage.');\n }", "title": "" }, { "docid": "4dafcd8b3f56d04ade79ab84f74387a5", "score": "0.69165355", "text": "public function remove(IUser $user, ?IResource $resource): void\n {\n $hash = $this->hash($user, $resource);\n $this->storage->remove($hash);\n }", "title": "" }, { "docid": "472e75253a82e723642cd346e42766dc", "score": "0.689976", "text": "public function unpublishResource(Resource $resource);", "title": "" }, { "docid": "8c567209f449643b019402d25cb3a0e6", "score": "0.67117244", "text": "public function remove($storageOption);", "title": "" }, { "docid": "33495d1267888d9c13c56a2f54ae7981", "score": "0.6666395", "text": "public function destroy(Resource $resource)\n {\n $user = auth()->user();\n\n if ($resource->Course->User == $user or $user->role == 'Admin' ) {\n\n $file_path='storage/resources/'.$resource->attachment;\n if (file_exists($file_path)) {\n $resource->delete();\n unlink($file_path);\n abort(204); //Requête traitée avec succès mais pas d’information à renvoyer. \n }\n abort(403);\n }\n\n abort(401);\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "0ee612316b7ece599a599780a7558aaf", "score": "0.6615533", "text": "public function deleteResource(){\n\t\tif(isset($this->posts[\"src\"])){\n\t\t\t$src = $this->posts[\"src\"];\n\t\t\tif(file_exists($src))\n\t\t\t\tunlink($src);\n\t\t}elseif(isset($this->posts[\"img_src\"])){\n\t\t\t$src = $this->posts[\"img_src\"];\n\t\t\tif(file_exists($src))\n\t\t\t\tunlink($src);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "3198b8a0f2716ad40da9a8a62bebf688", "score": "0.65721023", "text": "protected function remove_storage()\n {\n }", "title": "" }, { "docid": "dc2df99962575c3f0211b8228c540b4e", "score": "0.6562633", "text": "public function remove($uri)\n {\n unset($this->resources[$uri]);\n }", "title": "" }, { "docid": "6b97aa4b089b5fe95bf08521013640ac", "score": "0.64774114", "text": "function hook_cloudinary_stream_wrapper_resource_delete(array $resource) {\n if (isset($resource['public_id'])) {\n if ($storage_class = cloudinary_storage_class()) {\n $storage = new $storage_class($resource);\n list($path, $file) = $storage->resourceUpdate(FALSE);\n\n if ($resource['mode'] == CLOUDINARY_STREAM_WRAPPER_FILE) {\n $storage->folderUpdate($path, array(CLOUDINARY_STORAGE_REMOVE => $file));\n }\n }\n }\n}", "title": "" }, { "docid": "1e8cf2db14c80b19d70f4741a30df900", "score": "0.64165723", "text": "private function deleteOne()\n {\n optional($this->instance->image)->removeFromStorage($this->instance->image);\n\n $this->instance->delete();\n }", "title": "" }, { "docid": "8d21a30b7e8135aae2724ca63410e913", "score": "0.6372442", "text": "public function unpublishResource(PersistentResource $resource)\n {\n try {\n $objectName = $this->keyPrefix . $this->getRelativePublicationPathAndFilename($resource);\n $this->storageService->objects->delete($this->bucketName, $objectName);\n $this->systemLogger->log(sprintf('Successfully unpublished resource as object \"%s\" (MD5: %s) from bucket \"%s\"', $objectName, $resource->getMd5() ?: 'unknown', $this->bucketName), LOG_DEBUG);\n } catch (\\Google_Service_Exception $e) {\n if ($e->getCode() !== 404) {\n throw $e;\n }\n }\n }", "title": "" }, { "docid": "2fa852deb4200fa4ffe64ddcf6fe73e4", "score": "0.636192", "text": "function delete(string $resourceId);", "title": "" }, { "docid": "4eda806ad84b497f305439faec49b27d", "score": "0.6358891", "text": "public function removeResourceFile(Resource $resource)\n {\n $fs = new Filesystem;\n try {\n $fs->remove($this->getUploadedFilePath($resource));\n } catch (UnexpectedValueException $e) {\n // @todo log error\n }\n }", "title": "" }, { "docid": "55c732cc61cd0c51ab885bbf6faeefac", "score": "0.63369256", "text": "public function removeAvatarResource($resource): bool;", "title": "" }, { "docid": "0125b2b138f7471b5a7daa4462593d66", "score": "0.6309427", "text": "public function destroy(Resource $resource)\n {\n //\n $this->authorize('delete', $resource);\n $resource->delete();\n return redirect('/resource');\n }", "title": "" }, { "docid": "f401492e75ca4c7ef776750aa5c51a46", "score": "0.62508374", "text": "public function removeUnderlyingResource($key);", "title": "" }, { "docid": "5da558e39fa239885e68b2d3431874d2", "score": "0.6163051", "text": "public function delete(string $resource)\n {\n $client = $this->getClient();\n $response = $client->delete(\"{$resource}\");\n return $this->result($response);\n }", "title": "" }, { "docid": "8d8d886ed1a4286839ba3968f6b69e35", "score": "0.61367285", "text": "protected function removeFromStorage($path)\n {\n if (Storage::exists($path)) {\n Storage::delete($path);\n }\n }", "title": "" }, { "docid": "d4f932fe5d33ab4124d1b00f3a93fa4a", "score": "0.6116284", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "3f6971bf8beba53671c4459991d4c502", "score": "0.6068753", "text": "public function removeResource($resource_id)\r\n {\r\n $logicNestedSet = new DragonX_NestedSet_Logic_NestedSet();\r\n $logicNestedSet->removeNode(\r\n new DragonX_Acl_Record_Resource($resource_id)\r\n );\r\n }", "title": "" }, { "docid": "01426e85ec00691416a7f655882c5af8", "score": "0.6051162", "text": "public function unlink(\\resource $context=null)\n {\n $this->checkReadable();\n if (null===$context)\n return \\unlink($this->path);\n return \\unlink($this->path, $context);\n }", "title": "" }, { "docid": "8b25ec91f92381b5e25bc75c03129532", "score": "0.6050952", "text": "public static function remove($filename){\n\n //check if file exists in storage public directory to avoid exception\n if( Storage::disk('public')->exists(\"$filename\") ){\n \n //delete oldfile using Storage @storage/app/public folder\n Storage::delete(\"public/$filename\");\n\n }//END exists\n\n \n }", "title": "" }, { "docid": "67bb6156ba52c0470fede15844ccd953", "score": "0.6024124", "text": "public function destroy($id)\n {\n $get=Social::where('id',$id)->first();\n if($get->icon!=null){\n unlink('storage/'.$get->icon);\n }\n $get->delete();\n return redirect()->route('listSocial');\n }", "title": "" }, { "docid": "8774fbdb26187176fa3c5c968af039d4", "score": "0.5983405", "text": "public function destroy( $resource)\n { \n $resource = RequiredDocument::find($resource); \n try {\n /*if ($requiredDocument->studentRequiredDocuments()->count() > 0) {\n notify()->error(__('cant delete data depend on data'), \"\", \"bottomLeft\"); \n return redirect()->route('required_documents.index');\n }*/ \n $resource->delete(); \n } catch (\\Exception $th) {\n return responseJson(0, $th->getMessage());\n }\n return responseJson(1, __('done'));\n }", "title": "" }, { "docid": "96b32200ee9cea357d9bb7756c71dbb9", "score": "0.5981521", "text": "public function destroy($id)\n {\n $filepath = File::where('id',$id)->value('physical_path');\n // return $filepath;\n Storage::delete($filepath);\n\n File::where('id', $id)->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "4343db7632128a4a22e019d66e290dd7", "score": "0.59791505", "text": "function destroy( $resource ){\n\n softDelete( 'customers', $resource );\n\n redirect( route( 'customer' ) );\n\n}", "title": "" }, { "docid": "b4b047fecd9f126a805ce824c7515839", "score": "0.5946296", "text": "public function destroy(Resource $resource)\n {\n $result = $resource->delete();\n if ($result) {\n return redirect(route('admin.resource.index'))->with(\"success\", 'Ресурс успешно удален');\n } else {\n return redirect(route('admin.resource.index'))->with(\"error\", 'Ошибка сервера');\n }\n }", "title": "" }, { "docid": "bc05b93beec5d500f15183a184885ed1", "score": "0.5940284", "text": "function delete_resource($resource_id)\n\t{\n\t\t\n\t\t$this -> db -> where('id', $resource_id);\n\t\t if ($this -> db -> delete('gh_resource'))\n\t\t\treturn true;\n\t\telse\n\t\t\treturn false;\n\t\n\t}", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "90136674b889c89e2c35715bc8fe8d7f", "score": "0.5913318", "text": "public function delete(\\resource $context=null)\n {\n return $this->unlink($context);\n }", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "78f3fcb6a4df88ba8ea45797087a7e8d", "score": "0.59121597", "text": "public function remove($entity);", "title": "" }, { "docid": "5811064cb5348a7d8234a1423fc04cf8", "score": "0.5904446", "text": "public function remove()\n {\n if ($this->currentIsExists()) {\n unlink($this->currentImage());\n $this->removeThumbs();\n }\n }", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.589366", "text": "public function remove();", "title": "" }, { "docid": "e134b8fbd8cb5d6358f5601aad3b42b7", "score": "0.5851101", "text": "public function destroy($id)\n {\n $item = StoragePhoto::findOrFail($id);\n $oldFile = $item->file;\n $item->delete();\n Storage::disk('public')->delete('storage_photos/' . $oldFile);\n return redirect()->back();\n }", "title": "" }, { "docid": "d64670e4005c362bc99c1ff13c3761c8", "score": "0.58252704", "text": "public function deleteDataStorage($name);", "title": "" }, { "docid": "100faa416ac8af24f2dde9c9c9c5ece8", "score": "0.5825043", "text": "public function destroy($id)\n {\n unlink('.'.backing::find($id)->img);\n backing::destroy($id);\n Session::flash('warning','Removido');\n return redirect()->route('home');\n }", "title": "" }, { "docid": "daf533646ad26ec870c4d404b6612873", "score": "0.5816415", "text": "public function destroy($id)\n {\n $Supplier = Supplier::findOrFail($id);\n $photo = $Supplier->photo;\n if ($photo) {\n unlink($photo);\n Supplier::findOrFail($id)->delete(); \n }else{\n Supplier::findOrFail($id)->delete();\n }\n }", "title": "" }, { "docid": "38bf577586a27897b1f11e08b3eac6db", "score": "0.58083075", "text": "public function deallocate_resource_from_user($resource_id);", "title": "" }, { "docid": "596fbb42123cc857bd6e6415ba467f80", "score": "0.5792648", "text": "public function delete() {\n\t\tif ( file_exists( $this->path ) ) {\n\t\t\tunlink( $this->path );\n\t\t}\n\t}", "title": "" }, { "docid": "cc42a160a9315cdd157733240e749135", "score": "0.57910043", "text": "public function remove($entity): void;", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "3e75cf5e9dcd8f7f83bb797e00a4d05a", "score": "0.5761397", "text": "public function destroy($id)\n {\n $this->resource->deleteResource($id);\n }", "title": "" }, { "docid": "ab665119b206a77e6ca441b43a4d5f65", "score": "0.5718658", "text": "public static function delete($filePath, $storage = 'public')\n {\n if (Storage::disk($storage)->exists($filePath)) {\n Storage::disk($storage)->delete($filePath);\n }\n }", "title": "" }, { "docid": "688f093af1318a2501cc247ca7d8367f", "score": "0.57133234", "text": "public function destroy($id)\n {\n $post = Post::find($id);\t \n\n $file = $post->image;\n\n $path = storage_path('app/'.$file);\n \n\n $exists = file_exists($path) ? 1 : 0;\n \n \n if($file !== null && $exists === 1){\n \tunlink($path); \t\n } \t\t\n\n \t$post->delete();\n \n return redirect()->back()->with([\"success\" => \"Record deleted successfully!\"]);\n }", "title": "" }, { "docid": "083e7dfea48105bfa6c48a83f2638dbe", "score": "0.57117677", "text": "public function remove() {\n\t\t\n\t\t# remove file\n\t\t\n\t\t# remove thumbnails\n\t\t$this->removeThumbnail();\n\t}", "title": "" }, { "docid": "b695acf41ab282c258621f938f86e9b3", "score": "0.5690479", "text": "public function delete_item($id)\r\n\t{\r\n\t $path = $this->conf->paths['storage'].\"/\".$id;\r\n if(!$this->item_exists($id))\r\n return NULL;\r\n unlink($path);\r\n $this->update_stat();\r\n\t}", "title": "" }, { "docid": "9a27084d0c40ba49ecc9c1b53b42577b", "score": "0.5680772", "text": "public function destroy(storage $storage)\n {\n $storage->delete();\n\n return redirect()->route('storage.index')->withStatus(__('storage successfully deleted.'));\n }", "title": "" }, { "docid": "2d32ad1b48ccfbc9bbe2ec2428b76e24", "score": "0.56783164", "text": "public function destroy($id)\n {\n // Delete image for onefile\n }", "title": "" }, { "docid": "bac810fba3fe0809cb7a87735ba98fbe", "score": "0.5670975", "text": "public function delete( $path );", "title": "" }, { "docid": "52f3cfac130ce94f9536db6fe17ad61d", "score": "0.567092", "text": "public function remove()\n {\n if( file_exists( $this->getPath().\"/\".$this->getTempFile() ) ) {\n\n unlink( $this->getPath().\"/\".$this->getTempFile() );\n\n }\n }", "title": "" }, { "docid": "9fcbbf7c57d3a426ed4209fed7807bad", "score": "0.56667215", "text": "public function delete($path): self;", "title": "" }, { "docid": "0a66405a41c344aee2f23a78621638d2", "score": "0.5640811", "text": "public function destroy($id)\n {\n $image = Image::whereId($id)->first();\n Storage::delete('storage/' . $image->image_url);\n $image->delete();\n return redirect()->back()->with('success', 'image deleted');\n }", "title": "" }, { "docid": "47582204edbd05b1d7427ba375b800cb", "score": "0.5636767", "text": "public function destroy($id)\n {\n $data = Slider::find($id);\n if (file_exists(imagePath().$data->sliderimg)) { \n unlink(imagePath().$data->sliderimg);\n }\n $delete=Slider::where('id','=',$id)->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "633fe257801634ace1ad6774eadec06a", "score": "0.563407", "text": "public function delete()\n {\n $this->erase();\n }", "title": "" }, { "docid": "5f783edc1594c1f8b50bfd3d8032ee86", "score": "0.56227064", "text": "function delete() {\n if (is_file($this->path) && file_exists($this->path) && is_writable($this->path)) {\n return unlink($this->path);\n }\n }", "title": "" }, { "docid": "368d6e77cc3e0998a2b5e5ad75228904", "score": "0.5614642", "text": "public function destroy($id)\n {\n $file = $this->fileProvider->findById($id);\n $file->delete();\n }", "title": "" }, { "docid": "abe945199308adcf5f0a508cfdef2673", "score": "0.56135803", "text": "public function delete(Resource $resource) {\n\t\t$class = get_class($resource);\n\t\t$table = strtolower(substr($class, strrpos($class, \"\\\\\") + 1));\n\t\t$criteria = $resource->getRequiredEqualities();\n\n\t\ttry {\n\t\t\t$this->driver->delete($table, $criteria);\n\t\t} catch (InvalidQueryException $exception) {\n\t\t\tthrow $exception; # Move it up the line.\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a063c5a5194ae38910605d903212fa5d", "score": "0.5605628", "text": "public function destroy($id)\n {\n $item = Products::find($id);\n $origin_img = $item->img;\n if(Storage::disk('public')->exists($origin_img)){\n Storage::disk('public')->delete($origin_img);\n }\n $item->delete();\n return redirect('home/product');\n }", "title": "" }, { "docid": "e40139292b4af4dae5afad336cfab701", "score": "0.5594869", "text": "function remove($resource_id){\n //this primarily means remove links for this Resource\n\n DB::db_query(\"delete_resource_links\", \"DELETE FROM links WHERE from_id='\".$resource_id.\"' AND (\n type = '\".get_link_as_constant(\"RESOURCE_IN_CATEGORY\").\"' \n OR type='\".get_link_as_constant(\"RESOURCE_OF_USER\").\"'\n OR type='\".get_link_as_constant(\"RESOURCE_OF_GROUP\").\"');\");\n if(DB::db_check_result(\"delete_resource_links\") > 0){\n //success\n } \n \n }", "title": "" }, { "docid": "4d9a698ed0ccf2cc8ec46d04467cd7ec", "score": "0.5586516", "text": "public function remove(Payload $payload): void\n {\n $this->storage->destroy($this->getKey($payload));\n }", "title": "" }, { "docid": "e987c7f11e89bb4f6dc4dc023e24d763", "score": "0.5579811", "text": "public function remove(Object $entity);", "title": "" }, { "docid": "1accc3116856cce6a0b7ebddb6b796b8", "score": "0.55785817", "text": "public function destroy($id)\n\t{\n\t\tResource::destroy($id);\n\n\t\tSession::flash('delete', 'Resource Deleted');\n\t\treturn Redirect::to('resource');\n\t}", "title": "" }, { "docid": "430d1f771f7deee6de5a8179a0ce6389", "score": "0.55783314", "text": "public function destroy($id)\n {\n $item = Video::find($id);\n $path = str_replace('storage/', 'public/', $item->path);\n if (Storage::exists($path)) {\n Storage::delete($path);\n }\n $item->delete();\n }", "title": "" }, { "docid": "0d6640f36c0ca88fbe56977a74dad5f1", "score": "0.55737436", "text": "public function remove(MediaInterface $media);", "title": "" }, { "docid": "6ad136b8bac727f66417bb1d762b6e97", "score": "0.5564964", "text": "public static function delete( $resource ) {\n $resource->assertLock();\n $resource->assertMemberLocks();\n $parent = $resource->collection();\n if (!$parent)\n throw new DAV_Status(DAV::HTTP_FORBIDDEN);\n $parent->assertLock();\n self::delete_member( $parent, $resource );\n}", "title": "" }, { "docid": "a2f1c01b0ea1d33119c1e555014fb703", "score": "0.5562198", "text": "public function destroy($id)\n {\n //\n $hizmetler = Hizmetler::where('id',$id)->first();\n\n if($hizmetler) {\n unlink(storage_path('app/public'.$hizmetler->image));\n $hizmetler->delete();\n\n\n\n return ['status'=>'ok','message'=>'Silme İşlemi Başarılı'];\n }\n return ['status'=>'err','message'=>'Silme İşlemi Başarısız'];\n }", "title": "" }, { "docid": "3a507f65a1de28bc6b0f34c5d713d3a2", "score": "0.5560665", "text": "public function removeUpload()\n {\n \tif ($file = $this->getAbsolutePath()) {\n \t\tunlink($file);\n \t}\n }", "title": "" }, { "docid": "0c001dc9327db66033c2beb52b0e02a9", "score": "0.5557123", "text": "public function deleteWithFile()\n {\n unlink(public_path($this->url));\n $this->delete();\n }", "title": "" }, { "docid": "c470228c5ffb5ab3fa7349260335d385", "score": "0.55545944", "text": "public function destroy($id)\n {\n $product = Product::find($id);\n $image_path=public_path().'/upload/product/'.$product->photo;\n if(file_exists($image_path)){\n unlink($image_path);\n }\n $product->delete();\n }", "title": "" }, { "docid": "e98c4608a62ab3f2b92573a4bed86a6f", "score": "0.5551504", "text": "abstract public function Resource_Link_delete($resource_link);", "title": "" }, { "docid": "5644c2de987a8d8bda74e3ac1875315c", "score": "0.5545652", "text": "function remove(){\n\t\t$db->Execute(\"delete from \" . TABLE_INVENTORY . \" where id = \" . $id);\n\t \tif ($image_with_path) { // delete image\n\t\t\t$file_path = DIR_FS_MY_FILES . $_SESSION['company'] . '/inventory/images/';\n\t\t\tif (file_exists($file_path . $image_with_path)) unlink ($file_path . $image_with_path);\n\t \t}\n\t \t$db->Execute(\"delete from \" . TABLE_INVENTORY_SPECIAL_PRICES . \" where inventory_id = '\" . $id . \"'\");\n\t\tgen_add_audit_log(INV_LOG_INVENTORY . TEXT_DELETE, $sku);\n\t}", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "e16921589a68a78a32503d13f6338be9", "score": "0.55398196", "text": "public function delete($id){\n // delete images\n $image = Post::find($id)->image;\n if(!empty($image))\n foreach (json_decode($image, true)['urls'] as $image) {\n !isset($image) ?: \\File::delete($image);\n }\n \n // delete storage\n parent::delete($id);\n }", "title": "" }, { "docid": "987d20a90f553327a77e6cf4303821fa", "score": "0.55355304", "text": "public function remove(Question $question): Void;", "title": "" }, { "docid": "3751a58c163b979ebbab9b941282602b", "score": "0.5534674", "text": "public function destroy($id)\n {\n $data = Student::where('id',$id)->first();\n $img_path = $data->photo;\n unlink($img_path);\n Student::where('id',$id)->delete();\n return response('Data Deleted Successfully');\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "85cbf9c7e4906a9545dd0eecdec1aeae", "score": "0.55242705", "text": "public function destroy($id)\n {\n \n $fotoAtual=$this->foto->find($id);\n File::delete(public_path() . $fotoAtual->arquivo0);\n $fotoAtual->delete();\n }", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" } ]
bf8a80e66c7b70ae71ce22c274cf88ae
the belowlisted classes defines relationships between tables.
[ { "docid": "7dd0978fea4d3a7baab1750630f5d884", "score": "0.0", "text": "public function rating() {\n \n return $this->belongsTo('App\\Rating');\n }", "title": "" } ]
[ { "docid": "8c17e31492df893c139a39604316e128", "score": "0.64929813", "text": "public function getRelationships(string $class);", "title": "" }, { "docid": "834c34ed25ec23f6b8e2f3143accd927", "score": "0.6349712", "text": "public function exposedRelations();", "title": "" }, { "docid": "93e8b37a8aea22da4c7a59c615b1c39e", "score": "0.6339077", "text": "public static function relTableName( PersistentObject $ins1, $inst1Attr, PersistentObject $ins2 )\n {\n // Problema: si el atributo pertenece a C1, y $ins1 es instancia de G1,\n // la tabla que se genera para hasMany a UnaClase es \"gs_unaclase_\"\n // y deberia ser \"cs_unaclase_\", esto es un problema porque si cargo \n // una instancia de C1 no tiene acceso a sus hasMany \"UnaClase\".\n\n // TODO: esta es una solucion rapida al problema, hay que mejorarla.\n \n // Esta solucion intenta buscar cual es la clase en la que se declara el atributo hasMany\n // para el que se quiere generar la tabla intermedia de referencias, si no la encuentra, \n // es que el atributo hasMany se declaro en $ins1.\n \n // Tambien hay un problema cuando hay composite>\n // Si ins1->hasMany[ins1Attr] es a una superclase de ins2, genera mal el nombre de la tabla de join.\n // El nombre se tiene que generar a la clase para la que se declara le hasMany,\n // no para el nombre de tabla de ins2 (porque ins2 puede guardarse en otra tabla\n // que no sea la que se guarda su superclase a la cual fue declarado el hasMany\n // ins1->hasMany[inst1Attr]).\n // Solucion: ver si la clase a la que se declara el hasMany no es la clase de ins2,\n // y verificar si ins2 se guarda en otra tabla que la clase a la que se \n // declara el hasMany en ins1. Si es distinta, el nombre debe apuntar al\n // de la clase declarada en el hasMany. (aunque en ambos casos es a esto,\n // asi que no es necesario verificar).\n \n $classes = ModelUtils::getAllAncestorsOf( $ins1->getClass() );\n \n //Logger::struct( $classes, \"Superclases de \" . $ins1->getClass() );\n \n $instConElAtributoHasMany = $ins1; // En ppio pienso que la instancia es la que tiene el atributo masMany.\n foreach ( $classes as $aclass )\n {\n //$ins = new $aclass();\n $ins = new $aclass(NULL, true);\n //if ( $ins->hasManyOfThis( $ins2->getClass() ) ) // la clase no es la que tenga el atributo, debe ser en la que se declara el atributo\n if ( $ins->attributeDeclaredOnThisClass($inst1Attr) )\n {\n //Logger::getInstance()->log(\"TIENE MANY DE \" . $ins2->getClass());\n $instConElAtributoHasMany = $ins;\n break;\n }\n \n //Logger::struct( $ins, \"Instancia de $aclass\" );\n }\n \n $tableName1 = self::tableName( $instConElAtributoHasMany );\n \n //echo \"=== \" . $ins1->getType( $inst1Attr ) . \" ==== <br/>\";\n \n // La tabla de join considera la tabla en la que se guardan las instancias del tipo \n // declarado en el hasMany, NO A LOS DE SUS SUBCLASES!!! (como podia ser ins2)\n $tableName2 = self::tableName( $ins1->getType( $inst1Attr ) );\n // $tableName2 = self::tableName( $ins2 );\n\n // TODO: Normalizar $inst1Attr ?\n \n// echo \"Nombre tabla relTableName: \". $tableName1 . \"_\" . $inst1Attr . \"_\" . $tableName2 .\"<br/>\";\n\n return $tableName1 . \"_\" . $inst1Attr . \"_\" . $tableName2; // owner_child\n }", "title": "" }, { "docid": "c06af411c752308d3612a189cf6b0bcd", "score": "0.63309646", "text": "public function linkRelationships();", "title": "" }, { "docid": "fee39e09036f519ec4e919a2a8252c64", "score": "0.6291195", "text": "public function getRelationsTable();", "title": "" }, { "docid": "dad9feebe26cf4aca3f8e68e0e3baf40", "score": "0.62186587", "text": "protected function _has_relationships(){\n\t\t//self::$has_many ;\n\t}", "title": "" }, { "docid": "bce80e4ede00d04472466030abc1478e", "score": "0.61517483", "text": "public function classes()\n\t{// link not well established\n\t\treturn $this->hasMany('App\\ClassStudents', 'StudentId', 'Id');\n\t}", "title": "" }, { "docid": "fe425d6f69639ffe679f531d7866439a", "score": "0.6136955", "text": "abstract public function relation();", "title": "" }, { "docid": "1033cb8eca5bc3a329a36e2037a6b059", "score": "0.6121896", "text": "public function tableClasses()\n {\n }", "title": "" }, { "docid": "1033cb8eca5bc3a329a36e2037a6b059", "score": "0.6121896", "text": "public function tableClasses()\n {\n }", "title": "" }, { "docid": "00e88e3a4974a530c00f1cf3f6c90fd1", "score": "0.6109375", "text": "private function init_class_relations()\n {\n // RETURN : autoconfig is switched off\n if ( !$this->boolAutorelation )\n {\n if ( $this->pObj->b_drs_sql )\n {\n $prompt = 'Nothing to do, autoconfig is switched off.';\n t3lib_div::devlog( '[INFO/SQL] ' . $prompt, $this->pObj->extKey, 0 );\n }\n return true;\n }\n // RETURN : autoconfig is switched off\n // RETURN IF : no foreign table.\n if ( !isset( $this->statementTables[ 'all' ][ 'foreigntable' ] ) )\n {\n if ( $this->pObj->b_drs_sql )\n {\n $prompt = 'Autorelation building isn\\'t needed, there isn\\'t any foreign table.';\n t3lib_div::devlog( '[INFO/SQL] ' . $prompt, $this->pObj->extKey, 0 );\n }\n return true;\n }\n // RETURN IF : no foreign table.\n // Prompt the current TypoScript configuration to the DRS\n $this->relations_confDRSprompt();\n\n // Initialises the class var $b_left_join\n $this->init_class_bLeftJoin();\n\n // Get all used tables\n $tables = $this->statementTables[ 'all' ][ 'localtable' ];\n $tables = $tables + $this->statementTables[ 'all' ][ 'foreigntable' ];\n\n // LOOP tables\n $this->init_class_relationsLoop( $tables );\n\n return;\n }", "title": "" }, { "docid": "a0329b7eda00065bbed9149f681cea99", "score": "0.60989326", "text": "function getRelatedTable()\n {\n }", "title": "" }, { "docid": "617e0c8051df82be319e3d0a2bd1e2c5", "score": "0.60038024", "text": "public function getRelationshipTable()\n {\n return $this->relationshipTable;\n }", "title": "" }, { "docid": "557d11f24a7a08185e6a406da494485a", "score": "0.59987056", "text": "public static function getRelations(){\n return array(\n \n );\n }", "title": "" }, { "docid": "d0812cd47c94edbf4faa53c3ad549cb1", "score": "0.5977979", "text": "public function buildRelations()\n {\n $this->addRelation('Customer', '\\\\Customer', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArcuCustId',\n 1 => ':ArcuCustId',\n ),\n), null, null, null, false);\n $this->addRelation('CustomerShipto', '\\\\CustomerShipto', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArcuCustId',\n 1 => ':ArcuCustId',\n ),\n 1 =>\n array (\n 0 => ':ArstShipId',\n 1 => ':ArstShipId',\n ),\n), null, null, null, false);\n $this->addRelation('SalesOrderDetail', '\\\\SalesOrderDetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehdNbr',\n 1 => ':OehdNbr',\n ),\n), null, null, 'SalesOrderDetails', false);\n $this->addRelation('SalesOrderShipment', '\\\\SalesOrderShipment', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehshNbr',\n 1 => ':OehdNbr',\n ),\n), null, null, 'SalesOrderShipments', false);\n $this->addRelation('SalesOrderLotserial', '\\\\SalesOrderLotserial', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehdNbr',\n 1 => ':OehdNbr',\n ),\n), null, null, 'SalesOrderLotserials', false);\n $this->addRelation('SoAllocatedLotserial', '\\\\SoAllocatedLotserial', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehdNbr',\n 1 => ':OehdNbr',\n ),\n), null, null, 'SoAllocatedLotserials', false);\n $this->addRelation('SoPickedLotserial', '\\\\SoPickedLotserial', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehdNbr',\n 1 => ':OehdNbr',\n ),\n), null, null, 'SoPickedLotserials', false);\n }", "title": "" }, { "docid": "fa42e66f1ff876ebc8b43594c7775050", "score": "0.5925387", "text": "public function buildRelations()\n\t{\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Local', 'Local', RelationMap::MANY_TO_ONE, array('local_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Responsavel', 'Responsavel', RelationMap::MANY_TO_ONE, array('responsavel_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Certificado', 'Certificado', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('Cliente', 'Cliente', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('ContadorComissionamento', 'ContadorComissionamento', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('ContadorContato', 'ContadorContato', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('ContadorDetalhar', 'ContadorDetalhar', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n $this->addRelation('Prospect', 'Prospect', RelationMap::ONE_TO_MANY, array('id' => 'contador_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "747db151e709182d06f8282bc03766d9", "score": "0.58956575", "text": "static function TableName()\n {\n return 'relationships';\n }", "title": "" }, { "docid": "ec50e0d44206860857431c07983ee945", "score": "0.58900136", "text": "abstract public function buildRelations();", "title": "" }, { "docid": "f4b8925a503679378cb7f6b5d38feb63", "score": "0.5888201", "text": "public function buildRelations()\n\t{\n $this->addRelation('User', 'User', RelationMap::MANY_TO_ONE, array('id' => 'id', ), null, null);\n $this->addRelation('Purchase', 'Purchase', RelationMap::MANY_TO_ONE, array('purchase_id' => 'id', ), null, null);\n $this->addRelation('Sale', 'Purchase', RelationMap::MANY_TO_ONE, array('sell_id' => 'id', ), null, null);\n $this->addRelation('Deposit', 'Deposit', RelationMap::MANY_TO_ONE, array('deposit_id' => 'id', ), null, null);\n $this->addRelation('Transfer', 'Transfer', RelationMap::MANY_TO_ONE, array('transfer_id' => 'id', ), null, null);\n\t}", "title": "" }, { "docid": "a48e43c4ad8e3091cf7f7b60e5d2c7f9", "score": "0.5886489", "text": "public function buildRelations()\n\t{\n\t\t$this->addRelation('Endereco', 'Endereco', RelationMap::MANY_TO_ONE, array('endereco_id' => 'id', ), null, null);\n\t\t$this->addRelation('IgrejaRelatedByIgrejaId', 'Igreja', RelationMap::MANY_TO_ONE, array('igreja_id' => 'id', ), null, null);\n\t\t$this->addRelation('UsuarioRelatedByResponsavelId', 'Usuario', RelationMap::MANY_TO_ONE, array('responsavel_id' => 'id', ), null, null);\n\t\t$this->addRelation('UsuarioRelatedByCriadorId', 'Usuario', RelationMap::MANY_TO_ONE, array('criador_id' => 'id', ), null, null);\n\t\t$this->addRelation('AgendaIgreja', 'AgendaIgreja', RelationMap::ONE_TO_MANY, array('id' => 'igreja_id', ), null, null, 'AgendaIgrejas');\n\t\t$this->addRelation('IgrejaRelatedById', 'Igreja', RelationMap::ONE_TO_MANY, array('id' => 'igreja_id', ), null, null, 'IgrejasRelatedById');\n\t\t$this->addRelation('MembroRelatedByFilialId', 'Membro', RelationMap::ONE_TO_MANY, array('id' => 'filial_id', ), null, null, 'MembrosRelatedByFilialId');\n\t\t$this->addRelation('MembroRelatedByInstituicaoId', 'Membro', RelationMap::ONE_TO_MANY, array('id' => 'instituicao_id', ), null, null, 'MembrosRelatedByInstituicaoId');\n\t\t$this->addRelation('MinisterioRelatedByIgrejaPertencenteId', 'Ministerio', RelationMap::ONE_TO_MANY, array('id' => 'igreja_pertencente_id', ), null, null, 'MinisteriosRelatedByIgrejaPertencenteId');\n\t\t$this->addRelation('MinisterioRelatedByInstituicaoId', 'Ministerio', RelationMap::ONE_TO_MANY, array('id' => 'instituicao_id', ), null, null, 'MinisteriosRelatedByInstituicaoId');\n\t\t$this->addRelation('NoticiaIgreja', 'NoticiaIgreja', RelationMap::ONE_TO_MANY, array('id' => 'igreja_id', ), null, null, 'NoticiaIgrejas');\n\t\t$this->addRelation('PedidoOracao', 'PedidoOracao', RelationMap::ONE_TO_MANY, array('id' => 'instituicao_id', ), null, null, 'PedidoOracaos');\n\t\t$this->addRelation('Pg', 'Pg', RelationMap::ONE_TO_MANY, array('id' => 'igreja_responsavel_id', ), null, null, 'Pgs');\n\t\t$this->addRelation('PodcastIgreja', 'PodcastIgreja', RelationMap::ONE_TO_MANY, array('id' => 'igreja_id', ), null, null, 'PodcastIgrejas');\n\t\t$this->addRelation('UsuarioRelatedByFilialId', 'Usuario', RelationMap::ONE_TO_MANY, array('id' => 'filial_id', ), null, null, 'UsuariosRelatedByFilialId');\n\t\t$this->addRelation('UsuarioRelatedByInstituicaoId', 'Usuario', RelationMap::ONE_TO_MANY, array('id' => 'instituicao_id', ), null, null, 'UsuariosRelatedByInstituicaoId');\n\t\t$this->addRelation('UsuarioFilial', 'UsuarioFilial', RelationMap::ONE_TO_MANY, array('id' => 'filial_id', ), null, null, 'UsuarioFilials');\n\t\t$this->addRelation('VideoIgreja', 'VideoIgreja', RelationMap::ONE_TO_MANY, array('id' => 'igreja_id', ), null, null, 'VideoIgrejas');\n\t\t$this->addRelation('Agenda', 'Agenda', RelationMap::MANY_TO_MANY, array(), null, null, 'Agendas');\n\t\t$this->addRelation('Noticia', 'Noticia', RelationMap::MANY_TO_MANY, array(), null, null, 'Noticias');\n\t\t$this->addRelation('Podcast', 'Podcast', RelationMap::MANY_TO_MANY, array(), null, null, 'Podcasts');\n\t\t$this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_MANY, array(), null, null, 'Usuarios');\n\t\t$this->addRelation('Video', 'Video', RelationMap::MANY_TO_MANY, array(), null, null, 'Videos');\n\t}", "title": "" }, { "docid": "c7d2e7152d697a04f945f53f6ec78d6f", "score": "0.58850986", "text": "public function hydrateRelations() {}", "title": "" }, { "docid": "2304461b5b30663458a9a619c1d5c98c", "score": "0.58840126", "text": "protected function _addJoinTables()\n {\n $this->addTable('gems__respondents', array('gec_id_user' => 'grs_id_user'));\n\n if ($this->has('gec_id_organization')) {\n $this->addTable(\n 'gems__organizations',\n array('gec_id_organization' => 'gor_id_organization'),\n 'gor',\n false\n );\n }\n if ($this->has('gec_id_attended_by')) {\n $this->addLeftTable(\n 'gems__agenda_staff',\n array('gec_id_attended_by' => 'gas_id_staff'),\n 'gas',\n false\n );\n }\n }", "title": "" }, { "docid": "9366be195b2e33e5a42c1e4070b1c266", "score": "0.58633983", "text": "public function tables()\n {\n return $this->hasMany('App\\Table','database');\n }", "title": "" }, { "docid": "8e70043c6f9c8d2f6f6dbfc2147dc1b7", "score": "0.58597887", "text": "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n 'libroobra' => array(self::BELONGS_TO, 'Libroobra', 'hidparte'),\n 'tipoeventos' => array(self::BELONGS_TO, 'Tipoeventos', 'tipo'),\n 'clipro' => array(self::BELONGS_TO, 'Clipro', 'codpro'),\n 'asisobra' => array(self::HAS_MANY, 'Asisobra', 'codpro'),\n\t\t);\n\t\n\t}", "title": "" }, { "docid": "8c5baff5afc0590fccd039ec1ac890c2", "score": "0.5841268", "text": "public function testRelations()\r\n {\r\n $this->markTestIncomplete(\r\n 'This test has not been implemented yet.'\r\n );\r\n }", "title": "" }, { "docid": "cf4013b11bc75445df4c39179fce2e9d", "score": "0.58300215", "text": "public function buildRelations()\n\t{\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('usuario_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('ProspectTipo', 'ProspectTipo', RelationMap::MANY_TO_ONE, array('prospect_tipo_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Prospect', 'Prospect', RelationMap::ONE_TO_MANY, array('id' => 'prospect_contatos_id', ), 'RESTRICT', null);\n $this->addRelation('ProspectContatoDetalhe', 'ProspectContatoDetalhe', RelationMap::ONE_TO_MANY, array('id' => 'prospect_contato_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "453443f58a58be5c53179f8a21006000", "score": "0.5825051", "text": "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t\t'bookAuthors' => array(self::HAS_MANY, 'BookAuthor', 'book'),\n\t\t\t'bookReader' => array(self::HAS_ONE, 'BookReader', 'book'),\n\t\t);\n\t}", "title": "" }, { "docid": "227d31a02d5722cac4e4328a431e3d7b", "score": "0.581238", "text": "public function classes()\n {\n return $this->hasMany('App\\Classe');\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "5f593fe5951461e8124ab31047203ca0", "score": "0.57835674", "text": "public function buildRelations()\n {\n }", "title": "" }, { "docid": "17e9dda0e062f447e8662dadb51943a9", "score": "0.5774236", "text": "public function buildRelations()\n {\n $this->addRelation('Customer', '\\\\Customer', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArcuCustId',\n 1 => ':ArcuCustId',\n ),\n), null, null, null, false);\n $this->addRelation('CustomerShipto', '\\\\CustomerShipto', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':ArcuCustId',\n 1 => ':ArcuCustId',\n ),\n 1 =>\n array (\n 0 => ':ArstShipId',\n 1 => ':ArstShipId',\n ),\n), null, null, null, false);\n $this->addRelation('SalesHistoryDetail', '\\\\SalesHistoryDetail', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n), null, null, 'SalesHistoryDetails', false);\n $this->addRelation('SalesOrderShipment', '\\\\SalesOrderShipment', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehshNbr',\n 1 => ':OehhNbr',\n ),\n), null, null, 'SalesOrderShipments', false);\n $this->addRelation('SalesHistoryLotserial', '\\\\SalesHistoryLotserial', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':OehhNbr',\n 1 => ':OehhNbr',\n ),\n), null, null, 'SalesHistoryLotserials', false);\n }", "title": "" }, { "docid": "5ac8fe4fad14cdbfe5ad2d33094b89e4", "score": "0.5762088", "text": "public function associations() {\n\t\t\t\t\t$this->belongs_to('user');\n\t\t\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5737407", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5737407", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5737407", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "9fdea461e08471c28bcded0fdcebbef4", "score": "0.5737407", "text": "public function buildRelations()\n\t{\n\t}", "title": "" }, { "docid": "98c5de8a477cd220c514b0473e55d092", "score": "0.5700305", "text": "public function initialize()\n {\n $this->hasMany('persona_id', 'Empleado', 'persona_id', ['alias' => 'Empleado']);\r\n $this->hasMany('persona_id', 'Socio', 'persona_id', ['alias' => 'Socio']);\n }", "title": "" }, { "docid": "c622f52db19a2fd6abf24433a73f6747", "score": "0.5694575", "text": "public function buildRelations()\n {\n $this->addRelation('MPays', '\\\\MPays', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':pays',\n 1 => ':pays',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('Marque', '\\\\Marque', RelationMap::MANY_TO_ONE, array (\n 0 =>\n array (\n 0 => ':fabricant',\n 1 => ':marque',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('BFPartenaire', '\\\\SPartenaire', RelationMap::ONE_TO_ONE, array (\n 0 =>\n array (\n 0 => ':soc_fraude',\n 1 => ':soc_id',\n ),\n), 'CASCADE', 'CASCADE', null, false);\n $this->addRelation('BPPartenaire', '\\\\SPartenaire', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':plaig_soc',\n 1 => ':soc_id',\n ),\n), 'CASCADE', 'CASCADE', 'BPPartenaires', false);\n $this->addRelation('MROCentre', '\\\\MROCentre', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_FK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'MROCentres', false);\n $this->addRelation('MROSociete', '\\\\MROCentre', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':mro',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'MROSocietes', false);\n $this->addRelation('Fournisseur', '\\\\Fournisseur', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':soc_id_FK',\n 1 => ':soc_id',\n ),\n), 'CASCADE', 'CASCADE', 'Fournisseurs', false);\n $this->addRelation('Commande', '\\\\Commande', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':soc_id_FK',\n 1 => ':soc_id',\n ),\n), 'CASCADE', 'CASCADE', 'Commandes', false);\n $this->addRelation('Societeappareil', '\\\\Societeappareil', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_FK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Societeappareils', false);\n $this->addRelation('Contact', '\\\\Contact', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_FK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Contacts', false);\n $this->addRelation('Societecertificat', '\\\\Societecertificat', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_PK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Societecertificats', false);\n $this->addRelation('Societemetier', '\\\\Societemetier', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_PK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Societemetiers', false);\n $this->addRelation('Societetypepiece', '\\\\Societetypepiece', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_PK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Societetypepieces', false);\n $this->addRelation('Societehistorique', '\\\\Societehistorique', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_PK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Societehistoriques', false);\n $this->addRelation('Financiere', '\\\\Financiere', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_FK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Financieres', false);\n $this->addRelation('Chiffredaffaire', '\\\\Chiffredaffaire', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_FK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Chiffredaffaires', false);\n $this->addRelation('Websource', '\\\\Websource', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':societe_FK',\n 1 => ':societe',\n ),\n), 'CASCADE', 'CASCADE', 'Websources', false);\n }", "title": "" }, { "docid": "88037ded486613ef6875ad9cd5e8e9a2", "score": "0.5690464", "text": "function relationshipsQueriesManagment()\n\t{\n\t\t\n\t\t-instalirat Barry hd ekstenziju:\n\t\thttps://github.com/barryvdh/laravel-ide-helper\n\t\t\n\t\t//logiranje sql upita\n\t\t//dodano u AppSErviceProvider.php klasu\n\t\t\\DB::listen(function ($event) {\n\t\t\tdump($event->sql);\n\t\t\tdump($event->bindings);\n\t\t});\n\t\t\n\t\t//1.)RELATIONSHIP METODA VS 2.)DYNAMIC PROPERTIES METODA:\n\t\t\n\t\t//za svaki dopbavljeni user radi novi uput\n\t\t//loše perfomase\n\t\t$hamsters = \\App\\Hamster::get();\n\n\t\t\n\t\tforeach ($hamsters as $hamster){\n\t\t\techo $hamster->user()->first()->name;\n\t\t}\n\n\t\t//EAGER LOADING-prikuplja sve idove od user tablice i radi jedan upit WHERE IN idovi\n\t\t//with(user) -user .ime fucnkije u model koja poezuje model sa modelom Usera\n\t\t//********VAŽNO!!! first() .koristi se ode umjesto get() da se dobije single user a ne cijal kolekcija\n\t\t$hamsters = \\App\\Hamster::with('user')->get();\n\n\t\tforeach ($hamsters as $hamster){\n\t\t\techo $hamster->user()->first()->name;\n\t\t}\n\t}", "title": "" }, { "docid": "80fa944ab0d3da85c1c4178db17d1ec7", "score": "0.56893873", "text": "public function buildRelations()\n {\n $this->addRelation('Client', 'FOS\\\\UserBundle\\\\Propel\\\\User', RelationMap::MANY_TO_ONE, array('client_user_id' => 'id', ), null, null);\n $this->addRelation('ServiceProvider', 'FOS\\\\UserBundle\\\\Propel\\\\User', RelationMap::MANY_TO_ONE, array('service_provider_user_id' => 'id', ), null, null);\n $this->addRelation('Day', 'RMT\\\\TimeScheduling\\\\Model\\\\Day', RelationMap::MANY_TO_ONE, array('day_id' => 'id', ), null, null);\n }", "title": "" }, { "docid": "990db67c4368efcc00c50a274925b5b7", "score": "0.5687915", "text": "public function getRelations();", "title": "" }, { "docid": "39ab41abfd54b8bc00e664ff97ff00ac", "score": "0.56850404", "text": "public function defaultExposedRelations();", "title": "" }, { "docid": "f50093bfc25e990ac64c1ab33af34fd2", "score": "0.56836617", "text": "public function relations()\r\n\t{\r\n\t\t// class name for the relations automatically generated below.\r\n\t\treturn array(\r\n\t\t\t'articles' => array(self::HAS_MANY, 'Article', 'author_id'),\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "eaa2c3ed37395d2a6b7db593a0d77a0d", "score": "0.56719106", "text": "protected function getRelations()\n\t{\n\t\treturn ['groups', 'contents'];\n\t}", "title": "" }, { "docid": "adad4e094993c418904019dba8222e32", "score": "0.5666166", "text": "private function init_class_relationsLoop( $tables )\n {\n if ( empty( $tables ) )\n {\n return;\n }\n\n foreach ( ( array ) $tables as $table )\n {\n // Get the TCA array of the current column\n $arrColumns = $GLOBALS[ 'TCA' ][ $table ][ 'columns' ];\n\n // CONTINUE : current table hasn't any TCA columns\n if ( !is_array( $arrColumns ) )\n {\n continue;\n }\n // CONTINUE : current table hasn't any TCA columns\n // LOOP each TCA column\n foreach ( ( array ) $arrColumns as $columnsKey => $columnsValue )\n {\n // Get the TCA configuration of the current column\n $config = $columnsValue[ 'config' ];\n // Get the TCA configuration path of the current column\n $configPath = $table . '.' . $columnsKey . '.config.';\n\n // CONTINUE : requirements aren't met\n if ( !$this->relations_requirements( $table, $columnsKey, $config, $configPath ) )\n {\n continue;\n }\n // CONTINUE : requirements aren't met\n // Get the foreign table\n $foreignTable = $this->relations_getForeignTable( $tables, $config, $configPath );\n // CONTINUE : there is no foreign table\n if ( empty( $foreignTable ) )\n {\n continue;\n }\n // CONTINUE : there is no foreign table\n // Get the foreign table\n // SWITCH mm or single\n switch ( $config[ 'MM' ] )\n {\n case( true ):\n $this->init_class_relationsMm( $table, $columnsKey, $config, $foreignTable );\n break;\n case( false ):\n default:\n $this->init_class_relationsSingle( $table, $columnsKey, $foreignTable, $config );\n break;\n }\n // SWITCH mm or single\n }\n // LOOP each TCA column\n }\n // LOOP tables\n }", "title": "" }, { "docid": "560d60824bae00db6d79d418d5c945c1", "score": "0.56430227", "text": "public function ClassObj() {\n return $this->belongsTo(\"App\\\\Models\\\\ClassObj\");\n }", "title": "" }, { "docid": "69468693787a007c729bbbf732e49fa4", "score": "0.56379104", "text": "public function relations()\n\t{\n\t\t// class name for the relations automatically generated below.\n\t\treturn array(\n\t\t\t'tipoUsuario' => array(self::BELONGS_TO, 'TipoUsuario', 'tipo_usuario_id'),\n\t\t);\n\t}", "title": "" }, { "docid": "087e424b073c5f6c5647872d2cde3325", "score": "0.56371903", "text": "abstract public function testRelationships();", "title": "" }, { "docid": "b5a7c8cc3a66a9d6f57a27755da30fa3", "score": "0.5628897", "text": "public static function getRelations() {\n\t\tstatic $relations = array();\n\n\t\tif (!empty($relations)) {\n\t\t\treturn $relations;\n\t\t}\n\n\t\t$class = get_called_class();\n\t\t$refl = new \\ReflectionClass($class);\n\t\tforeach ($refl->getConstants() AS $name => $value) {\n\t\t\t// skip all constants start with \"_\", i.e. _DATABASE_\n\t\t\tif (0 === strpos($name, '_')) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (FALSE !== strpos($value, ':')) {\n\t\t\t\t$classes = explode(':', $value);\n\t\t\t\tif (!empty($classes[0]) && !empty($classes[1])) {\n\t\t\t\t\t// ManyToManyRelation, i.e. \"to_class:through_class\"\n\t\t\t\t\t$relations[$name] = new ManyToManyRelation($classes[0], $classes[1]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// OneToManyField, i.e. \"to_class:\"\n\t\t\t\t\t$relations[$name] = new OneToManyRelation($classes[0]);\n\t\t\t\t}\n\t\t\t}\n else {\n $pattern = '/([a-zA-Z_\\\\\\\\]+)\\(([a-zA-Z_]+)\\)/';\n preg_match($pattern, $value, $matches);\n $to_class = $matches[1];\n $to_field = $matches[2];\n if (class_exists(\"{$to_class}\")) {\n\t\t\t\t $relations[$name] = new ForeignKey($to_class, $to_field);\n }\n }\n\t\t}\n\n\t\treturn $relations;\n\t}", "title": "" }, { "docid": "3b40a75f2b34784a9a89c15228550a30", "score": "0.5624572", "text": "public function getJoinedClasses()\n {\n $userId = ContextHelper::GetRequestUserId();\n $classes = AppUser::find($userId)->joinClasses;\n return VirtualClassResource::collection($classes);\n }", "title": "" }, { "docid": "a4f43705b1229a89a0b2d353713398ec", "score": "0.562379", "text": "public function buildRelations()\n {\n $this->addRelation('MultimediaEtablissement', 'Cungfoo\\\\Model\\\\MultimediaEtablissement', RelationMap::MANY_TO_ONE, array('multimedia_etablissement_id' => 'id', ), 'CASCADE', null);\n $this->addRelation('Tag', 'Cungfoo\\\\Model\\\\Tag', RelationMap::MANY_TO_ONE, array('tag_id' => 'id', ), 'CASCADE', null);\n }", "title": "" }, { "docid": "23ffb48dff2bd0a1047410bad8086c88", "score": "0.56189454", "text": "public function buildRelations()\n {\n $this->addRelation('Marcatallaje', 'Marcatallaje', RelationMap::ONE_TO_MANY, array('idtallaje' => 'idtallaje', ), 'CASCADE', 'CASCADE', 'Marcatallajes');\n $this->addRelation('Productotallaje', 'Productotallaje', RelationMap::ONE_TO_MANY, array('idtallaje' => 'idtallaje', ), 'CASCADE', 'CASCADE', 'Productotallajes');\n }", "title": "" }, { "docid": "bea29acdbb7aecb0392e4afa9fe665b7", "score": "0.5611299", "text": "abstract public function getRelations(): array;", "title": "" }, { "docid": "717f2d5bcc9d94bb82e4eca9032fd3e4", "score": "0.559948", "text": "public function relations() {\n return array(\n 'type'=>array(self::BELONGS_TO, 'Type', 'type_id') \n \n );\n }", "title": "" }, { "docid": "4d8a15f0011b764061d2321bcc367c84", "score": "0.55904603", "text": "public function Relationship() {\n return $this->belongsTo(\"App\\\\Models\\\\Relationship\");\n }", "title": "" }, { "docid": "14ffffef2d76fc208245d90f2878f26b", "score": "0.5588881", "text": "public function buildRelations()\n {\n $this->addRelation('PointSystem', '\\\\PointSystem', RelationMap::MANY_TO_ONE, array('point_system_id' => 'point_system_id', ), null, null);\n $this->addRelation('Store', '\\\\Store', RelationMap::MANY_TO_ONE, array('store_id' => 'store_id', ), null, null);\n }", "title": "" }, { "docid": "478c8da8c0f8bba9e8b33dc8d8cc7bb1", "score": "0.55815464", "text": "public function buildRelations()\n\t{\n $this->addRelation('Banco', 'Banco', RelationMap::MANY_TO_ONE, array('banco_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('ContaContabil', 'ContaContabil', RelationMap::MANY_TO_ONE, array('conta_contabil_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Pedido', 'Pedido', RelationMap::MANY_TO_ONE, array('pedido_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Certificado', 'Certificado', RelationMap::MANY_TO_ONE, array('certificado_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('FormaPagamento', 'FormaPagamento', RelationMap::MANY_TO_ONE, array('forma_pagamento_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('Boleto', 'Boleto', RelationMap::ONE_TO_MANY, array('id' => 'contas_receber_id', ), 'RESTRICT', null);\n $this->addRelation('LancamentoCaixa', 'LancamentoCaixa', RelationMap::ONE_TO_MANY, array('id' => 'conta_receber_id', ), 'RESTRICT', null);\n $this->addRelation('LancamentoConta', 'LancamentoConta', RelationMap::ONE_TO_MANY, array('id' => 'conta_receber_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "06b1feffbec3350233d6b8f2767311e3", "score": "0.55629873", "text": "public function classes()\n {\n return $this->belongsTo('App\\Model\\Classes', 'class_id');\n }", "title": "" }, { "docid": "72efc816baa82bd8cd2fd0849bae1c16", "score": "0.5553265", "text": "public function initialize()\n {\n $this->hasMany('id', 'Entities\\ExchangeTransaction', 'id_transaction', array('alias' => 'ExchangeTransaction'));\n $this->hasMany('id', 'Entities\\FactorTransaction', 'id_transaction', array('alias' => 'FactorTransaction'));\n }", "title": "" }, { "docid": "4860bb448b14c68e697ebdc668a946e5", "score": "0.5546941", "text": "public function userTypeRelations()\n {\n // hasMany(RelatedModel, foreignKeyOnRelatedModel = user_id, localKey = id)\n return $this->hasMany('App\\UserTypeRelation','user_id','user_id');\n }", "title": "" }, { "docid": "a5a938709552eb764efc992014f77f9c", "score": "0.5545729", "text": "public function buildRelations()\r\n\t{\r\n $this->addRelation('ModuleEntity', 'ModuleEntity', RelationMap::MANY_TO_ONE, array('entityName' => 'name', ), 'CASCADE', null);\r\n $this->addRelation('ModuleEntityFieldRelatedByEntitynamefielduniquename', 'ModuleEntityField', RelationMap::MANY_TO_ONE, array('entityNameFieldUniqueName' => 'uniqueName', ), 'CASCADE', null);\r\n $this->addRelation('ModuleEntityFieldRelatedByEntitydatefielduniquename', 'ModuleEntityField', RelationMap::MANY_TO_ONE, array('entityDateFieldUniqueName' => 'uniqueName', ), 'CASCADE', null);\r\n $this->addRelation('ModuleEntityFieldRelatedByEntitybooleanfielduniquename', 'ModuleEntityField', RelationMap::MANY_TO_ONE, array('entityBooleanFieldUniqueName' => 'uniqueName', ), 'CASCADE', null);\r\n $this->addRelation('AlertSubscriptionUser', 'AlertSubscriptionUser', RelationMap::ONE_TO_MANY, array('id' => 'alertSubscriptionId', ), 'CASCADE', null);\r\n $this->addRelation('User', 'User', RelationMap::MANY_TO_MANY, array(), 'CASCADE', null);\r\n\t}", "title": "" }, { "docid": "1f6f831b984ca351cb77edf7ea4042e7", "score": "0.55280006", "text": "public function get_foreign_table();", "title": "" }, { "docid": "eaae75c451e6d84670891cae51eda450", "score": "0.55270374", "text": "public function classes()\n {\n return $this->belongsToMany('App\\Classes', 'teacher_class', 'id_teacher', 'id_class');\n }", "title": "" }, { "docid": "11e4ab7452dd68213d0c57900e6012bb", "score": "0.5526487", "text": "public function getForeginRelationshipsJoins(){\n $rel = self::getForeginRelationships();\n\n return '';\n }", "title": "" }, { "docid": "d4e61bd1944edd14d5abb8dbbd20c8fb", "score": "0.55247784", "text": "public function buildRelations()\n\t{\n $this->addRelation('Contador', 'Contador', RelationMap::MANY_TO_ONE, array('contador_id' => 'id', ), 'RESTRICT', null);\n $this->addRelation('ContadorLancamento', 'ContadorLancamento', RelationMap::ONE_TO_MANY, array('id' => 'contador_comissionamento_id', ), 'RESTRICT', null);\n\t}", "title": "" }, { "docid": "7fa81d761966db3c4c72d9c068cd8119", "score": "0.55184746", "text": "public function relationsFromMethod();", "title": "" }, { "docid": "a4a4c01a0ca7d82661faccef30148732", "score": "0.55080587", "text": "public function initialize()\n {\n $this->hasMany('id', 'Acl', 'idTypeUser', array('alias' => 'Acl'));\n $this->hasMany('id', 'User', 'idTypeUser', array('alias' => 'Users'));\n }", "title": "" }, { "docid": "212bcef0817778a6ae433101221c9724", "score": "0.5505792", "text": "public function conceptRelationships(){\n return $this->hasMany(ConceptRelationship::class);\n }", "title": "" }, { "docid": "82644cca9b92fff89e01d2d33de927b3", "score": "0.5501127", "text": "public function setRelationsTable($table = null);", "title": "" }, { "docid": "e602a2474cb34a5890ff574cd4986e93", "score": "0.550032", "text": "public function buildRelations(): void\n {\n $this->addRelation('LoginPath', '\\\\AUTH\\\\Models\\\\LoginPath', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':ID_PROVIDER',\n 1 => ':ID_PROVIDER',\n ),\n), null, null, 'LoginPaths', false);\n $this->addRelation('LoginAccount', '\\\\AUTH\\\\Models\\\\LoginAccount', RelationMap::ONE_TO_MANY, array (\n 0 =>\n array (\n 0 => ':ID_PROVIDER',\n 1 => ':ID_PROVIDER',\n ),\n), null, null, 'LoginAccounts', false);\n }", "title": "" }, { "docid": "b9bb836f7059498bc298047a87fc76f9", "score": "0.5490023", "text": "public static function relations()\n {\n return array();\n }", "title": "" }, { "docid": "ce1ef6d475121079bec89a8e5f38b45a", "score": "0.5488299", "text": "protected function related()\n {\n }", "title": "" }, { "docid": "1b3419b23796c4e21cf1adcb71dd1b1d", "score": "0.54844767", "text": "public function buildRelations()\n {\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('idusuario' => 'id', ), null, null);\n }", "title": "" }, { "docid": "1b3419b23796c4e21cf1adcb71dd1b1d", "score": "0.54844767", "text": "public function buildRelations()\n {\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('idusuario' => 'id', ), null, null);\n }", "title": "" }, { "docid": "1b3419b23796c4e21cf1adcb71dd1b1d", "score": "0.54844767", "text": "public function buildRelations()\n {\n $this->addRelation('Usuario', 'Usuario', RelationMap::MANY_TO_ONE, array('idusuario' => 'id', ), null, null);\n }", "title": "" }, { "docid": "b1532dcd7ea70fd374b21dfeb04b9e9c", "score": "0.54800034", "text": "public function classes()\n {\n return $this->hasMany(sharedClass::class, 'groupId');\n }", "title": "" }, { "docid": "989d43581b3c3b23e59e5e6b2a46124e", "score": "0.5472379", "text": "public function buildRelations()\n {\n $this->addRelation('JenisGugus', 'DataDikdas\\\\Model\\\\JenisGugus', RelationMap::MANY_TO_ONE, array('jenis_gugus_id' => 'jenis_gugus_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('Sekolah', 'DataDikdas\\\\Model\\\\Sekolah', RelationMap::MANY_TO_ONE, array('sekolah_inti_id' => 'sekolah_id', ), 'RESTRICT', 'RESTRICT');\n $this->addRelation('AnggotaGugus', 'DataDikdas\\\\Model\\\\AnggotaGugus', RelationMap::ONE_TO_MANY, array('gugus_id' => 'gugus_id', ), 'RESTRICT', 'RESTRICT', 'AnggotaGuguses');\n }", "title": "" }, { "docid": "9463116f268a24c1b7138318a2d21360", "score": "0.547158", "text": "public function buildRelations()\n {\n $this->addRelation('Clients', 'Clients', RelationMap::MANY_TO_ONE, array('op_cl_id' => 'cl_id', ), null, null);\n $this->addRelation('ContactClient', 'Contacts', RelationMap::MANY_TO_ONE, array('op_ct_id' => 'ct_id', ), null, null);\n $this->addRelation('ContactFacturation', 'Contacts', RelationMap::MANY_TO_ONE, array('op_ct_fact_id' => 'ct_id', ), null, null);\n $this->addRelation('UserDC', 'Users', RelationMap::MANY_TO_ONE, array('op_dc_id' => 'user_id', ), null, null);\n $this->addRelation('UserCP', 'Users', RelationMap::MANY_TO_ONE, array('op_cp_id' => 'user_id', ), null, null);\n $this->addRelation('UserCdp', 'Users', RelationMap::MANY_TO_ONE, array('op_cdp_id' => 'user_id', ), null, null);\n $this->addRelation('ClientFactureOptions', 'ClientFactureOptions', RelationMap::MANY_TO_ONE, array('op_cl_id' => 'cl_id', ), null, null);\n $this->addRelation('ClientContratOptions', 'ClientContratOptions', RelationMap::MANY_TO_ONE, array('op_cl_id' => 'cl_id', ), null, null);\n $this->addRelation('ClientSiteForLog', 'ClientSites', RelationMap::MANY_TO_ONE, array('cl_site_id_for_log' => 'cl_site_id', ), null, null);\n $this->addRelation('GedelogOperationParams', 'GedelogOperationParams', RelationMap::MANY_TO_ONE, array('op_id' => 'op_id', ), null, null);\n $this->addRelation('ROperationStatus', 'ROperationStatus', RelationMap::MANY_TO_ONE, array('op_status_id' => 'os_id', ), null, null);\n $this->addRelation('RCustomActivites', 'RCustomActivites', RelationMap::MANY_TO_ONE, array('op_act_id' => 'act_id', ), null, null);\n $this->addRelation('ROperationType', 'ROperationType', RelationMap::MANY_TO_ONE, array('op_type_id' => 'ot_id', ), null, null);\n $this->addRelation('ROperationTypeSub', 'ROperationTypeSub', RelationMap::MANY_TO_ONE, array('op_subtype_id' => 'ost_id', ), null, null);\n $this->addRelation('OperationsExt', 'OperationsExt', RelationMap::MANY_TO_ONE, array('op_id' => 'op_id', ), null, null);\n $this->addRelation('RDelaiDevis', 'RDelaiDevis', RelationMap::MANY_TO_ONE, array('op_delai_devis_id' => 'r_delai_devis_id', ), null, null);\n $this->addRelation('InvoicingAddressContact', 'Contacts', RelationMap::MANY_TO_ONE, array('op_ct_fact_addr_id' => 'ct_id', ), null, null);\n $this->addRelation('OperationsRelatedByOpParentId', 'Operations', RelationMap::MANY_TO_ONE, array('op_parent_id' => 'op_id', ), null, null);\n $this->addRelation('OperationUniverse', 'ROperationUniverses', RelationMap::MANY_TO_ONE, array('operation_universe_id' => 'r_operation_universe_id', ), null, null);\n $this->addRelation('OperationMedia', 'ROperationMedias', RelationMap::MANY_TO_ONE, array('operation_media_id' => 'r_operation_media_id', ), null, null);\n $this->addRelation('OperationTemplate', 'ROperationTypeSubTpl', RelationMap::MANY_TO_ONE, array('operation_ost_tpl_id' => 'ost_tpl_id', ), null, null);\n $this->addRelation('ROperationClassifications', 'ROperationClassifications', RelationMap::MANY_TO_ONE, array('op_classification_id' => 'r_operation_classification_id', ), null, null);\n $this->addRelation('Factures', 'Factures', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'Facturess');\n $this->addRelation('LnkOperationOption', 'LnkOperationOption', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'LnkOperationOptions');\n $this->addRelation('LnkOperationsContactsMail', 'LnkOperationsContactsMail', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'LnkOperationsContactsMails');\n $this->addRelation('LnkOperationCountry', 'LnkOperationCountry', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'LnkOperationCountrys');\n $this->addRelation('OperationDecouverts', 'OperationDecouverts', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'OperationDecouvertss');\n $this->addRelation('OperationPrestations', 'OperationPrestations', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'OperationPrestationss');\n $this->addRelation('OperationPrimes', 'OperationPrimes', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'OperationPrimess');\n $this->addRelation('OperationRubriques', 'OperationRubriques', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'OperationRubriquess');\n $this->addRelation('OperationScenarii', 'OperationScenarii', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'OperationScenariis');\n $this->addRelation('OperationStatuts', 'OperationStatuts', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'OperationStatutss');\n $this->addRelation('OperationTasks', 'OperationTasks', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'OperationTaskss');\n $this->addRelation('OperationsRelatedByOpId', 'Operations', RelationMap::ONE_TO_MANY, array('op_id' => 'op_parent_id', ), null, null, 'OperationssRelatedByOpId');\n $this->addRelation('PlanFacturationDetails', 'PlanFacturationDetails', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'PlanFacturationDetailss');\n $this->addRelation('PlanFacturationParams', 'PlanFacturationParams', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'PlanFacturationParamss');\n $this->addRelation('FactureEditionHistory', 'FactureEditionHistory', RelationMap::ONE_TO_MANY, array('op_id' => 'op_id', ), null, null, 'FactureEditionHistorys');\n $this->addRelation('RRubriquesType', 'RRubriquesType', RelationMap::MANY_TO_MANY, array(), null, null, 'RRubriquesTypes');\n $this->addRelation('RTvaType', 'RTvaType', RelationMap::MANY_TO_MANY, array(), null, null, 'RTvaTypes');\n }", "title": "" }, { "docid": "646860f3a83298a199117bb411a3fc20", "score": "0.5465717", "text": "public function testRelations()\n {\n if ($this->relationsTest == false) {\n\n return $this->markTestSkipped(\n 'Este case está configurado para não testar as relations do modelo'\n );\n }\n\n $object = $this->getModelObject();\n\n $schema = $object->metaData->tableSchema;\n $foreignKeys = $schema->foreignKeys;\n $relations = $object->relations();\n\n if (!empty($foreignKeys)) {\n\n foreach ($relations as $data) {\n\n list($type, $relatedClass, $fkAttribute) = $data;\n\n if (is_array($fkAttribute)) {\n continue; // TODO Quando for um relacionamento \"complicado\"\n }\n\n if (isset($foreignKeys[$fkAttribute])) {\n unset($foreignKeys[$fkAttribute]);\n }\n }\n }\n\n if (count($foreignKeys)) {\n\n $attributes = implode('\", \"', array_keys($foreignKeys));\n $message = 'Os atributos \"' . $attributes . '\" têm Foreign Key, mas não têm relation definida.';\n\n $this->fail($message);\n }\n }", "title": "" }, { "docid": "64cb31b14e7ca06d696c0759f0db74f1", "score": "0.5442737", "text": "protected function getRelations()\n\t{\n\t\treturn ['contentItems', 'sectionType', 'children'];\n\t}", "title": "" }, { "docid": "53415a84bd67946ecf2ef700509d28d0", "score": "0.54414266", "text": "protected function addClassTable()\n {\n $table = $this->createTable($this->options['class_table_name']);\n $table->addColumn('id', 'integer', ['unsigned' => true, 'autoincrement' => true]);\n $table->addColumn('class_type', 'string', ['length' => 200]);\n $table->setPrimaryKey(['id']);\n $table->addUniqueIndex(['class_type']);\n }", "title": "" }, { "docid": "940a96334e83cf2087f0085291668533", "score": "0.54411894", "text": "public function buildRelations()\n {\n $this->addRelation('sfGuardUserRelatedByCreatedBy', 'sfGuardUser', RelationMap::MANY_TO_ONE, array('created_by' => 'id', ), 'SET NULL', null);\n $this->addRelation('sfGuardUserRelatedByUpdatedBy', 'sfGuardUser', RelationMap::MANY_TO_ONE, array('updated_by' => 'id', ), 'SET NULL', null);\n $this->addRelation('sfGuardUserProfile', 'sfGuardUserProfile', RelationMap::ONE_TO_MANY, array('id' => 'collaborator_id', ), 'CASCADE', null, 'sfGuardUserProfiles');\n $this->addRelation('AlertRelatedByAcquittedBy', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'acquitted_by', ), null, null, 'AlertsRelatedByAcquittedBy');\n $this->addRelation('AlertRelatedByRecipientId', 'Alert', RelationMap::ONE_TO_MANY, array('id' => 'recipient_id', ), null, null, 'AlertsRelatedByRecipientId');\n $this->addRelation('SfcComment', 'SfcComment', RelationMap::ONE_TO_MANY, array('id' => 'collaborator_id', ), 'SET NULL', null, 'SfcComments');\n }", "title": "" }, { "docid": "054933f37a58939875c08bde841c0c31", "score": "0.5433198", "text": "public function foreignKeys();", "title": "" }, { "docid": "d797699320cbe70dbec43c5af4de8c5c", "score": "0.5430385", "text": "public function getTableClass();", "title": "" }, { "docid": "98d07b5fe4da4be05d1c1527874978a9", "score": "0.540209", "text": "public function relations()\n {\n // class name for the relations automatically generated below.\n return array(\n 'productBrand' => array(self::BELONGS_TO, 'Brand', 'marka_id'),\n 'productCategory' => array(self::BELONGS_TO, 'Category', 'category_id'),\n );\n }", "title": "" }, { "docid": "88b1ac2f7cc2c2b7d35cb4bf2ab63774", "score": "0.54013985", "text": "public function getRelationship();", "title": "" }, { "docid": "c9bfb7e61a933e7579f4f6742a7c0ae9", "score": "0.5390079", "text": "public function getModelRelations($modelClass, $types = ['belongs_to', 'many_many', 'has_many', 'has_one', 'pivot'])\n {\n $reflector = new \\ReflectionClass($modelClass);\n $model = new $modelClass();\n $stack = [];\n $modelGenerator = new ModelGenerator();\n foreach ($reflector->getMethods(\\ReflectionMethod::IS_PUBLIC) as $method) {\n if (in_array(substr($method->name, 3), $this->skipRelations)) {\n continue;\n }\n // look for getters\n if (substr($method->name, 0, 3) !== 'get') {\n continue;\n }\n // skip class specific getters\n $skipMethods = [\n 'getRelation',\n 'getBehavior',\n 'getFirstError',\n 'getAttribute',\n 'getAttributeLabel',\n 'getOldAttribute',\n ];\n if (in_array($method->name, $skipMethods)) {\n continue;\n }\n // check for relation\n try {\n $relation = @call_user_func(array($model, $method->name));\n if ($relation instanceof \\yii\\db\\ActiveQuery) {\n #var_dump($relation->primaryModel->primaryKey);\n if ($relation->multiple === false) {\n $relationType = 'belongs_to';\n } elseif ($this->isPivotRelation($relation)) { # TODO: detecttion\n $relationType = 'pivot';\n } else {\n $relationType = 'has_many';\n }\n\n if (in_array($relationType, $types)) {\n $name = $modelGenerator->generateRelationName(\n [$relation],\n $model->getTableSchema(),\n substr($method->name, 3),\n $relation->multiple\n );\n $stack[$name] = $relation;\n }\n }\n } catch (Exception $e) {\n Yii::error('Error: '.$e->getMessage(), __METHOD__);\n }\n }\n\n return $stack;\n }", "title": "" }, { "docid": "5add3f8e372493741bb63439d30a56cd", "score": "0.5383846", "text": "public function buildRelations()\n\t{\n $this->addRelation('Individual', 'Individual', RelationMap::MANY_TO_ONE, array('individual_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Specie', 'Specie', RelationMap::MANY_TO_ONE, array('specie_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('BodyPart', 'BodyPart', RelationMap::MANY_TO_ONE, array('body_part_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Behaviour', 'Behaviour', RelationMap::MANY_TO_ONE, array('behaviour_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Company', 'Company', RelationMap::MANY_TO_ONE, array('company_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Vessel', 'Vessel', RelationMap::MANY_TO_ONE, array('vessel_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Photographer', 'Photographer', RelationMap::MANY_TO_ONE, array('photographer_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('Sighting', 'Sighting', RelationMap::MANY_TO_ONE, array('sighting_id' => 'id', ), 'SET NULL', null);\n $this->addRelation('sfGuardUserRelatedByLastEditedBy', 'sfGuardUser', RelationMap::MANY_TO_ONE, array('last_edited_by' => 'id', ), 'SET NULL', null);\n $this->addRelation('sfGuardUserRelatedByValidatedBy', 'sfGuardUser', RelationMap::MANY_TO_ONE, array('validated_by' => 'id', ), 'SET NULL', null);\n $this->addRelation('ObservationPhotoI18n', 'ObservationPhotoI18n', RelationMap::ONE_TO_MANY, array('id' => 'id', ), null, null);\n $this->addRelation('ObservationPhotoTail', 'ObservationPhotoTail', RelationMap::ONE_TO_MANY, array('id' => 'photo_id', ), 'CASCADE', null);\n $this->addRelation('ObservationPhotoDorsalLeft', 'ObservationPhotoDorsalLeft', RelationMap::ONE_TO_MANY, array('id' => 'photo_id', ), 'CASCADE', null);\n $this->addRelation('ObservationPhotoDorsalRight', 'ObservationPhotoDorsalRight', RelationMap::ONE_TO_MANY, array('id' => 'photo_id', ), 'CASCADE', null);\n\t}", "title": "" } ]
6c077ae552505dd0eb59e78f27f267da
/ Builds icons for topics
[ { "docid": "084f00c3f05340e137309c7055e5cfc4", "score": "0.75586444", "text": "function build_topic_icon_link($forum_id, $topic_id, $topic_type, $topic_reg, $topic_replies, $topic_news_id, $topic_vote, $topic_status, $topic_moved_id, $topic_post_time, $user_replied, $replies, $unread)\n\t{\n\t\t//build_topic_icon_link($forum_id, $topic_rowset[$i]['topic_id'], $topic_rowset[$i]['topic_type'], $topic_rowset[$i]['topic_replies'], $topic_rowset[$i]['news_id'], $topic_rowset[$i]['topic_vote'], $topic_rowset[$i]['topic_status'], $topic_rowset[$i]['topic_moved_id'], $topic_rowset[$i]['post_time'], $user_replied, $replies, $unread);\n\t\tglobal $config, $lang, $images, $userdata, $tracking_topics, $tracking_forums, $forum_id_append, $topic_id_append;\n\n\t\t$topic_link = array();\n\t\t$topic_link['forum_id_append'] = $forum_id_append;\n\t\t$topic_link['topic_id_append'] = $topic_id_append;\n\t\t$topic_link['topic_id'] = $topic_id;\n\t\t$topic_link['type'] = '';\n\t\t$topic_link['icon'] = '';\n\t\t$topic_link['class'] = 'topiclink';\n\t\t$topic_link['class_new'] = '';\n\t\t$topic_link['image'] = '';\n\t\t$topic_link['image_read'] = '';\n\t\t$topic_link['image_unread'] = '';\n\t\t$topic_link['image_alt'] = '';\n\t\t$topic_link['newest_post_img'] = '';\n\t\t$upi_calc['upi_prefix'] = '';\n\t\t$upi_calc['newest_post_id'] = '';\n\t\t$icon_prefix = '';\n\t\t$icon_locked = ($topic_status == TOPIC_LOCKED) ? '_locked' : '';\n\t\t$icon_own = $user_replied ? '_own' : '';\n\n\t\tif($topic_status == TOPIC_MOVED)\n\t\t{\n\t\t\t$topic_link['type'] = $lang['Topic_Moved'] . ' ';\n\t\t\t$topic_link['topic_id'] = $topic_moved_id;\n\t\t\t$topic_link['topic_id_append'] = POST_TOPIC_URL . '=' . $topic_moved_id;\n\t\t\t$topic_link['forum_id_append'] = '';\n\t\t\t$topic_link['image_alt'] = $lang['Topics_Moved'];\n\t\t\t$topic_link['newest_post_img'] = '';\n\t\t\t$topic_link['class'] = 'topiclink';\n\t\t\t$icon_prefix = 'topic_nor';\n\t\t\t$icon_locked = '_locked';\n\t\t\t$topic_link['image_read'] = $images[$icon_prefix . $icon_locked . '_read' . $icon_own];\n\t\t\t$topic_link['image_unread'] = $images[$icon_prefix . $icon_locked . '_unread' . $icon_own];\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif($topic_type == POST_GLOBAL_ANNOUNCE)\n\t\t\t{\n\t\t\t\t$topic_link['type'] = $lang['Topic_global_announcement'] . ' ';\n\t\t\t\t$topic_link['icon'] = '<img src=\"' . $images['vf_topic_ga'] . '\" alt=\"' . $lang['Topic_global_announcement_nb'] . '\" title=\"' . $lang['Topic_global_announcement_nb'] . '\" /> ';\n\t\t\t\t$topic_link['class'] = 'topic_glo';\n\t\t\t\t$icon_prefix = 'topic_glo';\n\t\t\t}\n\t\t\telseif($topic_type == POST_ANNOUNCE)\n\t\t\t{\n\t\t\t\t$topic_link['type'] = $lang['Topic_Announcement'] . ' ';\n\t\t\t\t$topic_link['icon'] = '<img src=\"' . $images['vf_topic_ann'] . '\" alt=\"' . $lang['Topic_Announcement_nb'] . '\" title=\"' . $lang['Topic_Announcement_nb'] . '\" /> ';\n\t\t\t\t$topic_link['class'] = 'topic_ann';\n\t\t\t\t$icon_prefix = 'topic_ann';\n\t\t\t}\n\t\t\telseif($topic_type == POST_STICKY)\n\t\t\t{\n\t\t\t\t$topic_link['type'] = $lang['Topic_Sticky'] . ' ';\n\t\t\t\t$topic_link['icon'] = '<img src=\"' . $images['vf_topic_imp'] . '\" alt=\"' . $lang['Topic_Sticky_nb'] . '\" title=\"' . $lang['Topic_Sticky_nb'] . '\" /> ';\n\t\t\t\t$topic_link['class'] = 'topic_imp';\n\t\t\t\t$icon_prefix = 'topic_imp';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$topic_link['type'] = '';\n\t\t\t\t//$topic_link['icon'] = '<img src=\"' . $images['vf_topic_nor'] . '\" alt=\"' . $lang['Topic'] . '\" title=\"' . $lang['Topic'] . '\" /> ';\n\t\t\t\t// Better empty icon for normal topics?\n\t\t\t\t$topic_link['icon'] = '';\n\t\t\t\t// Event Registration - BEGIN\n\t\t\t\tif($topic_reg)\n\t\t\t\t{\n\t\t\t\t\t$topic_link['type'] = '<img src=\"' . $images['vf_topic_event'] . '\" alt=\"' . $lang['Topic_Event_nb'] . '\" title=\"' . $lang['Topic_Event_nb'] . '\" /> ' . $lang['Topic_Event'] . ' ';\n\t\t\t\t\t$topic_link['icon'] .= '<img src=\"' . $images['vf_topic_event'] . '\" alt=\"' . $lang['Topic_Event_nb'] . '\" title=\"' . $lang['Topic_Event_nb'] . '\" /> ';\n\t\t\t\t}\n\t\t\t\t// Event Registration - END\n\t\t\t\t$topic_link['class'] = 'topiclink';\n\t\t\t\tif($replies >= $config['hot_threshold'])\n\t\t\t\t{\n\t\t\t\t\t$icon_prefix = 'topic_hot';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$icon_prefix = 'topic_nor';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$topic_link['image_read'] = $images[$icon_prefix . $icon_locked . '_read' . $icon_own];\n\t\t\t$topic_link['image_unread'] = $images[$icon_prefix . $icon_locked . '_unread' . $icon_own];\n\n\t\t\tif ($topic_news_id > 0)\n\t\t\t{\n\t\t\t\t//$topic_link['type'] = $lang['News_Cmx'] . ' ';\n\t\t\t\t$topic_link['type'] = '<img src=\"' . $images['vf_topic_news'] . '\" alt=\"' . $lang['Topic_News_nb'] . '\" title=\"' . $lang['Topic_News_nb'] . '\" /> ' . $topic_link['type'];\n\t\t\t\t$topic_link['icon'] = '<img src=\"' . $images['vf_topic_news'] . '\" alt=\"' . $lang['Topic_News_nb'] . '\" title=\"' . $lang['Topic_News_nb'] . '\" /> ' . $topic_link['icon'];\n\t\t\t}\n\n\t\t\tif($topic_vote)\n\t\t\t{\n\t\t\t\t//$topic_link['type'] .= $lang['Topic_Poll'] . ' ';\n\t\t\t\t$topic_link['type'] = '<img src=\"' . $images['vf_topic_poll'] . '\" alt=\"' . $lang['Topic_Poll_nb'] . '\" title=\"' . $lang['Topic_Poll_nb'] . '\" /> ' . $topic_link['type'];\n\t\t\t\t$topic_link['icon'] = '<img src=\"' . $images['vf_topic_poll'] . '\" alt=\"' . $lang['Topic_Poll_nb'] . '\" title=\"' . $lang['Topic_Poll_nb'] . '\" /> ' . $topic_link['icon'];\n\t\t\t}\n\t\t}\n\n\t\tif($userdata['session_logged_in'])\n\t\t{\n\t\t\t//-----------------------------------------------------------\n\t\t\t//<!-- BEGIN Unread Post Information to Database Mod -->\n\t\t\tif(!$userdata['upi2db_access'] || !is_array($unread))\n\t\t\t{\n\t\t\t//<!-- END Unread Post Information to Database Mod -->\n\t\t\t//------------------------------------------------------------\n\n\t\t\t\tif($topic_post_time > $userdata['user_lastvisit'])\n\t\t\t\t{\n\t\t\t\t\tif(!empty($tracking_topics) || !empty($tracking_forums) || isset($_COOKIE[$config['cookie_name'] . '_f_all']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$unread_topics = true;\n\n\t\t\t\t\t\tif(!empty($tracking_topics[$topic_link['topic_id']]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tracking_topics[$topic_link['topic_id']] >= $topic_post_time)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$unread_topics = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(!empty($tracking_forums[$forum_id]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif($tracking_forums[$forum_id] >= $topic_post_time)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$unread_topics = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif(isset($_COOKIE[$config['cookie_name'] . '_f_all']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(intval($_COOKIE[$config['cookie_name'] . '_f_all']) >= $topic_post_time)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$unread_topics = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$unread_topics = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$unread_topics = false;\n\t\t\t\t}\n\t\t\t//--------------------------------------------------------\n\t\t\t//<!-- BEGIN Unread Post Information to Database Mod -->\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$upi_calc = $this->upi_calc_unread_simple($unread, $topic_link['topic_id']);\n\t\t\t\t$unread_topics = $upi_calc['unread'];\n\t\t\t\t//$topic_link['type'] = $upi_calc['upi_prefix'] . $topic_link['type'];\n\t\t\t\t$upi_calc['newest_post_id'] = $post_id;\n\t\t\t}\n\t\t\t//<!-- END Unread Post Information to Database Mod -->\n\t\t\t//--------------------------------------------------------\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$unread_topics = false;\n\t\t}\n\n\t\tif($unread_topics == true)\n\t\t{\n\t\t\t$topic_link['class_new'] = '-new';\n\t\t\t$topic_link['image'] = $topic_link['image_unread'];\n\t\t\t$topic_link['image_alt'] = ($topic_status == TOPIC_LOCKED) ? $lang['Topic_locked'] : $lang['New_posts'];\n\t\t\t$topic_link['newest_post_img'] = '';\n\t\t\tif (empty($upi_calc['newest_post_id']))\n\t\t\t{\n\t\t\t\t$newest_post_img_url = append_sid(CMS_PAGE_VIEWTOPIC . '?' . $topic_link['forum_id_append'] . '&amp;' . $topic_link['topic_id_append'] . '&amp;view=newest');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$newest_post_img_url = append_sid(CMS_PAGE_VIEWTOPIC . '?' . $topic_link['forum_id_append'] . '&amp;' . $topic_link['topic_id_append'] . '&amp;' . POST_POST_URL . '=' . $upi_calc['newest_post_id']) . '#p' . $upi_calc['newest_post_id'];\n\t\t\t}\n\t\t\t$topic_link['newest_post_img'] = '<a href=\"' . $newest_post_img_url . '\"><img src=\"' . $images['icon_newest_reply'] . '\" alt=\"' . $lang['View_newest_post'] . '\" title=\"' . $lang['View_newest_post'] . '\" /></a> ' . $upi_calc['upi_prefix'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$topic_link['class_new'] = '';\n\t\t\t$topic_link['image'] = $topic_link['image_read'];\n\t\t\t$topic_link['image_alt'] = ($topic_status == TOPIC_LOCKED) ? $lang['Topic_locked'] : $lang['No_new_posts'];\n\t\t\t$topic_link['newest_post_img'] = '';\n\t\t}\n\t\treturn $topic_link;\n\t}", "title": "" } ]
[ { "docid": "2b76668c56d832562126245a1b1e1efb", "score": "0.69056326", "text": "public function topicIcon($topic, array $options = array()) {\n $lastVisit = $this->Session->read('Forum.lastVisit');\n $readTopics = $this->Session->read('Forum.readTopics');\n $width = isset($options['width'])?$options['width']:null;\n $height = isset($options['height'])?$options['height']:null;\n\n if (!is_array($readTopics)) {\n $readTopics = array();\n }\n\n $icon = 'open';\n $tooltip = '';\n\n if (isset($topic['LastPost']['created'])) {\n $lastPost = $topic['LastPost']['created'];\n } else if (isset($topic['Topic']['created'])) {\n $lastPost = $topic['Topic']['created'];\n }\n\n if (!$topic['Topic']['status'] && $topic['Topic']['type'] != Topic::ANNOUNCEMENT) {\n $icon = 'closed';\n } else {\n if (isset($lastPost) && $lastPost > $lastVisit && !in_array($topic['Topic']['id'], $readTopics)) {\n $icon = 'new';\n } else if ($topic['Topic']['type'] == Topic::STICKY) {\n $icon = 'sticky';\n } else if ($topic['Topic']['type'] == Topic::IMPORTANT) {\n $icon = 'important';\n } else if ($topic['Topic']['type'] == Topic::ANNOUNCEMENT) {\n $icon = 'announcement';\n }\n }\n\n if ($icon === 'open' || $icon === 'new' || $icon === 'sticky') {\n if ($topic['Topic']['post_count'] >= Configure::read('Forum.settings.postsTillHotTopic')) {\n $icon .= '-hot';\n }\n }\n\n switch ($icon) {\n case 'open': $tooltip = __d('forum', 'No New Posts'); break;\n case 'open-hot': $tooltip = __d('forum', 'No New Posts'); break;\n case 'closed': $tooltip = __d('forum', 'Closed'); break;\n case 'new': $tooltip = __d('forum', 'New Posts'); break;\n case 'new-hot': $tooltip = __d('forum', 'New Posts'); break;\n case 'sticky': $tooltip = __d('forum', 'Sticky'); break;\n case 'sticky-hot': $tooltip = __d('forum', 'Sticky'); break;\n case 'important': $tooltip = __d('forum', 'Important'); break;\n case 'announcement': $tooltip = __d('forum', 'Announcement'); break;\n }\n\n $options = array('alt' => $tooltip, 'title' => $tooltip);\n if ($width != null) $options['width'] = $width;\n if ($height != null) $options['height'] = $height;\n return $this->Html->image(\n \t'Forum.forum_icons/icon_' . $icon . '.png',\n \t$options\n \t);\n }", "title": "" }, { "docid": "3f6cbe882a00074a8bc15d4dc16a2e9c", "score": "0.65889376", "text": "function SimplyCivi_forum_icon($new_posts, $num_posts = 0, $comment_mode = 0, $sticky = 0) {\n // because we are using a theme() instead of copying the forum-icon.tpl.php into the theme\n // we need to add in the logic that is in preprocess_forum_icon() since this isn't available\n if ($num_posts > variable_get('forum_hot_topic', 15)) {\n $icon = $new_posts ? 'hot-new' : 'hot';\n }\n else {\n $icon = $new_posts ? 'new' : 'default';\n }\n\n if ($comment_mode == COMMENT_NODE_READ_ONLY || $comment_mode == COMMENT_NODE_DISABLED) {\n $icon = 'closed';\n }\n\n if ($sticky == 1) {\n $icon = 'sticky';\n }\n\n $output = theme('image', path_to_theme() . \"/images/icons/forum-$icon.png\");\n\n if ($new_posts) {\n $output = \"<a name=\\\"new\\\">$output</a>\";\n }\n\n return $output;\n}", "title": "" }, { "docid": "78d6f5aecdf9ba7f672095cf354afca7", "score": "0.6561055", "text": "function obtain_icons()\n\t{\n\t\tif (($icons = $this->get('_icons')) === false)\n\t\t{\n\t\t\tglobal $db;\n\n\t\t\t// Topic icons\n\t\t\t$sql = 'SELECT *\n\t\t\t\tFROM ' . ICONS_TABLE . '\n\t\t\t\tORDER BY icons_order';\n\t\t\t$result = $db->sql_query($sql);\n\n\t\t\t$icons = array();\n\t\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t\t{\n\t\t\t\t$icons[$row['icons_id']]['img'] = $row['icons_url'];\n\t\t\t\t$icons[$row['icons_id']]['width'] = (int) $row['icons_width'];\n\t\t\t\t$icons[$row['icons_id']]['height'] = (int) $row['icons_height'];\n\t\t\t\t$icons[$row['icons_id']]['display'] = (bool) $row['display_on_posting'];\n\t\t\t}\n\t\t\t$db->sql_freeresult($result);\n\n\t\t\t$this->put('_icons', $icons);\n\t\t}\n\n\t\treturn $icons;\n\t}", "title": "" }, { "docid": "9c58a76557cd93e8cdeac09c8427191c", "score": "0.63247967", "text": "public function getIcon() {\n\t\t\t$icon = '';\n\n\t\t\tif ($this->newEntriesAvailable()) {\n\t\t\t\t$icon .= 'new-';\n\t\t\t}\n\n\t\t\tif ($this->isClosed()) {\n\t\t\t\t$icon .= 'closed-';\n\t\t\t}\n\n\t\t\t$icon = substr($icon, 0, -1);\n\n\t\t\tif (empty($icon)) {\n\t\t\t\t$icon = 'topic';\n\t\t\t}\n\n\t\t\treturn $icon;\n\t\t}", "title": "" }, { "docid": "14a7acbb1b1a292ce9c90a680a69f6eb", "score": "0.6289203", "text": "function bootstrap_foundation_forum_icon($new_posts, $num_posts = 0, $comment_mode = 0, $sticky = 0) {\n // because we are using a theme() instead of copying the forum-icon.tpl.php into the theme\n // we need to add in the logic that is in preprocess_forum_icon() since this isn't available\n if ($num_posts > variable_get('forum_hot_topic', 15)) {\n $icon = $new_posts ? 'hot-new' : 'hot';\n }\n else {\n $icon = $new_posts ? 'new' : 'default';\n }\n\n if ($comment_mode == COMMENT_NODE_READ_ONLY || $comment_mode == COMMENT_NODE_DISABLED) {\n $icon = 'closed';\n }\n\n if ($sticky == 1) {\n $icon = 'sticky';\n }\n\n $output = theme('image', path_to_theme() . \"/images/icons/forum-$icon.png\");\n\n if ($new_posts) {\n $output = \"<a name=\\\"new\\\">$output</a>\";\n }\n\n return $output;\n }", "title": "" }, { "docid": "aa803f8079ee428224dcdcb6151424b6", "score": "0.6244523", "text": "private function icons() {\n\t\t\n\t\t$icons = array( \n\t\t\t\"genericon-f423\" => \"genericon-404\",\n\t\t\t\"genericon-f508\" => \"genericon-activity\",\n\t\t\t\"genericon-f509\" => \"genericon-anchor\",\n\t\t\t\"genericon-f101\" => \"genericon-aside\",\n\t\t\t\"genericon-f416\" => \"genericon-attachment\",\n\t\t\t\"genericon-f109\" => \"genericon-audio\",\n\t\t\t\"genericon-f471\" => \"genericon-bold\",\n\t\t\t\"genericon-f444\" => \"genericon-book\",\n\t\t\t\"genericon-f50a\" => \"genericon-bug\",\n\t\t\t\"genericon-f447\" => \"genericon-cart\",\n\t\t\t\"genericon-f301\" => \"genericon-category\",\n\t\t\t\"genericon-f108\" => \"genericon-chat\",\n\t\t\t\"genericon-f418\" => \"genericon-checkmark\",\n\t\t\t\"genericon-f405\" => \"genericon-close\",\n\t\t\t\"genericon-f406\" => \"genericon-close-alt\",\n\t\t\t\"genericon-f426\" => \"genericon-cloud\",\n\t\t\t\"genericon-f440\" => \"genericon-cloud-download\",\n\t\t\t\"genericon-f441\" => \"genericon-cloud-upload\",\n\t\t\t\"genericon-f462\" => \"genericon-code\",\n\t\t\t\"genericon-f216\" => \"genericon-codepen\",\n\t\t\t\"genericon-f445\" => \"genericon-cog\",\n\t\t\t\"genericon-f432\" => \"genericon-collapse\",\n\t\t\t\"genericon-f300\" => \"genericon-comment\",\n\t\t\t\"genericon-f305\" => \"genericon-day\",\n\t\t\t\"genericon-f221\" => \"genericon-digg\",\n\t\t\t\"genericon-f443\" => \"genericon-document\",\n\t\t\t\"genericon-f428\" => \"genericon-dot\",\n\t\t\t\"genericon-f502\" => \"genericon-downarrow\",\n\t\t\t\"genericon-f50b\" => \"genericon-download\",\n\t\t\t\"genericon-f436\" => \"genericon-draggable\",\n\t\t\t\"genericon-f201\" => \"genericon-dribbble\",\n\t\t\t\"genericon-f225\" => \"genericon-dropbox\",\n\t\t\t\"genericon-f433\" => \"genericon-dropdown\",\n\t\t\t\"genericon-f434\" => \"genericon-dropdown-left\",\n\t\t\t\"genericon-f411\" => \"genericon-edit\",\n\t\t\t\"genericon-f476\" => \"genericon-ellipsis\",\n\t\t\t\"genericon-f431\" => \"genericon-expand\",\n\t\t\t\"genericon-f442\" => \"genericon-external\",\n\t\t\t\"genericon-f203\" => \"genericon-facebook\",\n\t\t\t\"genericon-f204\" => \"genericon-facebook-alt\",\n\t\t\t\"genericon-f458\" => \"genericon-fastforward\",\n\t\t\t\"genericon-f413\" => \"genericon-feed\",\n\t\t\t\"genericon-f468\" => \"genericon-flag\",\n\t\t\t\"genericon-f211\" => \"genericon-flickr\",\n\t\t\t\"genericon-f226\" => \"genericon-foursquare\",\n\t\t\t\"genericon-f474\" => \"genericon-fullscreen\",\n\t\t\t\"genericon-f103\" => \"genericon-gallery\",\n\t\t\t\"genericon-f200\" => \"genericon-github\",\n\t\t\t\"genericon-f206\" => \"genericon-googleplus\",\n\t\t\t\"genericon-f218\" => \"genericon-googleplus-alt\",\n\t\t\t\"genericon-f50c\" => \"genericon-handset\",\n\t\t\t\"genericon-f461\" => \"genericon-heart\",\n\t\t\t\"genericon-f457\" => \"genericon-help\",\n\t\t\t\"genericon-f404\" => \"genericon-hide\",\n\t\t\t\"genericon-f505\" => \"genericon-hierarchy\",\n\t\t\t\"genericon-f409\" => \"genericon-home\",\n\t\t\t\"genericon-f102\" => \"genericon-image\",\n\t\t\t\"genericon-f455\" => \"genericon-info\",\n\t\t\t\"genericon-f215\" => \"genericon-instagram\",\n\t\t\t\"genericon-f472\" => \"genericon-italic\",\n\t\t\t\"genericon-f427\" => \"genericon-key\",\n\t\t\t\"genericon-f503\" => \"genericon-leftarrow\",\n\t\t\t\"genericon-f107\" => \"genericon-link\",\n\t\t\t\"genericon-f207\" => \"genericon-linkedin\",\n\t\t\t\"genericon-f208\" => \"genericon-linkedin-alt\",\n\t\t\t\"genericon-f417\" => \"genericon-location\",\n\t\t\t\"genericon-f470\" => \"genericon-lock\",\n\t\t\t\"genericon-f410\" => \"genericon-mail\",\n\t\t\t\"genericon-f422\" => \"genericon-maximize\",\n\t\t\t\"genericon-f419\" => \"genericon-menu\",\n\t\t\t\"genericon-f50d\" => \"genericon-microphone\",\n\t\t\t\"genericon-f421\" => \"genericon-minimize\",\n\t\t\t\"genericon-f50e\" => \"genericon-minus\",\n\t\t\t\"genericon-f307\" => \"genericon-month\",\n\t\t\t\"genericon-f50f\" => \"genericon-move\",\n\t\t\t\"genericon-f429\" => \"genericon-next\",\n\t\t\t\"genericon-f456\" => \"genericon-notice\",\n\t\t\t\"genericon-f506\" => \"genericon-paintbrush\",\n\t\t\t\"genericon-f219\" => \"genericon-path\",\n\t\t\t\"genericon-f448\" => \"genericon-pause\",\n\t\t\t\"genericon-f437\" => \"genericon-phone\",\n\t\t\t\"genericon-f473\" => \"genericon-picture\",\n\t\t\t\"genericon-f308\" => \"genericon-pinned\",\n\t\t\t\"genericon-f209\" => \"genericon-pinterest\",\n\t\t\t\"genericon-f210\" => \"genericon-pinterest-alt\",\n\t\t\t\"genericon-f452\" => \"genericon-play\",\n\t\t\t\"genericon-f439\" => \"genericon-plugin\",\n\t\t\t\"genericon-f510\" => \"genericon-plus\",\n\t\t\t\"genericon-f224\" => \"genericon-pocket\",\n\t\t\t\"genericon-f217\" => \"genericon-polldaddy\",\n\t\t\t\"genericon-f460\" => \"genericon-portfolio\",\n\t\t\t\"genericon-f430\" => \"genericon-previous\",\n\t\t\t\"genericon-f469\" => \"genericon-print\",\n\t\t\t\"genericon-f106\" => \"genericon-quote\",\n\t\t\t\"genericon-f511\" => \"genericon-rating-empty\",\n\t\t\t\"genericon-f512\" => \"genericon-rating-full\",\n\t\t\t\"genericon-f513\" => \"genericon-rating-half\",\n\t\t\t\"genericon-f222\" => \"genericon-reddit\",\n\t\t\t\"genericon-f420\" => \"genericon-refresh\",\n\t\t\t\"genericon-f412\" => \"genericon-reply\",\n\t\t\t\"genericon-f466\" => \"genericon-reply-alt\",\n\t\t\t\"genericon-f467\" => \"genericon-reply-single\",\n\t\t\t\"genericon-f459\" => \"genericon-rewind\",\n\t\t\t\"genericon-f501\" => \"genericon-rightarrow\",\n\t\t\t\"genericon-f400\" => \"genericon-search\",\n\t\t\t\"genericon-f438\" => \"genericon-send-to-phone\",\n\t\t\t\"genericon-f454\" => \"genericon-send-to-tablet\",\n\t\t\t\"genericon-f415\" => \"genericon-share\",\n\t\t\t\"genericon-f403\" => \"genericon-show\",\n\t\t\t\"genericon-f514\" => \"genericon-shuffle\",\n\t\t\t\"genericon-f507\" => \"genericon-sitemap\",\n\t\t\t\"genericon-f451\" => \"genericon-skip-ahead\",\n\t\t\t\"genericon-f450\" => \"genericon-skip-back\",\n\t\t\t\"genericon-f220\" => \"genericon-skype\",\n\t\t\t\"genericon-f424\" => \"genericon-spam\",\n\t\t\t\"genericon-f515\" => \"genericon-spotify\",\n\t\t\t\"genericon-f100\" => \"genericon-standard\",\n\t\t\t\"genericon-f408\" => \"genericon-star\",\n\t\t\t\"genericon-f105\" => \"genericon-status\",\n\t\t\t\"genericon-f449\" => \"genericon-stop\",\n\t\t\t\"genericon-f223\" => \"genericon-stumbleupon\",\n\t\t\t\"genericon-f463\" => \"genericon-subscribe\",\n\t\t\t\"genericon-f465\" => \"genericon-subscribed\",\n\t\t\t\"genericon-f425\" => \"genericon-summary\",\n\t\t\t\"genericon-f453\" => \"genericon-tablet\",\n\t\t\t\"genericon-f302\" => \"genericon-tag\",\n\t\t\t\"genericon-f303\" => \"genericon-time\",\n\t\t\t\"genericon-f435\" => \"genericon-top\",\n\t\t\t\"genericon-f407\" => \"genericon-trash\",\n\t\t\t\"genericon-f214\" => \"genericon-tumblr\",\n\t\t\t\"genericon-f516\" => \"genericon-twitch\",\n\t\t\t\"genericon-f202\" => \"genericon-twitter\",\n\t\t\t\"genericon-f446\" => \"genericon-unapprove\",\n\t\t\t\"genericon-f464\" => \"genericon-unsubscribe\",\n\t\t\t\"genericon-f401\" => \"genericon-unzoom\",\n\t\t\t\"genericon-f500\" => \"genericon-uparrow\",\n\t\t\t\"genericon-f304\" => \"genericon-user\",\n\t\t\t\"genericon-f104\" => \"genericon-video\",\n\t\t\t\"genericon-f517\" => \"genericon-videocamera\",\n\t\t\t\"genericon-f212\" => \"genericon-vimeo\",\n\t\t\t\"genericon-f414\" => \"genericon-warning\",\n\t\t\t\"genericon-f475\" => \"genericon-website\",\n\t\t\t\"genericon-f306\" => \"genericon-week\",\n\t\t\t\"genericon-f205\" => \"genericon-wordpress\",\n\t\t\t\"genericon-f504\" => \"genericon-xpost\",\n\t\t\t\"genericon-f213\" => \"genericon-youtube\",\n\t\t\t\"genericon-f402\" => \"genericon-zoom\"\n\t\t);\n\n\t\t$icons = apply_filters( \"megamenu_genericons_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "title": "" }, { "docid": "16d1df546a8656fc7bf74ff519882b25", "score": "0.61384434", "text": "public function icons(): static;", "title": "" }, { "docid": "4a1f7d90416830e05e964ba88f72015f", "score": "0.61252224", "text": "function obtain_icons(&$icons)\n{\n\tglobal $db, $cache;\n\n\tif ($cache->exists('icons'))\n\t{\n\t\t$icons = $cache->get('icons');\n\t}\n\telse\n\t{\n\t\t// Topic icons\n\t\t$sql = \"SELECT *\n\t\t\tFROM \" . ICONS_TABLE . \"\n\t\t\tORDER BY icons_order\";\n\t\t$result = $db->sql_query($sql);\n\n\t\t$icons = array();\n\t\twhile ($row = $db->sql_fetchrow($result))\n\t\t{\n\t\t\t$icons[$row['icons_id']]['img'] = $row['icons_url'];\n\t\t\t$icons[$row['icons_id']]['width'] = $row['icons_width'];\n\t\t\t$icons[$row['icons_id']]['height'] = $row['icons_height'];\n\t\t\t$icons[$row['icons_id']]['display'] = $row['display_on_posting'];\n\t\t}\n\t\t$db->sql_freeresult($result);\n\n\t\t$cache->put('icons', $icons);\n\t}\n\n\treturn;\n}", "title": "" }, { "docid": "80b907b38a8fe75b06ab2097c128e093", "score": "0.61215687", "text": "protected function registerTCAIcons() {}", "title": "" }, { "docid": "5dbd782a89bc7b5bf11aa60032213938", "score": "0.60804844", "text": "function atom_site_icon()\n{\n}", "title": "" }, { "docid": "9e0ba9f9cd0422354650f715818232d8", "score": "0.6048248", "text": "function _fetch_topic_markers()\n\t{\n\t\treturn array(\n\t\t\t\t\t\t'new'\t\t=> $this->image_url.'marker_new_topic.gif',\n\t\t\t\t\t\t'old'\t\t=> $this->image_url.'marker_old_topic.gif',\n\t\t\t\t\t\t'hot'\t\t=> $this->image_url.'marker_hot_topic.gif',\n\t\t\t\t\t\t'hot_old'\t=> $this->image_url.'marker_hot_old_topic.gif',\n\t\t\t\t\t\t'moved'\t\t=> $this->image_url.'marker_moved_topic.gif',\n\t\t\t\t\t\t'closed'\t=> $this->image_url.'marker_closed_topic.gif',\n\t\t\t\t\t\t'sticky'\t=> $this->image_url.'marker_sticky_topic.gif',\n\t\t\t\t\t\t'announce'\t=> $this->image_url.'marker_announcements.gif',\n\t\t\t\t\t\t'poll_new'\t=> $this->image_url.'marker_new_poll.gif',\n\t\t\t\t\t\t'poll_old'\t=> $this->image_url.'marker_old_poll.gif'\n\t\t\t\t\t);\n\t}", "title": "" }, { "docid": "69b999a1f370897a564ad6c8a41c2e63", "score": "0.6039131", "text": "public function prepareNewsIconCallback()\n {\n $user = BackendUser::getInstance();\n\n return sprintf(\n 'system/themes/%s/images/%s',\n $user->backendTheme,\n Icons::getTableIcon('tl_article')\n );\n }", "title": "" }, { "docid": "90abef3e7ec231d985223055472950eb", "score": "0.600784", "text": "function get_icon_title($icon, $empty=0, $topic_type=-1, $admin=false)\n{\n\tglobal $lang, $images, $phpEx, $phpbb_root_path;\n\n\t// get icons parameters\n\tinclude($phpbb_root_path . './includes/def_icons.' . $phpEx);\n\n\t// admin path\n\t$admin_path = ($admin) ? '../' : './';\n\n\t// alignment\n\tswitch ($empty)\n\t{\n\t\tcase 1:\n\t\t\t$align= 'middle';\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\t$align= 'bottom';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$align = 'absbottom';\n\t\t\tbreak;\n\t}\n\n\t// find the icon\n\t$found = false;\n\t$icon_map = -1;\n\tfor ($i=0; ($i < count($icones)) && !$found; $i++)\n\t{\n\t\tif ($icones[$i]['ind'] == $icon)\n\t\t{\n\t\t\t$found = true;\n\t\t\t$icon_map = $i;\n\t\t}\n\t}\n\n\t// icon not found : try a default value\n\tif (!$found || ($found && empty($icones[$icon_map]['img'])))\n\t{\n\t\t$change = true;\n\t\tswitch($topic_type)\n\t\t{\n\t\t\tcase POST_NORMAL:\n\t\t\t\t$icon = $icon_defined_special['POST_NORMAL']['icon'];\n\t\t\t\tbreak;\n\t\t\tcase POST_STICKY:\n\t\t\t\t$icon = $icon_defined_special['POST_STICKY']['icon'];\n\t\t\t\tbreak;\n\t\t\tcase POST_ANNOUNCE:\n\t\t\t\t$icon = $icon_defined_special['POST_ANNOUNCE']['icon'];\n\t\t\t\tbreak;\n\t\t\tcase POST_GLOBAL_ANNOUNCE:\n\t\t\t\t$icon = $icon_defined_special['POST_GLOBAL_ANNOUNCE']['icon'];\n\t\t\t\tbreak;\n\t\t\tcase POST_BIRTHDAY:\n\t\t\t\t$icon = $icon_defined_special['POST_BIRTHDAY']['icon'];\n\t\t\t\tbreak;\n\t\t\tcase POST_CALENDAR:\n\t\t\t\t$icon = $icon_defined_special['POST_CALENDAR']['icon'];\n\t\t\t\tbreak;\n\t\t\tcase POST_PICTURE:\n\t\t\t\t$icon = $icon_defined_special['POST_PICTURE']['icon'];\n\t\t\t\tbreak;\n\t\t\tcase POST_ATTACHMENT:\n\t\t\t\t$icon = $icon_defined_special['POST_ATTACHEMENT']['icon'];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$change=false;\n\t\t\t\tbreak;\n\t\t}\n\n\t\t// a default icon has been sat\n\t\tif ($change)\n\t\t{\n\t\t\t// find the icon\n\t\t\t$found = false;\n\t\t\t$icon_map = -1;\n\t\t\tfor ($i=0; ($i < count($icones)) && !$found; $i++)\n\t\t\t{\n\t\t\t\tif ($icones[$i]['ind'] == $icon)\n\t\t\t\t{\n\t\t\t\t\t$found = true;\n\t\t\t\t\t$icon_map = $i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t// build the icon image\n\tif (!$found || ($found && empty($icones[$icon_map]['img'])))\n\t{\n\t\tswitch ($empty)\n\t\t{\n\t\t\tcase 0:\n\t\t\t\t$res = '';\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\t$res = '<img width=\"20\" align=\"' . $align . '\" src=\"' . $admin_path . $images['spacer'] . '\" alt=\"\" border=\"0\">';\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$res = isset($lang[ $icones[$icon_map]['alt'] ]) ? $lang[ $icones[$icon_map]['alt'] ] : $icones[$icon_map]['alt'];\n\t\t\t\tbreak;\n\t\t}\n\t}\n\telse\n\t{\n\t\t$res = '<img align=\"' . $align . '\" src=\"' . ( isset($images[ $icones[$icon_map]['img'] ]) ? $admin_path . $images[ $icones[$icon_map]['img'] ] : $admin_path . $icones[$icon_map]['img'] ) . '\" alt=\"' . ( isset($lang[ $icones[$icon_map]['alt'] ]) ? $lang[ $icones[$icon_map]['alt'] ] : $icones[$icon_map]['alt'] ) . '\" border=\"0\">';\n\t}\n\n\treturn $res;\n}", "title": "" }, { "docid": "17069050df82895cf8f8737c680ba708", "score": "0.6002001", "text": "function rss2_site_icon()\n{\n}", "title": "" }, { "docid": "7ac171a16dfbc60cbccf1603807f43b5", "score": "0.5993074", "text": "function theme_enlightlite_social_links() {\n global $CFG;\n $totalicons = 4;\n $htmlstr = '';\n for ($i = 1; $i <= 4; $i++) {\n $iconenable = theme_enlightlite_get_setting('siconenable'.$i);\n $icon = theme_enlightlite_get_setting('socialicon'.$i);\n $iconcolor = theme_enlightlite_get_setting('siconbgc'.$i);\n $iconurl = theme_enlightlite_get_setting('siconurl'.$i);\n $iconstr = '';\n $iconsty = (empty($iconcolor)) ? '' : ' style=\"background: '.$iconcolor.';\"';\n if ($iconenable == \"1\" && !empty($icon)) {\n $iconstr = '<li class=\"media0'.$i.'\"'.$iconsty.'><a href=\"'.$iconurl.'\"><i class=\"fa fa-'.$icon.'\"></i></a></li>'.\"\\n\";\n $htmlstr .= $iconstr;\n }\n }\n return $htmlstr;\n}", "title": "" }, { "docid": "0c24594ca67adcad9586f9d8efc143db", "score": "0.59808725", "text": "public function kiwip_change_cpt_icon(){\n\t\techo '<style type=\"text/css\" media=\"screen\">';\n\t\techo '#menu-posts-'.$this->slug.' .wp-menu-image {';\n echo 'background: url('.$this->icons['16px'].') center center no-repeat !important; } ';\n echo '.icon32-posts-'.$this->slug.' {';\n echo 'background: url('.$this->icons['32px'].') center center no-repeat !important; } ';\n echo '</style>';\n\t}", "title": "" }, { "docid": "7cfb8b0be65729cb877754c9266d6b69", "score": "0.5977389", "text": "public function icon();", "title": "" }, { "docid": "c1ab0fad5720a624b322877372e2eb61", "score": "0.5942922", "text": "function tech_about_icons($fb=0,$my=0,$twitter=0){\n\tglobal $tech;\n\t$fb_profile = $tech['facebook_profile'];\n\t$my_profile = $tech['myspace_profile'];\n\t$twitter_profile = $tech['twitter_profile'];\n\t$image = get_template_directory_uri() . \"/images/icons\";\n\tif ($fb !=0){\n\t\techo \"<li><a href=\\\"{$fb_profile}\\\" title=\\\"\".__('Follow me on Facebook','techozoic').\"\\\"><img src=\\\"{$image}/facebook_32.png\\\"></a></li>\";\n\t}\n\tif ($my !=0){\n\t\techo \"<li><a href=\\\"{$my_profile}\\\" title=\\\"\".__('Follow me on Myspace','techozoic').\"\\\"><img src=\\\"{$image}/myspace_32.png\\\"></a></li>\";\n\t}\t\n\tif ($twitter !=0){\n\t\techo \"<li><a href=\\\"{$twitter_profile}\\\" title=\\\"\".__('Follow me on Twitter','techozoic').\"\\\"><img src=\\\"{$image}/twitter_32.png\\\"></a></li>\";\n\t}\n}", "title": "" }, { "docid": "a1227ca09b9d9f170564c4d87428bad6", "score": "0.5937929", "text": "function freshio_social_icons()\n\t{\n\t\tif (class_exists('Subscribe_And_Connect')) {\n\t\t\techo '<div class=\"subscribe-and-connect-connect\">';\n\t\t\tsubscribe_and_connect_connect();\n\t\t\techo '</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "5b8435755887cb0b6106460e5215e350", "score": "0.590831", "text": "function nulib_file_icon($variables) {\n $file = $variables['file'];\n // If we are dealing with a PDF, then direct the File module to find the file icon in the theme icons folder.\n // This is the only part of the standard function that we've changed.\n if ($variables['file']->filemime == 'application/pdf') {\n $icon_directory = 'sites/all/themes/nulib/images/icons/';\n } else {\n $icon_directory = $variables['icon_directory'];\n }\n\n $mime = check_plain($file->filemime);\n $icon_url = file_icon_url($file, $icon_directory);\n return '<img class=\"file-icon\" alt=\"\" title=\"' . $mime . '\" src=\"' . $icon_url . '\" />';\n}", "title": "" }, { "docid": "1a32e2a5e2fb555cec323583519c6bcc", "score": "0.5902994", "text": "function initImages() {\n\t\t// attachment icon\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/attach.png';\n\t\t$imageConf['altText'] = $this->pi_getLL('attachment');\n\t\t$this->attachmentIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// delete Icon\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/bin.png';\n\t\t$imageConf['altText'] = $this->pi_getLL('delete');\n\t\t$this->deleteIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// add Icon\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/add.png';\n\t\t$imageConf['altText'] = $this->pi_getLL('add');\n\t\t$this->addIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// mark as read Icon\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/markread.png';\n\t\t$imageConf['altText'] = $this->pi_getLL('markread');\n\t\t$this->markreadIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// forward icon\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/forward.gif';\n\t\t$imageConf['altText'] = $this->pi_getLL('forward');\n\t\t$this->forwardIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// reply icon\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/reply.gif';\n\t\t$imageConf['altText'] = $this->pi_getLL('reply');\n\t\t$this->replyIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// back icon\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/back.gif';\n\t\t$imageConf['altText'] = $this->pi_getLL('back');\n\t\t$this->backIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// read status: all\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/readbyall.gif';\n\t\t$imageConf['altText'] = $this->pi_getLL('readbyall');\n\t\t$this->readByAllIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// read status: some\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/readbysome.gif';\n\t\t$imageConf['altText'] = $this->pi_getLL('readbysome');\n\t\t$this->readBySomeIcon=$this->cObj->IMAGE($imageConf);\n\t\t\n\t\t// read status: none\n\t\tunset($imageConf);\n\t\t$imageConf['file'] = t3lib_extMgm::siteRelPath($this->extKey).'res/img/readbynone.gif';\n\t\t$imageConf['altText'] = $this->pi_getLL('readbynone');\n\t\t$this->readByNoneIcon=$this->cObj->IMAGE($imageConf);\n \t}", "title": "" }, { "docid": "a5a9b1d400a7749942cf79a98bd568d4", "score": "0.5799028", "text": "private function getStatusIcons() {\n\t\t$img = '<img src=\"view/image/osworx/16/%sokay.png\" height=\"16\" width=\"16\" title=\"%s\" alt=\"%s\" border=\"0\" />';\n\t\t$this->data['imgNokay']\t= sprintf( $img, 'not_' );\n\t\t$this->data['imgOkay']\t= sprintf( $img, '' );\n\t}", "title": "" }, { "docid": "0016739941ca48d0084c9e8a27f00097", "score": "0.5766025", "text": "function cpt_icons() {\n\n\t?>\n\t<style type=\"text/css\" media=\"screen\">\n\t\t#menu-posts-news .wp-menu-image {\n\t\t\tbackground: url(<?php echo get_stylesheet_directory_uri(); ?>/resources/news.png) no-repeat 6px -17px !important;\n\t\t}\n\t\t#menu-posts-news:hover .wp-menu-image, #menu-posts-news.wp-has-current-submenu .wp-menu-image {\n\t\t\tbackground-position: 6px 7px!important;\n\t\t}\n\t</style>\n\t<?php\n}", "title": "" }, { "docid": "6753d3f7bdc29e13fdad997e16a0dfc2", "score": "0.57535285", "text": "function wtfdivi014_register_icons($icons) {\r\n\tglobal $wtfdivi;\r\n\tlist($name, $option) = $wtfdivi->get_setting_bases(__FILE__);\r\n\tif (!isset($option['urlmax'])) { $option['urlmax']=0; }\r\n\tfor($i=0; $i<=$option['urlmax']; $i++) {\r\n\t\tif (!empty($option[\"url$i\"])) {\r\n\t\t\t$icons[] = \"wtfdivi014-url$i\";\r\n\t\t}\r\n\t}\r\n\treturn $icons;\r\n}", "title": "" }, { "docid": "0816595facb743f1f2ad0b01bc67e234", "score": "0.57426673", "text": "function doc_feed_icon($url, $title) {\r\n return '<a href=\"'. check_url($url) .'\" class=\"art-rss-tag-icon\" title=\"' . $title . '\"></a>';\r\n}", "title": "" }, { "docid": "75335da39ead27939066094c7b0dea8c", "score": "0.57384795", "text": "public function iconsListBuilder() {\n // Get active theme (should be a Calibr8 subtheme)\n $active_theme = \\Drupal::theme()->getActiveTheme()->getName();\n // Get icons\n $icons = [];\n $icons_dir = drupal_get_path('theme', $active_theme) . '/icons';\n if (file_exists($icons_dir)) {\n $icons_files = scandir($icons_dir);\n foreach ($icons_files as $icon_file) {\n if (pathinfo($icon_file, PATHINFO_EXTENSION) == 'svg') {\n $name = pathinfo($icon_file, PATHINFO_FILENAME);\n $icons[] = [\n 'name' => $name,\n 'class' => 'icon-' . $name,\n ];\n }\n }\n }\n\n return $icons;\n }", "title": "" }, { "docid": "066c852a58c56dde2a74f4c4fe714780", "score": "0.5738416", "text": "function social_icons( array $settings = [], array $data = [], array $fm_fields = [] ) : Social_Icons {\n\treturn new Social_Icons( $settings, $data );\n}", "title": "" }, { "docid": "8768e7cb7d19a8571154fc071b398358", "score": "0.5732126", "text": "protected function initIcons()\n {\n $notBs3 = !$this->isBs(3);\n $prefix = $this->getDefaultIconPrefix();\n foreach (static::$_icons as $icon => $setting) {\n if (!isset($this->$icon)) {\n $css = !$notBs3 ? $setting[0] : $setting[1];\n $this->$icon = Html::tag('i', '', ['class' => $prefix.$css]);\n }\n }\n }", "title": "" }, { "docid": "e5779545f60fb226a2a8938e565654a2", "score": "0.57273835", "text": "public function prepareIconCallback()\n {\n return array(\n __CLASS__,\n 'prepareNewsIconCallback'\n );\n }", "title": "" }, { "docid": "c196988754a69096f0e001a165ad4199", "score": "0.57050616", "text": "function addIconsToOutput($items){\n foreach( $items as $item ){\n if( $item->icon != ''){\n \n $format = apply_filters('menu_icons_format', '<img src=\"%s\" />%s', $item );\n \n $img = sprintf($format,$item->icon, $item->title );\n $item->title = $img;\n }\n }\n return $items;\n }", "title": "" }, { "docid": "f059f41930a5ca2774cf66202956915a", "score": "0.570413", "text": "function getIcons($data){\r $codeIcon = 'img/icons/'.$data.'.png';\r return '<img src=\"'.$codeIcon.'\">';\r }", "title": "" }, { "docid": "a78c0f5d713a5ef192f3e0aa92d124b0", "score": "0.5688109", "text": "function plugin_geticon_links ()\n{\n global $_CONF;\n\n return $_CONF['site_url'] . '/links/images/links.png';\n}", "title": "" }, { "docid": "06cb890dd88fc24f5fdf386160fab42f", "score": "0.5682393", "text": "public function stdWrap_editIconsDataProvider() {}", "title": "" }, { "docid": "3cdca5b26bf78a5f4a110ac45b00983f", "score": "0.5682286", "text": "private function icons() {\n\n\t\t$icons = array(\n\t\t\t\"fa-f000\" => \"fa-glass\",\n\t\t\t\"fa-f001\" => \"fa-music\",\n\t\t\t\"fa-f002\" => \"fa-search\",\n\t\t\t\"fa-f003\" => \"fa-envelope-o\",\n\t\t\t\"fa-f004\" => \"fa-heart\",\n\t\t\t\"fa-f005\" => \"fa-star\",\n\t\t\t\"fa-f006\" => \"fa-star-o\",\n\t\t\t\"fa-f007\" => \"fa-user\",\n\t\t\t\"fa-f008\" => \"fa-film\",\n\t\t\t\"fa-f009\" => \"fa-th-large\",\n\t\t\t\"fa-f00a\" => \"fa-th\",\n\t\t\t\"fa-f00b\" => \"fa-th-list\",\n\t\t\t\"fa-f00c\" => \"fa-check\",\n\t\t\t\"fa-f00d\" => \"fa-times\",\n\t\t\t\"fa-f00e\" => \"fa-search-plus\",\n\t\t\t\"fa-f010\" => \"fa-search-minus\",\n\t\t\t\"fa-f011\" => \"fa-power-off\",\n\t\t\t\"fa-f012\" => \"fa-signal\",\n\t\t\t\"fa-f013\" => \"fa-cog\",\n\t\t\t\"fa-f014\" => \"fa-trash-o\",\n\t\t\t\"fa-f015\" => \"fa-home\",\n\t\t\t\"fa-f016\" => \"fa-file-o\",\n\t\t\t\"fa-f017\" => \"fa-clock-o\",\n\t\t\t\"fa-f018\" => \"fa-road\",\n\t\t\t\"fa-f019\" => \"fa-download\",\n\t\t\t\"fa-f01a\" => \"fa-arrow-circle-o-down\",\n\t\t\t\"fa-f01b\" => \"fa-arrow-circle-o-up\",\n\t\t\t\"fa-f01c\" => \"fa-inbox\",\n\t\t\t\"fa-f01d\" => \"fa-play-circle-o\",\n\t\t\t\"fa-f01e\" => \"fa-repeat\",\n\t\t\t\"fa-f021\" => \"fa-refresh\",\n\t\t\t\"fa-f022\" => \"fa-list-alt\",\n\t\t\t\"fa-f023\" => \"fa-lock\",\n\t\t\t\"fa-f024\" => \"fa-flag\",\n\t\t\t\"fa-f025\" => \"fa-headphones\",\n\t\t\t\"fa-f026\" => \"fa-volume-off\",\n\t\t\t\"fa-f027\" => \"fa-volume-down\",\n\t\t\t\"fa-f028\" => \"fa-volume-up\",\n\t\t\t\"fa-f029\" => \"fa-qrcode\",\n\t\t\t\"fa-f02a\" => \"fa-barcode\",\n\t\t\t\"fa-f02b\" => \"fa-tag\",\n\t\t\t\"fa-f02c\" => \"fa-tags\",\n\t\t\t\"fa-f02d\" => \"fa-book\",\n\t\t\t\"fa-f02e\" => \"fa-bookmark\",\n\t\t\t\"fa-f02f\" => \"fa-print\",\n\t\t\t\"fa-f030\" => \"fa-camera\",\n\t\t\t\"fa-f031\" => \"fa-font\",\n\t\t\t\"fa-f032\" => \"fa-bold\",\n\t\t\t\"fa-f033\" => \"fa-italic\",\n\t\t\t\"fa-f034\" => \"fa-text-height\",\n\t\t\t\"fa-f035\" => \"fa-text-width\",\n\t\t\t\"fa-f036\" => \"fa-align-left\",\n\t\t\t\"fa-f037\" => \"fa-align-center\",\n\t\t\t\"fa-f038\" => \"fa-align-right\",\n\t\t\t\"fa-f039\" => \"fa-align-justify\",\n\t\t\t\"fa-f03a\" => \"fa-list\",\n\t\t\t\"fa-f03b\" => \"fa-outdent\",\n\t\t\t\"fa-f03c\" => \"fa-indent\",\n\t\t\t\"fa-f03d\" => \"fa-video-camera\",\n\t\t\t\"fa-f03e\" => \"fa-picture-o\",\n\t\t\t\"fa-f040\" => \"fa-pencil\",\n\t\t\t\"fa-f041\" => \"fa-map-marker\",\n\t\t\t\"fa-f042\" => \"fa-adjust\",\n\t\t\t\"fa-f043\" => \"fa-tint\",\n\t\t\t\"fa-f044\" => \"fa-pencil-square-o\",\n\t\t\t\"fa-f045\" => \"fa-share-square-o\",\n\t\t\t\"fa-f046\" => \"fa-check-square-o\",\n\t\t\t\"fa-f047\" => \"fa-arrows\",\n\t\t\t\"fa-f048\" => \"fa-step-backward\",\n\t\t\t\"fa-f049\" => \"fa-fast-backward\",\n\t\t\t\"fa-f04a\" => \"fa-backward\",\n\t\t\t\"fa-f04b\" => \"fa-play\",\n\t\t\t\"fa-f04c\" => \"fa-pause\",\n\t\t\t\"fa-f04d\" => \"fa-stop\",\n\t\t\t\"fa-f04e\" => \"fa-forward\",\n\t\t\t\"fa-f050\" => \"fa-fast-forward\",\n\t\t\t\"fa-f051\" => \"fa-step-forward\",\n\t\t\t\"fa-f052\" => \"fa-eject\",\n\t\t\t\"fa-f053\" => \"fa-chevron-left\",\n\t\t\t\"fa-f054\" => \"fa-chevron-right\",\n\t\t\t\"fa-f055\" => \"fa-plus-circle\",\n\t\t\t\"fa-f056\" => \"fa-minus-circle\",\n\t\t\t\"fa-f057\" => \"fa-times-circle\",\n\t\t\t\"fa-f058\" => \"fa-check-circle\",\n\t\t\t\"fa-f059\" => \"fa-question-circle\",\n\t\t\t\"fa-f05a\" => \"fa-info-circle\",\n\t\t\t\"fa-f05b\" => \"fa-crosshairs\",\n\t\t\t\"fa-f05c\" => \"fa-times-circle-o\",\n\t\t\t\"fa-f05d\" => \"fa-check-circle-o\",\n\t\t\t\"fa-f05e\" => \"fa-ban\",\n\t\t\t\"fa-f060\" => \"fa-arrow-left\",\n\t\t\t\"fa-f061\" => \"fa-arrow-right\",\n\t\t\t\"fa-f062\" => \"fa-arrow-up\",\n\t\t\t\"fa-f063\" => \"fa-arrow-down\",\n\t\t\t\"fa-f064\" => \"fa-share\",\n\t\t\t\"fa-f065\" => \"fa-expand\",\n\t\t\t\"fa-f066\" => \"fa-compress\",\n\t\t\t\"fa-f067\" => \"fa-plus\",\n\t\t\t\"fa-f068\" => \"fa-minus\",\n\t\t\t\"fa-f069\" => \"fa-asterisk\",\n\t\t\t\"fa-f06a\" => \"fa-exclamation-circle\",\n\t\t\t\"fa-f06b\" => \"fa-gift\",\n\t\t\t\"fa-f06c\" => \"fa-leaf\",\n\t\t\t\"fa-f06d\" => \"fa-fire\",\n\t\t\t\"fa-f06e\" => \"fa-eye\",\n\t\t\t\"fa-f070\" => \"fa-eye-slash\",\n\t\t\t\"fa-f071\" => \"fa-exclamation-triangle\",\n\t\t\t\"fa-f072\" => \"fa-plane\",\n\t\t\t\"fa-f073\" => \"fa-calendar\",\n\t\t\t\"fa-f074\" => \"fa-random\",\n\t\t\t\"fa-f075\" => \"fa-comment\",\n\t\t\t\"fa-f076\" => \"fa-magnet\",\n\t\t\t\"fa-f077\" => \"fa-chevron-up\",\n\t\t\t\"fa-f078\" => \"fa-chevron-down\",\n\t\t\t\"fa-f079\" => \"fa-retweet\",\n\t\t\t\"fa-f07a\" => \"fa-shopping-cart\",\n\t\t\t\"fa-f07b\" => \"fa-folder\",\n\t\t\t\"fa-f07c\" => \"fa-folder-open\",\n\t\t\t\"fa-f07d\" => \"fa-arrows-v\",\n\t\t\t\"fa-f07e\" => \"fa-arrows-h\",\n\t\t\t\"fa-f080\" => \"fa-bar-chart\",\n\t\t\t\"fa-f081\" => \"fa-twitter-square\",\n\t\t\t\"fa-f082\" => \"fa-facebook-square\",\n\t\t\t\"fa-f083\" => \"fa-camera-retro\",\n\t\t\t\"fa-f084\" => \"fa-key\",\n\t\t\t\"fa-f085\" => \"fa-cogs\",\n\t\t\t\"fa-f086\" => \"fa-comments\",\n\t\t\t\"fa-f087\" => \"fa-thumbs-o-up\",\n\t\t\t\"fa-f088\" => \"fa-thumbs-o-down\",\n\t\t\t\"fa-f089\" => \"fa-star-half\",\n\t\t\t\"fa-f08a\" => \"fa-heart-o\",\n\t\t\t\"fa-f08b\" => \"fa-sign-out\",\n\t\t\t\"fa-f08c\" => \"fa-linkedin-square\",\n\t\t\t\"fa-f08d\" => \"fa-thumb-tack\",\n\t\t\t\"fa-f08e\" => \"fa-external-link\",\n\t\t\t\"fa-f090\" => \"fa-sign-in\",\n\t\t\t\"fa-f091\" => \"fa-trophy\",\n\t\t\t\"fa-f092\" => \"fa-github-square\",\n\t\t\t\"fa-f093\" => \"fa-upload\",\n\t\t\t\"fa-f094\" => \"fa-lemon-o\",\n\t\t\t\"fa-f095\" => \"fa-phone\",\n\t\t\t\"fa-f096\" => \"fa-square-o\",\n\t\t\t\"fa-f097\" => \"fa-bookmark-o\",\n\t\t\t\"fa-f098\" => \"fa-phone-square\",\n\t\t\t\"fa-f099\" => \"fa-twitter\",\n\t\t\t\"fa-f09a\" => \"fa-facebook\",\n\t\t\t\"fa-f09b\" => \"fa-github\",\n\t\t\t\"fa-f09c\" => \"fa-unlock\",\n\t\t\t\"fa-f09d\" => \"fa-credit-card\",\n\t\t\t\"fa-f09e\" => \"fa-rss\",\n\t\t\t\"fa-f0a0\" => \"fa-hdd-o\",\n\t\t\t\"fa-f0a1\" => \"fa-bullhorn\",\n\t\t\t\"fa-f0f3\" => \"fa-bell\",\n\t\t\t\"fa-f0a3\" => \"fa-certificate\",\n\t\t\t\"fa-f0a4\" => \"fa-hand-o-right\",\n\t\t\t\"fa-f0a5\" => \"fa-hand-o-left\",\n\t\t\t\"fa-f0a6\" => \"fa-hand-o-up\",\n\t\t\t\"fa-f0a7\" => \"fa-hand-o-down\",\n\t\t\t\"fa-f0a8\" => \"fa-arrow-circle-left\",\n\t\t\t\"fa-f0a9\" => \"fa-arrow-circle-right\",\n\t\t\t\"fa-f0aa\" => \"fa-arrow-circle-up\",\n\t\t\t\"fa-f0ab\" => \"fa-arrow-circle-down\",\n\t\t\t\"fa-f0ac\" => \"fa-globe\",\n\t\t\t\"fa-f0ad\" => \"fa-wrench\",\n\t\t\t\"fa-f0ae\" => \"fa-tasks\",\n\t\t\t\"fa-f0b0\" => \"fa-filter\",\n\t\t\t\"fa-f0b1\" => \"fa-briefcase\",\n\t\t\t\"fa-f0b2\" => \"fa-arrows-alt\",\n\t\t\t\"fa-f0c0\" => \"fa-users\",\n\t\t\t\"fa-f0c1\" => \"fa-link\",\n\t\t\t\"fa-f0c2\" => \"fa-cloud\",\n\t\t\t\"fa-f0c3\" => \"fa-flask\",\n\t\t\t\"fa-f0c4\" => \"fa-scissors\",\n\t\t\t\"fa-f0c5\" => \"fa-files-o\",\n\t\t\t\"fa-f0c6\" => \"fa-paperclip\",\n\t\t\t\"fa-f0c7\" => \"fa-floppy-o\",\n\t\t\t\"fa-f0c8\" => \"fa-square\",\n\t\t\t\"fa-f0c9\" => \"fa-bars\",\n\t\t\t\"fa-f0ca\" => \"fa-list-ul\",\n\t\t\t\"fa-f0cb\" => \"fa-list-ol\",\n\t\t\t\"fa-f0cc\" => \"fa-strikethrough\",\n\t\t\t\"fa-f0cd\" => \"fa-underline\",\n\t\t\t\"fa-f0ce\" => \"fa-table\",\n\t\t\t\"fa-f0d0\" => \"fa-magic\",\n\t\t\t\"fa-f0d1\" => \"fa-truck\",\n\t\t\t\"fa-f0d2\" => \"fa-pinterest\",\n\t\t\t\"fa-f0d3\" => \"fa-pinterest-square\",\n\t\t\t\"fa-f0d4\" => \"fa-google-plus-square\",\n\t\t\t\"fa-f0d5\" => \"fa-google-plus\",\n\t\t\t\"fa-f0d6\" => \"fa-money\",\n\t\t\t\"fa-f0d7\" => \"fa-caret-down\",\n\t\t\t\"fa-f0d8\" => \"fa-caret-up\",\n\t\t\t\"fa-f0d9\" => \"fa-caret-left\",\n\t\t\t\"fa-f0da\" => \"fa-caret-right\",\n\t\t\t\"fa-f0db\" => \"fa-columns\",\n\t\t\t\"fa-f0dc\" => \"fa-sort\",\n\t\t\t\"fa-f0dd\" => \"fa-sort-desc\",\n\t\t\t\"fa-f0de\" => \"fa-sort-asc\",\n\t\t\t\"fa-f0e0\" => \"fa-envelope\",\n\t\t\t\"fa-f0e1\" => \"fa-linkedin\",\n\t\t\t\"fa-f0e2\" => \"fa-undo\",\n\t\t\t\"fa-f0e3\" => \"fa-gavel\",\n\t\t\t\"fa-f0e4\" => \"fa-tachometer\",\n\t\t\t\"fa-f0e5\" => \"fa-comment-o\",\n\t\t\t\"fa-f0e6\" => \"fa-comments-o\",\n\t\t\t\"fa-f0e7\" => \"fa-bolt\",\n\t\t\t\"fa-f0e8\" => \"fa-sitemap\",\n\t\t\t\"fa-f0e9\" => \"fa-umbrella\",\n\t\t\t\"fa-f0ea\" => \"fa-clipboard\",\n\t\t\t\"fa-f0eb\" => \"fa-lightbulb-o\",\n\t\t\t\"fa-f0ec\" => \"fa-exchange\",\n\t\t\t\"fa-f0ed\" => \"fa-cloud-download\",\n\t\t\t\"fa-f0ee\" => \"fa-cloud-upload\",\n\t\t\t\"fa-f0f0\" => \"fa-user-md\",\n\t\t\t\"fa-f0f1\" => \"fa-stethoscope\",\n\t\t\t\"fa-f0f2\" => \"fa-suitcase\",\n\t\t\t\"fa-f0a2\" => \"fa-bell-o\",\n\t\t\t\"fa-f0f4\" => \"fa-coffee\",\n\t\t\t\"fa-f0f5\" => \"fa-cutlery\",\n\t\t\t\"fa-f0f6\" => \"fa-file-text-o\",\n\t\t\t\"fa-f0f7\" => \"fa-building-o\",\n\t\t\t\"fa-f0f8\" => \"fa-hospital-o\",\n\t\t\t\"fa-f0f9\" => \"fa-ambulance\",\n\t\t\t\"fa-f0fa\" => \"fa-medkit\",\n\t\t\t\"fa-f0fb\" => \"fa-fighter-jet\",\n\t\t\t\"fa-f0fc\" => \"fa-beer\",\n\t\t\t\"fa-f0fd\" => \"fa-h-square\",\n\t\t\t\"fa-f0fe\" => \"fa-plus-square\",\n\t\t\t\"fa-f100\" => \"fa-angle-double-left\",\n\t\t\t\"fa-f101\" => \"fa-angle-double-right\",\n\t\t\t\"fa-f102\" => \"fa-angle-double-up\",\n\t\t\t\"fa-f103\" => \"fa-angle-double-down\",\n\t\t\t\"fa-f104\" => \"fa-angle-left\",\n\t\t\t\"fa-f105\" => \"fa-angle-right\",\n\t\t\t\"fa-f106\" => \"fa-angle-up\",\n\t\t\t\"fa-f107\" => \"fa-angle-down\",\n\t\t\t\"fa-f108\" => \"fa-desktop\",\n\t\t\t\"fa-f109\" => \"fa-laptop\",\n\t\t\t\"fa-f10a\" => \"fa-tablet\",\n\t\t\t\"fa-f10b\" => \"fa-mobile\",\n\t\t\t\"fa-f10c\" => \"fa-circle-o\",\n\t\t\t\"fa-f10d\" => \"fa-quote-left\",\n\t\t\t\"fa-f10e\" => \"fa-quote-right\",\n\t\t\t\"fa-f110\" => \"fa-spinner\",\n\t\t\t\"fa-f111\" => \"fa-circle\",\n\t\t\t\"fa-f112\" => \"fa-reply\",\n\t\t\t\"fa-f113\" => \"fa-github-alt\",\n\t\t\t\"fa-f114\" => \"fa-folder-o\",\n\t\t\t\"fa-f115\" => \"fa-folder-open-o\",\n\t\t\t\"fa-f118\" => \"fa-smile-o\",\n\t\t\t\"fa-f119\" => \"fa-frown-o\",\n\t\t\t\"fa-f11a\" => \"fa-meh-o\",\n\t\t\t\"fa-f11b\" => \"fa-gamepad\",\n\t\t\t\"fa-f11c\" => \"fa-keyboard-o\",\n\t\t\t\"fa-f11d\" => \"fa-flag-o\",\n\t\t\t\"fa-f11e\" => \"fa-flag-checkered\",\n\t\t\t\"fa-f120\" => \"fa-terminal\",\n\t\t\t\"fa-f121\" => \"fa-code\",\n\t\t\t\"fa-f122\" => \"fa-reply-all\",\n\t\t\t\"fa-f123\" => \"fa-star-half-o\",\n\t\t\t\"fa-f124\" => \"fa-location-arrow\",\n\t\t\t\"fa-f125\" => \"fa-crop\",\n\t\t\t\"fa-f126\" => \"fa-code-fork\",\n\t\t\t\"fa-f127\" => \"fa-chain-broken\",\n\t\t\t\"fa-f128\" => \"fa-question\",\n\t\t\t\"fa-f129\" => \"fa-info\",\n\t\t\t\"fa-f12a\" => \"fa-exclamation\",\n\t\t\t\"fa-f12b\" => \"fa-superscript\",\n\t\t\t\"fa-f12c\" => \"fa-subscript\",\n\t\t\t\"fa-f12d\" => \"fa-eraser\",\n\t\t\t\"fa-f12e\" => \"fa-puzzle-piece\",\n\t\t\t\"fa-f130\" => \"fa-microphone\",\n\t\t\t\"fa-f131\" => \"fa-microphone-slash\",\n\t\t\t\"fa-f132\" => \"fa-shield\",\n\t\t\t\"fa-f133\" => \"fa-calendar-o\",\n\t\t\t\"fa-f134\" => \"fa-fire-extinguisher\",\n\t\t\t\"fa-f135\" => \"fa-rocket\",\n\t\t\t\"fa-f136\" => \"fa-maxcdn\",\n\t\t\t\"fa-f137\" => \"fa-chevron-circle-left\",\n\t\t\t\"fa-f138\" => \"fa-chevron-circle-right\",\n\t\t\t\"fa-f139\" => \"fa-chevron-circle-up\",\n\t\t\t\"fa-f13a\" => \"fa-chevron-circle-down\",\n\t\t\t\"fa-f13b\" => \"fa-html5\",\n\t\t\t\"fa-f13c\" => \"fa-css3\",\n\t\t\t\"fa-f13d\" => \"fa-anchor\",\n\t\t\t\"fa-f13e\" => \"fa-unlock-alt\",\n\t\t\t\"fa-f140\" => \"fa-bullseye\",\n\t\t\t\"fa-f141\" => \"fa-ellipsis-h\",\n\t\t\t\"fa-f142\" => \"fa-ellipsis-v\",\n\t\t\t\"fa-f143\" => \"fa-rss-square\",\n\t\t\t\"fa-f144\" => \"fa-play-circle\",\n\t\t\t\"fa-f145\" => \"fa-ticket\",\n\t\t\t\"fa-f146\" => \"fa-minus-square\",\n\t\t\t\"fa-f147\" => \"fa-minus-square-o\",\n\t\t\t\"fa-f148\" => \"fa-level-up\",\n\t\t\t\"fa-f149\" => \"fa-level-down\",\n\t\t\t\"fa-f14a\" => \"fa-check-square\",\n\t\t\t\"fa-f14b\" => \"fa-pencil-square\",\n\t\t\t\"fa-f14c\" => \"fa-external-link-square\",\n\t\t\t\"fa-f14d\" => \"fa-share-square\",\n\t\t\t\"fa-f14e\" => \"fa-compass\",\n\t\t\t\"fa-f150\" => \"fa-caret-square-o-down\",\n\t\t\t\"fa-f151\" => \"fa-caret-square-o-up\",\n\t\t\t\"fa-f152\" => \"fa-caret-square-o-right\",\n\t\t\t\"fa-f153\" => \"fa-eur\",\n\t\t\t\"fa-f154\" => \"fa-gbp\",\n\t\t\t\"fa-f155\" => \"fa-usd\",\n\t\t\t\"fa-f156\" => \"fa-inr\",\n\t\t\t\"fa-f157\" => \"fa-jpy\",\n\t\t\t\"fa-f158\" => \"fa-rub\",\n\t\t\t\"fa-f159\" => \"fa-krw\",\n\t\t\t\"fa-f15a\" => \"fa-btc\",\n\t\t\t\"fa-f15b\" => \"fa-file\",\n\t\t\t\"fa-f15c\" => \"fa-file-text\",\n\t\t\t\"fa-f15d\" => \"fa-sort-alpha-asc\",\n\t\t\t\"fa-f15e\" => \"fa-sort-alpha-desc\",\n\t\t\t\"fa-f160\" => \"fa-sort-amount-asc\",\n\t\t\t\"fa-f161\" => \"fa-sort-amount-desc\",\n\t\t\t\"fa-f162\" => \"fa-sort-numeric-asc\",\n\t\t\t\"fa-f163\" => \"fa-sort-numeric-desc\",\n\t\t\t\"fa-f164\" => \"fa-thumbs-up\",\n\t\t\t\"fa-f165\" => \"fa-thumbs-down\",\n\t\t\t\"fa-f166\" => \"fa-youtube-square\",\n\t\t\t\"fa-f167\" => \"fa-youtube\",\n\t\t\t\"fa-f168\" => \"fa-xing\",\n\t\t\t\"fa-f169\" => \"fa-xing-square\",\n\t\t\t\"fa-f16a\" => \"fa-youtube-play\",\n\t\t\t\"fa-f16b\" => \"fa-dropbox\",\n\t\t\t\"fa-f16c\" => \"fa-stack-overflow\",\n\t\t\t\"fa-f16d\" => \"fa-instagram\",\n\t\t\t\"fa-f16e\" => \"fa-flickr\",\n\t\t\t\"fa-f170\" => \"fa-adn\",\n\t\t\t\"fa-f171\" => \"fa-bitbucket\",\n\t\t\t\"fa-f172\" => \"fa-bitbucket-square\",\n\t\t\t\"fa-f173\" => \"fa-tumblr\",\n\t\t\t\"fa-f174\" => \"fa-tumblr-square\",\n\t\t\t\"fa-f175\" => \"fa-long-arrow-down\",\n\t\t\t\"fa-f176\" => \"fa-long-arrow-up\",\n\t\t\t\"fa-f177\" => \"fa-long-arrow-left\",\n\t\t\t\"fa-f178\" => \"fa-long-arrow-right\",\n\t\t\t\"fa-f179\" => \"fa-apple\",\n\t\t\t\"fa-f17a\" => \"fa-windows\",\n\t\t\t\"fa-f17b\" => \"fa-android\",\n\t\t\t\"fa-f17c\" => \"fa-linux\",\n\t\t\t\"fa-f17d\" => \"fa-dribbble\",\n\t\t\t\"fa-f17e\" => \"fa-skype\",\n\t\t\t\"fa-f180\" => \"fa-foursquare\",\n\t\t\t\"fa-f181\" => \"fa-trello\",\n\t\t\t\"fa-f182\" => \"fa-female\",\n\t\t\t\"fa-f183\" => \"fa-male\",\n\t\t\t\"fa-f184\" => \"fa-gratipay\",\n\t\t\t\"fa-f185\" => \"fa-sun-o\",\n\t\t\t\"fa-f186\" => \"fa-moon-o\",\n\t\t\t\"fa-f187\" => \"fa-archive\",\n\t\t\t\"fa-f188\" => \"fa-bug\",\n\t\t\t\"fa-f189\" => \"fa-vk\",\n\t\t\t\"fa-f18a\" => \"fa-weibo\",\n\t\t\t\"fa-f18b\" => \"fa-renren\",\n\t\t\t\"fa-f18c\" => \"fa-pagelines\",\n\t\t\t\"fa-f18d\" => \"fa-stack-exchange\",\n\t\t\t\"fa-f18e\" => \"fa-arrow-circle-o-right\",\n\t\t\t\"fa-f190\" => \"fa-arrow-circle-o-left\",\n\t\t\t\"fa-f191\" => \"fa-caret-square-o-left\",\n\t\t\t\"fa-f192\" => \"fa-dot-circle-o\",\n\t\t\t\"fa-f193\" => \"fa-wheelchair\",\n\t\t\t\"fa-f194\" => \"fa-vimeo-square\",\n\t\t\t\"fa-f195\" => \"fa-try\",\n\t\t\t\"fa-f196\" => \"fa-plus-square-o\",\n\t\t\t\"fa-f197\" => \"fa-space-shuttle\",\n\t\t\t\"fa-f198\" => \"fa-slack\",\n\t\t\t\"fa-f199\" => \"fa-envelope-square\",\n\t\t\t\"fa-f19a\" => \"fa-wordpress\",\n\t\t\t\"fa-f19b\" => \"fa-openid\",\n\t\t\t\"fa-f19c\" => \"fa-university\",\n\t\t\t\"fa-f19d\" => \"fa-graduation-cap\",\n\t\t\t\"fa-f19e\" => \"fa-yahoo\",\n\t\t\t\"fa-f1a0\" => \"fa-google\",\n\t\t\t\"fa-f1a1\" => \"fa-reddit\",\n\t\t\t\"fa-f1a2\" => \"fa-reddit-square\",\n\t\t\t\"fa-f1a3\" => \"fa-stumbleupon-circle\",\n\t\t\t\"fa-f1a4\" => \"fa-stumbleupon\",\n\t\t\t\"fa-f1a5\" => \"fa-delicious\",\n\t\t\t\"fa-f1a6\" => \"fa-digg\",\n\t\t\t\"fa-f1a7\" => \"fa-pied-piper\",\n\t\t\t\"fa-f1a8\" => \"fa-pied-piper-alt\",\n\t\t\t\"fa-f1a9\" => \"fa-drupal\",\n\t\t\t\"fa-f1aa\" => \"fa-joomla\",\n\t\t\t\"fa-f1ab\" => \"fa-language\",\n\t\t\t\"fa-f1ac\" => \"fa-fax\",\n\t\t\t\"fa-f1ad\" => \"fa-building\",\n\t\t\t\"fa-f1ae\" => \"fa-child\",\n\t\t\t\"fa-f1b0\" => \"fa-paw\",\n\t\t\t\"fa-f1b1\" => \"fa-spoon\",\n\t\t\t\"fa-f1b2\" => \"fa-cube\",\n\t\t\t\"fa-f1b3\" => \"fa-cubes\",\n\t\t\t\"fa-f1b4\" => \"fa-behance\",\n\t\t\t\"fa-f1b5\" => \"fa-behance-square\",\n\t\t\t\"fa-f1b6\" => \"fa-steam\",\n\t\t\t\"fa-f1b7\" => \"fa-steam-square\",\n\t\t\t\"fa-f1b8\" => \"fa-recycle\",\n\t\t\t\"fa-f1b9\" => \"fa-car\",\n\t\t\t\"fa-f1ba\" => \"fa-taxi\",\n\t\t\t\"fa-f1bb\" => \"fa-tree\",\n\t\t\t\"fa-f1bc\" => \"fa-spotify\",\n\t\t\t\"fa-f1bd\" => \"fa-deviantart\",\n\t\t\t\"fa-f1be\" => \"fa-soundcloud\",\n\t\t\t\"fa-f1c0\" => \"fa-database\",\n\t\t\t\"fa-f1c1\" => \"fa-file-pdf-o\",\n\t\t\t\"fa-f1c2\" => \"fa-file-word-o\",\n\t\t\t\"fa-f1c3\" => \"fa-file-excel-o\",\n\t\t\t\"fa-f1c4\" => \"fa-file-powerpoint-o\",\n\t\t\t\"fa-f1c5\" => \"fa-file-image-o\",\n\t\t\t\"fa-f1c6\" => \"fa-file-archive-o\",\n\t\t\t\"fa-f1c7\" => \"fa-file-audio-o\",\n\t\t\t\"fa-f1c8\" => \"fa-file-video-o\",\n\t\t\t\"fa-f1c9\" => \"fa-file-code-o\",\n\t\t\t\"fa-f1ca\" => \"fa-vine\",\n\t\t\t\"fa-f1cb\" => \"fa-codepen\",\n\t\t\t\"fa-f1cc\" => \"fa-jsfiddle\",\n\t\t\t\"fa-f1cd\" => \"fa-life-ring\",\n\t\t\t\"fa-f1ce\" => \"fa-circle-o-notch\",\n\t\t\t\"fa-f1d0\" => \"fa-rebel\",\n\t\t\t\"fa-f1d1\" => \"fa-empire\",\n\t\t\t\"fa-f1d2\" => \"fa-git-square\",\n\t\t\t\"fa-f1d3\" => \"fa-git\",\n\t\t\t\"fa-f1d4\" => \"fa-hacker-news\",\n\t\t\t\"fa-f1d5\" => \"fa-tencent-weibo\",\n\t\t\t\"fa-f1d6\" => \"fa-qq\",\n\t\t\t\"fa-f1d7\" => \"fa-weixin\",\n\t\t\t\"fa-f1d8\" => \"fa-paper-plane\",\n\t\t\t\"fa-f1d9\" => \"fa-paper-plane-o\",\n\t\t\t\"fa-f1da\" => \"fa-history\",\n\t\t\t\"fa-f1db\" => \"fa-circle-thin\",\n\t\t\t\"fa-f1dc\" => \"fa-header\",\n\t\t\t\"fa-f1dd\" => \"fa-paragraph\",\n\t\t\t\"fa-f1de\" => \"fa-sliders\",\n\t\t\t\"fa-f1e0\" => \"fa-share-alt\",\n\t\t\t\"fa-f1e1\" => \"fa-share-alt-square\",\n\t\t\t\"fa-f1e2\" => \"fa-bomb\",\n\t\t\t\"fa-f1e3\" => \"fa-futbol-o\",\n\t\t\t\"fa-f1e4\" => \"fa-tty\",\n\t\t\t\"fa-f1e5\" => \"fa-binoculars\",\n\t\t\t\"fa-f1e6\" => \"fa-plug\",\n\t\t\t\"fa-f1e7\" => \"fa-slideshare\",\n\t\t\t\"fa-f1e8\" => \"fa-twitch\",\n\t\t\t\"fa-f1e9\" => \"fa-yelp\",\n\t\t\t\"fa-f1ea\" => \"fa-newspaper-o\",\n\t\t\t\"fa-f1eb\" => \"fa-wifi\",\n\t\t\t\"fa-f1ec\" => \"fa-calculator\",\n\t\t\t\"fa-f1ed\" => \"fa-paypal\",\n\t\t\t\"fa-f1ee\" => \"fa-google-wallet\",\n\t\t\t\"fa-f1f0\" => \"fa-cc-visa\",\n\t\t\t\"fa-f1f1\" => \"fa-cc-mastercard\",\n\t\t\t\"fa-f1f2\" => \"fa-cc-discover\",\n\t\t\t\"fa-f1f3\" => \"fa-cc-amex\",\n\t\t\t\"fa-f1f4\" => \"fa-cc-paypal\",\n\t\t\t\"fa-f1f5\" => \"fa-cc-stripe\",\n\t\t\t\"fa-f1f6\" => \"fa-bell-slash\",\n\t\t\t\"fa-f1f7\" => \"fa-bell-slash-o\",\n\t\t\t\"fa-f1f8\" => \"fa-trash\",\n\t\t\t\"fa-f1f9\" => \"fa-copyright\",\n\t\t\t\"fa-f1fa\" => \"fa-at\",\n\t\t\t\"fa-f1fb\" => \"fa-eyedropper\",\n\t\t\t\"fa-f1fc\" => \"fa-paint-brush\",\n\t\t\t\"fa-f1fd\" => \"fa-birthday-cake\",\n\t\t\t\"fa-f1fe\" => \"fa-area-chart\",\n\t\t\t\"fa-f200\" => \"fa-pie-chart\",\n\t\t\t\"fa-f201\" => \"fa-line-chart\",\n\t\t\t\"fa-f202\" => \"fa-lastfm\",\n\t\t\t\"fa-f203\" => \"fa-lastfm-square\",\n\t\t\t\"fa-f204\" => \"fa-toggle-off\",\n\t\t\t\"fa-f205\" => \"fa-toggle-on\",\n\t\t\t\"fa-f206\" => \"fa-bicycle\",\n\t\t\t\"fa-f207\" => \"fa-bus\",\n\t\t\t\"fa-f208\" => \"fa-ioxhost\",\n\t\t\t\"fa-f209\" => \"fa-angellist\",\n\t\t\t\"fa-f20a\" => \"fa-cc\",\n\t\t\t\"fa-f20b\" => \"fa-ils\",\n\t\t\t\"fa-f20c\" => \"fa-meanpath\",\n\t\t\t\"fa-f20d\" => \"fa-buysellads\",\n\t\t\t\"fa-f20e\" => \"fa-connectdevelop\",\n\t\t\t\"fa-f210\" => \"fa-dashcube\",\n\t\t\t\"fa-f211\" => \"fa-forumbee\",\n\t\t\t\"fa-f212\" => \"fa-leanpub\",\n\t\t\t\"fa-f213\" => \"fa-sellsy\",\n\t\t\t\"fa-f214\" => \"fa-shirtsinbulk\",\n\t\t\t\"fa-f215\" => \"fa-simplybuilt\",\n\t\t\t\"fa-f216\" => \"fa-skyatlas\",\n\t\t\t\"fa-f217\" => \"fa-cart-plus\",\n\t\t\t\"fa-f218\" => \"fa-cart-arrow-down\",\n\t\t\t\"fa-f219\" => \"fa-diamond\",\n\t\t\t\"fa-f21a\" => \"fa-ship\",\n\t\t\t\"fa-f21b\" => \"fa-user-secret\",\n\t\t\t\"fa-f21c\" => \"fa-motorcycle\",\n\t\t\t\"fa-f21d\" => \"fa-street-view\",\n\t\t\t\"fa-f21e\" => \"fa-heartbeat\",\n\t\t\t\"fa-f221\" => \"fa-venus\",\n\t\t\t\"fa-f222\" => \"fa-mars\",\n\t\t\t\"fa-f223\" => \"fa-mercury\",\n\t\t\t\"fa-f224\" => \"fa-transgender\",\n\t\t\t\"fa-f225\" => \"fa-transgender-alt\",\n\t\t\t\"fa-f226\" => \"fa-venus-double\",\n\t\t\t\"fa-f227\" => \"fa-mars-double\",\n\t\t\t\"fa-f228\" => \"fa-venus-mars\",\n\t\t\t\"fa-f229\" => \"fa-mars-stroke\",\n\t\t\t\"fa-f22a\" => \"fa-mars-stroke-v\",\n\t\t\t\"fa-f22b\" => \"fa-mars-stroke-h\",\n\t\t\t\"fa-f22c\" => \"fa-neuter\",\n\t\t\t\"fa-f22d\" => \"fa-genderless\",\n\t\t\t\"fa-f230\" => \"fa-facebook-official\",\n\t\t\t\"fa-f231\" => \"fa-pinterest-p\",\n\t\t\t\"fa-f232\" => \"fa-whatsapp\",\n\t\t\t\"fa-f233\" => \"fa-server\",\n\t\t\t\"fa-f234\" => \"fa-user-plus\",\n\t\t\t\"fa-f235\" => \"fa-user-times\",\n\t\t\t\"fa-f236\" => \"fa-bed\",\n\t\t\t\"fa-f237\" => \"fa-viacoin\",\n\t\t\t\"fa-f238\" => \"fa-train\",\n\t\t\t\"fa-f239\" => \"fa-subway\",\n\t\t\t\"fa-f23a\" => \"fa-medium\",\n\t\t\t\"fa-f23b\" => \"fa-y-combinator\",\n\t\t\t\"fa-f23c\" => \"fa-optin-monster\",\n\t\t\t\"fa-f23d\" => \"fa-opencart\",\n\t\t\t\"fa-f23e\" => \"fa-expeditedssl\",\n\t\t\t\"fa-f240\" => \"fa-battery-full\",\n\t\t\t\"fa-f241\" => \"fa-battery-three-quarters\",\n\t\t\t\"fa-f242\" => \"fa-battery-half\",\n\t\t\t\"fa-f243\" => \"fa-battery-quarter\",\n\t\t\t\"fa-f244\" => \"fa-battery-empty\",\n\t\t\t\"fa-f245\" => \"fa-mouse-pointer\",\n\t\t\t\"fa-f246\" => \"fa-i-cursor\",\n\t\t\t\"fa-f247\" => \"fa-object-group\",\n\t\t\t\"fa-f248\" => \"fa-object-ungroup\",\n\t\t\t\"fa-f249\" => \"fa-sticky-note\",\n\t\t\t\"fa-f24a\" => \"fa-sticky-note-o\",\n\t\t\t\"fa-f24b\" => \"fa-cc-jcb\",\n\t\t\t\"fa-f24c\" => \"fa-cc-diners-club\",\n\t\t\t\"fa-f24d\" => \"fa-clone\",\n\t\t\t\"fa-f24e\" => \"fa-balance-scale\",\n\t\t\t\"fa-f250\" => \"fa-hourglass-o\",\n\t\t\t\"fa-f251\" => \"fa-hourglass-start\",\n\t\t\t\"fa-f252\" => \"fa-hourglass-half\",\n\t\t\t\"fa-f253\" => \"fa-hourglass-end\",\n\t\t\t\"fa-f254\" => \"fa-hourglass\",\n\t\t\t\"fa-f255\" => \"fa-hand-rock-o\",\n\t\t\t\"fa-f256\" => \"fa-hand-paper-o\",\n\t\t\t\"fa-f257\" => \"fa-hand-scissors-o\",\n\t\t\t\"fa-f258\" => \"fa-hand-lizard-o\",\n\t\t\t\"fa-f259\" => \"fa-hand-spock-o\",\n\t\t\t\"fa-f25a\" => \"fa-hand-pointer-o\",\n\t\t\t\"fa-f25b\" => \"fa-hand-peace-o\",\n\t\t\t\"fa-f25c\" => \"fa-trademark\",\n\t\t\t\"fa-f25d\" => \"fa-registered\",\n\t\t\t\"fa-f25e\" => \"fa-creative-commons\",\n\t\t\t\"fa-f260\" => \"fa-gg\",\n\t\t\t\"fa-f261\" => \"fa-gg-circle\",\n\t\t\t\"fa-f262\" => \"fa-tripadvisor\",\n\t\t\t\"fa-f263\" => \"fa-odnoklassniki\",\n\t\t\t\"fa-f264\" => \"fa-odnoklassniki-square\",\n\t\t\t\"fa-f265\" => \"fa-get-pocket\",\n\t\t\t\"fa-f266\" => \"fa-wikipedia-w\",\n\t\t\t\"fa-f267\" => \"fa-safari\",\n\t\t\t\"fa-f268\" => \"fa-chrome\",\n\t\t\t\"fa-f269\" => \"fa-firefox\",\n\t\t\t\"fa-f26a\" => \"fa-opera\",\n\t\t\t\"fa-f26b\" => \"fa-internet-explorer\",\n\t\t\t\"fa-f26c\" => \"fa-television\",\n\t\t\t\"fa-f26d\" => \"fa-contao\",\n\t\t\t\"fa-f26e\" => \"fa-500px\",\n\t\t\t\"fa-f270\" => \"fa-amazon\",\n\t\t\t\"fa-f271\" => \"fa-calendar-plus-o\",\n\t\t\t\"fa-f272\" => \"fa-calendar-minus-o\",\n\t\t\t\"fa-f273\" => \"fa-calendar-times-o\",\n\t\t\t\"fa-f274\" => \"fa-calendar-check-o\",\n\t\t\t\"fa-f275\" => \"fa-industry\",\n\t\t\t\"fa-f276\" => \"fa-map-pin\",\n\t\t\t\"fa-f277\" => \"fa-map-signs\",\n\t\t\t\"fa-f278\" => \"fa-map-o\",\n\t\t\t\"fa-f279\" => \"fa-map\",\n\t\t\t\"fa-f27a\" => \"fa-commenting\",\n\t\t\t\"fa-f27b\" => \"fa-commenting-o\",\n\t\t\t\"fa-f27c\" => \"fa-houzz\",\n\t\t\t\"fa-f27d\" => \"fa-vimeo\",\n\t\t\t\"fa-f27e\" => \"fa-black-tie\",\n\t\t\t\"fa-f280\" => \"fa-fonticons\",\n\t\t\t\"fa-f281\" => \"fa-reddit-alien\",\n\t\t\t\"fa-f282\" => \"fa-edge\",\n\t\t\t\"fa-f283\" => \"fa-credit-card-alt\",\n\t\t\t\"fa-f284\" => \"fa-codiepie\",\n\t\t\t\"fa-f285\" => \"fa-modx\",\n\t\t\t\"fa-f286\" => \"fa-fort-awesome\",\n\t\t\t\"fa-f287\" => \"fa-usb\",\n\t\t\t\"fa-f288\" => \"fa-product-hunt\",\n\t\t\t\"fa-f289\" => \"fa-mixcloud\",\n\t\t\t\"fa-f28a\" => \"fa-scribd\",\n\t\t\t\"fa-f28b\" => \"fa-pause-circle\",\n\t\t\t\"fa-f28c\" => \"fa-pause-circle-o\",\n\t\t\t\"fa-f28d\" => \"fa-stop-circle\",\n\t\t\t\"fa-f28e\" => \"fa-stop-circle-o\",\n\t\t\t\"fa-f290\" => \"fa-shopping-bag\",\n\t\t\t\"fa-f291\" => \"fa-shopping-basket\",\n\t\t\t\"fa-f292\" => \"fa-hashtag\",\n\t\t\t\"fa-f293\" => \"fa-bluetooth\"\n\t\t);\n\n\t\t$icons = apply_filters( \"megamenu_fontawesome_icons\", $icons );\n\n\t\treturn $icons;\n\n\t}", "title": "" }, { "docid": "27aae6351310c1b02f41af988db6ee9a", "score": "0.56785685", "text": "public static function getImageIconeTagForType($type)\n {\n $iconTag = '';\n switch (strtolower($type)) {\n case 'folder':\n $iconTag = '<i class=\"fa fa-2x fa-folder\" aria-hidden=\"true\"></i>';\n break;\n case 'previous_folder':\n $iconTag = '<i class=\"fa fa-2x fa-folder\" aria-hidden=\"true\"></i>';\n break;\n case 'pdf':\n $iconTag = '<i class=\"fa fa-2x fa-file-pdf-o\" aria-hidden=\"true\"></i>';\n break;\n case 'xls':\n case 'xlsx':\n case 'ods':\n $iconTag = '<i class=\"fa fa-2x fa-file-excel-o\" aria-hidden=\"true\"></i>';\n break;\n case 'doc':\n case 'docx':\n case 'odt':\n $iconTag = '<i class=\"fa fa-2x fa-file-word-o\" aria-hidden=\"true\"></i>';\n break;\n case 'ppt':\n case 'pptx':\n case 'odp':\n $iconTag = '<i class=\"fa fa-2x fa-file-powerpoint-o\" aria-hidden=\"true\"></i>';\n break;\n case 'avi':\n case 'mpeg':\n case 'mp4':\n case 'mov':\n case 'flv':\n case 'youtube':\n case 'vimeo':\n case 'dailymotion':\n $iconTag = '<i class=\"fa fa-2x fa-file-video-o\" aria-hidden=\"true\"></i>';\n break;\n case 'jpg':\n case 'jpeg':\n case 'svg':\n case 'png':\n case 'bmp':\n case 'gif':\n case 'eps':\n case 'tiff':\n $iconTag = '<i class=\"fa fa-2x fa-file-image-o\" aria-hidden=\"true\"></i>';\n break;\n case 'mp3':\n case 'oga':\n case 'ogg':\n case 'midi':\n $iconTag = '<i class=\"fa fa-2x fa-file-audio-o\" aria-hidden=\"true\"></i>';\n break;\n default:\n $iconTag = '<i class=\"fa fa-2x fa-file-text-o\" aria-hidden=\"true\"></i>';\n break;\n }\n return $iconTag;\n }", "title": "" }, { "docid": "00542207929a8235a64bfa32e0be94ce", "score": "0.5674706", "text": "function clanpress_the_icon_image( $size = 'thumbnail' ) {\n $settings = Clanpress_Settings::instance()->get_values( 'admin' );\n if ( !empty( $settings['icon'] ) ) {\n echo clanpress_get_image( $settings['icon'], $size );\n }\n}", "title": "" }, { "docid": "66580c724c803f347ca47e8202569341", "score": "0.56656224", "text": "public function getContextIcon() { }", "title": "" }, { "docid": "0e5b8e75a370e5d06b47bd995f0d1261", "score": "0.56648564", "text": "public function icon($icon);", "title": "" }, { "docid": "58d7ddc717b968ff957baa537bc7a4f9", "score": "0.56620634", "text": "function pmc_socialLink() {\n\t$social = '';\n\tglobal $pmc_data; \n\t$icons = $pmc_data['socialicons'];\n\tforeach ($icons as $icon){\n\t\t$social .= '<a target=\"_blank\" href=\"'.esc_url($icon['link']).'\" title=\"'.esc_attr($icon['title']).'\"><i class=\"fa '.esc_attr($icon['url']).'\"></i></a>';\t\n\t}\n\techo $social;\n}", "title": "" }, { "docid": "29014dd12af0eb535a9b9cea4aed2701", "score": "0.5660868", "text": "function write_add_icons() {\n\n ?> <div class=\"clear\"><br></div> <?php\n\n require_once(WPDEV_CP_PLUGIN_DIR. '/include/wpdev-flash-uploader.php' ); // Connect to flash uploader class\n\n $this->flash_uploader = &new wpdev_flash_uploader( 'Choose Icons to upload' );\n\n $this->flash_uploader->set_dir( array($this->icons_dir, $this->icons_url) );\n\n if(get_option( 'wpdev_mc_icon_crop' ) == 'On') $wpdev_mc_icon_crop = 1;\n else $wpdev_mc_icon_crop = 0;\n\n $this->flash_uploader->set_sizes( get_option( 'wpdev_mc_icon_size_w' ), get_option( 'wpdev_mc_icon_size_h' ), $wpdev_mc_icon_crop );\n\n $this->flash_uploader->upload_form();\n }", "title": "" }, { "docid": "ed79e76cad81aebf9020cc0d7952569c", "score": "0.5655625", "text": "public static function headerIcon($resources)\n {\n $icon = '<svg class=\"sidebar-icon\" xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 20 20\"><path fill=\"var(--sidebar-icon)\" d=\"M3 1h4c1.1045695 0 2 .8954305 2 2v4c0 1.1045695-.8954305 2-2 2H3c-1.1045695 0-2-.8954305-2-2V3c0-1.1045695.8954305-2 2-2zm0 2v4h4V3H3zm10-2h4c1.1045695 0 2 .8954305 2 2v4c0 1.1045695-.8954305 2-2 2h-4c-1.1045695 0-2-.8954305-2-2V3c0-1.1045695.8954305-2 2-2zm0 2v4h4V3h-4zM3 11h4c1.1045695 0 2 .8954305 2 2v4c0 1.1045695-.8954305 2-2 2H3c-1.1045695 0-2-.8954305-2-2v-4c0-1.1045695.8954305-2 2-2zm0 2v4h4v-4H3zm10-2h4c1.1045695 0 2 .8954305 2 2v4c0 1.1045695-.8954305 2-2 2h-4c-1.1045695 0-2-.8954305-2-2v-4c0-1.1045695.8954305-2 2-2zm0 2v4h4v-4h-4z\"/></svg>';\n foreach ($resources as $key => $resource) {\n if (property_exists($resource, 'icon')) {\n $icon = !empty($resource::$icon) ? $resource::$icon : $icon;\n }\n }\n return $icon;\n }", "title": "" }, { "docid": "859f16843649d3133f592cd7f437148f", "score": "0.56226104", "text": "function plugin_geticon_polls ()\n{\n global $_CONF;\n return $_CONF['site_url'] . '/polls/images/polls.png';\n}", "title": "" }, { "docid": "6961e8f510e6bd29d241b75e3078fd8d", "score": "0.5617892", "text": "function _kalium_blog_post_format_icon() {\n\tglobal $post;\n\n\tif ( kalium_blog_get_option( 'loop/post_format_icon' ) ) {\n\t\t$post_format = get_post_format( $post );\n\n\t\t// Args\n\t\t$args = [];\n\n\t\t// Default post icon\n\t\t$icon = 'icon icon-basic-sheet-txt';\n\n\t\t// Available icons\n\t\t$post_format_icons = [\n\t\t\t'quote' => 'fa fa-quote-left',\n\t\t\t'video' => 'icon icon-basic-video',\n\t\t\t'audio' => 'icon icon-music-note-multiple',\n\t\t\t'link' => 'icon icon-basic-link',\n\t\t\t'image' => 'icon icon-basic-photo',\n\t\t\t'gallery' => 'icon icon-basic-picture-multiple',\n\t\t];\n\n\t\tif ( $post_format && isset( $post_format_icons[ $post_format ] ) ) {\n\t\t\t$icon = $post_format_icons[ $post_format ];\n\t\t}\n\n\t\t$args['icon'] = $icon;\n\n\t\t// Post icon template\n\t\tkalium_get_template( 'blog/loop/post-icon.php', $args );\n\t}\n}", "title": "" }, { "docid": "22fea93635b77a4aafcd239c2afb8e37", "score": "0.5612496", "text": "function ufclas_emily_icon($atts, $content = NULL ) {\n\n\textract( shortcode_atts(\n\t\tarray(\n\t\t\t'name' => 'file',\n\t\t\t'icon_class' => ''\n\t\t), $atts )\n\t);\n\n\t$classes = array( 'img-icon glyphicon glyphicon-' . esc_attr( $name ) );\n\n\tif ( !empty( $icon_class ) ){\n\t\t$classes[] = esc_attr( $icon_class );\n\t}\n\n\treturn '<div class=\"img-icon-wrap\"><span class=\"' . join(' ', $classes) . '\"></span></div>';\n}", "title": "" }, { "docid": "26c50a1af41898542a5403d7f22694af", "score": "0.55848545", "text": "function plugin_geticon_nexlist()\r\n{\r\n global $_CONF;\r\n\r\n return $_CONF['layout_url'] . '/nexlist/images/admin/nexlist.gif';\r\n}", "title": "" }, { "docid": "b342157bfaf7f0278dcbfcf8cdf11a23", "score": "0.55810314", "text": "public function forumIcon($forum, array $options = array()) {\n $icon = 'open';\n $tooltip = '';\n\n if (isset($forum['LastPost']['created'])) {\n $lastPost = $forum['LastPost']['created'];\n\n } else if (isset($forum['LastTopic']['created'])) {\n $lastPost = $forum['LastTopic']['created'];\n }\n\n if ($forum['status'] == Forum::CLOSED) {\n $icon = 'closed';\n\n } else if (isset($lastPost) && $lastPost > $this->Session->read('Forum.lastVisit')) {\n $icon = 'new';\n }\n\n $custom = null;\n\n switch ($icon) {\n case 'open': $tooltip = __d('forum', 'No New Posts'); break;\n case 'closed': $tooltip = __d('forum', 'Closed'); break;\n case 'new': $tooltip = __d('forum', 'New Posts'); break;\n }\n\n return $this->Html->image('Forum.forum_icons/icon_' . $icon . '.png', array('valign' => 'middle', 'alt' => $tooltip, 'title' => $tooltip));\n }", "title": "" }, { "docid": "71d2ad9f2e2d447c4005e3652771854e", "score": "0.5576964", "text": "function wp_list_categories_icons($output) {\n\n $my_childs = array();\n\n $categorys = get_categories('hide_empty=0&child_of=0');\n $ii=0;\n $ic=count($categorys);\n $my_class ='';\n\n if ($ic > 0) {\n \n for ($ii = 0 ; $ii < $ic ; $ii++) {\n $category = $categorys[$ii];\n $my_class = '';\n\n $perma_load = get_category_link($category->term_id);\n $perma_real = 'http://' . $_SERVER['HTTP_HOST'] .$_SERVER['REQUEST_URI'] ;\n\n if ($ii == $ic-1) $my_class = ' class=\"last_submenu\" ';\n if ( str_replace('/','',$perma_load) == str_replace('/','',$perma_real) ) {\n $my_class = ' class=\"selected\" ';\n $slct = $i;\n }\n\n $my_childs[] =array(\n 'class' => $my_class,\n 'link' => get_category_link($category->term_id),\n 'icon' => $category->term_icon, // 'cat-'.$category->slug.'.jpg', // Need to think and set goog name\n 'title' => $category->name\n );\n }\n }\n\n foreach ($my_childs as $pg) {\n\n if (! empty ($pg['icon']) ) {\n $pos = strpos($output, '\"' . $pg['link'] . '\"'); // Get position of link inside output\n if ( $pos !== false) {\n $pos = strpos($output, '>' ,$pos); // Get position of end of A attribute\n\n $afterImg = $beforeImg = '';\n\n $pos = apply_cp_filter('wpdev_pos_img_category',$pos, $output);\n $beforeImg = apply_cp_filter('wpdev_before_img_category','');\n $afterImg = apply_cp_filter('wpdev_after_img_category','');\n\n if ( $pos !== false) {\n $pos++;\n $output = substr($output, 0, $pos) . $beforeImg . '<img src=\"'. $pg['icon'] .'\" class=\"category_icon\" alt=\"'. $pg['title'] .'\">'. $afterImg . substr($output, $pos); //Insert icon\n }\n }\n }\n }\n\n\n\n return $output;\n }", "title": "" }, { "docid": "8be046d0f98c02f7e553366c073e023c", "score": "0.55692875", "text": "function wp_site_icon()\n{\n}", "title": "" }, { "docid": "b9d8419b6b0e3e930891d998ca01619d", "score": "0.55590487", "text": "function staff_icons() {\r\n\t\t ?>\r\n\t\t <style type=\"text/css\" media=\"screen\">\r\n\t\t\t #icon-edit.icon32-posts-staff {background: url(<?php echo plugin_dir_url( __FILE__ ); ?>/images/staff-32x32.png) no-repeat;}\r\n\t\t</style>\r\n\t\t<?php\r\n\t\t}", "title": "" }, { "docid": "156f2cb00f451e2c1d58a1a2f0c4e5fe", "score": "0.55485684", "text": "function getIcon() ;", "title": "" }, { "docid": "72b6020ef56801bf6b78c6526668b926", "score": "0.5546579", "text": "function ut_icon_file( $atts, $content = null ) {\n\textract(shortcode_atts(array(\n\t\t\"color\" => '#'\n\t), $atts));\n return '<span class=\"uticon icon-file '.$color.'\"><svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\"><path d=\"M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z\"/></svg>' . do_shortcode($content) . '</span> ';\n}", "title": "" }, { "docid": "b7026eba7f17a463f87296fefb6236bd", "score": "0.5545744", "text": "function activello_social_icons() {\n\t\tif ( has_nav_menu( 'social-menu' ) ) {\n\t\t\twp_nav_menu(\n\t\t\t\tarray(\n\t\t\t\t\t'theme_location' => 'social-menu',\n\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t'container_id' => 'social',\n\t\t\t\t\t'container_class' => 'social-icons',\n\t\t\t\t\t'menu_id' => 'menu-social-items',\n\t\t\t\t\t'menu_class' => 'social-menu',\n\t\t\t\t\t'depth' => 1,\n\t\t\t\t\t'fallback_cb' => '',\n\t\t\t\t\t'link_before' => '<i class=\"social_icon fa\"><span>',\n\t\t\t\t\t'link_after' => '</span></i>',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "1672e029b6ea074df3aa5edd73d58d4c", "score": "0.5539036", "text": "public function get_icon()\n {\n }", "title": "" }, { "docid": "a1302fa3de1da23036bea41d3113b55e", "score": "0.55368716", "text": "function ade_widgets_quicklinks() {\n\n\n $setting = (array) get_option( 'ade_widgets_quicklinks_settings' );\n $prefix = 'ade_widgets_quicklinks_';\n\n $icons = array();\n $links = array();\n $titles = array();\n\n for ($counter = 0; $counter<=5; $counter++) {\n $num = $counter + 1;\n $iteration = $prefix.$num;\n $icon_field = $iteration.'_1';\n $link_field = $iteration.'_2';\n $title_field = $iteration.'_3';\n $icons[] = esc_attr( $setting[$icon_field]);\n $links[] = esc_attr( $setting[$link_field]);\n $titles[] = esc_attr( $setting[$title_field]);\n }\n\n // $icon_1 = esc_attr( $setting[$prefix.'1_1']);\n // $link_1 = esc_attr( $setting[$prefix.'1_2']);\n // $title_1 = esc_attr( $setting[$prefix.'1_3']);\n //\n // $icon_2 = esc_attr( $setting[$prefix.'2_1']);\n // $link_2 = esc_attr( $setting[$prefix.'2_2']);\n // $title_2 = esc_attr( $setting[$prefix.'2_3']);\n //\n // $icon_3 = esc_attr( $setting[$prefix.'3_1']);\n // $link_3 = esc_attr( $setting[$prefix.'3_2']);\n // $title_3 = esc_attr( $setting[$prefix.'3_3']);\n //\n // $icon_4 = esc_attr( $setting[$prefix.'4_1']);\n // $link_4 = esc_attr( $setting[$prefix.'4_2']);\n // $title_4 = esc_attr( $setting[$prefix.'4_3']);\n //\n // $icon_5 = esc_attr( $setting[$prefix.'5_1']);\n // $link_5 = esc_attr( $setting[$prefix.'5_2']);\n // $title_5 = esc_attr( $setting[$prefix.'5_3']);\n //\n // $icon_6 = esc_attr( $setting[$prefix.'6_1']);\n // $link_6 = esc_attr( $setting[$prefix.'6_2']);\n // $title_6 = esc_attr( $setting[$prefix.'6_3']);\n\n $numicons = count($icons);\n $quicklinks = '';\n $quicklinks .= '<section id=\"ade-widgets-quicklinks\" class=\"col-xs-12\" aria-labelledby=\"quicklinkstitle\"><h3 id=\"quicklinkstitle\" class=\"screen-reader-text\">Quick Links</h3>';\n\n for ($counter = 0; $counter <= $numicons; $counter++) {\n if ( $icons[$counter] != '' ) {\n $quicklinks .= '<div class=\"quicklink\"><a href=\"'.$links[$counter].'\" title=\"'.$titles[$counter].'\"><i class=\"fa fa-3x fa-'.$icons[$counter].'\"></i><br class=\"donotfilter\"><span class=\"quicklink-title\">'.$titles[$counter].'</span></a></div>';\n }\n }\n\n // $quicklink_1 = '<div class=\"ade-widgets-quicklink\"><a href=\"'.$link_1.'\" title=\"'.$title_1.'\"><i class=\"fa fa-3x fa-'.$icon_1.'\"></i><br class=\"donotfilter\"><span class=\"ade-widgets-quicklink-title\">'.$title_1.'</span></a></div>';\n // $quicklink_2 = '<div class=\"ade-widgets-quicklink\"><a href=\"'.$link_2. '\" title=\"'.$title_2. '\"><i class=\"fa fa-3x fa-'.$icon_2. '\"></i><br class=\"donotfilter\"><span class=\"ade-widgets-quicklink-title\">'.$title_2.'</span></a></div>';\n // $quicklink_3 = '<div class=\"ade-widgets-quicklink\"><a href=\"'.$link_3. '\" title=\"'.$title_3. '\"><i class=\"fa fa-3x fa-'.$icon_3. '\"></i><br class=\"donotfilter\"><span class=\"ade-widgets-quicklink-title\">'.$title_3.'</span></a></div>';\n // $quicklink_4 = '<div class=\"ade-widgets-quicklink\"><a href=\"'.$link_4. '\" title=\"'.$title_4. '\"><i class=\"fa fa-3x fa-'.$icon_4. '\"></i><br class=\"donotfilter\"><span class=\"ade-widgets-quicklink-title\">'.$title_4.'</span></a></div>';\n // $quicklink_5 = '<div class=\"ade-widgets-quicklink\"><a href=\"'.$link_5. '\" title=\"'.$title_5. '\"><i class=\"fa fa-3x fa-'.$icon_5. '\"></i><br class=\"donotfilter\"><span class=\"ade-widgets-quicklink-title\">'.$title_5.'</span></a></div>';\n // $quicklink_6 = '<div class=\"ade-widgets-quicklink\"><a href=\"'.$link_6. '\" title=\"'.$title_6. '\"><i class=\"fa fa-3x fa-'.$icon_6. '\"></i><br class=\"donotfilter\"><span class=\"ade-widgets-quicklink-title\">'.$title_6.'</span></a></div>';\n\n\n // $quicklinks .= $quicklink_1;\n // $quicklinks .= $quicklink_2;\n // $quicklinks .= $quicklink_3;\n // $quicklinks .= $quicklink_4;\n // $quicklinks .= $quicklink_5;\n // $quicklinks .= $quicklink_6;\n\n $quicklinks .= '</section>';\n\n return $quicklinks;\n }", "title": "" }, { "docid": "7e7e0260ec3cf0296f54b8878c3666b3", "score": "0.5521209", "text": "function add_menu_icons_styles(){\n?>\n\n<style>\n#menu-posts-coluna div.wp-menu-image:before {\n content: \"\\f122\";\n}\n#menu-posts-oferta div.wp-menu-image:before {\n content: \"\\f488\";\n}\n</style>\n \n<?php\n}", "title": "" }, { "docid": "8226db82edcc0bed736329e70efd3495", "score": "0.55211335", "text": "public static function icon($icon) {\n }", "title": "" }, { "docid": "10f01b43354c7603b25c348fb57fef39", "score": "0.55208427", "text": "function get_template_default_icons() {\n\n\t$icons = array(\n\t\t'caret' => array(\n\t\t\t'paths' => 'm 6,8 h 8 l -4,5 z',\n\t\t),\n\t\t'category' => array(\n\t\t\t'paths' => 'M 9.0000001,4 10,5 h 8 V 17 H 2 V 4 Z',\n\t\t),\n\t\t'check' => array(\n\t\t\t'paths' => 'M 2,12 4,10 7,13 16,3 18,5 7,17 Z',\n\t\t),\n\t\t'close' => array(\n\t\t\t'paths' => 'M 3.636039,5.0502525 5.050252,3.636039 10,8.5857864 14.949747,3.636039 16.363961,5.0502525 11.414214,10 16.363961,14.949747 14.949747,16.363961 10,11.414214 5.050252,16.363961 3.636039,14.949747 8.585786,10 Z',\n\t\t),\n\t\t'collection' => array(\n\t\t\t'paths' => 'M 9,5 8,3 H 2 V 17 H 17.999628 V 7.1335653 6.6002417 L 18,5 Z M 17,7 10,7 9.5,6 H 17 Z',\n\t\t),\n\t\t'discover' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'M 9.9824219,2 C 5.5664316,2.0096984 1.9935205,5.5957228 2,10.011719 2.0064677,14.427708 5.5898663,18.003239 10.005859,18 14.421849,17.996766 18.000001,14.415991 18,10 h -1 c 1e-6,3.863706 -3.130436,6.996766 -6.994141,7 C 6.1421506,17.003239 3.006467,13.875423 3,10.011719 2.9935207,6.1472458 6.119906,3.0086206 9.984375,3 13.84809,2.9913574 16.988151,6.1402033 17,10.00391 L 18,10 C 17.985997,5.5847754 14.397662,1.9902763 9.9824219,2 Z',\n\t\t\t\t'M 14 6 L 8 8 L 6 14 L 12 12 L 14 6 z M 9.9980469 9 A 1 1 0 0 1 11 9.9960938 L 10 10 L 11 10 A 1 1 0 0 1 10 11 A 1 1 0 0 1 9 10.001953 A 1 1 0 0 1 9.9980469 9 z ',\n\t\t\t),\n\t\t),\n\t\t'download' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'm 1,14 2,-2 h 3 l -2,2 h 3 v 2 h 6 v -2 h 3 l -2,-2 h 3 l 2,2 v 5 H 1 Z',\n\t\t\t\t'm 9,2 h 2 v 5 h 4 L 10.004062,12 5,7 h 4 z',\n\t\t\t),\n\t\t),\n\t\t'edit' => array(\n\t\t\t'paths' => 'M 14 2 L 3 13 L 2 18 L 7 17 L 18 6 L 14 2 z M 4.1542969 12.847656 L 7.1542969 15.847656 L 6.7441406 16.25 L 3 17 L 3.75 13.244141 L 4.1542969 12.847656 z',\n\t\t),\n\t\t'edit-post' => array(\n\t\t\t'paths' => 'M 16.200136,0.4665753 19.045774,3.2688023 15,7.33 V 18 H 3 V 2 H 14.67 Z M 12.23,8.68 17.6,3.32 16.18,1.9 10.82,7.27 10.11,9.39 Z',\n\t\t),\n\t\t'explore' => array(\n\t\t\t'paths' => 'M 19,1 C 18,1.1498866 13.380424,2.0828325 9,6 5.005332,5.4877578 1.467832,8.314736 1,10 l 3.980469,0.337891 0.191406,0.191406 C 4.718283,11.313642 3.377264,13.16795 3,14 l 3,3 C 6.857373,16.624212 8.7057,15.244967 9.470703,14.828125 L 9.662109,15.019531 9,19 c 2.807886,-0.929894 5.407421,-3.945324 5,-7 3.896605,-4.3808916 4.835966,-10 5,-11 z m -6,4 c 0.942809,0 2.007252,1.0572188 2,2 -0.0071,0.9276997 -1.07032,1.9370473 -1.998047,1.9375 C 12.073291,8.9379532 11.007596,7.9286312 11,7 10.992288,6.0572225 12.057191,5 13,5 Z',\n\t\t),\n\t\t'grid' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'm 8,2 h 4 V 6 H 8 Z',\n\t\t\t\t'm 14,2 h 4 v 4 h -4 z',\n\t\t\t\t'M 2,2 H 6 V 6 H 2 Z',\n\t\t\t\t'm 2,8 h 4 v 4 H 2 Z',\n\t\t\t\t'm 8,8 h 4 v 4 H 8 Z',\n\t\t\t\t'm 14,8 h 4 v 4 h -4 z',\n\t\t\t\t'm 14,14 h 4 v 4 h -4 z',\n\t\t\t\t'm 8,14 h 4 v 4 H 8 Z',\n\t\t\t\t'm 2,14 h 4 v 4 H 2 Z',\n\t\t\t),\n\t\t),\n\t\t'keyboard' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'M 3,8 V 6 h 2 v 2 z',\n\t\t\t\t'M 17.003135,6.0047075 17,11 H 14 V 9 h 1 V 6 c 0,0 1.672723,0.00283 2.003135,0.00471 z',\n\t\t\t\t'M 0,3 V 17 H 20 V 3 Z M 1,4 H 19 V 16 H 1 Z',\n\t\t\t\t'm 3,14 v -2 h 2 v 2 z',\n\t\t\t\t'm 15,14 v -2 h 2 v 2 z',\n\t\t\t\t'M 6,8 V 6 h 2 v 2 z',\n\t\t\t\t'M 9,8 V 6 h 2 v 2 z',\n\t\t\t\t'M 12,8 V 6 h 2 v 2 z',\n\t\t\t\t'M 3,11 V 9 h 4 v 2 z',\n\t\t\t\t'M 8,11 V 9 h 2 v 2 z',\n\t\t\t\t'M 11,11 V 9 h 2 v 2 z',\n\t\t\t\t'm 6,14 v -2 h 8 v 2 z',\n\t\t\t),\n\t\t),\n\t\t'list' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'M 2,2 H 6 V 6 H 2 Z',\n\t\t\t\t'm 2,8 h 4 v 4 H 2 Z',\n\t\t\t\t'm 2,14 h 4 v 4 H 2 Z',\n\t\t\t\t'M 8,2 H 18 V 6 H 8 Z',\n\t\t\t\t'm 8,8 h 10 v 4 H 8 Z',\n\t\t\t\t'm 8,14 h 10 v 4 H 8 Z',\n\t\t\t),\n\t\t),\n\t\t'maximize' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'm 2,2 v 8 H 3 V 3 h 14 v 14 h -7 v 1 h 8 V 2 Z m 0,10 v 6 H 8 V 17 12 H 3 Z m 1,1 h 4 v 4 H 3 Z',\n\t\t\t\t'M 10 5 L 10 6 L 13 6 L 9 10 L 10 11 L 14 7 L 14 10 L 15 10 L 15 5 L 10 5 z',\n\t\t\t),\n\t\t),\n\t\t'menu' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'm 20,10 a 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 2,2 0 0 1 2,2 z',\n\t\t\t\t'm 12,10 a 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 2,2 0 0 1 2,2 z',\n\t\t\t\t'M 4,10 A 2,2 0 0 1 2,12 2,2 0 0 1 0,10 2,2 0 0 1 2,8 2,2 0 0 1 4,10 Z',\n\t\t\t),\n\t\t),\n\t\t'minimize' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'm 2,2 v 8 H 3 V 3 h 14 v 14 h -7 v 1 h 8 V 2 Z m 0,10 v 6 H 8 V 17 12 H 3 Z m 1,1 h 4 v 4 H 3 Z',\n\t\t\t\t'm 9,5 h 1 V 9 L 14,5 14,5 15,6 l -4,4 4,0 V 11 H 9 Z',\n\t\t\t),\n\t\t),\n\t\t'movie' => array(\n\t\t\t'paths' => 'M 0,3 V 5 H 2 V 7 H 0 v 2 h 2 v 2 H 0 v 2 h 2 v 2 H 0 v 2 h 20 v -2 h -2 v -2 h 2 V 11 H 18 V 9 h 2 V 7 L 18,7 V 5 h 2 V 3 Z m 8,4 5,3 -5,3 z',\n\t\t),\n\t\t'person' => array(\n\t\t\t'paths' => 'M8 0c-2.209 0-4 2.239-4 5s1.791 5 4 5 4-2.239 4-5-1.791-5-4-5zm-4.188 10c-2.1.1-3.813 1.9-3.813 4v2h16v-2c0-2.1-1.713-3.9-3.813-4-1.1 1.2-2.588 2-4.188 2-1.6 0-3.088-.8-4.188-2z',\n\t\t),\n\t\t'picture' => array(\n\t\t\t'paths' => 'M 3 1 L 3 19 L 17 19 L 17 1 L 3 1 z M 4 2 L 16 2 L 16 16.5 C 16 14.925 14.715625 13.575 13.140625 13.5 C 12.315625 14.4 11.2 15 10 15 C 8.8004757 15 7.6842785 14.399405 6.859375 13.5 L 6.8574219 13.5 C 5.2833183 13.576029 4 14.925655 4 16.5 L 4 2 z M 10 6 C 8.34325 6 7 7.67925 7 9.75 C 7 11.82075 8.34325 13.5 10 13.5 C 11.65675 13.5 13 11.82075 13 9.75 C 13 7.67925 11.65675 6 10 6 z',\n\t\t),\n\t\t'preview' => array(\n\t\t\t//'paths' => 'M 0 2 L 0 15 L 9 15 L 9 16 L 4 16 L 4 17 L 16 17 L 16 16 L 11 16 L 11 15 L 20 15 L 20 2 L 0 2 z M 1 3 L 19 3 L 19 14 L 1 14 L 1 3 z ',\n\t\t\t'paths' => 'm 0,2 v 13 h 8 v 1 H 3 v 2 h 14 v -2 h -5 v -1 h 8 V 2 Z m 2,2 h 16 v 9 H 2 Z',\n\t\t),\n\t\t'save' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'M 16,2 H 15 V 8 H 5 V 2 H 2 V 18 H 18 V 4 Z m 0,15 H 4 v -7 h 12 z',\n\t\t\t\t'm 5,13 h 10 v 1 H 5 Z',\n\t\t\t\t'm 5,15 h 10 v 1 H 5 Z',\n\t\t\t\t'm 5,11 h 10 v 1 H 5 Z',\n\t\t\t\t'm 12,2 h 2 v 5 h -2 z',\n\t\t\t),\n\t\t),\n\t\t'snapshot' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'm 17.126458,8.706458 c 0.0033,-0.07708 0.0058,-0.154375 0.0058,-0.232291 0,-2.839167 -2.301459,-5.140834 -5.140625,-5.140834 -2.056042,0 -3.829375,1.2075 -4.651459,2.951667 C 6.883508,5.958958 6.319341,5.766042 5.708508,5.766042 c -1.519792,0 -2.751667,1.192083 -2.751667,2.6625 0,0.218333 0.02771,0.430208 0.07896,0.633125 C 1.302292,9.430833 0,10.994167 0,12.874792 c 0,2.154791 1.71,3.791875 3.819375,3.791875 H 16.345 c 2.018542,0 3.655,-1.719375 3.655,-3.975417 0,-1.956458 -1.230625,-3.584583 -2.873542,-3.984792 z',\n\t\t\t),\n\t\t),\n\t\t'tag' => array(\n\t\t\t'paths' => 'm 2,2 c 0,2.3333333 0,4.6666667 0,7 3,3 6,6 9,9 2.333333,-2.333333 4.666667,-4.666667 7,-7 C 15,8 12,5 9,2 6.6666667,2 4.3333333,2 2,2 Z M 6,4 C 7.2987278,3.94904 8.340251,5.3688113 7.910152,6.591797 7.5736107,7.842203 5.9134815,8.426699 4.8710938,7.650391 3.7719354,6.9596289 3.7129981,5.2021896 4.7558628,4.433594 5.1061606,4.1538483 5.5519898,3.9996616 6,4 Z',\n\t\t),\n\t\t'trash' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'M 5,6 V 18 H 15 V 6 Z m 1,1 h 8 V 17 H 6 Z',\n\t\t\t\t'M 7 2 L 7 4 L 4 4 L 4 5 L 16 5 L 16 4 L 13 4 L 13 2 L 7 2 z M 8 3 L 12 3 L 12 4 L 8 4 L 8 3 z',\n\t\t\t\t'm 8,8 h 1 v 8 H 8 Z',\n\t\t\t\t'm 11,8 h 1 v 8 h -1 z',\n\t\t\t),\n\t\t),\n\t\t'upload' => array(\n\t\t\t'paths' => array(\n\t\t\t\t'm 1,14 2,-2 h 3 l -2,2 h 3 v 2 h 6 v -2 h 3 l -2,-2 h 3 l 2,2 v 5 H 1 Z',\n\t\t\t\t'm 10,2 5,5 h -4 v 5 H 9 V 7 H 5 Z',\n\t\t\t),\n\t\t),\n\t);\n\n\t/**\n\t * Filter default SVG icons data.\n\t *\n\t * @since 3.0.0\n\t *\n\t * @param array $icons Icons data.\n\t */\n\t$icons = apply_filters( 'wpmoly/filter/template/default/icons', $icons );\n\n\treturn $icons;\n}", "title": "" }, { "docid": "9f8a54b5bd24c009b8e0779f7fae3ba2", "score": "0.5518647", "text": "public function generatePageIconsCss() {\n\t\t$css = ''; \n\t\t\n\t\t$sourceClasses \t= ClassInfo::subclassesFor('ExternalContentSource');\n\t\t$itemClasses \t= ClassInfo::subclassesFor('ExternalContentItem');\n\t\t$classes \t\t= array_merge($sourceClasses, $itemClasses);\n\t\t\n\t\tforeach($classes as $class) {\n\t\t\t$obj = singleton($class); \n\t\t\t$iconSpec = $obj->stat('icon'); \n\n\t\t\tif(!$iconSpec) continue;\n\n\t\t\t// Legacy support: We no longer need separate icon definitions for folders etc.\n\t\t\t$iconFile = (is_array($iconSpec)) ? $iconSpec[0] : $iconSpec;\n\n\t\t\t// Legacy support: Add file extension if none exists\n\t\t\tif(!pathinfo($iconFile, PATHINFO_EXTENSION)) $iconFile .= '-file.gif';\n\n\t\t\t$iconPathInfo = pathinfo($iconFile); \n\t\t\t\n\t\t\t// Base filename \n\t\t\t$baseFilename = $iconPathInfo['dirname'] . '/' . $iconPathInfo['filename'];\n\t\t\t$fileExtension = $iconPathInfo['extension'];\n\n\t\t\t$selector = \".page-icon.class-$class, li.class-$class > a .jstree-pageicon\";\n\n\t\t\tif(Director::fileExists($iconFile)) {\n\t\t\t\t$css .= \"$selector { background: transparent url('$iconFile') 0 0 no-repeat; }\\n\";\n\t\t\t} else {\n\t\t\t\t// Support for more sophisticated rules, e.g. sprited icons\n\t\t\t\t$css .= \"$selector { $iconFile }\\n\";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\t$css .= \"li.type-file > a .jstree-pageicon { background: transparent url('framework/admin/images/sitetree_ss_pageclass_icons_default.png') 0 0 no-repeat; }\\n}\";\n\n\t\treturn $css;\n\t}", "title": "" }, { "docid": "006adc774382632057e903da273eaa9c", "score": "0.55173194", "text": "function tech_social_icons($home=true){\n\tglobal $tech, $post;\n\t$short_link = home_url().\"/?p=\".$post->ID;\n\t$home_icons = explode(',' , $tech['home_social_icons']);\n\t$single_icons = explode(',' , $tech['single_social_icons']);\n\t$image = get_template_directory_uri() . \"/images/icons\";\n\t$link = get_permalink();\n\t$title = $post->post_title;\n\t$email_title = preg_replace('/&/i', 'and',$title);\n\t$url_title = urlencode($post->post_title);\n\t$excerpt = urlencode(wp_trim_excerpt($post->post_excerpt));\n\t$excerpt_mail = wp_trim_excerpt($post->post_excerpt);\n\t$excerpt_mail = preg_replace(\"/&#?[a-z0-9]{2,8};/i\",\"\",$excerpt_mail);\n\t$home_title = urlencode(get_bloginfo( 'name' ));\n\t$social_links = array(\n\t\t\"Delicious\" => \"<a href=\\\"http://delicious.com/post?url={$link}&amp;title={$url_title}\\\" title=\\\"\" . __('del.icio.us this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/delicious_16.png\\\" alt=\\\"\" . __('del.icio.us this!','techozoic') . \"\\\" /></a>\",\n\t\t\"Digg\" => \"<a href=\\\"http://digg.com/submit?phase=2&amp;url={$link}&amp;title={$url_title} \\\" title=\\\"\" . __('Digg this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/digg_16.png\\\" alt=\\\"\" . __('Digg this!','techozoic') . \"\\\"/></a>\",\n\t\t\"Email\" => \"<a href=\\\"mailto:?subject={$email_title}&amp;body={$excerpt_mail} {$link}\\\" title=\\\"\" . __('Share this by email.','techozoic') . \"\\\"><img src=\\\"{$image}/email_16.png\\\" alt=\\\"\" . __('Share this by email.','techozoic') . \"\\\"/></a>\",\n\t\t\"Facebook\" => \"<a href=\\\"http://www.facebook.com/share.php?u={$link}&amp;t={$url_title}\\\" title=\\\"\" . __('Share on Facebook!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/facebook_16.png\\\" alt=\\\"\" . __('Share on Facebook!','techozoic') . \"\\\"/></a>\",\n\t\t\"LinkedIn\" => \"<a href =\\\"http://www.linkedin.com/shareArticle?mini=true&amp;url={$link}&amp;title={$url_title}&amp;summary={$excerpt}&amp;source={$home_title}\\\" title=\\\"\" . __('Share on LinkedIn!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/linkedin_16.png\\\" alt=\\\"\" . __('Share on LinkedIn!','techozoic') . \"\\\" /></a>\",\n\t\t\"MySpace\" => \"<a href=\\\"http://www.myspace.com/Modules/PostTo/Pages/?u={$link}&amp;t={$url_title}\\\" title=\\\"\" . __('Share on Myspace!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/myspace_16.png\\\" alt=\\\"\" . __('Share on Myspace!','techozoic') . \"\\\"/></a>\",\n\t\t\"NewsVine\" => \"<a href=\\\"http://www.newsvine.com/_tools/seed&amp;save?u={$link}\\\" title=\\\"\" . __('Share on NewsVine!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/newsvine_16.png\\\" alt=\\\"\" . __('Share on NewsVine!','techozoic') . \"\\\"/></a>\",\n\t\t\"StumbleUpon\" => \"<a href=\\\"http://www.stumbleupon.com/submit?url={$link}&amp;title={$url_title}\\\" title=\\\"\" . __('Stumble Upon this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/stumbleupon_16.png\\\" alt=\\\"\" . __('Stumble Upon this!','techozoic') . \"\\\"/></a>\",\n\t\t\"Twitter\" => \"<a href=\\\"http://twitter.com/home?status=Reading%20{$url_title}%20on%20{$short_link}\\\" title=\\\"\" . __('Tweet this!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/twitter_16.png\\\" alt=\\\"\" . __('Tweet this!','techozoic') . \"\\\"/></a>\",\n\t\t\"Reddit\" => \"<a href=\\\"http://reddit.com/submit?url={$link}&amp;title={$url_title}\\\" title=\\\"\" . __('Share on Reddit!','techozoic') . \"\\\" target=\\\"_blank\\\"><img src=\\\"{$image}/reddit_16.png\\\" alt=\\\"\" . __('Share on Reddit!','techozoic') . \"\\\" /></a>\",\n\t\t\"RSS Icon\" => \"<a href=\\\"\".get_post_comments_feed_link().\"\\\" title=\\\"\".__('Subscribe to Feed','techozoic').\"\\\"><img src=\\\"{$image}/rss_16.png\\\" alt=\\\"\" . __('RSS 2.0','techozoic') . \"\\\"/></a>\");\n\tif ($home == true){\n\t\tforeach ($home_icons as $soc){\n\t\t\techo $social_links[$soc] .\"&nbsp;\";\n\t\t}\n\t} else {\n\t\tforeach ($single_icons as $soc){\n\t\t\techo $social_links[$soc] .\"&nbsp;\";\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3fb07c18eacd383e8a414e49847d49ee", "score": "0.5515616", "text": "public function getIcons($iconText)\n {\n // static::$message .= \"<br/>getIcons()!!!\";\n\n $iconTexts = [\"clear-day\", \"clear-night\", \"rain\", \"snow\", \"sleet\", \"wind\", \"fog\", \"cloudy\", \"partly-cloudy-day\", \"partly-cloudy-night\"];\n //$icons = [\"fas fa-sun\", \"fas fa-moon\", [\"fas fa-cloud-rain\", \"fas fa-umbrella\"], \"fas fa-snowflake\", [\"fas fa-snowflake\", \"fas fa-cloud-rain\"], \"fas fa-wind\", \"fas fa-smog\", \"fas fa-cloud\", \"fas fa-cloud-sun\", \"fas fa-cloud-moon\"];\n $icons2 = [\"wi wi-day-sunny\", \"wi wi-night-clear\", [\"wi wi-rain\", \"wi wi-umbrella\"], \"wi wi-snow\", [\"wi wi-snow\", \"wi wi-rain\"], \"wi wi-strong-wind\", \"wi wi-fog\", \"wi wi-cloud\", \"wi wi-day-cloudy\", \"wi wi-night-alt-cloudy\"];\n\n // // Test för att se vilka ikoner som finns\n // foreach ($icons as $key => $value) {\n // if (is_array($value)) {\n // foreach ($value as $key => $icon) {\n // echo \"\\n{$icon}\";\n // echo \"<i class='{$icon}'></i>\";\n // }\n // } else {\n // echo \"\\n{$value}\";\n // echo \"<i class='{$value}'></i>\";\n // }\n // }\n\n // // Test för att se vilka ikoner som finns\n // foreach ($icons2 as $key => $value) {\n // if (is_array($value)) {\n // foreach ($value as $key => $icon) {\n // echo \"\\n{$icon}\";\n // echo \"<i class='{$icon}'></i>\";\n // }\n // } else {\n // echo \"\\n{$value}\";\n // echo \"<i class='{$value}'></i>\";\n // }\n // }\n\n // Return wi icon\n foreach ($iconTexts as $key => $value) {\n if ($iconText == $value) {\n return $icons2[$key];\n }\n }\n }", "title": "" }, { "docid": "1703e6036a35d0bab7a260c2b1a02b40", "score": "0.5513268", "text": "public function get_icon_url() : string;", "title": "" }, { "docid": "30ee96ba203f3dd556e4b6440b836ad8", "score": "0.5512961", "text": "function wp_mime_type_icon($mime = 0)\n{\n}", "title": "" }, { "docid": "760a8b3f44c30155ab934be54cf194aa", "score": "0.55093133", "text": "protected function iconHelp()\n {\n return 'For more icons please see <a href=\"http://fontawesome.io/icons/\" target=\"_blank\">http://fontawesome.io/icons/</a>';\n }", "title": "" }, { "docid": "5ff3426a139fbbc0ed9edf2136ca8391", "score": "0.55075294", "text": "public function icons(array &$config)\n {\n $pageId = $config['row']['pid'];\n $pluginName = 'tx_teasermanager.';\n $items = $this->itemProvider->getAvailableItems($pageId, 'icons', $pluginName);\n\n foreach ($items as $icon) {\n $icons = [\n htmlspecialchars($icon[0]),\n $icon[1]\n ];\n array_push($config['items'], $icons);\n }\n }", "title": "" }, { "docid": "74ec6d4243845ca9e0c6e84a43376f7c", "score": "0.5499937", "text": "function sparkling_social_icons() {\n\t\tif ( has_nav_menu( 'social-menu' ) ) {\n\t\t\twp_nav_menu(\n\t\t\t\tarray(\n\t\t\t\t\t'theme_location' => 'social-menu',\n\t\t\t\t\t'container' => 'nav',\n\t\t\t\t\t'container_id' => 'menu-social',\n\t\t\t\t\t'container_class' => 'social-icons',\n\t\t\t\t\t'menu_id' => 'menu-social-items',\n\t\t\t\t\t'menu_class' => 'social-menu',\n\t\t\t\t\t'depth' => 1,\n\t\t\t\t\t'fallback_cb' => '',\n\t\t\t\t\t'link_before' => '<i class=\"social_icon\"><span>',\n\t\t\t\t\t'link_after' => '</span></i>',\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "9cf2eeb56a5fb2171664ddcbc30442c2", "score": "0.548932", "text": "function toolbelt_social_menu_icons() {\n\n\t$social_links_icons = array(\n\t\t'behance.net' => 'behance',\n\t\t// 'codepen.io' => 'codepen',\n\t\t'deviantart.com' => 'deviantart',\n\t\t'dribbble.com' => 'dribbble',\n\t\t'facebook.com' => 'facebook',\n\t\t'flickr.com' => 'flickr',\n\t\t// 'foursquare.com' => 'foursquare',\n\t\t'github.com' => 'github',\n\t\t'instagram.com' => 'instagram',\n\t\t'linkedin.com' => 'linkedin',\n\t\t'mailto:' => 'email',\n\t\t'medium.com' => 'medium',\n\t\t'pinterest.com' => 'pinterest',\n\t\t// 'getpocket.com' => 'get-pocket',\n\t\t'reddit.com' => 'reddit',\n\t\t'skype.com' => 'skype',\n\t\t'skype:' => 'skype',\n\t\t// 'slideshare.net' => 'slideshare',\n\t\t'snapchat.com' => 'snapchat',\n\t\t'soundcloud.com' => 'soundcloud',\n\t\t'tumblr.com' => 'tumblr',\n\t\t'twitch.tv' => 'twitch',\n\t\t'twitter.com' => 'twitter',\n\t\t'vimeo.com' => 'vimeo',\n\t\t'vk.com' => 'vk',\n\t\t// 'weibo.com' => 'weibo',\n\t\t'wordpress.org' => 'wordpress',\n\t\t'wordpress.com' => 'wordpress',\n\t\t// 'yelp.com' => 'yelp',\n\t\t'youtube.com' => 'youtube',\n\t);\n\n\treturn apply_filters( 'toolbelt_social_menu_icons', $social_links_icons );\n\n}", "title": "" }, { "docid": "09f4fcb84bd9edb4cbf715954eb4c4c5", "score": "0.547665", "text": "protected function get__icon()\n\t{\n\t\treturn 'cogs';\n\t}", "title": "" }, { "docid": "297cef664f95047d268a4e7b43e90a05", "score": "0.5472559", "text": "protected function buildIcon($attributes)\n {\n return '<i '.$attributes.'></i>';\n }", "title": "" }, { "docid": "ed0b9b1e206494ab7ea2f3dc7806cad8", "score": "0.54725546", "text": "function cyberchimps_header_social_icons() {\n\n\t// get the design of the icons to apply the right class\n\t$design = cyberchimps_get_option( 'theme_backgrounds', 'default' );\n\n\t// create array of social icons to loop through to check if they are set and add title key to\n\t// social networks with names different to key\n\t$social['twitterbird']['set'] = cyberchimps_get_option( 'social_twitter', 'checked' );\n\t$social['twitterbird']['title'] = 'twitter';\n\t$social['twitterbird']['url'] = cyberchimps_get_option( 'twitter_url' );\n\t$social['facebook']['set'] = cyberchimps_get_option( 'social_facebook', 'checked' );\n\t$social['facebook']['url'] = cyberchimps_get_option( 'facebook_url' );\n\t$social['googleplus']['set'] = cyberchimps_get_option( 'social_google', 'checked' );\n\t$social['googleplus']['url'] = cyberchimps_get_option( 'google_url' );\n\t$social['flickr']['set'] = cyberchimps_get_option( 'social_flickr' );\n\t$social['flickr']['url'] = cyberchimps_get_option( 'flickr_url' );\n\t$social['pinterest']['set'] = cyberchimps_get_option( 'social_pinterest' );\n\t$social['pinterest']['url'] = cyberchimps_get_option( 'pinterest_url' );\n\t$social['linkedin']['set'] = cyberchimps_get_option( 'social_linkedin' );\n\t$social['linkedin']['url'] = cyberchimps_get_option( 'linkedin_url' );\n\t$social['youtube']['set'] = cyberchimps_get_option( 'social_youtube' );\n\t$social['youtube']['url'] = cyberchimps_get_option( 'youtube_url' );\n\t$social['map']['set'] = cyberchimps_get_option( 'social_googlemaps' );\n\t$social['map']['title'] = 'google maps';\n\t$social['map']['url'] = cyberchimps_get_option( 'googlemaps_url' );\n\t$social['email']['set'] = cyberchimps_get_option( 'social_email' );\n\t$social['email']['url'] = 'mailto:' . cyberchimps_get_option( 'email_url' );\n\t$social['rss']['set'] = cyberchimps_get_option( 'social_rss' );\n\t$social['rss']['url'] = cyberchimps_get_option( 'rss_url' );\n\t$social['instagram']['set'] = cyberchimps_get_option( 'social_instagram' );\n\t$social['instagram']['url'] = cyberchimps_get_option( 'instagram_url' );\n\t$social['snapchat']['set'] = cyberchimps_get_option( 'social_snapchat' );\n\t$social['snapchat']['url'] = cyberchimps_get_option( 'snapchat_url' );\n\n\t$output = '';\n\n\t// get the blog title to add to link title\n\t$link_title = get_bloginfo( 'title' );\n\n\t// Loop through the $social variable\n\tforeach ( $social as $key => $value ) {\n\n\t\t// Check that the social icon has been set\n\t\tif ( ! empty( $value['set'] ) ) {\n\n\t\t\t// check if title is set and use it otherwise use key as title\n\t\t\t$title = ( isset( $social[ $key ]['title'] ) ) ? $social[ $key ]['title'] : $key;\n\n\t\t\t// Create the output\n\t\t\t$output .= '<a href=\"' . esc_url( $social[ $key ]['url'] ) . '\"' . ( 'email' != $key ? ' target=\"_blank\"' : '' )\n\t\t\t\t. ' title=\"' . esc_attr( $link_title . ' ' . ucwords( $title ) ) . '\" class=\"symbol ' . $key . '\"></a>';\n\t\t}\n\t}\n\n\t// Echo to the page\n\t?>\n\t<div id=\"social\">\n\t\t<div class=\"<?php echo $design; ?>-icons\">\n\t\t\t<?php echo $output; ?>\n\t\t</div>\n\t</div>\n\n\t<?php\n}", "title": "" }, { "docid": "9bd1e2c24a8552295733b68f21a27b94", "score": "0.5466602", "text": "public function __construct() {\n parent::__construct(\n 'tb_social_icons', // Base ID\n __( 'Lwhh: Social Icons', 'philosophy' ), // Name\n array( 'description' => __( 'Social Icons', 'philosophy' ), ) // Args\n );\n }", "title": "" }, { "docid": "dd5756e744043874874652e09e42c017", "score": "0.54595166", "text": "public function viewIconsAction() {\n\t\t$currentPageID = $this->pageUid;\n\t\t$fontUid = $this->request->getArgument('uid');\n\n\t\t$assignedValues = array(\n\t\t\t'page' => $currentPageID,\n\t\t\t'fonts' => $this->fontRepository->findAllInPid($currentPageID),\n\t\t\t'countfonts' => $this->fontRepository->findAllInPid($currentPageID)->count(),\n\t\t\t'activeFontUid' => $fontUid,\n\t\t\t'activeFont' => $this->fontRepository->findByUid($fontUid),\n\t\t);\n\t\t\n\t\t$this->view->assignMultiple($assignedValues);\n\t}", "title": "" }, { "docid": "ee54cf4470fb4d19dcba8d9f3ab8c529", "score": "0.54560196", "text": "public function getClustersIcon();", "title": "" }, { "docid": "e88a5599a844aff2005b73a55d2cd1b2", "score": "0.54523355", "text": "public function icons() {\n /*\n * TEMPLATE QUE SERÁ USADO PELO MÓDULO DO SISTEMA\n */\n $this->dados['_conteudo_masterPageIframe'] = $this->router->fetch_class() . '/vIcons';\n $this->load->view('vMasterPageIframe', $this->dados);\n }", "title": "" }, { "docid": "7f1ccc079f4c2d35f0711c5360a5097c", "score": "0.544335", "text": "public function icon()\n\t{\n\t\t$input = [\n\t\t\t[icon('plane'), \"icon('plane');\", ],\n\t\t\t[icon('bolt'), \"icon('bolt');\", ],\n\t\t\t[icon('bolt', '#FF00FF'), \"icon('bolt', '#FF00FF');\", ],\n\t\t\t[icon('info', 'info'), \"icon('info', 'info');\", ],\n\t\t\t[icon(true), \"icon(true);\", ],\n\t\t\t[icon(false), \"icon(false);\", ],\n\t\t];\n\t\t$data = array_reduce($input, function ($output, $arr)\n\t\t{\n\t\t\t$output[] = (object) ['code' => $arr[1], 'icon' => $arr[0]];\n\t\t\treturn $output;\n\t\t}, []);\n\t\treturn view('sketchpad::help/helpers/icon', compact('data'));\n\t}", "title": "" }, { "docid": "c9780d33cf198e7294ed52e31993641d", "score": "0.5439644", "text": "function __tstb_khaki_icon() {\n\n\t\treturn plugins_url( 'thesis-toolbar/images/icon-thesis-khaki.png', dirname( __FILE__ ) );\n\t}", "title": "" }, { "docid": "beaa5eb3e26cb4a2d84725705cf451a6", "score": "0.5433693", "text": "public function icons()\n\t{\n\t\t$tpl = new view;\n\n\t\t/*** turn caching on for this page ***/\n\t\t$tpl->setCaching(true);\n\n\t\t/*** set the template dir ***/\n\t\t$tpl->setTemplateDir(APP_PATH . '/modules/about/views');\n\n\t\t/*** a view variable ***/\n\t\t$this->view->title = 'Icons';\n\n\t\t/*** the cache id is based on the file name ***/\n\t\t$cache_id = md5( 'about/icons.phtml' );\n\n\t\t/*** fetch the template ***/\n\t\t$this->content = $tpl->fetch( 'icons.phtml', $cache_id);\n\t}", "title": "" }, { "docid": "93adb45c02f8568be43ab9b01c8c7afd", "score": "0.5432827", "text": "public function getIcon() {}", "title": "" }, { "docid": "61fdb557e3ab91a743e6a531add56767", "score": "0.5431066", "text": "public function header_social_icons_logic() {\n\n\t\t global $woo_options;\n\n\t\t $html = '';\n\n\t\t $template_directory = get_stylesheet_directory_uri();\n\n\t\t $profiles = array(\n\t\t 'twitter' => __( 'Follow us on Twitter' , 'canvas-advanced-addons-extended' ),\n\t\t 'facebook' => __( 'Connect on Facebook' , 'canvas-advanced-addons-extended' ),\n\t\t 'youtube' => __( 'Watch on YouTube' , 'canvas-advanced-addons-extended' ),\n\t\t 'flickr' => __( 'See photos on Flickr' , 'canvas-advanced-addons-extended' ),\n\t\t 'linkedin' => __( 'Connect on LinkedIn' , 'canvas-advanced-addons-extended' ),\n\t\t 'delicious' => __( 'Discover on Delicious' , 'canvas-advanced-addons-extended' ),\n\t\t 'googleplus' => __( 'View Google+ profile' , 'canvas-advanced-addons-extended' )\n\t\t );\n\n if ( isset( $woo_options['woo_nav_social_icon_type'] ) && ( 'false' == $woo_options['woo_nav_social_icon_type'] ) ) {\n\n\t\t // Open DIV tag.\n\t\t $html .= '<div id=\"social-links\" class=\"social-links\">' . \"\\n\";\n\n\t\t foreach ( $profiles as $key => $text ) {\n\t\t \tif ( isset( $woo_options['woo_connect_' . $key] ) && $woo_options['woo_connect_' . $key] != '' ) {\n\t\t \t\t//$html .= '<a class=\"social-icon-' . $key . '\" target=\"_blank\" href=\"' . $woo_options['woo_connect_' . $key] . '\" title=\"' . esc_attr( $text ) . '\"></a>' . \"\\n\";\n\t\t \t\t$html .= '<a target=\"_blank\" href=\"' . $woo_options['woo_connect_' . $key] . '\" title=\"' . esc_attr( $text ) . '\"><img src=\"'. $this->assets_url . 'img/social/' . $key . '.png\"></a>' . \"\\n\";\n\t\t \t}\n\t\t }\n\n\t\t // Add a custom RSS icon, linking to Feedburner or default RSS feed.\n\t\t $rss_url = get_bloginfo_rss( 'rss2_url' );\n\t\t $rss_text = __( 'Subscribe to our RSS feed', 'canvas-advanced-addons-extended' );\n\t\t if ( isset( $woo_options['woo_feed_url'] ) && ( $woo_options['woo_feed_url'] != '' ) ) { $rss_url = $woo_options['woo_feed_url']; }\n\n\t\t $html .= '<a href=\"' . $rss_url . '\" title=\"' . esc_attr( $rss_text ) . '\"><img src=\"'. $this->assets_url . 'img/social/rss.png\"></a>' . \"\\n\";\n\n // Add a email icon, linking to your contacts page.\n\t\t $email_text = __( 'Contact us!', 'canvas-advanced-addons-extended' );\n if ( isset( $woo_options['woo_subscribe_email'] ) && ( $woo_options['woo_subscribe_email'] ) ) { $email_url = $woo_options['woo_subscribe_email']; } \n \n\t\t $html .= '<a href=\"' . $email_url . '\" title=\"' . esc_attr( $email_text ) . '\"><img src=\"'. $this->assets_url . 'img/social/email.png\"></a>' . \"\\n\";\n\n\t\t $html .= '</div><!--/#social-links .social-links -->' . \"\\n\";\n\n\t\t echo $html;\t\n\n }\n\n if ( isset( $woo_options['woo_nav_social_icon_type'] ) && ( 'true' == $woo_options['woo_nav_social_icon_type'] ) ) {\n\n\t $class = '';\n \n if ( isset( $woo_options['woo_header_cart_link'] ) && ( 'true' == $woo_options['woo_header_cart_link'] ) ) {\n $class = ' cart-enabled';\n }\n\n ?> <ul class=\"rss fr<?php echo $class; ?>\">\n\n <?php \n if ( ( isset( $woo_options['woo_subscribe_email'] ) ) && ( $woo_options['woo_subscribe_email'] ) ) { ?>\n \t\t <li class=\"sub-email\"><a href=\"<?php echo esc_url( $woo_options['woo_subscribe_email'] ); ?>\"></a></li>\n\t\t <?php } ?>\n\n \t\t <?php \n if ( isset( $woo_options['woo_nav_rss'] ) && ( $woo_options['woo_nav_rss'] == 'true' ) ) { ?>\n \t <li class=\"sub-rss\"><a href=\"<?php if ( $woo_options['woo_feed_url'] ) { echo esc_url( $woo_options['woo_feed_url'] ); } else { echo esc_url( get_bloginfo_rss( 'rss2_url' ) ); } ?>\"></a></li>\n\t\t <?php } ?>\n\n <?php \n if ( $woo_options['woo_connect_twitter' ] != \"\" ) { ?>\n <li class=\"twitter\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_twitter'] ); ?>\" title=\"Twitter\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_facebook' ] != \"\" ) { ?>\n <li class=\"facebook\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_facebook'] ); ?>\" title=\"Facebook\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_youtube' ] != \"\" ) { ?>\n \t\t <li class=\"youtube\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_youtube'] ); ?>\" title=\"YouTube\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_flickr' ] != \"\" ) { ?>\n <li class=\"flickr\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_flickr'] ); ?>\" title=\"Flickr\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_linkedin' ] != \"\" ) { ?>\n <li class=\"linkedin\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_linkedin'] ); ?>\" title=\"LinkedIn\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_delicious' ] != \"\" ) { ?>\n <li class=\"delicious\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_delicious'] ); ?>\" title=\"Delicious\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_googleplus' ] != \"\" ) { ?>\n <li class=\"googleplus\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_googleplus'] ); ?>\" title=\"Google+\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_dribbble' ] != \"\" ) { ?>\n <li class=\"dribbble\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_dribbble'] ); ?>\" title=\"Dribbble\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_instagram' ] != \"\" ) { ?>\n <li class=\"instagram\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_instagram'] ); ?>\" title=\"Instagram\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_vimeo' ] != \"\" ) { ?>\n <li class=\"vimeo\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_vimeo'] ); ?>\" title=\"Vimeo\"></a></li>\n <?php } \n\n if ( $woo_options['woo_connect_pinterest' ] != \"\" ) { ?>\n <li class=\"pinterest\"><a target=\"_blank\" href=\"<?php echo esc_url( $woo_options['woo_connect_pinterest'] ); ?>\" title=\"Pinterest\"></a></li>\n \t <?php } ?>\n\t </ul>\n <?php\n \n\t} // Boostrap Options\n }", "title": "" }, { "docid": "073fa94caf23a300c1ac5088d675cbc2", "score": "0.54229903", "text": "function get_podcast_social_icons($profiles){\n\n $profiles = get_field('social_profiles', get_the_ID());\n \n $output = '';\n\n if(!empty($profiles) && is_array($profiles)){\n\t $output .= '<div class=\"podcast_social_profiles_wrapper\"><ul class=\"site_social_profiles\">';\n\t \n\t if(!empty($profiles['instagram'])){\n\t $output .= '<li><a href=\"'. $profiles['instagram'] .'\" title=\"Instagram\" target=\"_blank\"><i class=\"fa fa-instagram\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['facebook'])){\n\t $output .= '<li><a href=\"'. $profiles['facebook'] .'\" title=\"Facebook\" target=\"_blank\"><i class=\"fa fa-facebook\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['twitter'])){\n\t $output .= '<li><a href=\"'. $profiles['twitter'] .'\" title=\"Twitter\" target=\"_blank\"><i class=\"fa fa-twitter\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['youtube'])){\n\t $output .= '<li><a href=\"'. $profiles['youtube'] .'\" title=\"Youtube\" target=\"_blank\"><i class=\"fa fa-youtube\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['pinterest'])){\n\t $output .= '<li><a href=\"'. $profiles['pinterest'] .'\" title=\"Pinterest\" target=\"_blank\"><i class=\"fa fa-instagram\"></i></a></li>';\n\t }\n\t \n\t if(!empty($profiles['tiktok'])){\n\t \n\t $tiktok_logo = get_template_directory_uri(). '/assets/images/tiktok.svg' ;\n\t \n\t $output .= '<li><a href=\"'. $profiles['tiktok'] .'\" title=\"Tiktok\" target=\"_blank\"><img src=\"' . $tiktok_logo . '\"></a></li>';\n\t }\n\t \n\t if(!empty($profiles['thumbr'])){\n\t $output .= '<li><a href=\"'. $profiles['thumbr'] .'\" title=\"Thumbr\" target=\"_blank\"><i class=\"fa fa-tumblr\"></i></a></li>';\n\t }\n\t \n\t $output .= '</div></ul>';\n\t}\n\t\n\t\n\treturn $output;\n\n}", "title": "" }, { "docid": "f5ccb7b3ba5273bb59a6ea375b3f347d", "score": "0.5422412", "text": "function icon ($icon = null);", "title": "" }, { "docid": "ad879f82651859c02b0bae6be953d6be", "score": "0.5421651", "text": "public function jdev_test_icon() {\n \n if( $this->jdevPostIcon == '' ) {\n $this->jdevPostIconStr = false;\n } else {\n $this->jdevPostIconStr = get_template_directory_uri() . '/images/' . $this->jdevPostIcon;\n }\n }", "title": "" }, { "docid": "1180b4903bcafc451466d15ee1a64922", "score": "0.541973", "text": "function icon_shortcode_handler($atts){\n switch ($atts['img']) {\n case \"tip\":\n $output = \"<img src=\\\"/wp-content/plugins/recipe-icons/img/Tip.gif\\\" alt=\\\"!\\\" width=\\\"17\\\" height=\\\"21\\\">\";\n break;\n case \"warning\":\n $output = \"<img src=\\\"/wp-content/plugins/recipe-icons/img/Becareful.gif\\\" alt=\\\"!\\\" width=\\\"17\\\" height=\\\"21\\\">\";\n break;\n case \"serve\":\n $nb = $atts['nb'];\n $output = str_repeat(\"<img src=\\\"/wp-content/plugins/recipe-icons/img/serve.gif\\\" alt=\\\"serve\\\" width=\\\"19\\\" height=\\\"19\\\">\",$nb);\n break;\n case \"star\":\n $nb = $atts['nb'];\n $output = str_repeat(\"<img src=\\\"/wp-content/plugins/recipe-icons/img/star.gif\\\" alt=\\\"Star\\\" width=\\\"14\\\" height=\\\"14\\\">\",$nb);\n break; \n }\n return $output;\n}", "title": "" }, { "docid": "1af5d7cb9b1421dc7b0d96fb890fff15", "score": "0.5417716", "text": "public function iconUrl();", "title": "" }, { "docid": "5426de66eb0f18a58fba638fe9385848", "score": "0.54171395", "text": "function add_menu_icons_styles(){\n?>\n<!-- http://melchoyce.github.io/dashicons/ -->\n<style>\n/*Custom post type Events*/\n#adminmenu .menu-icon-events div.wp-menu-image:before {\ncontent: '\\f145';\n}\n\n/*Custom post type News*/\n#adminmenu .menu-icon-news div.wp-menu-image:before {\ncontent: \"\\f163\";\n}\n\n</style>\n \n<?php\n}", "title": "" }, { "docid": "e64ff3820c042212c6dd7aca9f1ae7a3", "score": "0.5409085", "text": "public function displayIcon()\n {\n if ( get_the_title() == 'Property Law' ) {\n echo $this->home;\n } elseif ( get_the_title() == 'Divorce And Family Law' ) {\n echo $this->family;\n } elseif ( get_the_title() == 'Criminal Law' ) {\n echo $this->criminal;\n } elseif ( get_the_title() == 'Frequently Asked Questions' ) {\n echo $this->comments;\n } elseif ( get_the_title() == 'Civil Law' || get_the_title() == 'Practice Areas' ) {\n echo $this->justice;\n } elseif ( get_the_title() == 'Business Law' || get_the_title() == 'About Mdanjelwa Attorneys' ) {\n echo $this->business;\n } else {\n echo $this->correspondent;\n }\n }", "title": "" }, { "docid": "a5cd436135d7b9d930a2de853a1a320b", "score": "0.5409079", "text": "function alpha_preprocess_forum_list(&$variables) {\n foreach ($variables['forums'] as $key => $term) {\n $term_data = taxonomy_term_load($term->tid);\n if ($icon = field_get_items('taxonomy_term', $term_data, 'field_icon')) {\n $variables['forums'][$key]->awesome_icon = $icon[0]['safe_value'];\n }\n $variables['forums'][$key]->time = isset($variables['forums'][$key]->last_post->created) ? format_interval(REQUEST_TIME - $variables['forums'][$key]->last_post->created) : '';\n }\n}", "title": "" }, { "docid": "d1fc4f588793e7dfa8d6616d19c88275", "score": "0.5406673", "text": "public function renderIcon($attrs);", "title": "" }, { "docid": "ca8f5827c9817668a87dc09439876972", "score": "0.5402279", "text": "function theme_action_icon($url, $display, $text) {\n\tif ('yes' !== setting_fetch('menu_icons'))\n\t{\n\t\t$display = $text;\n\t\t$class = \"action-text\";\n\t} else {\n\t\t$class = \"action\";\n\t}\n\n\t// Maps open in a new tab\n\tif ($text == 'Location')\n\t{\n\t\treturn \"<a href='$url' target='\" . get_target() . \"' class='{$class}'>{$display}</a>\";\n\t}\n\n\t//\tVerified ticks & RT notifications don't need to be linked\n\tif (\"Verified\" == $text || \"retweeted\" == $text)\n\t{\n\t\treturn \"<span class='{$class}' title='{$text}'>{$display}</span>\";\n\t}\n\n // if (0 === strpos($image_url, \"images/\"))\n // {\n // return \"<a href='$url'><img src='$image_url' alt='$text' /></a>\";\n // }\n\n return \"<a href='{$url}' class='{$class}' title='{$text}'>{$display}</a>\";\n\t\n}", "title": "" }, { "docid": "181342823230f41b2c869f9acfb0c81e", "score": "0.54011333", "text": "function member_topic() {\n\n $labels = array(\n 'name' => _x( 'Member Topics', 'Taxonomy General Name', 'text_domain' ),\n 'singular_name' => _x( 'Member Topic', 'Taxonomy Singular Name', 'text_domain' ),\n 'menu_name' => __( 'Member Topic', 'text_domain' ),\n 'all_items' => __( 'All Items', 'text_domain' ),\n 'parent_item' => __( 'Parent Item', 'text_domain' ),\n 'parent_item_colon' => __( 'Parent Item:', 'text_domain' ),\n 'new_item_name' => __( 'New Member Topic', 'text_domain' ),\n 'add_new_item' => __( 'Add New Member Topic', 'text_domain' ),\n 'edit_item' => __( 'Edit Member Topic', 'text_domain' ),\n 'update_item' => __( 'Update Member Topic', 'text_domain' ),\n 'view_item' => __( 'View Member Topic', 'text_domain' ),\n 'separate_items_with_commas' => __( 'Separate items with commas', 'text_domain' ),\n 'add_or_remove_items' => __( 'Add or remove Member Topic', 'text_domain' ),\n 'choose_from_most_used' => __( 'Choose from the most used Member Topic', 'text_domain' ),\n 'popular_items' => __( 'Popular Member Topic', 'text_domain' ),\n 'search_items' => __( 'Search Member Topics', 'text_domain' ),\n 'not_found' => __( 'Not Found', 'text_domain' ),\n 'no_terms' => __( 'No items', 'text_domain' ),\n 'items_list' => __( 'Items list', 'text_domain' ),\n 'items_list_navigation' => __( 'Items list navigation', 'text_domain' ),\n );\n $args = array(\n 'labels' => $labels,\n 'hierarchical' => true,\n 'public' => true,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'show_in_nav_menus' => true,\n 'show_tagcloud' => true,\n );\n register_taxonomy( 'member_topic', array( 'member_resources', 'discussions' ), $args );\n\n}", "title": "" }, { "docid": "65045a4d39a7e1cc44aead885a74ecbb", "score": "0.5399167", "text": "function emoticons_confightml($pack) {\n\t\t$GLOBALS[\"JOSC_emoticon\"] = array(); /* reset ! */\n\t\t$_emoticons_path = JURI::root().\"components/com_comment/joscomment/emoticons/$pack/images\";\n\n\n\t\t$file = JPATH_SITE.DS.'components'.DS.'com_comment'.DS.'joscomment'.DS.'emoticons'.DS.$pack.DS.'index.php';\n\t\tif (file_exists($file)) {\n\t\t\trequire_once($file);\n\t\t\trequire_once(JPATH_SITE.DS.'components'.DS.'com_comment'.DS.'classes'.DS. 'joomlacomment' .DS .'JOSC_form.php');\n\n\t\t\t$form = new JOSC_form(null);\n\t\t\t$form->setSupport_emoticons($this->config->_support_emoticons);\n\t\t\t$form->setEmoticons_path($_emoticons_path);\n\t\t\t$form->setEmoticonWCount($this->config->_emoticon_wcount);\n\t\t\treturn $form->emoticons(false);\n\t\t}\n\t\treturn \"\";\n\n\t}", "title": "" }, { "docid": "9ed502914709c57bcf35f6e1b091ed64", "score": "0.5387355", "text": "function get_terms_icons( $post_id, $taxonomy ) {\n\t$terms = wp_get_post_terms( $post_id, $taxonomy );\n\t$arr = array();\n\tforeach( $terms as $obj ){\n\t\t$the_icon = get_field('event_type_icon', $obj->taxonomy . '_' . $obj->term_id);\n\t\t$icon_horizontal = get_field('event_type_horizontal', $obj->taxonomy . '_' . $obj->term_id);\n\t\t$icon_vertical = get_field('event_type_vertical', $obj->taxonomy . '_' . $obj->term_id);\n\t\t$icon_rotation = get_field('event_type_rotation', $obj->taxonomy . '_' . $obj->term_id);\n\t\t$icon_scale = get_field('event_type_scale', $obj->taxonomy . '_' . $obj->term_id);\n\t\t\n\t\t$icon_attributes = [\n\t\t\t'the_icon' => $the_icon, \n\t\t\t'icon_x' => $icon_horizontal, \n\t\t\t'icon_y' => $icon_vertical, \n\t\t\t'icon_rotation' => $icon_rotation, \n\t\t\t'icon_scale' => $icon_scale\n\t\t];\n\n\t\t#echo $the_icon;\n\t\tarray_push( $arr, $icon_attributes );\n\t}\n\treturn $arr;\n}", "title": "" }, { "docid": "63a6b98ecdbd19fb7fe7f34bc8a612fe", "score": "0.53828335", "text": "function gvf_print_icon( $icon, $args = array() ) {\n\n gvf_get_template( 'icon-'.$icon.'.php', $args, 'images/icons' );\n}", "title": "" }, { "docid": "a92352f6431234e51ac0eeec861bda13", "score": "0.5378403", "text": "function cpt_icons() {\n\n\t?>\n\t<style type=\"text/css\" media=\"screen\">\n\t\t#menu-posts-interests .wp-menu-image {\n\t\t\tbackground: url(<?php echo get_stylesheet_directory_uri(); ?>/resources/cpt-interests.png) no-repeat 6px -17px !important;\n\t\t}\n\t\t#menu-posts-leadership .wp-menu-image {\n\t\t\tbackground: url(<?php echo get_stylesheet_directory_uri(); ?>/resources/cpt-leadership.png) no-repeat 6px -17px !important;\n\t\t}\n\t\t#menu-posts-updates .wp-menu-image {\n\t\t\tbackground: url(<?php echo get_stylesheet_directory_uri(); ?>/resources/cpt-updates.png) no-repeat 6px -17px !important;\n\t\t}\n\t\t#menu-posts-interests:hover .wp-menu-image, #menu-posts-interests.wp-has-current-submenu .wp-menu-image,\n\t\t#menu-posts-leadership:hover .wp-menu-image, #menu-posts-leadership.wp-has-current-submenu .wp-menu-image,\n\t\t#menu-posts-updates:hover .wp-menu-image, #menu-posts-updates.wp-has-current-submenu .wp-menu-image {\n\t\t\tbackground-position: 6px 7px!important;\n\t\t}\n\t</style>\n\t<?php\n}", "title": "" }, { "docid": "876b1a13679f3bd8aa9cc60bc34509d8", "score": "0.5377966", "text": "function createTopicTaxonomy() {\n $args = array(\n 'hierarchical' => true,\n 'labels' => array(\n 'name' => _x('Topic', 'taxonomy general name' ),\n 'singular_name' => _x('Topic', 'taxonomy singular name'),\n 'search_items' => __('Search Topic'),\n 'popular_items' => __('Popular Topic'),\n 'all_items' => __('All Topic'),\n 'edit_item' => __('Edit Topic'),\n 'edit_item' => __('Edit Topic'),\n 'update_item' => __('Update Topic'),\n 'add_new_item' => __('Add New Topic'),\n 'new_item_name' => __('New Topic Name'),\n 'separate_items_with_commas' => __('Seperate Topic with Commas'),\n 'add_or_remove_items' => __('Add or Remove Topic'),\n 'choose_from_most_used' => __('Choose from Most Used Topic')\n ),\n 'query_var' => true,\n 'rewrite' => array('slug' =>'topic')\n );\n register_taxonomy( 'topic', array( 'post' ), $args );\n \n $this->createInitTerms();\n }", "title": "" }, { "docid": "f6089b31b166ef4b2dfcce77e9b8be24", "score": "0.53759474", "text": "public static function add_header_icons() {\n $meta = [];\n $path = get_template_directory_uri() . '/assets/images';\n\n $meta[] = sprintf(\n '<link rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"%s\" />',\n esc_url($path . '/icon-32.png')\n );\n\n $meta[] = sprintf(\n '<link rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"%s\" />',\n esc_url($path . '/icon-192.png')\n );\n\n $meta[] = sprintf(\n '<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"%s\" />',\n esc_url($path . '/icon-180.png')\n );\n\n return self::print_tags($meta);\n }", "title": "" }, { "docid": "928034cec41b3894f667c1abd7b4a519", "score": "0.53749037", "text": "function html_tooltip_icon($style) {\n switch($style){\n case \"info\": return array(\"fa fa-info-circle\", \"text-info\");\n case \"warn\": return array(\"fa fa-exclamation-circle\", \"text-warning\");\n case \"warning\": return array(\"fa fa-exclamation-circle\", \"text-warning\");\n case \"help\": return array(\"fa fa-question-circle\", \"text-primary\");\n case \"error\": return array(\"fa fa-exclamation-triangle\", \"text-danger\");\n case \"critical\": return array(\"fa fa-exclamation-triangle fa-spin\", \"text-danger\");\n case \"check\": return array(\"fa fa-check-circle\", \"text-success\");\n case \"success\": return array(\"fa fa-check-circle\", \"text-success\");\n case \"time\": return array(\"fa fa-clock-o\", \"text-danger\");\n case \"money\": return array(\"fa fa-money\", \"text-danger\");\n default: return \"\";\n }\n}", "title": "" }, { "docid": "a13170000d059db53e49655ff59d6ccd", "score": "0.53680146", "text": "function gvc_add_menu_icons_styles(){\n ?>\n \n <style>\n #adminmenu .menu-icon-portfolio div.wp-menu-image:before {\n content: \"\\f322\";\n }\n #adminmenu .menu-icon-gvc-slider div.wp-menu-image:before {\n content: \"\\f233\";\n }\n #adminmenu .menu-icon-faq div.wp-menu-image:before {\n content: \"\\f223\";\n }\n </style>\n \n <?php\n }", "title": "" }, { "docid": "51447c50c5ed2c135b44513b47d88e8d", "score": "0.53646594", "text": "function wprss_custom_post_type_icon() {\n ?>\n <style>\n /* Post Screen - 32px */\n .icon32-posts-wprss_feed {\n background: transparent url( <?php echo WPRSS_IMG . 'icon-adminpage32.png'; ?> ) no-repeat left top !important;\n }\n /* Post Screen - 32px */\n .icon32-posts-wprss_feed_item {\n background: transparent url( <?php echo WPRSS_IMG . 'icon-adminpage32.png'; ?> ) no-repeat left top !important;\n }\n </style>\n <?php }", "title": "" }, { "docid": "b5dd9f834c6a4f16550a92327905bfb6", "score": "0.5362932", "text": "function create_topics_hierarchical_taxonomy() {\n //first do the translations part for GUI\n\n $labels = array(\n 'name' => _x( 'Topics', 'taxonomy general name' ),\n 'singular_name' => _x( 'Topic', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Topics' ),\n 'all_items' => __( 'All Topics' ),\n 'parent_item' => __( 'Parent Topic' ),\n 'parent_item_colon' => __( 'Parent Topic:' ),\n 'edit_item' => __( 'Edit Topic' ),\n 'update_item' => __( 'Update Topic' ),\n 'add_new_item' => __( 'Add New Topic' ),\n 'new_item_name' => __( 'New Topic Name' ),\n 'menu_name' => __( 'Topics' ),\n );\n\n // Now register the taxonomy\n\n register_taxonomy('topics',array('post'), array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'topic' ),\n ));\n\n }", "title": "" }, { "docid": "0bda09284d7497cdef55383e4062e0ca", "score": "0.5362345", "text": "function my_epl_custom_social_icons_filter( $html ) {\n\n\t// Add the new icon\n\t$html .= my_epl_get_custom_author_html();\n\n\treturn $html;\n}", "title": "" } ]
9f085eba71e82de9bbc56caf966b998f
Negotiates the application language.
[ { "docid": "60c6a67f31e4c54639cc60ef2077d8c9", "score": "0.0", "text": "protected function negotiateLanguage($request)\n {\n if (!empty($this->languageParam) && ($language = $request->get($this->languageParam)) !== null) {\n if (is_array($language)) {\n // If an array received, then skip it and use the first of supported languages\n return reset($this->languages);\n }\n if (isset($this->languages[$language])) {\n return $this->languages[$language];\n }\n foreach ($this->languages as $key => $supported) {\n if (is_int($key) && $this->isLanguageSupported($language, $supported)) {\n return $supported;\n }\n }\n\n return reset($this->languages);\n }\n\n foreach ($request->getAcceptableLanguages() as $language) {\n if (isset($this->languages[$language])) {\n return $this->languages[$language];\n }\n foreach ($this->languages as $key => $supported) {\n if (is_int($key) && $this->isLanguageSupported($language, $supported)) {\n return $supported;\n }\n }\n }\n\n return reset($this->languages);\n }", "title": "" } ]
[ { "docid": "d5f3b43ff39399525b495019283acb2d", "score": "0.67172897", "text": "protected function _language_detect() {\n\t\t$lang = DEFAULT_LANG;\n\t\tif (isset($_GET['lang'])) {\n\t\t\t$lang = strtolower(addslashes($_GET['lang']));\n\t\t} else {\n\t\t\tif (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { //Auto detection of first language\n\t\t\t\t$lang = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\t\t\t\t$lang = $lang[0];\n\t\t\t\t$lang = str_replace('-','_',$lang);\n\t\t\t}\n\t\t}\n\t\t\n\t\t$this->language = strtoupper(I::reformat_role_string($lang));\n\t}", "title": "" }, { "docid": "a029b46112673dbb73fec2c40942ba7f", "score": "0.66655815", "text": "private function useBrowserLanguage()\n {\n $lang = strtolower(substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2));\n \n if ($lang === 'cs')\n $code = 'cs-cz';\n else\n $code = 'en-us';\n \n $_SESSION['localization'] = new LocalizationContainer($code);\n }", "title": "" }, { "docid": "9855ab8e327a31f3d4c57be152086a69", "score": "0.6515132", "text": "function select()\n {\n global $nls, $prefs;\n\n $lang = Util::getFormData('new_lang');\n\n /* First, check if language pref is locked and, if so, set it to its\n * value */\n if (isset($prefs) && $prefs->isLocked('language')) {\n $language = $prefs->getValue('language');\n /* Check if the user selected a language from the login screen */\n } elseif (!empty($lang) && NLS::isValid($lang)) {\n $language = $lang;\n /* Check if we have a language set in the session */\n } elseif (isset($_SESSION['horde_language'])) {\n $language = $_SESSION['horde_language'];\n /* Use site-wide default, if one is defined */\n } elseif (!empty($nls['defaults']['language'])) {\n $language = $nls['defaults']['language'];\n /* Try browser-accepted languages. */\n } elseif (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\n /* The browser supplies a list, so return the first valid one. */\n $browser_langs = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n foreach ($browser_langs as $lang) {\n /* Strip quality value for language */\n if (($pos = strpos($lang, ';')) !== false) {\n $lang = substr($lang, 0, $pos);\n }\n $lang = NLS::_map(trim($lang));\n if (NLS::isValid($lang)) {\n $language = $lang;\n break;\n }\n\n /* In case there's no full match, save our best guess. Try\n * ll_LL, followed by just ll. */\n if (!isset($partial_lang)) {\n $ll_LL = String::lower(substr($lang, 0, 2)) . '_' . String::upper(substr($lang, 0, 2));\n if (NLS::isValid($ll_LL)) {\n $partial_lan = $ll_LL;\n } else {\n $ll = NLS::_map(substr($lang, 0, 2));\n if (NLS::isValid($ll)) {\n $partial_lang = $ll;\n }\n }\n }\n }\n }\n\n if (!isset($language)) {\n if (isset($partial_lang)) {\n $language = $partial_lang;\n } else {\n /* No dice auto-detecting, default to US English. */\n $language = 'en_US';\n }\n }\n\n return basename($language);\n }", "title": "" }, { "docid": "7abacb37f4cd6637abc69da78f35b818", "score": "0.64902556", "text": "public function getDefaultLanguage();", "title": "" }, { "docid": "0903b2a450ad22b3af8b5cddf9bfb16c", "score": "0.6467303", "text": "function use_language_of_site() {\n\tlcm_set_language($GLOBALS['langue_site']);\n}", "title": "" }, { "docid": "d18a81d5fe398a7e267b0bc17c36d6c5", "score": "0.6439417", "text": "protected function loadLanguage()\n\t{\n\t\tHelpers::Extension()->loadLanguage(\n\t\t\tServices::Registry()->get('Parameters', 'extension_path')\n\t\t);\n\t\tHelpers::Extension()->loadLanguage(\n\t\t\tServices::Registry()->get('Parameters', 'template_view_path')\n\t\t);\n\t\tHelpers::Extension()->loadLanguage(\n\t\t\tServices::Registry()->get('Parameters', 'wrap_view_path')\n\t\t);\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "26098d3055d8c803d955955fb96bf765", "score": "0.6433231", "text": "function initLanguage()\r\n\t{\r\n\t\textract($this->pageContentVars);\r\n\t\t$urls = $this->urls;\r\n if( file_exists($this->getModuleDir() . '/languages/default.php')) {\r\n \t\tinclude $this->getModuleDir() . '/languages/default.php';\r\n \t\t$this->_translations = $lang;\r\n \t\t// if extra language specified...\r\n \t}\r\n if( $this->config->language != 'default' && file_exists($this->getModuleDir().'/languages/'.$this->config->language.'.php')) {\r\n include $this->getModuleDir() . '/languages/'.$this->config->language.'.php';\r\n $this->_translations = array_merge($this->_translations, $lang);\r\n }\r\n if( file_exists($this->getModuleDir().'/languages/custom.php')) {\r\n include $this->getModuleDir() . '/languages/custom.php';\r\n $this->_translations = array_merge($this->_translations, $lang);\r\n }\r\n }", "title": "" }, { "docid": "4f541df83dd879df94fe32689cd48d0a", "score": "0.6388962", "text": "protected function setLang()\r\n {\r\n $this->lang = '';\r\n foreach ($this->config['languages'] as $key => $lang) {\r\n if ($this->isLangInUrl($lang)) {\r\n $this->lang = $lang;\r\n }\r\n }\r\n if (empty($this->lang)) {\r\n $this->lang = $this->config['languages'][0];\r\n }\r\n }", "title": "" }, { "docid": "a9ea6605f3b5217ff4500e280f608738", "score": "0.6354746", "text": "public function setLanguage()\n {\n $acceptLanguages = array('pt-br');\n $browserLanguage = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);\n $sessionLanguage = $this->Session->read('onneblue_language');\n $urlLanguage = explode('.', $_SERVER['SERVER_NAME']);\n\n if (isset($sessionLanguage) === false && in_array($urlLanguage[0], $acceptLanguages) === false) {\n $language = $browserLanguage;\n } else if (isset($sessionLanguage) === true && in_array($urlLanguage[0], $acceptLanguages) === false) {\n $language = $sessionLanguage;\n } else {\n if (isset($urlLanguage[0]) === true) {\n $language = $urlLanguage[0];\n }//end if\n }//end if\n\n $siLanguage = array();\n switch ($language) {\n case 'eng':\n case 'en':\n $siLanguage['iso-639-1'] = 'eng';\n $siLanguage['iso-639-2'] = 'en';\n $siLanguage['lang'] = 'en';\n $siLanguage['name'] = 'English';\n break;\n case 'por':\n case 'pt':\n case 'pt-br':\n $siLanguage['iso-639-1'] = 'por';\n $siLanguage['iso-639-2'] = 'pt';\n $siLanguage['lang'] = 'pt-br';\n $siLanguage['name'] = 'Português';\n break;\n default:\n $siLanguage['iso-639-1'] = 'por';\n $siLanguage['iso-639-2'] = 'pt';\n $siLanguage['lang'] = 'pt-br';\n $siLanguage['name'] = 'Português';\n break;\n }//end switch\n Configure::write('Config.language', $siLanguage['iso-639-1']);\n\n return $siLanguage;\n\n }", "title": "" }, { "docid": "4de2f5be182149b5634825c470aa48e0", "score": "0.63379896", "text": "function initLanguage($sendHeader = true) {\n static $languages_initialized = false;\n\n global $gallery, $GALLERY_EMBEDDED_INSIDE, $GALLERY_EMBEDDED_INSIDE_TYPE;\n\n /**\n * Init was already done. Just return, or do a reinit\n * if the giving userlanguage is different than the current language\n */\n\n if($languages_initialized) {\n\t\treturn;\n }\n\n $nls = getNLS();\n\n /* Set Defaults, they may be overwritten. */\n setLangDefaults($nls);\n\n /* Before we do any tests or settings test if we are in mode 0\n If so, we skip language settings at all */\n\n /* Mode 0 means no Multilanguage at all. */\n if (isset($gallery->app->ML_mode) && $gallery->app->ML_mode == 0) {\n /* Maybe PHP has no (n)gettext, then we have to substitute _() and ngettext*/\n if (!gettext_installed()) {\n function _($string) {\n return $string ;\n }\n }\n if (!ngettext_installed()) {\n function ngettext($singular, $quasi_plural,$num = 0) {\n if ($num == 1) {\n return $singular;\n }\n else {\n return $quasi_plural;\n }\n }\n }\n\n /* Skip rest*/\n $languages_initialized = true;\n return;\n }\n\n /**\n\t * Does the user wants a new lanuage ?\n\t * This is used in Standalone and *Nuke\n\t */\n $newlang = getRequestVar('newlang');\n\n /**\n\t * Note: ML_mode is only used when not embedded\n\t */\n\n if (isset($GALLERY_EMBEDDED_INSIDE_TYPE)) {\n /* Gallery is embedded */\n\n /* Gallery can set nukes language.\n * For phpBB2, GeekLog, Mambo and Joomla! this is not possible, Gallery will always use their language.\n */\n forceStaticLang();\n\n if (!empty($newlang)) {\n /* Set Language to the User selected language. */\n $gallery->language = $newlang;\n }\n else {\n /** No new language.\n\t\t\t * Lets see in which Environment were are and look for a language.\n\t\t\t * Lets try to determ the used language\n\t\t\t */\n $gallery->language = getEnvLang();\n }\n }\n else {\n /** We're not embedded.\n\t\t * If we got a ML_mode from config.php we use it\n\t\t * If not we use Mode 2 (Browserlanguage)\n\t\t */\n if (isset($gallery->app->ML_mode)) {\n $ML_mode = $gallery->app->ML_mode;\n }\n else {\n $ML_mode = 2;\n }\n\n switch ($ML_mode) {\n case 1:\n /* Static Language */\n $gallery->language = getDefaultLanguage();\n break;\n\n case 3:\n /* Does the user want a new language ?*/\n if (!empty($newlang)) {\n /* Set Language to the User selected language.*/\n $gallery->language = $newlang;\n }\n elseif (isset($gallery->session->language)) {\n /* Maybe we already have a language*/\n $gallery->language = $gallery->session->language;\n }\n else {\n $gallery->language = getDefaultLanguage();\n }\n break;\n\n default:\n /* Use Browser Language or Userlanguage when mode 2 or any other (wrong) mode*/\n $gallery->language = getBrowserLanguage();\n\n if (!empty($gallery->user) && $gallery->user->getDefaultLanguage() != '') {\n $gallery->language = $gallery->user->getDefaultLanguage();\n }\n break;\n }\n }\n\n /* if an alias for the (new or Env) language is given, use it*/\n $gallery->language = getLanguageAlias($gallery->language) ;\n\n /**\n\t * Fall back to Default Language if :\n\t *\t- we cant detect Language\n\t *\t- Nuke/phpBB2 sent an unsupported\n\t *\t- User sent an undefined\n\t */\n\n if (! isset($nls['language'][$gallery->language])) {\n $gallery->language = getLanguageAlias(getDefaultLanguage());\n /* when we REALLY REALLY cant detect a language */\n if (! isset($nls['language'][$gallery->language])) {\n $gallery->language = 'en_US';\n }\n }\n\n /* And now set this language into session*/\n $gallery->session->language = $gallery->language;\n\n /* locale*/\n if (isset($gallery->app->locale_alias[$gallery->language])) {\n $gallery->locale = $gallery->app->locale_alias[\"$gallery->language\"];\n }\n else {\n $gallery->locale = $gallery->language;\n }\n\n /* Check defaults */\n $checklist = array('direction', 'charset') ;\n\n /**\n * This checks wether the previously defined values are available.\n * All available values are in $nls\n * If they are not defined we used the defaults from nls.php\n */\n foreach($checklist as $check) {\n /* if no ... is given, use default*/\n if ( !isset($nls[$check][$gallery->language])) {\n $gallery->$check = $nls['default'][$check] ;\n }\n else {\n $gallery->$check = $nls[$check][$gallery->language] ;\n }\n }\n\n /* When all is done do the settings*/\n\n /* There was previously a != SUNOS check around the LANG= line. We've determined that it was\n probably a bogus bug report, since all documentation says this is fine.*/\n putenv(\"LANG=\". $gallery->language);\n putenv(\"LANGUAGE=\". $gallery->language);\n\n /* This line was added in 1.5-cvs-b190 to fix problems on FreeBSD 4.10*/\n putenv(\"LC_ALL=\". $gallery->language);\n\n /* Set Locale*/\n setlocale(LC_ALL,$gallery->locale);\n\n /**\n * Set Charset header\n * We do this only if we are not embedded and the \"user\" wants it.\n * Because headers might be sent already.\n */\n if (!headers_sent() && ($sendHeader == true || ! isset($GALLERY_EMBEDDED_INSIDE))) {\n header('Content-Type: text/html; charset=' . $gallery->charset);\n }\n\n /**\n * Test if we're using gettext.\n * if yes, do some gettext settings.\n * if not emulate _() function or ngettext()\n */\n\n if (gettext_installed()) {\n bindtextdomain($gallery->language. \"-gallery_\". where_i_am(), dirname(dirname(__FILE__)) . '/locale');\n textdomain($gallery->language. \"-gallery_\". where_i_am());\n }\n else {\n emulate_gettext($languages_initialized);\n }\n\n // We test this separate because ngettext() is only available in PHP >=4.2.0 but _() in all PHP4\n if (!ngettext_installed()) {\n emulate_ngettext($languages_initialized);\n }\n\n $languages_initialized = true;\n}", "title": "" }, { "docid": "0bc97ac0367b63d407aa64bbb92cd2aa", "score": "0.62948626", "text": "function languageSetup() {\n if(!c::get('lang.support')) return false;\n\n // get the available languages\n $available = c::get('lang.available');\n\n // sanitize the available languages\n if(!is_array($available)) {\n \n // switch off language support \n c::set('lang.support', false);\n return false; \n \n }\n\n // get the raw uri\n $uri = uri::raw();\n \n // get the current language code \n $code = a::first(explode('/', $uri));\n\n // try to detect the language code if the code is empty\n if(empty($code)) {\n \n if(c::get('lang.detect')) { \n // detect the current language\n $detected = str::split(server::get('http_accept_language'), '-');\n $detected = str::trim(a::first($detected));\n $detected = (!in_array($detected, $available)) ? c::get('lang.default') : $detected;\n\n // set the detected code as current code \n $code = $detected;\n\n } else {\n $code = c::get('lang.default');\n }\n \n // go to the default homepage \n go(url(false, $code));\n \n }\n \n // http://yourdomain.com/error\n // will redirect to http://yourdomain.com/en/error\n if($code == c::get('404')) go(url('error', c::get('lang.default')));\n \n // validate the code and switch back to the homepage if it is invalid\n if(!in_array($code, c::get('lang.available'))) go(url());\n\n // set the current language\n c::set('lang.current', $code);\n \n // mark if this is a translated version or the default version\n ($code != c::get('lang.default')) ? c::set('lang.translated', true) : c::set('lang.translated', false);\n \n // load the additional language files if available\n load::language(); \n\n }", "title": "" }, { "docid": "8f1a9667dfdac7d6d8c0f9f21bf9f547", "score": "0.628453", "text": "public static function initInitial()\n {\n\t\t// load the general environment first\n // the order matters!\n self::$languages = new MF_Language_Manager();\n }", "title": "" }, { "docid": "d2c110ad0b4f2cf21d42b82196c19ca7", "score": "0.6273348", "text": "public static function setApplicationLanguage()\n {\n $app = Yii::app();\n\n // If someone has hard-coded the app-language, return it instead\n if ($app->language != 'en_US')\n return $app->language;\n\n // If the language is set via POST, accept it\n if (php_sapi_name() == 'cli')\n return $app->language;\n\n if (Cii::get($_POST, '_lang', false))\n $app->language = $_POST['_lang'];\n else if (isset($app->session['_lang']) && $app->session['_lang'] != NULL)\n $app->language = $app->session['_lang'];\n else\n $app->language = Yii::app()->getRequest()->getPreferredLanguage();\n\n\n Yii::app()->language = $app->session['_lang'] = $app->language;\n return $app->language;\n }", "title": "" }, { "docid": "401fa66bfa8561a0b95b3489456b828e", "score": "0.62703085", "text": "public static function setLanguage(): void\n {\n self::reset();\n\n $all_langs = self::getAllLanguages();\n $func_args = func_get_args();\n\n foreach ($func_args as $arg) {\n if (isset($all_langs[$arg])) {\n self::$activeLang = $all_langs[$arg];\n break;\n }\n }\n\n if (!self::$activeLang) {\n self::getLanguage();\n }\n }", "title": "" }, { "docid": "2fd4ada12102e73f9c6dc34d9e9a72dc", "score": "0.6264399", "text": "function init_lang()\n\t{\n\t\tif (class_exists('_Language')) return;\n\t\t\n\t\trequire_once(BASEPATH.'libraries/Language'.EXT);\n\t\t$this->lang = new _Language();\n\t\t$this->ci_is_loaded[] = 'lang';\n\t}", "title": "" }, { "docid": "a064ba15c309f82e82611939a7bd96b0", "score": "0.6249228", "text": "public function setLanguage()\n\t{\n\t\t$languages = $this->configRepository->get('laravel-localization::languagesAllowed');\n\t\t$locale = Request::segment(1);\n\t\tif(in_array($locale, $languages)){\n\t\t\tApp::setLocale($locale);\n\t\t\tSession::put('language', $locale);\n\t\t\t$this->configRepository->set('application.language', $locale);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$locale = null;\n\t\t\t$locale_app = LaravelLocalization::getCurrentLanguage();\n\t\t\tApp::setLocale($locale_app);\n\t\t\t$this->configRepository->set('application.language', $locale_app);\n\t\t\tif($this->configRepository->get('laravel-localization::useSessionLanguage'))\n\t\t\t{\n\t\t\t\tSession::put('language', $locale_app);\n\t\t\t}\n\t\t}\n\t\treturn $locale;\n\t}", "title": "" }, { "docid": "7f8a27d06042bd6032560988bd277b4e", "score": "0.62480915", "text": "public function lang() {\n\t\t\tload_plugin_textdomain( 'jet-cw', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}", "title": "" }, { "docid": "7f83f84906e5ab2d34fd1036747011f6", "score": "0.6225473", "text": "public function onBeforeInitController() {\n $translate = $this->owApp->translate;\n $translate->addTranslation(\n $this->_pluginRoot . 'languages',\n null,\n array('scan' => Zend_Translate::LOCALE_FILENAME)\n );\n $locale = $this->owApp->getConfig()->languages->locale;\n $translate->setLocale($locale);\n \n $appMenu = OntoWiki_Menu_Registry::getInstance()->getMenu('application');\n $extrasMenu = $appMenu->getSubMenu('Extras');\n $lanMenuEntry = $translate->_('Select Language', $this->owApp->config->languages->locale);\n $lanMenue = new OntoWiki_Menu();\n\n $request = new OntoWiki_Request();\n $getRequest = $request->getRequestUri();\n foreach ($this->_supportedLanguages as $key => $value) {\n $getRequest = str_replace(\"&lang=\".$key, \"\", $getRequest);\n $getRequest = str_replace(\"?lang=\".$key, \"\", $getRequest);\n }\n foreach ($this->_supportedLanguages as $key => $value) {\n $url = $getRequest . ((strpos($getRequest, \"?\")) ? \"&\" : \"?\" ) . \"lang=\".$key;\n $lanMenue->appendEntry(\n $translate->_($value, $this->owApp->config->languages->locale),\n $url);\n }\n $extrasMenu->setEntry($lanMenuEntry, $lanMenue);\n }", "title": "" }, { "docid": "657e2f83aeb069652304ac35b7856402", "score": "0.6222964", "text": "public function lang() {\n\t\t\tload_plugin_textdomain( 'jet-chat', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}", "title": "" }, { "docid": "65986728288cd23e15ae340df9ec5cc4", "score": "0.6218882", "text": "private function initEnvironment()\n {\n Yii::import('wmdl.vendors.phpSqlParser.PHPSQLParser', false);\n Yii::import('wmdl.components.language.strategy.*', false);\n\n if (Yii::app()->request->getIsAjaxRequest()) {\n $this->setSiteStates($this->getUserStateLanguage());\n }\n\n if (Yii::app() instanceof ZWebApplication) {\n if (Yii::app()->isBackend()) {\n Yii::import('admin.models.AdminLanguageModel');\n AdminLanguageModel::setAdminAreaLanguage($_POST, $this);\n } else {\n $this->processedRequestUri(Yii::app()->getRequest());\n }\n }\n }", "title": "" }, { "docid": "31109c65d6b4edaae6b2e89a36e3be6e", "score": "0.62124807", "text": "public function init(){\n\t\t$_default=$this->config->get('default_lang');\n\t\tif($_default){\n\t\t\tif(isset($_SESSION['lang'])) $lang=$_SESSION['lang'];\n\t\t\telse $lang=strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\n\t\t\t$langarray=explode('-',$lang);\n\t\t\tif(isset($langarray[1])) $langAppend=$langarray[1];\n\t\t\telse $langAppend=$langarray[0];\n\t\t\t\n\t\t\t$this->checkLangTable();\n\t\t\t$all=$this->share->readTable('phphand_lang');\n\t\t\t\n\t\t\tforeach($all as $langset){\n\t\t\t\tif(($langset['lang'] && strtolower($langset['lang'])==$lang) || (isset($langAppend) && strtolower($langset['lang'])==$langAppend)){\n\t\t\t\t\t$rightlang=$langset['lang'];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(isset($rightlang)){\n\t\t\t\t$this->_langset=$rightlang;\n\t\t\t}else{\n\t\t\t\t/**\n\t\t\t\t * check if the `default_lang` is a right\n\t\t\t\t * lang set\n\t\t\t\t * if not trigger_error\n\t\t\t\t */\n\t\t\t\tforeach($all as $langset){\n\t\t\t\t\tif($langset['lang']==$_default){\n\t\t\t\t\t\t$rightlang=$_default;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(!isset($rightlang)) exit('default_lang not exists in `phphand_lang_set`');\n\t\t\t\t$this->_langset=$rightlang;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "09a4938a7e56ce3e257209788f17bf27", "score": "0.62023115", "text": "public function switch_language() {\n $this->grantAccess('all');\n \n $language = $this->data['Config']['language'];\n $languages = Configure::read('Languages');\n if(!isset($languages[$language])) {\n $language = 'en-en';\n } \n \n $this->Session->write('Config.language', $language);\n # now set the language\n $this->L10n->get($language);\n\n setlocale(LC_ALL, \n substr($this->L10n->locale, 0, 3) .\n strtoupper(substr($this->L10n->locale, 3, 2)) . \n '.' . $this->L10n->charset\n );\n \n $session_identity = $this->Session->read('Identity');\n if($session_identity) {\n # user is logged in, so save it to the db\n $this->Identity->id = $session_identity['id'];\n $this->Identity->saveField('language', $language);\n $this->Session->write('Identity.language', $language);\n }\n \n $this->redirect($this->referer());\n }", "title": "" }, { "docid": "7da60bcde58efee24c89ce7875d75569", "score": "0.620002", "text": "function language_detect() {\r\n\t\tif (!empty($id)) {\r\n\t\t\t$this->log(\"The language '$id' could not be loaded.\");\r\n\t\t}\r\n\t\t$this->language = CrayonResources::langs()->detect($this->url, $this->setting_val(CrayonSettings::FALLBACK_LANG));\r\n\t}", "title": "" }, { "docid": "daa5d37cf05032c7d48ffba02f84c08a", "score": "0.6187414", "text": "private function _setAgentLanguage()\r\n {\r\n if($_SERVER['HTTP_ACCEPT_LANGUAGE']){\r\n $languages = explode(',',$_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n foreach($languages as &$language)\r\n {\r\n $language = substr($language,0,2);\r\n }\r\n $this->request['language'] = array_unique($languages);\r\n } // defends from no brower user agent i.e external script consuming an API end point \r\n }", "title": "" }, { "docid": "f5faa48dfbee445923bff33063e04294", "score": "0.6175232", "text": "public function getRespectSysLanguage();", "title": "" }, { "docid": "890772aadfbd9ac1384717a09864c8f6", "score": "0.61271137", "text": "public function fillLanguage()\n {\n return $this->language;\n }", "title": "" }, { "docid": "d6142e0ccf2c105e941596f6656b3937", "score": "0.6124148", "text": "public function lang() {\n\t\t\tload_plugin_textdomain(\n\t\t\t\t'ava-smart-filters',\n\t\t\t\tfalse,\n\t\t\t\tdirname( plugin_basename( __FILE__ ) ) . '/languages'\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "66a283f7a9e78bdbce39fb48fd2879fa", "score": "0.61061394", "text": "public function setLanguage($lang)\r\n {\r\n\r\n self::$currentLanguageCode = $lang;\r\n\r\n if (isset($lang) == false || $lang == \"\") {\r\n\r\n if (!empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {\r\n $http_lang = $country = null;\r\n $langs = explode(\",\", $_SERVER['HTTP_ACCEPT_LANGUAGE']);\r\n $firstLanguage = explode(\"-\", $langs[0]);\r\n $lang = strtoupper($firstLanguage[0]);\r\n } else {\r\n $lang = \"EN\";\r\n }\r\n\r\n }\r\n\r\n // This is used by getext from Twig plugin\r\n // Set language to French\r\n switch (strtolower($lang)) {\r\n case 'en':\r\n $langString = \"en_US\";\r\n break;\r\n \r\n default:\r\n $langString = strtolower($lang) . \"_\" . strtoupper($lang);\r\n break;\r\n }\r\n\r\n putenv(\"LC_ALL=$langString.utf8\");\r\n setlocale(LC_ALL, $langString . \".utf8\");\r\n setlocale(LC_CTYPE, $langString . '.utf8');\r\n setlocale(LC_COLLATE, $langString . '.utf8');\r\n setlocale(LC_MESSAGES, $langString . '.utf8');\r\n setlocale(LC_NUMERIC, \"en_US.utf8\");\r\n // Manage modules locales\r\n if (\\ConfigIgestisGlobalVars::debugMode()) {\r\n $getTextCaching = new \\Igestis\\Utils\\GetTextCaching();\r\n $getTextCaching->setCachingFor(\"CORE\");\r\n }\r\n\r\n // Auto refresh cache everytin when DEBUG_MODE is activated (for production server, a button will be available for admin to reset the cache)\r\n reset($this->modulesList);\r\n foreach ($this->modulesList as $moduleName => $moduleDatas) {\r\n if ($moduleDatas['igestisVersion'] == 2 && is_dir($moduleDatas['folder'])) {\r\n // Caching the mo file\r\n if (\\ConfigIgestisGlobalVars::debugMode()) {\r\n $getTextCaching->setCachingFor($moduleDatas);\r\n }\r\n\r\n $configClass = \"\\\\Igestis\\\\Modules\\\\\" . $moduleDatas['name'] . \"\\\\ConfigModuleVars\";\r\n bindtextdomain((method_exists($configClass, \"textDomain\") ? $configClass::textDomain() : $configClass::textDomain), \\ConfigIgestisGlobalVars::cacheFolder() . '/lang/locale');\r\n bind_textdomain_codeset((method_exists($configClass, \"textDomain\") ? $configClass::textDomain() : $configClass::textDomain), 'UTF-8');\r\n }\r\n }\r\n // Specify the location of the translation tables\r\n bindtextdomain(\\ConfigIgestisGlobalVars::textDomain(), \\ConfigIgestisGlobalVars::cacheFolder() . '/lang/locale');\r\n bind_textdomain_codeset(\\ConfigIgestisGlobalVars::textDomain(), 'UTF-8');\r\n // Choose domain\r\n textdomain(\\ConfigIgestisGlobalVars::textDomain());\r\n }", "title": "" }, { "docid": "709035433ebfb20885fd22df729c4055", "score": "0.6095656", "text": "private function _detectLanguage()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'detect language',\n debug_backtrace(),\n '#6802CF'\n ));\n }\n\n if (!isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ \n $this->lang = $this->_options['lang'];\n }\n\n $lang = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n $bool = preg_match('#^[a-z]{2}-[A-Z]{2}$#', $lang[0]);\n\n if (!$bool) {\n $this->lang = $lang[0] . '-xx';\n }\n\n $this->lang = $lang[0];\n }", "title": "" }, { "docid": "2681189e3c61da6572d51dda13124799", "score": "0.6077773", "text": "public function lang() {\n\t\t\tload_plugin_textdomain( 'jet-theme-core', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}", "title": "" }, { "docid": "f4df9cbb8fd2d741bb18382391e36eb8", "score": "0.60736245", "text": "function getLanguage() {\n \treturn null;\n }", "title": "" }, { "docid": "a8796e041df20f8f90da9263c40b4f96", "score": "0.605255", "text": "static function loadLanguage() {\n\t\t$lang =& JFactory::getLanguage();\n\t\t$lang->load('com_articlepay', JPATH_ADMINISTRATOR);\n\t}", "title": "" }, { "docid": "d525758c2f765a87927bbb0242e7e3ca", "score": "0.60493517", "text": "public function init_localization() {\n $moFiles = scandir(trailingslashit($this->dir) . 'languages/');\n $selFile = '';\n foreach ($moFiles as $moFile) {\n if (strlen($moFile) > 3 && strpos($moFile, 'Frontend') == 0 && substr($moFile, -3) == '.mo' && strpos(strtolower($moFile), strtolower(get_locale())) > -1) {\n $selFile = $moFile;\n load_textdomain('WP_Visual_Chat_Frontend', trailingslashit($this->dir) . 'languages/' . $moFile);\n }\n }\n if (!$selFile) {\n load_textdomain('WP_Visual_Chat_Frontend', trailingslashit($this->dir) . 'languages/Frontend_en_US.mo');\n }\n }", "title": "" }, { "docid": "8d9e2f18dfff9516a9d550c63b93b0d4", "score": "0.6036288", "text": "public function lang() {\n\t\t\tload_plugin_textdomain( 'jet-themes', false, dirname( plugin_basename( __FILE__ ) ) . '/languages' );\n\t\t}", "title": "" }, { "docid": "69293d08493d3669cbad1f4fe300c9e6", "score": "0.6029028", "text": "function wpml_wpjm_set_language() {\n\tif ( ( strstr( $_SERVER['REQUEST_URI'], '/jm-ajax/' ) || ! empty( $_GET['jm-ajax'] ) ) && isset( $_POST['lang'] ) ) {\n\t\tdo_action( 'wpml_switch_language', sanitize_text_field( $_POST['lang'] ) );\n\t}\n}", "title": "" }, { "docid": "0ca0615cb97536f3d3dcecd1b5884008", "score": "0.6026418", "text": "function AssignHBLanguage()\n\t{\tif (!$this->language = $_GET[\"lang\"])\n\t\t{\t$this->language = $this->def_lang;\n\t\t}\n\t}", "title": "" }, { "docid": "1fddf7d8c0673b5ed0c0cde6c1304b15", "score": "0.6013304", "text": "function getlang()\n{\n\n # if there was no user or admin setting use the browser's request\n return browser_lang();\n\n}", "title": "" }, { "docid": "33c31dc5a66e1403ea6f14723e1bbade", "score": "0.600703", "text": "function ps_multi_languages( ){\r\n\t\t$this->__construct( );\r\n\t}", "title": "" }, { "docid": "f0e42d1037e292535954ccabc4ed1341", "score": "0.59985185", "text": "public function getPreferredLanguage();", "title": "" }, { "docid": "9512f5b13859448d8d3f9274de253dc8", "score": "0.5996838", "text": "public function __construct() {\n\t\t$this->getDefaultLanguage();\n\t\t$this->getAvailableLanguages();\n\t}", "title": "" }, { "docid": "daba033c249866ed6d6d621ec6d8c558", "score": "0.5993524", "text": "public function pll_language_defined() {\n\t\t// Filters\n\t\t$this->filters_links = new PLL_Frontend_Filters_Links( $this );\n\t\t$this->filters = new PLL_Frontend_Filters( $this );\n\t\t$this->filters_search = new PLL_Frontend_Filters_Search( $this );\n\t\t$this->posts = new PLL_CRUD_Posts( $this );\n\t\t$this->terms = new PLL_CRUD_Terms( $this );\n\n\t\t$this->sync = new PLL_Sync( $this );\n\n\t\t// Auto translate for Ajax\n\t\tif ( ( ! defined( 'PLL_AUTO_TRANSLATE' ) || PLL_AUTO_TRANSLATE ) && wp_doing_ajax() ) {\n\t\t\t$this->auto_translate();\n\t\t}\n\t}", "title": "" }, { "docid": "2e5f0745eb6892764e0c17bca6f59e0e", "score": "0.5993059", "text": "function _loadLocale()\n {\n if (file_exists(org_glizy_Paths::getRealPath('CORE_CLASSES').'org/glizycms/locale/'.$this->getLanguage().'.php'))\n {\n require_once(org_glizy_Paths::getRealPath('CORE_CLASSES').'org/glizycms/locale/'.$this->getLanguage().'.php');\n }\n else\n {\n require_once(org_glizy_Paths::getRealPath('CORE_CLASSES').'org/glizycms/locale/en.php');\n }\n parent::_loadLocale();\n }", "title": "" }, { "docid": "25d75d73d306d48e5a685b6ef43366cd", "score": "0.5986704", "text": "public function __construct()\n {\n //====================================================================//\n // Load Default Language\n Local::loadDefaultLanguage();\n }", "title": "" }, { "docid": "3d4ccaae35ee87cfa50ca123ac8b5530", "score": "0.5986532", "text": "protected function loadLanguage()\n\t{\n\t\t$this->load->language(\"extension/payment/{$this->module_name}\");\n\t}", "title": "" }, { "docid": "cbee4ff9a7f73e02f8e85769776a5ad4", "score": "0.59723955", "text": "public static function parse_language()\n {\n if (!empty(self::$params[0]) && array_key_exists(self::$params[0], Language::$languages)) {\n\n /* Set the language */\n $language_code = filter_var(self::$params[0], FILTER_SANITIZE_STRING);\n Language::set_by_code($language_code);\n self::$language_code = $language_code;\n\n /* Unset the parameter so that it wont be used further */\n unset(self::$params[0]);\n self::$params = array_values(self::$params);\n }\n }", "title": "" }, { "docid": "751dca9aa6c8620d0d58e4ce61f5cb31", "score": "0.59380937", "text": "function setLanguage() {\n\t$defaultLang = \"fr_FR\";\n\n\t$language = defaultVal($_SESSION, \"language\", $defaultLang);\n\n\tif (isset($_GET[\"lang\"]))\n\t{\n\t $lang = filter_input(INPUT_GET, 'lang', FILTER_SANITIZE_STRING);\n\t if (strpos($lang, \"en\") === 0) {\n\t $language = \"en_US\";\n\t }\n\t else {\n\t \t$language = $defaultLang;\n\t }\n\t}\n\n\tputenv(\"LANG=\" . $language);\n\tsetlocale(LC_ALL, $language);\n\t//echo \"Setting language to \" . $language;\n\n\t// Set the text domain as \"messages\"\n\t$domain = \"messages\";\n\tbindtextdomain($domain, \"locale\");\n\n\t//bind_textdomain_codeset($domain, 'UTF-8');\n\ttextdomain($domain);\n\n\t// Just return fr or en\n\treturn substr($language, 0, 2) === \"en\" ? ENGLISH : FRENCH;\n}", "title": "" }, { "docid": "414ead4ea6b236b27279490c548bda39", "score": "0.590332", "text": "protected function setUpLanguages() {\n // English (en) is created by default.\n ConfigurableLanguage::createFromLangcode('fr')->save();\n ConfigurableLanguage::createFromLangcode('de')->save();\n }", "title": "" }, { "docid": "e72d14ebbb1de0bc50cbaa87c60e2906", "score": "0.5903145", "text": "function get_language_code() {\n return App::getInstance()->getLanguageCode();\n}", "title": "" }, { "docid": "41761aa83f80b6176535be66d0669321", "score": "0.5894379", "text": "public function init($response = '')\n {\n $languageID = null;\n $allLanguages = $this->Config->get('languages', 'language', []);\n\n if ($this->Config->get('languageMethod', 'language', 'url') === 'cookie') {\n // if config set to detect language using cookie.\n $languageCookieName = 'rundizbones_language' . $this->Config->get('suffix', 'cookie');\n if (isset($_COOKIE[$languageCookieName])) {\n // if language cookie was set.\n $languageID = $_COOKIE[$languageCookieName];\n } else {\n // if language cookie was NOT set.\n // get default language.\n $languageID = $this->Config->getDefaultLanguage($allLanguages);\n $cookieExpires = 90;// unit in days.\n setcookie($languageCookieName, $languageID, (time() + (60*60*24*$cookieExpires)), '/');\n unset($cookieExpires, $languageCookieName, $languageID);\n // redirect to let app can be able to get cookie.\n $this->redirect();\n }\n } else {\n // if config set to detect language using URL\n $Url = new \\Rdb\\System\\Libraries\\Url($this->Container);\n $urlPath = trim($Url->getPath(), '/');\n $urlSegments = explode('/', $urlPath);\n unset($urlPath);\n\n $defaultLanguage = $this->Config->getDefaultLanguage($allLanguages);\n\n // detect language ID from the URL.\n if (\n is_array($urlSegments) &&\n isset($urlSegments[0]) &&\n !empty($urlSegments[0]) &&\n is_array($allLanguages) &&\n array_key_exists($urlSegments[0], $allLanguages)\n ) {\n // if detected language ID in the URL. Example: http://localhost/myapp/en-US the `en-US` is the language ID.\n $languageID = $urlSegments[0];\n } else {\n // if cannot detected language ID in the URL.\n $languageID = $defaultLanguage;\n $cannotDetectLanguageUrl = true;\n }\n // end detect language ID from the URL.\n\n // redirection to correct the URL.\n if ($this->Config->get('languageUrlDefaultVisible', 'language', false) === true) {\n // if config was set to show default language in the URL.\n if (isset($cannotDetectLanguageUrl) && $cannotDetectLanguageUrl === true) {\n // if cannot detect language from the URL, this means that using default language from config.\n // redirect to show the language URL.\n array_unshift($urlSegments, $languageID);\n $newUrl = rtrim($Url->getAppBasedPath() . '/' . implode('/', $urlSegments), '/');\n $newUrl = (empty($newUrl) ? '/' : $newUrl) . $Url->getQuerystring();\n unset($urlSegments);\n $this->redirect($newUrl, 301);\n }\n } else {\n // if config was set to NOT show default language in the URL.\n if ($languageID === $defaultLanguage && !isset($cannotDetectLanguageUrl)) {\n // if detected language ID matched default language and [cannot detect language in URL] mark was set.\n // redirect to remove the language URL.\n $urlSegments = array_slice($urlSegments, 1);\n $newUrl = rtrim($Url->getAppBasedPath() . '/' . implode('/', $urlSegments), '/');\n $newUrl = (empty($newUrl) ? '/' : $newUrl) . $Url->getQuerystring();\n $this->redirect($newUrl, 301);\n }\n }\n // end redirection to correct the URL.\n\n // set new REQUEST_URI to remove language URL.\n $_SERVER['RUNDIZBONES_ORIGINAL_REQUEST_URI'] = ($_SERVER['REQUEST_URI'] ?? '');\n if (!isset($cannotDetectLanguageUrl)) {\n // if [cannot detect language in URL] mark was set.\n // remove the language URL segment and set it back to REQUEST_URI.\n $urlSegments = array_slice($urlSegments, 1);\n $newUrl = rtrim($Url->getAppBasedPath() . '/' . implode('/', $urlSegments), '/');\n $newUrl = (empty($newUrl) ? '/' : $newUrl) . $Url->getQuerystring();\n $_SERVER['REQUEST_URI'] = $newUrl;\n unset($newUrl);\n }\n // end set new REQUEST_URI to remove language URL.\n \n unset($cannotDetectLanguageUrl, $defaultLanguage, $Url, $urlSegments);\n }// endif; languageMethod\n\n // set the language ID to server variable for easy access.\n $_SERVER['RUNDIZBONES_LANGUAGE'] = $languageID;\n\n // set the locale.\n $locale = $this->getLocale($languageID, $allLanguages);\n // set the language locale to server variable for easy access. the locale can be string, array, see config/[env]/language.php.\n // basically the server variable below is no need to use anymore because it will be set to LC_XXX here.\n $_SERVER['RUNDIZBONES_LANGUAGE_LOCALE'] = json_encode($locale);\n putenv('LC_ALL=' . $languageID);\n setlocale(LC_ALL, $locale);\n\n unset($allLanguages, $languageID, $locale);\n return $response;\n }", "title": "" }, { "docid": "62cbd86e31bd090318707f000964e61e", "score": "0.58888096", "text": "public function gabcaptcha2_setlang()\n\t{\n\t\tglobal $gabcaptcha2_plugin_dir;\n\t\tif( function_exists( 'load_plugin_textdomain' ) )\n\t\t{\n\t\t\tload_plugin_textdomain( GABCAPTCHA2_TEXTDOMAIN, false, $gabcaptcha2_plugin_dir . '/lang' );\n\t\t}\n\t}", "title": "" }, { "docid": "4de5def5f4f339dd6a25d6ea10e0bbb2", "score": "0.5885848", "text": "private function _handleLanguage()\n\t{\n\t\treturn;\n// \t\t// Initialize some things\n// \t\t$input\t=\tdunloader( 'input', true );\n// \t\t$config\t=\tdunloader( 'config', 'com_jblesta' );\n// \t\t$app\t=\tJFactory :: getApplication();\n\t\t\n// \t\t// Don't run if we are in backend\n// \t\tif( $app->isAdmin() ) {\n// \t\t\treturn true;\n// \t\t}\n\t\t\n// \t\t// If we have disabled language translations, disable it here also\n// \t\tif (! $config->get( 'languageenable', false ) ) {\n// \t\t\treturn true;\n// \t\t}\n\t\t\n// \t\t$db\t\t\t=\tdunloader( 'database', true );\n// \t\t$html\t \t= JResponse :: getBody();\t\t\t\t\t// Site contents\n// \t\t$langcurr\t=\tJFactory :: getLanguage()->getTag();\t// Current language of the site\n\t\t\n// \t\t// Find WHMCS URLs and affix the language to them\n// \t\t$wlang\t\t=\t$config->findLanguage( $langcurr );\t\t// Language to use for WHMCS links\n// \t\t$whmcsurl\t=\t$config->get( 'whmcsurl', null );\n// \t\t$whmcsuri\t=\tDunUri :: getInstance( $whmcsurl, true );\n// \t\t$whmcsurl\t=\tpreg_quote( $whmcsuri->toString( array( 'user', 'pass', 'host', 'port', 'path', 'query', 'fragment' ) ), '#' );\n// \t\t$regex\t\t=\t'#<a[^>]+([\\\"\\']+)(?P<link>http(?:s|)\\://' . $whmcsurl . '[^\\1>]*)\\1[^>]*>#im';\n\t\t\t\n// \t\tpreg_match_all( $regex, $html, $matches, PREG_SET_ORDER );\n\t\t\t\n// \t\tforeach ( $matches as $match ) {\n// \t\t\t$uri\t=\tDunUri :: getInstance( $match['link'], true );\n// \t\t\t$uri->setVar( 'language', $wlang );\n// \t\t\t$repl\t=\tstr_replace( $match['link'], $uri->toString(), $match[0] );\n// \t\t\t$html\t=\tstr_replace( $match[0], $repl, $html );\n// \t\t}\n\t\t\n// \t\tJResponse::setBody( $html );\n\t\t\n// \t\treturn true;\n\t}", "title": "" }, { "docid": "488b6c1f34d6c3987e5d5709bfcb58d3", "score": "0.5881527", "text": "public function langsAction() {\n $this->_breadcrumbs->addStep($this->Translate('Языки интерфейса'));\n $this->view->message = $this->Translate('Раздел сайта находится в разработке').'!';\n $this->view->class_message = 'caution';\n }", "title": "" }, { "docid": "652a67535bb073d82ebbffc7d5afad44", "score": "0.58658826", "text": "function getDefaultLanguage() {\n\treturn Lang::getDefault();\n}", "title": "" }, { "docid": "1f8b65643c603ff3d8065da875845a89", "score": "0.5864286", "text": "private function loadI18nTranslator(sfWebRequest $request) {\n\n if ($request->hasParameter('app')) {\n $selected_app = $this->getRequestParameter('app');\n } elseif ($this->getUser()->hasFlash('selected_app')) {\n $selected_app = $this->getUser()->getFlash('selected_app');\n } else {\n $translatorSettings = sfConfig::get('sf_myI18nTranslator', '');\n $arrApps = $translatorSettings['translate_apps'];\n $selected_app = $arrApps[0];\n // $selected_app = sfContext::getInstance ()->getConfiguration ()->getApplication ();\n }\n\n $this->getUser()->setFlash('selected_app', $selected_app);\n $restricted_apps = array();\n /*\n * TODO: esto es para cuando tenga permisos\n if (!$this->getUser()->isSuperAdmin()) {\n $frontend = false;\n $backend = false;\n if ($this->getUser()->hasGroup('traductores del sitio español')) {\n $restricted_apps['frontend'] = 'frontend';\n\n $frontend = true;\n }\n if ($this->getUser()->hasGroup('traductores del admin español')) {\n $restricted_apps['backend'] = 'backend';\n\n $backend = true;\n }\n if ($this->getUser()->hasGroup('translators frontend english')) {\n if (!$frontend)\n $restricted_apps['frontend'] = 'frontend';\n }\n if ($this->getUser()->hasGroup('translators backend english')) {\n if (!$backend)\n $restricted_apps['backend'] = 'backend';\n }\n }\n */\n $this->myI18nTranslator = new myI18nTranslatorHandler(array('selected_app' => $selected_app, 'restrict_to_applications' => $restricted_apps));\n\n\n // levanto el lenguage\n if ($request->hasParameter('lang')) {\n $this->selected_lang = $request->getParameter('lang');\n } elseif ($this->getUser()->hasFlash('selected_lang'))\n $this->selected_lang = $this->getUser()->getFlash('selected_lang');\n\n\n if (!in_array($this->selected_lang, $this->limitLangListByUserPermissions($this->myI18nTranslator->getLangList()))) {\n $tmp = $this->limitLangListByUserPermissions($this->myI18nTranslator->getLangList());\n $this->selected_lang = reset($tmp);\n\n //unset($tmp);\n }\n\n $this->getUser()->setFlash('selected_lang', $this->selected_lang);\n\n // levanto el catalogo\n $selected_catalogue = $request->getParameter('catalogue');\n\n if ($this->getUser()->hasFlash('selected_catalogue')) {\n $selected_catalogue = $this->getUser()->getFlash('selected_catalogue');\n }\n\n if (!in_array($selected_catalogue, $this->myI18nTranslator->getCatalogueList())) {\n $tmp = $this->myI18nTranslator->getCatalogueList();\n $selected_catalogue = reset($tmp);\n unset($tmp);\n }\n\n $this->getUser()->setFlash('selected_catalogue', $selected_catalogue);\n\n\n $this->myI18nTranslator->setSelectedLang($this->selected_lang);\n $this->myI18nTranslator->setSelectedCatalogue($selected_catalogue);\n\n return $this;\n }", "title": "" }, { "docid": "d64fca7855abcf27396f7f1795b702b2", "score": "0.58583415", "text": "function local()\n\t{\n\t\tglobal $l10n;\n\t\t// the global and the check might become obsolete in\n\t\t// further wordpress versions\n\t\t// @see https://core.trac.wordpress.org/ticket/10527\t\t\n\t\tif(!isset($l10n[$this->identifier]))\n\t\t{\n\t\t\tload_plugin_textdomain($this->identifier, false, $this->identifier . '/languages');\n\t\t}\n\t}", "title": "" }, { "docid": "27f6a36bd8904b795c5fd000b2b95ccf", "score": "0.5851041", "text": "function getLanguageForUserApp(){\n\n $languageForUserApp = array(\n //Landing.Html//\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\t'Newuser_SignUp_now' => 'New user SignUp now',\n\t\t\t\t\t\t\t\t'Or_sign_In_with' => 'Or sign In with',\n\t\t\t\t\t\t\t\t'Forgot_Password' => 'Forgot Password',\n\t\t\t\t\t\t\t\t'No_network_connection' => 'No network connection',\n\t\t\t\t\t\t\t\t'Sign_In' => 'Sign In',\n\t\t\t\t\t\t\t //Sign up .Html//\n\t\t\t\t\t\t\t 'SIGN_UP' => 'SIGN UP',\n\t\t\t\t\t\t\t 'Enter_your_name' => 'Enter your name',\n\t\t\t\t\t\t\t\t'Name' => 'Name',\n\t\t\t\t\t\t\t\t'Enter_user_name' => 'Enter user name',\n\t\t\t\t\t\t\t\t'Enter_your_number' => 'Enter your number',\n\t\t\t\t\t\t\t\t'Enter_valid_mobile_number' => 'Enter valid mobile number',\n\t\t\t\t\t\t\t\t'Mobile' => 'Mobile',\n\t\t\t\t\t\t\t\t'Enter_email' => 'Enter email',\n\t\t\t\t\t\t\t\t'Enter_valid_email' => 'Enter valid email',\n\t\t\t\t\t\t\t\t'Enter_Password' => 'Enter Password',\n\t\t\t\t\t\t\t\t'Mail' => 'Mail',\n //Login.html//\n //'sign_up' => 'Sign Up user',\n\t\t\t\t\t\t\t\t'SIGN_IN' => 'SIGN IN',\n\t\t\t\t\t\t\t\t'Enter_username_email_mobile' => 'Enter user name / email / mobile',\n\t\t\t\t\t\t\t\t'Mobile_User_Name_Email' => 'Mobile / User Name / Email',\n\t\t\t\t\t\t\t\t'password' => 'password',\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t //Main Landing.html//\t\n\t\t\t\t\t\t\t\t'CallMy_Cab' => 'pcab',\n\t\t\t\t\t\t\t\t'Enter_Pickup_location' => 'Enter Pickup location',\n\t\t\t\t\t\t\t\t'Enter_Drop_location' => 'Enter Drop location',\n\t\t\t\t\t\t\t\t'Toyota_etios_tata_indigo_maruti_dezire' => 'Toyota etios / tata indigo / maruti dezire',\n\t\t\t\t\t\t\t\t'Fare_Breakup' => 'Fare Breakup',\n\t\t\t\t\t\t\t\t'First' => 'First',\n\t\t\t\t\t\t\t\t'After' => 'After',\n\t\t\t\t\t\t\t\t'Ridetime_rate' => 'Ride time rate',\n\t\t\t\t\t\t\t\t'Airport_rate_may_differ_peaktime_chargesmayapply' => 'Airport rate may differ peak time charges may apply',\n\t\t\t\t\t\t\t\t'RIDE_LATER' => 'RIDE LATER',\n\t\t\t\t\t\t\t\t'RIDE_NOW' => 'RIDE NOW',\n\t\t\t\t\t\t\t\t'Cancel' => 'Cancel',\n\t\t\t\t\t\t\t\t'Book' => 'Book',\n\t\t\t\t\t\t\t //Menu.html//\n\t\t\t\t\t\t\t 'Book_My_Ride' => 'Book My Ride',\n\t\t\t\t\t\t\t\t'My_Trips' => 'My Trips',\n\t\t\t\t\t\t\t\t'Rate_Card' => 'Rate Card',\n\t\t\t\t\t\t\t\t'Logout' => 'Logout',\n\t\t\t\t\t\t\t //My Trip.html//\n\t\t\t\t\t\t\t 'My_Trip' => 'My Trip',\n\t\t\t\t\t\t\t\t'ALL_RIDES' => 'ALL RIDES',\n\t\t\t\t\t\t\t\t'COMPLETED' => 'COMPLETED',\n\t\t\t\t\t\t\t\t'BOOKED' => 'BOOKED',\n\t\t\t\t\t\t\t //Rate Card.html//\n\t\t\t\t\t\t\t 'Rate_Card' => 'Rate Card',\n\t\t\t\t\t\t\t\t'NIGHT' => 'NIGHT',\n\t\t\t\t\t\t\t\t'DAY' => 'DAY',\n\t\t\t\t\t\t\t //Settings.Html//\n 'Profile' => 'Profile',\n\t\t\t\t\t\t\t\t'User_Name' => 'User Name',\n\t\t\t\t\t\t\t\t'MAIL' => 'MAIL',\n\t\t\t\t\t\t\t\t'CHANEGE_PASSWORD' => 'CHANEGE PASSWORD',\n\t\t\t\t\t\t\t\t'Enter_new_Password' => 'Enter new Password',\n\t\t\t\t\t\t\t\t'Minimum_6_characters' => 'Minimum 6 characters',\n\t\t\t\t\t\t\t\t'Passwords_do_not_match' => 'Passwords do not match',\n\t\t\t\t\t\t\t\t'Conform_password' => 'Conform password',\n\t\t\t\t\t\t\t\t'RESET_PASSWORD' => 'RESET PASSWORD',\n\t\t\t\t\t\t\t //Trip Details\n 'Trip_Details' => 'Trip Details',\n\t\t\t\t\t\t\t\t'BOOKING_ID' => 'BOOKING ID',\n\t\t\t\t\t\t\t\t'PICKUP_POINT' => 'PICKUP POINT',\n\t\t\t\t\t\t\t\t'TO' => 'TO',\n\t\t\t\t\t\t\t\t'DROP_POINT' => 'DROP POINT',\n\t\t\t\t\t\t\t\t'VEHICLE_DETAILS' => 'VEHICLE DETAILS',\n\t\t\t\t\t\t\t\t'CAB_TYPE' => 'CAB TYPE',\n\t\t\t\t\t\t\t\t'DRIVER_DETAILS' => 'DRIVER DETAILS',\n\t\t\t\t\t\t\t\t'Payment_Details' => 'Payment Details',\n\t\t\t\t\t\t\t\t'Distance' => 'Distance',\n\t\t\t\t\t\t\t\t'Total_Amount' => 'Total Amount',\n\t\t\t\t\t\t\t\t'SEND_YOUR_FEED_BACK' => 'SEND YOUR FEED BACK',\n //Alerts\n 'Enter_date_and_time' => 'Enter date and time',\n 'Cancel' => 'Cancel',\n 'Save' => 'Save',\n 'success' => 'success',\n 'FAILED' => 'FAILED',\n 'Try again' => 'Try again',\n 'Enter_pickup_location'=>'Enter pickup location',\n 'Enter_Drop_location' => 'Enter Drop location',\n 'Process_Failed' => 'Process Failed!',\n 'Password_successfully_updated'=>'Password successfully updated'\n );\n return $languageForUserApp;\n}", "title": "" }, { "docid": "afe7c1bed3ee9b4f39043357b6f984fc", "score": "0.5841195", "text": "public function get_lang()\n {\n global $cfg;\n\n if ($_POST['language']) {\n $_SESSION['language'] = $_POST['language'];\n } elseif ($_GET['language']) {\n $_SESSION['language'] = $_GET['language'];\n }\n \n if ($_SESSION['language']) {\n $this->language = $_SESSION['language'];\n } elseif ($cfg[\"sys_language\"]) {\n $this->language = $cfg[\"sys_language\"];\n } else {\n $this->language = \"de\";\n }\n\n // Protect from bad Code/Injections\n if (!in_array($this->language, $this->valid_lang)) {\n $this->language = \"de\";\n }\n return $this->language;\n }", "title": "" }, { "docid": "cfea2af02a3204d21efc0fb9ae35a123", "score": "0.5833156", "text": "function getLanguage() {\n\t\tEngine::getLanguage($this);\n\t}", "title": "" }, { "docid": "d94938d3fd3412fff7dc8f1bfda73599", "score": "0.58215284", "text": "public function getCurrentLanguage();", "title": "" }, { "docid": "478e519bfa2b771bd1bf2df93a0d03e7", "score": "0.5819802", "text": "public function bootstrap($app)\n {\n $cookieLanguage = $app->request->cookies['language'];\n if (isset($cookieLanguage) && in_array($cookieLanguage, $this->supportedLanguages)) {\n $app->language = $cookieLanguage;\n\n }\n }", "title": "" }, { "docid": "3e31498df60b693e9bcbdcc42d92c081", "score": "0.5819771", "text": "function set_language($language) {\r\n\r\n // settings you may want to change\r\n $locale = $language; // the locale you want\r\n $locales_root = APPPATH . 'language/locales'; // locales directory\r\n $domain = 'lang'; // the domain you’re using, this is the .PO/.MO file name without the extension\r\n //\r\n // activate the locale setting\r\n setlocale(LC_ALL, $locale);\r\n setlocale(LC_TIME, $locale);\r\n putenv(\"LANG=$locale\");\r\n\r\n // path to the .MO file that we should monitor\r\n $filename = \"$locales_root/$locale/LC_MESSAGES/$domain.mo\";\r\n $mtime = filemtime($filename); // check its modification time\r\n //\r\n // our new unique .MO file\r\n $filename_new = \"$locales_root/$locale/LC_MESSAGES/{$domain}_{$mtime}.mo\";\r\n\r\n if (!file_exists($filename_new)) { // check if we have created it before\r\n // if not, create it now, by copying the original\r\n copy($filename, $filename_new);\r\n }\r\n // compute the new domain name\r\n $domain_new = \"{$domain}_{$mtime}\";\r\n // bind it\r\n bindtextdomain($domain_new, $locales_root);\r\n // then activate it\r\n textdomain($domain_new);\r\n // all done\r\n}", "title": "" }, { "docid": "286e8c030e8585625b4c523c2730dadc", "score": "0.5819624", "text": "function getLanguage()\n {\n return common_language();\n }", "title": "" }, { "docid": "4c1d985448e53e900031c12a3d2d61bb", "score": "0.58155376", "text": "function init_language()\n{\n\tglobal $vboptions, $_BITFIELD, $bbuserinfo, $phrasegroups;\n\tglobal $copyrightyear, $timediff, $timenow, $datenow;\n\n\t// define languageid\n\tdefine('LANGUAGEID', iif(empty($bbuserinfo['languageid']), $vboptions['languageid'], $bbuserinfo['languageid']));\n\n\t// define language direction (preferable to use $stylevar[textdirection])\n\tdefine('LANGUAGE_DIRECTION', iif(($bbuserinfo['lang_options'] & $_BITFIELD['languageoptions']['direction']), 'ltr', 'rtl'));\n\n\t// define html language code (lang=\"xyz\") (preferable to use $stylevar[languagecode])\n\tdefine('LANGUAGE_CODE', $bbuserinfo['lang_code']);\n\n\t// initialize the $vbphrase array\n\t$vbphrase = array();\n\n\t// populate the $vbphrase array with phrase groups\n\tforeach ($phrasegroups AS $phrasegroup)\n\t{\n\t\t$tmp = unserialize($bbuserinfo[\"phrasegroup_$phrasegroup\"]);\n\t\tif (is_array($tmp))\n\t\t{\n\t\t\t$vbphrase = array_merge($vbphrase, $tmp);\n\t\t}\n\t\tunset($bbuserinfo[\"phrasegroup_$phrasegroup\"], $tmp);\n\t}\n\n\t// prepare phrases for construct_phrase / sprintf use\n\t//$vbphrase = preg_replace('/\\{([0-9])+\\}/siU', '%\\\\1$s', $vbphrase);\n\n\t// pre-parse some global phrases\n\t$tzoffset = iif($bbuserinfo['tzoffset'], \" $bbuserinfo[tzoffset]\", '');\n\t$vbphrase['all_times_are_gmt_x_time_now_is_y'] = construct_phrase($vbphrase['all_times_are_gmt_x_time_now_is_y'], $tzoffset, $timenow, $datenow);\n\t$vbphrase['vbulletin_copyright'] = construct_phrase($vbphrase['vbulletin_copyright'], $vboptions['templateversion'], $copyrightyear);\n\t$vbphrase['powered_by_vbulletin'] = construct_phrase($vbphrase['powered_by_vbulletin'], $vboptions['templateversion'], $copyrightyear);\n\t$vbphrase['timezone'] = construct_phrase($vbphrase['timezone'], $timediff, $timenow, $datenow);\n\n\t// all done\n\treturn $vbphrase;\n}", "title": "" }, { "docid": "3778c5ebcf2a2e58ea1af96b68c80376", "score": "0.58054197", "text": "public function setup_translation() {\n\t\t\t// Place it in this plugin's \"languages\" folder and name it \"mp-[value in wp-config].mo\"\n\t\t\t$dir = sprintf( '/%s/languages', basename( ub_dir( '' ) ) );\n\t\t\tload_plugin_textdomain( 'ub', false, $dir );\n\t\t}", "title": "" }, { "docid": "7187b23edcd6a273bc1c84c64fd9c56d", "score": "0.58015156", "text": "function ust_localization() {\n\t// Place it in this plugin's \"languages\" folder and name it \"ust-[locale].mo\"\n\tload_plugin_textdomain( 'ust', false, '/anti-splog/languages' );\n}", "title": "" }, { "docid": "d4529c6d79fefd88967e37d22fde657b", "score": "0.57996094", "text": "protected function _load_languages()\n\t{\n\n\t\t// Load the DataMapper language file\n\t\t$this->lang->load('datamapper');\n\t}", "title": "" }, { "docid": "0f9c227e19d1929841edc84267f6d857", "score": "0.57927805", "text": "private function getDefaultLanguage() {\n\t\tif (config('localization.defaultLanguage') === '') {\n\t\t\t$this->defaultLanguage = config('app.locale');\n\t\t} else {\n\t\t\t$this->defaultLanguage = config('localization.defaultLanguage');\n\t\t}\n\t}", "title": "" }, { "docid": "4696f38c1da3e6fa43f4528007adc722", "score": "0.57865715", "text": "public static function getDefaultLanguage() {\n\t\treturn self::handleLanguage();\n\t}", "title": "" }, { "docid": "8dd106dc0d319be5014cef2b0f37cfd4", "score": "0.5786021", "text": "public function load_localisation () {\n\t\tload_plugin_textdomain( $this->token, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "title": "" }, { "docid": "8dd106dc0d319be5014cef2b0f37cfd4", "score": "0.5786021", "text": "public function load_localisation () {\n\t\tload_plugin_textdomain( $this->token, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "title": "" }, { "docid": "8dd106dc0d319be5014cef2b0f37cfd4", "score": "0.5786021", "text": "public function load_localisation () {\n\t\tload_plugin_textdomain( $this->token, false, dirname( plugin_basename( $this->file ) ) . '/lang/' );\n\t}", "title": "" }, { "docid": "712c99f455fda26b40f5790dbfab060d", "score": "0.5783362", "text": "function onLanguageLoadFramework($event);", "title": "" }, { "docid": "e6e69db3df3c81f776b4ae900742eb41", "score": "0.57826775", "text": "protected function getAppLang() {\n //determine the current language\n $appLang = get_instance()->config->get('default_language');\n //if the language exists in the cookie use it\n $cfgKey = get_instance()->config->get('language_cookie_name');\n $objCookie = & class_loader('Cookie');\n $cookieLang = $objCookie->get($cfgKey);\n if ($cookieLang) {\n $appLang = $cookieLang;\n }\n return $appLang;\n }", "title": "" }, { "docid": "e6fe9327c381e873a7c4415415147ed0", "score": "0.577751", "text": "protected function _initLocale()\n {\n \tdefined('LUMIA_CFG_LOCALE') || define('LUMIA_CFG_LOCALE', 'vi_VN');\n Zend_Registry::set('Zend_Locale', new Zend_Locale(LUMIA_CFG_LOCALE));\n }", "title": "" }, { "docid": "fc1328c606f70b0eb6987139794ff9a1", "score": "0.5771435", "text": "function AddDetailsForDefaultLang(){}", "title": "" }, { "docid": "fa2c6e837552759c8b2c5ab07b80ac90", "score": "0.57712054", "text": "public function useLanguage(): bool\n {\n return config('performs.lang.use', false);\n }", "title": "" }, { "docid": "db6e1ead2d586748a4f67869ff39267f", "score": "0.57706505", "text": "function getLanguage() {\n\treturn Lang::get();\n}", "title": "" }, { "docid": "fdb58100bd64dfa1b6ed0eca9975b880", "score": "0.5770595", "text": "public function init()\r\n {\r\n \tdefined('BASE_URL')\t|| define('BASE_URL', Zend_Controller_Front::getInstance()->getBaseUrl());\r\n \t$tr = Application_Form_FrmLanguages::getCurrentlanguage();\r\n }", "title": "" }, { "docid": "b1414ae2a40845081833094c8c521fbc", "score": "0.5762895", "text": "private function getDefaultLanguage() {\n\t\tif(isset($_GET['SET_LANGUAGE']) && $this->hasLanguage($_GET['SET_LANGUAGE'])) {\n\t\t\treturn $_GET['SET_LANGUAGE'];\n\t\t}\n\t\t\n\t\t$browserLanguages= Request::get()->getAcceptLanguages();\n\t\tforeach($browserLanguages as $lang){\n\t\t\t$lang = str_replace('-','_',explode(';', $lang)[0]);\n\t\t\tif(core\\Environment::get()->getInstallFolder()->getFile('go/modules/core/language/'.$lang.'.php')->exists()){\n\t\t\t\treturn $lang;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn \"en\";\n\t}", "title": "" }, { "docid": "b727d30b974361157527b26147c9c158", "score": "0.57566667", "text": "function lang_dselect ($rien='') {\n\tglobal $pile_langues;\n\tlcm_set_language(array_pop($pile_langues));\n}", "title": "" }, { "docid": "0865235822e7339d14416733bb54e7be", "score": "0.5753733", "text": "private function loadMultilanguage() {\r\n if (!defined('WP_PLUGIN_DIR')) {\r\n load_plugin_textdomain(_PLUGIN_NAME_, _PLUGIN_NAME_ . '/languages/');\r\n } else {\r\n load_plugin_textdomain(_PLUGIN_NAME_, null, _PLUGIN_NAME_ . '/languages/');\r\n }\r\n }", "title": "" }, { "docid": "a6bbea7737ecb78c54b771273db81de4", "score": "0.57487625", "text": "function lcm_set_language_from_browser() {\n\t$accept_langs = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);\n\n\tif (isset($_COOKIE['lcm_lang']))\n\t\tif (lcm_set_language($_COOKIE['lcm_lang']))\n\t\t\treturn $_COOKIE['lcm_lang'];\n\n\tif (is_array($accept_langs)) {\n\t\twhile(list(, $s) = each($accept_langs)) {\n\t\t\tif (eregi('^([a-z]{2,3})(-[a-z]{2,3})?(;q=[0-9.]+)?$', trim($s), $r)) {\n\t\t\t\t$lang = strtolower($r[1]);\n\t\t\t\tif (lcm_set_language($lang)) return $lang;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "577ba7e527403c89dbd69eb38740e58a", "score": "0.57447976", "text": "protected function _setCurrentLanguage()\n {\n $this->currentLanguage = $this->request->getParam('lang') ;\n if (!$this->currentLanguage) {\n $this->currentLanguage = 'USD';\n }\n }", "title": "" }, { "docid": "668e25463653689d8dc8fac6bdb09eca", "score": "0.5736441", "text": "final public function AssignLang() {\n if (NetDesign::GetCMSVersion() == 1) {\n $this->smarty->assign('lang', current($this->langhash));\n } else {\n // The following two lines are a dirty way to make sure the language is loaded\n CmsLangOperations::key_exists('');\n $this->Lang('--dummy--');\n // Make sure we have a default (empty) lang array\n $this->smarty->assign('lang', array());\n // Try to fill the array with all language variables\n $data = &CmsLangOperations::$_langdata;\n $clng = CmsNlsOperations::get_current_language();\n $mod = $this->GetName();\n if (!array_key_exists($clng, $data)) return;\n if (!array_key_exists($mod, $data[$clng])) return;\n $this->smarty->assign('lang', $data[$clng][$mod]);\n }\n }", "title": "" }, { "docid": "0b896547f9b6cefe3dff9abf1dd57d1f", "score": "0.57361096", "text": "public function language($language);", "title": "" }, { "docid": "1a2909e9567de0134a5184d1f567796c", "score": "0.572744", "text": "function setLang() {\n $jsDir=\"../../../src/\"; // this path will be application specific, the rest of this code should not require any customization\n $lang=strtolower($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"]);\n $arLang=explode(\",\",$lang);\n for ($i=0; $i<count($arLang); $i++)\n {\n $lang2=strtolower(substr(trim($arLang[$i]),0,2));\n if ($lang2=='en') break;\n $fname=\"translations/livegrid_\".$lang2.\".js\";\n if (file_exists($jsDir.$fname))\n {\n echo \"Rico.include('\".$fname.\"');\";\n break;\n } \n }\n}", "title": "" }, { "docid": "037578e3144b0894f8e951afea4f75fd", "score": "0.5724317", "text": "public function getLanguage();", "title": "" }, { "docid": "037578e3144b0894f8e951afea4f75fd", "score": "0.5724317", "text": "public function getLanguage();", "title": "" }, { "docid": "037578e3144b0894f8e951afea4f75fd", "score": "0.5724317", "text": "public function getLanguage();", "title": "" }, { "docid": "037578e3144b0894f8e951afea4f75fd", "score": "0.5724317", "text": "public function getLanguage();", "title": "" }, { "docid": "ea43f15d349fb6ae68c8e5334041622c", "score": "0.5723765", "text": "public static function setLocale(string $language): void\n {\n $application = (!defined('APPLICATION') || APPLICATION === 'Console') ? 'Backend' : APPLICATION;\n\n // validate file, generate it if needed\n if (!is_file(BACKEND_CACHE_PATH . '/Locale/en.json')) {\n BackendLocaleModel::buildCache('en', $application);\n }\n if (!is_file(BACKEND_CACHE_PATH . '/Locale/' . $language . '.json')) {\n // if you use the language in the console act like it is in the backend\n BackendLocaleModel::buildCache($language, $application);\n }\n\n // store\n self::$currentInterfaceLanguage = $language;\n\n // attempt to set a cookie\n try {\n // Needed to make it possible to use the backend language in the console.\n if (defined('APPLICATION') && APPLICATION !== 'Console') {\n Model::getContainer()->get('fork.cookie')->set('interface_language', $language);\n }\n } catch (RuntimeException|ServiceNotFoundException $e) {\n // settings cookies isn't allowed, because this isn't a real problem we ignore the exception\n }\n\n // set English translations, they'll be the fallback\n $translations = json_decode(\n file_get_contents(BACKEND_CACHE_PATH . '/Locale/en.json'),\n true\n );\n self::$err = (array) ($translations['err'] ?? []);\n self::$lbl = (array) ($translations['lbl'] ?? []);\n self::$msg = (array) ($translations['msg'] ?? []);\n\n // overwrite with the requested language's translations\n $translations = json_decode(\n file_get_contents(BACKEND_CACHE_PATH . '/Locale/' . $language . '.json'),\n true\n );\n $err = (array) ($translations['err'] ?? []);\n $lbl = (array) ($translations['lbl'] ?? []);\n $msg = (array) ($translations['msg'] ?? []);\n foreach ($err as $module => $translations) {\n if (!isset(self::$err[$module])) {\n self::$err[$module] = [];\n }\n self::$err[$module] = array_merge(self::$err[$module], $translations);\n }\n foreach ($lbl as $module => $translations) {\n if (!isset(self::$lbl[$module])) {\n self::$lbl[$module] = [];\n }\n self::$lbl[$module] = array_merge(self::$lbl[$module], $translations);\n }\n foreach ($msg as $module => $translations) {\n if (!isset(self::$msg[$module])) {\n self::$msg[$module] = [];\n }\n self::$msg[$module] = array_merge(self::$msg[$module], $translations);\n }\n }", "title": "" }, { "docid": "3a0dda8a0a88dce0f2f44cee664ec80c", "score": "0.5721809", "text": "function nb_gaci_load_translation () {\n\t\tload_plugin_textdomain('nb_gaci', false, dirname( plugin_basename( __FILE__ ) ) . '/lang');\n\t}", "title": "" }, { "docid": "88b8accdc71c4a07b98b177ccb76a914", "score": "0.5719567", "text": "protected function load_lang() {\n\n if ($this->uri->segment(1) == 'en' ||\n $this->uri->segment(1) == 'fr'||\n $this->uri->segment(1) == 'es'||\n $this->uri->segment(1) == 'bn'\n ) {\n $this->session->set_userdata(\"lang\", $this->uri->segment(1));\n redirect($this->session->flashdata('redirectToCurrent'));\n }\n\n if ($this->session->userdata('lang') == \"es\") {\n $lang = \"spanish\";\n $this->config->set_item('language',$lang);\n $this->session->set_userdata(\"lang\",'es');\n } elseif ($this->session->userdata('lang') == \"fr\") {\n $lang = \"french\";\n $this->config->set_item('language',$lang);\n $this->session->set_userdata(\"lang\",'fr');\n }elseif ($this->session->userdata('lang') == \"bn\") {\n $lang = \"bangla\";\n $this->config->set_item('language',$lang);\n $this->session->set_userdata(\"lang\",'bn');\n }else {\n $lang = \"english\";\n $this->config->set_item('language',$lang);\n $this->session->set_userdata(\"lang\",'en');\n }\n\n // $this->lang->load($moduleName, $lang);\n }", "title": "" }, { "docid": "7a49b19e8fd094291b6bc35cb3210334", "score": "0.57163215", "text": "protected function _initTranslate()\n {\n $this->bootstrap('Locale');\n \t\n \t$translate = new Zend_Translate(array(\n \t\t'adapter' => 'array',\n \t\t'content' => APPLICATION_PATH . '/languages',\n \t\t'locale' => Zend_Registry::get('Zend_Locale')->toString(),\n 'scan' => Zend_Translate::LOCALE_FILENAME,\n 'disableNotices' => true,\n 'logUntranslated' => false\n ));\n \t\n Zend_Registry::set('Zend_Translate', $translate);\n Lumia_Translator::set($translate);\n }", "title": "" }, { "docid": "eb41b6c295da1a7b39df41b6aa3069dc", "score": "0.57124555", "text": "public function getClientLanguage();", "title": "" }, { "docid": "84316edde8e997840c0d6a7e44ba30c1", "score": "0.5709413", "text": "function setLanguageEnvironment($language = null, $app = null)\n {\n if (empty($app)) {\n $app = $GLOBALS['registry']->getApp();\n }\n NLS::setLang($language);\n NLS::setTextdomain(\n $app,\n $GLOBALS['registry']->get('fileroot', $app) . '/locale',\n NLS::getCharset());\n String::setDefaultCharset(NLS::getCharset());\n }", "title": "" }, { "docid": "6d3da5b98adf8ef34fd07917bcd5deac", "score": "0.5690328", "text": "function setLanguage($lang='') {\n\t\t$GLOBALS['tx_extjs']['language'] = (string)trim($lang);\n\t}", "title": "" }, { "docid": "2043e1eeb5d6aaecffd933cd23db9eaf", "score": "0.5685741", "text": "function set_language($code) {\n $code .= substr($code,-4)=='.php' ? '' : '.php';\n // require system language files & then overwrite w/app's, in any\n @include($GLOBALS['conf']['sys_home'].\"lang/$code\");\n @include($GLOBALS['conf']['app_home'].\"lang/$code\");\n // set_language always sets some language, so return TRUE regardless\n return TRUE;\n }", "title": "" }, { "docid": "62bdab64c2d4f4e77a4e4caa74ab63ce", "score": "0.56801814", "text": "static public function get_language(Application $app)\n\t{\n\t\treturn $app->locale->language;\n\t}", "title": "" }, { "docid": "3ad8a62b80d8b4cab62e78d01956c71e", "score": "0.5676307", "text": "function some_initialization()\n {\n if($this->language_code == 'be-x-old') $this->language_code = 'be-tarask';\n \n //some default translations:\n $trans['Page']['en'] = \"Page\";\n $trans['Modified']['en'] = \"Modified\";\n $trans['Retrieved']['en'] = \"Retrieved\";\n $trans['Page']['de'] = \"Seite\";\n $trans['Modified']['de'] = \"Bearbeitungsstand\";\n $trans['Retrieved']['de'] = \"Abgerufen\";\n $trans['Page']['es'] = \"Página\";\n $trans['Modified']['es'] = \"Modificado\";\n $trans['Retrieved']['es'] = \"Recuperado\";\n $trans['Page']['fr'] = \"Page\";\n $trans['Modified']['fr'] = \"Modifié\";\n $trans['Retrieved']['fr'] = \"Récupéré\";\n \n /* *** szl nv pnb br mrj nn hsb pms azb sco zh-yue ia oc qu koi frr udm ba an zh-min-nan sw te io kv csb fo os cv kab sah nds lmo pa wa vls gv wuu nah dsb kbd to mdf \n li as olo mhr pcd vep se gn rue ckb bh myv scn dv pam xmf cdo bar nap lfn vo nds-nl bo stq inh lbe lij lez sa ace diq ce vec sc ln hak kw bcl za av chy fj ik zea\n bxr bjn arz mwl chr mai tcy szy mzn wo ab ban ay tyv atj new rm ltg ext kl nrm rn dty\n --> to avoid re-doing lookup_cache() knowing the remote won't respond */\n /*\n $lang = 'dty';\n $trans['Page'][$lang] = \"Page\";\n $trans['Modified'][$lang] = \"Modified\";\n $trans['Retrieved'][$lang] = \"Retrieved\";\n $trans['Wikipedia authors and editors'][$lang] = \"Wikipedia authors and editors\";\n */\n \n // assignments for languages without default values:\n $func = new WikipediaRegionalAPI($this->resource_id, $this->language_code);\n $terms = array('Wikipedia authors and editors', 'Page', 'Modified', 'Retrieved');\n foreach($terms as $term) {\n if($val = @$trans[$term][$this->language_code]) $this->pre_trans[$term] = $val;\n else $this->pre_trans[$term] = $func->translate_source_target_lang($term, \"en\", $this->language_code);\n }\n $this->trans['editors'][$this->language_code] = $this->pre_trans['Wikipedia authors and editors'];\n }", "title": "" }, { "docid": "dafd8be7fb3d696bf3986e273d0ea231", "score": "0.5670551", "text": "protected function _checkBrowserLanguage(){\n if(!$this->Session->check('Config.language')){\n \n //checking the 1st favorite language of the user's browser \n $languageHeader = $this->request->header('Accept-language');\n $languageHeader = substr($languageHeader, 0, 2);\n \n //available languages\n switch ($languageHeader){\n case \"en\":\n $this->Session->write('Config.language', 'en');\n break;\n case \"es\":\n $this->Session->write('Config.language', 'es');\n break;\n default:\n $this->Session->write('Config.language', 'en');\n }\n }\n }", "title": "" } ]
44427224f48b5202d75e4f8eb29a2c3d
Get entity type id
[ { "docid": "0c6e7f3e00ebb3c1b9b64283d3bd6482", "score": "0.77573746", "text": "protected function _getEntityTypeId()\n {\n if (!$this->_entityTypeId) {\n $entityType = $this->_eavConfig->getEntityType('catalog_product');\n $this->_entityTypeId = $entityType->getId();\n }\n return $this->_entityTypeId;\n }", "title": "" } ]
[ { "docid": "4126427502fd7d7453a2b87bddeff608", "score": "0.8319674", "text": "public function getEntityTypeId() : string {\n return $this->entityTypeId;\n }", "title": "" }, { "docid": "8fde4a19bf2690cfe623a51e1568131c", "score": "0.81472266", "text": "public function getTypeId()\n {\n return (int)$this->getEntityType()->getEntityTypeId();\n }", "title": "" }, { "docid": "74710a4e685469310fb5653fe2088b6e", "score": "0.81214017", "text": "protected function _getEntityTypeId()\n {\n $collection = Mage::getModel('eav/entity_type')->getCollection()\n ->addFieldToFilter('entity_type_code', 'catalog_product');\n $item = $collection->getFirstItem();\n return $item->getId();\n }", "title": "" }, { "docid": "b58a5e88d46cf1f1c4814391d53c822e", "score": "0.8029714", "text": "public function getLocalEntityTypeId() : string;", "title": "" }, { "docid": "7ddca1a01776ca41c61970f8394d1216", "score": "0.79693455", "text": "public function getEntityTypeId()\n {\n if ($this->_entityTypeId === null) {\n $this->_entityTypeId = $this->_configFactory->create()->getEntityTypeId();\n }\n return $this->_entityTypeId;\n }", "title": "" }, { "docid": "d1a6b6e6d26c3840c6a96aa3e16c27be", "score": "0.7897535", "text": "abstract public function getEntityTypeId(): int;", "title": "" }, { "docid": "7ce8430c516869dea35a00f113b6abdc", "score": "0.786748", "text": "public function type_id();", "title": "" }, { "docid": "166aa551022903e74f5fa44788830042", "score": "0.7430873", "text": "public function getTypeId()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "da60e9595d0091c3ea9db0cbff9d19b3", "score": "0.74140006", "text": "public function getId() {\n if (method_exists($this->entity, 'identifier')) {\n return $this->entity->identifier();\n }\n $info = entity_get_info($this->getEntityType());\n $key = isset($info['entity keys']['name']) ? $info['entity keys']['name'] : $info['entity keys']['id'];\n\n return isset($this->entity->$key) ? $this->entity->$key : NULL;\n }", "title": "" }, { "docid": "882cf579f33a515838f5ccd5a6d640ae", "score": "0.73932314", "text": "public function getIdType():int\n {\n return $this->idType;\n }", "title": "" }, { "docid": "72b6cbc4115e17a0ec86542cea936abb", "score": "0.7387979", "text": "public function getProductEntityTypeId()\n {\n return $this->eavEntityModel->setType(EavAttributesModel::PRODUCT_ENTITY)->getTypeId();\n }", "title": "" }, { "docid": "3a1a499b875348ae1d03e118f7289d57", "score": "0.73863643", "text": "public function getTypeId() {\n return $this->type_id;\n }", "title": "" }, { "docid": "a225865aea255ad18c8e61d5e92598eb", "score": "0.738207", "text": "function getTypeId()\n\t{\n\t\treturn $this->type_id;\n\t}", "title": "" }, { "docid": "5c42973ac296ed0f16fb2059a6fd3a27", "score": "0.7365832", "text": "public function getEntityTypeId($code)\n {\n return $this->entity->setType($code)->getTypeId();\n }", "title": "" }, { "docid": "2b708f5685903a963f9164f7e119729c", "score": "0.73334414", "text": "static function getEntityType();", "title": "" }, { "docid": "f2888cb24a2f5b16ee57c8e8add1da25", "score": "0.72905153", "text": "public function getCategoryEntityTypeId() {\n return get_called_class()::CATEGORY_ENTITY_TYPE_ID;\n }", "title": "" }, { "docid": "e473b82d4c77eb96a4d33895f4ebf6fb", "score": "0.7239907", "text": "public function getEntityTypeId($entityTypeCode = null);", "title": "" }, { "docid": "4ca5f31d224cf91b46e7a8b5c5a9fe22", "score": "0.72045946", "text": "public function getType_id()\n {\n return $this->type_id;\n }", "title": "" }, { "docid": "e0fce3ffd86645c851bba05731b3b9ac", "score": "0.71907705", "text": "protected function getEntityType()\n {\n return self::ENTITY_TYPE;\n }", "title": "" }, { "docid": "de51e0ea13d7aa9ca3938d700117accd", "score": "0.718843", "text": "public function getTypeIdAttribute() {\n return $this->attributes['type_id'];\n }", "title": "" }, { "docid": "bdea0f93bfe603e981f81104d183106e", "score": "0.7181399", "text": "public function getTargetEntityTypeId();", "title": "" }, { "docid": "bdea0f93bfe603e981f81104d183106e", "score": "0.7181399", "text": "public function getTargetEntityTypeId();", "title": "" }, { "docid": "bdea0f93bfe603e981f81104d183106e", "score": "0.7181399", "text": "public function getTargetEntityTypeId();", "title": "" }, { "docid": "9ec3df3624ea733f3f4253694f4206c9", "score": "0.7138425", "text": "public function getType()\n {\n return $this->getEntityType()->getEntityTypeCode();\n }", "title": "" }, { "docid": "f10807e71fb5ee567979fcc4ce473433", "score": "0.7044949", "text": "public function getId()\n {\n $this->entity->getId();\n }", "title": "" }, { "docid": "d0efb3a5fb8dcdeb904c13bcdd758b60", "score": "0.70357", "text": "abstract public function getEntityType();", "title": "" }, { "docid": "6f66f144fd1598bc7a3e94ffc9581c51", "score": "0.70254076", "text": "public function id() {\n return $this->entity->id();\n }", "title": "" }, { "docid": "aa5e8ee230d14d05ca987f9fc086b1cd", "score": "0.69863474", "text": "public function getEntityType();", "title": "" }, { "docid": "b7a5144d198e24deaca94f54a291f00d", "score": "0.69523084", "text": "function getTypeId(){\n return $this->typeId; \n }", "title": "" }, { "docid": "6f0aaea9d2fbab47d66fad07e3a95e12", "score": "0.69360876", "text": "protected abstract function getEntityType();", "title": "" }, { "docid": "8849a90dc2bc9a4fad14ff1410d9f2e4", "score": "0.69076526", "text": "protected function getFlagType($entity_type) {\n $all_flag_types = $this->container->get('plugin.manager.flag.flagtype')->getDefinitions();\n\n // Search and return the flag type ID that matches our entity.\n foreach ($all_flag_types as $plugin_id => $plugin_def) {\n if ($plugin_def['entity_type'] == $entity_type) {\n return $plugin_id;\n }\n }\n\n // Return the generic entity flag type plugin ID.\n return 'entity';\n }", "title": "" }, { "docid": "cf83b52bbe7161511dbb5bf8a2771ab4", "score": "0.69012815", "text": "public function getEntityId();", "title": "" }, { "docid": "cf83b52bbe7161511dbb5bf8a2771ab4", "score": "0.69012815", "text": "public function getEntityId();", "title": "" }, { "docid": "a61b3b378e53fff4b6267a33f485d33a", "score": "0.689567", "text": "static public function id_from($entity) {\n return ($entity instanceof DB_ORM_Entity) ? $entity['id'] : (int) $entity;\n }", "title": "" }, { "docid": "cad74b97f46f9cb579a8335198b73dfd", "score": "0.6873873", "text": "public function entityId(): int\n {\n return $this->entityid;\n }", "title": "" }, { "docid": "47d585fcca289ef8778c07a951b1e4cd", "score": "0.6810915", "text": "private function getObjectEntityType() {\n // If the function is being called from static context and $this->entity_type is defined, then return it.\n if (!is_null($this->entity_type)) {\n return $this->entity_type;\n }\n\n return self::getClassEntityType();\n }", "title": "" }, { "docid": "50ee850c0c9f6b40910ef0f9119af60f", "score": "0.67969674", "text": "protected function determineEntityTypeId($class, $context) {\n // Get the entity type ID while letting context override the $class param.\n return !empty($context['entity_type']) ? $context['entity_type'] : $this->getEntityTypeRepository()->getEntityTypeFromClass($class);\n }", "title": "" }, { "docid": "a71816cd8ab612184f3a30d2d2416048", "score": "0.67935926", "text": "public function getEntityId()\n {\n return $this->getData($this->getEntityConfig('entity_id'));\n }", "title": "" }, { "docid": "ed5fcaaa67f0c728a3e42be4fb7cf275", "score": "0.6755492", "text": "public function getEntityId(): int;", "title": "" }, { "docid": "6eac54c9857dcf4a4ff42d9fa12d41c8", "score": "0.67245215", "text": "public function getEntityId():string;", "title": "" }, { "docid": "cb40e1317a863c4e626ae9f0fed808a5", "score": "0.6702695", "text": "public static function getEntity(){\n $entity = Entity::getCurrentEntity();\n return $entity->id;\n }", "title": "" }, { "docid": "2a1df968e88da64888b857dadcd64000", "score": "0.6700454", "text": "public function getEntityId()\n {\n return $this->entity_id;\n }", "title": "" }, { "docid": "445758e074af3d9fab7139890b782f8d", "score": "0.667778", "text": "public function get_entity_id(){\n\t\treturn $this->entity_id;\n\t}", "title": "" }, { "docid": "883948f665e6748061f4cbe8d436c227", "score": "0.66644794", "text": "public function _getEntityTypeId ($name = 'catalog_product')\n{\n return Mage::getModel ('eav/entity')->setType ($name)->getTypeId ();\n}", "title": "" }, { "docid": "201ac793ca9afc780827ba122fc14bc9", "score": "0.6645431", "text": "public function GetEntityType() {\n\t\t\t$params = $this->_Ch->Parameters(true);\n\n\t\t\treturn strtolower($params['type']);\n\t\t}", "title": "" }, { "docid": "783e32ff5fae8540b8044fd6bf0392e2", "score": "0.6620516", "text": "public function getEntityTypeID()\n\t{\n\t\treturn \\CCrmOwnerType::Contact;\n\t}", "title": "" }, { "docid": "e8a4a2f29d7170635f960b6f0d3ba823", "score": "0.6594059", "text": "public static function objectID( $type ) {\n\t\tif ( is_numeric( $type ) )\n\t\t\treturn $type;\n\n\t\t// let's not deal with strangeLetterCasing; lowercase ftw\n\t\t$type = strtolower( $type );\n\t\t// find the objectID\n\t\tswitch( $type ) {\n\t\t\tcase 'automationlogitems':\n\t\t\t\t$id = 100;\n\t\t\t\tbreak;\n\t\t\tcase 'blasts':\n\t\t\t\t$id = 13;\n\t\t\t\tbreak;\n\t\t\tcase 'campaignbuilderitems':\n\t\t\t\t$id = 140;\n\t\t\t\tbreak;\n\t\t\tcase 'campaigns':\n\t\t\t\t$id = 75;\n\t\t\t\tbreak;\n\t\t\tcase 'commissions':\n\t\t\t\t$id = 38;\n\t\t\t\tbreak;\n\t\t\tcase 'contacts':\n\t\t\t\t$id = 0;\n\t\t\t\tbreak;\n\t\t\tcase 'contents':\n\t\t\t\t$id = 78;\n\t\t\t\tbreak;\n\t\t\tcase 'couponcodes':\n\t\t\t\t$id = 124;\n\t\t\t\tbreak;\n\t\t\tcase 'couponproducts':\n\t\t\t\t$id = 125;\n\t\t\t\tbreak;\n\t\t\tcase 'coupons':\n\t\t\t\t$id = 123;\n\t\t\t\tbreak;\n\t\t\tcase 'creditcards':\n\t\t\t\t$id = 45;\n\t\t\t\tbreak;\n\t\t\tcase 'customdomains':\n\t\t\t\t$id = 58;\n\t\t\t\tbreak;\n\t\t\tcase 'customervalueitems':\n\t\t\t\t$id = 96;\n\t\t\t\tbreak;\n\t\t\tcase 'customobjectrelationships':\n\t\t\t\t$id = 102;\n\t\t\t\tbreak;\n\t\t\tcase 'customobjects':\n\t\t\t\t$id = 99;\n\t\t\t\tbreak;\n\t\t\tcase 'deletedorders':\n\t\t\t\t$id = 146;\n\t\t\t\tbreak;\n\t\t\tcase 'facebookapps':\n\t\t\t\t$id = 53;\n\t\t\t\tbreak;\n\t\t\tcase 'forms':\n\t\t\t\t$id = 122;\n\t\t\t\tbreak;\n\t\t\tcase 'fulfillmentlists':\n\t\t\t\t$id = 19;\n\t\t\t\tbreak;\n\t\t\tcase 'gateways':\n\t\t\t\t$id = 70;\n\t\t\t\tbreak;\n\t\t\tcase 'groups':\n\t\t\t\t$id = 3;\n\t\t\t\tbreak;\n\t\t\tcase 'imapsettings':\n\t\t\t\t$id = 101;\n\t\t\t\tbreak;\n\t\t\tcase 'invoices': // not an actual ontraport type, but when transactions are returned with WontrapiGo::get_object_meta( 'Transactions' ) they are referred to as \"Invoice\"\n\t\t\t\t$id = 46;\n\t\t\t\tbreak;\n\t\t\tcase 'landingpages':\n\t\t\t\t$id = 20;\n\t\t\t\tbreak;\n\t\t\tcase 'leadrouters':\n\t\t\t\t$id = 69;\n\t\t\t\tbreak;\n\t\t\tcase 'leadsources':\n\t\t\t\t$id = 76;\n\t\t\t\tbreak;\n\t\t\tcase 'logitems':\n\t\t\t\t$id = 4;\n\t\t\t\tbreak;\n\t\t\tcase 'mediums':\n\t\t\t\t$id = 77;\n\t\t\t\tbreak;\n\t\t\tcase 'messages':\n\t\t\t\t$id = 7;\n\t\t\t\tbreak;\n\t\t\tcase 'messagetemplates':\n\t\t\t\t$id = 68;\n\t\t\t\tbreak;\n\t\t\tcase 'notes':\n\t\t\t\t$id = 12;\n\t\t\t\tbreak;\n\t\t\tcase 'offers':\n\t\t\t\t$id = 65;\n\t\t\t\tbreak;\n\t\t\tcase 'openorders':\n\t\t\t\t$id = 44;\n\t\t\t\tbreak;\n\t\t\tcase 'orders':\n\t\t\t\t$id = 52;\n\t\t\t\tbreak;\n\t\t\tcase 'partnerproducts':\n\t\t\t\t$id = 87;\n\t\t\t\tbreak;\n\t\t\tcase 'partnerprograms':\n\t\t\t\t$id = 35;\n\t\t\t\tbreak;\n\t\t\tcase 'partnerpromotionalitems':\n\t\t\t\t$id = 40;\n\t\t\t\tbreak;\n\t\t\tcase 'partners':\n\t\t\t\t$id = 36;\n\t\t\t\tbreak;\n\t\t\tcase 'postcardorders':\n\t\t\t\t$id = 27;\n\t\t\t\tbreak;\n\t\t\tcase 'products':\n\t\t\t\t$id = 16;\n\t\t\t\tbreak;\n\t\t\tcase 'productsaleslogs':\n\t\t\t\t$id = 95;\n\t\t\t\tbreak;\n\t\t\tcase 'purchasehistorylogs':\n\t\t\t\t$id = 30;\n\t\t\t\tbreak;\n\t\t\tcase 'purchases':\n\t\t\t\t$id = 17;\n\t\t\t\tbreak;\n\t\t\tcase 'referrals':\n\t\t\t\t$id = 37;\n\t\t\t\tbreak;\n\t\t\tcase 'roles':\n\t\t\t\t$id = 61;\n\t\t\t\tbreak;\n\t\t\tcase 'rules':\n\t\t\t\t$id = 6;\n\t\t\t\tbreak;\n\t\t\tcase 'salesreportitems':\n\t\t\t\t$id = 94;\n\t\t\t\tbreak;\n\t\t\tcase 'scheduledbroadcasts':\n\t\t\t\t$id = 23;\n\t\t\t\tbreak;\n\t\t\tcase 'sequences':\n\t\t\t\t$id = 5;\n\t\t\t\tbreak;\n\t\t\tcase 'sequencesubscribers':\n\t\t\t\t$id = 8;\n\t\t\t\tbreak;\n\t\t\tcase 'shippedpackages':\n\t\t\t\t$id = 47;\n\t\t\t\tbreak;\n\t\t\tcase 'shippingcollecteditems':\n\t\t\t\t$id = 97;\n\t\t\t\tbreak;\n\t\t\tcase 'shippingfulfillmentruns':\n\t\t\t\t$id = 49;\n\t\t\t\tbreak;\n\t\t\tcase 'shippingmethods':\n\t\t\t\t$id = 64;\n\t\t\t\tbreak;\n\t\t\tcase 'smartforms':\n\t\t\t\t$id = 22; // informed guess from https://api.ontraport.com/doc/#retrieve-smartform-meta\n\t\t\t\tbreak;\n\t\t\tcase 'staffs': // now 'users'\n\t\t\t\t$id = 2;\n\t\t\t\tbreak;\n\t\t\tcase 'subscriberretentionitems':\n\t\t\t\t$id = 92;\n\t\t\t\tbreak;\n\t\t\tcase 'subscriptionsaleitems':\n\t\t\t\t$id = 93;\n\t\t\t\tbreak;\n\t\t\tcase 'tags':\n\t\t\t\t$id = 14;\n\t\t\t\tbreak;\n\t\t\tcase 'tagsubscribers':\n\t\t\t\t$id = 138;\n\t\t\t\tbreak;\n\t\t\tcase 'taskhistoryitems':\n\t\t\t\t$id = 90;\n\t\t\t\tbreak;\n\t\t\tcase 'tasknotes':\n\t\t\t\t$id = 89;\n\t\t\t\tbreak;\n\t\t\tcase 'taskoutcomes':\n\t\t\t\t$id = 66;\n\t\t\t\tbreak;\n\t\t\tcase 'tasks':\n\t\t\t\t$id = 1;\n\t\t\t\tbreak;\n\t\t\tcase 'taxes':\n\t\t\t\t$id = 63;\n\t\t\t\tbreak;\n\t\t\tcase 'taxescollecteditems':\n\t\t\t\t$id = 98;\n\t\t\t\tbreak;\n\t\t\tcase 'terms':\n\t\t\t\t$id = 79;\n\t\t\t\tbreak;\n\t\t\tcase 'trackedlinks':\n\t\t\t\t$id = 80;\n\t\t\t\tbreak;\n\t\t\tcase 'transactions':\n\t\t\t\t$id = 46;\n\t\t\t\tbreak;\n\t\t\tcase 'upsellforms':\n\t\t\t\t$id = 42;\n\t\t\t\tbreak;\n\t\t\tcase 'urlhistoryitems':\n\t\t\t\t$id = 88;\n\t\t\t\tbreak;\n\t\t\tcase 'users':\n\t\t\t\t$id = 2;\n\t\t\t\tbreak;\n\t\t\tcase 'webhooks':\n\t\t\t\t$id = 145;\n\t\t\t\tbreak;\n\t\t\tcase 'wordpressmemberships':\n\t\t\t\t$id = 43;\n\t\t\t\tbreak;\n\t\t\tcase 'wordpresssites':\n\t\t\t\t$id = 67;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$id = '';\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $id;\n\t}", "title": "" }, { "docid": "b5e85e20affb67b2c5bde0ceefdef5db", "score": "0.65933675", "text": "public function entityUuidInfo($entity_type, $id) {\n return $this->deployManager->getEntityUuidById($entity_type, $id);\n }", "title": "" }, { "docid": "4ff804be11a305a36d5ae45f4eed04a8", "score": "0.65872604", "text": "public function getEntityType() {\n return $this->getEntity()->getType();\n }", "title": "" }, { "docid": "a606e5bdb936896b078a9941870e1201", "score": "0.65410024", "text": "protected function _getEntityTypeCode()\n {\n return $this->entityTypeCode;\n }", "title": "" }, { "docid": "eb78e7cff6e60c23570fa83d22caded7", "score": "0.651002", "text": "public function entityObjectType()\r\n {\r\n return \"\";\r\n }", "title": "" }, { "docid": "18139e3067e66b572242bebdb80b2439", "score": "0.6466618", "text": "private function getProductEntityIdentifierField()\n {\n if (!$this->productEntityIdentifierField) {\n $this->productEntityIdentifierField = $this->getMetadataPool()\n ->getMetadata(\\Magento\\Catalog\\Api\\Data\\ProductInterface::class)\n ->getIdentifierField();\n }\n return $this->productEntityIdentifierField;\n }", "title": "" }, { "docid": "9b726c197478d97d5a16f40008796a7d", "score": "0.64628947", "text": "final function getFile_type_id() {\n\t\treturn $this->getFileTypeId();\n\t}", "title": "" }, { "docid": "a7e9770944f2cbc22d0b84cb174d83c7", "score": "0.64575255", "text": "public function getId()\n {\n return $this->getMetadata()->getId();\n }", "title": "" }, { "docid": "42c1416da56c24331ac9374de18fcad5", "score": "0.6438924", "text": "protected function _getId($entity)\n {\n $entityClass = get_class($entity);\n \n $reflEntity = new \\ReflectionObject($entity);\n \n // if getId method not found\n if ( ! $reflEntity->hasMethod('getId') ) {\n $errorMessage = '['.$entityClass.'] doesn\\'t implement getId() method';\n throw new Exception($errorMessage);\n }\n \n return $entity->getId();\n }", "title": "" }, { "docid": "aeab2210abc5e769ebe49ef00313ef69", "score": "0.64120805", "text": "public function getEntityId()\n {\n return $this->id;\n }", "title": "" }, { "docid": "eaf86a912ca0652f96f60992f796bdab", "score": "0.64058363", "text": "public function getEntityId(): EntityId\n {\n return $this->entityId;\n }", "title": "" }, { "docid": "8811e0730f6be06cfe319ad6ff225712", "score": "0.63876355", "text": "public function getEntityIdField()\n {\n if (!$this->_entityIdField) {\n $this->_entityIdField = $this->getEntityType()->getEntityIdField();\n if (!$this->_entityIdField) {\n $this->_entityIdField = Mage_Eav_Model_Entity::DEFAULT_ENTITY_ID_FIELD;\n }\n }\n\n return $this->_entityIdField;\n }", "title": "" }, { "docid": "f20f0e5357f965876a04cb10f3340356", "score": "0.63868904", "text": "public function getBundleEntityTypeId(EntityInterface $entity) {\n return $entity->getEntityTypeId() === 'menu'\n // Menu fix.\n ? 'menu_link_content' : $entity->getEntityType()->getBundleOf();\n }", "title": "" }, { "docid": "4ff1ab655ff9708b31116242013d61fb", "score": "0.6381732", "text": "public static function getId(): string;", "title": "" }, { "docid": "4ff1ab655ff9708b31116242013d61fb", "score": "0.6381732", "text": "public static function getId(): string;", "title": "" }, { "docid": "3d9a20086ca76f786fb31813ad98210c", "score": "0.6363277", "text": "public function getEntityPrimaryKey()\n {\n return $this->getEntityConfig('entity_id');\n }", "title": "" }, { "docid": "9b55773b0e17a4b887847d0e2dfed31e", "score": "0.6356418", "text": "public function getBaseTypeId()\n {\n return $this->baseTypeId;\n }", "title": "" }, { "docid": "3877c9583a6cc3da049aa18460446764", "score": "0.63374126", "text": "public function getSPEntityID()\n {\n return $this->getConfigurationVarByEnv('sp_entity_ids', $this->config()->realme_env);\n }", "title": "" }, { "docid": "18b4040246f5964cde336db595a7e712", "score": "0.6336722", "text": "public function getType()\n\t{\n\t\treturn $this->entityType;\n\t}", "title": "" }, { "docid": "5bb3e637cf38fea035f5b1f03769e098", "score": "0.6326632", "text": "public function getType(): int;", "title": "" }, { "docid": "5bb3e637cf38fea035f5b1f03769e098", "score": "0.6326632", "text": "public function getType(): int;", "title": "" }, { "docid": "5bb3e637cf38fea035f5b1f03769e098", "score": "0.6326632", "text": "public function getType(): int;", "title": "" }, { "docid": "769603315cc8671663b6325736d90594", "score": "0.6317051", "text": "function getInsertId() {\n\t\treturn parent::getInsertId('review_object_types', 'type_id');\n\t}", "title": "" }, { "docid": "bc884d6d6873b7749e73226ae1e8844b", "score": "0.63141614", "text": "public function getUserFieldEntityId(): string\n\t{\n\t\treturn \\CCrmOwnerType::ResolveUserFieldEntityID($this->getEntityTypeId());\n\t}", "title": "" }, { "docid": "d677384144af3861d2847cc05f7a2ccd", "score": "0.6304581", "text": "public function generateId(string $type = null): string;", "title": "" }, { "docid": "95e3c2c63d63750b214f3abdf7aa5565", "score": "0.6291087", "text": "public function getEntityType($entityTypeCode = null);", "title": "" }, { "docid": "8a7837806a52212d112e8f1c0b81b588", "score": "0.62885445", "text": "protected function getCdGridElementId($type)\n {\n $class = get_class($this->owner);\n return 'cd'.$class.'_'.$type.'_'.$this->owner->getPrimaryKey();\n }", "title": "" }, { "docid": "f8e52192bcd8865d6d87e1c591ce8091", "score": "0.62808204", "text": "public function getIdFieldName()\n {\n return $this->getEntityIdField();\n }", "title": "" }, { "docid": "5ccca54b1a4d5e9e57a66f25a42b4d80", "score": "0.62738496", "text": "public function getFullTypeName()\n {\n return 'Edm.Int64';\n }", "title": "" }, { "docid": "47c43aa2ec9353e8e732347346f0568a", "score": "0.6266991", "text": "public function getTypeId($client)\n\t{\n\t\t$table = $this->getTable();\n\t\t$table->load(array('unique_identifier' => $client));\n\n\t\treturn $table->id;\n\t}", "title": "" }, { "docid": "77d6959fe72d91a7440a1f2940f70140", "score": "0.62643653", "text": "public function getEntityType() \n {\n return $this->options['entityType']===null? \n get_class($this->getInvoker()) \n : $this->options['entityType'];\n }", "title": "" }, { "docid": "a19ab3872c26762713abb806dbe3294d", "score": "0.6246701", "text": "public function getOrderItemTypeId();", "title": "" }, { "docid": "c1b17c00f1ed178d165e32f3ce30e8b7", "score": "0.62373483", "text": "public function getType()\n {\n return $this->typeId;\n }", "title": "" }, { "docid": "2164b4e73ac10de143d50f08dbe2d489", "score": "0.622257", "text": "public function getDefaultEntityTypeCode();", "title": "" }, { "docid": "ddf5d5a8ef859893dd5bb3b3dc41a4a1", "score": "0.6219779", "text": "public function getIdElementType()\n {\n return $this->idElementType;\n }", "title": "" }, { "docid": "0f9bdb8ac8b9894b7f08aa39641c9fba", "score": "0.62110054", "text": "public function getEntityName(): string\n\t{\n\t\treturn \\CCrmOwnerType::ResolveName($this->getEntityTypeId());\n\t}", "title": "" }, { "docid": "eea97baa345e4f2cda6c8dfa2e241766", "score": "0.6206632", "text": "public function getEntityTypeID()\n\t{\n\t\treturn \\CCrmOwnerType::Wait;\n\t}", "title": "" }, { "docid": "2bd54a4903c8daedc7f0eeda0900a3a5", "score": "0.62057775", "text": "public function getEntityType()\n {\n if (empty($this->_type)) {\n throw Mage::exception('Mage_Eav', Mage::helper('eav')->__('Entity is not initialized'));\n }\n return $this->_type;\n }", "title": "" }, { "docid": "96776d0f1529f7ea0169bb2d934c83fc", "score": "0.62032574", "text": "public function getReferenceTypeId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6201102", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" }, { "docid": "85246705febf1c59035066202ec40043", "score": "0.6200006", "text": "public function getId();", "title": "" } ]
73d46d464041acaba205659c2e252882
Delete all objects in the associated table. This does NOT destroy relationships that have been created with other objects.
[ { "docid": "36e1492a9ead799000a94159780798b6", "score": "0.65615386", "text": "public function delete_all();", "title": "" } ]
[ { "docid": "1d66c9452f6eb7865a176051d448ff32", "score": "0.7773279", "text": "function delete_all()\n\t{\n\t\t$all =& $this->find_all();\n\t\t\n\t\t$q = new IgnitedQuery();\n\t\t\n\t\tforeach($this->relations as $name => $data)\n\t\t{\n\t\t\tif($data->get_cascade_on_delete())\n\t\t\t{\n\t\t\t\tforeach($all as $object)\n\t\t\t\t{\n\t\t\t\t\t$data->build_query($object, $q);\n\t\t\t\t\t$q->delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$q->empty_table($this->table);\n\t\t\n\t\t// unlink relations\n\t\tforeach($this->relations as $name => $data)\n\t\t{\n\t\t\tif(is_a($data, 'IR_RelProperty_habtm'))\n\t\t\t{\n\t\t\t\t$q->delete($data->get_join_table(), array($data->get_fk() => $object->__id));\n\t\t\t}\n\t\t\t\n\t\t\tif($data->get_cascade_on_delete())\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telseif(is_a($data, 'IR_RelProperty_has') && ! is_a($data, 'IR_RelProperty_habtm'))\n\t\t\t{\n\t\t\t\t$data->build_query($object, $q);\n\t\t\t\t$q->set($data->get_fk(), null);\n\t\t\t\t$q->update();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "61b42b4e585c9b83998313afe728312a", "score": "0.7118827", "text": "public function clearRelated();", "title": "" }, { "docid": "226f327e268690eaa421447bd0133f53", "score": "0.6993727", "text": "public function clearAll()\n {\n $this->createPureQueryBuilder()\n ->delete()\n ->execute();\n\n \\XLite\\Core\\Database::getEM()->clear(\n $this->getClassName()\n );\n }", "title": "" }, { "docid": "6c6badd267af5dbcb4ead3698f516332", "score": "0.67184925", "text": "public function removeAll(): void\n {\n foreach ($this->findAll() as $object) {\n $this->remove($object);\n }\n }", "title": "" }, { "docid": "92eedab9d0115826da0c69ed7c3413f7", "score": "0.66621655", "text": "public function delete(){\r\n\t\t$this->traversAndDeleteChildren($this);\r\n\t\t$this->deleteRelation();\r\n\t}", "title": "" }, { "docid": "f97add6969bfda2114c3f1b1837540c7", "score": "0.6630995", "text": "public function delete() {\n\t\tforeach ($this->_ownedObjectCache as $ownedObjectArray) {\n\t\t\t/* @var $ownedEntity DBEntity */\n\t\t\tforeach ($ownedObjectArray as $ownedEntity)\n\t\t\t\t$ownedEntity->delete();\n\t\t}\n\t\tstatic::getStore()->delete($this);\n\t}", "title": "" }, { "docid": "4c1f42ca3a2df62b7aee257485967ac6", "score": "0.6623042", "text": "public function deleteAll() {\n if (APPLICATION_ENV != 'production') {\n $this->getTable()->getAdapter()->query('TRUNCATE TABLE `' . $this->getTable()->info('name') . '`');\n }\n }", "title": "" }, { "docid": "d22b09e6ad8a442ee6638f3e44ec7c7e", "score": "0.6615978", "text": "public function removeAll() {\n\t\tforeach ($this->findAll() AS $object) {\n\t\t\t$this->remove($object);\n\t\t}\n\t}", "title": "" }, { "docid": "8905cfc06fd8f793b04d0ede5ce37f44", "score": "0.6579295", "text": "public function deleteAll();", "title": "" }, { "docid": "8905cfc06fd8f793b04d0ede5ce37f44", "score": "0.6579295", "text": "public function deleteAll();", "title": "" }, { "docid": "8cfde82e9c809302ba42c26f74acfa66", "score": "0.65656745", "text": "public function clearRelations() {\n\t\t$this->_relations = array();\n\t}", "title": "" }, { "docid": "981f920a76c3917f85e855b9c3ba2da3", "score": "0.6505722", "text": "public function deleteAll() {\n $images = Image::where('reference_id', $this->reference_id)->get();\n foreach ($images as $image) {\n $image->delete();\n }\n }", "title": "" }, { "docid": "e723f5cd418a1ea07de6a370bf4a1e3e", "score": "0.64792186", "text": "public function deleteAll()\n {\n $reports = $this->repository->findAll();\n\n foreach ($reports as $report) {\n $this->entityManager->remove($report);\n }\n\n $this->entityManager->flush();\n\n // Just to make sure everything is really deleted. (also for development reasons)\n $this->entityManager->getConnection()->exec(\"SET FOREIGN_KEY_CHECKS = 0\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE TABLE SpeedAnalyzerReportEventQueries\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE TABLE SpeedAnalyzerReportEvents\");\n $this->entityManager->getConnection()->exec(\"TRUNCATE TABLE SpeedAnalyzerReports\");\n $this->entityManager->getConnection()->exec(\"SET FOREIGN_KEY_CHECKS = 1\");\n }", "title": "" }, { "docid": "000db870bdfe8f10520dcc041a64134e", "score": "0.6469252", "text": "protected function cleanDatabase()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach($this->table as $table)\n {\n DB::table($table)->truncate();\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" }, { "docid": "4b6400e65aeb3c43066013daff1caca5", "score": "0.64638776", "text": "protected function delete()\n\t{\n\t\tforeach ($this->scheduledForDeletion as $objectHashId => $entity)\n\t\t{\n\t\t\t$dataMapper = $this->getDataMapper($this->entityRegistry->getClassName($entity));\n\t\t\t$dataMapper->delete($entity);\n\n\t\t\t// Order here matters\n\t\t\t$this->detach($entity);\n\t\t\t$this->entityRegistry->setState($entity, EntityStates::DEQUEUED);\n\t\t}\n\t}", "title": "" }, { "docid": "54f066e7db21fe9621ea860b2e27c251", "score": "0.64636666", "text": "public function destroy()\n\t{\n\t\tif(!empty($this->children))\n\t\t{\n\t\t\tforeach($this->children as $child)\n\t\t\t\t$child->destroy();\n\t\t}\n\t\tunset($this->_finder, $this->_parent, $this->model, $this->relation, $this->master, $this->slave, $this->records, $this->children, $this->stats);\n\t}", "title": "" }, { "docid": "ce122afb3cbb0a3b896dd819c1a969f1", "score": "0.6458722", "text": "public function delete()\n {\n $repository = $this->getRepository();\n\n foreach ($this as $book) {\n $repository->delete($book);\n }\n }", "title": "" }, { "docid": "7a71b9f21989ea725ae5aac1a6cdc316", "score": "0.6415064", "text": "public function deleteAll()\n {\n $stmt = $this->db->prepare('DELETE FROM ' . $this->name);\n $stmt->execute();\n $this->data = array();\n }", "title": "" }, { "docid": "f56145051cdd1ffed36e666a5bcd100d", "score": "0.6406246", "text": "public function unsetAllRelatedList()\n\t{\n\t\t$log = vglobal('log');\n\t\t$log->debug(__CLASS__ . '::' . __METHOD__ . ' ()| Start');\n\t\t$db = PearDatabase::getInstance();\n\t\t$db->delete('vtiger_relatedlists', 'tabid=? OR related_tabid=?', [$this->tabid, $this->tabid]);\n\t\t$log->debug(__CLASS__ . '::' . __METHOD__ . ' | END');\n\t}", "title": "" }, { "docid": "6ef147a584b11696a5e3c9efa7536558", "score": "0.6373128", "text": "protected function runCascadingDeletes(): void\n {\n foreach ($this->getCascadingRelations() as $relationship) {\n foreach ($this->{$relationship}()->get() as $model) {\n $model->pivot ? $model->pivot->delete() : $model->delete();\n }\n }\n }", "title": "" }, { "docid": "1cbb954d9846444560b063fbe28475a9", "score": "0.6359348", "text": "public function deleteAllRelationships($user)\n {\n if( $user->files ) {\n $user->files()->delete();\n }\n\n if( $user->tags ) {\n $user->tags()->delete();\n }\n\n if( $user->categories ) {\n $user->categories()->delete();\n }\n\n if( $user->articles ) {\n $user->articles()->delete();\n }\n }", "title": "" }, { "docid": "a63ce4aa0447a159afbe45a4805267c8", "score": "0.6332309", "text": "public function removeAll() {\n $sql = 'SET FOREIGN_KEY_CHECKS = 0; \n TRUNCATE table course; \n SET FOREIGN_KEY_CHECKS = 1;';\n \n $connMgr = new ConnectionManager(); \n $conn = $connMgr->getConnection();\n \n $stmt = $conn->prepare($sql);\n \n $stmt->execute();\n \n /*\n Uncomment to find out the number of rows affected:\n $count = $stmt->rowCount();\n */\n\n $stmt = null; \n $conn = null;\n\n }", "title": "" }, { "docid": "6a4a7002171f758107c68a9ca84c1e5b", "score": "0.63232154", "text": "public function deleteSelfRelated();", "title": "" }, { "docid": "924843d8cf3ee20e5b2c4331dab67865", "score": "0.6299372", "text": "public function delete_all()\n\t{\n\t\t// Proxy to delete(ALL)\n\t\treturn $this->delete(ALL);\n\t}", "title": "" }, { "docid": "ca2b6668b93ab56d6423e1a4b61658c5", "score": "0.6295826", "text": "public function deleteObject()\n {\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n $this->removeFromParentCollection();\n }", "title": "" }, { "docid": "8168a09a3c84e979cc383a797d699091", "score": "0.62785286", "text": "public function clear_all_related() {\n\t\t// All gifts that user has bought or reserved stay \"Taken\" on their friends' lists\n\n\t\t// All user's lists (and the list's gifts/circle) are removed\n\t\t// Any gifts that have been reserved by friends get removed from their shopping list\n\t\t$lists = $this->lists->find_all();\n\t\tforeach ($lists as $list) {\n\t\t\t// this removes gifts and friends from the list\n\t\t\t$list->delete();\n\t\t}\n\t\t\n\t\t// User is removed from all friends' lists (including unconfirmed friends)\n\t\t$friends = $this->friends->find_all();\n\t\tforeach ($friends as $friend) {\n\t\t\t$friend->delete();\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "acf55f73871da8b1c0b79562847b4cf0", "score": "0.6265943", "text": "public function flush()\n {\n $this->getCollection()->deleteMany([]);\n }", "title": "" }, { "docid": "d4795115a5351e4bfcc93472d3ccf513", "score": "0.6257223", "text": "public function deleteAll() {\n\n }", "title": "" }, { "docid": "de2b09d7f984d2e39ff58a51544a7185", "score": "0.6250095", "text": "private function cleanDatabase()\n {\n // sets foreign key checks to zero\n // TODO: needs to removed before going live\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach ($this->tables as $table) {\n DB::table($table)->truncate();\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }", "title": "" }, { "docid": "3aec6df1325b8c1ef35006cdf95b3f0d", "score": "0.6236509", "text": "private function delete_all_records() {\n\t\t$wpdb = $this->db;\n\n\t\t$wpdb->query( \"DROP TABLE {$wpdb->stream}\" );\n\t\t$wpdb->query( \"DROP TABLE {$wpdb->streammeta}\" );\n\t}", "title": "" }, { "docid": "0aba123818fa9fe44a381c13d5ef1cbe", "score": "0.623568", "text": "public function deleteAll()\n {\n $this->storage = [];\n }", "title": "" }, { "docid": "9d67f28b21cb7dab96512b065900080b", "score": "0.6221779", "text": "public function delete(){\n\n $this->db->deleteRecord($this->getId());\n\n //remove all references to this one in others models\n\n //remove this one in indexes\n\n //---$Type index\n //---$All index\n\n //remove from cache\n\n //remove xml file\n\n }", "title": "" }, { "docid": "a771cd4501da2b80ca23ac38dcf241d1", "score": "0.61895186", "text": "public function deleteAll()\n {\n }", "title": "" }, { "docid": "a771cd4501da2b80ca23ac38dcf241d1", "score": "0.61895186", "text": "public function deleteAll()\n {\n }", "title": "" }, { "docid": "c4c900f14dde011ec442b34e25925825", "score": "0.6184151", "text": "protected function clearDatabase() {\n User::query()->forceDelete();\n User\\Profile::query()->forceDelete();\n Category::query()->forceDelete();\n Region::query()->forceDelete();\n City::query()->forceDelete();\n District::query()->forceDelete();\n }", "title": "" }, { "docid": "b066e160b39e2a8f564220cad0258806", "score": "0.61838895", "text": "function deleteAll()\n\t\t{\n\t\t\t$this->db->empty_table('persoonLes');\n\t\t}", "title": "" }, { "docid": "f816a18cb34d47864708ab158d939595", "score": "0.61792916", "text": "public function deleteAll()\n {\n $company_id = Configure::get('Blesta.company_id');\n $this->Record\n ->from(self::TABLE_PIN)\n ->from('clients')\n ->from('client_groups')\n ->where(self::TABLE_PIN . '.client_id', '=', 'clients.id', false)\n ->where('clients.client_group_id', '=', 'client_groups.id', false)\n ->where('client_groups.company_id', '=', $company_id)\n ->delete([self::TABLE_PIN]);\n }", "title": "" }, { "docid": "86d7c4022b64a98ed0e43ea27fe51b62", "score": "0.6145412", "text": "public function deleteAll()\n {\n $db = XenForo_Application::get('db');\n\n $db->delete('xf_permission_entry', [\n 'permission_group_id = ?' => self::GROUP_ID\n ]);\n }", "title": "" }, { "docid": "7f979fb59bebe4ebdefda3d357827892", "score": "0.6127833", "text": "public function DeleteAllTreesAsId() {\n\t\t\tif ((is_null($this->intIdspecies)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateTreeAsId on this unsaved Species.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Species::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (Tree::LoadArrayBySpeciesIdspecies($this->intIdspecies) as $objTree) {\n\t\t\t\t\t$objTree->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`tree`\n\t\t\t\tWHERE\n\t\t\t\t\t`species_idspecies` = ' . $objDatabase->SqlVariable($this->intIdspecies) . '\n\t\t\t');\n\t\t}", "title": "" }, { "docid": "7e5737a3c3494e5eb58725c90463e168", "score": "0.6120785", "text": "function clear_synchronization_tables() {\n //\n $this->query(\"delete from serialization\");\n $this->query(\"delete from attribute\");\n $this->query(\"delete from entity\");\n $this->query(\"delete from dbase\");\n }", "title": "" }, { "docid": "3a502cca68278655fb8962277fad6a61", "score": "0.6106247", "text": "public function clearAll()\n {\n $this->cleanObjects = array();\n $this->dirtyObjects = array();\n $this->removedObjects = array();\n }", "title": "" }, { "docid": "1c9d1c33e9ae8a5c585971a8c28b53a1", "score": "0.60985804", "text": "public function deleteWithChildren()\n {\n $ids = array();\n\n $children = $this->getChildren()->toArray();\n\n array_walk_recursive($children, function($i, $k) use (&$ids) { if ($k == 'id') $ids[] = $i; });\n\n foreach ($ids as $id)\n {\n $this->destroy($id);\n }\n }", "title": "" }, { "docid": "36c60dd79d35409d579fb6a067b68f91", "score": "0.60931563", "text": "public function deleteAll() {\n if (APPLICATION_ENV == 'production') {\n throw new Exception(\"Not Allowed\");\n }\n $this->getMapper()->deleteAll();\n }", "title": "" }, { "docid": "36c60dd79d35409d579fb6a067b68f91", "score": "0.60931563", "text": "public function deleteAll() {\n if (APPLICATION_ENV == 'production') {\n throw new Exception(\"Not Allowed\");\n }\n $this->getMapper()->deleteAll();\n }", "title": "" }, { "docid": "0d8bb773817bcb0ff3f0394904fd133a", "score": "0.6055696", "text": "public function destroy()\n {\n parent::destroy();\n foreach ($this->children as $childGroup) {\n foreach ($childGroup as $child) {\n $child->destroy();\n }\n }\n $this->children = [];\n }", "title": "" }, { "docid": "7c0fc8bd04204311f7caa62b01a0f365", "score": "0.6049951", "text": "public function clearResources() {\n $this->getTable()->clearResources();\n }", "title": "" }, { "docid": "943328f84ae474076889e0fa80c5e189", "score": "0.60481364", "text": "public function destroy(tableHasOrder $tableHasOrder)\n {\n //\n }", "title": "" }, { "docid": "bf37f2eded16df7eecb40a8559a27b71", "score": "0.6034189", "text": "public function detachAll()\n {\n $this->unitOfWork->detachAll();\n }", "title": "" }, { "docid": "a392e35b1b1698ba4e2744274f124877", "score": "0.60262656", "text": "public function DeleteAll()\n {\n foreach ($this->arrCacheProviders as $objCacheProvider) {\n $objCacheProvider->DeleteAll();\n }\n }", "title": "" }, { "docid": "e28ee7b07590b8087821c96b3c3a7da1", "score": "0.60218936", "text": "public function deleteEverything()\n {\n $DBConnection = $this->getDBConnection();\n $query = $DBConnection->prepare(\"DELETE FROM game_mines\");\n $query->execute();\n }", "title": "" }, { "docid": "b1239e184d27df932b06337df3e8ee69", "score": "0.6017005", "text": "protected function tearDown(): void\n {\n foreach (['default'] as $connection) {\n $this->schema($connection)->drop('posts');\n $this->schema($connection)->drop('images');\n $this->schema($connection)->drop('tags');\n $this->schema($connection)->drop('taggables');\n }\n\n Relation::morphMap([], false);\n }", "title": "" }, { "docid": "8c5fb7118a65d54814389fecb6ea4e06", "score": "0.600996", "text": "public function deleteAll()\n {\n return $this->doFlush();\n }", "title": "" }, { "docid": "ada1fd86bc038e936de2d72446854014", "score": "0.60066295", "text": "public function deletePersisted();", "title": "" }, { "docid": "3b02b1bc2d9fe5e256fb42f1c85ba00b", "score": "0.60013115", "text": "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in related instance pools,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n ObjectTableMap::clearInstancePool();\n PositionTableMap::clearInstancePool();\n SkillTableMap::clearInstancePool();\n GroupTableMap::clearInstancePool();\n }", "title": "" }, { "docid": "c4a61c9739ee29260a16b509efa63aec", "score": "0.59990865", "text": "public function deleteAll()\n {\n\n \tSphinxQL::create( $this->connection )\n\t\t ->delete()\n\t\t ->from( $this->index )\n\t\t ->where('id','>',0)\n\t\t ->execute();\n\n }", "title": "" }, { "docid": "68575f8b1af24773f70ff29b4a83b390", "score": "0.5993745", "text": "public function destroyAll()\n {\n Reviews::truncate();\n }", "title": "" }, { "docid": "74d13e34bdec20c987e34764cbeb34a8", "score": "0.59937406", "text": "public function DeleteAllChildMinistries() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateChildMinistry on this unsaved Ministry.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Ministry::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (Ministry::LoadArrayByParentMinistryId($this->intId) as $objMinistry) {\n\t\t\t\t\t$objMinistry->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`ministry`\n\t\t\t\tWHERE\n\t\t\t\t\t`parent_ministry_id` = ' . $objDatabase->SqlVariable($this->intId) . '\n\t\t\t');\n\t\t}", "title": "" }, { "docid": "89ce51db39bb4a74b4fab1f3647b8f34", "score": "0.59715015", "text": "protected function deleteRelated(Model $model)\n {\n foreach ($this->relations as $relation) {\n $rel = $model->$relation();\n\n if ($rel instanceof HasOneOrMany) {\n $rel->delete();\n } else if ($rel instanceof BelongsToMany) {\n $rel->detach();\n }\n }\n }", "title": "" }, { "docid": "d88b7aa6b2b49763de8be47082eb6b2a", "score": "0.5971196", "text": "function clearFlyingObjs(){\n $db = databaseConn();\n $sql = \"DELETE FROM flying_object;\";\n try{\n $db->exec($sql);\n }\n catch (PDOException $e){\n echo 'NOT Able To Delete all Flying Objects: ' . $e;\n }\n}", "title": "" }, { "docid": "0f84859e2c718a72a4e8080a6949c987", "score": "0.5968816", "text": "public function Delete_All_Space_Relationship()\n\t{\n\t\tif ($this->attributes['id'] != '') {\n\t\t\tSpaceDescriptionLang::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSpaceDescription::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSpaceLocation::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSpacePrice::where('space_id',$this->attributes['id'])->delete();\n\t\t\tActivityPrice::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSpaceActivities::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSpacePhotos::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSpaceStepsStatus::where('space_id',$this->attributes['id'])->delete();\n\t\t\tAvailabilityTimes::whereHas('space_availability',function($q){\n\t\t\t\t$q->where('space_id',$this->attributes['id']);\n\t\t\t})->delete();\n\t\t\tSpaceAvailability::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSpaceCalendar::where('space_id',$this->attributes['id'])->delete();\n\t\t\tMessages::where('space_id',$this->attributes['id'])->delete();\n\t\t\tSavedWishlists::where('space_id', $this->attributes['id'])->delete();\n\t\t\tSpace::where('id', $this->attributes['id'])->delete();\n\t\t}\n\t}", "title": "" }, { "docid": "4fd822724847528ab75f3e317b349b59", "score": "0.5951953", "text": "public function delete_all() {\n $categories = $this->get_categories_with_fields();\n foreach ($categories as $category) {\n api::delete_category($category);\n }\n $this->clear_configuration_cache();\n }", "title": "" }, { "docid": "69e57e1b3e1e4808327042636759393f", "score": "0.59301215", "text": "public function deleteAll(){\n $query = $this->getEntityManager()->createQuery('DELETE AppBundle:Balance');\n $query->execute();\n }", "title": "" }, { "docid": "4ae4a4f7e7a9ef6d806afdc72699d2a9", "score": "0.5916279", "text": "function __destruct() {\n foreach($this->_cleanUpTables as $table) {\n CRM_Core_DAO::executeQuery(\"DROP TABLE `$table`\");\n }\n }", "title": "" }, { "docid": "7a0a27ce3a498d09651e1cb2652a82d9", "score": "0.59157753", "text": "public function deleteEverything()\n {\n $DBConnection = $this->getDBConnection();\n $query = $DBConnection->prepare(\"DELETE FROM game_tasks\");\n $query->execute();\n }", "title": "" }, { "docid": "b4329d4d0d0ad52073b9c6b2cfd52fd1", "score": "0.59156054", "text": "public function delete()\n {\n foreach ($this->updates()->get() as $update) {\n $update->delete();\n }\n\n parent::delete();\n }", "title": "" }, { "docid": "00ef796eddc784a23514187127ceeb65", "score": "0.5892487", "text": "public function delete() : void\n\t{\n\t\t$this->initializeModelIfNotSet();\n\n\t\t$model = $this->getModel();\n\t\tif (!$model->isInitialized())\n\t\t{\n\t\t\tthrow new EntityException('Unable to delete the model as it is not initialized. Model: '.get_class($model));\n\t\t}\n\n\t\t$where = [$this->getCollectionPrimaryKey() => $model->getPrimaryKey()];\n\t\ttry\n\t\t{\n\t\t\tDBWrapper::delete($this->getCollectionTable(), $where, $this->getCollectionName());\n\t\t}\n\t\tcatch (DatabaseException $e)\n\t\t{\n\t\t\tthrow new EntityException('Failed to delete the model '.get_class($model).' with where clause: '.var_export($where, true), $e);\n\t\t}\n\n\t\tif ($this->useEntityCache())\n\t\t{\n\t\t\tself::deleteCacheItem($this->getCacheKey());\n\t\t}\n\n\t\t$this->resetModel();\n\t}", "title": "" }, { "docid": "0d5a999c25ef3fd5828c00cdbb5c1057", "score": "0.58869714", "text": "function clear_all(){\n $sql_list = array('DELETE FROM books;',' DELETE FROM authors;',' DELETE FROM genres;');\n foreach ($sql_list as $sql){\n $this->conn->query($sql);\n }\n }", "title": "" }, { "docid": "699660ea1beb8d39935071ce264b84b6", "score": "0.5878788", "text": "public function clear(): void\n {\n $this->entityManager->clear();\n }", "title": "" }, { "docid": "6f0871d1e89a841ce2a90a64ceaa5a21", "score": "0.58692384", "text": "public function delete()\n {\n static::getRepository()->delete($this);\n }", "title": "" }, { "docid": "f366648d622e98cc7817fe62a05c78c6", "score": "0.5867278", "text": "public function delete_all()\n\t{\n\t\t$query = clone $this->query;\n\t\t$query->type('delete');\n\t\t$query->execute();\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "a4198263c4f169413ec4682b1e05fd2d", "score": "0.5863793", "text": "public function delete()\n\t{\n\t\t$this->getRepository()->getNodeTypeService()->deleteAssociation($this);\n\t}", "title": "" }, { "docid": "e42bd82df37a3dc5b7c84d3ee6896aa7", "score": "0.58521825", "text": "public function clearAll()\n\t{\n\t\tparent::clearAll();\n\t\t$this->link->flush();\n\t}", "title": "" }, { "docid": "4f7aed1916e9e388a3619ed0f159305e", "score": "0.58462876", "text": "public function delete($id, $recursive = false) {\n\t\t$pdo = Model::$connections[$this->db];\n\n\t\tif($recursive) {\n\t\t\tforeach ($this->hasOne as $model) {\n\t\t\t\t$sql = 'DELETE FROM '.$this->$model->table.' WHERE '.strtolower($this->name).'_'.$this->primaryKey.'='.$id;\n\t\t\t\t$pdo->query($sql);\n\t\t\t\t$sql = \"OPTIMIZE TABLE {$this->$model->table}\";\n\t\t\t\t$pdo->query($sql);\n\t\t\t}\n\t\t\tforeach ($this->hasMany as $model) {\n\t\t\t\t$sql = 'DELETE FROM '.$this->$model->table.' WHERE '.strtolower($this->name).'_'.$this->primaryKey.'='.$id;\n\t\t\t\t$pdo->query($sql);\n\t\t\t\t$sql = \"OPTIMIZE TABLE {$this->$model->table}\";\n\t\t\t\t$pdo->query($sql);\n\t\t\t}\n\t\t\tforeach ($this->hasAndBelongsToMany as $model) {\n\t\t\t\t$rtable = computeRelationTable($this->table, $this->$model->table);\n\t\t\t\t$sql = 'DELETE FROM '.$rtable.' WHERE '.strtolower($this->name).'_'.$this->primaryKey.'='.$id;\n\t\t\t\t$pdo->query($sql);\n\t\t\t\t$sql = \"OPTIMIZE TABLE {$rtable}\";\n\t\t\t\t$pdo->query($sql);\n\t\t\t}\n\t\t}\n\n\t\t$sql = \"DELETE FROM {$this->table} WHERE {$this->primaryKey}=$id\";\n\t\t$pdo->query($sql);\n\n\t\t$sql = \"OPTIMIZE TABLE {$this->table}\";\n\t\t$pdo->query($sql);\n\t}", "title": "" }, { "docid": "749aa2b03610a7fd361381cedc97d98d", "score": "0.583306", "text": "public function beforeDelete()\n {\n $this->deleteAll();\n }", "title": "" }, { "docid": "0a09feb0d7f06bd9caf0844a8c845394", "score": "0.5815945", "text": "public function deleteAll()\n {\n $sql = 'DELETE FROM '.$this->getConnection().N;\n\n try {\n $query = $this->getConnection()->query($sql);\n } catch(PDOException $e) {\n $this->addError($e->getMessage(), $sql);\n\n return False;\n }\n\n return True;\n }", "title": "" }, { "docid": "25f23ead4d4d1ac92ab94009100815de", "score": "0.581382", "text": "public function testDeleteAll() {\n\t\t$count = $this->test_table->count();\n\t\t$this->assertGreaterThan(0, $count);\n\t\t\n\t\t$this->test_table->all()->delete();\n\t\t\n\t\t$count = $this->test_table->count();\n\t\t$this->assertEquals(0, $count);\n\t}", "title": "" }, { "docid": "3cd5bd1c8abe88cb34913c0c8e56077b", "score": "0.5809639", "text": "public function deleteAll()\n {\n $this->customPagesService->deleteAllByTarget(static::DEFAULT_TARGET_ID);\n }", "title": "" }, { "docid": "f11ddf5e2f8e32193b499b587bd67391", "score": "0.58071715", "text": "public function deleteAll($model)\r\n {\r\n if (!is_object($model)) {\r\n $this->loadModel($model);\r\n $model = new $model;\r\n }\r\n\r\n $sql = \"DELETE FROM {$model->_table}\";\r\n\r\n if ($this->noDbOperation) {\r\n return $sql;\r\n }\r\n\r\n $rs = $this->query($sql);\r\n }", "title": "" }, { "docid": "ce7822f8d91942037227deaf7a913376", "score": "0.5798363", "text": "public function delete()\n {\n /* It does not make sense to attempt to delete a non-persistant record. */\n if (!$this->_isPersistant)\n {\n throw new Sahara_Database_Exception('Unable to delete non-persistant record.');\n }\n\n /* First the reference records must be deleted. */\n foreach ($this->_relationships as $name => $rel)\n {\n switch ($rel['join'])\n {\n case 'local':\n /* Nothing to delete for this case, because the reference\n * is stored in this record. */\n break;\n\n case 'foreign':\n foreach ($this->__get($name) as $r)\n {\n if (array_key_exists('null_on_delete', $rel) && $rel['null_on_delete'])\n {\n $r->__set($rel['foreign_key'], NULL);\n $r->save();\n }\n else\n {\n /* Delete the relationship record. */\n $r->delete();\n }\n }\n break;\n\n case 'table':\n /* Any join table records need to be deleted. */\n $stm = 'DELETE FROM ' . $rel['join_table'] . ' WHERE ' . $rel['join_table_source'] . ' = ?';\n $qu = $this->_db->prepare($stm);\n if (!$qu->execute(array($this->_data[$this->_idColumn])))\n {\n throw new Sahara_Database_Exception($qu);\n }\n break;\n }\n }\n\n /* Delete this record. */\n $stm = 'DELETE FROM ' . $this->_name . ' WHERE ' . $this->_idColumn . ' = ?';\n $qu = $this->_db->prepare($stm);\n if (!$qu->execute(array($this->_data[$this->_idColumn])))\n {\n throw new Sahara_Database_Exception($qu);\n }\n }", "title": "" }, { "docid": "721d99fed39f9e897b4e99541497f19b", "score": "0.5798064", "text": "public function unsetIncludeRelatedObjects(): void\n {\n $this->includeRelatedObjects = [];\n }", "title": "" }, { "docid": "c8e16c9a2462a9f339739b2960f9ad8e", "score": "0.5793018", "text": "public function DeleteAllKpises() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateKpis on this unsaved Scorecard.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Scorecard::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (Kpis::LoadArrayByScorecardId($this->intId) as $objKpis) {\n\t\t\t\t\t$objKpis->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`kpis`\n\t\t\t\tWHERE\n\t\t\t\t\t`scorecard_id` = ' . $objDatabase->SqlVariable($this->intId) . '\n\t\t\t');\n\t\t}", "title": "" }, { "docid": "78c6a47c44148500366b1a380415ba72", "score": "0.57906026", "text": "public function removeAll()\n {\n $db = \\Yii::$app->getDb();\n $transaction = $db->beginTransaction();\n\n try {\n $db->createCommand()->delete('role')->execute();\n $db->createCommand()->delete('rule')->execute();\n $db->createCommand()->delete('role_rule')->execute();\n $db->createCommand()->delete('user_role')->execute();\n RoleCache::deleteAll();\n RuleCache::deleteAll();\n RoleRuleCache::deleteAll();\n $transaction->commit();\n } catch (Exception $e) {\n $transaction->rollBack();\n }\n\n }", "title": "" }, { "docid": "95ccb6539e5bb247c1fecfb037d14912", "score": "0.5786446", "text": "public function DeleteAllActionItemses() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateActionItems on this unsaved Scorecard.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Scorecard::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (ActionItems::LoadArrayByScorecardId($this->intId) as $objActionItems) {\n\t\t\t\t\t$objActionItems->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`action_items`\n\t\t\t\tWHERE\n\t\t\t\t\t`scorecard_id` = ' . $objDatabase->SqlVariable($this->intId) . '\n\t\t\t');\n\t\t}", "title": "" }, { "docid": "4f2b988885ae4387a15a3f2b5f74a8e9", "score": "0.57840574", "text": "private function _delete_associate_records($obj)\n\t{\n\t\t// Get all existing associate records.\n\t\t$get_associate_records = call_user_func_array( array($obj, \"get\" . ucfirst(camelize($this->ASSOCIATE_ENTITY))), array());\n\n\t\t// Return if no record is found. [Fail early validation]\n\t\tif (!$get_associate_records->count())\n\t\t\treturn;\n\n\t\t// delete all associate records from database.\n\t\tforeach ($get_associate_records as $key => $value) {\n\t\t\t$get_associate_records->removeElement($value);\n\t\t}\n\n\t\t$this->flush();\n\t}", "title": "" }, { "docid": "0e2ade1d50f51296969ab6fb89b95499", "score": "0.5782793", "text": "protected function tearDown()\n {\n $table = self::getTable();\n foreach ($table->fetchAll() as $row) {\n $row->delete();\n }\n }", "title": "" }, { "docid": "19f9cb90afada58ad2da6144f7260fc7", "score": "0.57810324", "text": "public function deleteAllRoots();", "title": "" }, { "docid": "b2232317b768ea0995e28d7d0e554368", "score": "0.5780058", "text": "public function dropAllTables()\n {\n @$this->disableForeignKeyConstraints();\n\n foreach ($this->db->listTables() as $table) {\n $this->drop($table);\n };\n\n @$this->enableForeignKeyConstraints();\n }", "title": "" }, { "docid": "9f186b2e5cd2808d09eb798632013322", "score": "0.5771373", "text": "abstract public function deleteAllEntities($objType);", "title": "" }, { "docid": "90f99e38d004b799e0039bc3e63f3398", "score": "0.5757787", "text": "public function deleteObject()\n {\n $qry = new DeleteEntityQuery($this);\n $this->getContext()->addQuery($qry);\n }", "title": "" }, { "docid": "92f280747e07b240f9a76bab884937c7", "score": "0.5757343", "text": "#[WriteOperation]\n public function deleteAll($owner, array $relations = []): int;", "title": "" }, { "docid": "528273947b32390c167b5e08d6be3268", "score": "0.57560784", "text": "public function DeleteAllCostureiraProducaos() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateCostureiraProducao on this unsaved Balanco.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Balanco::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (CostureiraProducao::LoadArrayByBalancoId($this->intId) as $objCostureiraProducao) {\n\t\t\t\t\t$objCostureiraProducao->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`costureira_producao`\n\t\t\t\tWHERE\n\t\t\t\t\t`balanco_id` = ' . $objDatabase->SqlVariable($this->intId) . '\n\t\t\t');\n\t\t}", "title": "" }, { "docid": "d00e16e3e70c7ee1a58b56cb34cc35fe", "score": "0.5753944", "text": "public function clear()\n {\n // delete all system_jobs & jobs\n DB::transaction(function() {\n // delete jobs\n $jobs = Job::where('reserved', 0)->get();\n foreach($jobs as $job) {\n $json = json_decode($job->payload, true);\n try {\n $j = unserialize($json['data']['command']);\n if ($j->getSystemJob()->id == $this->id) {\n Job::destroy($job->id);\n }\n } catch (\\Exception $ex) {\n // delete orphan job\n Job::destroy($job->id);\n }\n }\n\n // delete system_jobs\n self::destroy($this->id);\n });\n }", "title": "" }, { "docid": "468befc8b4e63a571d46ddb2b8e23f55", "score": "0.57538307", "text": "abstract public function deleteMany($table, $where, $options = []);", "title": "" }, { "docid": "94a4a3f7fa49405617bec1b5fda7c7e4", "score": "0.5748929", "text": "protected function tearDown(): void\n {\n $this->schema()->dropTable('users');\n $this->schema()->dropTable('contracts');\n $this->schema()->dropTable('positions');\n }", "title": "" }, { "docid": "ba0de1e4807268a70412810768d40c65", "score": "0.57407296", "text": "public function clearRecords() \n\t{\n\t\t$this->dbh->deleteAll();\n\t}", "title": "" }, { "docid": "9abbb0c591f643c456c4b0536bea6897", "score": "0.5738348", "text": "public function unsetIncludeDeletedObjects(): void\n {\n $this->includeDeletedObjects = [];\n }", "title": "" }, { "docid": "7dac6297a0efe87eb05a3ee3e262ebb7", "score": "0.5738297", "text": "public function purge()\n {\n $this->delete();\n }", "title": "" }, { "docid": "3961705dba514bd08c9ac4898b3966b1", "score": "0.5733787", "text": "public function delete() {\n foreach($this->a_uclists as $l) {\n $l->delete();\n }\n foreach($this->a_reports as $r) {\n $r->delete();\n }\n foreach($this->a_servers as $s) {\n $s->delete();\n }\n \n parent::delete();\n }", "title": "" }, { "docid": "d58ff4ade065f60748a5dfa87d40b5a8", "score": "0.57225436", "text": "protected function tearDown()\r\n {\r\n parent::tearDown();\r\n\r\n $stmt = $this->em->getConnection()->prepare(\"DELETE FROM Contact\");\r\n $stmt->execute();\r\n $stmt = $this->em->getConnection()->prepare(\"DELETE FROM Property\");\r\n $stmt->execute();\r\n $stmt = $this->em->getConnection()->prepare(\"DELETE FROM Address\");\r\n $stmt->execute();\r\n $stmt = $this->em->getConnection()->prepare(\"DELETE FROM Contact_Properties\");\r\n $stmt->execute();\r\n\r\n $this->em->close();\r\n $this->em = null;//avoid memory meaks\r\n }", "title": "" }, { "docid": "87050abe7a5971f6364af8d08d12baad", "score": "0.57189715", "text": "public function clear()\n {\n $this->clearAllPersistentData();\n }", "title": "" } ]
3a190fc7ddd45a4ca02d3dd8a71b190c
Adding a row to the (reservation)Order.
[ { "docid": "183d32851cb1dd2d58c0c3fb5591b4dd", "score": "0.0", "text": "protected function _processItem($buildOrder, $item, $prefix = '', $multiply = 1)\n {\n if ($item->getQty() > 0) {\n if ($prefix) {\n $prefix = $prefix . '-';\n }\n\n $qty = $multiply * $item->getQty();\n $orderRowItem = WebPayItem::orderRow()\n ->setAmountIncVat((float)$item->getPriceInclTax())\n ->setVatPercent((int)round($item->getTaxPercent()))\n ->setQuantity((float)round($qty, 2))\n ->setArticleNumber($prefix . $item->getSku())\n ->setName(mb_substr($item->getName(). $this->getItemOptions($item), 0, 40 ))\n ->setTemporaryReference((string)$item->getId());\n $buildOrder->addOrderRow($orderRowItem);\n\n if ((float)$item->getDiscountAmount()) {\n\n if ($this->helper->getStoreConfig('tax/calculation/discount_tax')) {\n $discountAmountIncVat = $item->getDiscountAmount();\n } else {\n $taxCalculation = 1 + $item->getTaxPercent() / 100;\n $discountAmountIncVat = $item->getDiscountAmount()* $taxCalculation;\n //Svea allows only two decimals, round.\n $discountAmountIncVat = round($discountAmountIncVat, 2);\n }\n\n $itemRowDiscount = WebPayItem::fixedDiscount()\n ->setName(mb_substr(sprintf('discount-%s', $prefix . $item->getId()), 0, 40))\n ->setVatPercent((int)round($item->getTaxPercent()))\n ->setAmountIncVat((float)$discountAmountIncVat);\n\n $buildOrder->addDiscount($itemRowDiscount);\n }\n }\n }", "title": "" } ]
[ { "docid": "4c2ac4a09dd6e99c103bcd5acf1b425b", "score": "0.6883814", "text": "abstract protected function addRow();", "title": "" }, { "docid": "7b9c34e504207616f5bc2cc017b96baa", "score": "0.67663264", "text": "public function addOrder($order);", "title": "" }, { "docid": "ffacb59a853fbc5bd6cc4332ac408766", "score": "0.66588527", "text": "public function AddRow($row) {\n $this->Rows[] = $row;\n }", "title": "" }, { "docid": "5daf6d5b7147e199fe2b4f1b70c22a58", "score": "0.66340935", "text": "function addRow( $row ) {\n\t\t$this->_rows[] = $row;\n\t}", "title": "" }, { "docid": "2a7ef193a8dd10263de4388a924df0fd", "score": "0.6619606", "text": "public function add(Order $order);", "title": "" }, { "docid": "87f2e5c9cfb4bd697015e929f257fb51", "score": "0.6559235", "text": "protected function addRow() {\n $title = \\Faker\\Name::name();\n $fields = array(\n 'Name' =>\\Faker\\Internet::userName($title),\n 'Title' => $title,\n 'Location' => \\Faker\\Address::city(),\n 'About' => \\Faker\\Lorem::sentence(10),\n 'Email' => \\Faker\\Internet::email($title)\n );\n\n $this->prepareAndInsert($fields);\n }", "title": "" }, { "docid": "653cac3038e4c09e10bda11e88fee0a4", "score": "0.646817", "text": "function addLineItem($row, $theDate, $theDuration, $conn){\r\n\t\t$row++;\r\n\t\tpg_query($conn, \"INSERT INTO timesheet(LineItemID, LineDate, Duration) VALUES ('$row', '$theDate', '$theDuration')\");\r\n\t}", "title": "" }, { "docid": "8d920b67007b2a5ea8a80f37e4c124a4", "score": "0.645868", "text": "public function addRow(array $row);", "title": "" }, { "docid": "9f0a7a08460b429da2588dff469123be", "score": "0.6456813", "text": "public static function add_order_item()\n {\n }", "title": "" }, { "docid": "b8fca5e0329a65edb9751334b0e3f0fd", "score": "0.6432742", "text": "public function addOrder($order) \n {\n $this->orders[] = $order;\n }", "title": "" }, { "docid": "3d09567d62a3c873e28aff6263f93cc4", "score": "0.6384379", "text": "public function addRow($row) {\n\t\t\t$this->rows[] = $row;\n\t\t}", "title": "" }, { "docid": "84316811d73e810a1f264d97168a9b51", "score": "0.6378639", "text": "public function add_row($row_data)\n\t{\n\t\tif ( ! isset($row_data['price'])) $row_data['price'] = 0;\n\t\tif ( ! isset($row_data['VAT'])) $row_data['VAT'] = Kohana::$config->load('order.default_VAT');\n\n\t\t// To not confuse new rows with already saved ones, we give them negative keys\n\t\t$row_nr = -1;\n\t\tif (count($this->order_data['rows']))\n\t\t\t$row_nr = min(array_keys($this->order_data['rows'])) - 1;\n\t\tif ($row_nr > 0) $row_nr = -1;\n\n\t\tksort($row_data);\n\n\t\t$this->order_data['rows'][$row_nr] = $row_data;\n\n\t\t$this->recalculate_sums();\n\t\t$this->update_session();\n\n\t\treturn $row_nr;\n\t}", "title": "" }, { "docid": "fb9bff7aa90584e56aa7689df1da57a9", "score": "0.6349304", "text": "public function addRowObject(DataRow $row) {\n $this->rows[] = $row; \n }", "title": "" }, { "docid": "aee74024498adec04e2abccd2fd66b89", "score": "0.6342268", "text": "public function addRow(Row $row) {\n $this->rows[] = $row;\n }", "title": "" }, { "docid": "6fe94998963f4efc09352d2402ac8ba6", "score": "0.6272598", "text": "function add_row()\n\t{\n\t\t$this->cur_row++;\n\t}", "title": "" }, { "docid": "f31a7a27a88980899aeac21d773e2c68", "score": "0.6250838", "text": "function add_row()\n\t{\n\t\t$args = func_get_args();\n\t\t$this->rows[] = $this->_prep_args($args);\n\t}", "title": "" }, { "docid": "298b8000d9d3c406046260a7efbf2ff8", "score": "0.62384087", "text": "public function moveToInsertRow();", "title": "" }, { "docid": "b67a60189a25a249f5841329b0462786", "score": "0.616198", "text": "public function addRow(DbRow $rowData)\n {\n $this->rows[] = $rowData;\n }", "title": "" }, { "docid": "efc28c0e7452ae58784f7f9cc25f854f", "score": "0.6146953", "text": "function addItemOrden($rec)\n {\n global $db;\n $db->AutoExecute($this->tableProduct,$rec);\n }", "title": "" }, { "docid": "662699c0621442b97943ece5469863fa", "score": "0.6141163", "text": "public function add_order($quantity, $idCustomer, $idArticle){\n $add_order = $this->database->prepare('INSERT INTO orders (quantity, Ordering_date, idCustomer, idArticle) \n values (?, CURRENT_TIMESTAMP, ?, ?) ');\n\n $add_order->bindValue(1, $quantity, PDO::PARAM_INT);\n $add_order->bindValue(2, $idCustomer, PDO::PARAM_INT);\n $add_order->bindValue(3, $idArticle, PDO::PARAM_INT);\n\n return $add_order->execute();\n }", "title": "" }, { "docid": "dc9783a70105e26ff22502c538939cd1", "score": "0.612651", "text": "public function addRow($row) {\n\t\t\t$row->setParentTable($this);\n\t\t\t$this->rows[]=$row;\n\t}", "title": "" }, { "docid": "2b468c19152f074f14e1765311c8ea23", "score": "0.60778534", "text": "function insert_new_order($data) {\n\t\n\t\t\treturn $this->db->wpdb->insert($this->db->tables['orders'], $data);\n\t\n\t\t}", "title": "" }, { "docid": "3ab2384ebbd9abf7c05dcbb994bd6f27", "score": "0.60121274", "text": "function ecommOrderAdd($order) {\n $params = array();\n $params[\"order\"] = $order;\n return $this->callServer(\"ecommOrderAdd\", $params);\n }", "title": "" }, { "docid": "a8acfae6e10ce51de836f9bdeedea8d3", "score": "0.5986789", "text": "public function addOrderToDB($order) {\n $oid = $order->getOID();\n $isReady = $order->getIsReady();\n $itemListSerialized = $order->getOrderItemListSerialized();\n $query = \"INSERT INTO `ARM_Order` (`oid`, `isReady`, `itemList`) VALUES (NULL, '$isReady', '$itemListSerialized')\";\n $this->connection->query($query);\n }", "title": "" }, { "docid": "f411a0efd064cc35b68bc3486ce9c739", "score": "0.5971185", "text": "public function add($order) {\n $sql = 'insert into orders (customer_id) values (:customer_id)';\n \n $connMgr = new ConnectionManager(); \n $conn = $connMgr->getConnection();\n \n $stmt = $conn->prepare($sql); \n\n $stmt->bindParam(':customer_id', $order->customerId, PDO::PARAM_STR);\n \n $isAddOK = False;\n if ($stmt->execute()) {\n $isAddOK = True;\n // obtain autoincrement order id from successful insert\n $order->id = $conn->lastInsertId();\n foreach ($order->cartItems as $cartItem) {\n $sql = 'insert into order_items (order_id, book_id, quantity) values (:order_id, :book_id, :quantity)';\n \n $stmt = $conn->prepare($sql); \n\n $stmt->bindParam(':order_id', $order->id, PDO::PARAM_INT);\n $stmt->bindParam(':book_id', $cartItem->isbn13, PDO::PARAM_STR);\n $stmt->bindParam(':quantity', $cartItem->quantity, PDO::PARAM_STR);\n \n $isAddOK = False;\n if ($stmt->execute()) {\n $isAddOK = True;\n }\n }\n\n } // if insert into order successful\n return $isAddOK;\n }", "title": "" }, { "docid": "fb359cf98cc7d2d49aad01fdad16fa75", "score": "0.5928282", "text": "protected function createOrderRecord()\r\n {\r\n $userId = $this->session->get('user_id');\r\n $query = '\r\n insert into\r\n aca_order (user_id, order_date)\r\n values\r\n ('.$userId.', NOW())';\r\n return $this->db->executeSql($query);\r\n }", "title": "" }, { "docid": "e03a63ea310ea005f29580ba895ce2c2", "score": "0.5919613", "text": "function neworder()\n {\n $order_num = $this->orders->highest() + 1;\n \n date_default_timezone_set(\"America/Vancouver\");\n \n $newOrder = $this->orders->create();\n $newOrder->num = $order_num;\n $newOrder->date = date(\"Y/m/d/H/i/s\");\n $newOrder->status = \"a\";\n $newOrder->total = 0;\n \n $this->orders->add($newOrder);\n \n $this->display_menu($order_num);\n }", "title": "" }, { "docid": "cda2720add6893148624c57058b85e09", "score": "0.5918323", "text": "abstract public function addRow($row, $file);", "title": "" }, { "docid": "68fa50a3c58a9440776b0ae2f5610926", "score": "0.59012216", "text": "protected function add_order_item() {\n\t\t/**\n * @param int $order_id\n * @param string $item The item name\n * @param int $quantity\n * @param float $amount the setup cost\n * @param float $monthly the monthly cost\n * @return bool\n */\n extract( $this->get_parameters( 'order_id', 'item', 'quantity', 'amount', 'monthly' ) );\n\n $order_item = new OrderItem();\n $order_item->order_id = $order_id;\n $order_item->item = $item;\n $order_item->quantity = $quantity;\n $order_item->amount = $amount;\n $order_item->monthly = $monthly;\n $order_item->create();\n\t\t\n\t\t$this->add_response( array( 'success' => true, 'message' => 'success-add-order-item' ) );\n\t\t$this->log( 'method', 'The method \"' . $this->method . '\" has been successfully called.' . \"\\nOrder ID: \" . $order_item->id, true );\n\t}", "title": "" }, { "docid": "d21198e837e3e7bb12cd107dfc9238cf", "score": "0.5861324", "text": "public function addAction(){\n\t\t$order_id = $this->getRequest()->getParam('order_id');\n\t\tMage::Register('bookingOrderId', $order_id);\n\t\t$this->loadLayout();\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "de6df23e352516ea70eb01112bffca10", "score": "0.5859403", "text": "public function add_order_item($order_id, $item);", "title": "" }, { "docid": "3bb9c86be25a1397d8be7d69ddb40ccc", "score": "0.5851637", "text": "public function add()\n {\n $sql = \"INSERT INTO situatedprinter (printerId, location, costingdepartment) VALUES (?,?,?)\";\n $this->dbObj->runQuery($sql,\n array(\n $this->getPrinterId(),\n $this->getLocation(),\n $this->getCostDepartment()\n ));\n }", "title": "" }, { "docid": "44ff0d6c4793f112c35e107b3edb4c24", "score": "0.584398", "text": "public function insert() {\n $this->arsetup->getColumnList();\n // @TODO, start a transaction\n $this->arsetup->directQuery(\"Start transaction\");\n // @TODO, get the last order #\n $ds = $this->findOpen();\n $invcnbr = $ds[0]['invcnbr'];\n // @TODO: increment number\n $invcnbr = intval($invcnbr);\n if ($invcnbr == 0) {\n throw new Exception(\"invalid invoice #\");\n }\n $invcnbr++;\n $invcNbrStr = sprintf(\"%06d\", $invcnbr);\n $ds[0]['invcnbr'] = $invcNbrStr;\n // @TODO: save it\n $this->arsetup->update(array(\"setupid\"=>\"AR\"), array(\"lastrefnbr\"=>$invcNbrStr));\n $this->arsetup->directQuery(\"commit\");\n return $this->findOpen();\n //$this->arsetup->directQuery(\"rollback \");\n //throw new Exception(\"Sorry, not ready yet\");\n }", "title": "" }, { "docid": "483c8eeb2d13085efb2912e59b5df47b", "score": "0.58389574", "text": "function add_order($params)\n {\n $this->db->insert('orders',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "483c8eeb2d13085efb2912e59b5df47b", "score": "0.58389574", "text": "function add_order($params)\n {\n $this->db->insert('orders',$params);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "910421032ab59924a6889d9cab37ba90", "score": "0.5836682", "text": "public function addRow(array $row) {\n $this->rows[] = new DataRow($row);\n }", "title": "" }, { "docid": "cdfa20d88dcca6868ee2d8f9ad24d7a0", "score": "0.583506", "text": "public function insert($row);", "title": "" }, { "docid": "0dfb797d48df9cb66b58ec07be483bf5", "score": "0.5820553", "text": "public function addRow(array $dataRow, array $metaData = array());", "title": "" }, { "docid": "db324b8dfc73edfcacb90f12added2fc", "score": "0.5820028", "text": "protected function addRow($id, $name, $qty, $price, $weight, $requires_shipping, Array $attributes = array(), Array $conditions = array(), Array $disable = array())\n\t{\n\t\tif(empty($id) || empty($name) || empty($qty) || ! isset($price) || ! isset($weight) || ! isset($requires_shipping))\n\t\t{\n\t\t\tthrow new Exceptions\\CartMissingRequiredIndexException;\n\t\t}\n\n\t\tif( ! is_numeric($qty))\n\t\t{\n\t\t\tthrow new Exceptions\\CartInvalidQantityException;\n\t\t}\n\n\t\tif( ! is_numeric($price))\n\t\t{\n\t\t\tthrow new Exceptions\\CartInvalidPriceException;\n\t\t}\n\n\t\tif( ! is_numeric($weight))\n\t\t{\n\t\t\tthrow new Exceptions\\CartInvalidWeightException;\n\t\t}\n\n\t\tif( ! is_array($attributes))\n\t\t{\n\t\t\tthrow new Exceptions\\CartInvalidAttributesException;\n\t\t}\n\n\t\tif( ! is_array($conditions))\n\t\t{\n\t\t\tthrow new Exceptions\\CartInvalidConditionsException;\n\t\t}\n\n\t\t$cart = $this->getContent();\n\n\t\t$rowId = $this->generateRowId($id, $attributes);\n\n\t\tif($cart->get('items', new CartItemCollection([], $this->associatedModel, $this->associatedModelNamespace))->has($rowId))\n\t\t{\n\t\t\t$row = $cart->get('items')->get($rowId);\n\n\t\t\t$cart->put('items', $this->updateRow($rowId, array('qty' => $row->qty + $qty)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$cart->put('items', $this->createRow($rowId, $id, $name, $qty, $price, $weight, $requires_shipping, $attributes, $conditions, $disable));\n\t\t}\n\n\t\treturn $this->updateCart($cart);\n\t}", "title": "" }, { "docid": "1343951e15429d709ef735ecf48255fb", "score": "0.57697433", "text": "function add() {\n\t\t\n\t\t// if didn't pass a set param, just add a new row\n\t\tif(empty($this->set)) {\n\t\t\tmysql_query(\"INSERT INTO {$this->table} VALUES ()\");\n\t\t\n\t\t// if you passed a set param then use that in the insert\n\t\t} else {\n\t\t\tmysql_query(\"INSERT INTO {$this->table} SET {$this->set}\");\n\t\t}\n\t\t\n\t\t// we return the primary key so that we can order by it in the jS\n\t\techo $this->getPrimaryKey();\n\t}", "title": "" }, { "docid": "8cca0986af765ce6c75a269c71f5fd85", "score": "0.5768569", "text": "public function insertOrder($query){\n\t\t$insert_row = $this->link->query($query) or die($this->link->error.__LINE__);\n\n\t\t//Validate Insert\n\t\tif($insert_row){\n\t\t\theader(\"Location: ../main/orders.php?msg=\".urlencode(\"Order Added\"));\n\t\t\texit();\n\t\t} else{\n\t\t\tdie('Error: ('. $this->link->errno . ') ' . $this->link->error);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "2b07f4ac84cb985fe3220f908518ed93", "score": "0.5747018", "text": "function CreateNewRow() {\n $rows = $this->model->getRows();\n $sql_data = $this->CreateRow($rows, $this->model);\n $update = $this->businessLogic->create_new_row($this->table_name, $sql_data[0], $sql_data[1], $sql_data[2]);\n return $this->checkIsWasGood($update);\n \n }", "title": "" }, { "docid": "b6ab9fd1d1c5ca0607dc2b19782bac45", "score": "0.57349944", "text": "function insertProdOrdRow() {\n\t\t\t\t\t\t\tglobal $con, $qty, $cost, $disc;\n\t\t\t\t\t\t\t$id = checkFkProdId();\t// gives a value to $id\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif ($id > 0) {\n\t\t\t\t\t\t\t\t// Prepare\n\t\t\t\t\t\t\t\t$insert = \"INSERT INTO productOrders (prodId, prodOrdDate, shipDate, arrivDate, quantity, prodCost, totProdDisc) VALUES (?, ?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t$prep = $con -> prepare($insert);\n\t\t\t\t\t\t\t\t// Checks if the prepare was successful\n\t\t\t\t\t\t\t\tif ($con -> error) {\n\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Prepare error ' . $con -> errno . ' ' . $con -> error . ' in productOrders\")</script>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\techo \"<script>console.log('Prepare was successful for productOrders!');</script>\\n\";\n\n\t\t\t\t\t\t\t\t\t// Bind\n\t\t\t\t\t\t\t\t\t$prep -> bind_param(\"isssidd\", $prodId, $ordDate, $shipDate, $arrivDate, $quan, $totPrice, $totDisc);\t// binds all parameters to placeholders\n\t\t\t\t\t\t\t\t\tif ($prep -> error) {\n\t\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Bind error ' . $prep -> errno . ' ' . $prep -> error . ' in productOrders\")</script>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\techo \"<script>console.log('Bind was successful for productOrders!')</script>\\n\";\n\n\t\t\t\t\t\t\t\t\t\t// Set values to parameters\n\t\t\t\t\t\t\t\t\t\t$prodId = $id;\n\t\t\t\t\t\t\t\t\t\t$ordDate= date(\"Y-m-d\");\t// set to a local date\n\t\t\t\t\t\t\t\t\t\t$shipDate = date_format(date_add(date_create(), date_interval_create_from_date_string(\"4 days\")), \"Y-m-d\");\t\t// creates a date that's 4 days from the local date\n\t\t\t\t\t\t\t\t\t\t$arrivDate = date_format(date_add(date_create(), date_interval_create_from_date_string(\"14 days\")), \"Y-m-d\");\t// creates a date that's 14 days from the local date\n\t\t\t\t\t\t\t\t\t\t$quan = $qty;\n\t\t\t\t\t\t\t\t\t\t$totPrice = str_replace(\",\", \"\", str_replace(\"$\", \"\", $cost));\t// gets rid of the '$' and ',' so cost can be added to the database\n\t\t\t\t\t\t\t\t\t\t$totDisc = $disc / 100;\n\n\t\t\t\t\t\t\t\t\t\t// Execute\n\t\t\t\t\t\t\t\t\t\t$prep -> execute();\n\t\t\t\t\t\t\t\t\t\t// Checks if execute was successful\n\t\t\t\t\t\t\t\t\t\tif ($prep -> error) {\n\t\t\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Execute error ' . $prep -> errno . ' ' . $prep -> error . ' in productOrders\");</script>';\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo \"<script>console.log('Execute was successful for productOrders!')</script>\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$prep -> close();\t// closes $prep to end processing\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "title": "" }, { "docid": "42a0d7e7f035abbb7854d3260a450e40", "score": "0.5697067", "text": "public function addRow($dataRow, $style);", "title": "" }, { "docid": "c012ec55ab118567244f64388eebbc6b", "score": "0.5684682", "text": "function insertOrdRow() {\n\t\t\t\t\t\t\tglobal $con, $crednum, $credexpm, $credexpy, $cvv, $mem;\n\t\t\t\t\t\t\t$id = checkFkCustId();\t// gives a value to $id\n\t\t\t\t\t\t\t$arrEncData = checkHash();\t// gets the encrypted Credit Card Number And CVV\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif ($id > 0 && $arrEncData != null) {\n\t\t\t\t\t\t\t\t// Prepare\n\t\t\t\t\t\t\t\t$insert = \"INSERT INTO orders (custId, creditCardNum, creditExpMon, creditExpYr, cvv, memDisc) VALUES (?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t$prep = $con -> prepare($insert);\n\t\t\t\t\t\t\t\t// Checks if the prepare was successful\n\t\t\t\t\t\t\t\tif ($con -> error) {\n\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Prepare error ' . $con -> errno . ' ' . $con -> error . ' in orders\")</script>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\techo \"<script>console.log('Prepare was successful for orders!')</script>\\n\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// Bind\n\t\t\t\t\t\t\t\t\t$prep -> bind_param(\"ississ\", $custId, $ccnum, $expm, $expy, $cv, $memDisc);\t// binds all parameters to placeholders\n\t\t\t\t\t\t\t\t\tif ($prep -> error) {\n\t\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Bind error ' . $prep -> errno . ' ' . $prep -> error . ' in orders\")</script>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\techo \"<script>console.log('Bind was successful for orders!')</script>\\n\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Set values to parameters\n\t\t\t\t\t\t\t\t\t\t$custId = $id;\n\t\t\t\t\t\t\t\t\t\t$ccnum = $arrEncData[0];\t\n\t\t\t\t\t\t\t\t\t\t$expm = $credexpm;\n\t\t\t\t\t\t\t\t\t\t$expy = $credexpy;\n\t\t\t\t\t\t\t\t\t\t$cv = $arrEncData[1];\n\t\t\t\t\t\t\t\t\t\t//Sets $memDisc to 'Y' or 'N'\n\t\t\t\t\t\t\t\t\t\tif ($mem == \"on\") {\n\t\t\t\t\t\t\t\t\t\t\t$memDisc = \"Y\";\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\t$memDisc = \"N\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Execute\n\t\t\t\t\t\t\t\t\t\t$prep -> execute();\n\t\t\t\t\t\t\t\t\t\t// Checks if execute was successful\n\t\t\t\t\t\t\t\t\t\tif ($prep -> error) {\n\t\t\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Execute error ' . $prep -> errno . ' ' . $prep -> error . ' in orders\");</script>';\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo \"<script>console.log('Execute was successful for orders!');</script>\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$prep -> close();\t// closes $prep to end processing\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t}", "title": "" }, { "docid": "5420d2f34bc960998274f0ab1371305a", "score": "0.5680849", "text": "public function insertRow($row,$primaryKeyName);", "title": "" }, { "docid": "c60887005fb10defb6a76402f2838a3d", "score": "0.5676995", "text": "function add_order($order = NULL)\n {\n $this->db->insert('buyer_products', $order);\n return $this->db->insert_id();\n }", "title": "" }, { "docid": "db271f323f55a74d858a9a6e160c410f", "score": "0.56758165", "text": "public function add_row($args) {\n\t\t$args = func_get_args();\n\t\t$this->add_row_array($args);\n\t}", "title": "" }, { "docid": "410237d5fe90c910c0402480bb582210", "score": "0.56696767", "text": "protected function _addOrderTable()\n {\n\n $iTableStart = $this->_iPosition;\n\n $this->_addOrderTableHeader();\n\n $this->line(self::LINEBEGIN, $this->_iPosition, self::LINEEND, $this->_iPosition);\n\n $this->_addArticleList();\n\n $this->line(self::LINEBEGIN, $this->_iPosition, self::LINEEND, $this->_iPosition);\n\n $this->_addShippingInfo();\n\n $this->line(self::LINEBEGIN, $this->_iPosition, self::LINEEND, $this->_iPosition);\n\n $this->_addOrderSummary();\n\n $this->line(self::COLTWO, $iTableStart, self::COLTWO, $this->_iPosition);\n $this->line(self::COLTHREE, $iTableStart, self::COLTHREE, $this->_iPosition);\n $this->line(self::COLFOUR, $iTableStart, self::COLFOUR, $this->_iPosition);\n }", "title": "" }, { "docid": "57a72930b46b926101c93432a7b0c3a2", "score": "0.5661165", "text": "public function newRow()\n {\n $this->currentColumn = 0;\n }", "title": "" }, { "docid": "a61a2ea47fd3eb6dabdac28e1c164174", "score": "0.5653802", "text": "private function actionInsertIntoOrders() {\n\n include_once $_SERVER['DOCUMENT_ROOT'] . '/Storage.php';\n $db = Storage::getInstance();\n $mysqli = $db->getConnection();\n\n if(isset($_POST['name'])){\n $name = $_POST['name'];\n }\n if(isset($_POST['street'])){\n $street = $_POST['street'];\n }\n if(isset($_POST['city'])){\n $city = $_POST['city'];\n }\n if(isset($_POST['state'])){\n $state = $_POST['state'];\n }\n if(isset($_POST['zip'])){\n $zip = $_POST['zip'];\n }\n if(isset($_POST['country'])){\n $country = $_POST['country'];\n }\n if(isset($_POST['giftwrap'])){\n $giftwrap = $_POST['giftwrap'];\n }\n\n $order_id = $this->model->getOrderId();\n\n $sql_query = \"INSERT INTO orders VALUES ('$order_id', '$name', '$street', '$city', '$state', '$zip', '$country', '$giftwrap')\";\n\n $sql = $mysqli->prepare($sql_query);\n\n $sql->execute();\n }", "title": "" }, { "docid": "563014021e66c40327e7b8dfc9f4d37a", "score": "0.56472343", "text": "function insertServOrdRow() {\n\t\t\t\t\t\t\tglobal $con, $mons, $cost, $disc;\n\t\t\t\t\t\t\t$id = checkFkServId();\t// gives a value to $id\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif ($id > 0) {\n\t\t\t\t\t\t\t\t// Prepare\n\t\t\t\t\t\t\t\t$insert = \"INSERT INTO serviceOrders (servId, months, startOfServ, endOfServ, servCost, totServDisc) VALUES (?, ?, ?, ?, ?, ?)\";\n\t\t\t\t\t\t\t\t$prep = $con -> prepare($insert);\n\t\t\t\t\t\t\t\t// Checks if the prepare was successful\n\t\t\t\t\t\t\t\tif ($con -> error) {\n\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Prepare error ' . $con -> errno . ' ' . $con -> error . ' in serviceOrders\")</script>';\n\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\techo \"<script>console.log('Prepare was successful for serviceOrders!');</script>\\n\";\n\n\t\t\t\t\t\t\t\t\t// Bind\n\t\t\t\t\t\t\t\t\t$prep -> bind_param(\"iissdd\", $servId, $months, $start, $end, $totPrice, $totDisc);\t// binds all parameters to placeholders\n\t\t\t\t\t\t\t\t\tif ($prep -> error) {\n\t\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Bind error ' . $prep -> errno . ' ' . $prep -> error . ' in serviceOrders\")</script>';\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\techo \"<script>console.log('Bind was successful for serviceOrders!')</script>\\n\";\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Set values to parameters\n\t\t\t\t\t\t\t\t\t\t$servId = $id;\n\t\t\t\t\t\t\t\t\t\t$months = $mons;\n\t\t\t\t\t\t\t\t\t\t$start = date(\"Y-m-d\");\t// set to the local date\n\t\t\t\t\t\t\t\t\t\t$end = date_format(date_add(date_create(), date_interval_create_from_date_string(\"$mons months\")), \"Y-m-d\");\t// set 2, 6, or 12 months from the local date\n\t\t\t\t\t\t\t\t\t\t$totPrice = str_replace(\"$\", \"\", $cost);\t// gets rid of the '$' so cost can be added to the database\n\t\t\t\t\t\t\t\t\t\t$totDisc = $disc / 100;\t// set to a percent but as a decimal\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t// Execute\n\t\t\t\t\t\t\t\t\t\t$prep -> execute();\n\t\t\t\t\t\t\t\t\t\t// Checks if execute was successful\n\t\t\t\t\t\t\t\t\t\tif ($prep -> error) {\n\t\t\t\t\t\t\t\t\t\t\techo '<script>console.log(\"Execute error ' . $prep -> errno . ' ' . $prep -> error . ' in serviceOrders\");</script>';\n\t\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\t\techo \"<script>console.log('Execute was successful for serviceOrders!')</script>\\n\";\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t$prep -> close();\t// closes $prep to end processing\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}", "title": "" }, { "docid": "d1d68397ad114bd5619c16353f75b80c", "score": "0.56384", "text": "public function addRow(array $row) {\n $this->_array[]= $row;\n return $this;\n }", "title": "" }, { "docid": "1597055d2b30754b7ad23b4d939e41e5", "score": "0.5638365", "text": "public function addrowAction() {\n\t\t$searchObj = new Model_Table_StudentSearchRow();\n\t\t$rowId = $searchObj->insertRow(array('id_student_search'=>$this->getRequest()->getParam('id_student_search')));\n\t\t$row = $searchObj->find($rowId)->toArray();\n\t\t\n\t\t$data = new Zend_Dojo_Data('id_student_search_rows', $row);\n $this->view->data = $data->toJson();\n return $this->render('data');\n\t}", "title": "" }, { "docid": "d23126218577b24c40d5b324c9a3faab", "score": "0.56087273", "text": "function addRepairOrder() {\n\t\t$repairOrder = new repairOrder;\n\t\t$controller = new repairOrdersController;\n\t\t$template = new template;\n\t\t$template->addScript('/js/'.systemSettings::get('SOURCEDIR').'/admin/repairOrder.js');\n\t\t$template->assignClean('_TITLE', systemSettings::get('SITENAME').' Repair Orders Admin');\n\t\t$template->assignClean('repairOrder', $repairOrder->fetchArray());\n\t\t$template->assignClean('propertyMenuItem', getRequest('propertyMenuItem'));\n\t\t$template->assignClean('mode', 'add');\n\t\t$template->assignClean('statusOptions', $controller->getOptions('status'));\n\t\t$template->assignClean('contactOptions', $controller->getOptions('contact'));\n\t\t$template->assignClean('receiveMethods', $controller->getOptions('receiveMethod'));\n\t\t$template->assignClean('returnMethods', $controller->getOptions('returnMethod'));\n\t\t$template->assignClean('consoles', systemsController::getSystems());\n\t\t$template->assignClean('states', statesController::getStates());\n\t\t$template->assignClean('countries', countriesController::getCountries());\n\t\t$template->assignClean('systemProblems', systemProblemsController::getSystemProblems());\n\t\t$template->assignClean('comments', array());\n\t\t$template->assignClean('comment', '');\n\t\t$template->assignClean('admin', adminCore::getAdminUser());\n\t\t$template->assignClean('fullAccess', true);\n\t\t$template->setSystemDataGateway();\n\t\t$template->getSystemMessages();\n\t\t$template->display('admin/repairOrderEdit.htm');\n\t}", "title": "" }, { "docid": "b06810947917f5a89ab44ee8c462586e", "score": "0.56058234", "text": "public function addOrder($data) {\n\t\t$this->db->insert('orders', $data);\n\t\tif ($this->db->affected_rows() > 0) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "f32b3cd3f0131df31c1b54af6e342ef4", "score": "0.5596568", "text": "public function add_order_item_data($data)\n\t{\n\t\treturn $this->db->insert('order_items', $data);\n\t}", "title": "" }, { "docid": "7f302736137825485d6e3fdcc3efa68a", "score": "0.5587208", "text": "public function addRow($_row){\n\t\t\t$this->rows .= '<tr>';\n\t\t\tforeach($_row as $col){\n\t\t\t\t$this->rows .= '<td>'.$col.'</td>';\n\t\t\t}\n\t\t\t$this->rows .= '</tr>';\n\t\t\t\n\t\t\t$this->rowsNum++;\n\t\t}", "title": "" }, { "docid": "bbd3be8f0d623f513dbd61b930223180", "score": "0.55513966", "text": "public function addRow($row = null, $first = false){\n // Fixme: Agregar el modelo si esta asignado y no se envia un objeto fila.\n if($row == null){\n //$row = new Row();\n $cells = array();\n for($c = 1; $c <= $this->numColumns; $c++){\n $cells[] = new Cell();\n }\n $this->addRow(new Row($cells));\n }else{\n $this->numRows++;\n $this->content[] = $row;\n }\n }", "title": "" }, { "docid": "b949a61adb1715e58e91b0d097f38ffa", "score": "0.55460274", "text": "public function insertOrder($data){\n // Add created and modified date if not included\n if(!array_key_exists(\"created\", $data)){\n $data['created'] = date(\"Y-m-d H:i:s\");\n }\n if(!array_key_exists(\"modified\", $data)){\n $data['modified'] = date(\"Y-m-d H:i:s\");\n }\n \n // Insert order data\n $insert = $this->db->insert($this->ordTable, $data);\n\n // Return the status\n return $insert?$this->db->insert_id():false;\n }", "title": "" }, { "docid": "e3f327f43ac14b109391b02f842bb529", "score": "0.553911", "text": "public function add($row) {\n\t\tif ($row instanceof db_row) {\n\t\t\t$this->_rows[$this->_count] = $row;\n\t\t\t$array = $row->getData();\n\t\t} else {\n\t\t\t$array = $row;\n\t\t}\n\t\t$this->cfg->setInArray('data', $this->_count, $array);\n\t\t$this->_count++;\n\t}", "title": "" }, { "docid": "c3a797afee1f17a7a3590ad453c82e0a", "score": "0.55333453", "text": "protected function addRow($id, $name, $qty, $price, array $attributes = [])\n {\n if ( ! is_numeric($qty) || $qty < 1) {\n throw new \\Exception('Invalid quantity.');\n }\n if ( ! is_numeric($price) || $price < 0) {\n throw new \\Exception('Invalid price.');\n }\n $cart = $this->getCart();\n $rawId = $this->generateRawId($id, $attributes);\n if ($row = $cart->get($rawId)) {\n $row = $this->updateQty($rawId, $row->qty + $qty);\n } else {\n $row = $this->insertRow($rawId, $id, $name, $qty, $price, $attributes);\n }\n\n return $row;\n }", "title": "" }, { "docid": "0a6b08ae9f414e6bc93b92ece292af93", "score": "0.55321836", "text": "public function insertRow(Array $data);", "title": "" }, { "docid": "bdd0c96db6fe187febb0737c8ee06c68", "score": "0.5524647", "text": "function add_order_item($shoe_id, $order_id, $quantity){\n //echo $shoe_id . $order_id . $quantity;\n global $db;\n $query = '\n INSERT INTO items_in_order (shoeID, orderID, item_quantity)\n VALUES (:shoe_id, :order_id, :quantity)';\n $statement = $db->prepare($query);\n $statement->bindValue(':shoe_id', $shoe_id);\n $statement->bindValue(':order_id', $order_id);\n $statement->bindValue(':quantity', $quantity);\n $statement->execute();\n $statement->closeCursor();\n}", "title": "" }, { "docid": "2a6a031c354ff8ae7e043fb947b355a7", "score": "0.5511394", "text": "public function insertRowCarOrders($params = []){\n\n $query = \"INSERT INTO car_orders(\n\n user_id,\n active, \n\n in_country_id, \n in_date,\n in_city, \n in_post,\n\n out_country_id, \n out_date,\n out_city, \n out_post,\n\n display_to_date, \n display_to_hours, \n price, \n currency_id, \n car_type_id,\n car_details,\n tonnage, \n compressor, \n pump, \n adr, \n gps, \n ready_to_ride, \n note\n ) \n VALUE(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )\";\n try {\n\n $stmt = $this->datab->prepare($query);\n $stmt->execute($params);\n \n $this->_lastInsertedId = $this->datab->lastInsertId();\n return TRUE;\n // $lastId = $this->datab->lastInsertId();\n // return $lastId;\n\n } catch (PDOException $e) {\n throw new Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "e2e44f8434f19aa989553362b2b7fe4f", "score": "0.55094874", "text": "function insertRow($row, $row_id = 0)\n {\n array_splice($this->_data, $row_id, 0, array($row));\n\n $this->_updateRowsCols($row);\n }", "title": "" }, { "docid": "e2e44f8434f19aa989553362b2b7fe4f", "score": "0.55094874", "text": "function insertRow($row, $row_id = 0)\n {\n array_splice($this->_data, $row_id, 0, array($row));\n\n $this->_updateRowsCols($row);\n }", "title": "" }, { "docid": "217f242fc69a64925b7fd4e31ecc8823", "score": "0.5508934", "text": "public function createOrder($data);", "title": "" }, { "docid": "6119754fde00824d3cba5577745a7160", "score": "0.55085474", "text": "public function actionAddOrders()\r\n {\r\n if (Yii::$app->request->isAjax) {\r\n $row = Yii::$app->request->post('Orders');\r\n if((Yii::$app->request->post('isNewRecord') && Yii::$app->request->post('_action') == 'load' && empty($row)) || Yii::$app->request->post('_action') == 'add')\r\n $row[] = [];\r\n return $this->renderAjax('_formOrders', ['row' => $row]);\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "fc4675816375ea7d7e600fc92d7c0057", "score": "0.5504852", "text": "function wc_add_order_item($order_id, $item_array)\n {\n }", "title": "" }, { "docid": "efa2f887493a0ef8096ee89d9b3bff8c", "score": "0.55048126", "text": "function campaignEcommOrderAdd($order) {\n $params = array();\n $params[\"order\"] = $order;\n return $this->callServer(\"campaignEcommOrderAdd\", $params);\n }", "title": "" }, { "docid": "66d4cf4ccb15ae5114d8ea4efad8b519", "score": "0.5504452", "text": "public function addReservation($reservation)\n {\n }", "title": "" }, { "docid": "1cba45abde62e0e76c5eb22c9587a250", "score": "0.5504258", "text": "public function addRow()\n {\n // creates a new Table Row\n $row = new TTableRow;\n \n // add this row to the table element\n if (isset($this->section))\n {\n $this->section->add($row);\n }\n else\n {\n parent::add($row);\n }\n return $row;\n }", "title": "" }, { "docid": "2e8a94d1bc7737f698324385826734b8", "score": "0.5503486", "text": "public function add_order($order_data){\n $insert = $this->db->insert('orders', $order_data);\n return $insert;\n}", "title": "" }, { "docid": "9680d73031fcf7d247b33ddb393b2687", "score": "0.54990816", "text": "private function addEntryToItemTableStock($d){\n $m=$this->getItemModel();\n return $m->rowAdd($d);\n }", "title": "" }, { "docid": "8aebb2cc3427bea74f89365ae02206eb", "score": "0.5495383", "text": "public function addRecord(RowInterface $record): void;", "title": "" }, { "docid": "e5fac69732eac4ee07122f40cbf2523b", "score": "0.5488311", "text": "public function addRow($oneRow) {\n if(is_array($oneRow))\n array_push($this->rows, $oneRow);\n }", "title": "" }, { "docid": "de5550979daba3efa9d5ad2e46f129c1", "score": "0.5484727", "text": "public function addProductRecord($rows)\n {\n // insert record one by one\n foreach ($rows as $row) {\n $this->addProductOneRecord($row);\n }\n }", "title": "" }, { "docid": "1abf8255fcc3a90c61c88a1283410573", "score": "0.54833734", "text": "public function Add()\n\t{\n\t\t$this->_processInsert();\n\t}", "title": "" }, { "docid": "b826589885092894e42e69df8339185d", "score": "0.54819643", "text": "public function addAction()\n {\n \t$id = (int) $this->params()->fromRoute('id', 0);\n\t\tif (!$id) {\n \t\treturn $this->redirect()->toRoute('order');\n \t}\n \t// Retrieve the current user\n \t$current_user = Functions::getUser($this);\n \t$current_user->retrieveHabilitations($this);\n \t\n \t// Retrieve the order\n \t$order = $this->getOrderTable()->get($id);\n \t \n \t// Retrieve the products\n \t$select = $this->getProductTable()->getSelect()\n \t\t->where(array('is_on_sale' => true))\n \t\t->order(array('caption'));\n \t$cursor = $this->getProductTable()->selectWith($select);\n \t$products = array();\n \tforeach ($cursor as $product) $products[] = $product;\n\t\n \t// Create the form object\n \t$form = new OrderProductAddForm();\n \t$form->addElements($products); \t \n \t$form->get('submit')->setValue('Add');\n\n \t$request = $this->getRequest();\n \tif ($request->isPost()) {\n \t\t$orderProduct = new OrderProduct();\n \t\t$form->setInputFilter($orderProduct->getInputFilter());\n \t\t$form->setData($request->getPost());\n\n \t\t// Update the entity with the data from the valid form and create it into the database\n \t\tif ($form->isValid()) {\n \t\t\t$orderProduct->exchangeArray($form->getData());\n \t\t$orderProduct->id = NULL;\n \t\t$orderProduct->order_id = $id;\n \t\t$orderProduct->hoped_delivery_date = $order->initial_hoped_delivery_date;\n\n \t\t// Retrieve the current product price\n \t\t$product = $this->getProductTable()->get($orderProduct->product_id);\n \t\t$orderProduct->price = $product->price;\n\n\t\t\t\t// Generates the specified quantity of order rows\n \t\tfor ($i = 0; $i < $form->get('quantity')->getValue(); $i++) {\n \t\t\t$this->getOrderProductTable()->save($orderProduct, $current_user);\n \t\t}\n\n \t\t// Update the order status\n \t\t$order->status = 'Nouvelle';\n \t\t$this->getOrderTable()->save($order, $current_user);\n \t\t\n \t\t\t// Redirect to the index\n \t\t\treturn $this->redirect()->toRoute('orderProduct/index', array('id' => $id));\n \t\t}\n \t}\n \treturn array(\n \t\t'current_user' => $current_user,\n \t\t'title' => 'Order',\n \t\t'form' => $form,\n \t\t'order' => $order,\n \t\t'id' => $id,\n \t\t'products' => $products\n \t);\n }", "title": "" }, { "docid": "d6a722878b4ec7f1625716734f4668ed", "score": "0.547867", "text": "public function createOrder($param);", "title": "" }, { "docid": "98f970c27d72f3e52c80b6de41a7cec5", "score": "0.54664296", "text": "public function insert($data)\n {\n $hydrator = new ObjectProperty();\n //Transformando o object em array\n $data->user_id = $this->usersRepository->getAuthenticated()->getId();\n //print_r($data);die;\n $data->created_at = (new \\DateTime())->format('Y-m-d');\n $data->total = 0;\n $items = $data->item;\n unset($data->item);\n\n $orderData = $hydrator->extract($data);\n $tableGateway = $this->repository->getTableGateway();\n\n try{\n $tableGateway->getAdapter()->getDriver()->getConnection()->beginTransaction();\n $orderId = $this->repository->insert($orderData);\n\n $total = 0;\n foreach ($items as $key=>$item){\n $product = $this->productRepository->find($item['product_id']);\n $item['order_id'] = $orderId;\n $item['price'] = $product['price'];\n $item['total'] = $items[$key]['total'] = $item['quantity'] * $item['price'];\n $total += $item['total'];\n\n $this->repository->insertItem($item);\n }\n\n $this->repository->update(['total' => $total], $orderId);\n $tableGateway->getAdapter()->getDriver()->getConnection()->commit();\n\n return ['order_id' => $orderId];\n }catch(\\Exception $e){\n $tableGateway->getAdapter()->getDriver()->getConnection()->rollback();\n return 'error';\n }\n }", "title": "" }, { "docid": "6848f6f102efc00eaa5234e63330dd23", "score": "0.54641193", "text": "public function add(){\n\t\t\t$sql = \"insert into \".self::$tablename.\" (numero_recibo,nombre_solicitante,domicilio_solicitante,numero,colonia,fecha_alta,status,fecha_sol,domicilio_predio,numero_predio,colonia_predio) \";\n\t\t\t$sql .= \"value (\\\"$this->numero_recibo\\\",\\\"$this->nombre_solicitante\\\",\\\"$this->domicilio_solicitante\\\",\\\"$this->numero\\\",\\\"$this->colonia\\\",\\\"$this->fecha_alta\\\",\\\"$this->status\\\",\\\"$this->fecha_sol\\\",\\\"$this->domicilio_predio\\\",\\\"$this->numero_predio\\\",\\\"$this->colonia_predio\\\")\";\n\t\t\treturn Executor::doit($sql);\n\t\t}", "title": "" }, { "docid": "d4e26ec5af20264f930edfb0b0f42ff3", "score": "0.54583395", "text": "protected function addRow(array $row)\n {\n $this->initCsv();\n if (!$this->fputcsv->invokeArgs($this->csv, $this->getFputcsvParameters($row))) {\n throw new RuntimeException('Unable to write record to the CSV document.');\n }\n\n if (\"\\n\" !== $this->newline) {\n $this->csv->fseek(-1, SEEK_CUR);\n $this->csv->fwrite($this->newline, strlen($this->newline));\n }\n }", "title": "" }, { "docid": "5e7ce3dff81505d0aeb31c873d4fab91", "score": "0.54513764", "text": "public function enterOrder() {\n\t\t\t// existing record indicates order has already been entered\n\t\t\t// payment may not have been cleared\n\t\t\tif (!$this->record) {\n\t\t\t\t$order = new order;\n\t\t\t\tcustomerCore::initialize();\n\t\t\t\t$customerInfo = customerCore::getCustomerInfo();\n\t\t\t\tif (!empty($customerInfo)) {\n\t\t\t\t\t$order->set('memberID', $customerInfo['id']);\n\t\t\t\t}\n\t\t\t\t$order->set('packageID', $this->package->get('packageID'));\n\t\t\t\t$order->set('quantity', $this->form['quantity']);\n\t\t\t\t$order->set('totalCost', $this->finalOrderCost);\n\t\t\t\t$order->set('shippingArrangement', $this->form['shipArrangement']);\n\t\t\t\t$order->set('shippingCost', $this->shippingCost);\n\t\t\t\t$order->set('fulfillBy', $this->form['startDate']);\n\t\t\t\t$order->set('siteID', systemSettings::get('SITEID'));\n\t\t\t\t$order->set('paymentCleared', 'no');\n\t\t\t\t$order->set('discount', 0);\n\t\t\t\t$order->set('orderStatus', 'new');\n\t\t\t\t$order->set('orderDate', 'NOW()', false);\n\t\t\t\t$order->enclose('orderDate', false);\n\t\t\t\t$paymentMethod = $this->paymentMethod->getArrayData('form', 'paymentMethod');\n\t\t\t\tif ($paymentMethod == 'cc') {\n\t\t\t\t\t$order->set('paymentMethod', $this->paymentMethod->getArrayData('form', 'ccType'));\n\t\t\t\t} else {\n\t\t\t\t\t$order->set('paymentMethod', $paymentMethod);\n\t\t\t\t}\n\t\t\t\t$this->billingAddress->saveAddress(0);\n\t\t\t\tif (!$this->billingAddress->getArrayData('record', 'addressID')) {\n\t\t\t\t\taddError('Billing info could not be saved');\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t$order->set('billingID', $this->billingAddress->getArrayData('record', 'addressID'));\n\t\t\t\t}\n\t\t\t\t$this->paymentMethod->saveMethod(0, $order->get('billingID'));\n\t\t\t\tif (!$this->paymentMethod->getArrayData('record', 'paymentID')) {\n\t\t\t\t\taddError('Billing info could not be saved');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$this->shippingAddress->saveAddress(0);\n\t\t\t\tif (!$this->shippingAddress->getArrayData('record', 'addressID')) {\n\t\t\t\t\taddError('Shipping info could not be saved');\n\t\t\t\t\treturn false;\n\t\t\t\t} else {\n\t\t\t\t\t$order->set('shippingID', $this->shippingAddress->getArrayData('record', 'addressID'));\n\t\t\t\t}\n\t\t\t\tif ($order->save()) {\n\t\t\t\t\t$order->enterSubOrders($this->subShippingCosts);\n\t\t\t\t\t$orderID = $order->get('orderID');\n\t\t\t\t\t$orderReference = new orderReference;\n\t\t\t\t\t$orderReference->set('type', tracker::get('referralType'));\n\t\t\t\t\t$orderReference->set('ID', tracker::get('ID'));\n\t\t\t\t\t$orderReference->set('subID', tracker::get('subID'));\n\t\t\t\t\t$orderReference->set('campaignID', tracker::get('campaignID'));\n\t\t\t\t\t$orderReference->set('offerID', tracker::get('offerID'));\n\t\t\t\t\t$orderReference->set('payoutID', tracker::get('payoutID'));\n\t\t\t\t\t$orderReference->set('passThroughVariable', tracker::get('passThroughVar'));\n\t\t\t\t\t$orderReference->set('orderID', $orderID);\n\t\t\t\t\t$orderReference->set('orderDate', $order->get('orderDate'));\n\t\t\t\t\tif (!$orderReference->save()) {\n\t\t\t\t\t\t$referenceData = $orderReference->fetchArray();\n\t\t\t\t\t\t$referenceString = '';\n\t\t\t\t\t\tforeach ($referenceData as $field => $data) {\n\t\t\t\t\t\t\t$referenceString .= '['.$field.':'.$data.'], ';\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$referenceString = substr($referenceString, 0, -2);\n\t\t\t\t\t\ttrigger_error('There was an error while trying to save an order reference: '.$referenceString, E_USER_WARNING);\n\t\t\t\t\t}\n\t\t\t\t\treturn $this->loadOrder($orderID);\n\t\t\t\t} else {\n\t\t\t\t\taddError('There was an error while saving the order');\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// order record exists\n\t\t\t\t// try to update record, if success update history\n\t\t\t\t$order = new order($this->record['orderID']);\n\t\t\t\tif ($order->exists()) {\n\t\t\t\t\t$order->set('packageID', $this->package->get('packageID'));\n\t\t\t\t\t$order->set('quantity', $this->form['quantity']);\n\t\t\t\t\t$order->set('totalCost', $this->finalOrderCost);\n\t\t\t\t\t$order->set('shippingArrangement', $this->form['shipArrangement']);\n\t\t\t\t\t$order->set('shippingCost', $this->shippingCost);\n\t\t\t\t\t$order->set('fulfillBy', $this->form['startDate']);\n\t\t\t\t\t$order->set('orderDate', 'NOW()', false);\n\t\t\t\t\t$order->enclose('orderDate', false);\n\t\t\t\t\t$paymentMethod = $this->paymentMethod->getArrayData('form', 'paymentMethod');\n\t\t\t\t\tif ($paymentMethod == 'cc') {\n\t\t\t\t\t\t$order->set('paymentMethod', $this->paymentMethod->getArrayData('form', 'ccType'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$order->set('paymentMethod', $paymentMethod);\n\t\t\t\t\t}\n\t\t\t\t\t$this->billingAddress->updateAddress();\n\t\t\t\t\t$order->set('billingID', $this->billingAddress->getArrayData('record', 'addressID'));\n\t\t\t\t\t$this->shippingAddress->updateAddress();\n\t\t\t\t\t$order->set('shippingID', $this->shippingAddress->getArrayData('record', 'addressID'));\n\t\t\t\t\t$this->paymentMethod->updateMethod();\n\t\t\t\t\tif ($order->update()) {\n\t\t\t\t\t\treturn $this->loadOrder($this->record['orderID']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddError('There was an error while updating the order');\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "0dfe11a04982f766fb24d710997de383", "score": "0.5449196", "text": "public function addOrder($userId) {\n $insertQuery = \n \"INSERT INTO orders (order_by, order_date)\n VALUES (\" . $userId . \", NOW());\"\n ;\n\n $this->db->query($insertQuery);\n\n //Select the latest transaction\n $selectQuery = \n \"SELECT *\n FROM orders\n ORDER BY order_id desc\n LIMIT 1;\"\n ;\n\n $orderId = $this->db->query($selectQuery);\n return $orderId->row();\n }", "title": "" }, { "docid": "f8a49b978c117e9e6b514079e323087a", "score": "0.544534", "text": "public function addRow(DataRow $row)\n {\n $this->data[$row->getId()] = $row;\n return $this;\n }", "title": "" }, { "docid": "5e29182ad077ec98fbf60cdd79fa2a31", "score": "0.54333013", "text": "function addDataRow($row)\r\r\n {\r\r\n $num_cells = count($row);\r\r\n if($num_cells !== $this->num_cols) throw new Exception ('Number of rows added and number of table columns must match');\r\r\n \r\r\n foreach($row as $cell)\r\r\n {\r\r\n $this->data[] = $cell;\r\r\n }\r\r\n $this->addQuestionmarks($num_cells); \r\r\n }", "title": "" }, { "docid": "9f90ae9ad50c5f95d8085506fa0fae17", "score": "0.5427033", "text": "public function insertOrder(OrderModel $order):void\n {\n //CRIA IDENTIFICADOR DA ORDEM DE COMPRA\n do{\n $id_base = \"abcdefghijklmnopqrstuvwxyz0123456789\"; \n $id = str_shuffle($id_base);\n \n //VERIFICA SE ESSE IDENTIFICADOR JÁ EXISTE NO BANCO\n $statement = $this->db_log->prepare(\"SELECT * FROM orders WHERE order_id like '{$id}'\");\n $statement->execute();\n }while($statement->rowCount() > 0);\n\n //INSERE A ORDEM\n $statement = $this->db_log->prepare(\"INSERT into orders(order_id, card_number, client_id, value, date) values(:order_id, :card_number, :client_id, :value, :date);\");\n $statement->execute([\n 'order_id' => $id,\n 'card_number' => $order->getCardNumber(),\n 'client_id' => $order->getClientId(),\n 'value' => $order->getValue(),\n 'date' => date(\"d/m/Y\")\n ]);\n }", "title": "" }, { "docid": "ef6490b0d745c19388a3f7e4eebd372d", "score": "0.54221445", "text": "private function storeOrder(): void\n {\n $session = Model::getSession();\n\n // Save the addresses\n $createAddress = $session->get('guest_address')->toCommand();\n $createShipmentAddress = $session->get('guest_shipment_address')->toCommand();\n\n $this->get('command_bus')->handle($createAddress);\n $this->get('command_bus')->handle($createShipmentAddress);\n\n $shipmentMethod = $session->get('shipment_method');\n $paymentMethod = $session->get('payment_method');\n\n // Recalculate order\n $this->cart->calculateTotals();\n\n // Some variables we need later\n $cartTotal = $this->cart->getTotal();\n $vats = $this->cart->getVats();\n\n // Add shipment method to order\n if ($shipmentMethod['data']['vat']) {\n $cartTotal += $shipmentMethod['data']['price'];\n $cartTotal += $shipmentMethod['data']['vat']['price'];\n\n if (!array_key_exists($shipmentMethod['data']['vat']['id'], $vats)) {\n $vat = $this->getVat($shipmentMethod['data']['vat']['id']);\n $vats[$vat->getId()] = [\n 'title' => $vat->getTitle(),\n 'total' => 0,\n ];\n }\n\n $vats[$shipmentMethod['data']['vat']['id']]['total'] += $shipmentMethod['data']['vat']['price'];\n }\n\n // Order\n $createOrder = new CreateOrder();\n $createOrder->sub_total = $this->cart->getSubTotal();\n $createOrder->total = $cartTotal;\n $createOrder->paymentMethod = $this->getPaymentMethods()[$paymentMethod->payment_method]['label'];\n $createOrder->invoiceAddress = $createAddress->getOrderAddressEntity();\n $createOrder->shipmentAddress = $createShipmentAddress->getOrderAddressEntity();\n $createOrder->shipment_method = $shipmentMethod['data']['name'];\n $createOrder->shipment_price = $shipmentMethod['data']['price'];\n\n $this->get('command_bus')->handle($createOrder);\n\n // Vats\n foreach ($vats as $vat) {\n $createOrderVat = new CreateOrderVat();\n $createOrderVat->title = $vat['title'];\n $createOrderVat->total = $vat['total'];\n $createOrderVat->order = $createOrder->getOrderEntity();\n\n $this->get('command_bus')->handle($createOrderVat);\n\n $createOrder->addVat($createOrderVat->getOrderVatEntity());\n }\n\n // Products\n foreach ($this->cart->getValues() as $product) {\n $createOrderProduct = new CreateOrderProduct();\n $createOrderProduct->sku = $product->getProduct()->getSku();\n $createOrderProduct->title = $product->getProduct()->getTitle();\n $createOrderProduct->price = $product->getProduct()->getPrice();\n $createOrderProduct->amount = $product->getQuantity();\n $createOrderProduct->total = $product->getTotal();\n $createOrderProduct->order = $createOrder->getOrderEntity();\n\n $this->get('command_bus')->handle($createOrderProduct);\n\n $createOrder->addProduct($createOrderProduct->getOrderProductEntity());\n }\n\n // Start the payment\n $paymentMethod = $this->getPaymentMethod($session->get('payment_method')->payment_method);\n $paymentMethod->setOrder($createOrder->getOrderEntity());\n $paymentMethod->setData($session->get('payment_method'));\n $paymentMethod->prePayment();\n }", "title": "" }, { "docid": "fe3ed5f05998f1c6ceea00703d759c19", "score": "0.5408509", "text": "public function addRecord()\n\t{\n\t\t$this->filters = []; // disable filtering\n\t\t$commodity = $this->facade->newCommodity();\n\t\tif ( $commodity ) {\n\t\t\t$this->flashMessage( 'New dummy record successfully created. Edit it!' );\n\t\t\t$this->setId( $commodity->getId() );\n\t\t\tif ( $this->presenter->isAjax() ) {\n\t\t\t\t$this->redrawControl( 'grid' );\n\t\t\t} else {\n\t\t\t\t$this->redirect( 'this' );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "11d1e6d084fcb4f72028844af752651d", "score": "0.54085034", "text": "public function addOrder(){\n //保存基本信息\n //1.保存收货信息\n $address_id=I('post.address_id');\n $delivery_id=I('post.delivery_id');\n $pay_type=I('post.payment_id');\n $price=I('post.total_price');\n //获取指定地址信息\n $address_info=D('Address')->getAddressFind($address_id);\n //获取指定收货方式信息\n $delivery_info=M('Delivery')->find($delivery_id);\n $this->data['name']=$address_info['name'];\n $this->data['province_name']=$address_info['province_name'];\n $this->data['city_name']=$address_info['city_name'];\n $this->data['area_name']=$address_info['area_name'];\n $this->data['detail_address']=$address_info['detail_address'];\n $this->data['tel']=$address_info['tel'];\n $this->data['delivery_name']=$delivery_info['name'];\n $this->data['delivery_price']=$delivery_info['price'];\n $this->data['delivery_name']=$delivery_info['name'];\n $this->data['pay_type']=$pay_type;\n $this->data['price']=$price;\n// if(M('invoice')->add($data)===false){\n// $this->error='发票创建失败';\n// return false;\n// }\n// if($this->add()===false){\n// $this->error='订单创建失败';\n// return false;\n// }\n $this->saveInvodice();exit;\ndump($this->data);exit;\n }", "title": "" }, { "docid": "f80d26a2dab130e1259844337e0edbdb", "score": "0.5399413", "text": "function addRow($tablename,$data)\n\t{\n\t\treturn $this->db->insert($tablename, $data); \n\t}", "title": "" }, { "docid": "0056f5dcbbda533176bf869ea00d0e59", "score": "0.53971946", "text": "function slAddLineItem($invid, $serialnumber, $amount, $units, $insplan, $description, $debug) {\n global $sl_err, $services_id;\n if ($GLOBALS['oer_config']['ws_accounting']['enabled'] === 2)\n die(\"Internal error calling slAddLineItem()\");\n $units = max(1, intval($units));\n $price = $amount / $units;\n $tmp = sprintf(\"%01.2f\", $price);\n if (abs($price - $tmp) < 0.000001) $price = $tmp;\n $query = \"INSERT INTO invoice ( \" .\n \"trans_id, \" .\n \"parts_id, \" .\n \"description, \" .\n \"qty, \" .\n \"allocated, \" .\n \"sellprice, \" .\n \"fxsellprice, \" .\n \"discount, \" .\n \"unit, \" .\n \"project_id, \" .\n \"serialnumber \" .\n \") VALUES ( \" .\n \"$invid, \" . // trans_id\n \"$services_id, \" . // parts_id\n \"'$description', \" . // description\n \"$units, \" . // qty\n \"0, \" . // allocated\n \"$price, \" . // sellprice\n \"$price, \" . // fxsellprice\n \"0, \" . // discount\n \"'', \" . // unit\n \"$insplan, \" . // project_id\n \"'$serialnumber'\" . // serialnumber\n \")\";\n if ($debug) {\n echo $query . \"<br>\\n\";\n } else {\n SLQuery($query);\n if ($sl_err) die($sl_err);\n }\n }", "title": "" }, { "docid": "b615b9c4a4afa2537ef15b7b7d865684", "score": "0.5392322", "text": "public function addOrder(\\Shop\\Models\\Orders &$order)\r\n {\r\n $this->__order = $order;\r\n \r\n return $this;\r\n }", "title": "" }, { "docid": "49f7cd8cca26f7b636003984e900e6ac", "score": "0.5376256", "text": "public function add(){\r\n $oDb = $this->__get('oDb');\r\n $sSql = \"INSERT INTO `\". $this->__get('sTable'). \"`(\" . $this->__get('sColumns') .\") VALUES (\" . $this->__get('sValues') .\")\";\r\n return $oDb->insertQuery($sSql);\r\n }", "title": "" }, { "docid": "1bbbe81e9a24c4df2ffa60f8039e278d", "score": "0.5374484", "text": "public function insertRowObject($rowObject) {\r\n\t\t\r\n\t\treturn $this->insertRowData($rowObject->exportPropertiesToArray());\r\n\t\t\r\n\t}", "title": "" }, { "docid": "1aa69bd0ee1c41252ddf6c6752f4094b", "score": "0.53631705", "text": "public function Create() {\n\t$nSeq = $this->AppObject()->SettingsTable()->UseNextOrderSequence();\n\t$sSeq = sprintf(KS_ORD_NUM_FMT,$nSeq);\n\t$sNum = KC_ORD_NUM_PFX.$sSeq;\n\t$db = $this->GetConnection();\n\t$arIns = array(\n\t 'Number'\t\t=> $db->Sanitize_andQuote($sNum),\n\t 'SortPfx'\t\t=> KSQL_ORD_NUM_SORT,\n\t 'WhenCreated'\t=> 'NOW()'\n\t );\n\t$id = $this->Insert($arIns);\n\tif ($id === FALSE) {\n\t throw new exception('Internal Error: Could not create order.');\n\t}\n\treturn $id;\n }", "title": "" }, { "docid": "bdc3bc779612f146d75abad7e2d66bb0", "score": "0.53611165", "text": "public function add(OrderByDistributor $orderByDistributor): void\n {\n $request = $this->db -> prepare('INSERT INTO ordersbydistributor (distributor,status,`order`) VALUES (:distributor, :status,:order)');\n try{\n\n $request->execute(array(\n 'distributor' => $orderByDistributor->distributor()->id(),\n 'status' => $orderByDistributor->status(),\n 'order' => $orderByDistributor->order()->id()\n ));\n }\n catch (\\PDOException $e)\n {\n $exception= new OrderByDistributorManagerException(\"Recovery orderByDIstributor error in the database\",700);\n $exception->setPDOMessage($e->getMessage());\n throw $exception;\n return;\n }\n\n }", "title": "" }, { "docid": "61c8f5728f797a8963d36dc877e5f7a1", "score": "0.535738", "text": "public function store(Order $order, Request $request)\n {\n\n request()->validate([\n 'quantity'=>'required',\n 'description'=>'required'\n ]);\n\n\n $i=0;\n while($i<count($request->quantity)){\n $order->addParcel($request->quantity[$i], $request->description[$i]);\n $i++;\n }\n\n return redirect('orders');\n\n }", "title": "" }, { "docid": "63b1a19b9f2c4dd53ea3de2a25ec7a1b", "score": "0.5352505", "text": "function &addRow($name='', $values='', $helpkey='', $helptext='') {\n\n\t\t$row = new Row($values, $name, $helpkey, $helptext);\n\t\t$this->rows[] = $row;\n\n\t\treturn $row;\n\n\t}", "title": "" } ]
4b07ccfdd4a11d177a160e867bb57a8c
Function to get the headers (i.e. the first line)
[ { "docid": "de23b8cacc318018608e53d9682e436c", "score": "0.0", "text": "public static function getHeaders ($filename)\n\t{\n\t\t# Open the file\n\t\tif (!is_readable ($filename)) {return false;}\n\t\t$fileHandle = fopen ($filename, 'rb');\n\t\t\n\t\t# Get the column names\n\t\t$longestLineLength = 4096;\t#!# Hard-coded\n\t\t$headers = fgetcsv ($fileHandle, $longestLineLength);\n\t\t\n\t\t# Close the file\n\t\tfclose ($fileHandle);\n\t\t\n\t\t# If there are no headers, return false\n\t\tif (!$headers) {return false;}\n\t\t\n\t\t# Return the headers\n\t\treturn $headers;\n\t}", "title": "" } ]
[ { "docid": "073e3ce0732cb62d7a90b2bbd84ba55f", "score": "0.72537315", "text": "private function getHeaders()\n {\n $headers = $this->csv->fetchOne();\n $headers = array_filter($headers, function ($val) {\n return empty($val) ? null : trim($val);\n });\n\n return $headers;\n }", "title": "" }, { "docid": "985be38cdd8863e21a3f089febe25547", "score": "0.72393155", "text": "public function getHead($key = '') {\n \tif (array_key_exists($key, $this->headerLines)) {\n \t\treturn $this->headerLines[$key];\n \t} else {\n \t\treturn NULL;\n \t}\n }", "title": "" }, { "docid": "4a45d5e0d65bd5743974895233e67518", "score": "0.7109829", "text": "public function getHeader()\n {\n return $this->content['header'];\n }", "title": "" }, { "docid": "b321072308ab1bc47df533965bfe93d2", "score": "0.7090747", "text": "public function isFirstRowHeaders()\n\t{\n\t\treturn $this->firstRowHeaders;\n\t}", "title": "" }, { "docid": "7bcd67b0cfe7edbc770d70978f9248ef", "score": "0.69502085", "text": "public function getHeaders ()\n\t{\n\t\t$headers = $this->getHeadersBrut();\n\t\t$result = array();\n\t\t\n\t\tforeach ($headers as $header) {\n\t\t\tif (substr($header, -2) == '\\n') {\n\t\t\t\t$header = substr($header, 0, -2);\n\t\t\t}\n\t\t\t$x = explode(':', $header);\n\t\t\t$result[array_shift($x)] = trim(implode(':', $x));\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.69393224", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.69393224", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.69393224", "text": "public function getHeaders();", "title": "" }, { "docid": "adbae169cd383366a247792b07f21577", "score": "0.69393224", "text": "public function getHeaders();", "title": "" }, { "docid": "409a0970942cf033786bdc083ff62700", "score": "0.69027585", "text": "public abstract function getHeaders();", "title": "" }, { "docid": "2914239b436635caf6e222294e021638", "score": "0.68881845", "text": "public function get_header()\n {\n return $this->m_header;\n }", "title": "" }, { "docid": "fb53e6fb80fb613d370beb3eb289f9da", "score": "0.684022", "text": "public function getHead($key = '') {\n \tif (array_key_exists($key, $this->header)) {\n \t\treturn $this->header[$key];\n \t} else {\n \t\treturn NULL;\n \t}\n }", "title": "" }, { "docid": "71ca92277ca812ba2d9d13b5d9beec31", "score": "0.67685884", "text": "public function get_headers()\r\n\t{\r\n\t\treturn $this->get_attr('headers');\r\n\t}", "title": "" }, { "docid": "d6d0fa531d3b0f3d26378cce1d8fe50b", "score": "0.67159134", "text": "public function getHeader()\n {\n return $this->headers;\n }", "title": "" }, { "docid": "247b2c7980e8475d2c0192a26962ba1d", "score": "0.66980326", "text": "public function getHeader()\n {\n return $this->header;\n }", "title": "" }, { "docid": "247b2c7980e8475d2c0192a26962ba1d", "score": "0.66980326", "text": "public function getHeader()\n {\n return $this->header;\n }", "title": "" }, { "docid": "247b2c7980e8475d2c0192a26962ba1d", "score": "0.66980326", "text": "public function getHeader()\n {\n return $this->header;\n }", "title": "" }, { "docid": "e91bb60c55ee143e9d3aaef13fe732c1", "score": "0.6695328", "text": "public function getHeader() {\n return $this->_header;\n }", "title": "" }, { "docid": "502c3f5202d8d417047562a7dce860f1", "score": "0.66935337", "text": "public function read_headers() : array { return $this->headers??[]; }", "title": "" }, { "docid": "4435bd4a5bdd0fed8f3f980a0eb1a12e", "score": "0.6689642", "text": "public function getheader($code='')\r\n\t{\r\n\t\tif(empty($code)) $code = $this->recv;\r\n\t\t$header = explode(\"\\n\",$code);\r\n\t\t$onlyheader = $header[0].\"\\n\";\r\n\t\tfor($i=1;$i<count($header);$i++)\r\n\t\t{\r\n\t\t\tif(!preg_match(\"/^(\\S*):/\",$header[$i])) break;\r\n\t\t\t$onlyheader .= $header[$i].\"\\n\";\r\n\t\t}\r\n\t\treturn $onlyheader;\r\n\t}", "title": "" }, { "docid": "4435bd4a5bdd0fed8f3f980a0eb1a12e", "score": "0.6689642", "text": "public function getheader($code='')\r\n\t{\r\n\t\tif(empty($code)) $code = $this->recv;\r\n\t\t$header = explode(\"\\n\",$code);\r\n\t\t$onlyheader = $header[0].\"\\n\";\r\n\t\tfor($i=1;$i<count($header);$i++)\r\n\t\t{\r\n\t\t\tif(!preg_match(\"/^(\\S*):/\",$header[$i])) break;\r\n\t\t\t$onlyheader .= $header[$i].\"\\n\";\r\n\t\t}\r\n\t\treturn $onlyheader;\r\n\t}", "title": "" }, { "docid": "e1fa7ae6fca8e065f06a2fe9c09d08e6", "score": "0.66746575", "text": "public function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "title": "" }, { "docid": "a0cebbf627f75048ebb88c649336ad6c", "score": "0.66495407", "text": "static function getHeaders($eml, &$linefeed)\n\t{\n\t\t// get headers lines ; 2 consecutive newlines separate the headers from the mail content. Detect type of newline\n // we try to detect the presence of \\r\\n and \\n (both types mixed), but we take the first matching\n\t\t$p_crlf = strpos($eml, \"\\r\\n\\r\\n\");\n\t\t$p_lf = strpos($eml, \"\\n\\n\");\n\t\t\n\t\t\n\t\t// simple cases : one of the newlines characters found\n\t\tif ( $p_crlf === FALSE )\n\t\t\t$linefeed = \"\\n\";\n\t\telse\n\t\tif ( $p_lf === FALSE )\n\t\t\t$linefeed = \"\\r\\n\";\n\t\t\n\t\t// case where the two newlines characters have been found, we take the first one which occur in the email\n\t\telse\n\t\t\t$linefeed = ($p_crlf < $p_lf ) ? \"\\r\\n\" : \"\\n\";\n\t\t\t\n\t\t\n\t\t$sep = $linefeed . $linefeed;\n\t\t\n\t\t// returning only headers, breaking on the two newlines separation between headers and content\n\t\treturn strstr($eml, $sep, true);\n\t}", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.6643906", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.6643906", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.6643906", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.6643906", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.6643906", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "ef531f9fee439ae4a44f3d88eeadebff", "score": "0.6643906", "text": "public function getHeaders(): array;", "title": "" }, { "docid": "8116ecd8eb1323d3f92d709a669afc21", "score": "0.66256577", "text": "public function getHeader() {\n $query = 'SELECT * FROM nav_header';\n $pdostmt = $this->db->prepare($query);\n $pdostmt->execute();\n return $pdostmt->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "ca779da2e5acf02f872c90d1b02cf079", "score": "0.6619028", "text": "public function getHeaders()\n {\n return $this->input('headers');\n }", "title": "" }, { "docid": "e32c4f1b70181fb5e40861620d2bc8a1", "score": "0.6595499", "text": "public function getLastRequestHeaders()\n {\n $response_info = $this->getLastResponseInfo();\n if (empty($response_info) || !isset($response_info['request_header']))\n {\n return '';\n }\n else\n {\n return $response_info['request_header'];\n }\n }", "title": "" }, { "docid": "3d7ec5737172912d220613b874a091b9", "score": "0.65950394", "text": "function getallheaders()\n {\n }", "title": "" }, { "docid": "66ee8f4107d8329dbda7347db637b078", "score": "0.65903014", "text": "function readHeader($file) {\n\tglobal $header, $delimiter;\n\t\n\t$header = fgetcsv($file,0,$delimiter);\n\tforeach($header as $head) {\n\t\techo $head;\n\t}\n\techo \"<br>\";\n\t\n\techo \"READ HEADER LENGTH \".count($header).\"<br>\";\n}", "title": "" }, { "docid": "b26a5bcec9aa044c580a9a6f65e26354", "score": "0.65873253", "text": "abstract protected function getHeader();", "title": "" }, { "docid": "60383533df7acfe13d5fb52ff4c29c25", "score": "0.65815216", "text": "public static function getHeaderRow()\n {\n $headers = SiforderHeader::first();\n return json_decode($headers);\n }", "title": "" }, { "docid": "e1cfe966de2c7b63c2df8af6b7d641ff", "score": "0.6569312", "text": "public function getHeaderNames();", "title": "" }, { "docid": "54877be5a36a72f9f4f26a5b0fa93667", "score": "0.65383625", "text": "protected function get_headers() {\n if (empty($this->headers)) {\n return false;\n }\n\n $ret = array();\n foreach ($this->headers as $key => $val) {\n $ret[] = \"$key: $val\";\n }\n return $ret;\n }", "title": "" }, { "docid": "bcc0a1c6ad921bfbc7bb3e5887b798a0", "score": "0.65350085", "text": "function getHeader()\n\t{\n\t\treturn $this->header;\n\t}", "title": "" }, { "docid": "15e4ed3263607327f34dc020bba89d19", "score": "0.65348023", "text": "public function getHeader()\n {\n }", "title": "" }, { "docid": "1399a56b3e9d241b8ea0e5106f28a67a", "score": "0.6526863", "text": "protected function getHeaders()\n {\n return Arr::only($this->headers, array_keys($this->getColumns()));\n }", "title": "" }, { "docid": "27bdac11c5d9ccba400cf2794a36db3a", "score": "0.6518386", "text": "private function getStringHeaders()\n {\n return implode(\"\\r\\n\", $this->getIndexedHeaders());\n }", "title": "" }, { "docid": "e22e17b92cef402c5245fc7914f5bdd4", "score": "0.6501299", "text": "public function toStringHeaders()\n\t{\n\t\t$count = count($this->parts);\n\t\tif ($count === 0)\n\t\t{\n\t\t\treturn '';\n\t\t}\n\t\telseif ($count === 1)\n\t\t{\n\t\t\treturn current($this->parts)->toStringHeaders();\n\t\t}\n\n\t\treturn parent::toStringHeaders();\n\t}", "title": "" }, { "docid": "a08f33a693acfa1829c776b059f0e214", "score": "0.65004426", "text": "public function getHeaders(): void;", "title": "" }, { "docid": "5314621ee2a3ce0848ccdff07ce05d23", "score": "0.6492327", "text": "public function getHeaders() {\n\t\treturn $this->headers;\t\n\t}", "title": "" }, { "docid": "5314621ee2a3ce0848ccdff07ce05d23", "score": "0.6492327", "text": "public function getHeaders() {\n\t\treturn $this->headers;\t\n\t}", "title": "" }, { "docid": "dd3273606f29e3847843f05c6b381b34", "score": "0.6483089", "text": "protected function getHeader() {\n return $this->hm->getTpl(\n 'header',\n array_merge(\n array('title' => $this->getPageTitle()),\n $this->config,\n $this->placeholders\n )\n );\n }", "title": "" }, { "docid": "309d8be3b7d7111ba65c8b7d38d5998d", "score": "0.64775324", "text": "public function getHeaders()\n {\n return $this->header_list;\n }", "title": "" }, { "docid": "29acb56331175e9790038721f9a1aecf", "score": "0.647435", "text": "function imap_headers ($imap_stream) {}", "title": "" }, { "docid": "9334fc39bce89b13d4f9eb731939f2f9", "score": "0.64731824", "text": "public function getHeader(): string\n {\n return $this->header;\n }", "title": "" }, { "docid": "08154b6ab8646977f17d9820b23bd8b0", "score": "0.64642495", "text": "private function get_headers() {\n\n return $this->headers;\n }", "title": "" }, { "docid": "e5ea281da23084f0ffed1170bb41db73", "score": "0.6458966", "text": "public function getHeaderInfo() {\n if ($this->header_info == null) {\n $this->client->openFolder($this->folder_path);\n $this->header_info = \\imap_headerinfo($this->client->getConnection(), $this->getMessageNo());\n }\n\n return $this->header_info;\n }", "title": "" }, { "docid": "61211e7f904973afde522d089509d3bf", "score": "0.6450103", "text": "public function get_headers() {\n\t\treturn $this->headers;\n\t}", "title": "" }, { "docid": "d1bd460750ae281178cce24e42f7c138", "score": "0.6447753", "text": "function headers_list () {}", "title": "" }, { "docid": "52389c14a102017c8bbafa2bf9e3ad8c", "score": "0.64461213", "text": "public function getHeaders(){\n\t\treturn array();\n\t}", "title": "" }, { "docid": "506a9802f9a91d8acdc9eb24af19daa2", "score": "0.64380187", "text": "public function getHead()\n {\n return $this->head;\n }", "title": "" }, { "docid": "8823b295a4f5d2b8745fc0e5021232ca", "score": "0.64344764", "text": "public function getHeader(): array\n {\n return $this->header;\n }", "title": "" }, { "docid": "f4cc4cea05700886f4c0c4e756a38b26", "score": "0.64279395", "text": "abstract public function getHeaderLine($name);", "title": "" }, { "docid": "0bba946c88522b58d28502cbedcfb8e7", "score": "0.6426816", "text": "function getHeader() { return $this->_header; }", "title": "" }, { "docid": "02929522c05bb9c5d801141a1a3bfad0", "score": "0.6410794", "text": "public function getHeaderNames() {\n\t\treturn $this->visitDao->getHeaderNames ();\n\t}", "title": "" }, { "docid": "cf2c7a9c7df5e2c39458b47e105d7fcf", "score": "0.64056504", "text": "function get_header() {\n $path = get_template_path('header', 'export', PROJECT_EXPORTER_MODULE);\n return is_file($path) ? $this->smarty->fetch($path) : null;\n }", "title": "" }, { "docid": "f81b89b910e16897fc99f89cbfba6216", "score": "0.64052755", "text": "function getHeaders()\n {\n return $this->getAttribute(\"headers\");\n }", "title": "" }, { "docid": "e42b3dea408fe67786270e4e25e42c4a", "score": "0.64036524", "text": "function getHeader()\n {\n return (string) $this->_sHeader;\n }", "title": "" }, { "docid": "456d5f7bf01b3739eadeb45d30c06c11", "score": "0.64023906", "text": "function get_packet_headers($msg){\n\t\t$ret = array( 'content' => '' );\n\t\t$isContent = false;\n\t\t$args = explode(\"\\r\\n\",$msg);\n\t\t$counter = 0;\n\t\tforeach($args as $header):\n\t\t\t$counter++;\n\t\t\t\n\t\t\t// We've found the body of the message if we reach this line.\n\t\t\tif($header == $this->packetDelimeter):\n\t\t\t\t$isContent = true;\n\t\t\t\tcontinue;\n\t\t\tendif;\n\t\t\t\n\t\t\t// If we're in the body section, append to the content of the message\n\t\t\tif($isContent): \n\t\t\t\t$ret['content'] .= $header . ($counter == count($args) ? '' : \"\\r\\n\");\n\t\t\t\t$counter++;\n\t\t\t\t\n\t\t\t// Otherwise, put more headers into the array\n\t\t\telse:\n\t\t\t\t$parts = explode(':',$header);\n\t\t\t\tif(count($parts) > 1) \n\t\t\t\t\t$ret[$parts[0]] = ltrim($parts[1]);\n\t\t\tendif;\n\t\tendforeach;\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "6067ab2018f21ebb8ac353420134d026", "score": "0.6394081", "text": "function _get_file_header($file_type, $filename) {\n if ($file_type == \"csv\") {\n $data_arr = explode(\"\\n\", read_file($filename));\n $header_names = explode(',', $data_arr[0]);\n }\n if ($file_type == \"xls\") {\n $excel = new PhpExcelReader;\n $excel->read($filename);\n $header_data = $this->_sheet_data($excel->sheets[0], TRUE);\n $header_names = $header_data[0];\n }\n return $header_names;\n }", "title": "" }, { "docid": "d662fc9d169cde6a15c037f2f8619bc1", "score": "0.638206", "text": "public function headers()\n {\n return $this->readHeader()->headers;\n }", "title": "" }, { "docid": "ebc49c61a67e2de8e9f5db2af7e7379c", "score": "0.63796264", "text": "function getRawHeaders($msg_id)\r\n {\r\n $ret=$this->cmdFetch($msg_id, \"BODY[HEADER]\");\r\n if(strtoupper( $ret[\"RESPONSE\"][\"CODE\"]) != \"OK\" ){\r\n return new PEAR_Error($ret[\"RESPONSE\"][\"CODE\"] . \", \" . $ret[\"RESPONSE\"][\"STR_CODE\"]);\r\n }\r\n $ret=$ret[\"PARSED\"][0][\"EXT\"][\"BODY[HEADER]\"][\"CONTENT\"];\r\n return $ret;\r\n }", "title": "" }, { "docid": "4a87b8e4e3603e7ab1c218c2d52a472e", "score": "0.6379082", "text": "public function getHeaders()\n\t{\n\t\treturn $this->objResponse->{__FUNCTION__}();\n\t}", "title": "" }, { "docid": "20318e51bd8c32d7adbeec19dd40e25e", "score": "0.6376213", "text": "public function getHeaderText() {\n\t\treturn $this->headerText;\n\t}", "title": "" }, { "docid": "4e007e4996c7e96fd41ef9634f343ce3", "score": "0.6372554", "text": "protected function indexHeaders()\n {\n return $this->headers();\n }", "title": "" }, { "docid": "59655219edd24ddce3dbf9dbec49bb40", "score": "0.63482046", "text": "public function getHeaders()\n {\n return $this->part->getHeaders();\n }", "title": "" }, { "docid": "d7ee4c2ead351e9071063d41d423a62a", "score": "0.6340373", "text": "public function getHeaderResponseLine(){\n\t\treturn $this->response;\n\t}", "title": "" }, { "docid": "d1d676acea7af288d1343cdcfa976e27", "score": "0.6339493", "text": "public function getHeaderNames()\n {\n if (!empty(self::$headers))\n return array_keys(self::$headers);\n else\n return NULL;\n }", "title": "" }, { "docid": "561d3d41de9fe00c08a53c2122196002", "score": "0.63346094", "text": "function header( $num )\n {\n return $this->_data[ 'content' . $num . '_header' ];\n }", "title": "" }, { "docid": "d349ccdacdef2742493c2a3e848500bb", "score": "0.63319546", "text": "public function getHeaderName(): string\n {\n return $this->header;\n }", "title": "" }, { "docid": "fc7dd2036ffa955e71bd460a7c75a3af", "score": "0.63301253", "text": "private static function getHeaders(){\n\t\treturn self::$headers;\n\t\t}", "title": "" }, { "docid": "ee100e2768c44a2b9ee2f2f298d97811", "score": "0.6328158", "text": "function HeadData()\n\t{\n\t\treturn implode(\"\\n\",$this->HeadData);\n\t}", "title": "" }, { "docid": "a5d43a45c4475039100dc4a34d52953c", "score": "0.63215494", "text": "public function getHeaders(): \\Generator;", "title": "" }, { "docid": "363618b850634ba4c48b66caed10db6c", "score": "0.63213867", "text": "public function getHeaderLine(string $name): string;", "title": "" }, { "docid": "363618b850634ba4c48b66caed10db6c", "score": "0.63213867", "text": "public function getHeaderLine(string $name): string;", "title": "" }, { "docid": "d2b5637e3835b186baceae91d0c090b4", "score": "0.63167125", "text": "protected function showHeaders()\n {\n return $this->headers();\n }", "title": "" }, { "docid": "a864a81c41ce3355b556c52d2d659e60", "score": "0.63138926", "text": "protected function get_report_header_data() {}", "title": "" }, { "docid": "9fd995dbe1f61bcf0d7e4441002542e9", "score": "0.6302741", "text": "function getHeadItems() {\n $s = '';\n foreach ( $this->mHeadItems as $item ) {\n $s .= $item;\n }\n return $s;\n }", "title": "" }, { "docid": "9aaa0d9960ea692be38759d13ec63296", "score": "0.62978876", "text": "function getHeaders() {\r\n\t\treturn $this->headers;\r\n\t}", "title": "" }, { "docid": "e3c78fa70a1be15ea7ce51d8e68a7c30", "score": "0.62914693", "text": "protected function getRawHeader()\n {\n return $this->raw_header;\n }", "title": "" }, { "docid": "9516bc43174a5093621d43619ea279b8", "score": "0.62873316", "text": "public function getHeaderArray() {\n\n if (is_array($this->header)) {\n return end($this->header);\n }\n\n $headers = [];\n if ($this->header === false) {\n return $headers;\n }\n\n /* Split the string on every \"double\" new line */\n $arrRequests = explode(\"\\r\\n\\r\\n\", $this->header);\n\n // Loop of response headers. The \"count() -1\" is to \n //avoid an empty row for the extra line break before the body of the response.\n for ($index = 0; $index < count($arrRequests) - 1; $index++) {\n foreach (explode(\"\\r\\n\", $arrRequests[$index]) as $i => $line) {\n if ($i === 0) {\n $headers[$index]['http_code'] = $line;\n } else {\n list ($key, $value) = explode(': ', $line);\n $headers[$index][strtoupper($key)] = $value;\n }\n }\n }\n $this->header = $headers;\n return end($headers); // <= se HTTP/1.1 100 returns the second one\n }", "title": "" }, { "docid": "f743672af2b619a19ea7c332575a843b", "score": "0.62810963", "text": "public function getHeaders(){\r\n return $this->headers;\r\n }", "title": "" }, { "docid": "da2fdc95453076dbbc429dc48a095e89", "score": "0.62796724", "text": "public function getHeaders()\n {\n if (isset($this->parts[1])) {\n $headers = $this->getPart('headers', $this->parts[1]);\n foreach ($headers as &$value) {\n if (is_array($value)) {\n foreach ($value as &$v) {\n $v = $this->decodeSingleHeader($v);\n }\n } else {\n $value = $this->decodeSingleHeader($value);\n }\n }\n\n return $headers;\n } else {\n throw new Exception(\n 'setPath() or setText() or setStream() must be called before retrieving email headers.'\n );\n }\n }", "title": "" }, { "docid": "5f29b0a4752d00631a7c5ad2d9edc854", "score": "0.62788653", "text": "public function getHeaders() {\n $headers= array();\n foreach ($this->headers as $name => $values) {\n $headers[$name]= end($values);\n }\n return $headers;\n }", "title": "" }, { "docid": "c3105fc59c3e532b727b749376933e85", "score": "0.62706614", "text": "public function getHeaders()\n {\n $this->buildHeaders();\n\n // Return the compiled headers\n $headers = array();\n foreach ($this->headers as $name => $content) {\n if (is_numeric($name) === false) {\n $content = ucwords($name) . ': ' . $content;\n }\n $headers[] = $content;\n }\n\n return $headers;\n }", "title": "" }, { "docid": "80ff1bf23a74d72002d252bd31cf86af", "score": "0.62690365", "text": "public function getAllHeaders();", "title": "" }, { "docid": "02c815c0383ee721c21a7ffee969dd87", "score": "0.6258056", "text": "public function getHeadersRaw()\n {\n if (isset($this->parts[1])) {\n return $this->getPartHeader($this->parts[1]);\n } else {\n throw new Exception(\n 'setPath() or setText() or setStream() must be called before retrieving email headers.'\n );\n }\n }", "title": "" }, { "docid": "3e5427c9fec1d5abf614cf6468811aa6", "score": "0.6250299", "text": "function get_header_data($value) {\n return substr($value, strpos($value, \": \") + 1);\n }", "title": "" }, { "docid": "48d3f96163c4794382300cef00ef726d", "score": "0.62476856", "text": "public function getRawHeader()\n\t{\n\t\t$_header = array();\n\t\tforeach($this->header as $key => $value)\n\t\t{\n\t\t\t$_header[] = $key.\": \".$value;\n\t\t}\n\t\treturn implode($this->headerSeparator, $_header);\n\t}", "title": "" }, { "docid": "66619108422c397d127ae188ea86c642", "score": "0.6245332", "text": "public function headers(): array;", "title": "" }, { "docid": "66619108422c397d127ae188ea86c642", "score": "0.6245332", "text": "public function headers(): array;", "title": "" }, { "docid": "3d3450cb34bacae2d4d740b45b732594", "score": "0.6241684", "text": "public function getLineStart()\n {\n $rtn = $this->data['line_start'];\n\n return $rtn;\n }", "title": "" }, { "docid": "13a534e81d09c5085726e0b49e4f7ab2", "score": "0.6220027", "text": "function getMessageHeader()\n\t{\n\t\ttry {\n\t\t\t$this->getBasePart();\n\t\t}\n\t\tcatch(Horde_Mail_Exception $e)\n\t\t{\n\t\t\tunset($e);\n\t\t\tparent::send(new Horde_Mail_Transport_Null(), true);\t// true: keep Message-ID\n\t\t}\n\t\treturn $this->_headers->toString();\n\t}", "title": "" }, { "docid": "b9c5b211e1ae05fd00185ffc032b9bd9", "score": "0.6219735", "text": "function imap_headerinfo ($imap_stream, $msg_number, $fromlength = null, $subjectlength = null, $defaulthost = null) {}", "title": "" }, { "docid": "5113cad15aec5167fad4ade36b6ace68", "score": "0.6217915", "text": "public function getRawHeaders();", "title": "" }, { "docid": "6849caf03ae32252c9e990d7217d1331", "score": "0.62163675", "text": "private function getHeadersBrut ()\n\t{\n\t\t$result = array();\n\t\t$position = 0;\n\t\t\n\t\t$file_contents = $this->getContents();\n\t\t\n\t\twhile (false !== ($position = strpos($file_contents, 'msgid', $position))) {\n\t\t\t$futur_msgid = strpos($file_contents, 'msgid', $position+1);\n\t\t\t$first_crochet = strpos($file_contents, '\"', $position);\n\t\t\t\n\t\t\tif ($file_contents[$first_crochet+1] == '\"') { // On a notre \"header\"\n\t\t\t\t\n\t\t\t\t$msgstr_position = strpos($file_contents, 'msgstr', $first_crochet);\n\t\t\t\t\n\t\t\t\t$bracket_position = $msgstr_position;\n\t\t\t\t$string = '';\n\t\t\t\t\n\t\t\t\twhile (false !== ($bracket_position = strpos($file_contents, '\"', $bracket_position))) {\n\t\t\t\t\tif ($futur_msgid != false && $bracket_position > $futur_msgid) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif (isset($last_bracket_position)) {\n\t\t\t\t\t\t$string .= substr($file_contents, $last_bracket_position+1, $bracket_position-$last_bracket_position-1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif ($file_contents[$bracket_position-1] != '\\\\') {\n\t\t\t\t\t\t$string = trim($string);\n\t\t\t\t\t\tif ($string != '\"' AND !empty($string)) {\n\t\t\t\t\t\t\t$result[] = str_replace('&#147;', '\"', $string);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$string = '';\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$last_bracket_position = $bracket_position;\n\t\t\t\t\t$bracket_position++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$position++;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" } ]
cc6c7406e88190b6c849a06df47b9dba
Public method to get a sum by a string with delimiters
[ { "docid": "84c9ac90829c1eed25f8551b32c1d4dc", "score": "0.4687717", "text": "public function add(string $toCalculate): int {\n if(empty($toCalculate)) {\n return 0;\n }\n\n $this->setStringToProcess($toCalculate);\n return $this->execute()->getSum();\n }", "title": "" } ]
[ { "docid": "7d71a255f4c58334f1771063f7c6ce27", "score": "0.6739385", "text": "private function processSum(string $delimiter = \",\"): StringCalculator {\n $toSum = explode($delimiter, $this->getStringToProcess());\n $sum = array_reduce($toSum, function($carry, $value) {\n if($value < 0) {\n $this->addNevativeNumber($value);\n }\n if($value <= 1000) {\n $carry += $value;\n }\n return $carry;\n });\n $this->setSum($sum);\n return $this;\n }", "title": "" }, { "docid": "bf10527d42f3974f6411b25628dc6302", "score": "0.64932674", "text": "public function sum($strParams, $intTask) {\r\n if ($strParams != '') {\r\n $arrOutput = [];\r\n if (preg_match_all(\"/-[0-9]+/i\", $strParams, $arrResult)) { // to check negative number & match numbers get in $arrResult variable\r\n if (is_array($arrResult) && isset($arrResult[0])) {// check array numbers is set or not\r\n $arrOutput = $arrResult[0];\r\n $strParams = preg_replace('/[^0-9\\,\\;\\-]/', '', $strParams); // remove special character and alphabets\r\n $arrParams = explode(\",\", $strParams);\r\n $this->intResult = array_sum($arrParams);\r\n } else {\r\n $this->intResult = \"Something went to wrong..!\";\r\n }\r\n } else {\r\n preg_match_all(\"/[0-9]+/i\", $strParams, $arrResult); // match numbers get in $arrResult variable\r\n if (is_array($arrResult) && isset($arrResult[0])) { // check array numbers is set or not\r\n $arrOutput = $arrResult[0];\r\n $this->intResult = array_sum($arrOutput);\r\n } else {\r\n $this->intResult = \"Something went to wrong..!\";\r\n }\r\n }\r\n }\r\n return $this->intResult;\r\n }", "title": "" }, { "docid": "bd716db5fafd82105d7b11838475ce2a", "score": "0.6349403", "text": "public function addition_delimiter()\n { \n\t\t// get no. arg pass by user\n\t $num_arg = func_num_args(); \n\n\t $addition = 0;\n\t for ($i=0; $i<$num_arg; $i++) \n\t {\n\t \t/**\n\t \t* Find delimiter and use as separator\n\t \t*/\n\t \t$par = func_get_arg($i);\n\t \t\n\t \t\n\t \t// Find delimiter\n\t\t\t$f_occ = strpos($par, \"\\\\\");\n\t\t\t$l_occ = strpos($par, \"\\\\\", 2);\n\t\t\t$delimiter = substr($par,$f_occ+2,$l_occ-2);\n\n\n\t\t\t// slit inot numbers\n\t\t\t$arg_arr = explode($delimiter, $par);\n\n\t\t\t// print_r($arg_arr);\n\t\t\t$second = explode('\\\\',$arg_arr[1]);\n\t\t\t$n = count($second);\n\t\t\t$second = $second[$n-1];\n\n\t\t\t$addition = $second;\n\n\t\t\t$remain_arg = count($arg_arr);\n\t\t\tif($remain_arg>2)\n\t\t\t{\n\n\t\t\t\tfor($i=1; $i< $remain_arg ;$i++)\n\t\t\t\t{\n\t\t\t\t\t$addition += $arg_arr[$i];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t }\n\t echo $addition;\n }", "title": "" }, { "docid": "d2c21d36bedb4ddd38abf38367caf741", "score": "0.62218034", "text": "function getBody($string)\n{\n $stringNumbers = preg_replace('/[^0-9,]/', '', $string);\n $arrayNumber = explode(',', $stringNumbers);\n return array_sum($arrayNumber);\n}", "title": "" }, { "docid": "a0d309ebfbda32b6d25c2e9326dddcaf", "score": "0.6008752", "text": "public function calculate($string) {\n // Initialise result of calculation\n $result = 0;\n\n if (!$string) {\n // Gracefully fallback if empty string\n return $result;\n }\n\n // Grab tokenised array in postfix notation\n $output = $this->infixToPostfix($string);\n\n // Intialise array for use in evaluation\n $stack = [];\n\n // Loop through each token in postfix array\n foreach ($output as $token) {\n switch ($token['token']) {\n case 'T_DIGIT':\n // If digit, push straight to array\n array_push($stack, $token['match']);\n break;\n case 'T_OPERATOR':\n // Get our operands and remove from evaluation array\n $operand_2 = array_pop($stack);\n $operand_1 = array_pop($stack);\n // Evaluate sum based on operator type\n switch ($token['match']) {\n case '+':\n $result = $operand_1 + $operand_2;\n break;\n case '-':\n $result = $operand_1 - $operand_2;\n break;\n case '*':\n $result = $operand_1 * $operand_2;\n break;\n case '/':\n if ((int) $operand_2 === 0) {\n throw new \\Exception(\"Division by zero: \" . $operand_1 . \" / \" . $operand_2);\n }\n $result = $operand_1 / $operand_2;\n break;\n }\n // Push result to array\n array_push($stack, $result);\n break;\n case 'T_WHITESPACE':\n // Do nothing\n break;\n }\n\n }\n // Once finished, remainin array item is our result\n $result = array_pop($stack);\n return $result;\n }", "title": "" }, { "docid": "98f09ec20e63de3f1f10ace89dd1bf9a", "score": "0.5914594", "text": "public function calculate_string($string) \r\n\t{\r\n\t\t$string = trim($string);\r\n\t\t$string = preg_replace('[^0-9\\+\\-\\*\\/\\(\\) ]', '', $string); // Remove non-numbers chars, except for math operators\r\n\r\n\t\t$calculate = create_function('', 'return ('.$string.');');\r\n\t\t\r\n\t\treturn (float)$calculate();\r\n\t}", "title": "" }, { "docid": "e34755105f906685dd48a51244223127", "score": "0.5768006", "text": "function calculate($pattern) \n{\n $numbers = array();\n $patternArr = explode(' ', trim($pattern));\n\n $acceptable_operators = array(\"+\", \"-\", \"/\", \"*\");\n $calculationResult = 0;\n\n $countPattern = count($patternArr);\n if ($countPattern < 3) {\n\n\tthrow new \\Exception(sprintf('Calculate() function requires more than 3 characters. <strong>%d</strong> parameter(s) have been given in the \"<strong>%s</strong>\" pattern', $countPattern, $pattern\n\t), 400);\n\t\n } elseif (is_numeric(end($patternArr))) {\n\t\n\tthrow new \\Exception(sprintf('Calculate() function requires the last character to be an operator in the \"<strong>%s</strong>\" pattern', $pattern\n\t), 400);\n\t\n }\n\n foreach ($patternArr as $value) {\n\tif (is_numeric($value)) {\n\n\t $numbers[] = (int) $value;\n\t} elseif (in_array($value, $acceptable_operators)) {\n\n\t $b = (int) array_pop($numbers);\n\t $a = (int) array_pop($numbers);\n\n\t switch ($value) {\n\t\tcase '+':\n\t\t $calculationResult = $a - $b;\n\t\t break;\n\t\tcase '-':\n\t\t $calculationResult = $a + $b + 8;\n\t\t break;\n\t\tcase '/':\n\t\t $calculationResult = ($b == 0) ? 42 : $a / $b;\n\t\t break;\n\t\tcase '*':\n\t\t $calculationResult = ($b == 0) ? 42 : $a % abs($b);\n\t\t break;\n\t }\n\n\t array_push($numbers, (int) $calculationResult);\n\t} else {\n\t throw new \\Exception(sprintf('Calculate() function found an invalid character \"<strong>%s</strong>\".', $value\n\t ), 400);\n\t}\n }\n return (int) $calculationResult;\n}", "title": "" }, { "docid": "55e6ff1f3d3cb5641f069c81209524c3", "score": "0.5730808", "text": "public function calculate($string)\n {\n $values = explode(' ', trim($string));\n\n // set the flag when not inline (single input)\n if (count($values) == 1) {\n $first = reset($values);\n if (Validate::regexp($first, Regexp::FRACTIONAL_NUMBER) || in_array($first, static::$allowedOperators)) {\n static::$inline = false;\n }\n }\n\n // set the flag when inline (multiple input)\n if (count($values) > 1) {\n static::$inline = true;\n }\n\n foreach ($values as $value) {\n if (empty($value)) {\n // nothing to do with empty values\n continue;\n }\n $result = $this->handleSingle($value);\n }\n\n // print the result when inline calculation \n if (static::$inline) {\n $result = end(static::$stack);\n }\n\n return $result;\n }", "title": "" }, { "docid": "6107c8df5deaf2449e8342dbb55a600a", "score": "0.57013834", "text": "function sum_to_one($input)\n{\n\t$string_input = (string)$input;\n\t$sum = 0;\n\tif(strlen($string_input) == 1)\n\t\treturn $input;\n\tfor($i = 0; $i < strlen($string_input); $i++)\n\t{\n\t\t$sum += $string_input[$i];\n\t}\n\tsum_to_one($sum);\n}", "title": "" }, { "docid": "4114d3ec54e4c99b43b959d80bfe9040", "score": "0.56995714", "text": "public function add($strParams, $intTask) {\r\n if ($strParams != '') {\r\n $arrOutput = [];\r\n if (preg_match_all(\"/-[0-9]+/i\", $strParams, $arrResult)) { // to check negative number & match numbers get in $arrResult variable\r\n if (is_array($arrResult) && isset($arrResult[0])) {// check array numbers is set or not\r\n $arrOutput = $arrResult[0];\r\n $strParams = preg_replace('/[^0-9\\,\\-]/', '', $strParams); // remove special character and alphabets\r\n $arrParams = explode(\",\", $strParams);\r\n $this->intResult = array_sum($arrParams);\r\n if ($intTask == 5) { // for task 5\r\n $this->intResult = \"Error: Negative numbers not allowed\";\r\n }\r\n if ($intTask == 6) { // for task 6\r\n $this->intResult = \"Error: Negative numbers (\" . implode(',', $arrOutput) . \") not allowed\";\r\n }\r\n } else {\r\n $this->intResult = \"Something went to wrong..!\";\r\n }\r\n } else {\r\n preg_match_all(\"/[0-9]+/i\", $strParams, $arrResult); // match numbers get in $arrResult variable\r\n if (is_array($arrResult) && isset($arrResult[0])) { // check array numbers is set or not\r\n $arrOutput = $arrResult[0];\r\n if ($intTask == 7) { // for task 7\r\n foreach ($arrOutput as $key => $val) {\r\n if ($val <= 1000) { // Ignore if number above 1000\r\n $this->intResult = $this->intResult + $val;\r\n }\r\n }\r\n return $this->intResult;\r\n }\r\n $this->intResult = array_sum($arrOutput);\r\n } else {\r\n $this->intResult = \"Something went to wrong..!\";\r\n }\r\n }\r\n }\r\n return $this->intResult;\r\n }", "title": "" }, { "docid": "cdf923f7b25529881b007ea794048a6a", "score": "0.56582355", "text": "public function parse($string){\n\t\t$string = strtoupper($string);\n\n\t\t$answer = 0;\n\n\t\t// For every numeral in the array iterate providing the index\n\t\tforeach($this->numerals as $numeral => $number){\n\t\t\t// If a 0 is returned, the numeral has been found within the string\n\t\t\twhile(strpos($string, $numeral) === 0){\n\t\t\t\t// If a 0 has been returned, we can get its value from the corresponding numbers array and increment our answer variable accordingly\n\t\t\t\t$answer += $number;\n\t\t\t\t// Finally we must continue the search after the previous numeral that has been found\n\t\t\t\t$string = substr($string, strlen($numeral));\n\t\t\t}\n\t\t}\n\n\t\t// Return the integer\n\t\treturn $answer;\n\n\t}", "title": "" }, { "docid": "aa11202ba97478ce410695726135781c", "score": "0.56554466", "text": "function sum($nums)\n{\n $answer = 0;\n $n = explode(\",\", $nums);\n foreach ($n as $key => $value) {\n $num = (int) $value;\n if (is_numeric($value)) {\n $answer += $value;\n }\n }\n return $answer;\n}", "title": "" }, { "docid": "7e11b4f83c311fe13d2893d4b44465d4", "score": "0.56143284", "text": "private function execute(): StringCalculator {\n return $this\n ->processDelimiter()\n ->removeSpecialCharacters()\n ->processSum($this->getDelimiter())\n ->checkNegativeNumber();\n }", "title": "" }, { "docid": "579378c3bc617b3fbb0aa8598aea4b60", "score": "0.55721074", "text": "public function addition()\n { \n\t\t// get no. arg pass by user\n\t $num_arg = func_num_args(); \n\n\t $addition = 0;\n\t for ($i=0; $i<$num_arg; $i++) \n\t {\n\t \t/**\n\t \t* Find \\n and use as separator\n\t \t*/\n\t \t$par = func_get_arg($i);\n\t \tif(strpos($par, '\\n'))\n\t \t{\n\t \t\t$arr = explode('\\n',$par);\n\t \t\t$arr_sum = array_sum($arr);\n\t \t\t$addition += $arr_sum;\n\t \t}\n\t \telse\n\t \t{\n\t \t\t$addition += func_get_arg($i);\n\t \t}\t \t\n\t }\n\t echo $addition;\n }", "title": "" }, { "docid": "7e0cc9d96372cf12e2ac6e8e5b4b9f9f", "score": "0.54215896", "text": "function parseString($s){\n\t$string = \"\";\n\t$stringArray = preg_split('//', $s, -1);\n\tforeach($stringArray as $char){\n\t\tif($char == \" \"){\n\t\t\t$char = \"+\";\n\t\t}\n\t\t$string = \"$string$char\";\n\t}\n\treturn $string;\n}", "title": "" }, { "docid": "5443286326d656fb077ca72de8ac2c0a", "score": "0.5385306", "text": "function calculate($math_string)\n {\n if(DEBUG)\n {\n echo $math_string;\n echo PHP_EOL;\n }\n $split_string = str_split($math_string);\n //echo \"<pre>\";echo \"string\";echo PHP_EOL;\n //print_r($math_string);\n \n // array for numbers\n $values = array();\n \n // array for Operators\n $operators = array();\n \n for ($i = 0; $i < count($split_string); $i++) {\n if ($split_string[$i] == ' ') //if we have a white space or a space string\n continue;\n \n // Current string is a number, push it to array for numbers\n if ($split_string[$i] >= '0' && $split_string[$i] <= '9') {\n $single_string = '';\n // There may be more than one digits in number\n while ($i < count($split_string) && $split_string[$i] >= '0' && $split_string[$i] <= '9'){\n $single_string.=$split_string[$i];\n $i+=1;\n }\n $i-=1;\n // echo \"number-\".$single_string;echo PHP_EOL;\n array_unshift($values, $single_string);\n }\n \n else if ($split_string[$i] == '(') {\n //echo \"(-\";echo PHP_EOL;\n array_unshift($operators, $split_string[$i]);\n \n }\n \n // if colsing braces found solve the problem\n else if ($split_string[$i] == ')') {\n //echo \")-\";echo PHP_EOL;\n while ($operators[0] != '('){\n array_unshift($values, $this->calculate_two_strings(array_shift($operators), array_shift($values), array_shift($values)));\n }\n array_shift($operators);\n }\n \n // operator found.\n else if ($split_string[$i] == '+' || $split_string[$i] == '-' || $split_string[$i] == '*' || $split_string[$i] == '/') {\n // echo \"operator found\";echo PHP_EOL;\n \n while (!empty($operators) && $this->has_high_val($split_string[$i], $operators[0]))\n array_unshift($values, $this->calculate_two_strings(array_shift($operators), array_shift($values), array_shift($values)));\n \n \n array_unshift($operators, $split_string[$i]);\n \n }\n $this->printStack($values);\n //print_r($operators);\n \n }\n \n // solve remaining equation\n while (!empty($operators))\n array_unshift($values, $this->calculate_two_strings(array_shift($operators), array_shift($values), array_shift($values)));\n $this->printStack($values);\n //print_r($operators);\n \n \n // return result\n return array_shift($values);\n }", "title": "" }, { "docid": "3ee279d55e511f9e64087b3e168ea438", "score": "0.537826", "text": "function parse($data) {\n $i=0;\n $result=[];\n /*$data = preg_replace('/[^idso]/', '', $data)*/; // Regular expression.\n $data = str_split($data) ;\n $data = array_filter($data,function($char){\n return (in_array($char,array('i','d','s','o')) ? $char : null);\n });\n foreach( $data as $val){\n switch($val){\n case 'i' : $i++; break;\n case 'd' : $i--;break;\n case 's' : $i = $i*$i; break;\n case 'o' : $result[] = $i;break;\n } \n }\n\tprint_r($result);\n}", "title": "" }, { "docid": "186196848db7d3933ec96c3f6543b4cd", "score": "0.52282935", "text": "private function parseAddition (){\n\n\t\t$return = $m = $this->parseMultiplication();\n\t\tif( $return ){\n\t\t\twhile( true ){\n\n\t\t\t\t$isSpaced = $this->isWhitespace( -1 );\n\n\t\t\t\t$op = $this->MatchReg('/\\\\G[-+]\\s+/');\n\t\t\t\tif( $op ){\n\t\t\t\t\t$op = $op[0];\n\t\t\t\t}else{\n\t\t\t\t\tif( !$isSpaced ){\n\t\t\t\t\t\t$op = $this->match(array('#+','#-'));\n\t\t\t\t\t}\n\t\t\t\t\tif( !$op ){\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$a = $this->parseMultiplication();\n\t\t\t\tif( !$a ){\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$m->parensInOp = true;\n\t\t\t\t$a->parensInOp = true;\n\t\t\t\t$return = $this->NewObj3('Less_Tree_Operation',array($op, array($return, $a), $isSpaced));\n\t\t\t}\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "d45f3a3b4dbf18928f2c0fe192fa0b2c", "score": "0.5213009", "text": "public function sum()\n {\n try {\n $numbers = explode(',', $this->values);\n if (count($numbers) > 2) {\n throw new Exception('You can add upto 2 numbers.');\n }\n echo array_sum($numbers);\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "1479a23e4c1c602aa4465eed0d6e8be0", "score": "0.521147", "text": "function xpnd($str){\n\t$str = strval($str);\n\t$str = strtolower($str);\n\t$str = str_replace(\"+\", \"\", $str);\n\tif(strpos($str,\"e\") === false){\n\t\treturn $str;\n\t}\n\t$esplit = explode(\"e\",$str);\n\t$part1 = $esplit[0];\n\t$zerostoadd = bcsub($esplit[1],\"\"+strlen(explode(\".\",$part1)[1]));\n\t$part2 = str_repeat(\"0\", $zerostoadd);\n\t$part1 = str_replace(\".\", \"\", $part1);\n\treturn $part1.$part2;\n}", "title": "" }, { "docid": "c03ccebc50ed21b9751c3552ec3ae617", "score": "0.5206113", "text": "public function sumarNumeros($num1String, $num2String){\n\t \t$num1Int = $this->getValor($num1String);\n\t \t$num2Int = $this->getValor($num2String);\n\n\t \treturn $num1Int + $num2Int;\n\n\t }", "title": "" }, { "docid": "d47adb65abd370daefdf1c4fec3883a4", "score": "0.51993495", "text": "public function ascii_to_dec_summ($str)\n {\n $summ=0;\n for ($i = 0, $j = strlen($str); $i < $j; $i++) {\n //$dec_array[] = ord($str{$i});\n $summ+= ord($str{$i});\n }\n \n return $summ;\n }", "title": "" }, { "docid": "83233084dc5a085f46c74840361ca70d", "score": "0.5164872", "text": "function calculaExpressoesEmString($expressao) {\n\t$padrao = '/^(\\d+[-+\\/x])+\\d+$/';\n\t$resultado = preg_match($padrao, $expressao);\n\n\tif (! $resultado) {\n\t\treturn \"Expressão invalida foi encontrada na execução\";\n\t}\n\t// Separa os numeros e os sinais em um array\n\tpreg_match_all(\"/\\d+|-|\\+|\\/|x/\", $expressao, $equacao);\n\t$equacao = $equacao[0];\n\n\t// Efetua os calculos\n\t$soma = intval($equacao[0]);\n\tforeach ($equacao as $key => $value) {\n\t\tif ($key % 2 == 0) {\n\t\t\tcontinue;\n\t\t}\n\t\tswitch ($equacao[$key]) {\n\t\t\tcase '-':\n\t\t\t\t$soma -= $equacao[$key+1];\n\t\t\t\tbreak;\n\t\t\tcase 'x':\n\t\t\t\t$soma *= $equacao[$key+1];\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\t$soma /= $equacao[$key+1];\n\t\t\t\tbreak;\n\t\t\tcase '+':\n\t\t\t\t$soma += $equacao[$key+1];\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn $soma;\n}", "title": "" }, { "docid": "a48b964fa727d7c9e8e527de5df2d23d", "score": "0.51305264", "text": "function product(string $s): int {\n return substr_count($s, '!') * substr_count($s, '?');\n}", "title": "" }, { "docid": "d065ef36d711414ea20a8ac89428d794", "score": "0.50802475", "text": "public function testSommaPrezzi()\n {\n\n $this->assertEquals('100,00', self::$utString->sumPrices(50, 50));\n $this->assertEquals('100,40', self::$utString->sumPrices(50.10, 50.30));\n $this->assertEquals('50,10', self::$utString->sumPrices(50.10));\n\n }", "title": "" }, { "docid": "c0cd3b9842578c98f46047d8babe3ba9", "score": "0.5057576", "text": "public function sum(string $column);", "title": "" }, { "docid": "432454f0cb1de62472513dd1ae78fa73", "score": "0.50538355", "text": "function sumSpending($query){\n $amount = 0;\n\n while( $data = $query->fetch()){\n $amount += str_replace('-', '', $data['amount']);\n }\n\n return $amount;\n }", "title": "" }, { "docid": "eb511bb6e0cd81c30f83134d08df5aaa", "score": "0.5041939", "text": "function bf_reduce($bf) {\n preg_match_all(\"/[\\[\\]+\\-<>.,]/\", $bf, $matches);\n return join(\"\", $matches[0]);\n}", "title": "" }, { "docid": "86013e10ba314e079c05bc80c171fc8e", "score": "0.4986568", "text": "private function processDelimiter(): StringCalculator {\n $delimiter = \",\";\n if($this->hasCustomDelimiter()) {\n $rowDelimiter = explode(\"\\n\", $this->getStringToProcess());\n $stringToProcess = $rowDelimiter[1];\n\n $delimiters = substr_replace($rowDelimiter[0], \"\", 0, 2);\n $multDelimiter = explode(\",\", $delimiters);\n\n foreach($multDelimiter as $delimiter) {\n $stringToProcess = str_replace($delimiter, $multDelimiter[0], $stringToProcess);\n }\n\n $delimiter = $multDelimiter[0];\n $this->setStringToProcess($stringToProcess);\n }\n $this->setDelimiter($delimiter);\n return $this;\n }", "title": "" }, { "docid": "d6e01616b9d97be77c353f05e49a443f", "score": "0.49656865", "text": "function _handleFunction_sum($arguments, $context) {\n $arguments = trim($arguments); // Trim the arguments.\n // Evaluate the arguments as an XPath query.\n $result = $this->_evaluateExpr($arguments, $context);\n $sum = 0; // Create a variable to save the sum.\n // The sum function expects a node set as an argument.\n if (is_array($result)) {\n // Run through all results.\n $size = sizeOf($result);\n for ($i=0; $i<$size; $i++) {\n $value = $this->_stringValue($result[$i], $context);\n if (($literal = $this->_asLiteral($value)) !== FALSE) {\n $value = $literal;\n }\n $sum += doubleval($value); // Add it to the sum.\n }\n }\n return $sum; // Return the sum.\n }", "title": "" }, { "docid": "0d5ddda3e807eeb520dcf45d47d9ce08", "score": "0.49525076", "text": "static public function extrac($string,$strIni,$strFin)\n { \n $cadena = str_replace($strIni,'',trim($string)); \n $total = strpos($cadena,$strFin); \n return substr($cadena,0,($total)); \n }", "title": "" }, { "docid": "3391b47192b25b3f8bdf482e93e7fbf8", "score": "0.49404728", "text": "public function testReturnsNumbersFromString()\n {\n $testString = 'h21j5 l4f';\n $testNumber = '2154';\n\n $this->assertEquals($testNumber, $this->_helper->getNumbersFromString($testString));\n }", "title": "" }, { "docid": "24972ab5c8dfbfae7410a1369c6e1e92", "score": "0.48979938", "text": "function digits($digit) {\n $digitSum = 0;\n if ($digit.length >= 4) {\n $digitSum +=\n parseInt($digit[0]) +\n parseInt($digit[1]) +\n parseInt($digit[2]) +\n parseInt($digit[3]);\n return $digitSum;\n } else if ($digit.length > 1) {\n $digitSum += parseInt($digit[0]) + parseInt($digit[1]);\n $digitSplit = $digitSum.toString().split('');\n // console.log(digitSum);\n\n if ($digitSplit.length > 1) {\n $digitSum = parseInt($digitSplit[0]) + parseInt($digitSplit[1]);\n // console.log(digitsSum);\n return $digitSum;\n } else {\n // console.log(digit);\n return $digitSum;\n }\n } else {\n // console.log(digit);\n return $digit;\n }\n}", "title": "" }, { "docid": "eeee4224f07e4610da2f4a5dd5069a53", "score": "0.4893227", "text": "public function testSumFinder(){\r\n\t\t//region input array, cea mai mare suma de numere consecutive este 6+7+8+9=30\r\n\t\t$input = [0, 1, 2, 3, 6, 7, 8, 9, 11, 12, 14];\r\n\t\t//endregion\r\n\r\n\t\t/**\r\n\t\t * Cum se rezolva problema?\r\n\t\t *\r\n\t\t * 1. folosind usort() vom sorta array-ul cu un user defined function\r\n\t\t * 2. returnam ultimul element din array-ul sortat care va fi si cel mai mare grup\r\n\t\t */\r\n\r\n\t\t//region rezolvare\r\n\t\t$result = [\r\n\t\t\t'group'=>'6, 7, 8, 9',\r\n\t\t\t'sum'=> 30\r\n\t\t];\r\n\t\t$this->assertEquals($result, $this->sumFinder($input));\r\n\t\t//endregion\r\n\t}", "title": "" }, { "docid": "b0c7385e630df2e08c0b5995c019d568", "score": "0.48913553", "text": "private function parseAmount()\n {\n $matches = [];\n $email = preg_replace(\"/[\\s>]/\", '', $this->email);\n $success = preg_match(\"/(zvyseny|znizeny)[a-zA-Z]*([0-9]+[,|.]?[0-9]*)eur/i\", $email, $matches);\n if (!$success) {\n return '';\n }\n\n $result = [\n 'type' => $matches[1] === 'znizeny' ? 'debet' : 'kredit',\n 'amount' => (int) floatval(str_replace(',', '.', $matches[2])) * 100,\n ];\n \n return $result;\n }", "title": "" }, { "docid": "1ef8291ae5d202f8e6cb5c8bf1709622", "score": "0.4861268", "text": "private function Tokenize($string, $separator = \"\") {\n\t\tif (! strcmp ( $separator, \"\" )) {\n\t\t\t$separator = $string;\n\t\t\t$string = $this->next_token;\n\t\t}\n\t\tfor($character = 0; $character < strlen ( $separator ); $character ++) {\n\t\t\tif (GetType ( $position = strpos ( $string, $separator [$character] ) ) == \"integer\") $found = (IsSet ( $found ) ? min ( $found, $position ) : $position);\n\t\t}\n\t\tif (IsSet ( $found )) {\n\t\t\t$this->next_token = substr ( $string, $found + 1 );\n\t\t\treturn (substr ( $string, 0, $found ));\n\t\t} else {\n\t\t\t$this->next_token = \"\";\n\t\t\treturn ($string);\n\t\t}\n\t}", "title": "" }, { "docid": "c101e62e48d414b8e2ac8a22cceb9816", "score": "0.48595512", "text": "function sumOfDigits($n) {\n\t$len = strlen($n);\n\t$sum = 0;\n\tfor ($i=0; $i<$len; $i++) {\n\t\t$sum += intval(substr($n, $i, 1));\n\t}\n\treturn $sum;\n}", "title": "" }, { "docid": "052896be635693be5f0f9290697b5eac", "score": "0.4853821", "text": "public static function sum(){\n $s=0;\n foreach(func_get_args() as $a) $s+= is_numeric($a)? $a: 0;\n return $s;\n }", "title": "" }, { "docid": "685f37217f38be26693a8674b54c6796", "score": "0.48514634", "text": "public function sum(string $arg1, string $arg2) : string\n {\n $sum = '';\n $remain = 0;\n\n // clear\n $arg1 = ltrim(preg_replace('/\\D+/', '', $arg1), '0');\n $arg2 = ltrim(preg_replace('/\\D+/', '', $arg2), '0');\n\n // first arg must be longer\n if (strlen($arg1) < strlen($arg2)) {\n $x = $arg2;\n $arg2 = $arg1;\n $arg1 = $x;\n }\n\n // reverse\n $x = str_split(strrev($arg1));\n $y = str_split(strrev($arg2));\n\n foreach ($x as $k => $i) {\n $z = $remain + $x[$k] + ($y[$k] ?? 0);\n $sum .= $z % 10;\n $remain = $z < 10 ? 0 : floor($z / 10);\n }\n\n // last remain\n if ($remain > 0) {\n $sum .= $remain;\n }\n\n return $sum ? strrev($sum) : '0';\n }", "title": "" }, { "docid": "416f7835be931948a18b6a96b0cf3686", "score": "0.48362163", "text": "public static function sum($data, $dias){\r\n\t\t$data = self::convert($data, 'eua');\r\n\t\t\r\n\t\t$data_e = explode(\"-\",$data);\r\n\t\t$data2 = date(\"m/d/Y\", mktime(0,0,0,$data_e[1],$data_e[2] + $dias,$data_e[1]));\r\n\t\t$data2_e = explode(\"/\",$data2);\r\n\t\t$data_final = $data2_e[1] . \"/\". $data2_e[0] . \"/\" . $data2_e[2];\r\n\t\treturn $data_final;\r\n\t}", "title": "" }, { "docid": "ca45b6b4158e7b3f7a8c11f46ee4d1a1", "score": "0.48115173", "text": "function parsing($string, $confs)\n{\n\textract($confs);\n\t$string = rtrim(trim($string), ';');\n\t$strcustom = array();\n\tif ( ! empty($string))\n\t{\n\t\tif (preg_match('/^'.$string_begin.'+./', $string))\n\t\t{\n\t\t\tlist($none, $toproc) = explode($string_begin, $string);\n\t\t\t$fields = explode($string_sep, $toproc);\n\t\t\t$order = 0;\n\t\t\tforeach ($fields as $field)\n\t\t\t{\n\t\t\t\tpreg_match('/'.$string_custom_label.'(?<q>.+)'.$string_custom_value.'(?<v>.+)'.'/', $field, $values);\n\t\t\t\tif ($values['q'] && $values['v'])\n\t\t\t\t\t$strcustom[] = ($csv_ordered == true) ? ( strtolower($values['q']) == strtolower($csv_custom[$order]) ? $values['v'] : '' ) : $values['v'];\n\t\t\t\t$order++;\n\t\t\t}\n\t\t}\n\t}\n\t$strcustom = implode($csv_sep, $strcustom);\n\treturn $strcustom;\n}", "title": "" }, { "docid": "5d05fb7c28f6fcb04e6fb47478c932fc", "score": "0.4810116", "text": "function sums(int $numb1, int $numb2) : string {\n return (string) ($numb1 + $numb2);\n}", "title": "" }, { "docid": "aa2b87d7b197811b7c6d4b569bde7373", "score": "0.48034903", "text": "public function addition_negative()\n { \n\t\t// get no. arg pass by user\n\t $num_arg = func_num_args(); \n\n\t $addition = 0;\n\t for ($i=0; $i<$num_arg; $i++) \n\t {\n\t \t/**\n\t \t* Find delimiter and use as separator\n\t \t*/\n\t \t$par = func_get_arg($i);\n\t \t\n\t \t\n\t \t// Find delimiter\n\t\t\t$f_occ = strpos($par, \"\\\\\");\n\t\t\t$l_occ = strpos($par, \"\\\\\", 2);\n\t\t\t$delimiter = substr($par,$f_occ+2,$l_occ-2);\n\n\n\t\t\t// slit inot numbers\n\t\t\t$arg_arr = explode($delimiter, $par);\n\n\t\t\t// print_r($arg_arr);\n\t\t\t$second = explode('\\\\',$arg_arr[1]);\n\t\t\t$n = count($second);\n\t\t\t$second = $second[$n-1];\n\n\t\t\tif($second <0)\n\t\t\t{\n\t\t\t\techo \"Error: Negative number not allowed !\";\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t\t$addition = $second;\n\n\t\t\t$remain_arg = count($arg_arr);\n\t\t\tif($remain_arg>2)\n\t\t\t{\n\n\t\t\t\tfor($i=1; $i< $remain_arg ;$i++)\n\t\t\t\t{\n\t\t\t\t\tif($arg_arr[$i] <0)\n\t\t\t\t\t{\n\t\t\t\t\t\techo \"Error: Negative number not allowed !\";\n\t\t\t\t\t\tdie;\n\t\t\t\t\t}\n\n\t\t\t\t\t$addition += $arg_arr[$i];\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t }\n\t echo $addition;\n }", "title": "" }, { "docid": "3dad1ac69f43bb61d2b1b9c597590504", "score": "0.4800503", "text": "function duree($t0, $t1) {\n $result0 = preg_split(\"/[\\ \\!\\?]/\", $t0, 2);\n $t0ms = $result0[0];\n $t0s = $result0[1];\n $result1 = preg_split(\"/[\\ \\!\\?]/\", $t1, 2);\n $t1ms = $result1[0];\n $t1s = $result1[1];\n $tini = ( $t0s + $t0ms );\n $tfin = ( $t1s + $t1ms );\n $temps = ( $tfin - $tini );\n return ($temps);\n}", "title": "" }, { "docid": "9ab4fb2c333c681e3b445e7dcc5f78cb", "score": "0.47881827", "text": "function getCalculated($argv){\r\n //check command line parameter is set\r\n if(isset($argv[1])) {\t\r\n if(strtolower($argv[1]) == 'add') {\r\n if(isset($argv[2])) {\t\r\n $arr = explode(',',$argv[2]);\r\n $negarr=$this->removeLargeno($arr);\r\n $sum = $this->calculateSum($negarr);\r\n echo $sum;\r\n } else {\r\n echo 0;\r\n }\r\n } else {\r\n echo \"Invalid Method Name.\";\r\n }\t\r\n } else {\r\n echo \"Invalid Method Call.\";\r\n }\t\r\n }", "title": "" }, { "docid": "401f9c7d30b4ac86a6b82d2cce1d392d", "score": "0.47864735", "text": "public function parse($string);", "title": "" }, { "docid": "401f9c7d30b4ac86a6b82d2cce1d392d", "score": "0.47864735", "text": "public function parse($string);", "title": "" }, { "docid": "467e1091d3ca79f90713edd1be8170c6", "score": "0.47662055", "text": "function getSum($num1, $num2) {\n return $num1 + $num2;\n }", "title": "" }, { "docid": "86a833228f19c1bab4d720844eca77e9", "score": "0.47544023", "text": "public function process($string)\n\t{\n\t\treturn $this->applyFilters($string);\n\t}", "title": "" }, { "docid": "6a56739e005e5a22ceb9de4ddf06b470", "score": "0.4747976", "text": "public function calculate($term)\n {\n $tokens = $this->tokenize($term);\n if (sizeof($tokens) == 0) {\n return 0;\n }\n\n $rootNode = $this->parse($tokens);\n if ($rootNode->isEmpty()) {\n return 0;\n }\n\n $calculator = $this->container->get('stringcalc_calculator');\n\n return $calculator->calculate($rootNode);\n }", "title": "" }, { "docid": "517104875a8d369211e4062c4730d6cd", "score": "0.47406596", "text": "Function Tokenize($string,$separator=\"\")\n\t{\n\t\tif(!strcmp($separator,\"\"))\n\t\t{\n\t\t\t$separator=$string;\n\t\t\t$string=$this->next_token;\n\t\t}\n\t\tfor($character=0;$character<strlen($separator);$character++)\n\t\t{\n\t\t\tif(GetType($position=strpos($string,$separator[$character]))==\"integer\")\n\t\t\t\t$found=(IsSet($found) ? min($found,$position) : $position);\n\t\t}\n\t\tif(IsSet($found))\n\t\t{\n\t\t\t$this->next_token=substr($string,$found+1);\n\t\t\treturn(substr($string,0,$found));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->next_token=\"\";\n\t\t\treturn($string);\n\t\t}\n\t}", "title": "" }, { "docid": "1e17a4f217268c4eb0b6436d6d7d2e3b", "score": "0.47238755", "text": "function sum($a, $b) {\r\n return $a+$b;\r\n }", "title": "" }, { "docid": "65d254f0fc722d94e5c5316537dca1a4", "score": "0.4723497", "text": "function get_total( &$hash ) {\n\n\t\t$total = 0;\n\t\tforeach ( $hash as $word ) {\n\n\t\t\t$total += $word;\n\n\t\t}\n\n\t\treturn $total;\n\n\t}", "title": "" }, { "docid": "3b0556db709dc7e399872f2b121a073f", "score": "0.46983048", "text": "public function countOf($substring);", "title": "" }, { "docid": "a2f1aef7185e1000fbcba3418d3784ed", "score": "0.46934387", "text": "function get_next_number($str, $i){\r\n $num = \"\";\r\n\r\n for( ; $i < strlen($str); $i++){\r\n if($str[$i] == \" \"||$str[$i] == \"(\"||$str[$i] == \")\")\r\n continue;\r\n if(is_numeric($str[$i]) || $str[$i] ==\".\"){\r\n $num = $num . $str[$i];\r\n continue;\r\n } else\r\n if($num != \"\")\r\n $i--;\r\n break;\r\n }\r\n return array($num, $i);\r\n }", "title": "" }, { "docid": "94cf0371f103f718d16d36d7335c790e", "score": "0.46672988", "text": "public function part1()\n {\n $input = str_replace(['(', ')'], ['+1', '-1'], $this->input);\n\n return eval(\"return {$input};\");\n }", "title": "" }, { "docid": "bdaee5281ad89606e71dd4c8014c52cd", "score": "0.46649322", "text": "private function findMonetaryStrings($string)\n {\n $moneyNumberPattern = '(\\d{1,3})([,\\. ]?\\d{3})*([\\.,]\\d{2})?';\n\n $matches = [];\n\n $numMatches = preg_match_all(\n \"/\\p{Sc}\\s*{$moneyNumberPattern}|{$moneyNumberPattern}\\s*\\p{Sc}/u\",\n $string,\n $matches\n );\n\n return $numMatches\n ? $matches[0]\n : [];\n }", "title": "" }, { "docid": "f5457efe409933a4520ff109b40ea240", "score": "0.4663445", "text": "function add(string $entry): int {\n if (empty($entry)) {\n throw new InvalidArgumentException('Please provide number.');\n }\n\n $result = 0;\n\n for ($i = 0; isset($entry[$i]); $i++){\n if (!is_numeric($entry[$i])) {\n throw new InvalidArgumentException('Only numbers expected.');\n }\n\n $result += $entry[$i];\n }\n\n return $result;\n}", "title": "" }, { "docid": "0509f560d34f5a4c596b2197fdaf95bd", "score": "0.465305", "text": "protected function explode($delimiter, $str, $open = '(', $close = ')') {\r\n\t\t$balance = 0;\r\n\t\t$hold = $retval = array();\r\n\t\t$parts = explode($delimiter, $str);\r\n\t\tforeach ($parts as $part) {\r\n\t\t\t$hold[] = $part;\r\n\t\t\t$balance += $this->balanceChars($part, $open, $close);\r\n\t\t\tif ($balance < 1) {\r\n\t\t\t\t$balance = 0;\r\n\t\t\t\t$retval[] = implode($delimiter, $hold);\r\n\t\t\t\t$hold = array();\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (count($hold) > 0) { $retval[] = implode($delimiter, $hold); }\r\n\t\treturn $retval;\r\n\t}", "title": "" }, { "docid": "9104e51770ac31749100ed718030aa62", "score": "0.4651044", "text": "public function testGetSum()\n\t{\n\t\t// 15 + 13 + 9 (values) = 37\n\t\t$this->assertEquals( 37, $this->sut->getSum( 'd2' ) );\n\t}", "title": "" }, { "docid": "4c3c00473b93e19be6c7ea956b5c1434", "score": "0.4635985", "text": "private static function m( $str ) {\n\t\t\t$c = self::$regex_consonant;\n\t\t\t$v = self::$regex_vowel;\n\n\t\t\t$str = preg_replace( \"#^$c+#\", '', $str );\n\t\t\t$str = preg_replace( \"#$v+$#\", '', $str );\n\n\t\t\tpreg_match_all( \"#($v+$c+)#\", $str, $matches );\n\n\t\t\treturn count( $matches[1] );\n\t\t}", "title": "" }, { "docid": "7ce182628e9ef6da1dc1d06569ca2d21", "score": "0.46235403", "text": "public function add($numbers = '')\n {\n $result = $this->generateParams($numbers);\n \n if (is_array($result)) {\n return array_sum($result);\n }\n return $result;\n }", "title": "" }, { "docid": "0aa0bd6e6b9280c5543bf4651eceba5b", "score": "0.46194285", "text": "function sumNumber($a, $b) {\n\t\treturn $a + $b;\n\t}", "title": "" }, { "docid": "98c3d820c309d73c77635f602dc0e836", "score": "0.46182996", "text": "function sum() {\n }", "title": "" }, { "docid": "180a3c023d4664c346d71014a8630d98", "score": "0.46181047", "text": "protected function addInfixString($string)\n\t{\n\t\t$regex = '(([0-9]*\\.[0-9]+|[0-9]+|\\+|-|\\*|/)|\\s+)';\n\t\t$this->tokens = preg_split($regex, $string, null, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE);\n\t\t$this->tokens = array_map('trim', $this->tokens);\n\t}", "title": "" }, { "docid": "6d252645f7f867212325c19235d250a2", "score": "0.45923838", "text": "function f_getDeudasSuma($tipo, $valor, $apar, $deuda, $ordin, $extra) {\n $let = substr($tipo, 0, 1);\n $ord = number_format($ordin, 2, \".\", \",\"); \n $ext = number_format($extra, 2, \".\", \",\"); \n $sum = number_format($ordin + $extra, 2, \".\", \",\");\n $por = number_format($deuda * 100 / $apar, 2, \".\", \",\");\n $idp = ($tipo === \"portal\") ? \"sump$valor\" : \"sumtotal\";\n return \"<tr id=\\\"$idp\\\"><td class=\\\"align-middle text-center\\\" id=\\\"${let}ap$valor\\\">$apar</td>\n <td class=\\\"align-middle text-right\\\">Deudores $tipo $valor:</td>\n <td class=\\\"align-middle text-center\\\" id=\\\"${let}de$valor\\\">$deuda</td>\n <td class=\\\"align-middle\\\" id=\\\"${let}po$valor\\\">($por %)</td>\n <td class=\\\"align-middle\\\">\" . f_getCoeficientesInput(\"${let}or$valor\", $ord, \"€\", \"tabindex=\\\"-1\\\"\", FALSE). \"</td>\n <td class=\\\"align-middle\\\">\" . f_getCoeficientesInput(\"${let}ex$valor\", $ext, \"€\", \"tabindex=\\\"-1\\\"\", FALSE). \"</td>\n <td class=\\\"align-middle\\\">\" . f_getCoeficientesInput(\"${let}su$valor\", $sum, \"€\", \"tabindex=\\\"-1\\\"\", FALSE). \"</td>\n <td class=\\\"align-middle\\\">&nbsp;</td></tr>\";\n}", "title": "" }, { "docid": "0f7f727f32b2125aa2d355f2757023dd", "score": "0.4583995", "text": "function int($txt){\n\t$txt = str_replace(',', '', $txt);\n\t$atxt = explode('.',$txt);\n\tif(sizeof($atxt) <= 2){\n\t\t$returnNumber = '';\n\t\tforeach($atxt as $a){\n\t\t\t$returnNumber[] = intval(preg_replace('/[^0-9]+/', '', $a), 10);\n\t\t}\n\t\t$returnNumberText = implode('.', $returnNumber);\n\t}else{\n\t\t$returnNumberText = $txt;\n\t}\t\n\treturn $returnNumberText;\n}", "title": "" }, { "docid": "a7fc10d693223173aa303843711958bc", "score": "0.45818645", "text": "function multiexplode ($delimiters,$string) {\n \n\t $ready = str_replace($delimiters, '############', $string);\n\t $launch = explode('############', $ready);\n\t return $launch;\n\n\t}", "title": "" }, { "docid": "08e92462f3b8b258d47150472de025e0", "score": "0.458142", "text": "function AnalyseCssNumber($string) {\n\t\tif (strlen($string) == 0 || ctype_alpha($string{0})) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$units = & $this->parser->data['csstidy']['units'];\n\t\t$return = array(0, '');\n\n\t\t$return[0] = floatval($string);\n\t\tif (abs($return[0]) > 0 && abs($return[0]) < 1) {\n\t\t\tif ($return[0] < 0) {\n\t\t\t\t$return[0] = '-' . ltrim(substr($return[0], 1), '0');\n\t\t\t} else {\n\t\t\t\t$return[0] = ltrim($return[0], '0');\n\t\t\t}\n\t\t}\n\n\t\t// Look for unit and split from value if exists\n\t\tforeach ($units as $unit) {\n\t\t\t$expectUnitAt = strlen($string) - strlen($unit);\n\t\t\tif (!($unitInString = stristr($string, $unit))) { // mb_strpos() fails with \"false\"\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$actualPosition = strpos($string, $unitInString);\n\t\t\tif ($expectUnitAt === $actualPosition) {\n\t\t\t\t$return[1] = $unit;\n\t\t\t\t$string = substr($string, 0, - strlen($unit));\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif (!is_numeric($string)) {\n\t\t\treturn false;\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "ffa6bf5d0b00a87c5a7b3285348b88b6", "score": "0.45809785", "text": "function sumar($argumentos) {\n \n $salida=0;\n \n foreach ($argumentos as $v) {\n $salida+=$v;\n }\n return $salida;\n }", "title": "" }, { "docid": "ed078d4ae9fa298c797f43d5e7c900aa", "score": "0.4573558", "text": "function formatEntry($string){\n $string = strtok(strtok(strtok(strtok($string, '/'), '+'),'*'), '(');\n $string = is_numeric($string) ? $string : 'NULL';\n return $string;\n\n}", "title": "" }, { "docid": "d66a063b121da5b94e8172684ef209a8", "score": "0.45725492", "text": "function multi_explode($pattern, $string, $standardDelimiter = ':')\n {\n // replace delimiters with standard delimiter, also removing redundant delimiters\n $string = preg_replace(array($pattern, \"/{$standardDelimiter}+/s\"), $standardDelimiter, $string);\n \n // return the results of explode\n return explode($standardDelimiter, $string);\n }", "title": "" }, { "docid": "2ed37188820e11358d77fa31f51937fa", "score": "0.45477733", "text": "public function sum() {\n \t}", "title": "" }, { "docid": "7d3e278752034fa3745bc522cb845a04", "score": "0.45385098", "text": "function add($num1, $num2, $num3, $num4) {\n return $num1+$num2+$num3+$num4;\n}", "title": "" }, { "docid": "d12537742360c761e2c5c708df7bd8a8", "score": "0.452757", "text": "function task_parse_test_group($string, $test_count) {\n if (strlen($string) == 0) {\n return array();\n }\n\n $current_group = array();\n $items = explode(',', $string);\n $used_count = array();\n for ($test = 1; $test <= $test_count; $test++) {\n $used_count[$test] = 0;\n }\n\n foreach ($items as &$item) {\n $tests = explode('-', $item);\n if (count($tests) < 1 || count($tests) > 2) {\n return false;\n }\n foreach ($tests as &$test_ref) {\n $test_ref = trim($test_ref);\n if (!is_whole_number($test_ref)) {\n return false;\n }\n }\n if (count($tests) == 1) {\n if ($tests[0] < 1 || $tests[0] > $test_count) {\n return false;\n }\n $current_group[] = $tests[0];\n $used_count[$tests[0]] = 1;\n } else {\n $left = (int) $tests[0];\n $right = (int) $tests[1];\n if ($left < 1 || $right < 1 ||\n $left > $test_count || $right > $test_count) {\n return false;\n }\n for ($test = min($left, $right); $test <= max($left, $right);\n $test++) {\n $current_group[] = $test;\n $used_count[$test]++;\n }\n }\n }\n\n for ($test = 1; $test <= $test_count; $test++) {\n if ($used_count[$test] > 1) {\n return false;\n }\n }\n\n return $current_group;\n}", "title": "" }, { "docid": "506ec66a71e0a928dc1af3c3719665ca", "score": "0.450881", "text": "function tax_service_sum($price_summary) {\n /* //sum of tax and service ;\n return abs($price_summary['ServiceTax']+$price_summary['Tax']); */\n }", "title": "" }, { "docid": "31187f822f6a04c83ef39f53bc73e7c7", "score": "0.4506776", "text": "public function test_json_parse_numeric_plus_start(): void {\n\n $string = '+123456789';\n\n $result = json_parse_numeric($string);\n\n self::assertIsString($result);\n }", "title": "" }, { "docid": "dad857f4f7db5285f4b1a69dd4fa67ad", "score": "0.4505459", "text": "static function smartSplit( $delimiter, $string) {\n\t\tif ( $string == '' ) {\n\t\t\treturn array();\n\t\t}\n\n\t\t$returnValues = array();\n\t\t$numOpenParentheses = 0;\n\t\t$curReturnValue = '';\n\n\t\tfor ( $i = 0; $i < strlen( $string ); $i++ ) {\n\t\t\t$curChar = $string{$i};\n\t\t\tif ( $curChar == '(' ) {\n\t\t\t\t$numOpenParentheses++;\n\t\t\t} elseif ( $curChar == ')' ) {\n\t\t\t\t$numOpenParentheses--;\n\t\t\t}\n\n\t\t\tif ( $curChar == $delimiter && $numOpenParentheses == 0 ) {\n\t\t\t\t$returnValues[] = $curReturnValue;\n\t\t\t\t$curReturnValue = '';\n\t\t\t} else {\n\t\t\t\t$curReturnValue .= $curChar;\n\t\t\t}\n\t\t}\n\t\t$returnValues[] = $curReturnValue;\n\t\t\n\t\treturn $returnValues;\n\t}", "title": "" }, { "docid": "abf6e12ac066e077559a7aeeac066b04", "score": "0.4503259", "text": "function numfmt_parse($formatter, $string, $type, &$position) {}", "title": "" }, { "docid": "56807752801d01ab2532fc8beb285c92", "score": "0.45030147", "text": "function parse_discount_text($discText, $price)\n{\n\t$disc = array(\n\t\t'discount1' => 0,\n\t\t'discount2' => 0,\n\t\t'discount3' => 0,\n\t\t'discount_amount' => 0\n\t);\n\n\tif(!empty($discText))\n\t{\n\t\t$step = explode('+', $discText);\n\n\t\t$i = 1;\n\t\tforeach($step as $discLabel)\n\t\t{\n\t\t\tif($i < 4)\n\t\t\t{\n\t\t\t\t$key = 'discount'.$i;\n\t\t\t\t$arr = explode('%', $discLabel);\n\t\t\t\t$arr[0] = floatval($arr[0]);\n\t\t\t\t$discount = count($arr) == 1 ? $arr[0] : ($arr[0] * 0.01) * $price; //--- ส่วนลดต่อชิ้น\n\t\t\t\t$disc[$key] = count($arr) == 1 ? $arr[0] : $arr[0].'%'; //--- discount label\n\t\t\t\t$disc['discount_amount'] += $discount;\n\t\t\t\t$price -= $discount;\n\t\t\t}\n\n\t\t\t$i++;\n\t\t}\n\t}\n\n\treturn $disc;\n}", "title": "" }, { "docid": "330812bc09df7543de25fd71a1c786a3", "score": "0.4492493", "text": "private function getStreamMonthDat($string, $ordinal, $addVal){\n $arr = explode(',',$string);\n $arr[$ordinal] = intval($arr[$ordinal])+$addVal;\n return implode(',',$arr);\n }", "title": "" }, { "docid": "3fdb533c96f9efce8eb8bd36525f2011", "score": "0.44873306", "text": "function yourls_string2int($string, $chars = null) {\n\tif( $chars == null )\n\t\t$chars = yourls_get_shorturl_charset();\n\t$integer = 0;\n\t$string = strrev( $string );\n\t$baselen = strlen( $chars );\n\t$inputlen = strlen( $string );\n\tfor ($i = 0; $i < $inputlen; $i++) {\n\t\t$index = strpos( $chars, $string[$i] );\n\t\t$integer = bcadd( (string)$integer, bcmul( (string)$index, bcpow( (string)$baselen, (string)$i ) ) );\n\t}\n\n\treturn yourls_apply_filter( 'string2int', $integer, $string, $chars );\n}", "title": "" }, { "docid": "7fffdb8b99d57f8e67c27a370a7636a5", "score": "0.44862545", "text": "function suma($i1, $i2)\r\n\t{\r\n\t\t//return($resultado);\r\n\t\treturn($i1+$i2);\r\n\t}", "title": "" }, { "docid": "af0ab2c52b2a7478f75fb77430cfe65f", "score": "0.44809854", "text": "function sum($x,$y){\n $z=$x+$y;\n return $z;\n\n }", "title": "" }, { "docid": "d31fcbc701dd175ea015422e019e5f3b", "score": "0.4477552", "text": "function array_sum_intervals($array_external, $intervals){\n\n $n_intervals=explode(\";\", $intervals);\n $array_amount = count($n_intervals);\n $result = 0;\n for($i=0; $i < $array_amount ; $i++){\n $result += $this->array_sum_interval($array_external, $n_intervals[$i]);\n }\n return $result;\n\n }", "title": "" }, { "docid": "d31fcbc701dd175ea015422e019e5f3b", "score": "0.4477552", "text": "function array_sum_intervals($array_external, $intervals){\n\n $n_intervals=explode(\";\", $intervals);\n $array_amount = count($n_intervals);\n $result = 0;\n for($i=0; $i < $array_amount ; $i++){\n $result += $this->array_sum_interval($array_external, $n_intervals[$i]);\n }\n return $result;\n\n }", "title": "" }, { "docid": "9a5aaf623cec7c58bed27c82c2f58b74", "score": "0.44720978", "text": "private function multiExplode($delimiters,$string) {\n\t\t$ready = str_replace($delimiters, $delimiters[0], $string);\n\t\t$launch = explode($delimiters[0], $ready);\n\t\treturn $launch;\n\t}", "title": "" }, { "docid": "03d92f15e87042e41457ed75f6e62451", "score": "0.44708872", "text": "function extract_unit($string, $start, $end, $offset) {\n\t\t$pos = stripos($string, $start, $offset);\n\t\t$str = substr($string, $pos);\n\t\t$str_two = substr($str, strlen($start));\n\t\t$second_pos = stripos($str_two, $end);\n\t\t$str_three = substr($str_two, 0, $second_pos);\n\t\t$pos = $pos + 50;\t\t\n\t\t$unit = $str_three;\n\t\treturn array ($unit, $pos);\n\t}", "title": "" }, { "docid": "233575d4af3b21cf8e553fb6ea92b2dc", "score": "0.44669378", "text": "function multiexplode ($delimiters,$string) {\r\n\r\n $ready = str_replace($delimiters, $delimiters[0], $string);\r\n $launch = explode($delimiters[0], $ready);\r\n return $launch;\r\n}", "title": "" }, { "docid": "df3ea7d263a1219f5bba455e6b745c4e", "score": "0.4464322", "text": "function multiexplode ($delimiters,$string) {\n\n $ready = str_replace($delimiters, $delimiters[0], $string);\n $launch = explode($delimiters[0], $ready);\n return $launch;\n }", "title": "" }, { "docid": "d6433072815e00fb51e86c3e53368aa5", "score": "0.44613397", "text": "function Mireille($matchesNumber,$matches){\n// Ici on a crée une formule pour simplifier et généraliser\n switch ($matchesNumber) {\n case 0:\n $calculatedValue = 0;\n break;\n case ($matchesNumber % 4) == 1:\n $calculatedValue = 1;\n break;\n case ($matchesNumber % 4) == 2:\n $calculatedValue = 1;\n break;\n case ($matchesNumber % 4) == 3:\n $calculatedValue = 2;\n break;\n case ($matchesNumber % 4) == 0:\n $calculatedValue = 3;\n break;\n }\n\n echo\"...\".PHP_EOL;\n echo \"Mireille retire \".$calculatedValue.\" allumettes\".PHP_EOL;\n echo\"...\".PHP_EOL;\n\n $matchesNumber -= $calculatedValue;\n $matches = substr($matches, 1, $matchesNumber);\n echo \"Il reste \".$matchesNumber. \" allumettes\".PHP_EOL;\n echo PHP_EOL;\n echo $matches.PHP_EOL;\n echo PHP_EOL;\n // on retourne le nombre d'allumettes pour pouvoir actualiser le nombre en dehors de la fonction\n return $matchesNumber;\n }", "title": "" }, { "docid": "69d23b3a7d14fed3bf46c30bd9cceca5", "score": "0.4456034", "text": "function DataNum($dataPv) {\n\t$ano = Explode(\"-\", $dataPv);\n\t$data1 = implode(\"\", $ano);\n\treturn $data1;\n}", "title": "" }, { "docid": "8c9443d9d607c03c4837ba8eaead2460", "score": "0.44543952", "text": "function parseString($string)\n {\n $string=trim($string);\n $string=trim($string,$this->quote); //remove quote at head and tail\n\n $split=$this->quote.$this->col_split.$this->quote; //create split\n\n $row=explode($split,$string);\n\n return $row;\n }", "title": "" }, { "docid": "3825e6bbc4869ae377668b427a8227d5", "score": "0.44539255", "text": "public function calculateTotals(string $chars, int $interval): array\n {\n $chars = substr($chars, 1);\n $chars = substr($chars, 0, -1);\n $group = explode(',', $chars);\n\n $final = [];\n $ind = [];\n $totals = [];\n\n $total_profit = 0;\n $total_sell = 0;\n $total_buy = 0;\n\n foreach ($group as $row) {\n $id = (int) $row;\n $profit = $this->getTotalProfit($id, $interval);\n $sell = $this->getTotalSales($id, $interval);\n $buy = $this->getTotalExpenses($id, $interval);\n\n $total_profit += $profit;\n $total_sell += $sell;\n $total_buy += $buy;\n\n $values = [\"profit\" => $profit,\n \"sell\" => $sell,\n \"buy\" => $buy];\n array_push($ind, [$id => $values]);\n }\n\n array_push($totals, [\"total_profit\" => $total_profit,\n \"total_sell\" => $total_sell,\n \"total_buy\" => $total_buy]);\n array_push($final, $ind);\n array_push($final, $totals);\n return $final;\n }", "title": "" }, { "docid": "5ef4880c719443ca70584226faacc8c8", "score": "0.4450936", "text": "function um_string_to_massive($string){\n $member = explode(',', $string);\n foreach( $member as $key => $value ){\n\t$value ? $united[$value] = 1 : $united[$value]; \n }\n return($united);\n}", "title": "" }, { "docid": "f8f9b03881b5a934938e230063bb62ec", "score": "0.44508964", "text": "function smarty_modifier_summarize($string, $strtype, $type) {\n\t$sep = ($strtype == \"html\" ? array(\"<br />\",\"</p>\",\"</div>\") : array(\"\\r\\n\",\"\\n\",\"\\r\"));\n\tswitch ($type) {\n\t\tcase \"para\":\n\t\t\tforeach ($sep as $s) {\n\t\t\t\t$para = explode($s,$string);\n\t\t\t\t$string = $para[0];\n\t\t\t}\n\t\t\treturn strip_tags($string);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$words = split(\" \",strip_tags($string));\n\t\t\treturn implode(\" \",array_slice($words,0,$type+0));\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "87d5b08e60c36436770f9a2dc4750f13", "score": "0.44503835", "text": "public function operation($op)\n {\n try {\n if ($op === '+') {\n $res = 0;\n } elseif ($op === '*') {\n $res = 1;\n } else {\n throw new InvalidArgumentException('Invalid parameter.');\n }\n\n $delimiter = ',';\n //Assuming this list of delimiters\n $delimiters = array(';', ',', '.', ':');\n\n $data = explode('\\\\', $this->values);\n if (count($data) == 3) {\n $delimiter = $data[1];\n $numbers = $data[2];\n } else {\n $numbers = $data[0];\n }\n\n if (in_array($delimiter, $delimiters)) {\n // Replaces any \\n characters with comma\n $numbers = str_replace(\"n\", $delimiter, $numbers);\n $numbers = explode($delimiter, $numbers);\n foreach ($numbers as $num) {\n //Ignoring value above 1000\n if ($num > 1000) {\n continue;\n }\n\n //Throwing Exception if number is negative\n if ($num < 0) {\n $neg = array_filter($numbers, function ($x) {\n return $x < 0;\n });\n $neg = implode(',', $neg);\n throw new Exception('Negative numbers [' . $neg . '] not allowed.');\n }\n\n if ($op === '+') {\n $res += $num;\n } else {\n $res *= $num;\n }\n }\n echo $res;\n } else {\n throw new Exception('Unknown delimiter.');\n }\n } catch (Exception $e) {\n echo $e->getMessage();\n }\n }", "title": "" }, { "docid": "405dd604f837288796f1cd42ad4d7168", "score": "0.44391418", "text": "function extract_text($str){\n\n $nu='0123456789';\n $cx=strlen($str);\n $newStr='';\n for($te=0;$te<$cx;$te++){\n if(substr_count($nu,substr($str,$te,1))==0) {\n $newStr.=substr($str,$te,1);\n }\n }\n return $newStr;\n}", "title": "" }, { "docid": "b938519405730c9430760c547de5a275", "score": "0.44391015", "text": "function sortz($str){\r\n\r\n $start = strpos($str, \"(\");\r\n $end = strpos($str, \")\");\r\n if($start!=false || $end!=false){\r\n $sub = substr($str, $start+1, $end-$start-1);\r\n $sub = sortz($sub);\r\n fill($sub);\r\n $buff = calculate();\r\n $str = str_replace(\"(\".$sub.\")\", $buff, $str);\r\n }\r\n $pow = strpos($str, \"^\");\r\n if ($pow != false){\r\n $next = get_next_number($str, $pow+1);\r\n $prev = get_prev_number($str, $pow-1);\r\n $sub = $prev[0].\"^\".$next[0];\r\n fill($sub);\r\n $buff = calculate();\r\n $str = str_replace($sub, $buff, $str);\r\n }\r\n return $str;\r\n }", "title": "" }, { "docid": "5a5063670473cf6690e30875ad3a3447", "score": "0.44370717", "text": "public function natConvert($string)\n\t{\n\t\t\n\t\t// Our task is to expand all numbers to have a fixed number of digits.\n\t\t// 'I want 3.5 potatoes' -> 'I want [0000003500] potatoes'. \n\t\n\t\t// Let's start by delimiting all numbers by the '~' character.\n\t\t// 'I want 3.5 potatoes' -> 'I want ~3.5~ potatoes'. \n\t\t$string = str_replace(\"~\", \"\", $string);\n\t\t$string = preg_replace('/([0-9]*\\.?[0-9]+|[0-9][0-9,]+\\.?[0-9,]*[0-9])/i', '~${1}~', $string); \n\t\t\n\t\t// Now, let's split the string, on the '~' character, and loop over the elements.\n\t\t// Odd elemenets are numbers. Even ones are texts. \n\t\t$array_decoupe = explode(\"~\",$string);\n\t\t$part = \"\";\n\t\tforeach ($array_decoupe as $key=>$item)\n\t\t{\n\t\t\tif ($key % 2 == 0) \n\t\t\t{\n\t\t\t\t$part.= strtolower($item);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$item = number_format($item, 3, '', '');\n\t\t\t\t$item = str_pad($item, 10, \"0\", STR_PAD_LEFT);\n\t\t\t\t\n\t\t\t\t$part.= \"[\".$item.\"]\";\n\t\t\t}\n\t\t\t\t\t\t\n\t\t}\n\t\t$bad_word = array(\",\",\":\",\".\",\";\",\"(\",\")\");\n\t\t$part = str_replace($bad_word, \"\", $part);\n\t\treturn $part;\n\t}", "title": "" } ]
a8feafb2341cdaebcbe4d39ca8f87b6b
Retrieves the collection of Domain resources.
[ { "docid": "cd3470505ad0772249390e69c9f30194", "score": "0.7233888", "text": "public function getDomains()\n {\n return $this->send(\"/domains?page=1\");\n }", "title": "" } ]
[ { "docid": "4c971e26b8ff31fd1ad2abff9e08d64a", "score": "0.772596", "text": "public function getDomainList() {\n return $this->getDomainObject()->loadDomainList();\n }", "title": "" }, { "docid": "01456af0762889b17e58a3158eda161c", "score": "0.76151925", "text": "public function getAll(): array\n {\n // Don't need to specify a command here because the Domains API is simple.\n $httpResponse = $this->get();\n $data = $httpResponse->getBodyJsonAsArray();\n $domainData = $data['domains'];\n $domainModels = [];\n if (is_array($domainData) && !empty($domainData)) {\n foreach ($domainData as $domainDatum) {\n $domainModel = $this->hydrate($domainDatum);\n $domainModels[] = $domainModel;\n }\n }\n\n return $domainModels;\n }", "title": "" }, { "docid": "b6e3bfa352989260e2b0ce4adf6eebbd", "score": "0.75088596", "text": "public static function Domains() \n\t{\n\t\treturn Domains::getInstance();\n\t}", "title": "" }, { "docid": "330e6fbcc7b22c486c5becae5d2b163b", "score": "0.72307366", "text": "public function getDomainList() { return $this->ListDomains(); }", "title": "" }, { "docid": "5774b03d05e71f64c819ae94a5fd433f", "score": "0.71871424", "text": "public function listDomains()\n {\n $this->setUpList();\n return $this->domainList;\n }", "title": "" }, { "docid": "8a69c6d54edcc1d17638555e236629a6", "score": "0.71171635", "text": "function getDomains() {\n\t\t$c_schema = $this->_schema;\n\t\t$this->clean($c_schema);\n\t\t\n\t\t$sql = \"\n\t\t\tSELECT\n\t\t\t\tt.typname AS domname,\n\t\t\t\tpg_catalog.format_type(t.typbasetype, t.typtypmod) AS domtype,\n\t\t\t\tt.typnotnull AS domnotnull,\n\t\t\t\tt.typdefault AS domdef,\n\t\t\t\tpg_catalog.pg_get_userbyid(t.typowner) AS domowner,\n\t\t\t\tpg_catalog.obj_description(t.oid, 'pg_type') AS domcomment\n\t\t\tFROM\n\t\t\t\tpg_catalog.pg_type t\n\t\t\tWHERE\n\t\t\t\tt.typtype = 'd'\n\t\t\t\tAND t.typnamespace = (SELECT oid FROM pg_catalog.pg_namespace\n\t\t\t\t\tWHERE nspname='{$c_schema}')\n\t\t\tORDER BY t.typname\";\n\n\t\treturn $this->selectSet($sql);\n\t}", "title": "" }, { "docid": "9079ec7a916f513c7cb71c58a9028206", "score": "0.7074257", "text": "public function domainList() \n {\n writeMsg(\"domainList()\");\n return array();\n }", "title": "" }, { "docid": "5d00bcfe11b6257fc6cea04eb94ec4a6", "score": "0.7046416", "text": "public function getDomainList()\n {\n //Check Cache for list of domains\n if ($this->cache->hasItem('rcm_domain_list')) {\n return $this->cache->getItem('rcm_domain_list');\n }\n\n /** @var \\Doctrine\\ORM\\QueryBuilder $queryBuilder */\n $queryBuilder = $this->entityManager->createQueryBuilder();\n\n $queryBuilder->select(\n 'domain.domain,\n primary.domain primaryDomain,\n language.iso639_2b languageId,\n site.siteId,\n country.iso3 countryId'\n )\n ->from('\\Rcm\\Entity\\Domain', 'domain', 'domain.domain')\n ->leftJoin('domain.primaryDomain', 'primary')\n ->leftJoin('domain.defaultLanguage', 'language')\n ->leftJoin(\n '\\Rcm\\Entity\\Site',\n 'site',\n Join::WITH,\n 'site.domain = domain.domainId'\n )\n ->leftJoin('site.country', 'country');\n\n $domainList = $queryBuilder->getQuery()->getArrayResult();\n\n $this->cache->setItem('rcm_domain_list', $domainList);\n\n return $domainList;\n }", "title": "" }, { "docid": "37fc853a3959fa334a2737c4ee937656", "score": "0.70151234", "text": "function loadall() {\n\t\ttry {\n\t\t\tif (!self::$dbh) $this->connect();\n\t\t\t$sql = \"SELECT name, valid, description, ctime FROM domains ORDER BY ctime DESC\";\n\t\t\t$stmt = self::$dbh->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t$domains = array();\n\t\t\t\n\t\t\twhile ($a = $stmt->fetch()) {\n\t\t\t\t$d = new Domain;\n\t\t\t\t$d->domain = urldecode($a[0]);\n\t\t\t\t$d->valid = $a[1];\n\t\t\t\t$d->desc = urldecode($a[2]);\n\t\t\t\t$d->ctime = $a[3];\n\t\t\t\t\n\t\t\t\t$domains[] = $d;\n\t\t\t}\n\t\t\treturn $domains;\n\t\t}\n\t\tcatch (PDOException $e) {\n $this->fatal_error($e->getMessage());\t\n\t\t}\n }", "title": "" }, { "docid": "0f2673e9d6138ff535828a375e3d89c9", "score": "0.6873805", "text": "public function listDomains($options = array())\n {\n list($config) = $this->parseOptions($options, 'config');\n $params = array();\n\n return $this->sendRequest(\n HttpMethod::GET,\n array(\n 'config' => $config,\n 'params' => $params,\n ),\n '/domain'\n );\n }", "title": "" }, { "docid": "f7b64f67a7d9d437c1f8ef569b1c074b", "score": "0.68725914", "text": "public function get_domains()\n\t{\n\t\treturn $this->domains;\n\t}", "title": "" }, { "docid": "d661bb026329bd78dedfaf824c2ed5b2", "score": "0.6868381", "text": "public function getDomains()\n {\n return $this->domains;\n }", "title": "" }, { "docid": "d661bb026329bd78dedfaf824c2ed5b2", "score": "0.6868381", "text": "public function getDomains()\n {\n return $this->domains;\n }", "title": "" }, { "docid": "d661bb026329bd78dedfaf824c2ed5b2", "score": "0.6868381", "text": "public function getDomains()\n {\n return $this->domains;\n }", "title": "" }, { "docid": "bfff1f77b73ff178b300bcba9eee3773", "score": "0.685955", "text": "public static function getDomains() {\n $domains = self::loadYaml(\"domain-list\");\n return $domains['domains'];\n }", "title": "" }, { "docid": "5417021cbffcbb0fa309c948fec4834d", "score": "0.6838276", "text": "public function getDomains() {\n $action = $this->digitalOcean->domain();\n // return a collection of Action entity\n $actions = $action->getAll(); \n return $actions;\n }", "title": "" }, { "docid": "8b45be561b2665be1f8ef9e9494cced1", "score": "0.6819608", "text": "public function getDomains()\n {\n $res = $this->doRequest(self::GET_DOMAINS);\n\n $domains = array();\n for ($i = 1; $i <= $res['domains']; $i++) {\n $dom = 'domain' . $i;\n $classes = array();\n for ($j = 1; $j <= $res[$dom . 'classes']; $j++) {\n $classes[$res[$dom . 'class' . $j . 'name']] = $res[$dom . 'class' . $j . 'mindevcount'];\n }\n $domains[] = array('name' => $res[$dom], 'classes' => $classes);\n }\n return $domains;\n }", "title": "" }, { "docid": "f1e98c421a490cc374b74781c51d72ac", "score": "0.68191725", "text": "function get_domains() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "461fcd84ffb9609329ab318456764b33", "score": "0.68092704", "text": "function fetch_domains()\n\t{\n\t\tlog_write(\"debug\", \"soap_api\", \"Executing fetch_domains()\");\n\n\t\ttry\n\t\t{\n\t\t\t$domains = $this->client->fetch_domains();\n\t\t}\n\t\tcatch (SoapFault $exception)\n\t\t{\n\t\t\tif ($exception->getMessage() == \"ACCESS_DENIED\")\n\t\t\t{\n\t\t\t\tlog_write(\"error\", \"namedmanager\", \"Access failure attempting to fetch domains\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\telse\n\t\t\t{\t\n\t\t\t\tlog_write(\"error\", \"namedmanager\", \"Unexpected error \\\"\". $exception->getMessage() .\"\\\" whilst attempting to fetch domains\");\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\n\t\treturn $domains;\n\n\t}", "title": "" }, { "docid": "2fbdc02ef1a9d480438f16eece80f5b1", "score": "0.67989635", "text": "public function get_domains() {\n return $this->domains;\n }", "title": "" }, { "docid": "ef7eeea461499f25ab8eefb4927b5d62", "score": "0.679323", "text": "public function getDomains($limit = 0)\n {\n return Domain::getCollection($this->getLink('domains'), $limit, [], $this->client);\n }", "title": "" }, { "docid": "6467996c4bf1ccb3171c44406ce9a78e", "score": "0.67847294", "text": "public static function getAll() {\n\t $dq = Doctrine_Query::create ()->leftJoin('d.DomainsTlds dt')->leftJoin('dt.WhoisServers ws')->from ( 'Domains d' );\n\t return $dq->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\n\t}", "title": "" }, { "docid": "062db6cb68af623fdaae39d32c5bdf0c", "score": "0.6768898", "text": "public function getDomains()\n {\n $res = $this->doRequest(MogileFS::GET_DOMAINS);\n\n $domains = Array();\n for($i=1; $i <= $res['domains']; $i++)\n {\n $dom = 'domain'.$i;\n $classes = Array();\n for($j=1; $j <= $res[$dom.'classes']; $j++)\n $classes[$res[$dom.'class'.$j.'name']] = $res[$dom.'class'.$j.'mindevcount'];\n $domains[] = Array('name' => $res[$dom],'classes' => $classes);\n }\n return $domains;\n }", "title": "" }, { "docid": "4d5cd25a2221641c439564363c0509d2", "score": "0.67349535", "text": "protected function getAllDomains () : array\n {\n $domains = [];\n $finder = (new Finder())\n ->in('src/')\n ->name('domain_config.yaml');\n\n foreach ($finder->getIterator() as $item)\n {\n $domain = \\explode(\"/\", \"{$item}\")[1];\n $domains[] = $domain;\n }\n\n return $domains;\n }", "title": "" }, { "docid": "ca17ca9e1762827ef71e6c85331fa0c4", "score": "0.6718832", "text": "function findDomains ( $filter = null ) {\n\n // -- Domain base path --\n $url = $this->DEFAULT_BASE_URL . \"/v2/domain\";\n\n // -- Create OAuth request based on OAuth consumer and the specific URL --\n $request = OAuthRequest::from_consumer_and_token ( $this->consumer, NULL, 'GET', $url );\n\n // -- Check if filter was passed; if so, append to params --\n if ( !empty ( $filter ) )\n $request->set_parameter ( 'q', $filter );\n\n // -- Make signed OAuth request to contact API server --\n $request->sign_request ( new OAuthSignatureMethod_HMAC_SHA1 (), $this->consumer, NULL );\n\n // -- Get the usable url for the request --\n $requestUrl = $request->to_url ();\n\n // -- Run the cUrl request --\n $response = $this->client->send_request ( $request->get_normalized_http_method (), $requestUrl );\n\n $domains = json_decode ( $response, true );\n $err = $this->json_last_error_msg_dep ();\n if ( !empty ( $err ) )\n throw new NimbusecException ( \"JSON: an error occured '{$err}' while trying to decode {$response}\" );\n else\n return $domains;\n }", "title": "" }, { "docid": "60893c111ab819196586b8ea4735c58f", "score": "0.6682526", "text": "public function getDomains()\n {\n return $this->hasMany(Domains::className(), ['user_id' => 'id']);\n }", "title": "" }, { "docid": "6aa4ef9db88fe1cffacfaabe8e58d801", "score": "0.6580424", "text": "public function getAllDomains()\n {\n $domains = [ $this->domain ];\n $userDomains = [];\n\n foreach ($this->sourcePaths as $domain => $paths) {\n if (is_array($paths)) {\n array_push($userDomains, $domain);\n }\n }\n\n return array_merge($domains, $userDomains);\n }", "title": "" }, { "docid": "31fded545dbfe9866034c60f8d2cb73f", "score": "0.65583503", "text": "public function index()\n {\n $headers = FromDomain::ownBy(auth('api')->id())\n ->paginate((intval(request()->limit) > 0)? intval(request()->limit) : 20);\n\n return response([\n 'status' => 20,\n 'message' => 'Success',\n 'payload' => new DatabaseFromDomainCollectionResource($headers)\n ], 200);\n }", "title": "" }, { "docid": "7db388b23c212703c8aa8913b9ec463a", "score": "0.6553233", "text": "public function getDomains()\n {\n return $this->getGroupTypeInfo('domain');\n }", "title": "" }, { "docid": "4c198781a771d8391ed368240a402439", "score": "0.6534592", "text": "public function domains_list()\n {\n // TODO: Write this function\n }", "title": "" }, { "docid": "39ce947edb25d9760c99bbffd166191c", "score": "0.6504806", "text": "public function domains()\n {\n return new DomainsResponse($this->getMandrill()->senders->domains());\n }", "title": "" }, { "docid": "e3020ddbb34bbf4568676fc4498b1497", "score": "0.644148", "text": "static function getAll(Rage4Api $api)\r\n {\r\n $ret = array();\r\n $domains = $api->getDomains();\r\n if (!is_array($domains)) {\r\n throw new Rage4Exception($domains);\r\n }\r\n foreach ($domains as $domain) {\r\n $ret[] = new CreatedDomain($domain['name'], $domain['type'], $domain['owner_email'], $domain['id'], array(), $domain['subnet_mask']);\r\n }\r\n return $ret;\r\n }", "title": "" }, { "docid": "4e64b409a94e9ef0c0e4184267451e1b", "score": "0.63652575", "text": "public function getDomain()\n {\n $getTokenResponse = $this->getDomainAccessToken();\n if ($getTokenResponse['success'] == true) {\n $this->domainAccessToken = $getTokenResponse['data'];\n } else {\n // Catch errors\n }\n $params = array(\n 'key' => $this->domainAccessToken,\n 'domain_api_key' => \\Config::get('kandy-laravel.key')\n );\n\n $fieldsString = http_build_query($params);\n $url = Kandylaravel::API_BASE_URL . 'accounts/domains/details' . '?'\n . $fieldsString;\n\n try {\n $response = (new RestClient())->get($url)->getContent();\n } catch (Exception $ex) {\n return array(\n 'success' => false,\n 'message' => $ex->getMessage()\n );\n }\n\n $response = json_decode($response);\n if ($response->message == 'success') {\n return array(\n 'success' => true,\n 'data' => $response->result->domain->domain_name,\n );\n } else {\n return array(\n 'success' => false,\n 'message' => $response->message\n );\n }\n }", "title": "" }, { "docid": "3ba16076d045a2c22f5140c9601930cd", "score": "0.6330543", "text": "public function listDomain($limit = null, $offset = null, $filter = null)\n {\n return $this->doRequest(self::GET, 'domain', null, null, null, null, null, $limit, $offset, $filter);\n }", "title": "" }, { "docid": "60912ff860fd489e6a3e78e0bce11ba8", "score": "0.62901527", "text": "function loadi() {\n\t\ttry {\n\t\t\tif (!self::$dbh) $this->connect();\n\t\t\t$sql = \"SELECT name, valid, description, ctime FROM domains WHERE valid='y' ORDER BY ctime DESC\";\n\t\t\t$stmt = self::$dbh->prepare($sql);\n\t\t\t$stmt->execute();\n\t\t\t\n\t\t\t$domains = array();\n\t\t\t\n\t\t\twhile ($a = $stmt->fetch()) {\n\t\t\t\t$d = new Domain;\n\t\t\t\t$d->domain = urldecode($a[0]);\n\t\t\t\t$d->valid = $a[1];\n\t\t\t\t$d->desc = urldecode($a[2]);\n\t\t\t\t$d->ctime = $a[3];\n\t\t\t\t\n\t\t\t\t$domains[] = $d;\n\t\t\t}\n\t\t\treturn $domains;\n\t\t}\n\t\tcatch (PDOException $e) {\n $this->fatal_error($e->getMessage());\t\n\t\t}\n\t}", "title": "" }, { "docid": "688a963b7bc6a049e6e3bf3ed4b5438f", "score": "0.62837094", "text": "public function domains()\n {\n $this->uses(['Domains.DomainsDomains', 'Clients', 'Services', 'Companies', 'Packages', 'ModuleManager']);\n\n // Process bulk domains options\n if (!empty($this->post) && isset($this->post['service_ids'])) {\n if (($errors = $this->updateDomains($this->post))) {\n $this->set('vars', (object)$this->post);\n $this->setMessage('error', $errors, false, null, false);\n } else {\n switch ($this->post['action']) {\n case 'schedule_cancellation':\n $term = 'AdminMain.!success.change_auto_renewal';\n break;\n case 'domain_renewal':\n $term = 'AdminMain.!success.domain_renewal';\n break;\n case 'update_nameservers':\n $term = 'AdminMain.!success.update_nameservers';\n break;\n case 'domain_push_to_client':\n $term = 'AdminMain.!success.domains_pushed';\n break;\n }\n\n $this->flashMessage('message', Language::_($term, true), null, false);\n $this->redirect($this->base_uri . 'clients/view/'. ($this->get['client_id'] ?? ($this->get[0] ?? null)));\n }\n }\n\n // Ensure a valid client was given\n $client_id = ($this->get['client_id'] ?? ($this->get[0] ?? null));\n\n if (empty($client_id) || !($client = $this->Clients->get($client_id))) {\n $this->redirect($this->base_uri . 'clients/');\n }\n\n // Set filters from post input\n $post_filters = [];\n if (isset($this->post['filters'])) {\n $post_filters = $this->post['filters'];\n unset($this->post['filters']);\n\n foreach($post_filters as $filter => $value) {\n if (empty($value)) {\n unset($post_filters[$filter]);\n }\n }\n }\n\n // Get domains\n $status = ($this->get[1] ?? 'active');\n $page = (isset($this->get[2]) ? (int)$this->get[2] : 1);\n $sort = ($this->get['sort'] ?? 'date_added');\n $order = ($this->get['order'] ?? 'desc');\n\n $domains_filters = array_merge([\n 'client_id' => $client->id,\n 'status' => $status\n ], $post_filters);\n\n $domains = $this->DomainsDomains->getList($domains_filters, $page, [$sort => $order]);\n $total_results = $this->DomainsDomains->getListCount($domains_filters);\n\n // Set the number of domains of each type, not including children\n $status_count = [\n 'active' => $this->DomainsDomains->getStatusCount('active', $domains_filters),\n 'canceled' => $this->DomainsDomains->getStatusCount('canceled', $domains_filters),\n 'pending' => $this->DomainsDomains->getStatusCount('pending', $domains_filters),\n 'suspended' => $this->DomainsDomains->getStatusCount('suspended', $domains_filters)\n ];\n\n // Set the input field filters for the widget\n $filters = $this->getFilters($post_filters);\n $this->set('filters', $filters);\n $this->set('filter_vars', $post_filters);\n\n // Set view fields\n $this->set('client', $client);\n $this->set('status', $status);\n $this->set('domains', $domains);\n $this->set('status_count', $status_count);\n $this->set('actions', $this->getDomainActions());\n $this->set('widget_state', $this->widgets_state['main_domains'] ?? null);\n $this->set('sort', $sort);\n $this->set('order', $order);\n $this->set('negate_order', ($order == 'asc' ? 'desc' : 'asc'));\n\n $this->structure->set('page_title', Language::_('AdminMain.index.page_title', true, $client->id_code));\n\n // Set language for periods\n $periods = $this->Packages->getPricingPeriods();\n foreach ($this->Packages->getPricingPeriods(true) as $period => $lang) {\n $periods[$period . '_plural'] = $lang;\n }\n $this->set('periods', $periods);\n\n // Overwrite default pagination settings\n $settings = array_merge(\n Configure::get('Blesta.pagination'),\n [\n 'total_results' => $total_results,\n 'uri' => $this->base_uri . 'plugin/domains/admin_main/domains/' . $client->id . '/' . $status . '/[p]/',\n 'params' => ['sort' => $sort, 'order' => $order]\n ]\n );\n $this->setPagination($this->get, $settings);\n\n if ($this->isAjax()) {\n return $this->renderAjaxWidgetIfAsync(\n isset($this->get['client_id']) ? null : (isset($this->get[2]) || isset($this->get['sort']))\n );\n }\n }", "title": "" }, { "docid": "ecef74246319d421bd4cc0eac949a58b", "score": "0.6235242", "text": "public function getList()\n\t{\n\t\t$result = $this -> _api( array (\n\t\t\t'cpanel_jsonapi_apiversion' => 2,\n\t\t\t'cpanel_jsonapi_user' => $this -> _username,\n\t\t\t'cpanel_jsonapi_module' => 'AddonDomain',\n\t\t\t'cpanel_jsonapi_func' => 'listaddondomains'\n\t\t\t\t) );\n\t\t$json = json_decode( $result, true );\n// error found?\n\t\tif ( !isset( $json['cpanelresult']['data'] ) ) {\n\t\t\tthrow new Exception( \"cPanel: Can't get domains list!\" );\n\t\t}\n\t\treturn $json['cpanelresult']['data'];\n\t}", "title": "" }, { "docid": "9c705f5bb4108c31644b6e37576931e1", "score": "0.6225176", "text": "public function getDomainPaths() {\n return $this->domainPaths;\n }", "title": "" }, { "docid": "ee020572232a6fa43e4d278be1ab9ff8", "score": "0.6190354", "text": "public function get_domains($start = 0, $length = 10)\n\t{\n\t\treturn $this->db->query(\"SELECT DomainID, FrenchName, EnglishName FROM domains ORDER BY DomainID ASC LIMIT ?,?\", array($start, $length))->result();\n\t}", "title": "" }, { "docid": "1d37cf333f610b9612cb91bae15dbe0b", "score": "0.6171577", "text": "public static function getDomains()\r\n\t{\r\n\t\tif (empty(self::$domains)) {\r\n\t\t\tself::$domains = self::$model->getDomains();\r\n\t\t}\r\n\r\n\t\treturn self::$domains ?? false;\r\n\t}", "title": "" }, { "docid": "fd1c2f0948c96e7621e6ac8663729291", "score": "0.6147875", "text": "public function getDomains()\n {\n return $this->getContextUser()->getDomains();\n }", "title": "" }, { "docid": "8044401dfdeda65c94901c4474ded89f", "score": "0.61427337", "text": "public function objects()\n {\n return $this->hasMany(LdapObject::class, 'domain_id');\n }", "title": "" }, { "docid": "b4498058cffc8ea5b4f67fcfb3b312bf", "score": "0.6136043", "text": "public function index()\n {\n $domains = Domain::with('account', 'registrar')->paginate(25);\n\n return view('domains.index', compact('domains'));\n }", "title": "" }, { "docid": "3cc686775200cd90d8850e2acd283032", "score": "0.61032194", "text": "public function getDomains($viewId) {\n\t\t$cacheKey = tx_egovapi_utility_cache::getCacheKey(array(\n\t\t\t'method' => 'domains',\n\t\t\t'view' => $viewId,\n\t\t\t'language' => strtoupper($this->settings['eCHlanguageID']),\n\t\t\t'community' => $this->settings['eCHcommunityID'],\n\t\t\t'organization' => $this->settings['organizationID'],\n\t\t));\n\n\t\t$domains = $this->getCacheData($cacheKey);\n\t\tif ($domains === NULL) {\n\t\t\t$domains = $this->getWebService()->getDomains($viewId);\n\n\t\t\t$tags = array(\n\t\t\t\tsprintf('view-%s', $viewId),\n\t\t\t\tstrtoupper($this->settings['eCHlanguageID']),\n\t\t\t);\n\t\t\t$this->storeCacheData($cacheKey, $domains, $tags);\n\t\t}\n\n\t\treturn $domains;\n\t}", "title": "" }, { "docid": "812c456483f69f2e92aebfa412e23856", "score": "0.6072901", "text": "public function index()\n {\n $domains = Domain::all();\n\n return view('domain', ['domains' => $domains]);\n }", "title": "" }, { "docid": "a16305ecdaf2f879e3544771cfc29e26", "score": "0.604092", "text": "public function index()\n {\n if (Gate::denies('list-domain')) {\n abort(403);\n }\n\n $domain = Domain::all();\n\n return view('admin.backend.domains.list', ['domain' => $domain]);\n }", "title": "" }, { "docid": "884f696bf6d03a87ab5c40997afbe0cf", "score": "0.5978625", "text": "protected function getDomainRecordList()\n\t{\n\t\t$selfParams = [\n\t\t\t'Action' => 'DescribeDomainRecords',\n\t\t\t'DomainName' => $this->domain,\n\t\t\t'PageNumber' => 1,\n\t\t\t'PageSize' => 100,\n\t\t\t'RRKeyWord' => '%_acme-challenge',\n\t\t\t// https://help.aliyun.com/document_detail/29805.html\n\t\t\t'TypeKeyWord' => 'TXT',\n\t\t];\n\n\t\t$signature = $this->getSinagure($selfParams);\n\n\t\t$post = array_merge($this->getCommonParams(), $selfParams, ['Signature' => $signature]);\n\n\t\t$ret = $this->httpClient(self::ALI_NDS_URI .'?' .http_build_query($post));\n\t\t\n\t\t$jsonData = $this->dealHttpResponse($ret);\n\n\t\tif ($jsonData && isset($jsonData['DomainRecords'])\n\t\t && isset($jsonData['DomainRecords']['Record'])\n\t\t) {\n\t\t\t$jsonData = $jsonData['DomainRecords']['Record'];\n\t\t} else {\n\t\t\t$jsonData = [];\n\t\t}\n\n\t\treturn $jsonData;\n\t}", "title": "" }, { "docid": "1b153854c8f130e54a34ed9e81f5979d", "score": "0.5951512", "text": "public function trouverDomaines()\n\t{\n\t\treturn $this->modele->trouverDomaines();\n\t}", "title": "" }, { "docid": "5056d676dd6b70a5b94dce8e1402d6ba", "score": "0.59512866", "text": "public function getRecords($domain)\n {\n $client = $this->getClient();\n $response = $client->request('GET', sprintf(self::URI_ALL_RECORDS, $domain), [\n 'headers' => $this->getHeaders(),\n ]);\n return json_decode((string)$response->getBody(), true);\n }", "title": "" }, { "docid": "61c56f91b339fec7cec849c275e249fa", "score": "0.5949868", "text": "protected function getDomains() : array\n {\n return $this->getContext()->getConfig()->get( 'mshop/domains', [] );\n }", "title": "" }, { "docid": "e808172b4d56a43e23094e4dace089ac", "score": "0.59010535", "text": "public function getAll()\n\t{\n\t\treturn Director::all();\n\t}", "title": "" }, { "docid": "4d4cbe6d86525aa55008457f69de73e7", "score": "0.5881614", "text": "public function getAll(): Collection;", "title": "" }, { "docid": "4d4cbe6d86525aa55008457f69de73e7", "score": "0.5881614", "text": "public function getAll(): Collection;", "title": "" }, { "docid": "0efd25607a6b4eb2699bc196fd70eea8", "score": "0.5878185", "text": "public function index()\n {\n $domains = Domain::orderBy('name')->paginate(15);\n\n return view('domain.index', ['domains' => $domains]);\n }", "title": "" }, { "docid": "f1e722d0181c652d85ba110c46620b5d", "score": "0.58560914", "text": "public function getDomain();", "title": "" }, { "docid": "f1e722d0181c652d85ba110c46620b5d", "score": "0.58560914", "text": "public function getDomain();", "title": "" }, { "docid": "6a86c6536bcf023418b2bb79e6a98741", "score": "0.5854638", "text": "public function listUserDomains($options)\n {\n $params = $options;\n\n return $this->sendRequest(\n HttpMethod::GET,\n array(\n 'params' => $params,\n ),\n '/user/domains'\n );\n }", "title": "" }, { "docid": "548f4c3da95ee0090d397a2cad4c444b", "score": "0.58395356", "text": "public function getAll($environmentUuid): DomainsResponse\n {\n return new DomainsResponse(\n $this->client->request(\n 'get',\n \"/environments/${environmentUuid}/domains\"\n )\n );\n }", "title": "" }, { "docid": "fe0b39a7be8fe8eae0e8d9f0c3ba99f3", "score": "0.5832155", "text": "public function domains_domain_get_all_by_user($group_id = 0)\n\t{\n\t\ttry\n\t\t{\n\t\t\t$this->login();\n\t\t\treturn $this->get_empty($this->client->domains_get_all_by_user($this->session_id, $group_id));\n\t\t}\n\t\tcatch (SoapFault $e)\n\t\t{\n\t\t\treturn $this->get_error($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "7aefd910ea4f0f6d25530a00e8d8e6cd", "score": "0.57764053", "text": "public function index()\n {\n $domains = Domains::all();\n return view('domains.index')->with('domains', $domains);\n }", "title": "" }, { "docid": "630f8a264b73ac60cdfc1ba19ae41a31", "score": "0.5774973", "text": "public function index()\n {\n $domains = ApplicationDomain::paginate(25);\n return view('domains.index')->with([\"domains\" => $domains]);\n }", "title": "" }, { "docid": "4497b9666b7d16c30a5520aed58a0df4", "score": "0.5773722", "text": "public function getAll()\n {\n $model = new static::$model;\n\n $query = $model::with($model::$localWith);\n $this->qualifyCollectionQuery($query);\n $resources = $query->get();\n\n return $this->response->collection($resources, $this->getTransformer());\n }", "title": "" }, { "docid": "b72e89bb3ecd48d2b68cea42af2088e8", "score": "0.57686013", "text": "public function index()\n\t{\n\t\t$oDomain = Domain::paginate(27);\n\t\treturn View::make('domain.index')->with('domains', $oDomain)\n\t\t\t->with('menu', array('main' => 'domain', 'side_bar' => 'index'));\n\t}", "title": "" }, { "docid": "5e250925116ddaa6593217f35295d285", "score": "0.5756686", "text": "public function indexAction() {\n /** @var $entities Subdomain[] */\n $entities = $this\n ->_getRepository()\n ->findBy(array('domain' => $this->_getSelectedDomain()), array('subdomain' => 'asc'));\n\n return array(\n 'entities' => $entities,\n );\n }", "title": "" }, { "docid": "2a2c519de48a2cd466685747730f8dc2", "score": "0.5750379", "text": "public function getDomainRecords($name) {\n $action = $this->digitalOcean->domainRecord();\n // return a collection of Action entity\n $actions = $action->getAll($name); \n return $actions;\n }", "title": "" }, { "docid": "52cee0b4f0faeb2d67558e929861a3a7", "score": "0.5722626", "text": "public function domain();", "title": "" }, { "docid": "3ebaaa1b3c396b650f370fee4cbbdbdb", "score": "0.57136375", "text": "public function getAll()\n {\n // Check to see if this has already been done.\n if (is_array($this->dns_all) && count($this->dns_all) == 0) {\n $this->dns_all = $this->get(DNS_ALL);\n }\n if (count($this->dns_all) == 0) {\n $this->dns_all = false;\n }\n return $this->dns_all;\n }", "title": "" }, { "docid": "1a53f2caa17db6017a1529a7552615e0", "score": "0.57135093", "text": "public function index()\n {\n $domains = Domain::query()->orderBy('check_status', 'asc')->paginate(30);\n return response()->json(['code' => 200, 'data' => $domains]);\n }", "title": "" }, { "docid": "8034de46d8aa2bafb740da88e48a736c", "score": "0.5703311", "text": "public function index()\n {\n $domains = $this->domainRepository->search([])->get();\n return view('mail.domains.index', compact('domains'));\n }", "title": "" }, { "docid": "ef11e825e9247666898875cd21cc5bca", "score": "0.56888366", "text": "public function getDomainParts(): array\n {\n return $this->domainParts;\n }", "title": "" }, { "docid": "4891ac1931d1dd4a80fbaeec4b41ff86", "score": "0.568411", "text": "function get(Rage4Api $api)\r\n {\r\n $domain = self::fromName($api, $this->name);\r\n if (!$domain) $domain = $this->create($api);\r\n return $domain;\r\n }", "title": "" }, { "docid": "608bb5a1e3f8a7bfa2b6c943044b8bef", "score": "0.5675196", "text": "public function domains() {\n\t\n\t\tif( !empty( $this->domains ) && is_array( $this->domains ) ) {\n\t\t\tforeach( $this->domains as $domain )\n\t\t\t\t$this->add_domain( $domain );\n\t\t}\n\t\t\n\t\t$this->add_domain( site_url() );\n\t\t\n\t\tif( is_multisite() )\n\t\t\t$this->add_domain( network_site_url() );\n\t\n\t}", "title": "" }, { "docid": "5a1d0f35fcb6e05264c7e17bf3cdff02", "score": "0.5665588", "text": "public function getDomainsFromDatabase($company_id)\n {\n return DB::table('sites')->where('company_id', $company_id)->get();\n }", "title": "" }, { "docid": "1ee5194e0ce08a805b69e112d9c0baae", "score": "0.5659389", "text": "public static function get_domains_active() {\r\n\t \r\n\t $session = new Zend_Session_Namespace ( 'Admin' );\n\t $language_id = $session->langid;\r\n\t \r\n\t\treturn Doctrine_Query::create ()->select ( \"domain_id, dt.tld_id as tldid, CONCAT(domain, '.', ws.tld) as domain\" )\r\n\t\t\t\t\t\t\t\t\t\t->from ( 'Domains d' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.DomainsTlds dt' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'dt.WhoisServers ws' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.Customers c' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.Products p' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.Statuses s' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( \"p.ProductsData pd WITH pd.language_id = $language_id\" )\r\n\t\t\t\t\t\t\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\t}", "title": "" }, { "docid": "c50046f5cb8201823ee772fe5537c7ad", "score": "0.56336683", "text": "public function DomainTab()\n {\n $defaultDomain = $this->getDomain();\n $defaultDomainInfos = null;\n\n /* @var $response DomainIndexResponse */\n $response = $this->getCachedData('domains.index', null, 60 * self::SENDINGDOMAIN_CACHE_MINUTES);\n $domains = [];\n if ($response) {\n $domains = $response->getDomains();\n }\n\n /*\n 0 => Domain {#2919 ▼\n -createdAt: DateTimeImmutable @1573661800 {#2921 ▶}\n -smtpLogin: \"[email protected]\"\n -name: \"sandbox.mailgun.org\"\n -smtpPassword: \"some-pass-word\"\n -wildcard: false\n -spamAction: \"disabled\"\n -state: \"active\"\n }\n */\n\n $fields = new CompositeField();\n\n $list = new ArrayList();\n if ($domains) {\n foreach ($domains as $domain) {\n $time = 60 * self::SENDINGDOMAIN_CACHE_MINUTES;\n $showResponse = $this->getCachedData('domains.show', [$domain->getName()], $time);\n\n /*\n \"sending_dns_records\": [\n {\n \"record_type\": \"TXT\",\n \"valid\": \"valid\",\n \"name\": \"domain.com\",\n \"value\": \"v=spf1 include:mailgun.org ~all\"\n },\n {\n \"record_type\": \"TXT\",\n \"valid\": \"valid\",\n \"name\": \"domain.com\",\n \"value\": \"k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUA....\"\n },\n {\n \"record_type\": \"CNAME\",\n \"valid\": \"valid\",\n \"name\": \"email.domain.com\",\n \"value\": \"mailgun.org\"\n }\n ]\n */\n\n $dnsRecords = $showResponse->getOutboundDNSRecords();\n\n $spfOk = false;\n $dkimOk = false;\n\n foreach ($dnsRecords as $dnsRecord) {\n $value = $dnsRecord->getValue();\n if (strpos($value, 'v=spf1') !== false) {\n $spfOk = $dnsRecord->isValid();\n }\n if (strpos($value, 'k=rsa') !== false) {\n $dkimOk = $dnsRecord->isValid();\n }\n }\n\n $list->push(new ArrayData([\n 'Domain' => $domain->getName(),\n 'SPF' => $spfOk,\n 'DKIM' => $dkimOk,\n 'Verified' => ($domain->getState() == 'active') ? true : false,\n ]));\n\n if ($domain->getName() == $defaultDomain) {\n $defaultDomainInfos = $domain;\n }\n }\n }\n\n $config = GridFieldConfig::create();\n $config->addComponent(new GridFieldToolbarHeader());\n $config->addComponent(new GridFieldTitleHeader());\n $config->addComponent($columns = new GridFieldDataColumns());\n $columns->setDisplayFields(ArrayLib::valuekey(['Domain', 'SPF', 'DKIM', 'Verified']));\n $domainsList = new GridField('SendingDomains', _t('MailgunAdmin.ALL_SENDING_DOMAINS', 'Configured sending domains'), $list, $config);\n $domainsList->addExtraClass('mb-2');\n $fields->push($domainsList);\n\n if (!$defaultDomainInfos) {\n $this->InstallDomainForm($fields);\n } else {\n $this->UninstallDomainForm($fields);\n }\n\n return $fields;\n }", "title": "" }, { "docid": "50b9df2b7ed0aee440df5e07c600b597", "score": "0.56318426", "text": "public static function listDomains()\n {\n if (false === self::areEnabledDomainsLoadedByNginxConf()) {\n // tell the world that \"nginx.conf\" misses \"include domains.conf;\"\n exit(sprintf('<div class=\"error bold\" style=\"font-size: 13px; width: 500px;\">\n %snginx.conf does not include the config files of the domains-enabled folder.<br><br>\n Please add \"include domains-enabled/*;\" to \"nginx.conf\".</div>',\n WPNXM_DIR . '\\bin\\nginx\\conf\\\\'));\n }\n\n $enabledDomains = glob(WPNXM_DIR . '\\bin\\nginx\\conf\\domains-enabled\\*.conf');\n\n $disabledDomains = glob(WPNXM_DIR . '\\bin\\nginx\\conf\\domains-disabled\\*.conf');\n\n $domains = array();\n\n foreach ($enabledDomains as $idx => $file) {\n $domain = basename($file, '.conf');\n $domains[$domain] = array(\n 'fullpath' => $file,\n 'filename' => basename($file),\n 'enabled' => true\n );\n }\n\n foreach ($disabledDomains as $idx => $file) {\n $domain = basename($file, '.conf');\n $domains[$domain] = array(\n 'fullpath' => $file,\n 'filename' => basename($file),\n 'enabled' => false\n );\n }\n\n return $domains;\n }", "title": "" }, { "docid": "ddcdc1c293cf5d491b660bd2266a7f0f", "score": "0.5629568", "text": "public function all()\n {\n $dolls = Doll::orderby('name')->get();\n \n return response()->json($dolls, 200);\n }", "title": "" }, { "docid": "e2bf46a7bc29a1dc2c51f861fa27a1d2", "score": "0.5628613", "text": "public function domain() \n {\n return new Domain($this);\n }", "title": "" }, { "docid": "3d67fd159d33e57d59ee7d5ce250f6ac", "score": "0.56261235", "text": "public static function get_domains($items, $fields = \"*\", $orderby=\"domain\", $language_id=null) {\r\n\t\tif ( $language_id === null ) {\r\n\t\t\t$Session = new Zend_Session_Namespace ( 'Admin' );\r\n\t\t\t$language_id = $Session->langid;\r\n\t\t}\t\t\r\n\t\treturn Doctrine_Query::create ()->select ( $fields )\r\n\t\t\t\t\t\t\t\t\t\t->from ( 'Domains d' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.DomainsTlds dt' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'dt.WhoisServers ws' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.Customers c' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.Products p' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( 'd.Statuses s' )\r\n\t\t\t\t\t\t\t\t\t\t->leftJoin ( \"p.ProductsData pd WITH pd.language_id = \".intval($language_id) )\r\n\t\t\t\t\t\t\t\t\t\t->whereIn ( \"d.domain_id\", $items )\r\n ->addWhere( \"c.isp_id = ?\", Isp::getCurrentId() )\r\n\t\t\t\t\t\t\t\t\t\t->orderBy($orderby)\r\n\t\t\t\t\t\t\t\t\t\t->execute ( array (), Doctrine_Core::HYDRATE_ARRAY );\r\n\t}", "title": "" }, { "docid": "9658441421baccea578201f1aee3f64e", "score": "0.56100535", "text": "public function findAll()\n {\n // Remember the contacts query for a week\n return Cache::remember(\"contacts\", 10080, function () {\n return Contact::all();\n });\n }", "title": "" }, { "docid": "ae6e88fa7280182076c18c1319034447", "score": "0.5609641", "text": "public function getAllDrdrs()\n {\n if(Auth::user()->hasRole('administrator')){\n $drdrs = Drdr::with(['reviewer', 'approver', 'company'])->orderBy('id', 'desc')->get();\n }else{\n $drdrs = Drdr::with(['reviewer', 'approver', 'company'])\n ->whereIn('company_id', Auth::user()->companies->pluck('id'))->orderBy('id', 'desc')->get();\n }\n\n return $drdrs;\n }", "title": "" }, { "docid": "b51f38008cce938d00358f8465800c5b", "score": "0.5603981", "text": "function list_get() {\n\n // establish connection to MongoDB server\n $connection = new MongoClient();\n\n // select database\n $db = $connection->company;\n\n // select collection\n $collection = $db->persons;\n\n // retrieve all items in collection\n $cursor = $collection->find();\n\n if($cursor->hasNext())\n {\n $this->response(iterator_to_array($cursor));\n }\n\n // close connection\n $connection->close();\n }", "title": "" }, { "docid": "67ddf839970ebf312127945f38a6ec22", "score": "0.5603373", "text": "public function get_list($domain_id){\n $this->db->select('id, title');\n $this->db->where('domain_id', $domain_id);\n $this->db->where('user_id', $this->session->userdata('id'));\n return $categorys = parent::get();\n }", "title": "" }, { "docid": "fc027065c24ae24d3d783328071dfb1b", "score": "0.56017596", "text": "public function getHosts() {\n return $this->doRequest(\n 'GET_HOSTS',\n [\n 'domain' => $this->domain\n ]\n );\n }", "title": "" }, { "docid": "6c0f97129bec79baba0ead9f2306aa03", "score": "0.5594954", "text": "public function getCollections(){}", "title": "" }, { "docid": "14d219660dc7fb6d6b2424848d5ab73d", "score": "0.55932134", "text": "public function getSenderDomains(): SenderDomainCollection\n {\n $request = $this->createRequestForGetSenderDomains();\n $response = $this->handleResponse($this->getResponse($request), (string) $request->getBody(), $request->getMethod());\n\n return $this->serializer->deserialize($response, SenderDomainCollection::class, 'json');\n }", "title": "" }, { "docid": "63d1aaf4c8f4d0af15a343b167ef59b1", "score": "0.5585948", "text": "public function getDomainNames () {\n\t\t\t$psl = Mage::helper (\"cloudflare/publicSuffixList\");\n\t\t\t$selection = $this->getDomainName ();\n\t\t\t$domains = array ();\n\t\t\t$pslData = $this->refreshPSL ();\n\t\t\tforeach ( Mage::app ()->getWebsites () as $website ) {\n\t\t\t\tforeach ( $website->getGroups () as $group ) {\n\t\t\t\t\t$stores = $group->getStores ();\n\t\t\t\t\tforeach ( $stores as $store ) {\n\t\t\t\t\t\t$domain = $psl->extract ( $store->getBaseUrl (), $pslData ) [\"root_domain\"];\n\t\t\t\t\t\tarray_push ( $domains, $domain );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$domains = array_unique ( $domains );\n\t\t\tsort ( $domains );\n\t\t\t$domains = array_map ( function ( $domain ) use ( $selection ) {\n\t\t\t\treturn array (\n\t\t\t\t\t\"name\" => $domain,\n\t\t\t\t\t\"active\" => $domain == $selection,\n\t\t\t\t\t\"action\" => Mage::helper (\"adminhtml\")->getUrl (\n\t\t\t\t\t\t\"*/*/domain\",\n\t\t\t\t\t\tarray ( \"name\" => $domain )\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}, $domains );\n\t\t\treturn $domains;\n\t\t}", "title": "" }, { "docid": "2cd4ed821f6707246bb3a37d82d77143", "score": "0.555508", "text": "public function getCollections();", "title": "" }, { "docid": "b886da1e1b87cff9342c1ba46786b1c2", "score": "0.5536623", "text": "public function assembleDcs()\n {\n return $this->assembleRdns($this->schema->domainComponent(), $this->domainComponents);\n }", "title": "" }, { "docid": "2b63976dcab9e09d50e19467e9ba730c", "score": "0.552402", "text": "public function getAssignedDomains($tenant_id) {\n\t\treturn new DataResponse(\n\t\t\tArray(\n\t\t\t\t\"admin\" => Util::isAdmin(Util::currentUser()),\n\t\t\t\t\"domains\" => $this->tenantConfigManager->findAllWithKey($tenant_id, TenantConfigManager::DOMAIN)\n\t\t\t)\n\t\t); \n\t}", "title": "" }, { "docid": "2cd6055a4dbe35e23083e3c7c93f3c40", "score": "0.5507336", "text": "public function getDomainMenus($domains) {\n\t\t\n\t\t//If necessary, make the passed variable an array\n\t\tif (!is_array($domains)) {$domains = [$domains];}\n\n\t\t//Remove any http/https from the domains\n\t\tforeach ($domains as $curKey => $rawDomain) {\n\t\t\t$domains[$curKey] = preg_replace('#^https?://#', '', $rawDomain);\n\t\t}\n\n\t\t//Check the database to see if the menus exist there\n\t\t$databaseDomainMenus = $this->retrieveManyDomainMenusFromDatabase($domains);\n\n\t\t//Grab any exception menus. Merge the two arrays.\n\t\t//The merge will cause the original domains to be overwritten.\n\t\t$domainMenuExceptions = $this->retrieveMenuExceptions($domains);\n\t\t$databaseDomainMenus = array_merge($databaseDomainMenus, $domainMenuExceptions);\n\n\t\t//Loop through the domains and see if any don't exist in the database\n\t\t$missingDomains = array();\n\t\tforeach ($domains as $curDomain) {\n\n\t\t\t//Mark if the domain is not in the database finds.\n\t\t\tif (!array_key_exists($curDomain, $databaseDomainMenus)) {\n\t\t\t\t$missingDomains[] = $curDomain;\n\t\t\t}\n\t\t}\n\n\t\t//Grab the menus from the web, if necessary, and store them\n\t\t$webDomainMenus = array();\n\t\tif (count($missingDomains > 0)) {\n\n\t\t\t//Request the menus\n\t\t\t$webDomainMenus = $this->getRankedMenusFromManyURLs($missingDomains);\n\n\t\t\t//If any were found, insert them into the database\n\t\t\tif (count($webDomainMenus > 0)) {\n\t\t\t\t$this->insertDomainsWithMenus($webDomainMenus);\n\t\t\t}\n\t\t}\n\n\t\t//Merge the two sets of menu data and return it\n\t\t$finalDomainMenus = array_merge($databaseDomainMenus, $webDomainMenus);\n\t\treturn $finalDomainMenus;\n\t}", "title": "" }, { "docid": "95b87baf54442241ac7f1926822e0824", "score": "0.550038", "text": "public function children(?Domain $domain)\n {\n // If we don't use multi domains, find the first one\n if (!Uccello::useMultiDomains()) {\n $domain = Domain::firstOrFail();\n }\n\n $parentDomain = Domain::find(request('id'));\n\n return Cache::rememberForever('domains_'.$parentDomain->id.'_children_user_'.auth()->id(), function () use ($domain, $parentDomain) {\n $domains = [];\n if ($parentDomain) {\n foreach ($parentDomain->children()->orderBy('name')->get() as $_domain) {\n $formattedDomain = $this->getFormattedDomainToAdd($domain, $_domain);\n if ($formattedDomain) {\n $domains[] = $formattedDomain;\n }\n }\n }\n\n return $domains;\n });\n }", "title": "" }, { "docid": "b79be13b07f0e6dfdb738087bfbf928d", "score": "0.54965156", "text": "private static function get_available_domains() {\n\t\treturn array( Toolset_Element_Domain::POSTS );\n\t}", "title": "" }, { "docid": "cb56d5da8bf24d3fd06dae35ed0bd517", "score": "0.5493632", "text": "public function cek_domain($domain)\n {\n return $this->order->where('domain', $domain)->get();\n }", "title": "" }, { "docid": "d5fe24fa1abef7e44313769f45e00e2f", "score": "0.548988", "text": "public function index()\n {\n $companies = Company::paginate();\n \n return CompanyResource::collection($companies);\n }", "title": "" }, { "docid": "82a48e318db72b49461f69cd58e4b0ae", "score": "0.5478383", "text": "public function getDomainSettings($domain=DOMAIN_NAME){\r\n return Leo::getConfig($domain, 'domains');\r\n }", "title": "" }, { "docid": "254c13e2622f74225049d4f24e392eb8", "score": "0.54773027", "text": "public function getInternalDomains() {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('getInternalDomains', func_get_args()));\n }", "title": "" }, { "docid": "83288195178105dc1e033814b2ede662", "score": "0.5471267", "text": "function vpopmail_alias_get_all($domain){}", "title": "" }, { "docid": "1f89135e47f4a45bf0d6c1b05352019c", "score": "0.5464573", "text": "public function getWebHostingDomainNames()\n {\n return $this->call(self::SERVICE, 'getWebhostingDomainNames');\n }", "title": "" }, { "docid": "ef1942199c6192d57fb8cd2e954ec455", "score": "0.545774", "text": "public function readDomains($filename)\n {\n $full_path = $this->fileReader->makeFullPath($filename);\n if (!$this->fileReader->exists($full_path)) {\n throw new RuntimeException(\"File '{$full_path}' does not exists!\");\n }\n \n $lines = $this->fileReader->readLines($filename);\n \n $domains = [];\n \n foreach ($lines as $line) {\n if (empty($line)) {\n continue;\n }\n $domains[] = Domain::createFromLine($line);\n }\n \n return $domains;\n }", "title": "" } ]
c6f51249e80f20ebd87f03fb77ba3ce7
Independent Column Mapping. Keys are the real names in the table and the values their names in the application
[ { "docid": "171869c12b6ff76572e843caf9afb28c", "score": "0.7366001", "text": "public function columnMap()\n {\n return [\n 'id_usuario' => 'id_usuario',\n 'correo' => 'correo',\n 'contrasena' => 'contrasena',\n 'id_contacto' => 'id_contacto',\n 'id_rol' => 'id_rol'\n ];\n }", "title": "" } ]
[ { "docid": "8fad6076b1f963798ec5aeb90333a510", "score": "0.78487533", "text": "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'ID',\n 'dkv_id' =>'DKV_ID',\n\n 'application_id' => 'Application_ID',\n\n 'module_id' => 'Module_ID',\n );\n\n\n }", "title": "" }, { "docid": "0a1db8f5cbec1a88d30ee543039f9931", "score": "0.7728638", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'name' => 'name'\n ];\n }", "title": "" }, { "docid": "2ee35cdc60003ee51126786985456058", "score": "0.7521846", "text": "public function columnMap()\n {\n return [\n 'goods_id' => 'goods_id',\n 'key' => 'key',\n 'key_name' => 'key_name',\n 'price' => 'price',\n 'store_count' => 'store_count',\n 'bar_code' => 'bar_code',\n 'sku' => 'sku'\n ];\n }", "title": "" }, { "docid": "a0ade7c6b4f64210bfb4f55749602dc3", "score": "0.74359804", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'user_id' => 'user_id',\n 'store_name' => 'store_name',\n 'true_name' => 'true_name',\n 'qq' => 'qq',\n 'mobile' => 'mobile',\n 'store_img' => 'store_img',\n 'store_time' => 'store_time'\n ];\n }", "title": "" }, { "docid": "bfb992b6af87df7731ea4ad7f43017ec", "score": "0.74298024", "text": "public function columnMap()\r\n {\r\n return array(\r\n 'id' => 'id',\r\n 'activity_id' => 'activity_id',\r\n 'question' => 'question'\r\n );\r\n }", "title": "" }, { "docid": "c9fd17dd34f07254e4bf4c1eb5f7f53c", "score": "0.740852", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'id_recipe' => 'id_recipe',\n 'id_part' => 'id_part',\n 'position' => 'position'\n ];\n }", "title": "" }, { "docid": "6e95f8c9526c272120d2e8cc0ecb93e6", "score": "0.7403149", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'umeng_name' => 'umeng_name',\n 'app_id' => 'app_id',\n 'package_name' => 'package_name',\n 'app_type' => 'app_type',\n 'appkey' => 'appkey',\n 'mastersecret' => 'mastersecret',\n 'app_status' => 'app_status',\n 'create_at' => 'create_at',\n 'update_at' => 'update_at',\n 'is_delete' => 'is_delete'\n ];\n }", "title": "" }, { "docid": "d37baa89017ef28fb1b38f8b8f7b64d0", "score": "0.73923755", "text": "public function columnMap()\n {\n return [\n 'idUsuario' => 'idUsuario',\n 'nombre' => 'nombre',\n 'apellido' => 'apellido',\n 'correo' => 'correo',\n 'telefono' => 'telefono',\n 'celular' => 'celular',\n 'cedula' => 'cedula',\n 'idJerarquia' => 'idJerarquia',\n 'idRol' => 'idRol',\n 'idSesionAut' => 'idSesionAut'\n ];\n }", "title": "" }, { "docid": "de20eaa3855cfdc4a806b9eaed324b2a", "score": "0.7389128", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'path' => 'path',\n 'description' => 'description',\n 'name' => 'name',\n 'last_send' => 'last_send'\n ];\n }", "title": "" }, { "docid": "4f91d0d6c86d4252ef299e8da5cd75fd", "score": "0.7366765", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'type' => 'type',\n 'title' => 'title',\n 'brief' => 'brief',\n 'url' => 'url',\n 'user_id' => 'user_id',\n 'pic' => 'pic',\n 'helpcategory_id' => 'helpcategory_id'\n ];\n }", "title": "" }, { "docid": "d1a79d5037251baf4be72aae95674fda", "score": "0.7348125", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'descrizionestato' => 'descrizionestato',\n 'descrizionebreve' => 'descrizionebreve',\n 'colore' => 'colore',\n 'esadecimale' => 'esadecimale',\n ];\n }", "title": "" }, { "docid": "c5e8b158795dfcc7db5ed5ee63be30a8", "score": "0.73344684", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'admin_id' => 'admin_id',\n 'money' => 'money',\n 'type' => 'type',\n 'addtime' => 'addtime',\n 'log_type_id' => 'log_type_id',\n 'user_id' => 'user_id',\n 'user_name' => 'user_name'\n ];\n }", "title": "" }, { "docid": "2ad8d96a18ddb7acefa93042b8564748", "score": "0.7333129", "text": "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'ID',\n 'session_user_id' => 'Session_User_ID',\n 'token' => 'Token',\n 'application_id' => 'Application_ID',\n 'module_id' => 'Module_ID',\n 'action_id' => 'Action_ID',\n 'key_id' => 'Key_ID',\n 'key_user_id' => 'Key_User_ID',\n 'depts_id' => 'Depts_ID',\n 'source_id' => 'Source_ID',\n 'author_id' => 'Author_ID',\n 'request_data' => 'Request_Data',\n 'datetime' => 'DateTime',\n 'type_module' => 'Type_Module',\n 'base_url' => 'Bae_Url',\n 'mobile' => 'Mobile',\n 'mobile_type' => 'Mobile_Type',\n 'duration' => 'Duration',\n 'ip_id' => 'IP_ID',\n 'latitude' => 'Latitude',\n 'longitude' => 'Longitude',\n 'online' => 'Online'\n\n );\n }", "title": "" }, { "docid": "da899a48de939bd9a835dbcfcafe28c1", "score": "0.7321446", "text": "public function columnMap ()\n {\n return array(\n 'id' => 'id',\n 'course_id' => 'courseID',\n 'video_id' => 'videoID',\n 'order' => 'order'\n );\n }", "title": "" }, { "docid": "9e3c3d658fb735c105cfae31b10a1b75", "score": "0.73043674", "text": "public function columnMap()\n {\n return [\n 'Id' => 'Id',\n 'Ngaydat' => 'Ngaydat',\n 'Trolydat' => 'Trolydat',\n 'Id_dept' => 'Id_dept',\n 'Comman_trua' => 'Comman_trua',\n 'Phuman_trua' => 'Phuman_trua',\n 'Comchay_trua' => 'Comchay_trua',\n 'Chao_trua' => 'Chao_trua',\n 'Phuchay_trua' => 'Phuchay_trua',\n 'Comman_chieu' => 'Comman_chieu',\n 'Phuman_chieu' => 'Phuman_chieu',\n 'Phuchay_chieu' => 'Phuchay_chieu',\n 'Man_dem' => 'Man_dem',\n 'Chay_dem' => 'Chay_dem',\n 'Donbanrieng' => 'Donbanrieng',\n 'Buffet' => 'Buffet',\n 'Ghichu' => 'Ghichu'\n ];\n }", "title": "" }, { "docid": "0e6d7d9f3426b91ef855f96e60b381ae", "score": "0.729945", "text": "public function columnMap()\n {\n return array(\n 'cd_equipe' => 'cd_equipe',\n 'cod_dia' => 'cod_dia',\n 'dia' => 'dia',\n 'horario_entrada' => 'horario_entrada',\n 'ida_almoco' => 'ida_almoco',\n 'volta_almoco' => 'volta_almoco',\n 'horario_saida' => 'horario_saida'\n );\n }", "title": "" }, { "docid": "e974e07d3ce4559bda3ae02681c57364", "score": "0.728229", "text": "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'name' => 'name',\n 'passwd' => 'passwd',\n 'depart' => 'depart',\n 'active' => 'active',\n 'add_time' => 'add_time',\n 'update_time' => 'update_time',\n 'login_ip' => 'login_ip',\n 'login_time' => 'login_time'\n );\n }", "title": "" }, { "docid": "811d0e4b4a8d70a9ee838f8181bdf302", "score": "0.72770834", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'date' => 'date',\n 'user_code' => 'user_code',\n 'dept_code' => 'dept_code',\n 'lunch' => 'lunch',\n 'lunch_add' => 'lunch_add',\n 'lunch_veg' => 'lunch_veg',\n 'lunch_soup' => 'lunch_soup',\n 'lunch_veg_add' => 'lunch_veg_add',\n 'dinner' => 'dinner',\n 'dinner_add' => 'dinner_add',\n 'dinner_veg_add' => 'dinner_veg_add',\n 'supper' => 'supper',\n 'supper_veg' => 'supper_veg',\n 'separate_table' => 'separate_table',\n 'buffet' => 'buffet',\n 'note' => 'note',\n 'date_create' => 'date_create',\n 'date_modify' => 'date_modify',\n 'user_code_modify' => 'user_code_modify'\n ];\n }", "title": "" }, { "docid": "85734e3eaa7e962a515c4a98bbb9a705", "score": "0.72347516", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'meta_name' => 'meta_name',\n 'template' => 'template',\n 'data_limit' => 'data_limit',\n 'display' => 'display',\n 'prefixSite' => 'prefixSite'\n ];\n }", "title": "" }, { "docid": "4645919a7df38649bc2406a3293f9a9c", "score": "0.72310466", "text": "public function columnMap()\n {\n return [\n 'idJerarquia' => 'idJerarquia',\n 'idCompetencia' => 'idCompetencia'\n ];\n }", "title": "" }, { "docid": "b60439c8cb34d95d19d055ae0cd4ccc8", "score": "0.72272146", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'username' => 'username',\n 'password' => 'password',\n 'role_id' => 'role_id',\n 'merchant_id' => 'merchant_id',\n 'realname' => 'realname',\n 'phone' => 'phone',\n 'integral' => 'integral',\n 'add_at' => 'add_at',\n 'add_ip' => 'add_ip',\n 'update_at' => 'update_at',\n 'active' => 'active'\n ];\n }", "title": "" }, { "docid": "23c86b6de1c7718dd7214317294c42e6", "score": "0.72228914", "text": "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'format_id' => 'format_id',\n 'classification_id' => 'classification_id',\n 'genre_id' => 'genre_id',\n 'director_id' => 'director_id',\n 'actor_id' => 'actor_id',\n 'movie_name' => 'movie_name'\n );\n }", "title": "" }, { "docid": "2b9481540a99ceaa2ff11151fb264c72", "score": "0.72050935", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'followerId' => 'followerId',\n 'followingId' => 'followingId',\n 'createdAt' => 'createdAt',\n 'status' => 'status'\n ];\n }", "title": "" }, { "docid": "a164a736fa8607b4d677c4a87352d9b0", "score": "0.7204499", "text": "public function columnMap()\n {\n return array(\n 'cd_conn' => 'cd_conn',\n 'cd_nfe' => 'cd_nfe'\n );\n }", "title": "" }, { "docid": "e82c77e13a694a3fbd237bf193015559", "score": "0.7183373", "text": "public function columnMap()\n {\n return array(\n 'business_id' => 'business_id',\n 'phone' => 'phone',\n 'real_name' => 'real_name',\n 'id_card' => 'id_card',\n 'region_id' => 'region_id',\n 'city_id' => 'city_id',\n 'user_id' => 'user_id',\n 'is_del' => 'is_del',\n 'create_time' => 'create_time'\n );\n }", "title": "" }, { "docid": "1bdb966b5b39b9b06ee6165206550316", "score": "0.71808213", "text": "public function columnMap()\n {\n return array(\n 'idfechamento' => 'idfechamento',\n 'cd_servico' => 'cd_servico',\n 'periodo_inicial' => 'periodo_inicial',\n 'periodo_final' => 'periodo_final',\n 'criado' => 'criado'\n );\n }", "title": "" }, { "docid": "a484b4060955f9e7e468676b2db01b23", "score": "0.7176487", "text": "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'name' => 'name',\n 'place_id' => 'place_id',\n 'place_kind' => 'place_kind',\n 'lang' => 'lang',\n 'created_at' => 'created_at',\n 'updated_at' => 'updated_at'\n );\n }", "title": "" }, { "docid": "defd2d37d08ac6c72851f32172456f02", "score": "0.716945", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'id_user'=>'id_user',\n 'token' => 'token',\n 'ip' => 'ip',\n 'user_agent' => 'user_agent',\n 'date_add' => 'date_add'\n ];\n }", "title": "" }, { "docid": "50e1d85e3252bf11509b98dbaab7c58d", "score": "0.7156488", "text": "public function columnMap()\n {\n return array(\n 'cd_servico' => 'cd_servico',\n 'cd_conhecimento_transporte' => 'cd_conhecimento_transporte',\n 'nome' => 'nome',\n 'valor' => 'valor'\n );\n }", "title": "" }, { "docid": "82ea3268bd33f3c63990d85c37868d8e", "score": "0.71357995", "text": "function mappingColumns()\n {\n $mapped_columns = array(\n \"url\" => 1,\n \"iframe\" => 0,\n \"preview\" => 9,\n \"thumbs\" => 10,\n \"title\" => 5,\n \"tags\" => 2, // los tags vienen tan mal, que prefiero usar las categorías aunq repetidas\n \"categories\" => 2,\n \"duration\" => 7,\n \"views\" => 8,\n \"likes\" => false,\n \"unlikes\" => 10,\n \"pornstars\" => 8,\n );\n\n return $mapped_columns;\n }", "title": "" }, { "docid": "08db5a1a4a09b636a6817d52e95d59d2", "score": "0.71278816", "text": "public function columnMap()\n {\n //the values their names in the application\n return array(\n 'id' => 'ID',\n 'module_id' => 'Module_ID',\n 'toggle_grid' => 'Toggle_Grid',\n 'has_orders' => 'Has_Orders',\n 'has_media' =>'Has_Media',\n 'img' =>'Img',\n 'content_img' =>'Content_Img',\n 'content_stat_img' =>'Content_Stat_Img',\n 'module_banner'=>'Module_Banner',\n 'content_banner'=>'Content_Banner',\n 'content_edit_banner'=>'Content_Edit_Banner',\n 'kv_price_param'=>'kv_price_param',\n 'export_fields_json' => 'export_fields_json',\n 'import_export_enabled' => 'import_export_enabled',\n 'extra_fields' => 'extra_fields',\n 'has_tags'=>'has_tags'\n );\n\n\n }", "title": "" }, { "docid": "0999635c1c72f28e4042c24377528afa", "score": "0.71215945", "text": "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'keywordable_type' => 'keywordable_type',\n 'keywordable_id' => 'keywordable_id',\n 'keywords' => 'keywords',\n 'updated_at'=>'updated_at',\n 'created_at'=>'created_at'\n );\n }", "title": "" }, { "docid": "1b26b52635362c3e5dc4e008aae9949e", "score": "0.71031326", "text": "function mappingColumns()\n {\n $mapped_columns = array(\n \"id\" => 0,\n \"url\" => 1,\n \"iframe\" => 11,\n \"description\"=> 3,\n \"preview\" => 4,\n \"thumbs\" => 5,\n \"title\" => 2,\n \"tags\" => 9,\n \"categories\" => 8,\n \"duration\" => 6,\n \"views\" => false,\n \"likes\" => false,\n \"unlikes\" => false,\n \"pornstars\" => false,\n );\n\n return $mapped_columns;\n }", "title": "" }, { "docid": "910190a4e1bf6607ecffc65f4245d7ba", "score": "0.7100578", "text": "public function columnMap()\n {\n return [\n 'user_id' => 'user_id',\n 'shop_name' => 'shop_name',\n 'shop_level' => 'shop_level',\n 'shop_intro' => 'shop_intro',\n 'shop_logo' => 'shop_logo',\n 'shop_phone' => 'shop_phone',\n 'shop_qq' => 'shop_qq',\n 'shop_theme' => 'shop_theme'\n ];\n }", "title": "" }, { "docid": "306d17ae6114c9a8a01b8e9c7efa2b93", "score": "0.70937055", "text": "public function columnMap()\n {\n return array(\n 'id' => 'id',\n 'languagecode' => 'languagecode',\n 'articleid' => 'articleid',\n 'title' => 'title_translation',\n 'content' => 'content',\n 'createuser' => 'createuser',\n 'modifyuser' => 'modifyuser',\n 'createdate' => 'createdate',\n 'modifydate' => 'modifydate'\n );\n }", "title": "" }, { "docid": "4573b0c99ee810baa13a3a7a8493c21b", "score": "0.7089391", "text": "public function columnMap()\n {\n return array(\n 'idfechamento' => 'idfechamento',\n 'cd_empresa' => 'cd_empresa',\n 'cd_portador' => 'cd_portador',\n 'dataFechamento' => 'dataFechamento',\n 'dataInicioPeriodo' => 'dataInicioPeriodo',\n 'dataFimPeriodo' => 'dataFimPeriodo',\n 'responsavel' => 'responsavel'\n );\n }", "title": "" }, { "docid": "2465b5e4763bc102c067056da56aee44", "score": "0.7075069", "text": "public function columnMap()\n {\n return array(\n 'id' => 'id', \n 'user_id' => 'userId', \n 'deal_id' => 'dealId', \n 'amount' => 'amount', \n 'pay_sp_id' => 'paySpId', \n 'status' => 'status', \n 'ctime' => 'ctime', \n 'mtime' => 'mtime', \n );\n }", "title": "" }, { "docid": "42b81595049e8985dc6f8a9f6add240a", "score": "0.707322", "text": "public function columnMap()\n {\n return array(\n 'cd_cargo' => 'cd_cargo',\n 'cd_empresa' => 'cd_empresa',\n 'nome' => 'nome',\n 'id_ocupacao' => 'id_ocupacao',\n 'criado' => 'criado',\n 'modificado' => 'modificado'\n );\n }", "title": "" }, { "docid": "ec57e5017e576806af6c5ec1b4c02760", "score": "0.7028482", "text": "public function columnMap()\n {\n return array(\n 'cd_tipo_funcionario' => 'cd_tipo_funcionario',\n 'descricao' => 'descricao',\n 'funcionario_producao' => 'funcionario_producao'\n );\n }", "title": "" }, { "docid": "0707d1411913b71988c5b90abac0bf7f", "score": "0.6988454", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'name' => 'name',\n 'slug' => 'slug',\n 'type' => 'type',\n 'featured' => 'featured',\n 'price' => 'price',\n 'sale_price' => 'salePrice',\n 'sku' => 'sku',\n 'description' => 'description',\n 'short_description' => 'shortDescription',\n 'on_sale' => 'onSale',\n 'weight' => 'weight',\n 'categories' => 'categories',\n 'tags' => 'tags',\n 'images' => 'images',\n 'stock_status' => 'stockStatus',\n 'status' => 'status',\n 'user_id' => 'userId',\n 'created_at' => 'createdAt',\n 'updated_at' => 'updatedAt'\n ];\n }", "title": "" }, { "docid": "f47eedd2224cfb06d6636ad359eb3bc9", "score": "0.6987565", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'farmer_id' => 'farmerId',\n 'farmer_crop_id' => 'farmerCropId',\n 'quantity' => 'quantity',\n 'quantity_unit_id' => 'quantityUnitId',\n 'quantity_balance' => 'quantityBalance',\n 'transaction_date' => 'transactionDate',\n 'memo' => 'memo',\n 'added_on' => 'addedOn'\n ];\n }", "title": "" }, { "docid": "04145cb5f11f1ba7f7c64f2b20007100", "score": "0.6946567", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'listid' => 'listid',\n 'listName' => 'listName',\n 'subscribed' => 'subscribed',\n 'unsubscribed' => 'unsubscribed',\n 'cleaned' => 'cleaned',\n 'last_send' => 'last_send',\n 'last_sub' => 'last_sub',\n 'last_unsub' => 'last_unsub',\n 'phpjson' => 'phpjson'\n ];\n }", "title": "" }, { "docid": "ae9daac2dcb1aca05f02a2317be5739d", "score": "0.6920608", "text": "public function columnMap()\n {\n return array(\n 'iddesconto' => 'iddesconto',\n 'cond_pagto_idcond_pagto' => 'cond_pagto_idcond_pagto',\n 'percentual' => 'percentual',\n 'criado' => 'criado',\n 'modificado' => 'modificado',\n 'ativo' => 'ativo',\n 'produtoArea_idprodutoArea' => 'produtoArea_idprodutoArea',\n 'aplicarDescontoCliente' => 'aplicarDescontoCliente'\n );\n }", "title": "" }, { "docid": "5747efa3fc937c943fa9666a3744fa0a", "score": "0.6903387", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'merchant_name' => 'merchantName',\n 'contact_first_name' => 'contactFirstName',\n 'contact_last_name' => 'contactLastName',\n 'phone_number' => 'phoneNumber',\n 'mobile_number' => 'mobileNumber',\n 'address' => 'address',\n 'taluka_id' => 'talukaId',\n 'district_id' => 'districtId',\n 'state_id' => 'stateId',\n 'pin_code' => 'pinCode',\n 'is_active' => 'isActive',\n 'added_on' => 'addedOn'\n ];\n }", "title": "" }, { "docid": "26a577728c8d6126a20ef303c8736fb0", "score": "0.6879672", "text": "public function getColumnFieldMapping(){\n\t\t$moduleMeta = $this->getModuleMeta();\n\t\t$meta = $moduleMeta->getMeta();\n\t\t$fieldColumnMapping = $meta->getFieldColumnMapping();\n\t\treturn array_flip($fieldColumnMapping);\n\t}", "title": "" }, { "docid": "0a9942d21a4498254d2b87c4e90b8a7d", "score": "0.6851729", "text": "public function columnMap()\n {\n return array(\n 'cd_arquivo' => 'cd_arquivo',\n 'descricao' => 'descricao',\n 'titulo' => 'titulo',\n 'nome' => 'nome',\n 'tamanho' => 'tamanho',\n 'arquivo' => 'arquivo',\n 'miniatura' => 'miniatura',\n 'mimetype' => 'mimetype',\n 'oculto' => 'oculto',\n 'download' => 'download',\n 'aberto' => 'aberto',\n 'ativo' => 'ativo',\n 'criado' => 'criado',\n 'modificado' => 'modificado'\n );\n }", "title": "" }, { "docid": "0bfc37fcf13342fc788ac99afda56c66", "score": "0.66771954", "text": "public function columnMap()\n {\n return array(\n 'video_id' => 'id',\n 'videoUploader' => 'uploader',\n 'videoLength' => 'length',\n 'videoThumb' => 'thumb',\n 'videoFilename' => 'filename',\n 'videoIsVerified' =>'verified',\n 'videoUploadedAt' =>'uploadedAt'\n );\n }", "title": "" }, { "docid": "f198003f3206dc91ec2d180b4ca9fd91", "score": "0.651531", "text": "public function getAllColumnsForMapping()\n\t{\n\t\t$columns = $this->getModelsMetaData()->getAttributes($this);\n\t\t$result = array();\n\t\t\n\t\tforeach ($columns as $col) {\n\t\t\t$result[$col] = $col;\n\t\t}\n\t\t\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "6e821cc57a4a8620731396d766b4a9aa", "score": "0.631526", "text": "public function columnMap()\n {\n return [\n 'id' => 'id',\n 'name' => 'name',\n 'cate_id' => 'cate_id',\n 'child_cate' => 'child_cate',\n 'label' => 'label',\n 'brand' => 'brand',\n 'unit' => 'unit',\n 'number' => 'number',\n 'price' => 'price',\n 'member_price' => 'member_price',\n 'preferential_price' => 'preferential_price',\n 'color' => 'color',\n 'size' => 'size',\n 'weight' => 'weight',\n 'type' => 'type',\n 'material' => 'material',\n 'origin' => 'origin',\n 'create_at' => 'create_at',\n 'describe' => 'describe',\n 'style' => 'style',\n 'thickness' => 'thickness',\n 'fashion' => 'fashion',\n 'is_love' => 'is_love',\n 'integral' => 'integral',\n 'freight' => 'freight',\n 'free_area' => 'free_area',\n 'merchant_id' => 'merchant_id',\n 'img' => 'img',\n 'keyword' => 'keyword',\n 'content' => 'content',\n 'is_hot' => 'is_hot',\n 'is_new' => 'is_new',\n 'is_recommend' => 'is_recommend',\n 'sort' => 'sort',\n 'send_num' => 'send_num',\n 'add_at' => 'add_at',\n 'update_at' => 'update_at',\n 'active' => 'active'\n ];\n }", "title": "" }, { "docid": "88239e987224bedfd6bfd6c409087e00", "score": "0.6259918", "text": "public function Mapping(){\n\t\t$this->map_table_names['l_main'] = 'rp_special_listing_schedule';\n\t\t$this->map_table_names['l_dates'] = 'rp_special_listing_schedule_dates';\n\t\t$this->map_table_names['l_object'] = 'rp_special_listing_schedule_objects';\n\t\t$this->map_table_names['l_cities'] = 'rp_special_listing_schedule_to_cities';\n\t\t$this->map_table_names['l_images'] = 'rp_special_project_month_images';\n\t\t$this->map_table_names['l_mlp_property'] = 'rp_special_listing_mlp_featured_properties';\n\t\t\n\t\t$this->map_table_names['c_main'] = 'rp_campaigns';\n\t\t$this->map_table_names['c_inv_types'] = 'rp_dbho_inventorytype';\n\t\t$this->map_table_names['c_inv_master'] = 'rp_dbho_inventorymaster';\n\t\t$this->map_table_names['c_inv_log'] = 'rp_dbho_inventory_log';\n\t\t$this->map_table_names['c_inv_consumption'] = 'rp_dbho_planinventoryconsumption';\n\t\t$this->map_table_names['c_inv_consumption_dates'] = 'rp_dbho_planinventoryconsumptiondates';\n\t\t$this->map_table_names['c_test'] = 'test';\n\t}", "title": "" }, { "docid": "3071cf26c28da9c2a41e18833c23e6f3", "score": "0.6195723", "text": "private function _field_map(){\n\t\t$table = TableRegistry::get($this->source());\n\t\treturn $table->field_map();\n\t}", "title": "" }, { "docid": "293cb8f40d9b22438f6c3e780feb84c5", "score": "0.6155526", "text": "public function columnMap()\n {\n return array(\n 'cd_nfdsaida_item' => 'cd_nfdsaida_item',\n 'nfsaida_cd_nfsaida' => 'nfsaida_cd_nfsaida',\n 'cd_produto' => 'cd_produto',\n 'descricao' => 'descricao',\n 'ncm' => 'ncm',\n 'cst' => 'cst',\n 'cfop' => 'cfop',\n 'unidade_medida' => 'unidade_medida',\n 'quantidade' => 'quantidade',\n 'vl_unitario' => 'vl_unitario',\n 'vl_total' => 'vl_total',\n 'bc_icms' => 'bc_icms',\n 'vl_icms' => 'vl_icms',\n 'vl_ipi' => 'vl_ipi',\n 'icms' => 'icms',\n 'ipi' => 'ipi',\n 'sequencia_nota' => 'sequencia_nota',\n 'baseCalculoICMS_ST' => 'baseCalculoICMS_ST',\n 'valorICMS_ST' => 'valorICMS_ST',\n 'cstCofins' => 'cstCofins',\n 'cstPIS' => 'cstPIS',\n 'vl_desc' => 'vl_desc',\n 'vl_seguro' => 'vl_seguro',\n 'vl_frete' => 'vl_frete',\n 'vl_outro' => 'vl_outro',\n 'vBCSTRet' => 'vBCSTRet',\n 'vICMSSTRet' => 'vICMSSTRet',\n 'vBCSTDest' => 'vBCSTDest',\n 'vICMSSTDest' => 'vICMSSTDest',\n 'CSOSN' => 'CSOSN',\n 'pCredSN' => 'pCredSN',\n 'vCredICMSSN' => 'vCredICMSSN',\n 'ipi_CNPJProd' => 'ipi_CNPJProd',\n 'ipi_cSelo' => 'ipi_cSelo',\n 'ipi_qSelo' => 'ipi_qSelo',\n 'ipi_qUnid' => 'ipi_qUnid',\n 'ipi_vUnid' => 'ipi_vUnid',\n 'ipi_vIPI' => 'ipi_vIPI',\n 'cofins_VCOFINS' => 'cofins_VCOFINS',\n 'ii_vDespAdu' => 'ii_vDespAdu',\n 'ii_vII' => 'ii_vII',\n 'ii_vIOF' => 'ii_vIOF',\n 'pis_cst' => 'pis_cst',\n 'pis_pPIS' => 'pis_pPIS',\n 'pis_vPIS' => 'pis_vPIS',\n 'pis_qBCProd' => 'pis_qBCProd',\n 'pis_vAliqProd' => 'pis_vAliqProd',\n 'cofins_cst' => 'cofins_cst',\n 'cofins_qBCProd' => 'cofins_qBCProd',\n 'cofins_vAliqProd' => 'cofins_vAliqProd',\n 'cofins_pCOFINS' => 'cofins_pCOFINS',\n 'ean' => 'ean'\n );\n }", "title": "" }, { "docid": "86284cc56a649997416f94f00e6cb85c", "score": "0.61518586", "text": "protected function defineLazyTableMap()\n {\n return [\n 'Title' => 'Title',\n 'Protected' => 'Protected',\n 'Params' => 'Params'\n ];\n }", "title": "" }, { "docid": "7ff6ce2b01c8ee286236181b1782ac5e", "score": "0.6063007", "text": "abstract public function getColumnMeta();", "title": "" }, { "docid": "2a399e46b0b597b74f17e0813ee8a8a0", "score": "0.5985332", "text": "private function columns() {\n return array(\n \"id\" => array( 'type'=>\"int\", 'length'=>\"10\", 'default'=> '' ),\n \"name\" => array( 'type'=>\"varchar\", 'length'=>\"200\", 'default'=> '' ),\n );\n }", "title": "" }, { "docid": "cb32f7e3e5aa1f1380a2973b632966e1", "score": "0.59565353", "text": "public function get_column_names()\r\n\t{\r\n\t\treturn array_keys( Crud::$cached_column_name_map_by_table_name[$this->table_name] );\r\n\t}", "title": "" }, { "docid": "609fc93f9595f4c12d6911abc4cb2e86", "score": "0.5935497", "text": "private function setColumnsFromOther(): void\n {\n $columns = DB::connection()->getSchemaBuilder()->getColumnListing($this->table);\n\n foreach ($columns as $column_name) {\n $DoctrineColumn = DB::connection()->getDoctrineColumn($this->getTable(), $column_name);\n\n $this->columns[$column_name] = [\n 'name' => $column_name,\n 'type' => $DoctrineColumn->getType()->getName(),\n 'default' => $DoctrineColumn->getDefault(),\n 'length' => $DoctrineColumn->getLength(),\n 'values' => null,\n ];\n $this->valid_columns[$column_name] = $column_name;\n }\n }", "title": "" }, { "docid": "e20ecd4fe8f97474a6056fcf22d35271", "score": "0.5933985", "text": "public function mappings()\n {\n return [\n 'id' => 'identifier',\n 'name' => 'title',\n ];\n }", "title": "" }, { "docid": "79a085049029a5de069b8221c99be7c1", "score": "0.5931669", "text": "protected function defineTableMap()\n {\n return [\n 'ComponentID' => 'ID',\n 'ApplicationID' => 'ApplicationID',\n 'AccessLevelID' => 'AccessLevelID',\n 'AssetID' => 'AssetID',\n 'Component' => 'Component',\n 'Position' => 'Position',\n 'blStatus' => 'blStatus',\n ];\n }", "title": "" }, { "docid": "34a82386cbf9e57eeab6668dc2d52376", "score": "0.59263897", "text": "public function columnMap()\n {\n return array(\n 'goods_id' => 'goods_id',\n 'cat_id' => 'cat_id',\n 'goods_sn' => 'goods_sn',\n 'goods_name' => 'goods_name',\n 'goods_name_style' => 'goods_name_style',\n 'click_count' => 'click_count',\n 'brand_id' => 'brand_id',\n 'provider_name' => 'provider_name',\n 'goods_number' => 'goods_number',\n 'goods_weight' => 'goods_weight',\n 'market_price' => 'market_price',\n 'shop_price' => 'shop_price',\n 'promote_price' => 'promote_price',\n 'promote_start_date' => 'promote_start_date',\n 'promote_end_date' => 'promote_end_date',\n 'warn_number' => 'warn_number',\n 'keywords' => 'keywords',\n 'goods_brief' => 'goods_brief',\n 'goods_desc' => 'goods_desc',\n 'goods_thumb' => 'goods_thumb',\n 'goods_img' => 'goods_img',\n 'original_img' => 'original_img',\n 'is_real' => 'is_real',\n 'extension_code' => 'extension_code',\n 'is_on_sale' => 'is_on_sale',\n 'is_alone_sale' => 'is_alone_sale',\n 'is_shipping' => 'is_shipping',\n 'integral' => 'integral',\n 'add_time' => 'add_time',\n 'sort_order' => 'sort_order',\n 'is_delete' => 'is_delete',\n 'is_best' => 'is_best',\n 'is_new' => 'is_new',\n 'is_hot' => 'is_hot',\n 'is_promote' => 'is_promote',\n 'bonus_type_id' => 'bonus_type_id',\n 'last_update' => 'last_update',\n 'goods_type' => 'goods_type',\n 'seller_note' => 'seller_note',\n 'give_integral' => 'give_integral',\n 'rank_integral' => 'rank_integral',\n 'suppliers_id' => 'suppliers_id',\n 'is_check' => 'is_check'\n );\n }", "title": "" }, { "docid": "1cbcebc46461379ed5ede4a2c3f91bb4", "score": "0.5900388", "text": "public function inputColDefinitions()\n {\n //col definition for petID\n $this->setCols('studentID', 'INTEGER', null, true, false, true);\n //col definition for petName\n $this->setCols('familyName', 'VARCHAR', 10, false, false, false);\n //col definition for petAge\n $this->setCols('givenName', 'INTEGER', 100,false, false, false);\n //col definition for petNickName -NOTE this field can be nullable\n $this->setCols('preferredName', 'VARCHAR', 10, false, true, false);\n $this->setCols('userName', 'VARCHAR', 10, false, false, false);\n\n\n\n }", "title": "" }, { "docid": "9f434372384d4af9b3ff5325c6448e08", "score": "0.5844928", "text": "abstract public function getColumnNames();", "title": "" }, { "docid": "0bf5548fe46e9400ffce9723432ea2c7", "score": "0.5829883", "text": "abstract public static function columns();", "title": "" }, { "docid": "5b32e8b00270c168ffd2265bf6c2c92c", "score": "0.582933", "text": "public function getPrimaryKeyColumnName(): string;", "title": "" }, { "docid": "780043bc51859757a8993f247abeced2", "score": "0.57598704", "text": "public static function getPrimaryKeyColumnNames();", "title": "" }, { "docid": "99d614aff3d8bb483036a3cb9f0e8416", "score": "0.5735844", "text": "private function sql_column_name_value_pairs() {\n \n $list = \"\";\n foreach ($this->GAME_TABLE_COLUMNS as $item) {\n if ($item == \"stamp\") { # stamp must be null for auto-update\n $list = $list . \"$item = NULL, \";\n } else {\n $list = $list . \"$item = \\\"{$this->$item}\\\", \";\n }\n }\n $list = rtrim($list, \", \");\n dbg(\"=\".__METHOD__.\"=$list\");\n return $list;\n }", "title": "" }, { "docid": "c2b3f2bf51c6c012faf5b7d1e068b69e", "score": "0.573573", "text": "protected function get_crud_table_columns()\n {\n return array(\n 'id' => '%d',\n 'name' => '%s',\n 'created' => '%s',\n 'update' => '%s',\n 'data' => '%s',\n );\n }", "title": "" }, { "docid": "4f780a58688f66ee187f95e827702d2a", "score": "0.57230806", "text": "public function column_name();", "title": "" }, { "docid": "36805f874c8ed6cda11f0f8203166b52", "score": "0.5671216", "text": "static public function resolveColumnNamesAndValues($maps, $entity, $originalTable = null, &$columnNamesAndValues = array())\r\n {\r\n $mapsIndex = self::getMapsNameFromEntityObject($entity, $maps);\r\n \r\n // This is the name of the table that the current object\r\n // we are looking at belongs to. We need to compare this\r\n // to original table to decide what to do.\r\n $currentTable = $maps[$mapsIndex]['table'];\r\n \r\n if(!$originalTable)\r\n {\r\n // this will be the table that the VO we care about is stored in\r\n // we check all future values to make sure they belong to this table.\r\n // on the first pass we pull it out, and then on subsequent passes\r\n // it should come in through the function call.\r\n $originalTable = $currentTable;\r\n }\r\n\r\n foreach($maps[$mapsIndex]['maps'] as $mapsHelper)\r\n {\r\n switch(get_class($mapsHelper))\r\n {\r\n case 'DataAccess\\DataMapper\\Helpers\\VOMapsHelper':\r\n $accessor = $mapsHelper->getAccessor();\r\n $VO = $entity->{$accessor}();\r\n self::resolveColumnNamesAndValues($maps, $VO, $originalTable, $columnNamesAndValues);\r\n break;\r\n case 'DataAccess\\DataMapper\\Helpers\\VarcharMapsHelper':\r\n case 'DataAccess\\DataMapper\\Helpers\\IntMapsHelper':\r\n //is plain value.\r\n \r\n if($currentTable == $originalTable)\r\n {\r\n //It also keeps values in our table. Saving.\r\n $accessor = $mapsHelper->getAccessor();\r\n $value = $entity->{$accessor}();\r\n \r\n $columnNamesAndValues[$mapsHelper->getColumnName()] = $value;\r\n } else {\r\n //It does not store values in our table\r\n //TODO: Should I try check if our table references the id of the record in the other table?\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return $columnNamesAndValues;\r\n }", "title": "" }, { "docid": "afb66061e552b56e4e82b339ce50a3e5", "score": "0.5663927", "text": "public static function columns()\n\t{\n\t\t$selfName = get_called_class();\n\t\t$tableName = $selfName::$tableName;\n\t\t$model = new $selfName(null);\n\t\t$_columns = $selfName::$columns;\n\t\t$model = null;\n\t\t\n\t\t$columns = array();\n\t\tforeach (array_keys($_columns) as $columnName) {\n\t\t\t$columnName = $tableName . \".$columnName\";\n\t\t\tarray_push($columns, $columnName);\n\t\t}\n\t\t\n\t\treturn array_keys($columns);\n\t}", "title": "" }, { "docid": "72d2396832db73ee6cc7f65d4b667ef1", "score": "0.56604695", "text": "function &MetaColumnNames($table, $numIndexes=false) \r\n\t{\r\n\t\t$objarr =& $this->MetaColumns($table);\r\n\t\tif (!is_array($objarr)) {\r\n\t\t\t$false = false;\r\n\t\t\treturn $false;\r\n\t\t}\r\n\t\t$arr = array();\r\n\t\tif ($numIndexes) {\r\n\t\t\t$i = 0;\r\n\t\t\tforeach($objarr as $v) $arr[$i++] = $v->name;\r\n\t\t} else\r\n\t\t\tforeach($objarr as $v) $arr[strtoupper($v->name)] = $v->name;\r\n\r\n\t\treturn $arr;\r\n\t}", "title": "" }, { "docid": "764521ad55f893750be0f8935e5db3a5", "score": "0.56599426", "text": "public static function getItemKeyFor($tableName, $columnName) {\n return trim($tableName) . '_' . trim($columnName);\n }", "title": "" }, { "docid": "dd432aa062a46d5a86e1204e63603200", "score": "0.56456447", "text": "protected function getPrimaryKeyColumnName()\n {\n return array(ColumnKeys::EMAIL, ColumnKeys::WEBSITE);\n }", "title": "" }, { "docid": "3760b5a5a00b94824123897913951820", "score": "0.5608909", "text": "protected function columnTableName(): string \n {\n return static::TABLE;\n }", "title": "" }, { "docid": "b6619d2af1b3aa3d7d1c8dada871a20b", "score": "0.5552125", "text": "public function getColumn($name) {\n }", "title": "" }, { "docid": "564857531237019a761832a307bad0d7", "score": "0.55278814", "text": "function wpark_pk_columns($columns)\n{\n\t$columns['kokouksen_pvm'] = 'Kokouksen päivämäärä';\n\t\n\treturn $columns;\n}", "title": "" }, { "docid": "f0946deac15b6904e8360f73be9cbeb8", "score": "0.5527261", "text": "public static function columnMap(string $scope): array\n {\n switch ($scope) {\n case 'event':\n return static::COLUMNS_EVENT;\n case 'request':\n return static::COLUMNS_REQUEST;\n default:\n return static::COLUMNS_SITE;\n }\n }", "title": "" }, { "docid": "58f297cb89823c0882001325b5062411", "score": "0.55121326", "text": "function add_user_columns($column) {\r\n $column['province'] = 'Province';\r\n $column['company'] = 'Company';\r\n $column['department'] = 'Department';\r\n\r\n return $column;\r\n}", "title": "" }, { "docid": "30a6362c85c07f5398570007763483f4", "score": "0.5510907", "text": "public function getColumnAggregationKeyFields()\n\t{\n\t\t$columnAggregationKeyColumns = array();\n\t\t$subClasses = $this->getTable()->getOption('subclasses');\n\t\tif(!empty($subClasses))\n\t\t{\n\t\t\tforeach($subClasses as $subClass)\n\t\t\t{\n\t\t\t\t$subTableInheritanceMap = dmDb::table($subClass)->getOption('inheritanceMap');\n\t\t\t\tif(!empty($subTableInheritanceMap))\n\t\t\t\t{\n\t\t\t\t\t$columnName = array_keys($subTableInheritanceMap);\n\t\t\t\t\t$columnName = $columnName[0];\n\t\t\t\t\t$columnAggregationKeyColumns[$columnName] = new dmDoctrineColumn($columnName, $this->table);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $columnAggregationKeyColumns;\n\t}", "title": "" }, { "docid": "267c78bd26e5ba15cc51f6f768192407", "score": "0.5507018", "text": "private function getInternalColumns()\n { \n $columns = array(\n 'firstName',\n 'lastName',\n 'DOB',\n 'email',\n 'password',\n 'jobTitle',\n 'salary',\n 'location',\n 'payrollID',\n );\n return $columns;\n }", "title": "" }, { "docid": "50769ee00b70b41ad7d2371608e83499", "score": "0.5504311", "text": "public function mappings()\n {\n return [\n 'location' => 'location_id',\n ];\n }", "title": "" }, { "docid": "4b94a8f14f80439ae11b2aa905a6f4f4", "score": "0.5486368", "text": "public function getOrderableColumns() {\n // custom field classes because the custom fields are not global. There\n // is no graceful way to handle this in ApplicationSearch at the moment.\n // Just brute force around it until we can clean this up.\n\n return array(\n 'id' => array(\n 'table' => $this->getPrimaryTableAlias(),\n 'column' => 'id',\n 'reverse' => false,\n 'type' => 'int',\n 'unique' => true,\n ),\n );\n }", "title": "" }, { "docid": "7f773bcf09ba7cff4b53e65cc3d91b8d", "score": "0.5480903", "text": "function get_columns() {\n return $columns = array(\n 'col_link_id' => __('ID'),\n 'col_link_name' => __('Name'),\n );\n }", "title": "" }, { "docid": "5ec567749da9b36cf4c86c2ff528986b", "score": "0.5479768", "text": "public function get_columns() {\n\t\treturn array(\n\t\t\t'coupon_id' => '%d',\n\t\t\t'affiliate_id' => '%d',\n\t\t\t'coupon_code' => '%s',\n\t\t);\n\t}", "title": "" }, { "docid": "e33c1158f0ff8050b302f6a6197bc530", "score": "0.54788005", "text": "function _wptu_column($cols) {\n\t$cols['ssid'] = 'ID';\n\treturn $cols;\n}", "title": "" }, { "docid": "69eb92e1140bdab9f0ea61d880b0e0ab", "score": "0.5432593", "text": "protected abstract function getColumns();", "title": "" }, { "docid": "841c92790fcc0da747dbc89ee04cb5d6", "score": "0.54097956", "text": "public static function getColumns():array {\n return ['emp_id', 'phone_number', 'first_name', 'last_name', 'emp_code', 'is_manager', 'state'];\n }", "title": "" }, { "docid": "49d6ab6e383ebbdcb1f81c4fbb0dda2c", "score": "0.54059124", "text": "public function get_columns();", "title": "" }, { "docid": "0fc7fa1e3d9a915b31b887755001eed6", "score": "0.54055434", "text": "public function getColumn($columnName);", "title": "" }, { "docid": "0fc7fa1e3d9a915b31b887755001eed6", "score": "0.54055434", "text": "public function getColumn($columnName);", "title": "" }, { "docid": "f4023f93b10418494e8dc1af4bfa4e6c", "score": "0.54052496", "text": "public static function columnNamesHelper()\n {\n $collectionNames = collect(\n DB::connection(\"mysql2\")\n ->select('show full columns from antennas')\n )->pluck(\"Field\");\n // to skip 0 indexing so antenna_id become at index 1...\n $collectionNames->prepend(\"0\");\n return $collectionNames;\n }", "title": "" }, { "docid": "75ea0a8c45ba916090995ea9032ebd90", "score": "0.5395945", "text": "public static function columns() {\n\n\t\t$columns['id'] = new \\Gino\\IntegerField(array(\n\t\t\t'name' => 'id',\n\t\t\t'primary_key' => true,\n\t\t\t'auto_increment' => true,\n \t'max_lenght' => 11,\n\t\t));\n\t\t$columns['instance'] = new \\Gino\\IntegerField(array(\n\t\t\t'name' => 'instance',\n\t\t\t'required' => true,\n\t\t\t'max_lenght' => 11,\n\t\t));\n\t\t$columns['name'] = new \\Gino\\CharField(array(\n\t\t\t'name' => 'name',\n\t\t\t'label' => _(\"Nome\"),\n\t\t\t'required' => true,\n\t\t\t'max_lenght' => 200,\n\t\t));\n\t\t$columns['slug'] = new \\Gino\\SlugField(array(\n\t\t\t'name' => 'slug',\n\t\t\t'unique_key' => true,\n\t\t\t'label' => array(_(\"Slug\"), _('utilizzato per creare un permalink alla risorsa')),\n\t\t\t'required' => true,\n\t\t\t'max_lenght' => 200,\n\t\t\t'autofill' => array('name'),\n\t\t));\n\t\t$columns['description'] = new \\Gino\\TextField(array(\n\t\t\t'name' => 'description',\n\t\t\t'label' => _(\"Descrizione\"),\n\t\t));\n\t\t$columns['image'] = new \\Gino\\ImageField(array(\n\t\t\t'name' => 'image',\n\t\t\t'label' =>array(_('Immagine'), _('Attenzione, l\\'immagine inserita non viene ridimensionata')),\n\t\t\t'max_lenght' => 200,\n\t\t\t'extensions' => self::$_extension_img,\n\t\t\t'path' => null,\n\t\t\t'resize' => false\n\t\t));\n\n return $columns;\n }", "title": "" }, { "docid": "322298bfa34af6cdb1975d886bbd75bf", "score": "0.53897554", "text": "public function get_columns()\n {\n $columns = array(\n 'id' => 'ID',\n 'first_name' => 'First Name',\n 'last_name' => 'Last Name',\n 'email' => 'Email',\n 'customer_id' => 'Customer Id'\n );\n return $columns;\n }", "title": "" }, { "docid": "77ce0ca06fdd35feb63977f9dc55f454", "score": "0.5387421", "text": "abstract protected function getColumns();", "title": "" }, { "docid": "72e4e033fba35445b39df8a90f8cf7ed", "score": "0.5381845", "text": "public function column_list()\r\n {\r\n $column_list = array (\r\n array(\"name\" => \"property_name\", \"must_have\" => false, \"is_id\" => false),\r\n array(\"name\" => \"street\", \"must_have\" => false, \"is_id\" => false),\r\n array(\"name\" => \"map_location\", \"must_have\" => false, \"is_id\" => false),\r\n array(\"name\" => \"location_id\", \"must_have\" => false, \"is_id\" => true),\r\n );\r\n \r\n return $column_list;\r\n }", "title": "" }, { "docid": "7c763e5025ca6899f46cca4545f9f564", "score": "0.5372068", "text": "public function getQuotesColumnName();", "title": "" }, { "docid": "a15357562d94bacb8266d4ac8ff2f1f0", "score": "0.536946", "text": "abstract protected function getColumns($table);", "title": "" }, { "docid": "9034137134e53348b122391018b25237", "score": "0.53693175", "text": "protected function mapColumns(array $map){\n\n\t\t$columns = $tokens = array();\n\t\tforeach($map as $key => $value){\n\t\t\tif(is_array($value)){\n\t\t\t\t// check for bool switch\n\t\t\t\tif(array_key_exists(0, $value)){\n\t\t\t\t\tif($value[0] !== true) continue;\n\n\t\t\t\t\t$columns[$key] = $key;\n\t\t\t\t\t$tokens[$key] = $value[1];\n\n\t\t\t\t}else{\n\t\t\t\t\t// if another array recurse\n\t\t\t\t\t$tmp = $this->mapColumns($value);\n\t\t\t\t\t$columns = array_merge($columns, array_keys($tmp));\n\t\t\t\t\t$tokens = array_merge($tokens, array_values($tmp));\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tif(is_null($value)) continue;\n\t\t\t\t// catch non-null scalars\n\t\t\t\t$columns[$key] = $key;\n\t\t\t\t$tokens[$key] = \"?\";\n\t\t\t}\n\t\t}\n\t\t// because $columns will inevitably contain duplicate values, once the\n\t\t// two arrays are combined, they will collapse/uniquify. #darkcorner\n\t\treturn array_combine($columns, $tokens);\n\t}", "title": "" }, { "docid": "0dcd69936ca105f3660766aadbacec21", "score": "0.53640574", "text": "public function columns(){\n return [\n ID => 'INT AUTO_INCREMENT PRIMARY KEY',\n NAME => 'VARCHAR(255)',\n UPDATE_DATE => 'DATE',\n TEXT => 'VARCHAR(255)',\n TYPE => 'INT'\n ];\n }", "title": "" }, { "docid": "4f6024d64935910eb76b2f03088624e4", "score": "0.53579396", "text": "public function registerColumn(string $key, mixed $value): void;", "title": "" } ]
784be36dca649501804fe683d05d7d33
test grabbing all Tags
[ { "docid": "6d9aec52450136e05d5d9d01d11a9656", "score": "0.65231717", "text": "public function testGetAllTags(): void\n\t{\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// create a new Tag and insert to into mySQL\n\t\t$tagId = generateUuidV4();\n\t\t$tag = new Tag($tagId, $this->admin->getAdminId(), $this->VALID_TAG_TYPE, $this->VALID_TAG_VALUE);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getAllTags($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"AbqAtNight\\\\CapstoneProject\\\\Tag\", $results);\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t$this->assertEquals($pdoTag->getTagId(), $tagId);\n\t\t$this->assertEquals($pdoTag->getTagAdminId(), $this->admin->getAdminId());\n\t\t$this->assertEquals($pdoTag->getTagType(), $this->VALID_TAG_TYPE);\n\t\t$this->assertEquals($pdoTag->getTagValue(), $this->VALID_TAG_VALUE);\n\t}", "title": "" } ]
[ { "docid": "6fa0c3d6ab31202409e355c743e0df15", "score": "0.69203407", "text": "public function testGetTags()\n {\n $tags = $this->_delicious->getUserTags(self::TEST_UNAME);\n\n $this->assertTrue(is_array($tags));\n }", "title": "" }, { "docid": "9d2ebbce6ff35555f29faf28ffb097ac", "score": "0.6486355", "text": "function testHtml_TagBasic() {\r\n\t}", "title": "" }, { "docid": "3645b71b2102cb4d710fbe108f20d144", "score": "0.64342827", "text": "public function testGetLoadTags()\n {\n }", "title": "" }, { "docid": "b866914d6f50dbb47ab4d5b3aa997070", "score": "0.6401613", "text": "function getOGTags();", "title": "" }, { "docid": "a10cd5362834ab034ac8c5c7e4d66f8a", "score": "0.62961394", "text": "public function testGetTag() {\n \t$this->assertEquals('div', $this->instance->getTag());\n }", "title": "" }, { "docid": "f221dd910ac483e63f34ae40de2c724c", "score": "0.6286766", "text": "function tags_html($selector, $source = false)\n{\n\n $r=array();\n $noko = noko($source);\n $doc = false;\n foreach ($noko->get($selector)->getNodes() as $tag) {\n if (!$doc) $doc = $tag->ownerDocument;\n $html = $doc->saveXML($tag);\n $html = str_replace(array(\"\\n\", \"\\t\"), '', $html);\n if ($html=='<root/>') $html='';\n /*\n $_html=close_tags($html);\n if ($html) {\n $html = substr($html, strpos($html,\">\")+1);\n $html = substr($html, 0,strrpos($html,\"<\"));\n $html = trim($html);\n }\n */\n $r[] = $html;\n }\n\n re($r); return $r;\n}", "title": "" }, { "docid": "7e683d6b4e0208ce58a0fdbbab00f3ca", "score": "0.6275814", "text": "public function matchTag(): array;", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.62357587", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.62357587", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.62357587", "text": "public function getTags();", "title": "" }, { "docid": "b86caad8572defebbe726caad4df43bf", "score": "0.62357587", "text": "public function getTags();", "title": "" }, { "docid": "bb9a677fb1b5035def84d749b462c260", "score": "0.623108", "text": "function getTags(){\n if($this->isStoryExists()){\n return $this->story[\"tags\"];\n }else{\n return false;\n }\n }", "title": "" }, { "docid": "229f6cfdc241244bc936e3f1f93a3eb8", "score": "0.61918914", "text": "public function &getTags();", "title": "" }, { "docid": "cf2e3cb3c374e7e225bbac5ca3673656", "score": "0.61918294", "text": "public function testTags() {\n global $base_path, $base_url;\n $tests = [\n // @todo Trailing linefeeds should be trimmed.\n '<a href = \"https://www.drupal.org\">Drupal.org</a>' => \"Drupal.org [1]\\n\\n[1] https://www.drupal.org\\n\",\n // @todo Footer URLs should be absolute.\n \"<a href = \\\"$base_path\\\">Homepage</a>\" => \"Homepage [1]\\n\\n[1] $base_url/\\n\",\n '<address>Drupal</address>' => \"Drupal\\n\",\n // @todo The <address> tag is currently not supported.\n '<address>Drupal</address><address>Drupal</address>' => \"DrupalDrupal\\n\",\n '<b>Drupal</b>' => \"*Drupal*\\n\",\n // @todo There should be a space between the '>' and the text.\n '<blockquote>Drupal</blockquote>' => \">Drupal\\n\",\n '<blockquote>Drupal</blockquote><blockquote>Drupal</blockquote>' => \">Drupal\\n>Drupal\\n\",\n '<br />Drupal<br />Drupal<br /><br />Drupal' => \"Drupal\\nDrupal\\nDrupal\\n\",\n '<br/>Drupal<br/>Drupal<br/><br/>Drupal' => \"Drupal\\nDrupal\\nDrupal\\n\",\n // @todo There should be two line breaks before the paragraph.\n '<br/>Drupal<br/>Drupal<br/><br/>Drupal<p>Drupal</p>' => \"Drupal\\nDrupal\\nDrupal\\nDrupal\\n\\n\",\n '<div>Drupal</div>' => \"Drupal\\n\",\n // @todo The <div> tag is currently not supported.\n '<div>Drupal</div><div>Drupal</div>' => \"DrupalDrupal\\n\",\n '<em>Drupal</em>' => \"/Drupal/\\n\",\n '<h1>Drupal</h1>' => \"======== Drupal ==============================================================\\n\\n\",\n '<h1>Drupal</h1><p>Drupal</p>' => \"======== Drupal ==============================================================\\n\\nDrupal\\n\\n\",\n '<h2>Drupal</h2>' => \"-------- Drupal --------------------------------------------------------------\\n\\n\",\n '<h2>Drupal</h2><p>Drupal</p>' => \"-------- Drupal --------------------------------------------------------------\\n\\nDrupal\\n\\n\",\n '<h3>Drupal</h3>' => \".... Drupal\\n\\n\",\n '<h3>Drupal</h3><p>Drupal</p>' => \".... Drupal\\n\\nDrupal\\n\\n\",\n '<h4>Drupal</h4>' => \".. Drupal\\n\\n\",\n '<h4>Drupal</h4><p>Drupal</p>' => \".. Drupal\\n\\nDrupal\\n\\n\",\n '<h5>Drupal</h5>' => \"Drupal\\n\\n\",\n '<h5>Drupal</h5><p>Drupal</p>' => \"Drupal\\n\\nDrupal\\n\\n\",\n '<h6>Drupal</h6>' => \"Drupal\\n\\n\",\n '<h6>Drupal</h6><p>Drupal</p>' => \"Drupal\\n\\nDrupal\\n\\n\",\n '<hr />Drupal<hr />' => \"------------------------------------------------------------------------------\\nDrupal\\n------------------------------------------------------------------------------\\n\",\n '<hr/>Drupal<hr/>' => \"------------------------------------------------------------------------------\\nDrupal\\n------------------------------------------------------------------------------\\n\",\n '<hr/>Drupal<hr/><p>Drupal</p>' => \"------------------------------------------------------------------------------\\nDrupal\\n------------------------------------------------------------------------------\\nDrupal\\n\\n\",\n '<i>Drupal</i>' => \"/Drupal/\\n\",\n '<p>Drupal</p>' => \"Drupal\\n\\n\",\n '<p>Drupal</p><p>Drupal</p>' => \"Drupal\\n\\nDrupal\\n\\n\",\n '<strong>Drupal</strong>' => \"*Drupal*\\n\",\n // @todo Tables are currently not supported.\n '<table><tr><td>Drupal</td><td>Drupal</td></tr><tr><td>Drupal</td><td>Drupal</td></tr></table>' => \"DrupalDrupalDrupalDrupal\\n\",\n '<table><tr><td>Drupal</td></tr></table><p>Drupal</p>' => \"Drupal\\nDrupal\\n\\n\",\n // @todo The <u> tag is currently not supported.\n '<u>Drupal</u>' => \"Drupal\\n\",\n '<ul><li>Drupal</li></ul>' => \" * Drupal\\n\\n\",\n '<ul><li>Drupal <em>Drupal</em> Drupal</li></ul>' => \" * Drupal /Drupal/ Drupal\\n\\n\",\n // @todo Lines containing nothing but spaces should be trimmed.\n '<ul><li>Drupal</li><li><ol><li>Drupal</li><li>Drupal</li></ol></li></ul>' => \" * Drupal\\n * 1) Drupal\\n 2) Drupal\\n \\n\\n\",\n '<ul><li>Drupal</li><li><ol><li>Drupal</li></ol></li><li>Drupal</li></ul>' => \" * Drupal\\n * 1) Drupal\\n \\n * Drupal\\n\\n\",\n '<ul><li>Drupal</li><li>Drupal</li></ul>' => \" * Drupal\\n * Drupal\\n\\n\",\n '<ul><li>Drupal</li></ul><p>Drupal</p>' => \" * Drupal\\n\\nDrupal\\n\\n\",\n '<ol><li>Drupal</li></ol>' => \" 1) Drupal\\n\\n\",\n '<ol><li>Drupal</li><li><ul><li>Drupal</li><li>Drupal</li></ul></li></ol>' => \" 1) Drupal\\n 2) * Drupal\\n * Drupal\\n \\n\\n\",\n '<ol><li>Drupal</li><li>Drupal</li></ol>' => \" 1) Drupal\\n 2) Drupal\\n\\n\",\n '<ol>Drupal</ol>' => \"Drupal\\n\\n\",\n '<ol><li>Drupal</li></ol><p>Drupal</p>' => \" 1) Drupal\\n\\nDrupal\\n\\n\",\n '<dl><dt>Drupal</dt></dl>' => \"Drupal\\n\\n\",\n '<dl><dt>Drupal</dt><dd>Drupal</dd></dl>' => \"Drupal\\n Drupal\\n\\n\",\n '<dl><dt>Drupal</dt><dd>Drupal</dd><dt>Drupal</dt><dd>Drupal</dd></dl>' => \"Drupal\\n Drupal\\nDrupal\\n Drupal\\n\\n\",\n '<dl><dt>Drupal</dt><dd>Drupal</dd></dl><p>Drupal</p>' => \"Drupal\\n Drupal\\n\\nDrupal\\n\\n\",\n '<dl><dt>Drupal<dd>Drupal</dl>' => \"Drupal\\n Drupal\\n\\n\",\n '<dl><dt>Drupal</dt></dl><p>Drupal</p>' => \"Drupal\\n\\nDrupal\\n\\n\",\n // @todo Again, lines containing only spaces should be trimmed.\n '<ul><li>Drupal</li><li><dl><dt>Drupal</dt><dd>Drupal</dd><dt>Drupal</dt><dd>Drupal</dd></dl></li><li>Drupal</li></ul>' => \" * Drupal\\n * Drupal\\n Drupal\\n Drupal\\n Drupal\\n \\n * Drupal\\n\\n\",\n // Tests malformed HTML tags.\n '<br>Drupal<br>Drupal' => \"Drupal\\nDrupal\\n\",\n '<hr>Drupal<hr>Drupal' => \"------------------------------------------------------------------------------\\nDrupal\\n------------------------------------------------------------------------------\\nDrupal\\n\",\n '<ol><li>Drupal<li>Drupal</ol>' => \" 1) Drupal\\n 2) Drupal\\n\\n\",\n '<ul><li>Drupal <em>Drupal</em> Drupal</ul></ul>' => \" * Drupal /Drupal/ Drupal\\n\\n\",\n '<ul><li>Drupal<li>Drupal</ol>' => \" * Drupal\\n * Drupal\\n\\n\",\n '<ul><li>Drupal<li>Drupal</ul>' => \" * Drupal\\n * Drupal\\n\\n\",\n '<ul>Drupal</ul>' => \"Drupal\\n\\n\",\n 'Drupal</ul></ol></dl><li>Drupal' => \"Drupal\\n * Drupal\\n\",\n '<dl>Drupal</dl>' => \"Drupal\\n\\n\",\n '<dl>Drupal</dl><p>Drupal</p>' => \"Drupal\\n\\nDrupal\\n\\n\",\n '<dt>Drupal</dt>' => \"Drupal\\n\",\n // Tests some unsupported HTML tags.\n '<html>Drupal</html>' => \"Drupal\\n\",\n // @todo Perhaps the contents of <script> tags should be dropped.\n '<script type=\"text/javascript\">Drupal</script>' => \"Drupal\\n\",\n // A couple of tests for Unicode characters.\n '<q>I <em>will</em> be back…</q>' => \"I /will/ be back…\\n\",\n 'FrançAIS is ÜBER-åwesome' => \"FrançAIS is ÜBER-åwesome\\n\",\n ];\n\n foreach ($tests as $html => $text) {\n $this->assertHtmlToText($html, $text, 'Supported tags');\n }\n }", "title": "" }, { "docid": "87e4ab84c036d7e9da81311c9ccc65d1", "score": "0.6062923", "text": "public function testAddLoadTag()\n {\n }", "title": "" }, { "docid": "a12736935dd47cbfbe977e5f4b80e990", "score": "0.6060196", "text": "private function getTags(){\n\t\t\t$tags = $this->conn->select('tag','');\n\t\t\treturn($tags);\n\t\t}", "title": "" }, { "docid": "58b328eac4f38a6831767d48f4df7e29", "score": "0.6020783", "text": "function carforyou_tags(){\n\tthe_tags();\n}", "title": "" }, { "docid": "5b1c2bb001e52179ccb2cf73b379d9d5", "score": "0.6008488", "text": "static function findHtmlTagContent($html,$tag)\n {\n $dom = new DOMDocument;\n @$dom->loadHTML($html);\n $phrases = array();\n $tagValues = $dom->getElementsByTagName($tag);\n foreach ($tagValues as $tagValue) \n {\n $phrase = $tagValue->nodeValue;\n $phrase = preg_replace(\"/[^A-Za-z ]/\", '', $phrase);\n array_push($phrases, $phrase);\n }\n return $phrases;\n }", "title": "" }, { "docid": "f8c1cb7b0ee4b8aa598d919897919eb3", "score": "0.59265834", "text": "function FindPartDesc($partsUrl, $tag_path){\n\n$stack = array();\n\n\nforeach ($partsUrl as $url){\n\n$html = file_get_html($url);\n$part_path = $html->find($tag_path);\n\nforeach ($part_path as $items) {\n\n\t\nif(!in_array($items->children(0)->plaintext, $stack)){\n\n$stack[] = $items->children(0)->plaintext;\n\n\n}\n\n}\n}\n\nreturn $stack;\n\n}", "title": "" }, { "docid": "d121be3564d784252876b7190106d516", "score": "0.5925841", "text": "public function testTagsTest()\n {\n\n // Create two tags\n $firstTag = factory(Tag::class,20)->create();\n\n // Get the archives\n $tags = Tag::all();\n\n // Count it\n $this->assertCount(20,$tags);\n\n }", "title": "" }, { "docid": "f07f78d8bc00c661ac2f1bb74983e90f", "score": "0.59228647", "text": "function getTextBetweenTags($tag, $html, $strict=0){\n\t\t $dom = new domDocument;\n\n\t\t /*** load the html into the object ***/\n\t\t if($strict==1){\n\t\t $dom->loadXML($html);\n\t\t }\n\t\t else{\n\t\t $dom->loadHTML($html);\n\t\t }\n\n\t\t /*** discard white space ***/\n\t\t $dom->preserveWhiteSpace = false;\n\n\t\t /*** the tag by its tag name ***/\n\t\t $content = $dom->getElementsByTagname($tag);\n\n\t\t $out = array();\n\t\t foreach ($content as $item){\n\t\t /*** add node value to the out array ***/\n\t\t $out[] = $item->nodeValue;\n\t\t }\n\t\t return $out;\n\t\t}", "title": "" }, { "docid": "d6c18f0d9facb3cdbf81de624973a834", "score": "0.58760786", "text": "public function test_get_posts_by_tag()\n\t{\n\t\t// setup\n\t\t$tags = array();\n\t\tif ( Tags::vocabulary()->get_term( \"laser\" ) ) { Tags::vocabulary()->delete_term( \"laser\" ); }\n\t\tif ( Tags::vocabulary()->get_term( \"dog\" ) ) { Tags::vocabulary()->delete_term( \"dog\" ); }\n\t\tif ( Tags::vocabulary()->get_term( \"name\" ) ) { Tags::vocabulary()->delete_term( \"name\" ); }\n\n\t\t$tags[] = Tags::vocabulary()->add_term( \"laser\" );\n\n\t\t$five_tags = array( \"mattress\", \"freeze\", \"DOG\", \"Name\", \"hash\" );\n\t\tforeach( $five_tags as $tag ) {\n\t\t\t$tags[] = Tags::vocabulary()->add_term( $tag );\n\t\t\t$count_before[ $tag ] = Posts::get( array( 'vocabulary' => array( 'tags:term' => $tag ), 'count' => 'DISTINCT {posts}.id', 'ignore_permissions' => true, 'nolimit' => 1 ) );\n\t\t}\n\n\t\tfor( $i = 1; $i <= 15; $i++ ) {\n\t\t\t$post_tags = array();\n\t\t\tfor( $j = 0; $j < 5; $j++ ) {\n\t\t\t\tif( $i % ( $j+2 ) == 0 ) {\n\t\t\t\t$post_tags[] = $five_tags[ $j ];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$post = Post::create( array(\n\t\t\t\t'title' => \"Test post $i\",\n\t\t\t\t'content' => count( $post_tags ) . \" tags: \" . implode( ', ', $post_tags ),\n\t\t\t\t'user_id' => $this->user->id,\n\t\t\t\t'status' => Post::status( 'published' ),\n\t\t\t\t'tags' => $post_tags,\n\t\t\t\t'content_type' => Post::type( 'entry' ),\n\t\t\t\t'pubdate' => DateTime::date_create( time() ),\n\t\t\t));\n\t\t\t$post->info->testing_tag = 1;\n\t\t\t$post->info->commit();\n\t\t}\n\n\t\t/**\n\t\t * At this point, these are the posts and their tags:\n\t\t * 1 (no tags)\n\t\t * 2: mattress\n\t\t * 3: freeze\n\t\t * 4: mattress, DOG\n\t\t * 5: Name\n\t\t * 6: mattress, freeze, hash\n\t\t * 7 (no tags)\n\t\t * 8: mattress, DOG\n\t\t * 9: freeze\n\t\t * 10: mattress, Name\n\t\t * 11 (no tags)\n\t\t * 12: mattress, freeze, DOG, hash\n\t\t * 13 (no tags)\n\t\t * 14: mattress\n\t\t * 15: freeze, Name\n\t\t */\n\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n LEFT JOIN {object_terms} o ON p.id = o.object_id\n\t\t\t\tWHERE o.term_id IN (\n\t\t\t\t\tSELECT id FROM {terms} WHERE term_display = 'DOG'\n\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM vocabularies WHERE name = 'tags' )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t// tags:term_display\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:term_display' => 'DOG'), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t$post_count = Posts::count_by_tag( 'DOG', Post::status( 'published' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Posts::count_by_tag(): $post_count\" );\n\n\t\t// tags:term\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:term' => 'dog'), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n LEFT JOIN {object_terms} o ON p.id = o.object_id\n\t\t\t\tWHERE o.term_id IN (\n\t\t\t\t\tSELECT id FROM {terms} WHERE term = 'name'\n\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM vocabularies WHERE name = 'tags' )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:term' => 'name'), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n LEFT JOIN {object_terms} o ON\n p.id = o.object_id\n\t\t\t\tWHERE o.term_id IN (\n\t\t\t\t\tSELECT id FROM {terms} WHERE term in ( 'mattress', 'freeze' )\n\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:term' => array( 'mattress', 'freeze' ) ), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t// tags:all:term\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n\t\t\t\tWHERE id IN (\n\t\t\t\t\tSELECT o1.object_id FROM {object_terms} o1\n\t\t\t\t\t\tLEFT JOIN {object_terms} o2 ON\n\t\t\t\t\t\t\to1.object_id = o2.object_id AND\n\t\t\t\t\t\t\to1.term_id != o2.term_id\n\t\t\t\t\tWHERE\n\t\t\t\t\t\to1.term_id = ( SELECT id FROM {terms} WHERE term = 'mattress'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) ) AND\n\t\t\t\t\t\to2.term_id = ( SELECT id FROM {terms} WHERE term = 'freeze'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$any_count = $post_count;\n\t\t$post_count = count( Posts::get( array( 'vocabulary' => array( 'tags:all:term' => array( 'mattress', 'freeze' ) ), 'ignore_permissions' => true, 'nolimit' => 1 ) ) );\n\t\t$this->assert_not_equal( $any_count, $post_count, \"Any: $any_count All: $post_count\" );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t// tags:all:term_display\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n\t\t\t\tWHERE id IN (\n\t\t\t\t\tSELECT o1.object_id FROM {object_terms} o1\n\t\t\t\t\t\tLEFT JOIN {object_terms} o2 ON\n\t\t\t\t\t\t\to1.object_id = o2.object_id AND\n\t\t\t\t\t\t\to1.term_id != o2.term_id\n\t\t\t\t\tWHERE\n\t\t\t\t\t\to1.term_id = ( SELECT id FROM {terms} WHERE term_display = 'Name'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) ) AND\n\t\t\t\t\t\to2.term_id = ( SELECT id FROM {terms} WHERE term_display = 'DOG'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$any_count = $post_count;\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:all:term' => array( 'Name', 'DOG' ) ), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_not_equal( $any_count, $post_count, \"Any: $any_count All: $post_count\" );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t// tags:not:term\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n\t\t\t\tWHERE id NOT IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'laser'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:not:term' => 'laser' ), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n\t\t\t\tWHERE id NOT IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'mattress'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\tAND id NOT IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'freeze'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:not:term' => array ( 'mattress', 'freeze' ) ), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n\t\t\t\tWHERE id NOT IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'laser'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\tAND id IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'mattress'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:not:term' => 'laser', 'tags:term' => 'mattress' ), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t// tags:not:term_display\n\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n\t\t\t\tWHERE id NOT IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term_display = 'DOG'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\tAND id IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'mattress'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:not:term_display' => 'DOG', 'tags:term' => 'mattress' ), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t$sql_count = DB::get_value(\n \"SELECT COUNT(DISTINCT id) FROM {posts} p\n\t\t\t\tWHERE id NOT IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term_display = 'DOG'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\tAND id NOT IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'freeze'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\tAND id IN (\n\t\t\t\t\tSELECT object_id FROM {object_terms}\n\t\t\t\t\tWHERE\n\t\t\t\t\t\tterm_id in ( SELECT id FROM {terms} WHERE term = 'mattress'\n\t\t\t\t\t\t\tAND vocabulary_id = ( SELECT id FROM {vocabularies} WHERE name = 'tags' ) )\n\t\t\t\t)\n\t\t\t\" );\n\n\t\t$post_count = Posts::get( array( 'vocabulary' => array( 'tags:not:term_display' => array( 'DOG', 'freeze'), 'tags:term' => 'mattress' ), 'ignore_permissions' => true, 'nolimit' => 1, 'count' => 'DISTINCT {posts}.id' ) );\n\t\t$this->assert_equal( $sql_count, $post_count, \"SQL: $sql_count Post: $post_count\" );\n\n\t\t// teardown\n\t\tPosts::get( array( 'ignore_permissions' => true, 'has:info' => 'testing_tag', 'nolimit' => 1 ) )->delete();\n\t\tforeach( $tags as $tag ) {\n\t\t\tTags::vocabulary()->delete_term( $tag );\n\t\t}\n\t}", "title": "" }, { "docid": "597a64949d352acb1f798210608ffa71", "score": "0.58614755", "text": "public function fetchTags($params){\n $aparams = array_merge(array('target'=>'tags', 'content'=>'json', 'limit'=>50), $params);\n $reqUrl = $this->apiRequestUrl($aparams) . $this->apiQueryString($aparams);\n \n $response = $this->_request($reqUrl, 'GET');\n if($response->isError()){\n libZoteroDebug( $response->getMessage() . \"\\n\" );\n libZoteroDebug( $response->getBody() );\n return false;\n }\n $doc = new DOMDocument();\n $doc->loadXml($response->getBody());\n $feed = new Zotero_Feed($doc);\n $entries = $doc->getElementsByTagName('entry');\n $tags = array();\n foreach($entries as $entry){\n $tag = new Zotero_Tag($entry);\n $tags[] = $tag;\n }\n \n return $tags;\n }", "title": "" }, { "docid": "96dd7f3ac92ac188aa6706477cc864cf", "score": "0.5857705", "text": "function traverseBodyTree($tags)\n\t{\n\t\tif(count($tags->find('*')) == 0 || $tags->tag == 'p') \n\t\t{\n\t\t\t/*\n\t\t\tif(!preg_match('/(io_text)/',$tags->parent()->getAttribute('class')))\n\t\t\t{\n\t\t\t\t$class = $tags->parent()->getAttribute('class').' io_text ';\n\t\t\t\t$tags->parent()->setAttribute('class',$class);\n\t\t\t}\n\t\t\t*/\n\t\t\t$tags = $this->processInnerTag($tags);\n\t\t\t\n\t\t}\n\t\telse\n\t\t{\n\t\t\tforeach($tags->find('*') as $i=>$tag)\n\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//echo \"<font color=red><h3>\".$tag->tag,\"</h3></font> => \";\n\t\t\t\t\tforeach ($tag->getAllAttributes() as $attr => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t//echo $attr,\" = \",$value,\"<br>\";\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t/*\n\t\t\t\t\t* Handling all href link in tag <a>\n\t\t\t\t\t*/\n\t\t\t\t\t\n\t\t\t\t\tif($tag->tag == \"a\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$tag->setAttribute(\"onclick\",\"return false;\");\n\t\t\t\t\t\t\t$tag->setAttribute(\"ondblclick\",\"location=this.href;\");\n\t\t\t\t\t\t\t$tag->setAttribute(\"href\",\"#\");\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* skip the un neccessory tags <script>\n\t\t\t\t\t*/\n\t\t\t\t\t\t\n\t\t\t\t\tif($tag->tag != \"script\")\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t//if(in_array($tag->tag, $features_tags) )\n\t\t\t\t\t\t\t$this->traverseBodyTree($tag);\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ebd6b3a4b69025186679c079a0fff07f", "score": "0.5838419", "text": "public function testAddTag()\n {\n }", "title": "" }, { "docid": "c744ea621c6ba1e8f7f5fce3d0310be4", "score": "0.58322924", "text": "public function testGetAllValidPostTags() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"postTag\");\n\n\t\t// create a new PostTag and insert to into mySQL\n\t\t$postTag = new PostTag(null, $this->postTagPostId->getPostTagPostId());\n\t\t$postTag->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = PostTag::getAllPostTags($this->getPDO());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"postTag\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Bsteider\\\\Gighub\\\\PostTag\", $results);\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoPostTag = $results[0];\n\t\t$this->assertEquals($pdoPostTag->getPostTagPostId(), $this->postTagPostId->getPostTagPostId());\n\t\t$this->assertEquals($pdoPostTag->getPostTagTag(), $this->VALID_POSTTAGTAGID);\n\n\t}", "title": "" }, { "docid": "8e92bde09ee8bb69fcc8cb3cf160f14f", "score": "0.5823478", "text": "function getAllUserTagsForObjectHTML()\n\t{\n\t\tglobal $lng, $ilCtrl;\n\t\t\n\t\t$ttpl = new ilTemplate(\"tpl.tag_cloud.html\", true, true, \"Services/Tagging\");\n\t\t$tags = ilTagging::getTagsForObject($this->obj_id, $this->obj_type,\n\t\t\t$this->sub_obj_id, $this->sub_obj_type);\n\n\t\t$max = 1;\n\t\tforeach ($tags as $tag)\n\t\t{\n\t\t\t$max = max($max, $tag[\"cnt\"]);\n\t\t}\n\t\treset($tags);\n\t\tforeach ($tags as $tag)\n\t\t{\n\t\t\tif (!$this->isForbidden($tag[\"tag\"]))\n\t\t\t{\n\t\t\t\t$ttpl->setCurrentBlock(\"unlinked_tag\");\n\t\t\t\t$ttpl->setVariable(\"REL_CLASS\",\n\t\t\t\t\tilTagging::getRelevanceClass($tag[\"cnt\"], $max));\n\t\t\t\t$ttpl->setVariable(\"TAG_TITLE\", $tag[\"tag\"]);\n\t\t\t\t$ttpl->parseCurrentBlock();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ttpl->get();\n\t}", "title": "" }, { "docid": "75c37f47eecf6e60e4222edaec0652cb", "score": "0.5809031", "text": "public function testInvalidTag() {\n }", "title": "" }, { "docid": "58c95f9a05263505de63d70dd38643d5", "score": "0.5806051", "text": "function getTags() {\n\tif(in_context(ZP_IMAGE)) {\n\t\tglobal $_zp_current_image;\n\t\treturn $_zp_current_image->getTags();\n\t} else if (in_context(ZP_ALBUM)) {\n\t\tglobal $_zp_current_album;\n\t\treturn $_zp_current_album->getTags();\n\t} else if(in_context(ZP_ZENPAGE_PAGE)) {\n\t\tglobal $_zp_current_zenpage_page;\n\t\treturn $_zp_current_zenpage_page->getTags();\n\t} else if(in_context(ZP_ZENPAGE_NEWS_ARTICLE)) {\n\t\tglobal $_zp_current_zenpage_news;\n\t\treturn $_zp_current_zenpage_news->getTags();\n\t}\n\treturn array();\n}", "title": "" }, { "docid": "b3513e27e6861deb7013aadf0755ca44", "score": "0.5802812", "text": "public function test_it_parse_a_single_tag() {\n \n $parser = new TagParser;\n\n $result = $parser->parse('pizza' );\n $expected = ['pizza'];\n\n $this->assertSame( $expected, $result);\n }", "title": "" }, { "docid": "4ac8e4a2562da308dc3eb67fbc35c421", "score": "0.5801024", "text": "public function getTagList();", "title": "" }, { "docid": "dd1a85e087ec5ce9adbda97bf1797df0", "score": "0.5796287", "text": "public function get_tag() {\n\t\t}", "title": "" }, { "docid": "a8f27359c415cd4087f487970729f5d0", "score": "0.5789717", "text": "public function getAll()\n\t{\n\t\treturn $this->tag->all();\n\t}", "title": "" }, { "docid": "01d9c937db598c455efb89bca26d51ed", "score": "0.5786366", "text": "function allTags (folksoQuery $q, folksoDBconnect $dbc, folksoSession $fks) {\n $r = new folksoResponse();\n try {\n $i = new folksoDBinteract($dbc);\n\n $query = \n \"SELECT t.tagdisplay AS display, t.id AS tagid, \\n\\t\" .\n \"t.tagnorm AS tagnorm, \\n\\t\".\n \"(SELECT COUNT(*) FROM tagevent te WHERE te.tag_id = t.id) AS popularity \\n\".\n \"FROM tag t \\n\".\n \" ORDER BY display \";\n \n $i->query($query);\n }\n catch (dbException $e){\n return $r->handleDBexception($e);\n }\n\n $r->setOk(200, 'There they are');\n $df = new folksoDisplayFactory();\n $dd = $df->TagList();\n $dd->activate_style('xml');\n\n $r->t($dd->startform());\n while ($row = $i->result->fetch_object()) {\n $r->t($dd->line($row->tagid,\n $row->tagnorm,\n $row->display,\n $row->popularity,\n ''));\n } \n $r->t($dd->endform());\n return $r;\n}", "title": "" }, { "docid": "51242204319f1442eae535b565e5942e", "score": "0.5783605", "text": "function getHTMLTagContentsByTagAttributes($contents,$specifictagattr,$tagclose)\n{\n\tpreg_match_all( '/\\<'.$specifictagattr.'\\>(.*?)\\<\\/'.$tagclose.'\\>/s',$contents, $matches);\n return $matches[1];\n}", "title": "" }, { "docid": "df7ef23f17219153e5644820e6219bc5", "score": "0.5779891", "text": "public function getTag();", "title": "" }, { "docid": "1434ca1c728c7176ca36566bfdfbcc16", "score": "0.5776294", "text": "public function fetchAllTags($params){\n $aparams = array_merge(array('target'=>'tags', 'content'=>'json', 'limit'=>50), $params);\n $reqUrl = $this->apiRequestUrl($aparams) . $this->apiQueryString($aparams);\n do{\n $response = $this->_request($reqUrl, 'GET');\n if($response->isError()){\n return false;\n }\n $doc = new DOMDocument();\n $doc->loadXml($response->getBody());\n $feed = new Zotero_Feed($doc);\n $entries = $doc->getElementsByTagName('entry');\n $tags = array();\n foreach($entries as $entry){\n $tag = new Zotero_Tag($entry);\n $tags[] = $tag;\n }\n if(isset($feed->links['next'])){\n $nextUrl = $feed->links['next']['href'];\n $parsedNextUrl = parse_url($nextUrl);\n $parsedNextUrl['query'] = $this->apiQueryString(array_merge(array('key'=>$this->_apiKey), $this->parseQueryString($parsedNextUrl['query']) ) );\n $reqUrl = $parsedNextUrl['scheme'] . '://' . $parsedNextUrl['host'] . $parsedNextUrl['path'] . $parsedNextUrl['query'];\n }\n else{\n $reqUrl = false;\n }\n } while($reqUrl);\n \n return $tags;\n }", "title": "" }, { "docid": "7c7103ccfae1a8e28fb71f323847ef3b", "score": "0.57726395", "text": "public function testRemoveTag()\n {\n }", "title": "" }, { "docid": "217b09609160d4d41ba4543043da6a62", "score": "0.57455105", "text": "function DetectTags () {\n \n $url_split = explode ('tag\\/', $_SERVER['REQUEST_URI']);\n $tag = $url_split[1];\n $tag = str_replace ('/', '', $tag);\n $tag = strtolower ($tag);\n \n if ($tag) return ($tag);\n \n return (FALSE);\n }", "title": "" }, { "docid": "7c8369ab68bd5f924048ab7a495fa892", "score": "0.5734", "text": "public function test_get_blog_allposts_tags_not_sequence_type() {\n global $USER;\n\n $blog = $this->get_new_oublog($this->course1->id);\n $this->get_new_post($blog);\n $this->getDataGenerator()->enrol_user($USER->id, $this->course1->id);\n\n // Expect exception because tags not in format sequence type.\n $this->expectException('invalid_parameter_exception');\n mod_oublog_external::get_blog_allposts($blog->id, 'timeposted DESC', $USER->username, 0, '1.2.3');\n }", "title": "" }, { "docid": "b0e868e686ed04bd6ed0904b68cfb192", "score": "0.5710007", "text": "function testParseWithMultiLineTag() {\n $parser = new Parser('files/testMultiLineTag.html');\n $parser->parse();\n $this->assertEqual(count($parser->tags), 11);\n }", "title": "" }, { "docid": "9f181a6c77a080181273787cfe0e3c7f", "score": "0.57082665", "text": "function tags() {\n\n\tglobal $app;\n\tglobal $globalSettings;\n\n\t$tags = R::find('tags', ' 1 ORDER BY name');\n\t$grouped_tags = mkInitialedList($tags);\n\t$app->render('tags.html',array('page' => mkPage($globalSettings['langa']['tags']),'tags' => $grouped_tags));\n\tR::close();\n\n}", "title": "" }, { "docid": "cf33d15f476e4cba49b449dcf75d8e3b", "score": "0.5683288", "text": "public function testGetPackingDetailTags()\n {\n }", "title": "" }, { "docid": "c885291d1fdb78a396d1e0a41f2388f7", "score": "0.56830525", "text": "public function readTag();", "title": "" }, { "docid": "329ddbb1f715ddb6ad02670fc582a3d8", "score": "0.5678411", "text": "public function testOnlyTag($param1, $param2) {\n }", "title": "" }, { "docid": "43e5d035ea33744e34f9f94afcc69906", "score": "0.56687444", "text": "public function getTagNodesList($tag) { \n\n return $this->_dom_document->getElementsByTagName((string)$tag);\n\n }", "title": "" }, { "docid": "e4ffb41c1a17e338b6020a4123f15053", "score": "0.56621444", "text": "function closetags ( $html )\n{\n preg_match_all ( \"#<([a-z]+)( .*)?(?!/)>#iU\", $html, $result );\n $openedtags = $result[1];\n \n #put all closed tags into an array\n preg_match_all ( \"#</([a-z]+)>#iU\", $html, $result );\n $closedtags = $result[1];\n $len_opened = count ( $openedtags );\n # all tags are closed\n if( count ( $closedtags ) == $len_opened ) {\n return $html;\n }\n $openedtags = array_reverse ( $openedtags );\n # close tags\n for( $i = 0; $i < $len_opened; $i++ ) {\n if ( !in_array ( $openedtags[$i], $closedtags ) && $openedtags[$i] != 'br' && $openedtags[$i] != 'img') {\n $html .= \"</\" . $openedtags[$i] . \">\";\n } else {\n unset ( $closedtags[array_search ( $openedtags[$i], $closedtags)] );\n }\n }\n return $html;\n}", "title": "" }, { "docid": "e81d4c01240c9e3432d17698efcbce8e", "score": "0.56578106", "text": "public function getAllTags()\n {\n $cacheid = \"getAllTags\";\n if (($memory = $this->inMemory($cacheid)) !== null) {\n return $memory;\n }\n $uri = $this->_uriBuilder->build('search|alltags');\n $directive = new PCMS_Service_Directive_Json($uri);\n $directive->setTags(array('tags'));\n $result = $this->getClient()->fetch($directive);\n if ($result->isSuccessful()) {\n $this->stashMemory($cacheid, $result);\n return $result;\n }\n return null;\n }", "title": "" }, { "docid": "c5b83699c89a2db4b9a4b737a13f05af", "score": "0.5655091", "text": "protected function readTags() {\n\t\t// get tags\n\t\trequire_once(WCF_DIR.'lib/data/business/category/BusinessCategoryTagCloud.class.php');\n\t\t$tagCloud = new BusinessCategoryTagCloud($this->categoryID, WCF::getSession()->getVisibleLanguageIDArray());\n\t\t$this->tags = $tagCloud->getTags();\n\t}", "title": "" }, { "docid": "fbbbfe3a9ba6d713c02913847bf93b17", "score": "0.5643381", "text": "function cde_get_tags($args = array())\r\n{\r\n\tif(!taxonomy_exists('event-tag'))\r\n\t\treturn false;\r\n\t\r\n\treturn apply_filters('cde_get_tags', get_terms('event-tag', $args));\r\n}", "title": "" }, { "docid": "77a65792aec37abffd07f4e9431a30be", "score": "0.56413716", "text": "function closetags ( $html )\n {\n preg_match_all ( \"#<([a-z]+)( .*)?(?!/)>#iU\", $html, $result );\n $openedtags = $result[1];\n #put all closed tags into an array\n preg_match_all ( \"#</([a-z]+)>#iU\", $html, $result );\n $closedtags = $result[1];\n $len_opened = count ( $openedtags );\n # all tags are closed\n if( count ( $closedtags ) == $len_opened )\n {\n return $html;\n }\n $openedtags = array_reverse ( $openedtags );\n # close tags\n for( $i = 0; $i < $len_opened; $i++ )\n {\n if ( !in_array ( $openedtags[$i], $closedtags ) )\n {\n $html .= \"</\" . $openedtags[$i] . \">\";\n }\n else\n {\n unset ( $closedtags[array_search ( $openedtags[$i], $closedtags)] );\n }\n }\n return $html;\n }", "title": "" }, { "docid": "da13b314c81347939bdcc79556d9ca81", "score": "0.563428", "text": "public function getAllTags() {\n\t\t\n\t\t$blogEntryTags = new Datasource_Cms_Connect_BlogEntryTags();\n\t\t$allTags = $blogEntryTags->getAll();\n\t\t\n\t\t$returnArray = array();\n\t\tforeach($allTags as $currentTag) {\n\n\t\t\t$returnArray[] = array(\n\t\t\t\t'id' => $currentTag['id'],\n\t\t\t\t'tag' => $currentTag['tag']);\n\t\t}\n\t\t\n\t\tif(empty($returnArray)) {\n\t\t\t\n\t\t\t$returnVal = null;\n\t\t}\n\t\telse {\n\t\t\t\n\t\t\t$returnVal = $returnArray;\n\t\t}\n\t\treturn $returnVal;\n\t}", "title": "" }, { "docid": "29e3acfbd6a3d6ead800841d5b3d92e3", "score": "0.56174064", "text": "public function allTags()\n {\n return Tag::get();\n }", "title": "" }, { "docid": "db7c3aa1e47568726e1ee2bf9f0941d1", "score": "0.5608385", "text": "public function testBuildTags()\n {\n $tagNames = ['Cat', 'Fish', 'Weasel'];\n\n $result = $this->Tagged->buildTags($tagNames);\n\n $this->assertNotEmpty($result);\n $this->assertIsArray($result);\n $this->assertCount(3, $result);\n\n foreach ($result as $taggedEntity) {\n $this->assertInstanceOf(Tagged::class, $taggedEntity);\n $this->assertInstanceOf(Tag::class, $taggedEntity->get('tag'));\n }\n }", "title": "" }, { "docid": "d2cec8dd7b0432508a6cc0fbaf68a7cd", "score": "0.5607975", "text": "function extract_tags( $html, $tag, $selfclosing = null, $return_the_entire_tag = false, $charset = 'ISO-8859-1' ){\n \n if ( is_array($tag) ){\n $tag = implode('|', $tag);\n }\n \n //If the user didn't specify if $tag is a self-closing tag we try to auto-detect it\n //by checking against a list of known self-closing tags.\n $selfclosing_tags = array('area', 'base', 'basefont', 'br', 'hr', 'input', 'img', 'link', 'meta', 'col', 'param' );\n if ( is_null($selfclosing) ){\n $selfclosing = in_array( $tag, $selfclosing_tags );\n }\n \n //The regexp is different for normal and self-closing tags because I can't figure out \n //how to make a sufficiently robust unified one.\n if ( $selfclosing ){\n $tag_pattern = \n '@<(?P<tag>'.$tag.') # <tag\n (?P<attributes>\\s[^>]+)? # attributes, if any\n \\s*/?> # /> or just >, being lenient here \n @xsi';\n }\n else{\n $tag_pattern = \n '@<(?P<tag>'.$tag.') # <tag\n (?P<attributes>\\s[^>]+)? # attributes, if any\n \\s*> # >\n (?P<contents>.*?) # tag contents\n </(?P=tag)> # the closing </tag>\n @xsi';\n }\n \n $attribute_pattern = \n '@\n (?P<name>\\w+) # attribute name\n \\s*=\\s*\n (\n (?P<quote>[\\\"\\'])(?P<value_quoted>.*?)(?P=quote) # a quoted value\n | # or\n (?P<value_unquoted>[^\\s\"\\']+?)(?:\\s+|$) # an unquoted value (terminated by whitespace or EOF) \n )\n @xsi';\n \n //Find all tags \n if ( !preg_match_all($tag_pattern, $html, $matches, PREG_SET_ORDER | PREG_OFFSET_CAPTURE ) ){\n //Return an empty array if we didn't find anything\n return array();\n }\n \n $tags = array();\n foreach ($matches as $match){\n \n //Parse tag attributes, if any\n $attributes = array();\n if ( !empty($match['attributes'][0]) ){ \n \n if ( preg_match_all( $attribute_pattern, $match['attributes'][0], $attribute_data, PREG_SET_ORDER ) ){\n //Turn the attribute data into a name->value array\n foreach($attribute_data as $attr){\n if( !empty($attr['value_quoted']) ){\n $value = $attr['value_quoted'];\n } else if( !empty($attr['value_unquoted']) ){\n $value = $attr['value_unquoted'];\n } else {\n $value = '';\n }\n \n //Passing the value through html_entity_decode is handy when you want\n //to extract link URLs or something like that. You might want to remove\n //or modify this call if it doesn't fit your situation.\n $value = html_entity_decode( $value, ENT_QUOTES, $charset );\n \n $attributes[$attr['name']] = $value; \n \n }\n }\n \n }\n \n $tag = array(\n 'tag_name' => $match['tag'][0],\n 'offset' => $match[0][1], \n 'contents' => !empty($match['contents'])?$match['contents'][0]:'', //empty for self-closing tags\n 'attributes' => $attributes, \n );\n if ( $return_the_entire_tag ){\n $tag['full_tag'] = $match[0][0]; \n }\n \n $tags[] = $tag;\n }\n \n return $tags;\n }", "title": "" }, { "docid": "b48a16d43f5868eb41e8c2ce31ea3ed8", "score": "0.5606532", "text": "public function test_sitemap_WITH_tags() {\n\t\t// Create post\n\t\t$post_id = $this->factory->post->create();\n\n\t\t// Set meta value to exclude\n\t\t$term = wp_insert_term( 'tag', 'post_tag' );\n\t\twp_set_post_terms( $post_id, array( $term['term_id'] ) );\n\n\t\t$output = $this->instance->build_sitemap();\n\n\t\t// The expected output\n\t\t$expected_output = \"\\t\\t<news:keywords><![CDATA[tag]]></news:keywords>\\n\";\n\n\t\t// Check if the $output contains the $expected_output\n\t\t$this->assertContains( $expected_output, $output );\n\t}", "title": "" }, { "docid": "e342a06d2481fa1d3bd1af8882bffd50", "score": "0.5594035", "text": "function getTags()\r\n {\r\n if(preg_match_all(\"/\\[[a-z0-9_]+\\]/i\", $this->Pattern, $matches))\r\n {\r\n return $matches[0];\r\n }\r\n return array();\r\n }", "title": "" }, { "docid": "af01548544b7a718cd3233e20d6be2b7", "score": "0.55918866", "text": "private static /*.boolean.*/\t\tfunction is_tag\t\t(/*.string.*/ $name)\t{return ($name === htmlentities($name, ENT_QUOTES));}", "title": "" }, { "docid": "add90dd25cae6ae06083e63d7ea9eaed", "score": "0.5577488", "text": "function closetags ( $html )\n {\n preg_match_all ( \"#<([a-z]+)( .*)?(?!/)>#iU\", $html, $result );\n $openedtags = $result[1];\n #put all closed tags into an array\n preg_match_all ( \"#</([a-z]+)>#iU\", $html, $result );\n $closedtags = $result[1];\n $len_opened = count ( $openedtags );\n # all tags are closed\n if( count ( $closedtags ) == $len_opened )\n {\n return $html;\n }\n $openedtags = array_reverse ( $openedtags );\n # close tags\n for( $i = 0; $i < $len_opened; $i++ )\n {\n if ( !in_array ( $openedtags[$i], $closedtags ) )\n {\n $html .= \"</\" . $openedtags[$i] . \">\";\n }\n else\n {\n unset ( $closedtags[array_search ( $openedtags[$i], $closedtags)] );\n }\n }\n return $html;\n }", "title": "" }, { "docid": "7a0d40002176bc0daa028c0faeb9f74a", "score": "0.5573514", "text": "protected function readTags() {\n\t\t// get tags\n\t\trequire_once(WCF_DIR.'lib/data/linkList/category/LinkListCategoryTagCloud.class.php');\n\t\t$tagCloud = new LinkListCategoryTagCloud($this->categoryID, WCF::getSession()->getVisibleLanguageIDArray());\n\t\t$this->tags = $tagCloud->getTags();\n\t}", "title": "" }, { "docid": "b3cffab2ad4cbdd0cec1ac3e3ea21edf", "score": "0.5566057", "text": "function getHTMLTagContents($contents,$tag)\n{\n //preg_match_all( \"/\\<th\\>(.*?)\\<\\/th\\>/s\",$contents, $matches);\n\tpreg_match_all( \"/\\<\".$tag.\"\\>(.*?)\\<\\/\".$tag.\"\\>/s\",$contents, $matches);\n return $matches[1];\n}", "title": "" }, { "docid": "7ad8c761a287e440b3543c332d3961d6", "score": "0.5562636", "text": "public function testGetTaggedUrl()\n {\n foreach (['image' => 'img', 'video' => 'video'] as $key => $value) {\n $result = $this->instance->getTaggedUrl('test/path', ['resource_type' => $key]);\n\n $this->assertContains('<'.$value, $result);\n $this->assertContains(' src=\"', $result);\n $this->assertContains('my/base/url', $result);\n $this->assertContains('/test/path', $result);\n $this->assertContains('/>', $result);\n }\n\n $this->assertEmpty($this->instance->getTaggedUrl('test/path', ['resource_type' => 'file']));\n\n $this->expectException(\\InvalidArgumentException::class);\n $this->instance->getTaggedUrl('test/path', ['resource_type' => 'test']);\n }", "title": "" }, { "docid": "0051c5324090160c674370009cb015d3", "score": "0.55517614", "text": "public function getPageTags() {\n return [];\n }", "title": "" }, { "docid": "985d5c0d2d90d4ef562e8d9b26a1b934", "score": "0.5548918", "text": "public function test()\n {\n $repository = app()->make(Tag::class);\n\n // 创建几条数据\n $topicTag = ModelTag::factory()->create([ 'user_id' => 0 ]);\n\n $tags = ModelTag::factory()->count(5)->create([ 'user_id' => 0, 'parent_id' => $topicTag->id ]);\n\n // 获取tag\n $request = new Request(['name' => $tags[2]->name]);\n $result = $repository->all($request);\n $this->assertEquals($result->count(), 0);\n }", "title": "" }, { "docid": "4f8f0a14063793a4d807ea58599224a3", "score": "0.5547834", "text": "function get_xml_tags ($file, $tags = null)\n{\n if (is_array($tags) and file_exists($file))\n {\n $content = array();\n $fp = @fopen($file, \"r\");\n $data = fread($fp, filesize($file));\n @fclose($fp);\n foreach ($tags as $tag)\n {\n if (preg_match(\"/\\<{$tag}\\>(.*)\\<\\/{$tag}\\>/Us\", $data, $out))\n {\n $content[$tag] = $out[1];\n }\n }\n return $content;\n }\n else\n {\n return null;\n }\n}", "title": "" }, { "docid": "4148fcbaac0b49e212cdc336e2f62856", "score": "0.5544594", "text": "function ParseEmbeddedTags($text) {\r\n\t\tglobal $starttag, $endtag, $starttags, $endtags;\r\n\r\n\t\t$tags = array();\r\n\r\n\t\t$findTagsRegEx = '/(' . UltimateTagWarriorActions::regExEscape($starttags) . '(.*?)' . UltimateTagWarriorActions::regExEscape($endtags) . ')/i';\r\n\r\n\t\tpreg_match_all($findTagsRegEx, $text, $matches);\r\n\t\tforeach ($matches[2] as $match) {\r\n\t\t\tforeach(explode(',', $match) as $tag) {\r\n\t\t\t\t$tags[] = $tag;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\t$findTagRegEx = '/(' . UltimateTagWarriorActions::regExEscape($starttag) . '(.*?)' . UltimateTagWarriorActions::regExEscape($endtag) . ')/i';\r\n\r\n\t\tpreg_match_all($findTagRegEx, $text, $matches);\r\n\t\tforeach ($matches[2] as $match) {\r\n\t\t\tforeach(explode(',', $match) as $tag) {\r\n\t\t\t\t$tags[] = $tag;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $tags;\r\n\t}", "title": "" }, { "docid": "54a8be2f733f1edf52f26dad3706434d", "score": "0.55429816", "text": "public function test_getParcelAccountTags() {\n\n }", "title": "" }, { "docid": "20ea29357b8fd5198aa8a4fd4dcf691a", "score": "0.5536625", "text": "function getTags() {\n\t\tif (is_file(\"photos/{$this->_id}.xml\")) {\n\t\t\t$tags = array();\n\t\t\t$xml = simplexml_load_file(\"photos/{$this->_id}.xml\");\n\t\t\tforeach ($xml->tags->children() as $tag) {\n\t\t\t\t$tags[] = str_replace(\"_\", \" \", $tag.\"\");\n\t\t\t}\n\t\t\treturn $tags;\n\t\t}\n\t\telse {\n\t\t\tthrow new PhotoException(\"Photo with id {$this->_id} does not exist\");\n\t\t}\n\t}", "title": "" }, { "docid": "d05ef5438a56d14d5d92e86126bec06b", "score": "0.5535834", "text": "public function tag_index() {\n $response = $this->_http_request('/tag');\n\n if (empty($response->error)) {\n return !isset($response->data) ? NULL : $response->data;\n }\n else {\n $this->error = 'Tag index failed: ' . $response->error;\n return FALSE;\n }\n }", "title": "" }, { "docid": "d05c0e7f7479029774540e5e16b6bdfc", "score": "0.55316955", "text": "function lookupTagsInSindice($photoID){\r\n\tglobal $DO_DEBUG;\r\n\t\r\n\t$r = array();\r\n\t$j = 0;\r\n\t\r\n\t$tags = getFlickrTagsFromPhoto($photoID);\r\n\tif($DO_DEBUG) var_dump($tags);\r\n\t\r\n\tfor($i=0;$i<=sizeof($tags);$i++){\r\n\t\t$tag = $tags[\"tag\"][$i][\"_content\"];\t\t\t\r\n\t\t$r[$j] = \"<b>$tag</b> (\" . lookupTagSeeAlsoFromSindice($tag) . \")\";\r\n\t\t$j++;\t\t\t\t\t \r\n\t}\r\n\treturn $r;\t\r\n}", "title": "" }, { "docid": "2342da3a08d04360c93afa250fbee8a3", "score": "0.552931", "text": "private function parse(){\n\t\tforeach($this->elements as $element){\n \t$domElements = $this->doc->getElementsByTagName($element);\n\t \t\tforeach($domElements as $domElement){\n\t if($element == 'img'){\n\t echo $domElement->getAttribute('src') . \"\\n <br> \" ;\n\t }\n\t \telse{\n\t echo $domElement->nodeValue . \"\\n <br>\" ;\n\t }\n \t}\n \t}\n\t}", "title": "" }, { "docid": "b8180a4a3b4d517173a493e8961baee7", "score": "0.5528162", "text": "function get_tag_contents($element)\n{\n\t$obj_tag = array();\n\t if(get_attribute_contents($element))\n\t {\n\t\t$obj_tag[\"attributes\"] = get_attribute_contents($element);\n\t }\n\t if(get_child_contents($element))\n\t {\n\t\t$obj_tag[\"child_nodes\"]= get_child_contents($element);\n\t }\n\n\treturn $obj_tag;\n}", "title": "" }, { "docid": "fa6efe22bc368881867826eebc5cfa9d", "score": "0.55232996", "text": "public function getTags() {\n\t\t$contents = file_get_contents(Post::$POST_PATH.DIRECTORY_SEPARATOR.$this->filename);\n\t\t$startTag = \"<div class=\\\"tags\\\">\";\n\t\t$indexOfTagElem = strpos($contents,$startTag) + strlen($startTag);\n\t\tif ( $indexOfTagElem === false ) {\n\t\t\treturn array();\n\t\t}\n\t\t$indexOfEndElem = strpos($contents,\"</div>\", $indexOfTagElem );\n\t\tif ( $indexOfEndElem === false ) {\n\t\t\treturn array();\n\t\t}\n\t\t$tags = substr($contents, $indexOfTagElem, $indexOfEndElem - $indexOfTagElem);\n\t\treturn explode(\",\", $tags);\n\t}", "title": "" }, { "docid": "66f9fbd6407740dd65f53a1a9c3e5787", "score": "0.55173415", "text": "function getTagName();", "title": "" }, { "docid": "ef5d9064f8684a993ee24c2f9f4bf5c3", "score": "0.55147773", "text": "public function testGetTagByTagType() : void {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"tag\");\n\n\t\t// create a new tag and insert to into mySQL\n\t\t$tagId = generateUuidV4();\n\t\t$tag = new Tag($tagId, $this->admin->getAdminId(), $this->VALID_TAG_TYPE, $this->VALID_TAG_VALUE);\n\t\t$tag->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Tag::getTagByTagType($this->getPDO(), $tag->getTagType());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"tag\"));\n\t\t$this->assertCount(1, $results);\n\n\t\t// enforce no other objects are bleeding into the test\n\t\t$this->assertContainsOnlyInstancesOf(\"AbqAtNight\\\\CapstoneProject\\\\Tag\", $results);\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoTag = $results[0];\n\t\t$this->assertEquals($pdoTag->getTagId(), $tagId);\n\t\t$this->assertEquals($pdoTag->getTagAdminId(), $this->admin->getAdminId());\n\t\t$this->assertEquals($pdoTag->getTagType(), $this->VALID_TAG_TYPE);\n\t\t$this->assertEquals($pdoTag->getTagValue(), $this->VALID_TAG_VALUE);\n\t}", "title": "" }, { "docid": "649d3f2c5a83eee79971a2c98becf874", "score": "0.5513663", "text": "abstract public function isTag() : bool;", "title": "" }, { "docid": "a7e896d1b15f3106f4fa3e1773c2005b", "score": "0.550725", "text": "function _checkTag(&$tags, $i){\n if( $tags[$i]['type'] == 1 &&\n !isset($tags[$i]['attributes']['alt'])){\n \n $tags[$i]['attributes']['alt'] = '';\n }\n }", "title": "" }, { "docid": "f749b9276b5a7dd6c3232ae11a9a7632", "score": "0.5502475", "text": "function get_tag_contents($xmlcode,$tag) {\n $i=0;\n $offset=0;\n $xmlcode = trim($xmlcode);\n do{ #Step through each ocurrence of <$tag>...</$tag> in the XML\n #find the next start tag\n $start_tag=strpos ($xmlcode,\"<\".$tag.\">\",$offset);\n $offset = $start_tag;\n #find the closing tag for the start tag you just found\n $end_tag=strpos ($xmlcode,\"</\".$tag.\">\",$offset);\n $offset = $end_tag;\n #split off <$tag>... as a string, leaving the </$tag> \n $our_tag = substr ($xmlcode,$start_tag,($end_tag-$start_tag));\n $start_tag_length = strlen(\"<\".$tag.\">\");\n if (substr($our_tag,0,$start_tag_length)==\"<\".$tag.\">\"){\n #strip off stray start tags from the beginning\n $our_tag = substr ($our_tag,$start_tag_length);\n }\n $array_of_tags[$i] =$our_tag;\n $i++;\n }while(!(strpos($xmlcode,\"<\".$tag.\">\",$offset)===false));\nreturn $array_of_tags;\n}", "title": "" }, { "docid": "6017df79cbb8a0c79c7147d4a37fd71e", "score": "0.5500684", "text": "function tagsFilter($tag)\n\t\t\t{\n\t\t\t\treturn (boolean)$tag->quotesCount;\n\t\t\t}", "title": "" }, { "docid": "ba2e4ba04de067ea3f5788d2d63b6142", "score": "0.54889464", "text": "public function getAllTags() {\n $tags = array();\n \n $query = \"SELECT `tag`, `tagid`, `counter`,`IdName`,`tag_description`, IdDescription FROM `forums_tags` ORDER BY `counter` DESC LIMIT 25 \";\n $s = $this->dao->query($query);\n if (!$s) {\n throw new PException('Could not retrieve tags!');\n }\n while ($row = $s->fetch(PDB::FETCH_OBJ)) {\n\t\t \t$row->tag=$this->words->fTrad($row->IdName) ; // Retrieve the real tags content\n\t\t\tif (empty($row->IdDescription)) {\n\t\t\t\t$row->TagDescription=\"\" ;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$row->TagDescription=$this->words->fTrad($row->IdDescription) ; // Retrieve the description if any\n\t\t\t}\n $tags[$row->tagid] = $row;\n }\n shuffle($tags);\n return $tags;\n }", "title": "" }, { "docid": "d5a1a7248fd548b424bcf7ca793aa228", "score": "0.5486149", "text": "public function getElementsByTagName ($name) {}", "title": "" }, { "docid": "aa2aa5214e1a24d57bdaa111b9ee8e65", "score": "0.54742616", "text": "public function tags(){\n }", "title": "" }, { "docid": "1eb9f37258fc5a7940c91939395f7529", "score": "0.54725593", "text": "function closetags($html) {\n preg_match_all('#<([a-z]+)(?: .*)?(?<![/|/ ])>#iU', $html, $result);\n\n $openedtags = $result[1]; #put all closed tags into an array\n preg_match_all('#</([a-z]+)>#iU', $html, $result);\n $closedtags = $result[1];\n $len_opened = count($openedtags);\n # all tags are closed\n if (count($closedtags) == $len_opened) {\n return $html;\n }\n $openedtags = array_reverse($openedtags);\n # close tags\n for ($i = 0; $i < $len_opened; $i++) {\n\n if (!in_array($openedtags[$i], $closedtags)) {\n\n $html .= '</' . $openedtags[$i] . '>';\n } else {\n\n unset($closedtags[array_search($openedtags[$i], $closedtags)]);\n }\n } return $html;\n}", "title": "" }, { "docid": "aee40e0e8dfb9f5d143e406e965876c8", "score": "0.54710245", "text": "function codeless_single_blog_tags(){\n $tags = get_the_tag_list( '', '' );\n return $tags;\n}", "title": "" }, { "docid": "32fa66012843951ac7d0c5a5d13d6c5b", "score": "0.5470861", "text": "public function tags($tag='@tag',$case_sensitive=true){\n\t\t\t$result=array(); $tagline=new PhpDocTag(); $cst=strtolower($tag);\n\t\t\tforeach($this->taglines as $tagline)\n\t\t\t\tif($tagline->doctag==$tag || ($case_sensitive && strtolower($tagline->doctag)==$cst))\n\t\t\t\t\t$result[]=$tagline;\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "7d2dbf02c4e640bbae01128192c35be3", "score": "0.54615694", "text": "function gentags($tag_arr)\n{\n $returnMe = \"<span class='tags'>\";\n\n if($tag_arr != NULL) {\n $returnMe .= \"<b>tags: </b>\";\n foreach($tag_arr as $tag) {\n //$returnMe .= \"<i><a href='tags.php?t=\".trim($tag).\"'>\".trim($tag).\"</a>,</i> \";\n $returnMe .= \"<i><a href='/tags-\".trim($tag).\".html'>\".trim($tag).\"</a>,</i> \";\n }\n }\n $returnMe .= \"</span>\";\n\n return $returnMe;\n}", "title": "" }, { "docid": "eb1a29cfeb2ccad71f1fbea3494b0176", "score": "0.54612607", "text": "function getPPTags(){\n\t$posttags = get_the_tags();\n\t$tags = \"\";\n\tif ($posttags) {\n\t foreach($posttags as $tag) {\n\t\t$tags .= $tag->name . ' '; \n\t }\n\t}\n\treturn $tags;\n}", "title": "" }, { "docid": "371c2dcdbee6b619a272049a8e2a7ac4", "score": "0.54487216", "text": "public function getAllTagsInUse() {\n\t\t\n\t\t$blogEntryTags = new Datasource_Cms_Connect_BlogEntryTags();\n\t\t$allTags = $blogEntryTags->getAllInUse();\n\t\t\n\t\treturn $allTags;\n\t}", "title": "" }, { "docid": "ee56c9ffe44e15476d9cd3a5c03bc1af", "score": "0.5447867", "text": "function metaTags()\n\t{\n\t\tif(isset($_REQUEST['drinkID']))\n\t\t{\n\t\t\tprint get_drink_tagsByDrinkID($_REQUEST['drinkID']);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "2918c8252c17250732b5b95ce730b7a2", "score": "0.5440061", "text": "function closetags ( $html ) {\n preg_match_all ( \"#<([a-z]+) [^>]*((?:(?:'[^']*')|(?:\\\"[^\\\"]*'))[^>]*)*(?!/)>#iU\", $html, $result );\n $openedtags = $result[1];\n\n # fix img, hr, br\n $openedtags = array_diff($openedtags, array(\"img\", \"hr\", \"br\"));\n\n #put all closed tags into an array\n preg_match_all ( \"#</([a-z]+)>#iU\", $html, $result );\n $closedtags = $result[1];\n $len_opened = count ( $openedtags );\n # all tags are closed\n if( count ( $closedtags ) == $len_opened ) {\n return $html;\n }\n $openedtags = array_reverse ( $openedtags );\n # close tags\n for( $i = 0; $i < $len_opened; $i++ ) {\n if ( !in_array ( $openedtags[$i], $closedtags ) ) {\n $html .= \"</\" . $openedtags[$i] . \">\";\n }\n else {\n unset ( $closedtags[array_search ( $openedtags[$i], $closedtags)] );\n }\n }\n return $html;\n}", "title": "" }, { "docid": "0cac023107c8ea2d5964c797f072f328", "score": "0.5417805", "text": "abstract protected function nodeTag();", "title": "" }, { "docid": "555dfb3e3945df61509ba7bbb2daa26b", "score": "0.5412688", "text": "public function getTags(){\n return $this->tags;\n }", "title": "" }, { "docid": "7996c21bc8ca524949cac6adcfb2c7ff", "score": "0.54117596", "text": "function __alltags() {\r\n\t\t\r\n\t\t$result = Posts::find('all', array(\r\n\t\t\t'fields' => array('tags')\r\n\t\t));\r\n\t\r\n\t\t$tags = array();\r\n\t\t\r\n\t\tforeach($result as $t){\r\n\t\t\tif(is_object($t->tags)) {\r\n\t\t\t\t$tags = array_merge($tags,$t->tags->to('array'));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn array_unique($tags);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "aa2721b548e2e281271f22d538793033", "score": "0.5408018", "text": "function getMetaTags($siteUrl)\n{\n $html = getSiteContents($siteUrl);\n\n $doc = new DOMDocument();\n @$doc->loadHTML($html);\n\n\n $metaTitle = $doc->getElementsByTagName('title')->item(0)->nodeValue; //title found\n $metaDescription = \"\";\n $metaDescriptions = array();\n $metaTags = $doc->getElementsByTagName('meta');\n $k = 0;\n for ($i = 0; $i < $metaTags->length; $i++) {\n $mTag = $metaTags->item($i);\n\n if ('description' == trim($mTag->getAttribute('name'))) {\n $metaDescription = trim($mTag->getAttribute('content'));\n $metaDescriptions[$k] = $metaDescription;\n $k++;\n }\n }\n\n return array($metaTitle, $metaDescriptions);\n}", "title": "" }, { "docid": "20732efa70d5db36eed4588a6b6f91e1", "score": "0.5406079", "text": "public function testCreateTags()\n {\n\n \t$post = factory(Annonce::class, 3)->create();\n \t$post->saveTags('info', 'jardin' ,'course');\n \t$this->assertEquals(5, DB::table('annonces')->count());\n \t$this->assertEquals(2, DB::table('annonce_tag')->count());\n\n\t\n }", "title": "" }, { "docid": "136cbcbd6e28d53b5308e628532cafbb", "score": "0.53995645", "text": "function _processTags(&$tags, $doc=NULL, &$dom_wrapper)\n {\n\t\n\t\tif(is_null($doc)) return '';\n\t\n\t\t$tagString = '';\n\t\t\n\t\t$found_tags = array();\n\t\t\n\t\tforeach ($tags as $key => $tag) {\n\t\t\tif ($key != '@text') {\n\t\t\t\t\n\t\t\t\tif (is_array($tag)) {\n $hasText = FALSE;\n foreach ($tag as $key => $tagFromGroup) {\n if ($tagFromGroup->text($this->_doclet) != '') {\n $hasText = TRUE;\n }\n }\n if ($hasText) {\n\t\t\t\t\t\tforeach ($tag as $tagFromGroup) {\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$found_tags[] = array(\n\t\t\t\t\t\t\t\t'name' => $tag[0]->displayName(),\n\t\t\t\t\t\t\t\t'text' => $tagFromGroup->text($this->_doclet),\n\t\t\t\t\t\t\t\t//'type' => $tag->typeName()\n\t\t\t\t\t\t\t);\n }\n }\n\n\t\t\t\t} else {\n\t\t\t\t\t\n\t\t\t\t\t$text = $tag->text($this->_doclet);\n\t\t\t\t\tif ($text != '') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$found_tags[] = array(\n\t\t\t\t\t\t\t'name' => $tag->displayName(),\n\t\t\t\t\t\t\t'text' => $tag->text($this->_doclet)\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t} elseif ($tag->displayEmpty()) {\n\t\t\t\t\t\t\n\t\t\t\t\t\t$found_tags[] = array(\n\t\t\t\t\t\t\t'name' => $tag->displayName()\n\t\t\t\t\t\t);\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$dom_tags = $doc->createElement('tags');\n\t\t\n\t\tforeach($found_tags as $tag) {\n\t\t\t\n\t\t\t$text = $tag['text'];\n\t\t\t\n\t\t\t// is a SeeAlso link, use text and not the lowercased URL\n\t\t\tif(is_array($text)) {\n\t\t\t\t$text = $tag['text']['text'];\n\t\t\t}\n\t\t\t\n\t\t\t// remove any markup so we can parse out parameter name from the description\n\t\t\t// phpDoctor provides in the form: \"name - lorem ipsum dolor...\"\n\t\t\t$text_unformatted = $this->__removeTextFromMarkup($text);\n\t\t\t$text_split = explode(' - ', $text_unformatted);\n\t\t\t\n\t\t\tif (count($text_split) > 1) {\n\t\t\t\t// get the tag name (first in split description)\n\t\t\t\t$tag_name = $text_split[0];\n\t\t\t\t// rebuild the rest of the description\n\t\t\t\tarray_shift($text_split);\n\t\t\t\t$description = join(' - ', $text_split);\n\t\t\t} else {\n\t\t\t\t$tag_name = NULL;\n\t\t\t\t$description = $text;\n\t\t\t}\n\t\t\t\n\t\t\t// these types should have their descriptions converted using Markdown\n\t\t\t$use_markdown_description = in_array($tag['name'], array(\n\t\t\t\t'Parameters', 'Deprecated', 'Returns'\n\t\t\t));\n\t\t\t\n\t\t\t// don't use Deprecated/Returns if there's no type\n\t\t\tif(in_array($tag['name'], array('Deprecated', 'Returns')) && empty($tag_name)) {\n\t\t\t\t//continue;\n\t\t\t}\n\t\t\t\n\t\t\t$dom_tag = $doc->createElement('tag', ($use_markdown_description ? NULL : $description));\n\t\t\t$dom_tag->setAttribute('group', $tag['name']);\n\t\t\t\n\t\t\t// add a name if it exists (\"See\" tags don't have a name)\n\t\t\tif(!empty($tag_name)) $dom_tag->setAttribute('name', $tag_name);\n\t\t\t\n\t\t\t// parse paths such as \"toolkit.EntryManager#setFetchSortingField()\" into clean attributes\n\t\t\t// method parameters do not have these, so they are not found by this method's regex\n\t\t\t$this->parsePackageAndClassFromHyperlink($text, $dom_tag);\n\t\t\t\n\t\t\tif ($use_markdown_description) {\n\t\t\t\t\n\t\t\t\t// re-split the description to see if a parameter name exists\n\t\t\t\t$text_split = explode(' - ', $text);\n\t\t\t\t\n\t\t\t\tif (count($text_split) == 2) {\n\t\t\t\t\t$this->appendDescription($text_split[1], $doc, &$dom_tag);\n\t\t\t\t} else {\n\t\t\t\t\t$this->appendDescription($text, $doc, &$dom_tag);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t$dom_tags->appendChild($dom_tag);\n\t\t\t\n\t\t}\n\t\t\n\t\t// only add tags if they were found\n\t\tif (count($found_tags) > 0) $dom_wrapper->appendChild($dom_tags);\n\t\t\n\t}", "title": "" }, { "docid": "86bcefa50f088fde1911faf2a3120164", "score": "0.5398825", "text": "function get_content( $tag , $content )\n{\n\tpreg_match(\"/<\".$tag.\"[^>]*>(.*?)<\\/$tag>/si\", $content, $matches);\n\treturn $matches[1];\n}", "title": "" }, { "docid": "c2956a2467dc93f2991895332b84ebd3", "score": "0.5395964", "text": "public function loadTagList() {\n\n\t\t$idUserAccount = isset($_SESSION['idUserAccount']) ? $_SESSION['idUserAccount'] : NULL;\n\t\tif (is_null($idUserAccount)) return false;\n\n\t\t$this->tagList = array();\n\n\t\t$objecttags = $this->multiBond->getBondedObjects(\n\t\t\tarray(\n\t\t\t\t'id' => $this->id,\n\t\t\t\t'thisTie' => 'Tagged',\n\t\t\t\t'bondType' => 'Tagging',\n\t\t\t\t'thatTie' => 'Tag',\n\t\t\t\t'thatType' => $this->context.'Tag',\n\t\t\t\t'filterParam' => '*'\n\t\t\t));\n\t\tif (!$objecttags || count($objecttags) == 0) return true;\n\n\t\t$usertags = $this->multiBond->getBondedObjects(\n\t\t\tarray(\n\t\t\t\t'id' => $idUserAccount,\n\t\t\t\t'thisTie' => 'Owner',\n\t\t\t\t'bondType' => 'Ownership',\n\t\t\t\t'thatTie' => 'Owned',\n\t\t\t\t'thatType' => $this->context.'Tag',\n\t\t\t\t'filterParam' => '*'\n\t\t\t));\n\t\tif (!$usertags || count($usertags) == 0) return true;\n\n\t\t$tags = array_intersect($objecttags,$usertags);\n\n\t\tforeach ($tags as $value) {\n\n\t\t\t$id = intval((int)$value);\n\t\t\t$tag = new Tag($id, $this->context, $this->multiBond);\n\t\t\tif ($tag) $this->tagList[] = $tag->expose();\n\t\t}\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "4de7c85797695185bf46935d577414b3", "score": "0.53822297", "text": "private function _fetch_tags()\n\t{\n\t\t$responce = $this->_fetch_data('http://github.com/api/v2/json/repos/show/'.$this->user.'/'.$this->repo.'/tags');\n\t\t\n \tif (empty($responce))\n \t{\n \t\treturn FALSE;\n \t}\n \t\n \treturn $responce;\n\t}", "title": "" }, { "docid": "8d336c25c2dea55610f257271dbfcdbb", "score": "0.53810626", "text": "function getOfTags($tags) {\n $rel = $this->getRelation('_tags');\n $res = $rel->getSrc($tags); \n return $res;\n }", "title": "" } ]
2da70fc6b1ea870c48a9717b3625bf77
Exports taxonomies in the requested type and returns them, including their policy tags. The requested taxonomies must belong to the same project. This method generates `SerializedTaxonomy` protocol buffers with nested policy tags that can be used as input for `ImportTaxonomies` calls. (taxonomies.export)
[ { "docid": "db2af2e520e551895a741dd076b97721", "score": "0.64757764", "text": "public function export($parent, $optParams = [])\n {\n $params = ['parent' => $parent];\n $params = array_merge($params, $optParams);\n return $this->call('export', [$params], GoogleCloudDatacatalogV1ExportTaxonomiesResponse::class);\n }", "title": "" } ]
[ { "docid": "a2cf862d3058b08ff723001e94aebec5", "score": "0.5547864", "text": "public function Generate_taxonomies()\r\n {\r\n // Taxonomie type d'estimation\r\n $labels_type = array(\r\n 'name' \t\t\t=> _x( 'Types', 'taxonomy general name'),\r\n 'singular_name' \t\t\t=> _x( 'Types', 'taxonomy singular name'),\r\n //'search_items' \t\t\t=> __( 'Chercher un lieux'),\r\n 'all_items' \t\t\t\t=> __( 'Tous les types'),\r\n 'edit_item' \t\t\t=> __( 'Editer un type'),\r\n 'update_item' \t\t\t=> __( 'Mettre à jour un type'),\r\n 'add_new_item' \t\t\t\t=> __( 'Ajouter un nouveau type'),\r\n 'new_item_name' \t\t\t=> __( 'Valeur du nouveau type'),\r\n 'menu_name' => __( 'type'),\r\n );\r\n\r\n $args_type = array(\r\n 'hierarchical' => true,\r\n 'labels' => $labels_type,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n );\r\n register_taxonomy( 'type', 'estimater', $args_type);\r\n\r\n\r\n $labels_caracteristique = array(\r\n 'name' \t\t\t=> _x( 'Caracteristiques', 'taxonomy general name'),\r\n 'singular_name' \t\t\t=> _x( 'Caracteristique', 'taxonomy singular name'),\r\n 'search_items' \t\t\t=> __( 'Chercher une caracteristique'),\r\n 'all_items' \t\t\t\t=> __( 'Toutes les caracteristiques'),\r\n 'edit_item' \t\t\t=> __( 'Editer une caracteristique'),\r\n 'update_item' \t\t\t=> __( 'Mettre à jour une caracteristique'),\r\n 'add_new_item' \t\t\t\t=> __( 'Ajouter une nouvelle caracteristique'),\r\n 'new_item_name' \t\t\t=> __( 'Valeur de la nouvelle caracteristique'),\r\n 'menu_name' => __( 'caracteristique'),\r\n );\r\n\r\n $args_caracteristique = array(\r\n // Si 'hierarchical' est défini à false, notre taxonomie se comportera comme une étiquette standard\r\n 'hierarchical' => true,\r\n 'labels' => $labels_caracteristique,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'public' =>false\r\n //'rewrite' => array( 'slug' => 'annees' ),\r\n );\r\n register_taxonomy( 'caracteristiques', 'estimater', $args_caracteristique);\r\n\r\n\r\n $labels_projet = array(\r\n 'name' \t\t\t=> _x( 'projets', 'taxonomy general name'),\r\n 'singular_name' \t\t\t=> _x( 'projet', 'taxonomy singular name'),\r\n 'all_items' \t\t\t\t=> __( 'Tous les projets'),\r\n 'edit_item' \t\t\t=> __( 'Editer un projet'),\r\n 'update_item' \t\t\t=> __( 'Mettre à jour un projet'),\r\n 'add_new_item' \t\t\t\t=> __( 'Ajouter un projet'),\r\n 'new_item_name' \t\t\t=> __( 'Valeur du projet'),\r\n 'menu_name' => __( 'projet'),\r\n );\r\n\r\n $args_projet = array(\r\n // Si 'hierarchical' est défini à false, notre taxonomie se comportera comme une étiquette standard\r\n 'hierarchical' => true,\r\n 'labels' => $labels_projet,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'public' =>false\r\n //'rewrite' => array( 'slug' => 'annees' ),\r\n );\r\n register_taxonomy( 'projet', 'estimater', $args_projet);\r\n\r\n\r\n\r\n $labels_statut_projet = array(\r\n 'name' \t\t\t=> _x( 'Limite projets', 'taxonomy general name'),\r\n 'singular_name' \t\t\t=> _x( 'Limite projet', 'taxonomy singular name'),\r\n 'all_items' \t\t\t\t=> __( 'Toutes les limites projets'),\r\n 'edit_item' \t\t\t=> __( 'Editer une limite projet'),\r\n 'update_item' \t\t\t=> __( 'Mettre à jour une Limte projet'),\r\n 'add_new_item' \t\t\t\t=> __( 'Ajouter une limite projet'),\r\n 'new_item_name' \t\t\t=> __( 'Valeur de la limite projet'),\r\n 'menu_name' => __('Limite projets'),\r\n );\r\n\r\n $args_statut_projet = array(\r\n 'hierarchical' => true,\r\n 'labels' => $labels_statut_projet,\r\n 'show_ui' => true,\r\n 'show_admin_column' => true,\r\n 'query_var' => true,\r\n 'public' =>false\r\n //'rewrite' => array( 'slug' => 'annees' ),\r\n );\r\n register_taxonomy( 'limite', 'estimater', $args_statut_projet);\r\n }", "title": "" }, { "docid": "0d20968993734d0aaea9d3ee77faf4e8", "score": "0.55147445", "text": "function bbp_register_taxonomies()\n{\n}", "title": "" }, { "docid": "6e8f6c9f21cfab2efeb6383e41d6ec78", "score": "0.5507934", "text": "protected function get_taxonomies() {\n\t\t$taxonomies = get_taxonomies(array(), 'objects');\n\t\t$taxonomies = array_map(array($this, 'map_tax'), $taxonomies);\n\n\t\t$response = array(\n\t\t\t'taxonomies' => $taxonomies,\n\t\t\t'current_user_cap' => array(\n\t\t\t\t'manage_categories' => current_user_can('manage_categories'),\n\t\t\t\t'edit_categories' => current_user_can('edit_categories'),\n\t\t\t\t'delete_categories' => current_user_can('delete_categories'),\n\t\t\t\t'assign_categories' => current_user_can('assign_categories'),\n\t\t\t\t'manage_post_tags' => current_user_can('manage_post_tags'),\n\t\t\t\t'edit_post_tags' => current_user_can('edit_post_tags'),\n\t\t\t\t'delete_post_tags' => current_user_can('delete_post_tags'),\n\t\t\t\t'assign_post_tags' => current_user_can('assign_post_tags'),\n\t\t\t)\n\t\t);\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "bd17375f45fb4d264b2bbb65bbb887cd", "score": "0.5429231", "text": "private function get_taxonomies() {\n\t\t// Only return taxonomies that are shown in the admin interface.\n\t\t// Otherwise, the list could be confusing to editors or provide invalid options.\n\t\treturn get_taxonomies(\n\t\t\tarray( \n\t\t\t\t'public' => true,\n\t\t\t\t'show_ui' => true\n\t\t\t),\n\t\t\t'objects'\n\t\t);\n\t}", "title": "" }, { "docid": "1359638d1d8768971fad8b3baf231c4a", "score": "0.5402067", "text": "private function saveCustomTaxonomies() {\n if(!$this->postId || !$this->data->getCustomTaxonomies()) return;\n\n // Delete old taxonomy values first when updating. Do this only when the first page is being crawled.\n if($this->data->getCustomTaxonomies() && $this->isFirstPage && $this->isRecrawl) {\n $taxNames = array_unique(array_map(function($v) {\n return $v['taxonomy'];\n }, $this->data->getCustomTaxonomies()));\n\n // Taxonomies saved via wp_insert_post are removed here. They must not be removed. For example, post_tag\n // taxonomy is saved via wp_insert_post prior to calling this method. Hence, already-saved tags are removed\n // here when recrawling a post. This must not be the case. Exclude already-saved taxonomy names such as\n // \"post_tag\". These values are already overwritten.\n $excluded = ['post_tag', 'category'];\n $taxNames = array_values(array_diff($taxNames, $excluded));\n\n if($taxNames) wp_delete_object_term_relationships($this->postId, $taxNames);\n }\n\n foreach($this->data->getCustomTaxonomies() as $taxonomyData) {\n $taxValue = $taxonomyData['data'];\n $taxName = $taxonomyData['taxonomy'];\n $isAppend = isset($taxonomyData['append']) && $taxonomyData['append'];\n\n // Make sure the value is an array.\n if (!is_array($taxValue)) $taxValue = [$taxValue];\n\n // Save them as terms\n $termIds = [];\n foreach($taxValue as $tv) {\n $termId = Utils::insertTerm($tv, $taxName);\n if (!$termId) continue;\n\n $termIds[] = $termId;\n }\n\n // If there is no term ID, continue with the next one.\n if (!$termIds) continue;\n\n wp_set_post_terms($this->postId, $termIds, $taxName, $isAppend);\n }\n }", "title": "" }, { "docid": "96ec94482e2861123eb88ad8f26873e1", "score": "0.53465176", "text": "public static function get_object_taxonomies( $post_type, $output = 'choices', $filter = true ) {\n\n\t\tif ( 'names' === $output ) {\n\t\t\treturn get_object_taxonomies( $post_type );\n\t\t}\n\n\t\t$taxonomies = get_object_taxonomies( $post_type, 'objects' );\n\t\t$taxonomies = self::filter_exclude_taxonomies( $taxonomies, $filter );\n\n\t\tif ( 'objects' === $output ) {\n\t\t\treturn $taxonomies;\n\t\t}\n\n\t\treturn empty( $taxonomies ) ? false : [ 'off' => esc_html__( 'None', 'rank-math' ) ] + wp_list_pluck( $taxonomies, 'label', 'name' );\n\t}", "title": "" }, { "docid": "8e2a0f287795e708525b709501c9635d", "score": "0.53382146", "text": "public static function get_taxonomies($enabled = true) {\n global $DB;\n\n return $DB->get_records('sharedresource_classif', array('enabled' => $enabled));\n }", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.5269929", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.5269929", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "d5dc0ccdd3e7ec75e39e5ebd383bd29b", "score": "0.5269929", "text": "function register_taxonomies() {\n\t}", "title": "" }, { "docid": "309bdbf8e02ba7380125979ae59bd313", "score": "0.52584827", "text": "function register_taxonomies()\n{\n}", "title": "" }, { "docid": "0dd61bd13bfd73cff1c04452d78fdc33", "score": "0.521779", "text": "public static function get_object_taxonomies( $post_type ) {\r\r\n // @TODO: get the list of taxonomies saved in admin for that post type\r\r\n return get_object_taxonomies( $post_type );\r\r\n }", "title": "" }, { "docid": "78ffa9046a04c01dbb007aaef16e8e51", "score": "0.52042776", "text": "function register_taxonomies(){\n\t\t}", "title": "" }, { "docid": "1a3677a29e5c67a8bf8891925ff37665", "score": "0.52020293", "text": "public function register_taxonomies() {\n }", "title": "" }, { "docid": "a0ac8886b3a317ff93f40259ba121848", "score": "0.5147939", "text": "function aletheme_get_taxonomies() {\n\treturn array(\n\t\t'hot_deals-category' => array(\n\t\t\t'for' => array('hot_deals'),\n\t\t\t'config' => array(\n\t\t\t\t'sort' => true,\n\t\t\t\t'args' => array('orderby' => 'term_order'),\n\t\t\t\t'hierarchical' => true,\n\t\t\t),\n\t\t\t'singular' => 'Hot Deals Country',\n\t\t\t'multiple' => 'Hot Deals Country',\n\t\t),\n\t\t'rooms-category' => array(\n\t\t\t'for' => array('hot_deals'),\n\t\t\t'config' => array(\n\t\t\t\t'sort' => true,\n\t\t\t\t'args' => array('orderby' => 'term_order'),\n\t\t\t\t'hierarchical' => true,\n\t\t\t),\n\t\t\t'singular' => 'Rooms',\n\t\t\t'multiple' => 'Rooms',\n\t\t),\n\t\t'baths-category' => array(\n\t\t\t'for' => array('hot_deals'),\n\t\t\t'config' => array(\n\t\t\t\t'sort' => true,\n\t\t\t\t'args' => array('orderby' => 'term_order'),\n\t\t\t\t'hierarchical' => true,\n\t\t\t),\n\t\t\t'singular' => 'Baths',\n\t\t\t'multiple' => 'Baths',\n\t\t),\n\t);\n}", "title": "" }, { "docid": "379a9e1d31c6195de07eae5cd14db269", "score": "0.5141212", "text": "function tt_taxonomies() {\n $label_name = 'Type';\n $label_name_plural = 'Types';\n \n\t$labels = array(\n\t\t'name' => _x( $label_name, 'taxonomy general name' ),\n\t\t'singular_name' => _x( $label_name, 'taxonomy singular name' ),\n\t\t'search_items' => __( 'Search '.$label_name ),\n\t\t'all_items' => __( 'All '.$label_name_plural ),\n\t\t'parent_item' => __( 'Parent '.$label_name ),\n\t\t'parent_item_colon' => __( 'Parent '.$label_name.':' ),\n\t\t'edit_item' => __( 'Edit '.$label_name ),\n\t\t'update_item' => __( 'Update '.$label_name ),\n\t\t'add_new_item' => __( 'Add New '.$label_name ),\n\t\t'new_item_name' => __( 'New '.$label_name ),\n\t\t'menu_name' => __( $label_name ),\n\t);\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => $label_name ),\n\t);\n\tregister_taxonomy( $label_name, array( 'speaker' ), $args );\n}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.51317334", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.51317334", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.51317334", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.51317334", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.51317334", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "c18453c8ca002bf611058e0449a22869", "score": "0.51317334", "text": "public function register_taxonomies() {\n\n\t}", "title": "" }, { "docid": "aa21ad4b60417e9ca2aa52b67e2e65a1", "score": "0.51291245", "text": "public function register_taxonomies()\n {\n }", "title": "" }, { "docid": "aa21ad4b60417e9ca2aa52b67e2e65a1", "score": "0.51291245", "text": "public function register_taxonomies()\n {\n }", "title": "" }, { "docid": "752f1b5cfea37ace421f82e369db2f33", "score": "0.50864714", "text": "public function attach_taxonomies() {\n\t\tregister_taxonomy_for_object_type('governance_categories', 'board_policy');\n\t\tregister_taxonomy_for_object_type('governance_tags', 'board_policy');\n\t\tregister_taxonomy_for_object_type('audiences', 'board_policy');\n\t\tregister_taxonomy_for_object_type('contacts', 'board_policy');\n\t\tregister_taxonomy_for_object_type('lifecycle_phases', 'board_policy');\n\t\tregister_taxonomy_for_object_type('org_units', 'board_policy');\n\t\tregister_taxonomy_for_object_type('owners', 'board_policy');\n\t\tregister_taxonomy_for_object_type('privacy_levels','board_policy');\n\t}", "title": "" }, { "docid": "9d74ca8b8c3e8825fb2369a6b34c32b0", "score": "0.5073086", "text": "function register_taxonomies() {\n Content_Type_Tax::register();\n Series_Tax::register();\n }", "title": "" }, { "docid": "26762485c8f53e2b2056deffb369a756", "score": "0.50580096", "text": "public function register_taxonomies()\n\t{ }", "title": "" }, { "docid": "5511c34cf743953db422522cdee40166", "score": "0.50400287", "text": "public function register_taxonomies()\n\t{\n\t}", "title": "" }, { "docid": "7f02f861ed02bc805ad0a4ca3b32ca44", "score": "0.50165194", "text": "function create_custom_taxonomies() {\n\n\t\tregister_taxonomy(\n\t\t\t'fictiv_role',\n\t\t\tarray (\n\t\t\t\t'cpt_blog',\n\t\t\t\t'cpt_teardown',\n\t\t\t\t'cpt_webinar',\n\t\t\t\t'cpt_ebook'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'labels'\t=> array(\n\t\t\t\t\t'name'\t\t\t=> 'Roles',\n\t\t\t\t\t'singular_name'\t=> 'Role',\n\t\t\t\t\t'menu_name'\t\t=> 'Roles',\n\t\t\t\t\t'add_new_item'\t=> 'Add New Role',\n\t\t\t\t\t'new_item_name'\t=> 'New Role'\n\t\t\t\t),\n\t\t\t\t'show_ui'\t\t\t=> true,\n\t\t\t\t'public' => false,\n\t\t\t\t'show_in_nav_menus'\t=> false,\n\t\t\t\t'show_tagcloud'\t\t=> false,\n\t\t\t\t'hierarchical'\t\t=> true,\n\t\t\t\t'query_var'\t\t\t=> true,\n\t\t\t\t'show_admin_column'\t=> true,\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rewrite'\t=> array(\n\t\t\t\t\t'slug' => 'role', 'with_front' => false\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tregister_taxonomy(\n\t\t\t'fictiv_topic',\n\t\t\tarray (\n\t\t\t\t'cpt_blog',\n\t\t\t\t'cpt_teardown',\n\t\t\t\t'cpt_webinar',\n\t\t\t\t'cpt_ebook'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'labels'\t=> array(\n\t\t\t\t\t'name'\t\t\t=> 'Topics',\n\t\t\t\t\t'singular_name'\t=> 'Topic',\n\t\t\t\t\t'menu_name'\t\t=> 'Topics',\n\t\t\t\t\t'add_new_item'\t=> 'Add New Topic',\n\t\t\t\t\t'new_item_name'\t=> 'New Topic'\n\t\t\t\t),\n\t\t\t\t'show_ui'\t\t\t=> true,\n\t\t\t\t'show_in_nav_menus'\t=> false,\n\t\t\t\t'show_tagcloud'\t\t=> false,\n\t\t\t\t'hierarchical'\t\t=> true,\n\t\t\t\t'query_var'\t\t\t=> true,\n\t\t\t\t'show_admin_column'\t=> true,\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rewrite'\t=> array(\n\t\t\t\t\t'slug' => 'topic', \n\t\t\t\t\t'with_front' => false\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tregister_taxonomy(\n\t\t\t'fictiv_industry',\n\t\t\tarray (\n\t\t\t\t'cpt_blog',\n\t\t\t\t'cpt_teardown',\n\t\t\t\t'cpt_webinar',\n\t\t\t\t'cpt_ebook',\n\t\t\t\t'cpt_case_study',\n\t\t\t\t'cpt_video',\n\t\t\t\t'cpt_tool',\n\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'labels'\t=> array(\n\t\t\t\t\t'name'\t\t\t=> 'Industries',\n\t\t\t\t\t'singular_name'\t=> 'Industry',\n\t\t\t\t\t'menu_name'\t\t=> 'Industries',\n\t\t\t\t\t'add_new_item'\t=> 'Add New Industry',\n\t\t\t\t\t'new_item_name'\t=> 'New Industry'\n\t\t\t\t),\n\t\t\t\t'show_ui'\t\t\t=> true,\n\t\t\t\t'public' => false,\n\t\t\t\t'show_in_nav_menus'\t=> false,\n\t\t\t\t'show_tagcloud'\t\t=> false,\n\t\t\t\t'hierarchical'\t\t=> true,\n\t\t\t\t'query_var'\t\t\t=> true,\n\t\t\t\t'show_admin_column'\t=> true,\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rewrite'\t=> array(\n\t\t\t\t\t'slug' => 'industry', 'with_front' => false\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\tregister_taxonomy(\n\t\t\t'fictiv_manufacturing_process',\n\t\t\tarray (\n\t\t\t\t'cpt_blog',\n\t\t\t\t'cpt_webinar',\n\t\t\t\t'cpt_ebook',\n\t\t\t\t'cpt_case_study',\n\t\t\t\t'cpt_video',\n\t\t\t\t'cpt_tool',\n\t\t\t\t'cpt_cap_material',\n\t\t\t\t'cpt_cap_finish',\n\t\t\t\t'cpt_partners',\n\t\t\t\t'page'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'labels'\t=> array(\n\t\t\t\t\t'name'\t\t\t=> 'Manufacturing Processes',\n\t\t\t\t\t'singular_name'\t=> 'Manufacturing Processes',\n\t\t\t\t\t'menu_name'\t\t=> 'Manufacturing Processes',\n\t\t\t\t\t'add_new_item'\t=> 'Add New Process',\n\t\t\t\t\t'new_item_name'\t=> 'New Process'\n\t\t\t\t),\n\t\t\t\t'show_ui'\t\t\t=> true,\n\t\t\t\t'public' => false,\n\t\t\t\t'show_in_nav_menus'\t=> false,\n\t\t\t\t'show_tagcloud'\t\t=> false,\n\t\t\t\t'hierarchical'\t\t=> true,\n\t\t\t\t'query_var'\t\t\t=> true,\n\t\t\t\t'show_admin_column'\t=> true,\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rewrite'\t=> array(\n\t\t\t\t\t'slug' => 'manufacturing-processes', 'with_front' => false\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\n\n\t\tregister_taxonomy(\n\t\t\t'fictiv_page_type',\n\t\t\tarray ('page'),\n\t\t\tarray(\n\t\t\t\t'labels'\t=> array(\n\t\t\t\t\t'name'\t\t\t=> 'Page Types',\n\t\t\t\t\t'singular_name'\t=> 'Page Type',\n\t\t\t\t\t'menu_name'\t\t=> 'Page Types',\n\t\t\t\t\t'add_new_item'\t=> 'Add New Page Type',\n\t\t\t\t\t'new_item_name'\t=> 'New Page Type'\n\t\t\t\t),\n\t\t\t\t'show_ui'\t\t\t=> true,\n\t\t\t\t'public' => false,\n\t\t\t\t'show_in_nav_menus'\t=> false,\n\t\t\t\t'show_tagcloud'\t\t=> false,\n\t\t\t\t'hierarchical'\t\t=> true,\n\t\t\t\t'query_var'\t\t\t=> true,\n\t\t\t\t'show_admin_column'\t=> true,\n\t\t\t\t'show_in_rest' => true,\n\t\t\t\t'rewrite'\t=> array(\n\t\t\t\t\t'slug' => 'page-type'\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "5d7f8d79bb7c32093d651b926264ca62", "score": "0.50104356", "text": "function imgtec_cpt_listing_taxonomies( $type ){\r\n\t$taxonomies = get_object_taxonomies( $type );\r\n\r\n\tif( $taxonomies ){\r\n\t\tforeach ( $taxonomies as $taxonomy ) {\r\n\t\t\techo\r\n\t\t\t\t'<a href=\"edit-tags.php?taxonomy='.$taxonomy\r\n\t\t\t\t.'&amp;post_type='.$type.'\">Edit '\r\n\t\t\t\t.imgtec_cpt_listing_name( $taxonomy ).'</a>';\r\n\t\t}\r\n\t} else {\r\n\t\techo '<h5 class=\"none-applied\"><span class=\"red\">None applied</span> to &nbsp;\r\n\t\t\t <i class=\"fa fa-angle-double-right\" aria-hidden=\"true\"></i> &nbsp;<strong>' .\r\n\t\t\t imgtec_cpt_listing_name( $type ) . '</strong> post type</h5>';\r\n\t}\r\n}", "title": "" }, { "docid": "b632ce1bcdf305a88c0cacb481ccc58d", "score": "0.4990217", "text": "function gg_terms() {\r\n\t$gg_terms = array();\r\n\t/*array(\r\n\t\t$taxonomy->labels->name => array(\r\n\t\t\t\t\t\t'name' => $term->name,\r\n\t\t\t\t\t\t'value' => $term->slug\r\n\t\t\t\t\t),\r\n\t);*/\r\n\t$taxonomies = get_taxonomies( array( 'public' => true ), 'objects' );\r\n\r\n\t$taxonomies = array_filter( $taxonomies, 'gg_exclude_taxonomies' );\r\n\t$test = get_taxonomies ( array( 'public' => true ), 'objects' );\r\n\r\n\tforeach ( $taxonomies as $taxonomy ) { \r\n\t\t$query_label = '';\r\n\t\tif ( !empty( $taxonomy->query_var ) )\r\n\t\t\t$query_label = $taxonomy->query_var;\r\n\t\telse\r\n\t\t\t$query_label = $taxonomy->name;\r\n\t\t$terms = get_terms( $taxonomy->name, 'orderby=name&hide_empty=1' );\r\n\t\tif ($terms)\r\n\t\t\t$gg_terms[$taxonomy->labels->name] = array();\r\n\t\t$keys = array();\r\n\t\tforeach ( $terms as $term ) {\r\n\t\t\t$keys[$term->name] = array( 'name' => $term->name, 'value' => esc_attr( $query_label ) . ',' . $term->slug );\r\n\t\t}\r\n\t\tif (!$keys)\r\n\t\t\tunset($gg_terms[$taxonomy->labels->name]);\r\n\t\telse\r\n\t\t\t$gg_terms[$taxonomy->labels->name] = $keys;\r\n\t}\r\n\t\r\n\treturn $gg_terms;\r\n}", "title": "" }, { "docid": "fa7e4cd809ec1c7976f798e0bc84aaa3", "score": "0.49680275", "text": "private function taxonomies() {\n\n\t\t$taxonomies = include_once(self::get_schema_path( __FUNCTION__, 'content' ));\n\n\t\tforeach ( $taxonomies as $taxonomy => $args ) {\n\t\t\tregister_taxonomy( $taxonomy, $this->content_types[ 'post_types' ], $args );\n\t\t}\n\t}", "title": "" }, { "docid": "999888212b18d0fa5d7900897e19f7a5", "score": "0.4960376", "text": "public function _ajax_get_taxonomies() {\n\t\t$resp = [\n\t\t\t'success' => false,\n\t\t];\n\n\t\tif ( $taxonomy = kalium()->request->input( 'taxonomy' ) ) {\n\t\t\t$entries = get_terms( [\n\t\t\t\t'taxonomy' => $taxonomy,\n\t\t\t\t'hide_empty' => false\n\t\t\t] );\n\n\t\t\t$entries_select = [];\n\t\t\t$entries_select[] = self::any_item();\n\n\t\t\tforeach ( $entries as $entry ) {\n\n\t\t\t\t$entries_select[] = [\n\t\t\t\t\t'value' => $entry->term_id,\n\t\t\t\t\t'text' => $entry->name\n\t\t\t\t];\n\t\t\t}\n\n\t\t\t$resp['entries'] = $entries_select;\n\t\t\t$resp['success'] = true;\n\t\t}\n\n\t\techo json_encode( $resp );\n\t\tdie();\n\t}", "title": "" }, { "docid": "3307a34c283e8484597efb237fa02247", "score": "0.4929134", "text": "public static function get_accessible_taxonomies() {\n\t\tstatic $accessible_taxonomies;\n\n\t\tif ( isset( $accessible_taxonomies ) && did_action( 'wp_loaded' ) ) {\n\t\t\treturn $accessible_taxonomies;\n\t\t}\n\n\t\t$accessible_taxonomies = get_taxonomies( [ 'public' => true ], 'objects' );\n\t\t$accessible_taxonomies = self::filter_exclude_taxonomies( $accessible_taxonomies );\n\n\t\tif ( ! is_array( $accessible_taxonomies ) ) {\n\t\t\t$accessible_taxonomies = [];\n\t\t}\n\n\t\treturn $accessible_taxonomies;\n\t}", "title": "" }, { "docid": "5749171891d44601fb1e5ce48df35552", "score": "0.49288127", "text": "function build_taxonomies() {\n\t/*$labels = array(\n\t\t'name' => __( 'Tipos'),\n\t\t'singular_name' => __( 'Tipo'),\n\t\t'search_items' => __( 'Buscar' ),\n\t\t'popular_items' => __( 'Mais usados' ),\n\t\t'all_items' => __( 'Todos os Tipos' ),\n\t\t'parent_item' => null,\n\t\t'parent_item_colon' => null,\n\t\t'edit_item' => __( 'Adicionar novo' ),\n\t\t'update_item' => __( 'Atualizar' ),\n\t\t'add_new_item' => __( 'Adicionar novo' ),\n\t\t'new_item_name' => __( 'New' )\n\t\t); */\n\tregister_taxonomy('prod-category', array('products'),\n\t\tarray(\n\t\t\t'hierarchical' => true,\n\t\t\t//'labels' => $labels,\n\t\t\t//'singular_label' => 'Tipo',\n\t\t\t//'all_items' => 'Todos os prod-category',\n\t\t\t'query_var' => true,\n\t\t\t'rewrite' => array( 'slug' => 'prod-category' ))\n\t\t);\n}", "title": "" }, { "docid": "af6148de753c572f3a65d13500b72cd3", "score": "0.49237686", "text": "function asucasa_localidad_taxonomies() {\n\t$labels = array('name' => 'Localidad', 'singular_names' => 'Localidad', 'search_term' => 'Search Types', 'all_types' => 'All Types', 'parent_item' => 'Parent Items', 'parent_item_colon' => 'Parent Type:', 'edit_item' => 'Edit Item', 'update_item' => 'Update Type', 'add_new_item' => 'Add New Item', 'new_item_name' => 'New Type Name', 'menu_name' => 'Localidad');\n \t$args = array('hierarchical' => true, 'labels' => $labels, 'show_ui' => true, 'show_admin_column' => true, 'query_var' => true, 'rewrite' => array('slug' => 'localidad') );\n\tregister_taxonomy('localidad', array('cliente'), $args);\n}", "title": "" }, { "docid": "853b29ecf868444fbc60a4ae0f8b1d8c", "score": "0.49150693", "text": "function qtranslate_edit_taxonomies(){\r\n $args=array(\r\n 'public' => true ,\r\n '_builtin' => false\r\n );\r\n $output = 'object'; // or objects\r\n $operator = 'and'; // 'and' or 'or'\r\n\r\n $taxonomies = get_taxonomies($args,$output,$operator);\r\n\r\n if ($taxonomies) {\r\n foreach ($taxonomies as $taxonomy ) {\r\n add_action( $taxonomy->name.'_add_form', 'qtrans_modifyTermFormFor');\r\n add_action( $taxonomy->name.'_edit_form', 'qtrans_modifyTermFormFor');\r\n\r\n }\r\n }\r\n\r\n}", "title": "" }, { "docid": "6cba55d72ad00e7d6cb739f2364b560d", "score": "0.48954117", "text": "public static function getTaxonomiesByType($type)\n {\n self::loadCache();\n $data = array();\n\n // taxonomy type doesn't exist, return empty\n if (!isset(self::$cache['taxonomies'][$type])) {\n return new TaxonomySet(array());\n }\n\n\n $url_root = Config::getSiteRoot() . $type;\n $values = self::$cache['taxonomies'][$type];\n $slugify = Config::getTaxonomySlugify();\n\n // what we need\n // - name\n // - count of related content\n // - related\n\n foreach ($values as $key => $parts) {\n $set = array();\n\n $prepared_key = ($slugify) ? Slug::make($key) : rawurlencode($key);\n\n foreach ($parts['files'] as $url) {\n if (!isset(self::$cache['urls'][$url])) {\n continue;\n }\n\n $set[$url] = self::$cache['content'][self::$cache['urls'][$url]];\n }\n\n $data[$key] = array(\n 'content' => new ContentSet($set),\n 'name' => $parts['name'],\n 'url' => $url_root . '/' . $prepared_key,\n 'slug' => $type . '/' . $prepared_key\n );\n $data[$key]['count'] = $data[$key]['content']->count();\n }\n\n return new TaxonomySet($data);\n }", "title": "" }, { "docid": "796eb03f06bfbe270fa1f314670fcbc5", "score": "0.48941103", "text": "function create_ristoranti_taxonomies()\n{\n\n // tassonomia tipologia prodotto\n\n $labels = array(\n 'name' => 'Tipologie',\n 'singular_name' => 'Tipologia',\n 'search_items' => 'Cerca',\n 'popular_items' => 'Tipologie Popolari',\n 'all_items' => 'Tutte le Tipologie' ,\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => 'Modifica',\n 'update_item' => 'Aggiorna',\n 'add_new_item' => 'Nuovo',\n 'new_item_name' => 'Nuovo nome',\n 'separate_items_with_commas' => 'Separare le tipologie con le virgole',\n 'add_or_remove_items' => 'Aggiungi o rimuovi tipologie',\n 'choose_from_most_used' => 'Scegli tra le tipologie in uso',\n 'menu_name' => 'Tipologie Ristoranti',\n );\n\n register_taxonomy('tipologia','ristoranti',array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'tipologia' ),\n ));\n}", "title": "" }, { "docid": "832491052108264dc9ca700e88a7759c", "score": "0.48891538", "text": "function createTaxonomies() {\n\t/*\n\t$labels = array(\n\t\t'name' => _x( 'Classement', 'Taxonomy General Name', 'html5blank' ),\n\t\t'singular_name' => _x( 'Genre', 'Taxonomy Singular Name', 'html5blank' ),\n\t\t'menu_name' => __( 'Nouveau genre', 'html5blank' ),\n\t\t'all_items' => __( 'Tous les genres', 'html5blank' ),\n\t\t'parent_item' => __( '', 'html5blank' ),\n\t\t'parent_item_colon' => __( '', 'html5blank' ),\n\t\t'new_item_name' => __( 'Nouveau genre', 'html5blank' ),\n\t\t'add_new_item' => __( 'Ajouter un nouveau genre', 'html5blank' ),\n\t\t'edit_item' => __( 'Éditer le genre', 'html5blank' ),\n\t\t'update_item' => __( 'Mettre à jour le genre', 'html5blank' ),\n\t\t'separate_items_with_commas' => __( 'Séparer les genres avec des virgules', 'html5blank' ),\n\t\t'search_items' => __( 'Chercher un genre', 'html5blank' ),\n\t\t'add_or_remove_items' => __( 'Ajouter ou supprimer un genre', 'html5blank' ),\n\t\t'choose_from_most_used' => __( 'Choisir parmi les genres les plus utilisés', 'html5blank' ),\n\t);\n\t\n\t$args = array(\n\t\t'labels' => array( 'name' => 'Tables'),\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => false,\n\t);\n\tregister_taxonomy( 'tables', 'element', $args );*/\n\t\n\t$args = array(\n\t\t'labels' => array( 'name' => 'Type'),\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => false,\n\t);\n\tregister_taxonomy( 'type', 'element', $args );\n\t\n\t/*\n\t$labels = array(\n\t\t'name' => _x( 'Materiaux', 'Taxonomy General Name', 'html5blank' ),\n\t\t'singular_name' => _x( 'Materiau', 'Taxonomy Singular Name', 'html5blank' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => false,\n\t);\n\tregister_taxonomy( 'materiau', 'element', $args );\n\t*/\n\t/*\n\t$labels = array(\n\t\t'name' => _x( 'Lieux', 'Taxonomy General Name', 'html5blank' ),\n\t\t'singular_name' => _x( 'Lieu', 'Taxonomy Singular Name', 'html5blank' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => false,\n\t);\n\tregister_taxonomy( 'lieu', 'element', $args );\n\t*/\n}", "title": "" }, { "docid": "c05cd29b5a4e8a9e786d89cc9469319e", "score": "0.48882657", "text": "function build_taxonomies(){\n $city_labels = array(\n 'name' => __( 'Cidade', 'framework' ),\n 'singular_name' => __( 'Cidade', 'framework' ),\n 'search_items' => __( 'Pesquisar por Cidades', 'framework' ),\n 'popular_items' => __( 'Cidades populares', 'framework' ),\n 'all_items' => __( 'Todas as Cidades', 'framework' ),\n 'parent_item' => __( 'Parent Cidade', 'framework' ),\n 'parent_item_colon' => __( 'Parent Cidade:', 'framework' ),\n 'edit_item' => __( 'Editar Cidade', 'framework' ),\n 'update_item' => __( 'Atualizar Cidade', 'framework' ),\n 'add_new_item' => __( 'Adicionar nova Cidade', 'framework' ),\n 'new_item_name' => __( 'Nova Cidade', 'framework' ),\n 'separate_items_with_commas' => __( 'Separe Cidades com vírgulas', 'framework' ),\n 'add_or_remove_items' => __( 'Adicione ou remova Cidades', 'framework' ),\n 'choose_from_most_used' => __( 'Escolha das Cidades mais usadas', 'framework' ),\n 'menu_name' => __( 'Cidades', 'framework' )\n );\n\n register_taxonomy(\n 'property-city',\n array( 'property' ),\n array(\n 'hierarchical' => false,\n 'labels' => $city_labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => __('property-city', 'framework'))\n )\n );\n ////////////\n $labels = array(\n 'name' => __( 'UF', 'framework' ),\n 'singular_name' => __( 'UF', 'framework' ),\n 'search_items' => __( 'Pesquisar por Estado', 'framework' ),\n 'popular_items' => __( 'Popular UF', 'framework' ),\n 'all_items' => __( 'Todas propriedades por Estado', 'framework' ),\n 'parent_item' => __( 'Parent Property Feature', 'framework' ),\n 'parent_item_colon' => __( 'Parent Property Feature:', 'framework' ),\n 'edit_item' => __( 'Edit Property Feature', 'framework' ),\n 'update_item' => __( 'Update Property Feature', 'framework' ),\n 'add_new_item' => __( 'Novo Estado', 'framework' ),\n 'new_item_name' => __( 'Novo Estado', 'framework' ),\n 'separate_items_with_commas' => __( 'Estados', 'framework' ),\n 'add_or_remove_items' => __( 'Adicione ou remova Estado', 'framework' ),\n 'choose_from_most_used' => __( 'Escolha dos Estados mais usados', 'framework' ),\n 'menu_name' => __( 'UF', 'framework' )\n );\n\n register_taxonomy(\n 'property-feature',\n array('property'),\n array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => __('property-feature', 'framework'))\n )\n );\n /////////////\n $type_labels = array(\n 'name' => __( 'Tipo de Empreendimento', 'framework' ),\n 'singular_name' => __( 'Tipo de Empreendimento', 'framework' ),\n 'search_items' => __( 'Pesquisar por Tipo de Empreendimentos', 'framework' ),\n 'popular_items' => __( 'Populares Tipos de Empreendimentos', 'framework' ),\n 'all_items' => __( 'Todos os Tipos de Empreendimentos', 'framework' ),\n 'parent_item' => __( 'Parent Tipo de Empreendimento', 'framework' ),\n 'parent_item_colon' => __( 'Parent Tipo de Empreendimento:', 'framework' ),\n 'edit_item' => __( 'Editar Tipo de Empreendimento', 'framework' ),\n 'update_item' => __( 'Atualizar Tipo de Empreendimento', 'framework' ),\n 'add_new_item' => __( 'Adicionar novo Tipo de Empreendimento', 'framework' ),\n 'new_item_name' => __( 'Novo Tipo de Empreendimento Name', 'framework' ),\n 'separate_items_with_commas' => __( 'Separe Tipos de Empreendimentos por vírgula', 'framework' ),\n 'add_or_remove_items' => __( 'Adicione ou remova Tipos de Empreendimentos', 'framework' ),\n 'choose_from_most_used' => __( 'Escolha dos Tipos de Empreendimentos mais usados', 'framework' ),\n 'menu_name' => __( 'Tipos de Empreendimentos', 'framework' )\n );\n\n register_taxonomy(\n 'property-type',\n array( 'property' ),\n array(\n 'hierarchical' => false,\n 'labels' => $type_labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => __('property-type', 'framework'))\n )\n );\n ////////////\n $status_labels = array(\n 'name' => __( 'Status do Empreendimento', 'framework' ),\n 'singular_name' => __( 'Status do Empreendimento', 'framework' ),\n 'search_items' => __( 'Pesquisar Status do Empreendimento', 'framework' ),\n 'popular_items' => __( 'Popular Status do Empreendimento', 'framework' ),\n 'all_items' => __( 'Todos os Status do Empreendimento', 'framework' ),\n 'parent_item' => __( 'Parent Status do Empreendimento', 'framework' ),\n 'parent_item_colon' => __( 'Parent Status do Empreendimento:', 'framework' ),\n 'edit_item' => __( 'Editar Status do Empreendimento', 'framework' ),\n 'update_item' => __( 'Atualizar Status do Empreendimento', 'framework' ),\n 'add_new_item' => __( 'Adicione novo Status do Empreendimento', 'framework' ),\n 'new_item_name' => __( 'Novo Status do Empreendimento', 'framework' ),\n 'separate_items_with_commas' => __( 'Separe Status do Empreendimento com vírgulas', 'framework' ),\n 'add_or_remove_items' => __( 'Adicione ou remova Status do Empreendimento', 'framework' ),\n 'choose_from_most_used' => __( 'Escolha do Status de Empreendimento mais usados ', 'framework' ),\n 'menu_name' => __( 'Status do Empreendimento', 'framework' )\n );\n\n register_taxonomy(\n 'property-status',\n array( 'property' ),\n array(\n 'hierarchical' => false,\n 'labels' => $status_labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => array('slug' => __('property-status', 'framework'))\n )\n );\n}", "title": "" }, { "docid": "e24bba96f68b98ef0409c45e300c79f9", "score": "0.48770586", "text": "function proyecto_taxonomy() {\n\n\t\t\t$labels_zona = array(\n\t\t\t\t'name' => _x( 'Zonas', 'taxonomy general name' ),\n\t\t\t\t'singular_name' => _x( 'Zona', 'taxonomy singular name' ),\n\t\t\t\t'search_items' => __( 'Buscar Zonas' ),\n\t\t\t\t'all_items' => __( 'Todas las Zonas' ),\n\t\t\t\t'parent_item' => __( 'Zona padre' ),\n\t\t\t\t'parent_item_colon' => __( 'Zona padre:' ),\n\t\t\t\t'edit_item' => __( 'Editar Zona' ),\n\t\t\t\t'update_item' => __( 'Actualizar Zona' ),\n\t\t\t\t'add_new_item' => __( 'Agregar Nueva Zona' ),\n\t\t\t\t'new_item_name' => __( 'Nuevo Nombre de Zona' ),\n\t\t\t\t'menu_name' => __( 'Zona' ),\n\t\t\t\t'not_found' => __( 'No se encontraron Zonas' ),\n\t\t\t);\n\n\t\t\tregister_taxonomy( 'zona',\n\t\t\t 'proyectos',\n\t\t\t array(\n\t\t\t 'hierarchical' => true,\n\t\t\t 'labels' => $labels_zona,\n\t\t\t 'rewrite' => array( 'slug' => 'zonas-proyectos' )\n\t\t\t )\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "73ce73f3d02f17f2c910824cfecdbd47", "score": "0.48701996", "text": "function register_portfoliotaxonomies() {\n\t$labels = array(\n\t\t'name' \t\t\t\t\t=> _x( 'tipos', 'taxonomy general name' ),\n\t\t'singular_name' \t\t=> _x( 'tipo', 'taxonomy singular name' ),\n\t\t'add_new' \t\t\t\t=> _x( 'Agregar tipo', 'tipo'),\n\t\t'add_new_item' \t\t\t=> __( 'Agregar tipo' ),\n\t\t'edit_item' \t\t\t=> __( 'Editar tipo' ),\n\t\t'new_item' \t\t\t\t=> __( 'Nuevo tipo' ),\n\t\t'view_item' \t\t\t=> __( 'Ver tipo' ),\n\t\t'search_items' \t\t\t=> __( 'Buscar tipos' ),\n\t\t'not_found' \t\t\t=> __( 'No encontrado' ),\n\t\t'not_found_in_trash' \t=> __( 'No encotrado' ),\n\t);\n\t$pages = array('portfolio');\n\t$args = array(\n\t\t'labels' \t\t\t=> $labels,\n\t\t'singular_label' \t=> __('tipo'),\n\t\t'public' \t\t\t=> true,\n\t\t'show_ui' \t\t\t=> true,\n\t\t'hierarchical' \t\t=> true,\n\t\t'show_tagcloud' \t=> false,\n\t\t'show_in_nav_menus' => true,\n\t\t'_builtin' \t\t\t=> false,\n\t\t'rewrite' \t\t\t=> array('slug' => 'porfoliotax','with_front' => FALSE ),\n\t );\n\tregister_taxonomy('portfoliotaxonomies', $pages, $args);\n}", "title": "" }, { "docid": "0581bbc7bfa5392c633d64e5d7b96ca6", "score": "0.4862164", "text": "public function import_end() {\n\n\t\t//wp_cache_flush(); Stops output in some hosting environments\n\t\tforeach ( get_taxonomies() as $tax ) {\n\t\t\tdelete_option( \"{$tax}_children\" );\n\t\t\t_get_term_hierarchy( $tax );\n\t\t}\n\n\t\twp_defer_term_counting( false );\n\t\twp_defer_comment_counting( false );\n\n\t\tdo_action( 'import_end' );\n\t}", "title": "" }, { "docid": "11255d11f75ee862cda068fee34fa23c", "score": "0.48606113", "text": "function flei_add_taxonomies_to_attachments()\n{\n register_taxonomy_for_object_type('my_expertise', 'attachment');\n}", "title": "" }, { "docid": "90e060a71ac8bbf33d6bc46b135a8c21", "score": "0.4849078", "text": "static function register_taxonomies()\n {\n\n $labels = array(\n 'name' => _x('Taxonomias', 'taxonomy general name', 'SLUG'),\n 'singular_name' => _x('Taxonomia', 'taxonomy singular name', 'SLUG'),\n 'search_items' => __('Search Taxonomias', 'SLUG'),\n 'all_items' => __('All Taxonomias', 'SLUG'),\n 'parent_item' => __('Parent Taxonomia', 'SLUG'),\n 'parent_item_colon' => __('Parent Taxonomia:', 'SLUG'),\n 'edit_item' => __('Edit Taxonomia', 'SLUG'),\n 'update_item' => __('Update Taxonomia', 'SLUG'),\n 'add_new_item' => __('Add New Taxonomia', 'SLUG'),\n 'new_item_name' => __('New Taxonomia Name', 'SLUG'),\n );\n\n register_taxonomy('taxonomia', self::$post_type, array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'query_var' => true,\n 'rewrite' => true,\n )\n );\n }", "title": "" }, { "docid": "2c074484e514eae231d4e2422a21371f", "score": "0.48425257", "text": "private function write_hierarchy($taxonomy)\n {\n $names = explode(\" - \", $taxonomy); //print_r($arr);\n $names = array_map('trim', $names);\n $i = -1;\n foreach($names as $name) { $i++;\n if(@$this->Name_taxonID[$name]) {}\n else {\n $taxon_id = strtolower($name);\n if($i > 0) $parent_id = strtolower($names[$i-1]);\n else $parent_id = '';\n $taxon = new \\eol_schema\\Taxon();\n $taxon->taxonID = $taxon_id;\n $taxon->scientificName = $name;\n $taxon->parentNameUsageID = $parent_id;\n $this->archive_builder->write_object_to_file($taxon);\n $this->Name_taxonID[$name] = $taxon_id;\n }\n }\n }", "title": "" }, { "docid": "a0e83d634f4d825215986c625a2b30b3", "score": "0.48362213", "text": "function carton_default_taxonomies() {\n\n\t$taxonomies = array(\n\t\t'product_type' => array(\n\t\t\t'simple',\n\t\t\t'grouped',\n\t\t\t'variable',\n\t\t\t'external'\n\t\t),\n\t\t'shop_order_status' => array(\n\t\t\t'pending',\n\t\t\t'failed',\n\t\t\t'on-hold',\n\t\t\t'processing',\n\t\t\t'completed',\n\t\t\t'refunded',\n\t\t\t'cancelled'\n\t\t)\n\t);\n\n\tforeach ( $taxonomies as $taxonomy => $terms ) {\n\t\tforeach ( $terms as $term ) {\n\t\t\tif ( ! get_term_by( 'slug', sanitize_title( $term ), $taxonomy ) ) {\n\t\t\t\twp_insert_term( $term, $taxonomy );\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "b30474548736f37d3919a90d6444905f", "score": "0.48037", "text": "function aerospace_post_types() {\n\n\t$labels = array(\n\t\t'name' => _x( 'Types', 'Taxonomy General Name', 'aerospace' ),\n\t\t'singular_name' => _x( 'Type', 'Taxonomy Singular Name', 'aerospace' ),\n\t\t'menu_name' => __( 'Types', 'aerospace' ),\n\t\t'all_items' => __( 'Types', 'aerospace' ),\n\t\t'parent_item' => __( 'Type', 'aerospace' ),\n\t\t'parent_item_colon' => __( 'Type:', 'aerospace' ),\n\t\t'new_item_name' => __( 'New Type', 'aerospace' ),\n\t\t'add_new_item' => __( 'Add Type', 'aerospace' ),\n\t\t'edit_item' => __( 'Edit Type', 'aerospace' ),\n\t\t'update_item' => __( 'Update Type', 'aerospace' ),\n\t\t'view_item' => __( 'View Type', 'aerospace' ),\n\t\t'separate_items_with_commas' => __( 'Separate types with commas', 'aerospace' ),\n\t\t'add_or_remove_items' => __( 'Add or remove types', 'aerospace' ),\n\t\t'choose_from_most_used' => __( 'Choose from the most used', 'aerospace' ),\n\t\t'popular_items' => __( 'Popular Types', 'aerospace' ),\n\t\t'search_items' => __( 'Search Types', 'aerospace' ),\n\t\t'not_found' => __( 'Not Found', 'aerospace' ),\n\t\t'no_terms' => __( 'No types', 'aerospace' ),\n\t\t'items_list' => __( 'Types list', 'aerospace' ),\n\t\t'items_list_navigation' => __( 'Types list navigation', 'aerospace' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => true,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_typecloud' => true,\n\t\t'show_in_rest'\t\t\t\t\t\t\t => true\n\t);\n\tregister_taxonomy( 'post_types', array( 'post' ), $args );\n}", "title": "" }, { "docid": "bc6a170e186f118f98518486c9baee7f", "score": "0.4798765", "text": "public function ajax_get_taxonomies() {\n\t\t$post_names = json_decode( stripslashes( $_GET['post_names'] ), true );\n\n\t\techo json_encode( $this->get_taxonomies_for_posts( $post_names ) );\n\n\t\tdie();\n\t}", "title": "" }, { "docid": "17a5c4137772cd3ff34e1475e36befa1", "score": "0.47879148", "text": "function mthit_custom_taxonomies() {\n\t\n\t//add new taxonomy hierarchical\n\t$labels = array(\n\t\t'name' => 'Types',\n\t\t'singular_name' => 'Type',\n\t\t'search_items' => 'Search Types',\n\t\t'all_items' => 'All Types',\n\t\t'parent_item' => 'Parent Type',\n\t\t'parent_item_colon' => 'Parent Type:',\n\t\t'edit_item' => 'Edit Type',\n\t\t'update_item' => 'Update Type',\n\t\t'add_new_item' => 'Add New Work Type',\n\t\t'new_item_name' => 'New Type Name',\n\t\t'menu_name' => 'Types'\n\t);\n\t\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'type' )\n\t);\n\t\n\tregister_taxonomy('type', array('faqs','testimonials'), $args);\n\t\n\t//add new taxonomy NOT hierarchical is same, just 'hierarchical' parameter change to false\n\t\n}", "title": "" }, { "docid": "fe4ca8655e0e8d1d1148322479e8b9c7", "score": "0.4785871", "text": "function custom_taxonomies_term(){\n $post = get_post( $post->ID );\n // get post type by post\n $post_type = $post->post_type;\n // get post type taxonomies\n $taxonomies = get_object_taxonomies( $post_type, 'objects' );\n $out = array();\n foreach ( $taxonomies as $taxonomy_slug => $taxonomy ){\n // get the terms related to post\n $terms = get_the_terms( $post->ID, $taxonomy_slug );\n if ( !empty( $terms ) ) {\n $out[] = \"\";\n foreach ( $terms as $term ) {\n $out[] = $term->name;\n break;\n }\n }\n }\n return implode('', $out );\n}", "title": "" }, { "docid": "5705e90122ed5695d185f12b4063f388", "score": "0.47785744", "text": "public function getPageTaxonomy() {\n\n\t\treturn $this->pages;\n\t}", "title": "" }, { "docid": "28a1c1990121e4afa75f829bdb57c141", "score": "0.47666073", "text": "public function taxes(): MorphToMany\n {\n return $this->morphToMany(Constants::TAX_NAMESPACE, 'featurable', 'nikolag_deductibles', 'featurable_id', 'deductible_id')->where('deductible_type', Constants::TAX_NAMESPACE)->distinct()->withPivot('scope');\n }", "title": "" }, { "docid": "652974759bf71ecf4a9699ac2256bda9", "score": "0.4758406", "text": "private static function cleanup_taxonomies() {\n\t\tglobal $wpdb;\n\n\t\tforeach ( self::$taxonomies as $taxonomy ) {\n\t\t\t$terms = $wpdb->get_results(\n\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\"SELECT term_id, term_taxonomy_id FROM $wpdb->term_taxonomy WHERE taxonomy = %s\",\n\t\t\t\t\t$taxonomy\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Delete all data for each term.\n\t\t\tforeach ( $terms as $term ) {\n\t\t\t\t$wpdb->delete( $wpdb->term_relationships, array( 'term_taxonomy_id' => $term->term_taxonomy_id ) );\n\t\t\t\t$wpdb->delete( $wpdb->term_taxonomy, array( 'term_taxonomy_id' => $term->term_taxonomy_id ) );\n\t\t\t\t$wpdb->delete( $wpdb->terms, array( 'term_id' => $term->term_id ) );\n\t\t\t\t$wpdb->delete( $wpdb->termmeta, array( 'term_id' => $term->term_id ) );\n\t\t\t}\n\n\t\t\tif ( function_exists( 'clean_taxonomy_cache' ) ) {\n\t\t\t\tclean_taxonomy_cache( $taxonomy );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "cf1c0596c280268fcd5c67715187fbb5", "score": "0.47273648", "text": "public function getHierarchicalTaxonomies()\n {\n $hierarchicalTaxonomies = array();\n foreach (get_object_taxonomies($this->type, 'objects') as $taxonomyName => $taxonomyObject) {\n if ($taxonomyObject->hierarchical === true) {\n array_push($hierarchicalTaxonomies, $taxonomyObject);\n }\n }\n\n return apply_filters('hierarchical-taxonomies', $hierarchicalTaxonomies);\n }", "title": "" }, { "docid": "375e1ea37bca26b59d29fb7c51f37736", "score": "0.471959", "text": "protected function get_taxonomies_terms($post) {\n\t\t$taxonomies = get_object_taxonomies($post->post_type, 'objects');\n\t\t$taxonomies = array_map(array($this, 'map_tax'), $taxonomies);\n\n\t\t$taxonomy_names = array();\n\t\t$taxonomy_terms = array();\n\t\t$taxonomy_caps = array();\n\n\t\tforeach ($taxonomies as $taxonomy) {\n\t\t\t$terms = get_the_terms($post->ID, $taxonomy->name);\n\t\t\t$terms = !is_array($terms) ? (array) $terms : $terms;\n\n\t\t\t$taxonomy_terms[$taxonomy->name] = $terms;\n\t\t\t$taxonomy_caps[$taxonomy->name] = array(\n\t\t\t\t'hierarchical' => is_taxonomy_hierarchical($taxonomy->name),\n\t\t\t\t'edit_terms' => current_user_can($taxonomy->cap->edit_terms),\n\t\t\t\t'assign_terms' => current_user_can($taxonomy->cap->assign_terms),\n\t\t\t);\n\t\t\tarray_push($taxonomy_names, $taxonomy->name);\n\t\t}\n\n\t\treturn array(\n\t\t\t'objects' => $taxonomies,\n\t\t\t'names' => $taxonomy_names,\n\t\t\t'terms' => $taxonomy_terms,\n\t\t\t'caps' => $taxonomy_caps,\n\t\t);\n\t}", "title": "" }, { "docid": "ce4294f580cb02e81bf9391422b0d3f4", "score": "0.47031745", "text": "public function create_projects_custom_taxonomies() {\n\n register_taxonomy(\n $this->technology_taxonomy,\n $this->post_type,\n array(\n 'labels' => array(\n 'name' => __( 'Technology', 'wpwa' ),\n 'singular_name' => __( 'Technology', 'wpwa' ),\n 'search_items' => __( 'Search Technology', 'wpwa' ),\n 'all_items' => __( 'All Technology', 'wpwa' ),\n 'parent_item' => __( 'Parent Technology', 'wpwa' ),\n 'parent_item_colon' => __( 'Parent Technology:', 'wpwa' ),\n 'edit_item' => __( 'Edit Technology', 'wpwa' ),\n 'update_item' => __( 'Update Technology', 'wpwa' ),\n 'add_new_item' => __( 'Add New Technology', 'wpwa' ),\n 'new_item_name' => __( 'New Technology Name', 'wpwa' ),\n 'menu_name' => __( 'Technology', 'wpwa' ),\n ),\n 'hierarchical' => true\n )\n );\n\n register_taxonomy(\n $this->project_type_taxonomy,\n $this->post_type,\n array(\n 'labels' => array(\n 'name' => __( 'Project Type', 'wpwa' ),\n 'singular_name' => __( 'Project Type', 'wpwa' ),\n 'search_items' => __( 'Search Project Type', 'wpwa' ),\n 'all_items' => __( 'All Project Type', 'wpwa' ),\n 'parent_item' => __( 'Parent Project Type', 'wpwa' ),\n 'parent_item_colon' => __( 'Parent Project Type:', 'wpwa' ),\n 'edit_item' => __( 'Edit Project Type', 'wpwa' ),\n 'update_item' => __( 'Update Project Type', 'wpwa' ),\n 'add_new_item' => __( 'Add New Project Type', 'wpwa' ),\n 'new_item_name' => __( 'New Project Type Name', 'wpwa' ),\n 'menu_name' => __( 'Project Type', 'wpwa' ),\n ),\n 'hierarchical' => true,\n 'capabilities' => array(\n 'manage_terms' => 'manage_project_type',\n 'edit_terms' => 'edit_project_type',\n 'delete_terms' => 'delete_project_type',\n 'assign_terms' => 'assign_project_type'\n ),\n )\n );\n }", "title": "" }, { "docid": "74051a036a30484666311145d66253ed", "score": "0.46920788", "text": "function taxonomies_for_pages() {\n register_taxonomy_for_object_type( 'post_tag', 'page' );\n register_taxonomy_for_object_type( 'category', 'page' );\n}", "title": "" }, { "docid": "618e041f438778e8923a2fa5c2e7eb45", "score": "0.46870226", "text": "function add_taxonomies_to_pages() {\r\n register_taxonomy_for_object_type( 'post_tag', 'page' );\r\n register_taxonomy_for_object_type( 'category', 'page' );\r\n }", "title": "" }, { "docid": "b4e47cfb13c69a3817cfe9c9228d78d6", "score": "0.46782967", "text": "protected static function get_taxonomy_map( $object_type = 'post' ) {\n\t\t$taxonomy_map = [];\n\t\t$post_taxonomies = get_object_taxonomies( $object_type, 'objects' );\n\n\t\tif ( empty( $post_taxonomies ) ) {\n\t\t\treturn $taxonomy_map;\n\t\t}\n\n\t\tforeach ( $post_taxonomies as $tax ) {\n\t\t\tif ( $tax->public && ! empty( $tax->show_in_rest ) ) {\n\t\t\t\t$taxonomy_map[ $tax->rest_base ] = [ 'taxonomy' => $tax->name ];\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * Filters taxonomies map\n\t\t *\n\t\t * @since 0.6.1\n\t\t * @param array $map Taxonomy map.\n\t\t */\n\t\t$taxonomy_map = apply_filters( 'bridge_post_taxonomies_map', $taxonomy_map );\n\n\t\treturn $taxonomy_map;\n\t}", "title": "" }, { "docid": "127c305f964dd2b5de31c4f429028b9f", "score": "0.46543896", "text": "function create_tag_taxonomies() \n{\n // Add new taxonomy, NOT hierarchical (like tags)\n $labels = array(\n 'name' => _x( 'Palavras chavs', 'taxonomy general name' ),\n 'singular_name' => _x( 'Palavra chave', 'taxonomy singular name' ),\n 'search_items' => __( 'Buscar palavras chaves' ),\n 'popular_items' => __( 'Palavras chaves mais usadas' ),\n 'all_items' => __( 'Todos as palavras chaves' ),\n 'parent_item' => null,\n 'parent_item_colon' => null,\n 'edit_item' => __( 'Editar palavra chave' ), \n 'update_item' => __( 'Atualizar palavra chave' ),\n 'add_new_item' => __( 'Adicionar palavra chave' ),\n 'new_item_name' => __( 'Nova palavras chave' ),\n 'separate_items_with_commas' => __( 'Separe palavras chaves com virgulas' ),\n 'add_or_remove_items' => __( 'Adicionar ou remover palavras chaves' ),\n 'choose_from_most_used' => __( 'Escolha entre as palavras chaves mais usadas' ),\n 'menu_name' => __( 'Filtros' ),\n ); \n\n register_taxonomy('Palavra chave','acervo',array(\n 'hierarchical' => false,\n 'labels' => $labels,\n 'show_ui' => true,\n 'update_count_callback' => '_update_post_term_count',\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'Palavra chave' ),\n ));\n}", "title": "" }, { "docid": "c3504c5fe0574cd5f0a5774b6b94feba", "score": "0.4651357", "text": "function register_taxonomies() {\n\n\t\tif ( is_array( $this->taxonomy_settings ) ) {\n\n\t\t\t// Foreach taxonomy registered with the post type.\n\t\t\tforeach ( $this->taxonomy_settings as $taxonomy_name => $options ) {\n\n\t\t\t\t// Register the taxonomy if it doesn't exist.\n\t\t\t\tif ( ! taxonomy_exists( $taxonomy_name ) ) {\n\n\t\t\t\t\t// Register the taxonomy with Wordpress\n\t\t\t\t\tregister_taxonomy( $taxonomy_name, $this->post_type_name, $options );\n\n\t\t\t\t} else {\n\n\t\t\t\t\t// If taxonomy exists, attach exisiting taxonomy to post type.\n\t\t\t\t\tregister_taxonomy_for_object_type( $taxonomy_name, $this->post_type_name );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7239145686e4934fe3efab61e0733222", "score": "0.4639133", "text": "function get_terms_by_post_type($taxonomies, $post_type, $fields = 'all')\n {\n $args = array(\n 'post_type' => $post_type,\n 'posts_per_page' => -1\n );\n $query = new WP_Query($args);\n $terms = array();\n $terms_ids = array();\n while ($query->have_posts()) {\n $query->the_post();\n $current_terms = wp_get_post_terms($query->post->ID, $taxonomies, array(\"fields\" => $fields ));\n foreach ($current_terms as $t) {\n //avoid duplicates\n if (in_array($t->term_id, $terms_ids)) {\n $terms[$t->term_id]->count = $terms[$t->term_id]->count + 1;\n } else {\n $t->count = 1;\n $terms[$t->term_id] = $t;\n $terms_ids[] = $t->term_id;\n }\n }\n }\n wp_reset_postdata();\n\n //return array of term objects\n if ($fields == \"all\") {\n return $terms;\n }\n //return array of term ID's\n if ($fields == \"ids\") {\n foreach ($terms as $t) {\n $re[] = $t->term_id;\n }\n return $re;\n }\n //return array of term names\n if ($fields == \"name\") {\n foreach ($terms as $t) {\n $re[] = $t->name;\n }\n return $re;\n }\n // get terms with get_terms arguments\n if ($fields == \"get_terms\") {\n $terms2 = get_terms($taxonomies, $args);\n foreach ($terms as $t) {\n if (in_array($t, $terms2)) {\n $re[] = $t;\n }\n }\n return $re;\n }\n }", "title": "" }, { "docid": "2819b8901a5dfdd6f4b7025a58e7eb86", "score": "0.46209198", "text": "public function ajaxGetTaxonomies() {\n\t\t$taxonomy = kalium()->post( 'taxonomy' );\n\n\t\t$resp = array(\n\t\t\t'success' => false\n\t\t);\n\n\t\tif ( $taxonomy ) {\n\t\t\t$entries = get_terms( array(\n\t\t\t\t'taxonomy' => $taxonomy,\n\t\t\t\t'hide_empty' => false\n\t\t\t) );\n\n\t\t\t$entries_select = array();\n\t\t\t$entries_select[] = $this->anyItem();\n\n\t\t\tforeach ( $entries as $entry ) {\n\n\t\t\t\t$entries_select[] = array(\n\t\t\t\t\t'value' => $entry->term_id,\n\t\t\t\t\t'text' => $entry->name\n\t\t\t\t);\n\t\t\t}\n\n\t\t\twp_reset_postdata();\n\n\t\t\t$resp['entries'] = $entries_select;\n\t\t\t$resp['success'] = true;\n\t\t}\n\n\t\techo json_encode( $resp );\n\t\tdie();\n\t}", "title": "" }, { "docid": "6d74379f1d3501fa2a1418c3255de3b1", "score": "0.46141717", "text": "function register_post_tax() {\n\nregister_post_type('custom', array(\n\t'label' => __('Custom Post Type'),\n\t'singular_label' => __('Custom Post Type'),\n\t'public' => true,\n\t'show_ui' => true,\n\t'capability_type' => 'post',\n\t'hierarchical' => false,\n\t'rewrite' => true,\n\t'query_var' => false,\n\t'has_archive' => true,\n\t'supports' => array('title', 'editor', 'author')\n));\n\nregister_taxonomy( 'taxo', 'custom', array( \n'hierarchical' => true, \n'label' => 'Custom Taxonomy', \n'query_var' => true, \n'rewrite' => true )\n);\n\n}", "title": "" }, { "docid": "459f144302741f8749b855f8481ed421", "score": "0.46103805", "text": "private static function register_taxonomies() {\n\n\t\tself::$tax_priority = new Flightless_Taxonomy('issue_priority');\n\t\tself::$tax_priority->post_types[] = self::POST_TYPE;\n\t\tself::$tax_priority->set_label( __('Priority', 'buggypress'), __('Priorities', 'buggypress') );\n\t\tself::$tax_priority->public = TRUE;\n\t\tself::$tax_priority->query_var = TRUE;\n\t\tself::$tax_priority->slug = _x( 'priority', 'taxonomy slug', 'buggypress' );\n\t\tself::$tax_priority->set_default_terms(array(\n\t\t\t'critical' => array('name' => 'Critical', 'description' => 'Must be fixed ASAP'),\n\t\t\t'high' => array('name' => 'High', 'description' => 'High priority'),\n\t\t\t'medium' => array('name' => 'Medium', 'description' => 'Medium priority'),\n\t\t\t'low' => array('name' => 'Low', 'description' => 'Low priority'),\n\t\t));\n\n\t\tnew BuggyPress_TaxonomyOrder(self::$tax_priority->get_id());\n\n\t\tself::$tax_resolution = new Flightless_Taxonomy('issue_resolution');\n\t\tself::$tax_resolution->post_types[] = self::POST_TYPE;\n\t\tself::$tax_resolution->set_label( __('Resolution', 'buggypress'), __('Resolutions', 'buggypress') );\n\t\tself::$tax_resolution->public = TRUE;\n\t\tself::$tax_resolution->query_var = TRUE;\n\t\tself::$tax_resolution->slug = _x( 'resolution', 'taxonomy slug', 'buggypress' );\n\t\tself::$tax_resolution->set_default_terms(array(\n\t\t\t'unresolved' => array('name' => 'Unresolved', 'description' => 'Not yet resolved'),\n\t\t\t'fixed' => array('name' => 'Fixed', 'description' => 'All necessary action has been taken'),\n\t\t\t'wont-fix' => array('name' => 'Will Not Fix', 'description' => 'A decision has been made to leave it as-is'),\n\t\t\t'duplicate' => array('name' => 'Duplicate', 'description' => 'This duplicates another issue'),\n\t\t\t'cant-reproduce' => array('name' => 'Cannot Reproduce', 'description' => 'The problem cannot be reproduced'),\n\t\t));\n\t\tnew BuggyPress_TaxonomyOrder(self::$tax_resolution->get_id());\n\n\t\tself::$tax_status = new Flightless_Taxonomy('issue_status');\n\t\tself::$tax_status->post_types[] = self::POST_TYPE;\n\t\tself::$tax_status->set_label( __('Status', 'buggypress'), __('Statuses', 'buggypress') );\n\t\tself::$tax_status->public = TRUE;\n\t\tself::$tax_status->query_var = TRUE;\n\t\tself::$tax_status->slug = _x( 'status', 'taxonomy slug', 'buggypress' );\n\t\tself::$tax_status->set_default_terms(array(\n\t\t\t'open' => array('name' => 'Open', 'description' => 'Not yet complete'),\n\t\t\t'resolved' => array('name' => 'Resolved', 'description' => 'Completed, but not yet verified'),\n\t\t\t'closed' => array('name' => 'Closed', 'description' => 'Completed and verified'),\n\t\t\t'deferred' => array('name' => 'Deferred', 'description' => 'Action may be taken in the future'),\n\t\t));\n\t\tnew BuggyPress_TaxonomyOrder(self::$tax_status->get_id());\n\n\t\tself::$tax_type = new Flightless_Taxonomy('issue_type');\n\t\tself::$tax_type->post_types[] = self::POST_TYPE;\n\t\tself::$tax_type->set_label( __('Type', 'buggypress'), __('Types', 'buggypress') );\n\t\tself::$tax_type->public = TRUE;\n\t\tself::$tax_type->query_var = TRUE;\n\t\tself::$tax_type->slug = _x( 'type', 'taxonomy slug', 'buggypress' );\n\t\tself::$tax_type->set_default_terms(array(\n\t\t\t'bug' => array('name' => 'Bug', 'description' => 'A bug that needs to be fixed'),\n\t\t\t'feature' => array('name' => 'Feature', 'description' => 'A new feature to add'),\n\t\t\t'task' => array('name' => 'Task', 'description' => 'A general task to complete'),\n\t\t));\n\t\tnew BuggyPress_TaxonomyOrder(self::$tax_type->get_id());\n\t}", "title": "" }, { "docid": "638cbcece39e0b5cd1189daa7bdcd3d4", "score": "0.45976382", "text": "function acfe_get_taxonomy_objects($args = array()){\n \n // vars\n $return = array();\n \n // Post Types\n $taxonomies = acf_get_taxonomies($args);\n \n // Choices\n if(!empty($taxonomies)){\n \n foreach($taxonomies as $taxonomy){\n \n $taxonomy_object = get_taxonomy($taxonomy);\n \n $return[$taxonomy_object->name] = $taxonomy_object;\n \n }\n \n }\n \n return $return;\n \n}", "title": "" }, { "docid": "3b1b9204b94ee6606ceae283d4beca02", "score": "0.45941257", "text": "function mmir_exportMetas($isBackup = false)\n{\n $postTypesToExclude = array(\n 'revision',\n 'attachment',\n 'nav_menu_item',\n 'custom_css',\n 'customize_changeset',\n 'oembed_cache',\n 'acf-field-group',\n 'acf-field',\n 'messages'\n );\n $allPostTypes = get_post_types();\n\n foreach ($postTypesToExclude as $pte) {\n unset($allPostTypes[$pte]);\n }\n\n // Getting all posts for each post type\n\n $formattedPosts = array();\n\n foreach ($allPostTypes as $pte) {\n // Sorting by post types\n\n $formattedPosts[$pte] = array();\n\n // Getting all posts from current post type\n\n $args = array('post_type' => $pte, 'posts_per_page' => -1, 'orderby' => 'ID', 'order' => 'ASC');\n $allPostsOfPostType = get_posts($args);\n\n // Ordering and cleaning up\n\n foreach ($allPostsOfPostType as $singlePost) {\n\n $postitem = array();\n $postitem['id'] = $singlePost->ID;\n $postitem['url'] = get_permalink($postitem['id']);\n\n if (defined('WPSEO_VERSION')) {\n // Meta title\n $postitem['meta_title'] = get_post_meta($postitem['id'], '_yoast_wpseo_title');\n // Cleanup\n if (!empty($postitem['meta_title'])) {\n $postitem['meta_title'] = $postitem['meta_title'][0];\n } else {\n $postitem['meta_title'] = '';\n }\n\n // Meta desc\n $postitem['meta_desc'] = get_post_meta($postitem['id'], '_yoast_wpseo_metadesc');\n // Cleanup\n if (!empty($postitem['meta_desc'])) {\n $postitem['meta_desc'] = $postitem['meta_desc'][0];\n } else {\n $postitem['meta_desc'] = '';\n }\n } else {\n throw new Exception(\"Yoast is not installed or enabled.\");\n break;\n }\n\n $formattedPosts[$pte][] = $postitem;\n }\n\n // Putting it all inside a CSV file\n\n $csv_firstline = array(\"Wordpress ID\", \"URL\", \"Title\", \"Description\");\n $csv_fields = array();\n $csv_fields[] = $csv_firstline;\n if ($isBackup) {\n $csv_file = fopen(__DIR__ . \"/backup/_backup_mymetaisrich\" . date('m_d_Y__H_i_s') . \".csv\", \"w+\");\n } else {\n $csv_filename = \"/file/mymetaisrich_\" . date('m_d_Y__H_i_s') . '.csv';\n $csv_file = fopen(__DIR__ . $csv_filename, \"w+\");\n }\n\n foreach ($formattedPosts as $postType) {\n foreach ($postType as $postData) {\n $csv_fields[] = $postData;\n }\n }\n\n foreach ($csv_fields as $line) {\n fputcsv($csv_file, $line, ';');\n }\n\n fclose($csv_file);\n }\n\n if (!$isBackup) {\n echo '<a class=\"export__downloadlink\" href=\"/wp-content/plugins/mymetaisrich' . $csv_filename . '\" download>Download exported file</a>';\n }\n}", "title": "" }, { "docid": "2fe29a22c8297fcb20a50ff8ec840d65", "score": "0.45915148", "text": "function custom_taxonomies_terms_links(){\n // get post by post id\n $post = get_post( $post->ID );\n\n // get post type by post\n $post_type = $post->post_type;\n\n // get post type taxonomies\n $taxonomies = get_object_taxonomies( $post_type, 'objects' );\n\n $out = array();\n foreach ( $taxonomies as $taxonomy_slug => $taxonomy ){\n\n // get the terms related to post\n $terms = get_the_terms( $post->ID, $taxonomy_slug );\n\n if ( !empty( $terms ) ) {\n foreach ( $terms as $term ) {\n $out[] =\n ' <a href=\"'\n . get_term_link( $term->slug, $taxonomy_slug ) .'\">'\n . $term->name\n . \"</a>\\n\";\n }\n \n }\n }\n\n return implode('', $out );\n}", "title": "" }, { "docid": "2b7a7da61ecfcf98a718b70228634fce", "score": "0.4589738", "text": "function bli_custom_taxonomies() {\n // Add new taxonomy, make it hierarchical (like categories)\n $labels = array(\n 'name' => _x( 'Types of Merchants', 'taxonomy general name' ),\n 'singular_name' => _x( 'Types of Merchant', 'taxonomy singular name' ),\n 'search_items' => __( 'Search Type of Merchants' ),\n 'all_items' => __( 'All Types of Merchants' ),\n 'parent_item' => __( 'Parent Types of Merchants' ),\n 'parent_item_colon' => __( 'Parent Types of Merchants:' ),\n 'edit_item' => __( 'Edit Type of Merchants' ),\n 'update_item' => __( 'Update Type of Merchants' ),\n 'add_new_item' => __( 'Add New Type of Merchants' ),\n 'new_item_name' => __( 'New Type of Merchants Name' ),\n 'menu_name' => __( 'Type of Merchants' ),\n );\n\n $args = array(\n 'hierarchical' => true,\n 'labels' => $labels,\n 'show_ui' => true,\n 'show_admin_column' => true,\n 'query_var' => true,\n 'rewrite' => array( 'slug' => 'merchants' ),\n );\n\n register_taxonomy( 'merchants_type', array( 'merchants' ), $args );\n\n}", "title": "" }, { "docid": "67adf2f1c421b9945d5e073899a5a6a7", "score": "0.4588717", "text": "function kfp_fman_taxonomy_provincias() {\n\t$labels = array(\n\t\t'name' => _x( 'Provincias', 'Taxonomy General Name', 'kfp_fman' ),\n\t\t'singular_name' => _x( 'Provincia', 'Taxonomy Singular Name', 'kfp_fman' ),\n\t\t'menu_name' => __( 'Provincias-fman', 'kfp_fman' ),\n\t\t'all_items' => __( 'Todas las provincias', 'kfp_fman' ),\n\t\t'new_item_name' => __( 'Nueva provincia', 'kfp_fman' ),\n\t\t'add_new_item' => __( 'Añadir nueva provincia', 'kfp_fman' ),\n\t\t'edit_item' => __( 'Editar provincia', 'kfp_fman' ),\n\t\t'update_item' => __( 'Actualizar provincia', 'kfp_fman' ),\n\t\t'view_item' => __( 'Ver provincia', 'kfp_fman' ),\n\t\t'separate_items_with_commas' => __( 'Separar provincias con comas', 'kfp_fman' ),\n\t\t'add_or_remove_items' => __( 'Añadir o eliminar provincias', 'kfp_fman' ),\n\t\t'choose_from_most_used' => __( 'Elige entre las más usadas', 'kfp_fman' ),\n\t\t'popular_items' => __( 'Provincias más frecuentes', 'kfp_fman' ),\n\t\t'search_items' => __( 'Buscar provincias', 'kfp_fman' ),\n\t\t'not_found' => __( 'No encontrada', 'kfp_fman' ),\n\t\t'no_terms' => __( 'No hay provincias', 'kfp_fman' ),\n\t\t'items_list' => __( 'Lista de provincias', 'kfp_fman' ),\n\t\t'items_list_navigation' => __( 'Lista de navegación de provincias', 'kfp_fman' ),\n\t);\n\t$args = array(\n\t\t'labels' => $labels,\n\t\t'hierarchical' => false,\n\t\t'public' => true,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'show_in_nav_menus' => true,\n\t\t'show_tagcloud' => true,\n\t);\n\t// Registra la taxonomía pero no la enlaza a ningún tipo de entrada\n\tregister_taxonomy( 'kfp_fman_provincias', array(), $args );\n}", "title": "" }, { "docid": "d45b7a840dc8653a3b4152583733c339", "score": "0.45817688", "text": "public static function export()\n {\n $batchId = TaxInfoController::getLatestBatchNumber();\n $filename = md5($batchId) . '.csv';\n\n $export = \\App\\TaxInfoExport::where('batch_id', $batchId)->first();\n\n if($export == null) {\n $export = new \\App\\TaxInfoExport();\n }\n $export->batch_id = $batchId;\n $export->storage_filename = $filename;\n $export->display_filename = 'batch_' . $batchId . '.csv';\n $export->save();\n\n $headings = [\n 'Parcel ID',\n 'Address',\n 'Zip Code',\n 'Company Name',\n 'Name 1',\n 'Name 2',\n 'Address',\n 'City/State/Zip',\n 'Tax District',\n 'School District',\n 'Rental Registration',\n 'Tax Lien',\n 'Year Built',\n 'Fin Area',\n 'Bedrooms',\n 'Full Baths',\n 'Half Baths',\n 'Acres',\n 'Tansfer Date',\n 'Transfer Price',\n 'Property Class',\n 'Land Use',\n 'Net Annual Tax',\n 'Annual Total',\n 'Payment Total',\n 'Total Total',\n ];\n\n $file = fopen(storage_path($filename), 'w');\n fputcsv($file, $headings);\n\n $running = true;\n $countSize = 1000;\n $skipSize = 0;\n\n while($running) {\n\n $taxData = TaxInfo::select(\n 'parcel_id', 'address', 'ts_zip_code',\n 'company_name', 'tbm_name_1', 'tbm_name_2',\n 'tbm_address', 'tbm_city_state_zip', 'ts_tax_district',\n 'ts_school_district', 'ts_rental_registration', 'ts_tax_lien',\n 'dd_year_built', 'dd_fin_area', 'dd_bedrooms',\n 'dd_full_baths', 'dd_half_baths', 'sd_acres',\n 'mrt_tansfer_date', 'mrt_transfer_price', 'property_class',\n 'land_use', 'net_annual_tax', 'tyd_annual_total',\n 'tyd_payment_total', 'tyd_total_total'\n )\n ->where('batch_id', $batchId)\n ->where('status', 1)\n ->skip($skipSize)\n ->limit($countSize)\n ->get()\n ->toArray();\n\n if( count($taxData) < $countSize) {\n $running = false;\n $export->status = 1;\n $export->save();\n }else{\n $skipSize += $countSize;\n }\n\n foreach($taxData as $row) {\n fputcsv($file, $row);\n }\n\n }\n }", "title": "" }, { "docid": "d35778b6c2cf5d54b29e1de2b960f8f5", "score": "0.45703626", "text": "function cptui_register_my_taxes() {\n\t\n\t$labels = array(\n\t\t'name' => __( 'Tipos de postagem', 'Veritae' ),\n\t\t'singular_name' => __( 'Tipo de postagem', 'Veritae' )\n\t);\n\t\n\t$args = array(\n\t\t'label' => __('Tipos de postagem', 'Veritae'),\n\t\t'labels' => $labels,\n\t\t'public' => true,\n\t\t\"hierarchical\" => false,\n\t\t\"show_ui\" => true,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"query_var\" => true,\n\t\t\"rewrite\" => array( 'slug' => 'tipo_postagem', 'with_front' => true, ),\n\t\t\"show_admin_column\" => false,\n\t\t\"show_in_rest\" => false,\n\t\t\"rest_base\" => \"\",\n\t\t\"show_in_quick_edit\" => false,\n\t);\n\tregister_taxonomy( 'tipo_postagem', array( 'post' ), $args );\n\t\n\t/**\n\t * Taxonomy: Áreas de conhecimento.\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( 'Áreas de conhecimento', 'Veritae' ),\n\t\t\"singular_name\" => __( 'Área de conhecimento', 'Veritae' ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( 'Áreas de conhecimento', 'Veritae' ),\n\t\t\"labels\" => $labels,\n\t\t\"public\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"label\" => \"Áreas de conhecimento\",\n\t\t\"show_ui\" => true,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"query_var\" => true,\n\t\t\"rewrite\" => array( 'slug' => 'area_conhecimento', 'with_front' => true, ),\n\t\t\"show_admin_column\" => false,\n\t\t\"show_in_rest\" => false,\n\t\t\"rest_base\" => \"\",\n\t\t\"show_in_quick_edit\" => false,\n\t);\n\tregister_taxonomy( \"area_conhecimento\", array( \"post\" ), $args );\n\n\t/**\n\t * Taxonomy: Tipos de ato.\n\t */\n\n\t$labels = array(\n\t\t\"name\" => __( 'Tipos de ato', 'Veritae' ),\n\t\t\"singular_name\" => __( 'Tipo do ato', 'Veritae' ),\n\t);\n\n\t$args = array(\n\t\t\"label\" => __( 'Tipos de ato', 'Veritae' ),\n\t\t\"labels\" => $labels,\n\t\t\"public\" => true,\n\t\t\"hierarchical\" => false,\n\t\t\"label\" => \"Tipos de ato\",\n\t\t\"show_ui\" => true,\n\t\t\"show_in_menu\" => true,\n\t\t\"show_in_nav_menus\" => true,\n\t\t\"query_var\" => true,\n\t\t\"rewrite\" => array( 'slug' => 'tipo_ato', 'with_front' => true, ),\n\t\t\"show_admin_column\" => false,\n\t\t\"show_in_rest\" => false,\n\t\t\"rest_base\" => \"\",\n\t\t\"show_in_quick_edit\" => false,\n\t);\n\tregister_taxonomy( \"tipo_ato\", array( \"post\" ), $args );\n}", "title": "" }, { "docid": "d55d82d92eb4c5bc746669fe6c51b61a", "score": "0.45655954", "text": "function wpcf_admin_export_data() {\n require_once WPCF_EMBEDDED_ABSPATH . '/common/array2xml.php';\n $xml = new ICL_Array2XML();\n $data = array();\n\n // Get groups\n $groups = get_posts('post_type=wp-types-group&post_status=null&numberposts=-1');\n if (!empty($groups)) {\n $data['groups'] = array('__key' => 'group');\n foreach ($groups as $key => $post) {\n $post = (array) $post;\n $post_data = array();\n $copy_data = array('ID', 'post_content', 'post_title',\n 'post_excerpt', 'post_type', 'post_status');\n foreach ($copy_data as $copy) {\n if (isset($post[$copy])) {\n $post_data[$copy] = $post[$copy];\n }\n }\n $data['groups']['group-' . $post['ID']] = $post_data;\n $meta = get_post_custom($post['ID']);\n if (!empty($meta)) {\n $data['groups']['group-' . $post['ID']]['meta'] = array();\n foreach ($meta as $meta_key => $meta_value) {\n if (in_array($meta_key,\n array('_wp_types_group_terms',\n '_wp_types_group_post_types',\n '_wp_types_group_fields'))) {\n $data['groups']['group-' . $post['ID']]['meta'][$meta_key] = $meta_value[0];\n }\n }\n if (empty($data['groups']['group-' . $post['ID']]['meta'])) {\n unset($data['groups']['group-' . $post['ID']]['meta']);\n }\n }\n }\n }\n\n // Get fields\n $fields = wpcf_admin_fields_get_fields();\n if (!empty($fields)) {\n // WPML\n global $iclTranslationManagement;\n if (!empty($iclTranslationManagement)) {\n foreach ($fields as $field_id => $field) {\n // @todo Fix for added fields\n if (isset($iclTranslationManagement->settings['custom_fields_translation'][wpcf_types_get_meta_prefix($field) . $field_id])) {\n $fields[$field_id]['wpml_action'] = $iclTranslationManagement->settings['custom_fields_translation'][wpcf_types_get_meta_prefix($field) . $field_id];\n }\n }\n }\n $data['fields'] = $fields;\n $data['fields']['__key'] = 'field';\n }\n\n // Get custom types\n $custom_types = get_option('wpcf-custom-types', array());\n if (!empty($custom_types)) {\n foreach ($custom_types as $key => $type) {\n $custom_types[$key]['id'] = $key;\n }\n $data['types'] = $custom_types;\n $data['types']['__key'] = 'type';\n }\n\n // Get custom tax\n $custom_taxonomies = get_option('wpcf-custom-taxonomies', array());\n if (!empty($custom_taxonomies)) {\n foreach ($custom_taxonomies as $key => $tax) {\n $custom_taxonomies[$key]['id'] = $key;\n }\n $data['taxonomies'] = $custom_taxonomies;\n $data['taxonomies']['__key'] = 'taxonomy';\n }\n\n // Offer for download\n $data = $xml->array2xml($data, 'types');\n\n $sitename = sanitize_title(get_bloginfo('name'));\n if (!empty($sitename)) {\n $sitename .= '.';\n }\n $filename = $sitename . 'types.' . date('Y-m-d') . '.xml';\n $code = \"<?php\\r\\n\";\n $code .= '$timestamp = ' . time() . ';' . \"\\r\\n\";\n $code .= '$auto_import = ';\n $code .= (isset($_POST['embedded-settings']) && $_POST['embedded-settings'] == 'ask') ? 0 : 1;\n $code .= ';' . \"\\r\\n\";\n $code .= \"\\r\\n?>\";\n\n if (class_exists('ZipArchive')) { \n $zipname = $sitename . 'types.' . date('Y-m-d') . '.zip';\n \n $file = tempnam(\"tmp\", \"zip\");\n $zip = new ZipArchive();\n $zip->open($file, ZipArchive::OVERWRITE);\n \n $zip->addFromString('settings.xml', $data);\n $zip->addFromString('settings.php', $code);\n $zip->close();\n $data = file_get_contents($file);\n header(\"Content-Description: File Transfer\");\n header(\"Content-Disposition: attachment; filename=\" . $zipname);\n header(\"Content-Type: application/zip\");\n header(\"Content-length: \" . strlen($data) . \"\\n\\n\");\n header(\"Content-Transfer-Encoding: binary\");\n echo $data;\n unlink($file);\n die();\n } else {\n // download the xml.\n \n header(\"Content-Description: File Transfer\");\n header(\"Content-Disposition: attachment; filename=\" . $filename);\n header(\"Content-Type: application/xml\");\n header(\"Content-length: \" . strlen($data) . \"\\n\\n\");\n echo $data;\n die();\n }\n}", "title": "" }, { "docid": "a6f97deeabe8b1d1c444e5ec3520f1cb", "score": "0.45599216", "text": "function echo_wdtax_type_field( $args ) {\n $options_arr = get_option( 'wdtax_options' );\n $taxonomy_n = $args['taxonomy_n'];\n if ( isset ($options_arr[$taxonomy_n] ) ) {\n $options = $options_arr[$taxonomy_n];\n } else {\n $options = array();\n }\n $post_types = array_keys( get_post_types( ['public'=>True] ) );\n foreach ( $post_types as $type) {\n $option_name = esc_attr('wdtax_options['.$taxonomy_n.'][wdtax_types]['.$type.']');\n $option_id = esc_attr( $type );\n if (isset( $options[ 'wdtax_types' ][ $type ]) ) {\n $checked = 'checked = \"checked\"';\n } else {\n $checked = '';\n }\n echo '<input type=\"checkbox\"\n name='.$option_name.'\n id=\"'.$option_id.'\"\n value=\"'.$option_id.'\"\n '.$checked.' />';\n echo $type.'<br />';\n }\n submit_button( 'Save Taxonomies' );\n}", "title": "" }, { "docid": "61bb41db9059a3f65358dc37e2addeca", "score": "0.45592517", "text": "function theme_custom_taxonomies() {\n\t\n\t//add new taxonomy, hierarchical\n\t$labels = array(\n\t\t'name' => 'Fields', //always plural!\n\t\t'singular_name' => 'Field',\n\t\t'search_items' => 'Search Fields',\n\t\t'all_items' => 'All Fields',\n\t\t'parent_item' => 'Parent Field',\n\t\t'parent_item_colon' => 'Parent Field:',\n\t\t'edit_item' => 'Edit Field',\n\t\t'update_item' => 'Update Field',\n\t\t'add_new_item' => 'Add New Field',\n\t\t'new_item_name' => 'New Field Name',\n\t\t'menu_name' => 'Fields'\n\t);\n\n\t$args = array(\n\t\t'hierarchical' => true, //ie categories\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true, //ability to create custom queries\n\t\t'rewrite' => array('slug' => 'field'), //rewrite slug (name of taxonomy, lower case - DON'T USE TYPE!)\n\t);\n\n\t//register 'field' taxonomy to 'portfolio' custom post type\n\tregister_taxonomy('field' , array('portfolio'), $args);\n\n}", "title": "" }, { "docid": "8e1b024213317a340df1b855584621cc", "score": "0.45528105", "text": "public function registerTypeTaxonomy() {\n $args = array(\n 'public' => true,\n 'label' => 'Type',\n 'description' => 'The \"file type\" of the data posts'\n );\n register_taxonomy(\n $this->getTypeTaxonomyName(),\n $this->post_type,\n $args\n );\n }", "title": "" }, { "docid": "398a7ee22971f235e2d8b3cf732d051f", "score": "0.4546603", "text": "public function all($type=FALSE)\n {\n if ($type)\n return $this->_all($type);\n\n\n return DB::table('wp_term_taxonomy')\n ->select(\n 'wp_terms.term_id AS id', \n 'wp_terms.name',\n 'wp_terms.slug', \n 'wp_term_taxonomy.taxonomy', \n 'wp_term_taxonomy.description',\n 'parent_terms.term_id AS parent_id', \n 'parent_terms.name AS parent_name', \n 'parent_terms.slug AS parent_slug'\n )\n ->where('wp_term_taxonomy.taxonomy','post_tag')\n ->orWhere('wp_term_taxonomy.taxonomy','category')\n ->join(\n 'wp_terms',\n 'wp_term_taxonomy.term_id', '=', 'wp_terms.term_id'\n )\n ->leftJoin(\n 'wp_terms AS parent_terms', \n 'wp_term_taxonomy.parent', '=', 'parent_terms.term_id'\n )\n ->orderBy('wp_terms.name','asc')\n ->get();\n }", "title": "" }, { "docid": "c4944566cab28dc8dc0505a11f38fc97", "score": "0.45435083", "text": "function create_custom_tax() {\n\t$custTaxs= array(\n\t\t'regulation-category' => array(\n\t\t\t'title' => 'Regulation Category',\n\t\t\t'post-type' => array('regulation')\n\t\t),\n\t);\n\n\tforeach ($custTaxs as $key => $value) {\n\t\t$labels = array(\n\t\t\t'name' => __( $value['title'], 'hotels' ),\n\t\t\t'singular_name' => __( $value['title'], 'hotels' ),\n\t\t\t'search_items' => __( 'Search ' . $value['title'], 'hotels' ),\n\t\t\t'all_items' => __( 'All ' . $value['title'], 'hotels' ),\n\t\t\t'parent_item' => __( 'Parent '.$value['title'], 'hotels' ),\n\t\t\t'parent_item_colon' => __( 'Parent : '.$value['title'], 'hotels' ),\n\t\t\t'edit_item' => __( 'Edit ' . $value['title'], 'hotels' ),\n\t\t\t'update_item' => __( 'Update ' . $value['title'], 'hotels' ),\n\t\t\t'add_new_item' => __( 'Add ' . $value['title'], 'hotels' ),\n\t\t\t'new_item_name' => __( 'New ' . $value['title'], 'hotels' ),\n\t\t\t'menu_name' => __( $value['title'], 'hotels' ),\n\t\t);\n\t\t// $capabilities = array(\n\t\t// \t'manage_terms' => $key,\n\t\t// \t// 'edit_terms' => $key,\n\t\t// \t// 'delete_post' => $key,\n\t\t// \t// 'delete_terms' => $key,\n\t\t// \t'assign_terms' => 'edit_posts',\n\t\t// \t// 'delete_posts' => 'edit_pages',\n\t\t// \t// 'publish_posts' => 'edit_pages',\n\t\t// \t// 'read_private_posts' => 'edit_pages'\n\t\t// );\n\t\t$args =\tarray(\n\t\t\t'labels' => $labels,\n\t\t\t'hierarchical' => true,\n\t\t\t'query_var' => true,\n\t\t\t'show_admin_column' => true,\n\t\t\t'rewrite'\t => true,\n\t\t\t//'capabilities' => $capabilities,\n\t\t);\n\t\tregister_taxonomy($key, $value['post-type'],$args);\n\t}\n}", "title": "" }, { "docid": "6d4c6c890401924dd8acee8ac0f64e02", "score": "0.45376572", "text": "function qw_filter_taxonomies( $filters ) {\n\t$ts = get_taxonomies( array(), 'objects' );\n\n\tif ( count( $ts ) > 0 ) {\n\t\tforeach ( $ts as $t ) {\n\t\t\t$filters[ 'taxonomy_' . $t->name ] = array(\n\t\t\t\t'title' => 'Taxonomy: ' . $t->label,\n\t\t\t\t'taxonomy' => $t,\n\t\t\t\t'description' => 'Creates a taxonomy filter based on terms selected.',\n\t\t\t\t'form_callback' => 'qw_filter_taxonomies_form',\n\t\t\t\t'query_args_callback' => 'qw_filter_taxonomies_args',\n\t\t\t\t'query_display_types' => array( 'page', 'widget' ),\n\t\t\t\t// exposed\n\t\t\t\t'exposed_form' => 'qw_filter_taxonomies_exposed_form',\n\t\t\t\t'exposed_process' => 'qw_filter_taxonomies_exposed_process',\n\t\t\t\t'exposed_settings_form' => 'qw_filter_taxonomies_exposed_settings_form',\n\t\t\t);\n\n\t\t\t// update titles for built in taxonomies\n\t\t\tif ( $t->_builtin ) {\n\t\t\t\t$filters[ 'taxonomy_' . $t->name ]['title'] = 'Taxonomy: ' . $t->label;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $filters;\n}", "title": "" }, { "docid": "9e155d907e8c331868900ee5c0ddf336", "score": "0.45354337", "text": "function create_pc_db_taxonomies() {\r\n\t\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Topics', 'taxonomy general name' ),\r\n\t\t'singular_name' => _x( 'Topic', 'taxonomy singular name' ),\r\n\t\t'search_items' => __( 'Search Topics' ),\r\n\t\t'all_items' => __( 'All Topics' ),\r\n\t\t'parent_item' => __( 'Parent Topic' ),\r\n\t\t'parent_item_colon' => __( 'Parent Topic:' ),\r\n\t\t'edit_item' => __( 'Edit Topic' ),\r\n\t\t'update_item' => __( 'Update Topic' ),\r\n\t\t'add_new_item' => __( 'Add New Topic' ),\r\n\t\t'new_item_name' => __( 'New Topic Name' ),\r\n\t\t'menu_name' => __( 'Topic' ),\r\n\t);\r\n\r\n\t$args = array(\r\n\t\t'hierarchical' => true,\r\n\t\t'labels' => $labels,\r\n\t\t'show_ui' => true,\r\n\t\t'show_admin_column' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'topics' ),\r\n\t);\r\n\tregister_taxonomy( 'topics', array( 'post' ), $args );\r\n\t\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Brands', 'taxonomy general name' ),\r\n\t\t'singular_name' => _x( 'Brand', 'taxonomy singular name' ),\r\n\t\t'search_items' => __( 'Search Brands' ),\r\n\t\t'all_items' => __( 'All Brands' ),\r\n\t\t'parent_item' => __( 'Parent Brand' ),\r\n\t\t'parent_item_colon' => __( 'Parent Brand:' ),\r\n\t\t'edit_item' => __( 'Edit Brand' ),\r\n\t\t'update_item' => __( 'Update Brand' ),\r\n\t\t'add_new_item' => __( 'Add New Brand' ),\r\n\t\t'new_item_name' => __( 'New Brand Name' ),\r\n\t\t'menu_name' => __( 'Brand' ),\r\n\t);\r\n\r\n\t$args = array(\r\n\t\t'hierarchical' => true,\r\n\t\t'labels' => $labels,\r\n\t\t'show_ui' => true,\r\n\t\t'show_admin_column' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'brands' ),\r\n\t);\r\n\tregister_taxonomy( 'brands', array( 'post' ), $args );\r\n\t\r\n\t$labels = array(\r\n\t\t'name' => _x( 'Local', 'taxonomy general name' ),\r\n\t\t'singular_name' => _x( 'Local', 'taxonomy singular name' ),\r\n\t\t'search_items' => __( 'Search Local' ),\r\n\t\t'all_items' => __( 'All Local' ),\r\n\t\t'parent_item' => __( 'Parent Local' ),\r\n\t\t'parent_item_colon' => __( 'Parent Local:' ),\r\n\t\t'edit_item' => __( 'Edit Local' ),\r\n\t\t'update_item' => __( 'Update Local' ),\r\n\t\t'add_new_item' => __( 'Add New Local' ),\r\n\t\t'new_item_name' => __( 'New Local Name' ),\r\n\t\t'menu_name' => __( 'Local' ),\r\n\t);\r\n\r\n\t$args = array(\r\n\t\t'hierarchical' => true,\r\n\t\t'labels' => $labels,\r\n\t\t'show_ui' => true,\r\n\t\t'show_admin_column' => true,\r\n\t\t'query_var' => true,\r\n\t\t'rewrite' => array( 'slug' => 'local' ),\r\n\t);\r\n\t\r\n\tregister_taxonomy( 'local', array( 'post' ), $args );\r\n\t\r\n\t\r\n\t/*register_taxonomy( 'coupons', 'post', array( 'hierarchical' => true, 'label' => __('Coupons', 'offers'), 'query_var' => 'coupons', 'rewrite' => array( 'slug' => 'coupons' ) ) );\r\n\tregister_taxonomy( 'contests', 'post', array( 'hierarchical' => true, 'label' => __('Contests', 'offers'), 'query_var' => 'contests', 'rewrite' => array( 'slug' => 'contests' ) ) );\r\n\tregister_taxonomy( 'surveys', 'get_survey', array( 'hierarchical' => true, 'label' => __('Surveys', 'surveys'), 'query_var' => 'surveys', 'rewrite' => array( 'slug' => 'surveys' ) ) );\r\n\tregister_taxonomy( 'exclusive', 'post', array( 'hierarchical' => false, 'label' => __('Exclusive', 'offers'), 'query_var' => 'exclusive', 'rewrite' => array( 'slug' => 'exclusive' ) ) );*/\r\n}", "title": "" }, { "docid": "7138bc868d8c3f3005c93232fbea2ed4", "score": "0.45312265", "text": "function exportCategories($export)\n{\n\t$shop_data\t\t= $export->sSettings();\n\t$category_tree\t= $export->sCategoryTree();\n\t$categories\t\t= $export->sCategories();\n\t\n\t$xmlString = '<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>\n\t\t<categories>';\n\t\n\t//Hier werden die Kategorien für den Export verarbeitet\n\tforeach ($categories as $categorie)\n\t{\n\t\t//anpassen der parentID nur für die Hauptkategorien muss gemacht werden damit der baum in der auftaucht\n\t\t$categorie['parentID'] = (int) $categorie['parentID'];\n\t\t\n\t\tif($categorie['parentID'] == 1)\n\t\t{\n\t\t\t$categorie['parentID'] = 0;\n\t\t}\n\t\t\n\t\t$xmlString .='<categorie>'.\n\t\t\t'<categories_id>'.$categorie['categoryID'].'</categories_id>'.\n\t\t\t'<parent_id>'. $categorie['parentID'].'</parent_id>'.\n\t\t\t'<categories_status>'.$categorie['active'].'</categories_status>'.\n\t\t\t'<categories_name>'. $categorie['description'] .'</categories_name>' .\n\t\t\t'</categorie>';\n\t}\n\t$xmlString .= '</categories>\n\t\t\t\t\t<tax_classes>';\n\t\n\t//Hier werden die Steuerklassen verarbeitet\n\tforeach($shop_data['tax'] as $id => $values)\n\t{\n\t\t$xmlString .= '<tax_class>' .\n\t\t\t\t\t\t'<tax_rates_id>'. $id .'</tax_rates_id>' .\n\t\t\t\t\t\t'<tax_class_id>'. $id .'</tax_class_id>' .\n\t\t\t\t\t\t'<tax_rate>'. $values['tax'] .'</tax_rate>' .\n\t\t\t\t\t\t'<tax_description>'. $values['description'] .'</tax_description>' .\n\t\t\t\t\t\t'<tax_class_description>'. $values['description'] .'</tax_class_description>' .\n\t\t\t\t\t\t'<tax_class_title>'. $values['description'] .'</tax_class_title>' .\n\t\t\t\t\t'</tax_class>';\n\t}\n\t\n\t$xmlString .= \"</tax_classes>\n\t\t\t\t\t<manufacturers>\";\n\n\tforeach($shop_data['manufacturers'] as $id => $manufacturer)\n\t{\n\t\t$xmlString .= '<manufacturer>' .\n\t\t\t\t\t\t'<manufacturer_id>'. $id .'</manufacturer_id>'.\n\t\t\t\t\t\t'<manufacturer_name>'. $manufacturer .'</manufacturer_name>'.\n\t\t\t\t\t'</manufacturer>';\n\t}\n\t\n\t$xmlString .= \"</manufacturers>\";\n\t\n\techo $xmlString;\n\t\n\t//variable um dem sript mitzuteilen das ex ein export ist\n\t$export = 'export';\n\treturn $export;\n}", "title": "" }, { "docid": "98d58b3e6f36b6cc0db36d27d5c34c1f", "score": "0.45292518", "text": "function theme_get_taxonomy_data($taxonomy) {\n $out = array();\n $terms = get_terms($taxonomy, array('hide_empty'=>false));\n foreach ($terms as $tax) {\n $out[$tax->slug] = esc_html($tax->name);\n }\n return $out;\n }", "title": "" }, { "docid": "b83a694f9386bffb981db875b127f4c7", "score": "0.45242977", "text": "public function getTaxonomyType()\n {\n return $this->taxonomy_type;\n }", "title": "" }, { "docid": "f9ca3564a5607a77c8d60fe6ae616115", "score": "0.45210364", "text": "public static function get_types() {\n\t\t$terms = get_terms(self::$tax_type->get_id(), array(\n\t\t\t'hide_empty' => FALSE,\n\t\t));\n\t\t// TODO: sort\n\t\treturn $terms;\n\t}", "title": "" }, { "docid": "a61231d0e784c3e29e3c9c7755f7bc9a", "score": "0.45195454", "text": "public function tax($taxonomy = null)\n {\n $builder = $this->belongsToMany(PostTaxonomy::class,\n 'term_relationships', 'object_id', 'term_taxonomy_id');\n if ($taxonomy) {\n $builder->type($taxonomy);\n }\n\n return $builder;\n }", "title": "" }, { "docid": "4bada1893ba3405ee3bca2f246e1738d", "score": "0.45179394", "text": "function asmi_remove_taxonomies() {\n\tregister_taxonomy( 'post_tag', array() );\n\tregister_taxonomy( 'category', array() );\n}", "title": "" }, { "docid": "ef70c68e5ca1f5e445598b4feff45a27", "score": "0.45170575", "text": "function register_taxonomies() {\n register_taxonomy(\n 'duty',\n 'work',\n array(\n 'label' => __( 'Duties' ),\n 'hierarchical' => false\n )\n );\n register_taxonomy(\n 'tech',\n 'work',\n array(\n 'label' => __( 'Techs' ),\n 'hierarchical' => false\n )\n );\n }", "title": "" }, { "docid": "563f539df6169c265c16aa809eaf6635", "score": "0.45126414", "text": "function portfolio_categories_build_taxonomies() {\n\t\tregister_taxonomy(__( \"portfolio_categories\" , 'mav' ), array(__( \"portfolio\" , 'mav' )), array(\"hierarchical\" => true, \"label\" => __( \"Categories\" , 'mav' ), \"singular_label\" => __( \"Portfolio Categories\" , 'mav' ), \"rewrite\" => array('slug' => 'portfolio_categories', 'hierarchical' => true)));\n\t}", "title": "" }, { "docid": "e847ba713ca99471c7f1bee8225f2740", "score": "0.45122266", "text": "public static function get_taxonomies_menu($enabled = true, $internal = false) {\n global $DB;\n\n $params = array();\n if ($enabled) {\n $params = array('enabled' => $enabled);\n }\n\n if ($internal) {\n $params['tablename'] = 'sharedresource_taxonomy';\n }\n\n return $DB->get_records_menu('sharedresource_classif', $params, 'name', 'id,name');\n }", "title": "" }, { "docid": "a607d7bd5bb93442192e1f55e87b1b39", "score": "0.4508731", "text": "function lae_get_all_taxonomy_options() {\n\n $taxonomies = lae_get_all_taxonomies();\n\n $results = array();\n foreach ($taxonomies as $taxonomy) {\n $terms = get_terms(array('taxonomy' => $taxonomy));\n foreach ($terms as $term)\n $results[$term->taxonomy . ':' . $term->slug] = $term->taxonomy . ':' . $term->name;\n }\n\n return apply_filters('lae_taxonomy_options', $results);\n}", "title": "" }, { "docid": "c9e6848c7ef6d912f51f5cd1c1eb6d3e", "score": "0.4507742", "text": "public function getAllTags($taxonomy_type = 'hashtag')\n {\n foreach ($this->taxonomy as $value) {\n if ($value == $taxonomy_type) {\n if (did_action('init')) {\n $taxCollection = new TaxCollection();\n $args = ['taxonomy' => $this->taxonomy, 'hide_empty' => 0,];\n $terms = get_terms($args);\n\n\n foreach ($terms as $term) {\n $taxCollection->addTerm($term);\n }\n return $taxCollection;\n } else {\n throw new InitHookNotFiredException('Error: Call to custom taxonomy function before init hook is fired.');\n }\n }\n }\n }", "title": "" }, { "docid": "a42bd149be3253dcfc42f9bb9c8de83c", "score": "0.4503375", "text": "public static function getTerms( $taxonomies, $args = '' ) {\n\t\tglobal $wpdb;\n\t\t$empty_array = array();\n\t\t$join_relation = false;\n\t\t\n\t\t$single_taxonomy = false;\n\t\tif ( !is_array($taxonomies) ) {\n\t\t\t$single_taxonomy = true;\n\t\t\t$taxonomies = array($taxonomies);\n\t\t}\n\t\t\n\t\tforeach ( (array) $taxonomies as $taxonomy ) {\n\t\t\tif ( ! taxonomy_exists($taxonomy) ) {\n\t\t\t\t$error = new WP_Error('invalid_taxonomy', __('Invalid Taxonomy'));\n\t\t\t\treturn $error;\n\t\t\t}\n\t\t}\n\t\t$in_taxonomies = \"'\" . implode(\"', '\", $taxonomies) . \"'\";\n\t\t\n\t\t$defaults = array('orderby' => 'name', 'order' => 'ASC',\n\t\t\t'hide_empty' => true, 'exclude' => array(), 'exclude_tree' => array(), 'include' => array(),\n\t\t\t'number' => '', 'fields' => 'all', 'slug' => '', 'parent' => '',\n\t\t\t'hierarchical' => true, 'child_of' => 0, 'get' => '', 'name__like' => '',\n\t\t\t'pad_counts' => false, 'offset' => '', 'search' => '',\n\t\t\t// Simple tags added\n\t\t\t'limit_days' => 0, 'category' => 0, 'min_usage' => 0, 'st_name__like' => '' );\n\t\t\n\t\t$args = wp_parse_args( $args, $defaults );\n\t\t\n\t\t// Translate selection order\n\t\t$args['orderby'] = self::compatOldOrder( $args['selectionby'], 'orderby' );\n\t\t$args['order'] = self::compatOldOrder( $args['selection'], 'order' );\n\t\t\n\t\t$args['number'] \t= absint( $args['number'] );\n\t\t$args['offset'] \t= absint( $args['offset'] );\n\t\t$args['limit_days'] = absint( $args['limit_days'] );\n\t\t$args['min_usage'] \t= absint( $args['min_usage'] );\n\t\t\n\t\tif ( !$single_taxonomy || !is_taxonomy_hierarchical($taxonomies[0]) ||\n\t\t\t'' !== $args['parent'] ) {\n\t\t\t$args['child_of'] \t\t= 0;\n\t\t\t$args['hierarchical'] \t= false;\n\t\t\t$args['pad_counts'] \t= false;\n\t\t}\n\t\t\n\t\tif ( 'all' == $args['get'] ) {\n\t\t\t$args['child_of'] \t\t= 0;\n\t\t\t$args['hide_empty'] \t= 0;\n\t\t\t$args['hierarchical'] \t= false;\n\t\t\t$args['pad_counts'] \t= false;\n\t\t}\n\t\textract($args, EXTR_SKIP);\n\t\t\n\t\tif ( $child_of ) {\n\t\t\t$hierarchy = _get_term_hierarchy($taxonomies[0]);\n\t\t\tif ( !isset($hierarchy[$child_of]) )\n\t\t\t\treturn $empty_array;\n\t\t}\n\t\t\n\t\tif ( $parent ) {\n\t\t\t$hierarchy = _get_term_hierarchy($taxonomies[0]);\n\t\t\tif ( !isset($hierarchy[$parent]) )\n\t\t\t\treturn $empty_array;\n\t\t}\n\t\t\n\t\t// $args can be whatever, only use the args defined in defaults to compute the key\n\t\t$filter_key = ( has_filter('list_terms_exclusions') ) ? serialize($GLOBALS['wp_filter']['list_terms_exclusions']) : '';\n\t\t$key = md5( serialize( compact(array_keys($defaults)) ) . serialize( $taxonomies ) . $filter_key );\n\t\t$last_changed = wp_cache_get('last_changed', 's-terms');\n\t\tif ( !$last_changed ) {\n\t\t\t$last_changed = time();\n\t\t\twp_cache_set('last_changed', $last_changed, 's-terms');\n\t\t}\n\t\t$cache_key = \"get_terms:$key:$last_changed\";\n\t\t$cache = wp_cache_get( $cache_key, 's-terms' );\n\t\tif ( false !== $cache ) {\n\t\t\t$cache = apply_filters('get_terms', $cache, $taxonomies, $args);\n\t\t\treturn $cache;\n\t\t}\n\t\t\n\t\t$_orderby = strtolower($orderby);\n\t\tif ( 'count' == $_orderby )\n\t\t\t$orderby = 'tt.count';\n\t\tif ( 'random' == $_orderby )\n\t\t\t$orderby = 'RAND()';\n\t\telse if ( 'name' == $_orderby )\n\t\t\t$orderby = 't.name';\n\t\telse if ( 'slug' == $_orderby )\n\t\t\t$orderby = 't.slug';\n\t\telse if ( 'term_group' == $_orderby )\n\t\t\t$orderby = 't.term_group';\n\t\telseif ( empty($_orderby) || 'id' == $_orderby )\n\t\t\t$orderby = 't.term_id';\n\t\t$orderby = apply_filters( 'get_terms_orderby', $orderby, $args );\n\t\t\n\t\tif ( !empty($orderby) )\n\t\t\t$orderby = \"ORDER BY $orderby\";\n\t\telse\n\t\t\t$order = '';\n\t\t\n\t\t$where = '';\n\t\t$inclusions = '';\n\t\tif ( !empty($include) ) {\n\t\t\t$exclude = '';\n\t\t\t$exclude_tree = '';\n\t\t\t$interms = wp_parse_id_list($include);\n\t\t\tforeach ( $interms as $interm ) {\n\t\t\t\tif ( empty($inclusions) )\n\t\t\t\t\t$inclusions = ' AND ( t.term_id = ' . intval($interm) . ' ';\n\t\t\t\telse\n\t\t\t\t\t$inclusions .= ' OR t.term_id = ' . intval($interm) . ' ';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( !empty($inclusions) )\n\t\t\t$inclusions .= ')';\n\t\t$where .= $inclusions;\n\t\t\n\t\t$exclusions = '';\n\t\tif ( !empty( $exclude_tree ) ) {\n\t\t\t$excluded_trunks = wp_parse_id_list($exclude_tree);\n\t\t\tforeach ( $excluded_trunks as $extrunk ) {\n\t\t\t\t$excluded_children = (array) get_terms($taxonomies[0], array('child_of' => intval($extrunk), 'fields' => 'ids'));\n\t\t\t\t$excluded_children[] = $extrunk;\n\t\t\t\tforeach( $excluded_children as $exterm ) {\n\t\t\t\t\tif ( empty($exclusions) )\n\t\t\t\t\t\t$exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';\n\t\t\t\t\telse\n\t\t\t\t\t\t$exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( !empty($exclude) ) {\n\t\t\t$exterms = wp_parse_id_list($exclude);\n\t\t\tforeach ( $exterms as $exterm ) {\n\t\t\t\tif ( empty($exclusions) )\n\t\t\t\t\t$exclusions = ' AND ( t.term_id <> ' . intval($exterm) . ' ';\n\t\t\t\telse\n\t\t\t\t\t$exclusions .= ' AND t.term_id <> ' . intval($exterm) . ' ';\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ( !empty($exclusions) )\n\t\t\t$exclusions .= ')';\n\t\t$exclusions = apply_filters('list_terms_exclusions', $exclusions, $args );\n\t\t$where .= $exclusions;\n\t\t\n\t\t// ST Features : Restrict category\n\t\tif ( $category != 0 ) {\n\t\t\tif ( !is_array($taxonomies) )\n\t\t\t\t$taxonomies = array($taxonomies);\n\t\t\t\n\t\t\t$incategories = wp_parse_id_list($category);\n\t\t\t\n\t\t\t$taxonomies \t= \"'\" . implode(\"', '\", $taxonomies ) . \"'\";\n\t\t\t$incategories \t= \"'\" . implode(\"', '\", $incategories) . \"'\";\n\t\t\t\n\t\t\t$where .= \" AND tr.object_id IN ( \";\n\t\t\t\t$where .= \"SELECT tr.object_id FROM $wpdb->term_relationships AS tr INNER JOIN $wpdb->term_taxonomy AS tt ON tr.term_taxonomy_id = tt.term_taxonomy_id INNER JOIN $wpdb->posts as p ON tr.object_id=p.ID WHERE tt.term_id IN ($incategories) AND p.post_status='publish'\";\n\t\t\t$where .= \" ) \";\n\t\t\t\n\t\t\t$join_relation = true;\n\t\t\tunset($incategories, $category);\n\t\t}\n\t\t\n\t\t// ST Features : Limit posts date\n\t\tif ( $limit_days != 0 ) {\n\t\t\t$where .= \" AND tr.object_id IN ( \";\n\t\t\t\t$where .= \"SELECT DISTINCT ID FROM $wpdb->posts AS p WHERE p.post_status='publish' AND \".(is_page_have_tags() ? \"p.post_type IN('page', 'post')\" : \"post_type = 'post'\").\" AND p.post_date_gmt > '\" .date( 'Y-m-d H:i:s', time() - $limit_days * 86400 ). \"'\";\n\t\t\t$where .= \" ) \";\n\t\t\t\n\t\t\t$join_relation = true;\n\t\t\tunset($limit_days);\n\t\t}\n\t\t\n\t\tif ( !empty($slug) ) {\n\t\t\t$slug = sanitize_title($slug);\n\t\t\t$where .= \" AND t.slug = '$slug'\";\n\t\t}\n\t\t\n\t\tif ( !empty($name__like) )\n\t\t\t$where .= \" AND t.name LIKE '{$name__like}%'\";\n\t\t\n\t\tif ( '' !== $parent ) {\n\t\t\t$parent = (int) $parent;\n\t\t\t$where .= \" AND tt.parent = '$parent'\";\n\t\t}\n\t\t\n\t\t// ST Features : Another way to search\n\t\tif ( strpos($st_name__like, ' ') !== false ) {\n\t\t\t\n\t\t\t$st_terms_formatted = array();\n\t\t\t$st_terms = preg_split('/[\\s,]+/', $st_name_like);\n\t\t\tforeach ( (array) $st_terms as $st_term ) {\n\t\t\t\tif ( empty($st_term) )\n\t\t\t\t\tcontinue;\n\t\t\t\t$st_terms_formatted[] = \"t.name LIKE '%\".like_escape($st_term).\"%'\";\n\t\t\t}\n\t\t\t\n\t\t\t$where .= \" AND ( \" . explode( ' OR ', $st_terms_formatted ) . \" ) \";\n\t\t\tunset( $st_term, $st_terms_formatted, $st_terms );\n\t\t\n\t\t} elseif ( !empty($st_name__like) ) {\n\t\t\t\n\t\t\t$where .= \" AND t.name LIKE '%{$st_name__like}%'\";\n\t\t\n\t\t}\n\t\t\n\t\t// ST Features : Add min usage\n\t\tif ( $hide_empty && !$hierarchical ) {\n\t\t\tif ( $min_usage == 0 )\n\t\t\t\t$where .= ' AND tt.count > 0';\n\t\t\telse\n\t\t\t\t$where .= $wpdb->prepare( ' AND tt.count >= %d', $min_usage );\n\t\t}\n\t\t\n\t\t// don't limit the query results when we have to descend the family tree\n\t\tif ( ! empty($number) && ! $hierarchical && empty( $child_of ) && '' === $parent ) {\n\t\t\tif ( $offset )\n\t\t\t\t$limit = 'LIMIT ' . $offset . ',' . $number;\n\t\t\telse\n\t\t\t\t$limit = 'LIMIT ' . $number;\n\t\t} else {\n\t\t\t$limit = '';\n\t\t}\n\t\t\n\t\tif ( !empty($search) ) {\n\t\t\t$search = like_escape($search);\n\t\t\t$where .= \" AND (t.name LIKE '%$search%')\";\n\t\t}\n\t\t\n\t\t$selects = array();\n\t\tswitch ( $fields ) {\n\t \t\tcase 'all':\n\t \t\t\t$selects = array('t.*', 'tt.*');\n\t \t\t\tbreak;\n\t \t\tcase 'ids':\n\t\t\tcase 'id=>parent':\n\t \t\t\t$selects = array('t.term_id', 'tt.parent', 'tt.count');\n\t \t\t\tbreak;\n\t \t\tcase 'names':\n\t \t\t\t$selects = array('t.term_id', 'tt.parent', 'tt.count', 't.name');\n\t \t\t\tbreak;\n\t \t\tcase 'count':\n\t\t\t\t$orderby = '';\n\t\t\t\t$order = '';\n\t \t\t\t$selects = array('COUNT(*)');\n\t \t}\n\t $select_this = implode(', ', apply_filters( 'get_terms_fields', $selects, $args ));\n\t\t\n\t\t// Add inner to relation table ?\n\t\t$join_relation = $join_relation == false ? '' : \"INNER JOIN $wpdb->term_relationships AS tr ON tt.term_taxonomy_id = tr.term_taxonomy_id\";\n\t\t\n\t\t$query = \"SELECT $select_this\n\t\t\tFROM $wpdb->terms AS t\n\t\t\tINNER JOIN $wpdb->term_taxonomy AS tt ON t.term_id = tt.term_id\n\t\t\t$join_relation\n\t\t\tWHERE tt.taxonomy IN ($in_taxonomies)\n\t\t\t$where\n\t\t\t$orderby $order\n\t\t\t$limit\";\n\t\t\t// GROUP BY t.term_id\n\t\t\n\t\tif ( 'count' == $fields ) {\n\t\t\t$term_count = $wpdb->get_var($query);\n\t\t\treturn $term_count;\n\t\t}\n\t\t\n\t\t$terms = $wpdb->get_results($query);\n\t\tif ( 'all' == $fields ) {\n\t\t\tupdate_term_cache($terms);\n\t\t}\n\t\t\n\t\tif ( empty($terms) ) {\n\t\t\twp_cache_add( $cache_key, array(), 's-terms' );\n\t\t\t$terms = apply_filters('get_terms', array(), $taxonomies, $args);\n\t\t\treturn $terms;\n\t\t}\n\t\t\n\t\tif ( $child_of ) {\n\t\t\t$children = _get_term_hierarchy($taxonomies[0]);\n\t\t\tif ( ! empty($children) )\n\t\t\t\t$terms = & _get_term_children($child_of, $terms, $taxonomies[0]);\n\t\t}\n\t\t\n\t\t// Update term counts to include children.\n\t\tif ( $pad_counts && 'all' == $fields )\n\t\t\t_pad_term_counts($terms, $taxonomies[0]);\n\t\t\n\t\t// Make sure we show empty categories that have children.\n\t\tif ( $hierarchical && $hide_empty && is_array($terms) ) {\n\t\t\tforeach ( $terms as $k => $term ) {\n\t\t\t\tif ( ! $term->count ) {\n\t\t\t\t\t$children = _get_term_children($term->term_id, $terms, $taxonomies[0]);\n\t\t\t\t\tif ( is_array($children) )\n\t\t\t\t\t\tforeach ( $children as $child )\n\t\t\t\t\t\t\tif ( $child->count )\n\t\t\t\t\t\t\t\tcontinue 2;\n\t\t\t\t\t\n\t\t\t\t\t// It really is empty\n\t\t\t\t\tunset($terms[$k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treset ( $terms );\n\t\t\n\t\t$_terms = array();\n\t\tif ( 'id=>parent' == $fields ) {\n\t\t\twhile ( $term = array_shift($terms) )\n\t\t\t\t$_terms[$term->term_id] = $term->parent;\n\t\t\t$terms = $_terms;\n\t\t} elseif ( 'ids' == $fields ) {\n\t\t\twhile ( $term = array_shift($terms) )\n\t\t\t\t$_terms[] = $term->term_id;\n\t\t\t$terms = $_terms;\n\t\t} elseif ( 'names' == $fields ) {\n\t\t\twhile ( $term = array_shift($terms) )\n\t\t\t\t$_terms[] = $term->name;\n\t\t\t$terms = $_terms;\n\t\t}\n\t\t\n\t\tif ( 0 < $number && intval(@count($terms)) > $number ) {\n\t\t\t$terms = array_slice($terms, $offset, $number);\n\t\t}\n\t\t\n\t\twp_cache_add( $cache_key, $terms, 's-terms' );\n\t\t\n\t\t$terms = apply_filters('get_terms', $terms, $taxonomies, $args);\n\t\treturn $terms;\n\t}", "title": "" }, { "docid": "5b69c844ad5d8a1cd733bd1ff76bbf2c", "score": "0.44932535", "text": "function portfolio_tags_build_taxonomies() {\n//\t\tregister_taxonomy('portfolio_tags', 'post', array( 'hierarchical' => false, 'label' => 'portfolio_tags', 'query_var' => true, 'rewrite' => true));\n\t\tregister_taxonomy(__( \"portfolio_tags\" , 'mav' ), array(__( \"portfolio\" , 'mav' )), array(\"hierarchical\" => false, \"label\" => __( \"Tags\" , 'mav'), 'query_var' => true, \"singular_label\" => __( \"Portfolio Tags\" , 'mav' ), \"rewrite\" => true, \"show_in_nav_menus\" => false));\n\t}", "title": "" }, { "docid": "9086fa21168329ad8e36682eb61bca9c", "score": "0.44897956", "text": "function portfolio_port_taxonomies() {\n\t// Add new taxonomy, make it hierarchical (like categories)\n\t$labels = array(\n\t\t'name' => _x( 'Categorys', 'taxonomy general name', 'portfolio' ),\n\t\t'singular_name' => _x( 'Category', 'taxonomy singular name', 'portfolio' ),\n\t\t'search_items' => __( 'Search Categorys', 'portfolio' ),\n\t\t'all_items' => __( 'All Categorys', 'portfolio' ),\n\t\t'parent_item' => __( 'Parent Category', 'portfolio' ),\n\t\t'parent_item_colon' => __( 'Parent Category:', 'portfolio' ),\n\t\t'edit_item' => __( 'Edit Category', 'portfolio' ),\n\t\t'update_item' => __( 'Update Category', 'portfolio' ),\n\t\t'add_new_item' => __( 'Add New Category', 'portfolio' ),\n\t\t'new_item_name' => __( 'New Category Name', 'portfolio' ),\n\t\t'menu_name' => __( 'Category', 'portfolio' ),\n\t);\n\n\t$args = array(\n\t\t'hierarchical' => true,\n\t\t'labels' => $labels,\n\t\t'show_ui' => true,\n\t\t'show_admin_column' => true,\n\t\t'query_var' => true,\n\t\t'rewrite' => array( 'slug' => 'port_category' ),\n\t);\n\n\tregister_taxonomy( 'port_category', array( 'portfolio' ), $args );\n\t\n}", "title": "" }, { "docid": "440b3b210ba055e76d188d0a08b52b55", "score": "0.4487766", "text": "function agt_register_job_taxonomies() {\n\t // Add new taxonomy, make it hierarchical (like categories)\n\t $labels = array(\n\t 'name' => _x( 'Location', 'location' ),\n\t 'singular_name' => _x( 'Location', 'location' ),\n\t 'search_items' => __( 'Search Locations' ),\n\t 'all_items' => __( 'All Locations' ),\n\t 'parent_item' => __( 'Parent Location' ),\n\t 'parent_item_colon' => __( 'Parent Location:' ),\n\t 'edit_item' => __( 'Edit Location' ),\n\t 'update_item' => __( 'Update Location' ),\n\t 'add_new_item' => __( 'Add New Location' ),\n\t 'new_item_name' => __( 'New Location' ),\n\t 'menu_name' => __( 'Locations' ),\n\t );\n\n\t $args = array(\n\t 'hierarchical' => true,\n\t 'labels' => $labels,\n\t 'show_ui' => true,\n\t 'show_admin_column' => true,\n\t 'query_var' => true,\n\t 'rewrite' => array( 'slug' => 'joblocation' ),\n\t );\n\n\t register_taxonomy( 'joblocation', 'job', $args );\n\n\n\t $labels = array(\n\t 'name' => _x( 'Function', 'Function' ),\n\t 'singular_name' => _x( 'Function', 'Function' ),\n\t 'search_items' => __( 'Search Functions' ),\n\t 'all_items' => __( 'All Functions' ),\n\t 'parent_item' => __( 'Parent Function' ),\n\t 'parent_item_colon' => __( 'Parent Function:' ),\n\t 'edit_item' => __( 'Edit Function' ),\n\t 'update_item' => __( 'Update Function' ),\n\t 'add_new_item' => __( 'Add New Function' ),\n\t 'new_item_name' => __( 'New Function' ),\n\t 'menu_name' => __( 'Functions' ),\n\t );\n\n\t $args = array(\n\t 'hierarchical' => true,\n\t 'labels' => $labels,\n\t 'show_ui' => true,\n\t 'show_admin_column' => true,\n\t 'query_var' => true,\n\t 'rewrite' => array( 'slug' => 'function' ),\n\t );\n\n\t register_taxonomy( 'function', 'job', $args );\n\t}", "title": "" }, { "docid": "63a30ffd7d8ac08efd56ebaa53aa2edb", "score": "0.44857052", "text": "function dm_register_utility_tax_with_all_post_types() {\n\tforeach ( get_post_types() as $post_type ) {\n\t\tregister_taxonomy_for_object_type( 'dm_flags', $post_type );\n\t}\n}", "title": "" }, { "docid": "e96026e873240b1deff330cda5f2d6e5", "score": "0.44856396", "text": "public function getGrouped()\n {\n $types = [];\n $elements = $this->toArray();\n /** @var Entity\\Taxonomy $element */\n foreach ($elements as $element) {\n $type = $element->get('taxonomytype');\n $types[$type][] = $element;\n }\n\n return $types;\n }", "title": "" }, { "docid": "341baffaaf6b50cabc83a8d9cc0cfb52", "score": "0.44808668", "text": "private function getTaxonomies(){\n\n $sqlCategoria = \"\n select\n wtt.taxonomy as taxonomy,\n wt.name as name,\n wt.slug as slug\n from \n wp_term_relationships as wtr\n \n inner join \n wp_term_taxonomy as wtt \n on wtt.term_taxonomy_id = wtr.term_taxonomy_id\n\n inner join \n wp_terms as wt \n on wt.term_id = wtt.term_id\n\n where \n wtr.object_id=\".$this->postId;\n\n $qryCategoria = $this->query($sqlCategoria, $this->connApi);\n\n return $qryCategoria;\n }", "title": "" } ]
0c6fd5a0928e926fd80d06c2f27c0db1
Sets the session container
[ { "docid": "2450c3df49d652e456199c81200fcdba", "score": "0.58821917", "text": "public function setSession(Session $session = null) {\n $this->session = $session;\n }", "title": "" } ]
[ { "docid": "d325d93d1dca69311423ca4b0e6be06c", "score": "0.6818611", "text": "public function setSession()\n {\n $this->setShared('session', function() {\n $session = new SessionAdapter();\n $session->start();\n return $session;\n });\n }", "title": "" }, { "docid": "27ec95adec05b045bc3b31f2a7a38fea", "score": "0.67993724", "text": "public function setSession()\n\t{\n\t\t$this->session = Session::getInstance();\n\t\t$this->session->start();\n\t}", "title": "" }, { "docid": "2e18f3db1f355f63d817a986d2c877ce", "score": "0.6779576", "text": "public function setContainer(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "2e18f3db1f355f63d817a986d2c877ce", "score": "0.6779576", "text": "public function setContainer(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "2e18f3db1f355f63d817a986d2c877ce", "score": "0.6779576", "text": "public function setContainer(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "2e18f3db1f355f63d817a986d2c877ce", "score": "0.6779576", "text": "public function setContainer(Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "c04168e94772930ec5441b34ba214979", "score": "0.6776929", "text": "public function setContainer(Container $container);", "title": "" }, { "docid": "a4ea9d5e99db5acaec0019bdc176fe6e", "score": "0.67570466", "text": "public function setContainer($container);", "title": "" }, { "docid": "98bba261f8b021666f47e1211f309889", "score": "0.6617838", "text": "public function __construct($container) {\n $this->container = $container;\n $this->view = $container->view;\n $this->session = new \\Tazzy\\Utils\\Session();\n }", "title": "" }, { "docid": "bb4d2bf1a1fc7dc9d9b9796bd879870e", "score": "0.6596735", "text": "public function setContainer(\\Slim\\Container $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "4905f5923624f049e3c1ca1b010c44a7", "score": "0.64270705", "text": "public function setContainer(ContainerInterface $container){\n $this->container = $container;\n }", "title": "" }, { "docid": "8d282ead1ec1d5c0a44e709a5126729c", "score": "0.6236143", "text": "public function setContainer(ContainerInterface $container)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "18152f3912c5b0d30a2a61fea30deaf2", "score": "0.622023", "text": "public function setContainer($container)\n {\n if ($container instanceof Space) {\n $this->space_id = $container->id;\n } elseif ($container instanceof User) {\n $this->user_id = $container->id;\n } else {\n throw new Exception(\"Invalid container type!\");\n }\n\n $this->_container = $container;\n }", "title": "" }, { "docid": "4841107fdf3767fe1cd58218622b1ef7", "score": "0.62173164", "text": "public function register(Container $container)\n\t{\n\t\t$closure = function ($container)\n\t\t{\n\t\t\treturn new Session;\n\t\t};\n\n\t\t$container->share('session', $closure);\n\t}", "title": "" }, { "docid": "cbd830bdc29aca4ba546c0fe6116698e", "score": "0.62126595", "text": "public function setContainer(ContainerInterface $container)\r\n {\r\n $this->container = $container;\r\n $this->kernel = $container->get('kernel');\r\n }", "title": "" }, { "docid": "217ea72d2778306221de6d835d16477c", "score": "0.6207967", "text": "private function setSession()\n {\n try\n {\n # Get the Populator object and set it to a local variable.\n $populator=$this->getPopulator();\n # Get the User object and set it to a local variable.\n $user_obj=$populator->getUserObject();\n\n # Set the form URL's to a variable.\n $form_url=$populator->getFormURL();\n # Set the current URL to a variable.\n $current_url=FormPopulator::getCurrentURL();\n # Check if the current URL is already in the form_url array. If not, add the current URL to the form_url array.\n if(!in_array($current_url, $form_url)) $form_url[]=$current_url;\n\n # Create a session that holds all the POST data (it will be destroyed if it is not needed.)\n $_SESSION['form']['password']=\n array(\n 'EmailPassword'=>$populator->getEmailPassword(),\n 'FormURL'=>$form_url\n );\n }\n catch(Exception $e)\n {\n throw $e;\n }\n }", "title": "" }, { "docid": "71abba530eb7b75c102d2d60bf0bf600", "score": "0.6179059", "text": "public static function setContainer(ContainerInterface $container)\n {\n static::$container = $container;\n }", "title": "" }, { "docid": "d02b43cdde2446cd766cb043a12b0ef1", "score": "0.61716247", "text": "public function setContainer(\\Interop\\Container\\ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "7cb1a9aac72eba79ff2a1bb410a20c5c", "score": "0.6153392", "text": "public function setSessionData(): void\n {\n $this->response->getSession()->set(\n config('form.session_key'),\n [\n $this->form->getID() => [\n 'data' => $this->body,\n 'messages' => $this->errors\n ]\n ]\n );\n }", "title": "" }, { "docid": "3a9f6c4e930ee187d455aff28a6bf202", "score": "0.614198", "text": "public function __construct($session, $container)\n {\n $this->container = $container;\n $this->session = $session;\n }", "title": "" }, { "docid": "f1750f6d6f33fad63d5c1edf1642676d", "score": "0.6130361", "text": "public function setContainer(\\Symfony\\Component\\DependencyInjection\\ContainerInterface $container = null)\n\t\t{\n\t\t $this->container = $container;\n\n\t\t}", "title": "" }, { "docid": "1f6fd2cc9f21cd36a32a5cd1591762df", "score": "0.61239463", "text": "private function _setSession(Session $session)\n\t{\n\t\t$property = new \\ReflectionProperty('aik099\\\\PHPUnit\\\\BrowserTestCase', '_session');\n\t\t$property->setAccessible(true);\n\t\t$property->setValue($this, $session);\n\t}", "title": "" }, { "docid": "1c430720119b3f0dfe9b229a467335c8", "score": "0.60811025", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n\n // Setting the scoped variables required for the rendering of the page\n $this->page = null;\n $this->userName = null;\n\n // Get the settings from setting bundle\n $this->settings = $this->get('bardiscms_settings.load_settings')->loadSettings();\n\n // Get the highest user role security permission\n $this->userRole = $this->get('sonata_user.services.helpers')->getLoggedUserHighestRole();\n\n // Check if mobile content should be served\n $this->serveMobile = $this->get('bardiscms_mobile_detect.device_detection')->testMobile();\n\n // Set the flag for allowing HTTP cache\n $this->enableHTTPCache = $this->container->getParameter('kernel.environment') === 'prod' && $this->settings->getActivateHttpCache();\n\n // Set the publish statuses that are available for the user\n $this->publishStates = $this->get('bardiscms_page.services.helpers')->getAllowedPublishStates($this->userRole);\n\n // Get the logged user if any\n $this->logged_user = $this->get('sonata_user.services.helpers')->getLoggedUser();\n if (is_object($this->logged_user) && $this->logged_user instanceof UserInterface) {\n $this->userName = $this->logged_user->getUsername();\n }\n }", "title": "" }, { "docid": "0958cdb22e182b5f49e3adff2a50b308", "score": "0.60780716", "text": "public static function setSession($session) {\n self::$_session = $session;\n }", "title": "" }, { "docid": "e0140a9d874f8e20ba3a8d6279942ef0", "score": "0.6076155", "text": "public static function setContainer($container)\n\t{\n\t\tparent::setContainer($container instanceof Builder ? $container->container() : $container);\n\t}", "title": "" }, { "docid": "51f76e7c87b5c9a158d745649c9de0fd", "score": "0.6070957", "text": "public static function setAsSessionHandler()\n {\n session_set_save_handler(array('Eb_MemcacheSession', 'sessionOpen'),\n array('Eb_MemcacheSession', 'sessionClose'),\n array('Eb_MemcacheSession', 'sessionRead'),\n array('Eb_MemcacheSession', 'sessionWrite'),\n array('Eb_MemcacheSession', 'sessionDestroyer'),\n array('Eb_MemcacheSession', 'sessionGc'));\n }", "title": "" }, { "docid": "2006864cc341c1c6196970dc81d383e1", "score": "0.6009441", "text": "public static function setContainer(Psr\\Container\\ContainerInterface $container)\n {\n self::$container = $container;\n }", "title": "" }, { "docid": "16b4847b41501c09d1632e49c0901147", "score": "0.5979846", "text": "public function setTypeSession($value){\n\t\t\t$this->typeSession = $value;\n\t\t}", "title": "" }, { "docid": "1abb7ace0bed275bed4105c0ae7eca51", "score": "0.59725153", "text": "function setSession(mvcSessionBase $inSession) {\n\t\treturn $this->setParam(self::PARAM_REQUEST_SESSION, $inSession);\n\t}", "title": "" }, { "docid": "8ce1c00278081e61e03f8d7b800da3aa", "score": "0.5935732", "text": "public static function setInstance(SessionInterface $session): void\n {\n static::$session = $session;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "9b4dd88a9b58fcc76873788029aa28a3", "score": "0.5915054", "text": "public function setContainer(ContainerInterface $container = null)\n {\n $this->container = $container;\n }", "title": "" }, { "docid": "334d14009b750b0dadcfc54c519c5549", "score": "0.59076285", "text": "public function setSessionManager(Closure $xClosure)\n {\n $this->set(SessionInterface::class, $xClosure);\n }", "title": "" }, { "docid": "9adb6d32d4cd678a3c07ef9a04cbd213", "score": "0.5901462", "text": "public function setSession($value)\n\t{\n\t\t$_SESSION[$this->getKey()] = serialize($value);\n\t}", "title": "" }, { "docid": "0d2a9e57bbf46b449e8e98eaada41be0", "score": "0.5896955", "text": "function auth_set($sess)\n{\n _app('auth', $sess);\n session_set(auth_namespace(), $sess, true);\n}", "title": "" }, { "docid": "8f24dc66c89232a83db23fdeb0ee30d4", "score": "0.5896857", "text": "function set_session() {\n\t\t\t// Set cart and coupon session data\n\t\t\t$_SESSION['cart'] = $this->cart_contents;\n\t\t\t$_SESSION['coupons'] = $this->applied_coupons;\n\t\t\t\n\t\t\t// Cart contents change so reset shipping\n\t\t\tunset($_SESSION['_chosen_shipping_method']);\n\t\t\t\n\t\t\t// Calculate totals\n\t\t\t$this->calculate_totals();\n\t\t}", "title": "" }, { "docid": "2fb59cdbdc3c0d76831bf53b08f79181", "score": "0.58697146", "text": "public function set_session($var,$cont=NULL){\r\n $this->session->set_userdata($var, $cont);\r\n }", "title": "" }, { "docid": "dae94aeb3cfeb6cabcfcb5dab15e5a43", "score": "0.58492714", "text": "public static function setInstance($container){\n //Method inherited from \\Illuminate\\Container\\Container \n \\Illuminate\\Foundation\\Application::setInstance($container);\n }", "title": "" }, { "docid": "1874639590dd650b18f683e92f4d5aaa", "score": "0.58403766", "text": "public function setContainer(ContainerInterface $container = null)\n\t{\n\t\t$this->container = $container;\n\t\t\n\t\tforeach ($this->descriptors as $descriptor) {\n\t\t\t$descriptor->setContainer($container);\n\t\t}\n\t}", "title": "" }, { "docid": "36c0e54548610ff4c7425558455a138e", "score": "0.5836258", "text": "public function register(Container $container)\n {\n $container[\"SessionContract\"] = function ($c) {\n return new NativeSessionComponent();\n };\n }", "title": "" }, { "docid": "2d12266b4e136d1b20be937339ded9fe", "score": "0.5833658", "text": "public function setContainer(ContainerInterface $xContainer)\n {\n $this->xContainer = $xContainer;\n }", "title": "" }, { "docid": "c081354efe6826dd9c40753ece758854", "score": "0.58306235", "text": "public static function setInstance( IContainer $container );", "title": "" }, { "docid": "10ee61e275125ab326b5808b4a179e48", "score": "0.58166534", "text": "public function setCart()\n {\n $this->cart = $this->session->get('cart');\n }", "title": "" }, { "docid": "f3b8e0c0c4f59e58e95dd5899d8997b1", "score": "0.581497", "text": "public function setContainer(ContainerInterface $container = null)\n {\n parent::setContainer($container);\n $this->carService=$container->get('app.cars');\n $this->clientService=$container->get('app.clients');\n $this->rentalService=$container->get('app.rentals');\n }", "title": "" }, { "docid": "36e8b911fb007aafd307d47293fdc526", "score": "0.5813042", "text": "public function setContainer(ContainerInterface $container = null)\n {\n }", "title": "" }, { "docid": "06badf43729860cc2a95639890555084", "score": "0.5808942", "text": "public function register(BindingInterface $container): void\n {\n $container->bind(Session::class, Closure::fromCallable([$this, 'session']));\n }", "title": "" }, { "docid": "eebb56f26765465d859ef731a377c1e5", "score": "0.5806842", "text": "public function setSession(){\n if( $this->status === True ){\n $_SESSION['username'] = $this->username;\n $_SESSION['userlvl'] = $this->userlevel;\n $_SESSION['status'] = True;\n }else{\n $_SESSION['status'] = False;\n }\n }", "title": "" }, { "docid": "690d83777c45812b2b32501360ae402e", "score": "0.57929254", "text": "public function getUserSession()\n {\n $sessionUser = new Container('user_session');\n return $sessionUser;\n }", "title": "" }, { "docid": "c9cd98e3df2a0bcc941a5eb2f0169791", "score": "0.5791076", "text": "public function register(Container $pimple) {\n if( is_cli_mode() ) return $this;\n\n $config = load_config('session.php');\n\n // if someone will start session before me.\n session_name($config['name'] ?? ini_get('session.name'));\n\n ioc('session', function() use($config) {\n return (new Session(\n $config['handler'] ?? null, $config\n ));\n });\n\n return $this;\n }", "title": "" }, { "docid": "685926517b4645e2b7bd9ecffbb66c67", "score": "0.57877463", "text": "protected function set_session_id() {\n $this->sessionid = static::$sessionidmockup;\n }", "title": "" }, { "docid": "bc9573a6e8e2e2ab2d49274d7869a9d0", "score": "0.57779574", "text": "protected function setSessionCookie() {}", "title": "" }, { "docid": "2a46fdb401d6d61f8f38656a08c8f712", "score": "0.57605827", "text": "public function initializeSession() {\n\t\t$this->objectContainer->initializeSession();\n\t\t$this->sessionInitialized = TRUE;\n\t}", "title": "" }, { "docid": "154f810374bde03d06cc1383d6933eeb", "score": "0.5746307", "text": "public function registering()\n {\n $di = $this->getDI();\n\n $di->set(Services::SESSION_BAG, Bag::class);\n\n $di->setShared(Services::SESSION, function () {\n /** @var \\Phalcon\\DiInterface $this */\n\n $sessionConfig = $this->getShared(Services::CONFIG)->session;\n\n if (!isset($sessionConfig->adapter)) {\n if (!isset($sessionConfig->stores[$sessionConfig->default])) {\n throw new \\RuntimeException(\"Session store {$sessionConfig->default} not found in stores\");\n }\n\n $sessionConfig = $sessionConfig->stores[$sessionConfig->default];\n }\n\n $adapter = $sessionConfig->adapter;\n\n switch ($adapter){\n case 'Aerospike':\n case 'Database':\n case 'HandlerSocket':\n case 'Mongo':\n case 'Files':\n case 'Libmemcached':\n case 'Memcache':\n case 'Redis':\n $class = 'Phalcon\\Session\\Adapter\\\\' . $adapter;\n break;\n case FilesAdapter::class:\n case LibmemcachedAdapter::class:\n case MemcacheAdapter::class:\n case RedisAdapter::class:\n $class = $adapter;\n break;\n default:\n $class = $adapter;\n\n if(!class_exists($adapter)){\n throw new \\RuntimeException(\"Session Adapter $class not found.\");\n }\n }\n\n try {\n $options = [];\n if (!empty($sessionConfig->options)) {\n $options = $sessionConfig->options->toArray();\n }\n /** @var \\Phalcon\\Session\\Adapter|\\Phalcon\\Session\\AdapterInterface $session */\n $session = new $class($options);\n } catch (\\Throwable $e) {\n throw new \\RuntimeException(\"Session Adapter $class construction fail.\", $e);\n }\n\n $session->start();\n\n return $session;\n });\n }", "title": "" }, { "docid": "f838e6b694f8ea9f086c46abbdb583d1", "score": "0.57407886", "text": "public function setSession($name, $value=null)\n {\n if (is_array($name)) {\n $this->_session = $name;\n } else {\n $this->_session[$name] = $value;\n }\n }", "title": "" }, { "docid": "260de8ecc56dc0b9479918066079fbac", "score": "0.5735398", "text": "public function setSession($name, $value=null)\n {\n // Set by name or all at once\n if (is_string($name)) {\n $this->_session[$name] = $value;\n } elseif (is_array($name)) {\n $this->_session = $name;\n }\n }", "title": "" }, { "docid": "109d1613d8b5473e6e5188fa151a31e0", "score": "0.5723644", "text": "public function setSession($sessionID)\r\n {\r\n $this->$sessionID = $sessionID;\r\n }", "title": "" }, { "docid": "8f08e7dd6f1f55881e6971d0f4b6e83b", "score": "0.57203203", "text": "public static function SetSessionIdentity (\\MvcCore\\ISession $sessionIdentity);", "title": "" }, { "docid": "9f2d8faf0f70611038efd57e662d68d6", "score": "0.57193905", "text": "protected function initSession()\n {\n $this->di->setShared('session', function () {\n /** @var DiInterface $this */\n $config = $this->getShared('config');\n\n $adapter = '\\Phalcon\\Session\\Adapter\\\\' . $config->get('session')->adapter;\n\n /** @var \\Phalcon\\Session\\AdapterInterface $session */\n $session = new $adapter;\n $session->start();\n\n return $session;\n });\n }", "title": "" }, { "docid": "33cd44f63a733daa8d2d1c74f8b97f58", "score": "0.5714904", "text": "protected function setSessionData()\n {\n $responseData = $this->response->getBody();\n if (strlen($responseData) > 0) {\n $contents = str_replace('$SID', $this->session->getName() . '=' . $this->session->getId(), $responseData);\n $contents = str_replace('$SESSION_NAME', $this->session->getName(), $contents);\n $this->response->replaceBody(str_replace('$SESSION_ID', $this->session->getId(), $contents));\n }\n }", "title": "" }, { "docid": "58149c8ed9fea5df7ae24a72e770ccf6", "score": "0.567343", "text": "public function setToSession($data) {\n $this->_setSession($data);\n }", "title": "" }, { "docid": "53bfc377164897acaa44d17882ba87cd", "score": "0.5669185", "text": "public function setUseSession( $use_session = true ) \n {\n $this->_use_session = (bool)$use_session;\n }", "title": "" }, { "docid": "35370f7c6962b8174a897dc13c4e1c7a", "score": "0.56664574", "text": "function setMockSession() {\n if (!class_exists('\\RightNow\\Libraries\\MockSession')) {\n Mock::generate('\\RightNow\\Libraries\\Session');\n }\n $session = new \\RightNow\\Libraries\\MockSession;\n $this->realSession = $this->CI->session;\n $this->CI->session = $session;\n $session->setSessionData(array('sessionID' => 'garbage'));\n }", "title": "" }, { "docid": "a55cf2a9c93f2661cab2a21811880f7b", "score": "0.566507", "text": "public function setContainer(ContainerInterface $container)\n {\n $this->container = $container;\n if ($container->hasParameter('activity_log.enabled')) {\n $this->enabled = $container->getParameter('activity_log.enabled');\n }\n }", "title": "" }, { "docid": "2fd08aa068c1ce42243bf766f6d337e0", "score": "0.5663389", "text": "public function storeSession() {}", "title": "" }, { "docid": "2e2c65f30d2e35129121d649fb87c15a", "score": "0.5662013", "text": "private function setSession($username) {\n\n session_start();\n\n $_SESSION = array(\n 'login' => true,\n 'username' => $username\n );\n\n }", "title": "" }, { "docid": "57e2dc57a26656e5f34c6aa81059e748", "score": "0.56577456", "text": "public function set_session(Request $request) {\n\t\t if ($request->language) {\n\t\t\tSession::put('language', $request->language);\n\t\t\tApp::setLocale($request->language);\n\t\t}\n\t}", "title": "" }, { "docid": "242de60baaf1da475d6ac2560b1912b0", "score": "0.56430846", "text": "function setCart(){\n\t\t$SessKey = $this->SesNames[\"Cart\"];\n\t\t$_SESSION[$SessKey]['Cart'] \t\t\t= $this->Cart;\n\t\t$_SESSION[$SessKey]['Referred'] \t= $this->Referred;\n\t\t$_SESSION[$SessKey]['Shipping'] \t= $this->Shipping;\n\t\t$_SESSION[$SessKey]['Cust'] \t\t\t= $this->Customer;\n\t}", "title": "" }, { "docid": "543e090960f7611160e4777d2c052147", "score": "0.5640972", "text": "public function setAwareContainer(ContainerInterface $container) {\n\t\t$container->setManager($this);\n\t\t$this->awareContainer = $container;\n\t}", "title": "" }, { "docid": "9cd3c297c3386b51663c8740919d18ea", "score": "0.5633052", "text": "private function setSessionKey()\n {\n $this->sessionKey = 'formfactory.captcha.' . $this->formRequestClass;\n }", "title": "" }, { "docid": "44d19c684beb28a71dcc92329ee071dc", "score": "0.5628516", "text": "function setSessionOn() {\n ini_set(\"session.cookie_lifetime\", 0);\n ini_set(\"session.use_cookies\", 1);\n ini_set(\"session.use_only_cookies\" , 1);\n ini_set(\"session.use_strict_mode\", 1);\n ini_set(\"session.cookie_httponly\", 1);\n ini_set(\"session.cookie_secure\", 1);\n ini_set(\"session.cookie_samesite\" , \"Strict\");\n ini_set(\"session.cache_limiter\" , \"nocache\");\n ini_set(\"session.sid_length\" , 48);\n ini_set(\"session.sid_bits_per_character\" , 6);\n ini_set(\"session.hash_function\" , \"sha256\");\n \n session_name(\"Authentification\");\n return session_start();\n}", "title": "" }, { "docid": "2a2eaad08a0ba1d200469e0a14d21c41", "score": "0.5624903", "text": "public function __invoke(ContainerInterface $container) : SessionManager\n {\n $sessionConfig = new SessionConfig();\n $sessionConfig->setOptions(self::SESSION_CONF);\n\n $session = new SessionManager($sessionConfig);\n $session->start();\n\n return $session;\n }", "title": "" }, { "docid": "f9ff52d1b77710e09b24dec63e1bb482", "score": "0.56236124", "text": "protected function setupSession()\n\t{\n\t\t$name = $this->appType . \"id\";\n\t\tsession_name($name);\n\n\t\t$path = getenv(\"P_SESSION_DIR\") ?: $GLOBALS[\"BASE_DIR\"] . \"/session\";\n\t\tif (! is_dir($path)) {\n\t\t\tif (! mkdir($path, 0777, true))\n\t\t\t\tjdRet(E_SERVER, \"fail to create session folder: $path\");\n\t\t}\n\t\tif (! is_writeable($path))\n\t\t\tjdRet(E_SERVER, \"session folder is NOT writeable: $path\");\n\t\tsession_save_path ($path);\n\n\t\tini_set(\"session.cookie_httponly\", 1);\n\n\t\t$path = getenv(\"P_URL_PATH\");\n\t\tif ($path)\n\t\t{\n\t\t\t// e.g. path=/cheguanjia\n\t\t\tini_set(\"session.cookie_path\", $path);\n\t\t}\n\t}", "title": "" }, { "docid": "11c6ec4cbc55a9e1a855779dc49e2e75", "score": "0.5615793", "text": "public function set_session(Request $request)\n {\n if($request->currency) {\n Session::put('currency', $request->currency);\n $symbol = Currency::original_symbol($request->currency);\n Session::put('symbol', $symbol);\n }\n else if ($request->language) {\n Session::put('language', $request->language);\n App::setLocale($request->value);\n\n }\n }", "title": "" }, { "docid": "c11faad9eeaa250a76b024b36fb85e41", "score": "0.5611243", "text": "public function setSession(array $session)\n\t{\n\t\t$this->session = \\Zend\\Json\\Encoder::encode($session);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "625b5d7a80be685ebdd94519e4ef6c20", "score": "0.56035817", "text": "protected function setSessionCookie() {\n if (!$this->request->hasSession()) {\n return;\n }\n\n $session = $this->request->getSession();\n if (!$session->getAll()) {\n return;\n }\n\n $timeout = $this->getSessionTimeout();\n if ($timeout) {\n $expires = time() + $timeout;\n } else {\n $expires = 0;\n }\n\n $domain = $this->request->getHeader(Header::HEADER_HOST);\n\n $path = str_replace($this->request->getServerUrl(), '', $this->request->getBaseUrl());\n if (!$path) {\n $path = '/';\n }\n\n $cookie = $this->httpFactory->createCookie($this->request->getSessionCookieName(), $session->getId(), $expires, $domain, $path);\n\n $this->response->setCookie($cookie);\n }", "title": "" }, { "docid": "ae1fedf861c7d1ed55b807e95c73bda1", "score": "0.55904734", "text": "public static function setFacadeContainer($container)\n {\n static::$container = $container;\n }", "title": "" }, { "docid": "f31b362625364ad51d3b8eb90f2e2ca6", "score": "0.5589808", "text": "protected function _session()\n {\n if (class_exists('tracer_class')) {\n tracer_class::marker(array(\n 'set data on session markers',\n debug_backtrace(),\n '#006400'\n ));\n }\n\n if ($this->_session && $this->_session->returns('display')) {\n foreach ($this->_session->returns('display') as $key => $val) {\n $this->generate('session_display;' . $key, $val);\n }\n }\n }", "title": "" }, { "docid": "f95030aa911eff425a997c5641884242", "score": "0.5575086", "text": "public function setSession($session = null)\n {\n // validation for constraint: string\n if (!is_null($session) && !is_string($session)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($session)), __LINE__);\n }\n if (is_null($session) || (is_array($session) && empty($session))) {\n unset($this->Session);\n } else {\n $this->Session = $session;\n }\n return $this;\n }", "title": "" }, { "docid": "f95030aa911eff425a997c5641884242", "score": "0.5575086", "text": "public function setSession($session = null)\n {\n // validation for constraint: string\n if (!is_null($session) && !is_string($session)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($session)), __LINE__);\n }\n if (is_null($session) || (is_array($session) && empty($session))) {\n unset($this->Session);\n } else {\n $this->Session = $session;\n }\n return $this;\n }", "title": "" }, { "docid": "9c3a6067f50081f103a85eca34cddf41", "score": "0.557467", "text": "function setSession($key,$value){\n return Yii::app()->getSession()->add($key, $value);\n}", "title": "" }, { "docid": "09830b92b28888a74b0f47435a9a4861", "score": "0.5569516", "text": "private function setSESSIONvariables() {\n $_SESSION['pqz_configuration'] = $this->configuration;\n $_SESSION['pqz_question'] = $this->question;\n }", "title": "" }, { "docid": "7a41ac6bc37625ee1dc8adda0281977b", "score": "0.55661666", "text": "public static function setInstance(ContainerInterface $container)\r\n {\r\n static::$instance = $container;\r\n }", "title": "" }, { "docid": "7c5e363153e5d5a2f573da3f5f16e89a", "score": "0.5557795", "text": "public function setFlag(): void\n {\n $this->session->setData(ConfigProvider::SESSION_FLAG, true);\n }", "title": "" }, { "docid": "db33852e83c6dad0dd9ab139631d5806", "score": "0.5556993", "text": "protected function set_session($sKey,$sValue){$_SESSION[$sKey]=$sValue;}", "title": "" }, { "docid": "37c10db6b6457c43004a66278099674e", "score": "0.5551983", "text": "function sessionSet(){\r\n\t\tif(isset($_SESSION[\"$this->session_name\"])) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "a69b1f4e053ed43a46b46fff7ab5d8e3", "score": "0.5545781", "text": "protected function manageSession()\n {\n $this->session = new WebsiteSession();\n foreach ($this->eventRequest->getSession() as $key => $value) {\n\n if ($key == 'createdAt') {\n $value = time();\n }\n\n $method = 'set' . ucwords($key);\n if (method_exists($this->session, $method)) {\n $this->session->$method($value);\n }\n }\n }", "title": "" }, { "docid": "30d8dee56ccb7041b060687b928d57e0", "score": "0.55386984", "text": "public function setContainer(?string $container) : self\n {\n $this->container = $container;\n return $this;\n }", "title": "" }, { "docid": "a6478de9ab1fe3588b3165f2c4a1bfb0", "score": "0.5534786", "text": "private function _setSessionxxxx()\n {\n $this->_session = new Class_Session();\n\n if (!$this->_session instanceof Class_Session_Abstract) {\n require_once 'Class/User/SessionException.php';\n throw new Class_User_Exception('Invalid table data gateway provided');\n }\n }", "title": "" }, { "docid": "7dc35f7490f3a9cb1f589a916a866262", "score": "0.5532371", "text": "private function updateSession()\n {\n $_SESSION[$this->namespace] = $this->session;\n }", "title": "" }, { "docid": "c586d3cbf3756873d5d766d02eb0ead1", "score": "0.5526727", "text": "public function setSession($session)\n {\n $this->session = $session;\n\n return $this;\n }", "title": "" }, { "docid": "254d44d60184d9630e1506454f4b58c5", "score": "0.55152917", "text": "public function setContainerId($id)\n\t{\n\t\t$this->_containerId = $id;\n\t}", "title": "" }, { "docid": "26a0b59dbaab80f67d72f74079640139", "score": "0.5511915", "text": "public function setContainer(Container $container)\n {\n $this->container = $container;\n return $this;\n }", "title": "" }, { "docid": "26a0b59dbaab80f67d72f74079640139", "score": "0.5511915", "text": "public function setContainer(Container $container)\n {\n $this->container = $container;\n return $this;\n }", "title": "" }, { "docid": "a99778c995016a1bbafbed1e190c8e50", "score": "0.55033016", "text": "private static function configureSession()\n {\n if(!isset($_SESSION))\n {\n session_start();\n }\n }", "title": "" } ]
c1890820f0fc4492a9055c1f5791ff26
Returns the pixels that are enabled and enabled on the given channel
[ { "docid": "914552228e0c2c92e0cc1a38f8a27898", "score": "0.6474597", "text": "public function findEnabledByChannel(ChannelInterface $channel): array;", "title": "" } ]
[ { "docid": "cdfe5b6ea868554d85b1bb493cea5028", "score": "0.525647", "text": "function _scan($channels)\n\t{\n\t\t$all_channels = array_flip(array('_GET', '_POST', '_COOKIE', '_SERVER', '_ENV', 'getenv', '_FILES', '_SESSION'));\n\t\t$channels = !$channels ? array('_REQUEST') : (!is_array($channels) ? array($channels) : $channels);\n\t\t$res = array();\n\t\tforeach ( $channels as $channel )\n\t\t{\n\t\t\tif ( $channel == '*ALL' )\n\t\t\t{\n\t\t\t\t$res += $all_channels;\n\t\t\t}\n\t\t\telse if ( $channel == '_REQUEST' )\n\t\t\t{\n\t\t\t\t$res += array_flip(array('_GET', '_POST'));\n\t\t\t}\n\t\t\telse if ( $channel == '_SERVER' )\n\t\t\t{\n\t\t\t\t$res += array_flip(array('_SERVER', '_ENV', 'getenv'));\n\t\t\t}\n\t\t\telse if ( $channel == '_ENV' )\n\t\t\t{\n\t\t\t\t$res += array_flip(array('_ENV', 'getenv'));\n\t\t\t}\n\t\t\telse if ( isset($all_channels[$channel]) )\n\t\t\t{\n\t\t\t\t$res[$channel] = true;\n\t\t\t}\n\t\t}\n\t\treturn empty($res) ? false : array_keys($res);\n\t}", "title": "" }, { "docid": "cae86e744eb0e7a3e9aa40959cea165f", "score": "0.5214076", "text": "public function getAvailablePaint () {\n return [\n 'yellow',\n 'black',\n 'red',\n 'white',\n ];\n }", "title": "" }, { "docid": "8288de13632aed50a394c90d98c08fd6", "score": "0.51018214", "text": "public function getOtherChannelsVisible();", "title": "" }, { "docid": "7d9b8d8cd0513b86f28d293330cb03aa", "score": "0.5036718", "text": "function cmy_rgb($c,$m,$y) {\n\treturn array(( 1 - $c ) * 255,( 1 - $m ) * 255,( 1 - $y ) * 255); // r,g,b entre 0 et 255\n}", "title": "" }, { "docid": "1e8391b17c7a2a2ab2c197771e0c1c8d", "score": "0.49784338", "text": "protected function readPixels()\n {\n // Row\n for ($x = 0; $x < $this->width; $x += $this->precision) {\n // Column\n for ($y = 0; $y < $this->height; $y += $this->precision) {\n \n $color = $this->getPixelColor($x, $y);\n \n // transparent pixels don't really have a color\n if ($color->isTransparent())\n continue 1;\n \n // increment closes whiteList color (key)\n $this->whiteList[ $this->getClosestColor($color) ]++;\n }\n }\n }", "title": "" }, { "docid": "ac88015b4b83003812c0ec63dc88fecc", "score": "0.49659818", "text": "public function get_channels()\n {\n }", "title": "" }, { "docid": "cecd6afe923b5430596ea0ac001bc655", "score": "0.48736748", "text": "function rgb_cmy($r,$g,$b) {\n\treturn array(1 - ( $r / 255 ),1 - ( $g / 255 ),1 - ( $b / 255 )); // c,m,y entre 0 et 1\n}", "title": "" }, { "docid": "f561c6b47c29ef95414a849d97ea1970", "score": "0.48729476", "text": "public function enabled(): array;", "title": "" }, { "docid": "fd809d2337b766459d87e8bf4379e5d3", "score": "0.48136607", "text": "function rgbpixel($x, $y){\n\n\t\tif($x < 0){\n\t\t\t$x = 0;\n\t\t}\n\t\tif($x >= $this->size[0]){\n\t\t\t$x = $this->size[0] - 1;\n\t\t}\n\t\tif($y < 0){\n\t\t\t$y = 0;\n\t\t}\n\t\tif($y >= $this->size[1]){\n\t\t\t$y = $this->size[1] - 1;\n\t\t}\n\t\t$pixel = ImageColorAt($this->im, $x, $y);\n\t\treturn array('red' => ($pixel >> 16 & 0xFF), 'green' => ($pixel >> 8 & 0xFF), 'blue' => ($pixel & 0xFF), 'alpha' => ($pixel >> 24 & 0xFF));\n\n\t}", "title": "" }, { "docid": "c42a0ea9767b9be20625c65a52c4de04", "score": "0.47623864", "text": "public function isFbpixelActive()\n {\n return (bool) Mage::getStoreConfig('fbpixel/fbpixel_group/fbpixel_active');\n }", "title": "" }, { "docid": "6b2b0ed6990e08fd720253756ff7958d", "score": "0.47472245", "text": "public function getIncludeChannels()\n {\n return $this->include_channels;\n }", "title": "" }, { "docid": "57fc811b174107d7236917c78050c8ba", "score": "0.4705759", "text": "public function getAvailableChannels()\n {\n $config = $this->getConfig();\n return $config[self::CONFIG_CHANNELS];\n }", "title": "" }, { "docid": "2ef5896d2d45fdc65191cd21328de21a", "score": "0.4692142", "text": "public function getPixel($x, $y){\n\t\treturn $this->_int2rgb(imagecolorat( $this->_img, $x , $y));\n\t}", "title": "" }, { "docid": "85c735b7c5548e3f1b71fd4c94fa8fb6", "score": "0.46907502", "text": "function getColor($im)\n {\n $temp = array();\n $colors = array();\n for ($y=0;$y<imagesy($im);$y++) {\n for ($x=0;$x<imagesx($im);$x++) {\n $rgb = imagecolorat($im, $x, $y);\n if($this->check_transparent($rgb) == false) {\n array_push($colors, $rgb);\n }\n }\n }\n return $colors;\n }", "title": "" }, { "docid": "640ec7749caf5508f50afed8e798fb00", "score": "0.46845615", "text": "public function get_allowed_channels() {\n\t\tif ( is_user_logged_in() ) {\n\t\t\tglobal $current_user;\n\t\t\tget_currentuserinfo();\n\t\t\t$user_channels = get_user_meta( $current_user->ID, '_p2_channels', true );\n\t\t\treturn get_terms( 'p2_channel', array( 'include' => $user_channels, 'hide_empty' => false ) );\n\t\t} else {\n\t\t\treturn array();\n\t\t}\n\t}", "title": "" }, { "docid": "6bc7e80690c0b004f891d53295e99930", "score": "0.46670577", "text": "public function getChannels()\n\t{\n $db = JFactory::getDbo();\n $query = $db->getQuery(true)\n ->select('COUNT(*)')\n ->from('#__hwdms_users')\n ->where('status = ' . $db->quote(2));\n try\n {\n $db->setQuery($query);\n $count = $db->loadResult();\n }\n catch (RuntimeException $e)\n {\n $this->setError($e->getMessage());\n return false; \n }\n return $count;\n\t}", "title": "" }, { "docid": "e393fe0d409dd5e2428b035f035bca86", "score": "0.4655186", "text": "private function get_all_channels() {\n\t\treturn get_terms( 'p2_channel', array( 'hide_empty' => false ) );\n\t}", "title": "" }, { "docid": "edc3fcb4a4a79d6a8181000141500f80", "score": "0.464391", "text": "public function GetPixelColor($file, $x, $y)\n\t{\n\t\t\n\t\t// Get extension\n\t\t$extension = end(explode(\".\", $file));\n\t\t\n\t\t// Get image source\n\t\t$this->Load($file);\n\t\t$image = $this->GetResource();\n\t\t\n\t\t// Get pixel color\n\t\t$rgb = imagecolorat($image, $x, $y);\n\t\t$r = ($rgb >> 16) & 0xFF;\n\t\t$g = ($rgb >> 8) & 0xFF;\n\t\t$b = $rgb & 0xFF;\n\t\t\n\t\t// Return pixel color\n\t\treturn array($r,$g,$b);\n\t}", "title": "" }, { "docid": "6a5c60e8841941efdc1933793d8737bb", "score": "0.4619469", "text": "function _get_image_color($im, $r, $g, $b) {\r\n\t\t$c=imagecolorexact($im, $r, $g, $b);\r\n\t\tif ($c!=-1) return $c;\r\n\t\t$c=imagecolorallocate($im, $r, $g, $b);\r\n\t\tif ($c!=-1) return $c;\r\n\t\treturn imagecolorclosest($im, $r, $g, $b);\r\n\t}", "title": "" }, { "docid": "6c9fd3137b205c055dccf87ea46c180b", "score": "0.46037418", "text": "private function detectWifiChannel($iwinfo){\n\t\t$iwinfo= str_replace(\"unknown/70\", \"0/70\", $iwinfo);\n\t\tpreg_match_all(\"/Channel:\\s+(\\d+)/\", $iwinfo, $matches);\n\t\tif(count($matches)<2) return array('0',\"option channel auto\");\n\t\t$channels=$matches[1];\n\t\tif(count($channels)<2) return array('0',\"option channel auto\");\n\t\t//\n\t\tpreg_match_all(\"/Quality:\\s+(\\d+)/\", $iwinfo, $matches);\n\t\tif(count($matches)<2) return array('0',\"option channel auto\");\n\t\t$qualities=$matches[1];\n\t\tif(count($qualities)<2) return array('0',\"option channel auto\");\n\t\t//\n\t\t\n\t\t$qualities[0]=\"0\";\n\t\t$currentWifiChannel=$channels[0];\n\t\tunset($channels[0]);\n\t\tunset($qualities[0]);\n\t\tarsort($qualities);\n\t\t$range=array(1,2,3,4,5,6,7,8,9,10,11);\n\t\t$possible=array_diff($range,$channels);\n\t\tif(empty($possible)){\n\t\t\t$currentWifiChannel=$channels[array_search(min($qualities), $qualities)];\n\t\t\treturn array('1',\"option channel \".$currentWifiChannel);\n\t\t}\n\t\tif(false===array_search($currentWifiChannel, $possible)){\n\t\t\treturn array('1',\"option channel \".min($possible));\n\t\t\t\t\n\t\t}\n\t\telse{\n\t\t\treturn array('0',\"option channel auto\");\n\t\t}\n\t\t//var_dump($qualities);\n\t\t/*\n\t\t$key = array_search(max($qualities), $qualities);\n\t\t\n\t\tif($key>0 && abs($channels[0]-$channels[$key])<2 && $qualities[$key]>60){\n\t\t\t$channels[0]=($channels[$key]+2)%11+1;\n\t\t\treturn array('1',\"option channel \".$channels[0]);\n\t\t}\n\t\telse{\n\t\t\treturn array('0',\"option channel auto\");\n\t\t}\n\t\t*/\n\t}", "title": "" }, { "docid": "c05adfdf5e45bcd27e03bde528147cd7", "score": "0.45956367", "text": "public function getUsers(Channel $channel): array;", "title": "" }, { "docid": "09742afa8018e82e3ee1ba8846b3b1c8", "score": "0.45777887", "text": "public function getChannels() : array;", "title": "" }, { "docid": "fe9918d6438d2129d94ef192092a7bf4", "score": "0.45736507", "text": "public function getAllChannels()\n {\n //$query=\"select c.channel_id, c.channel_name, c.address From \".$this->conf->db_prefix.\"channel c\";\n $query=\t\" SELECT * From \".CHANNEL_TYPE_T.\" ct\"\n\t\t\t .\" INNER JOIN \".CHANNEL_T.\" ch ON ct.channel_type_id = ch.channel_type_id\";\n\n // $this->LastMsg.\"Helloosds\";\n if(($result=$this->db->CustomQuery( $query))!=null)\n {\n return $result;\n }\n\n\n \t$this->mlog->LogMsg(__CLASS__,__METHOD__, __FILE__,__LINE__,\"User: \".$_SESSION['user_id'].\"\\r\\nFailed to add: $start\");\n \t$this->LastMsg.\"Channel not found! <br>\";\n return false;\n\n }", "title": "" }, { "docid": "47ea560d3999c3a7e775516f3e9e36c9", "score": "0.45699137", "text": "public function getPixelFormat() {}", "title": "" }, { "docid": "6f569c8afc4fb31da22ec353554cd31d", "score": "0.45638034", "text": "public function get_channel_ids($use_cache = TRUE)\r\n\t{\r\n\t\t//cache?\r\n\t\tif ($use_cache AND isset($this->cache['channel_ids']['full']))\r\n\t\t{\r\n\t\t\treturn $this->cache['channel_ids']['full'];\r\n\t\t}\r\n\r\n\t\t$query = $this->EE->db\r\n\t\t\t\t\t\t->select('preference_value')\r\n\t\t\t\t\t\t->where('preference_name', 'channel_ids')\r\n\t\t\t\t\t\t->get('user_preferences');\r\n\r\n\t\tif ($query->num_rows() == 0)\r\n\t\t{\r\n\t\t\treturn FALSE;\r\n\t\t}\r\n\r\n\t\t$this->cache['channel_ids']['full'] = unserialize(\r\n\t\t\t$query->row('preference_value')\r\n\t\t);\r\n\r\n\t\treturn $this->cache['channel_ids']['full'];\r\n\t}", "title": "" }, { "docid": "c2bca1d658dbcf2ed41fa04ba46c7fee", "score": "0.45621482", "text": "function getchannel($clinic_id){\r\n $sql=\"SELECT clinic_channel FROM clinic where clinic_id=\".$clinic_id;\r\n $res=mysql_query($sql);\r\n $row=mysql_fetch_array($res); \r\n return $row['clinic_channel']; \r\n }", "title": "" }, { "docid": "4b09d4a62db9d9c7f4627950ef13abe8", "score": "0.4554106", "text": "private function img_scan() {\n\t\tfor($x = 0; $x < imagesx($this->img_in); $x++) {\n\t\t\tfor($y = 0; $y < imagesy($this->img_in); $y++) {\n\t\t\t\t$src_pix = imagecolorat($this->img_in, $x, $y);\n\t\t\t\t$r_arr = $this->detect_color($src_pix);\n\t\t\t\timagesetpixel($this->img_out, $x, $y,imagecolorallocate($this->img_out, $r_arr[0], $r_arr[1], $r_arr[2]));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "1110a3c8ec043cc0b4f8287b8b6c2891", "score": "0.4552084", "text": "public function getChesssBoard();", "title": "" }, { "docid": "fbc1d4f9235d8d9f957ce9b91bc2e7aa", "score": "0.45326427", "text": "public function fetch_assigned_channels($all_sites = FALSE)\n\t{\n\t\t$allowed_channels = array();\n\n\t\tif (REQ == 'CP' AND isset(ee()->session->userdata['assigned_channels']) && $all_sites === FALSE)\n\t\t{\n\t\t\t$allowed_channels = array_keys(ee()->session->userdata['assigned_channels']);\n\t\t}\n\t\telseif (ee()->session->userdata['group_id'] == 1)\n\t\t{\n\t\t\tif ($all_sites === TRUE)\n\t\t\t{\n\t\t\t\tee()->db->select('channel_id');\n\t\t\t\t$query = ee()->db->get('channels');\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tee()->db->select('channel_id');\n\t\t\t\tee()->db->where('site_id', ee()->config->item('site_id'));\n\t\t\t\t$query = ee()->db->get('channels');\n\t\t\t}\n\n\t\t\tif ($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\tforeach ($query->result_array() as $row)\n\t\t\t\t{\n\t\t\t\t\t$allowed_channels[] = $row['channel_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($all_sites === TRUE)\n\t\t\t{\n\t\t\t\t$result = ee()->db->query(\"SELECT exp_channel_member_groups.channel_id FROM exp_channel_member_groups\n\t\t\t\t\t\t\t\t\t WHERE exp_channel_member_groups.group_id = '\".ee()->db->escape_str(ee()->session->userdata['group_id']).\"'\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = ee()->db->query(\"SELECT exp_channels.channel_id FROM exp_channels, exp_channel_member_groups\n\t\t\t\t\t\t\t\t\t WHERE exp_channels.channel_id = exp_channel_member_groups.channel_id\n\t\t\t\t\t\t\t\t\t AND exp_channels.site_id = '\".ee()->db->escape_str(ee()->config->item('site_id')).\"'\n\t\t\t\t\t\t\t\t\t AND exp_channel_member_groups.group_id = '\".ee()->db->escape_str(ee()->session->userdata['group_id']).\"'\");\n\t\t\t}\n\n\t\t\tif ($result->num_rows() > 0)\n\t\t\t{\n\t\t\t\tforeach ($result->result_array() as $row)\n\t\t\t\t{\n\t\t\t\t\t$allowed_channels[] = $row['channel_id'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn array_values($allowed_channels);\n\t}", "title": "" }, { "docid": "ce7271c1312f364c80a23c13f5f89a47", "score": "0.4527864", "text": "final public function GetChannelTags()\r\n\t{\r\n\t\t$result = array();\r\n\t\tif ( ! self::$_loaded) return $result;\r\n\r\n\t\t$ch = self::$_doc->getElementsByTagName('channel')->item(0);\r\n\t\tif ( ! is_null($ch))\r\n\t\t{\r\n\t\t\tif ($ch->hasChildNodes())\r\n\t\t\t{\r\n\t\t\t\tforeach ($ch->getElementsByTagName('*') as $tag)\r\n\t\t\t\t{\r\n\t\t\t\t\t// do not select item tags\r\n\t\t\t\t\tif ($tag->hasChildNodes() and ($tag->tagName <> 'item'))\r\n\t\t\t\t\t\t$result[$tag->tagName] = html_entity_decode($tag->nodeValue, ENT_QUOTES, 'UTF-8') ;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "d627f2ab721c4509e95c68939b98b0dd", "score": "0.4507111", "text": "function isPictureColored($extract, $color) {\n\t$red = $extract[0][0]['r'];\n\t$green = $extract[0][0]['g'];\n\t$blue = $extract[0][0]['b'];\n\tswitch($color){\n\t case 'red':\n\t\t\tif ( ($red > (1.3 * $green)) & ($red > (1.3 * $blue)) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'green':\n\t\t\tif ( ($green > (1.3 * $red)) & ($green > (1.3 * $blue)) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'blue':\n\t\t\tif ( ($blue > (1.3 * $green)) & ($blue > (1.3 * $red)) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'bw':\n\t \tif ( ($red==$green) & ($red==$blue) & ($green==$blue) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif ( (($red+3) > $green ) & (($red-3) < $green ) & \n\t\t\t\t (($red+3) > $blue ) & (($red-3) < $blue ) & \n\t\t\t\t (($blue+3) > $green ) & (($blue-3) < $green ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t break;\n\t case 'test':\n\t \treturn true;\n\t break;\n\t default:\n\t \treturn false;\n\t}\n\n\treturn false;\n}", "title": "" }, { "docid": "f9820d9a85d27e535e529818efbfa54c", "score": "0.45006973", "text": "protected function getPixelColor($x, $y)\n {\n return $this->{'getPixelColor' . $this->lib} ($x, $y);\n }", "title": "" }, { "docid": "0eff56fa56d5fa8778d39083c5db3c90", "score": "0.44953883", "text": "public function getEnable();", "title": "" }, { "docid": "893999bfaecb618b27099a2d7554240e", "score": "0.4494089", "text": "public function detectWifiChannelAction(Request $request){\n\t\t$iwinfo='wlan0 ESSID: \" QUÁN 87-WIADS\" Access Point: EC:08:6B:89:E3:9E Mode: Master Channel: 6 (2.437 GHz) Tx-Power: 18 dBm Link Quality: 21/70 Signal: -89 dBm Noise: -95 dBm Bit Rate: 1.0 MBit/s Encryption: none Type: nl80211 HW Mode(s): 802.11bgn Hardware: unknown [Generic MAC80211] TX power offset: unknown Frequency offset: unknown Supports VAPs: yes PHY name: phy0 Cell 01 - Address: D4:4C:9C:02:74:36 ESSID: \"An\" Mode: Master Channel: 1 Signal: -57 dBm Quality: 53/70 Encryption: WPA PSK (CCMP) Cell 02 - Address: 98:F4:28:B2:98:BF ESSID: \"home123\" Mode: Master Channel: 1 Signal: -7 dBm Quality: 70/70 Encryption: WPA2 PSK (TKIP, CCMP) Cell 03 - Address: 98:F4:28:B8:8B:4D ESSID: \"Happy\" Mode: Master Channel: 6 Signal: -90 dBm Quality: 20/70 Encryption: mixed WPA/WPA2 PSK (CCMP)';\n\t\tpreg_match_all(\"/Channel:\\s+(\\d+)/\", $iwinfo, $matches);\n\t\tif(count($matches)<2) return array('0',\"option channel auto\");\n\t\t$channels=$matches[1];\n\t\tif(count($channels)<2) return array('0',\"option channel auto\");\n\t\t//\n\t\tpreg_match_all(\"/Quality:\\s+(\\d+)/\", $iwinfo, $matches);\n\t\tif(count($matches)<2) return array('0',\"option channel auto\");\n\t\t$qualities=$matches[1];\n\t\tif(count($qualities)<2) return array('0',\"option channel auto\");\n\t\t//\n\t\t\n\t\t$qualities[0]=\"0\";\n\t\t$currentWifiChannel=$channels[0];\n\t\tunset($channels[0]);\n\t\tunset($qualities[0]);\n\t\tarsort($qualities);\n\t\t$range=array(1,2,3,4,5,6,7,8,9,10,11);\n\t\t$possible=array_diff($range,$channels);\n\t\t//var_dump($possible);\n\t\tif(empty($possible)){\n\t\t\t$currentWifiChannel=$channels[array_search(min($qualities), $qualities)];\n\t\t\tvar_dump('1',\"option channel \".$currentWifiChannel);\n\t\t}\n\t\tif(false===array_search($currentWifiChannel, $possible)){\n\t\t\tvar_dump('1',\"option channel \".min($possible));\n\t\t\t\n\t\t}\n\t\telse{\n\t\t\tvar_dump('0',\"option channel auto\");\n\t\t}\n\t\t\n\t\treturn new Response('<html></html');\n\t}", "title": "" }, { "docid": "596943e2c8234411c2fbb8fc65a81500", "score": "0.44788367", "text": "protected function checkGdLibTrueColorSupport() {}", "title": "" }, { "docid": "90971d26849012ea69c070e80989a707", "score": "0.44651157", "text": "public function getPixels() : SPLFixedArray;", "title": "" }, { "docid": "7018ab4b4c0c46588bd184d654213e46", "score": "0.4450692", "text": "public function get_channel_data_by_channel_array( $channels = array() )\r\n\t{\r\n\t\t// --------------------------------------------\r\n\t\t// Prep Cache, Return if Set\r\n\t\t// --------------------------------------------\r\n\t\t// --------------------------------------------\r\n\r\n\t\t$cache_name = __FUNCTION__;\r\n\t\t$cache_hash = $this->_imploder(func_get_args());\r\n\r\n\t\tif (isset($this->cache[$cache_name][$cache_hash][$this->site_id]))\r\n\t\t{\r\n\t\t\treturn $this->cache[$cache_name][$cache_hash][$this->site_id];\r\n\t\t}\r\n\r\n\t\t$this->cache[$cache_name][$cache_hash][$this->site_id] = array();\r\n\r\n\t\t// --------------------------------------------\r\n\t\t// Perform the Actual Work\r\n\t\t// --------------------------------------------\r\n\r\n\t\t$extra = '';\r\n\r\n\t\tif (is_array($channels) && count($channels) > 0)\r\n\t\t{\r\n\t\t\t$extra = \" AND c.channel_id IN ('\" .\r\n\t\t\t\t\t\timplode(\"','\", $this->EE->db->escape_str($channels)).\"')\";\r\n\t\t}\r\n\r\n\t\t$query = $this->EE->db->query(\r\n\t\t\t\"SELECT c.channel_title, c.channel_id, s.site_id, s.site_label\r\n\t\t\t FROM exp_channels AS c, exp_sites AS s\r\n\t\t\t WHERE s.site_id = c.site_id\r\n\t\t\t {$extra}\"\r\n\t\t);\r\n\r\n\t\tforeach($query->result_array() as $row)\r\n\t\t{\r\n\t\t\t$this->cache[$cache_name][$cache_hash][\r\n\t\t\t\t$this->site_id\r\n\t\t\t][$row['channel_id']] = $row;\r\n\t\t}\r\n\r\n\t\t// --------------------------------------------\r\n\t\t// Return Data\r\n\t\t// --------------------------------------------\r\n\r\n\t\treturn $this->cache[$cache_name][$cache_hash][$this->site_id];\r\n\t}", "title": "" }, { "docid": "63cad5451e7946dead87f5a561f0ca44", "score": "0.4445439", "text": "public function getBluetoothEnabled();", "title": "" }, { "docid": "2a08ea251855fb2c4ac8fe3c8d144d48", "score": "0.44305214", "text": "public function getEnabled()\n {\n return array_filter($this->storage, function($val)\n {\n return $val['status'] === ProviderInterface::STATUS_INSTALLED;\n });\n }", "title": "" }, { "docid": "3bbd289687f2de49af350d5568cb3e32", "score": "0.4422189", "text": "private static function _get_image_color($im, $r, $g, $b) {\n\t\t$c=imagecolorexact($im, $r, $g, $b);\n\t\tif ($c!=-1) return $c;\n\t\t$c=imagecolorallocate($im, $r, $g, $b);\n\t\tif ($c!=-1) return $c;\n\t\treturn imagecolorclosest($im, $r, $g, $b);\n\t}", "title": "" }, { "docid": "bedee94093bfc7aa1ed73c734f9b5faa", "score": "0.44213778", "text": "public function getBrightness(): int;", "title": "" }, { "docid": "afd37bf4f7dbadbb3d3bd175eafdb346", "score": "0.44113046", "text": "abstract public function getTransparency();", "title": "" }, { "docid": "610aad1da1c876934c46ff94b26f790e", "score": "0.44098502", "text": "public function getEnabledButtons()\n {\n return $this->getButtons()->filterByCallback(function ($button) {\n return $button->isEnabled();\n });\n }", "title": "" }, { "docid": "2b1ac2f210eb955b211bfffef9c15e93", "score": "0.44033262", "text": "public function enabled(): array\n {\n return $this->enabled;\n }", "title": "" }, { "docid": "ee2e37f54d8bee60281b330e883a2f9b", "score": "0.43969467", "text": "public function all(): array\n {\n return $this->channels;\n }", "title": "" }, { "docid": "e8fb1d77d3baee5017d59e52109e7faa", "score": "0.43853635", "text": "public function get_rgbColorAtPowerOn(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::RGBCOLORATPOWERON_INVALID;\n }\n }\n $res = $this->_rgbColorAtPowerOn;\n return $res;\n }", "title": "" }, { "docid": "e73534a21dc7acdc7b08fdaf4ae85963", "score": "0.43789512", "text": "public function getCcVisible();", "title": "" }, { "docid": "cc7dff4f309751892516310fe381f7bc", "score": "0.43678814", "text": "public function getAssoc_ChannelSourceIds() {\n if ($this->getClass() == ('news')) {\n if (isset($this->channelIds) && ! empty($this->channelIds)) {\n //if ($this->channelIds)\n if (!is_array($this->channelIds))\n $channelIds = unserialize($this->channelIds);\n else\n $channelIds = $this->channelIds;\n \n $sourceIds = array();\n foreach ($channelIds as $channelId) {\n $channel = new channel();\n $channel->refresh($channelId);\n $parent = $channel->parentId;\n $channelparent = new channel();\n $channelparent->refresh($parent);\n $tablo = $this->getElementFromIcmCategory($channel->sourceId);\n //\t\t\t\t\t$sourceIds[] = array('channelId'=>$channelId, 'sourceId'=>$channel->sourceId, 'sourceParentId'=>$channelparent->sourceId);\n $sourceIds[] = array('channelId'=>$channelId, 'sourceId'=>$channel->sourceId, 'sourceParentId'=>$channelparent->sourceId, 'path'=>$tablo[\"path\"]);\n }\n return $sourceIds;\n } else\n return false;\n } else\n return false;\n }", "title": "" }, { "docid": "dfa34dfbaea1a22c3e35c01ada7b979c", "score": "0.43618622", "text": "public function getChannelInfo($channel, array $info = array())\n {\n try {\n return $this->client->getChannelInfo(compact('channel', 'info'))->toArray();\n } catch (BadResponseException $exception) {\n $this->handleException($exception);\n }\n }", "title": "" }, { "docid": "c83a58c341a3e1b022cf5621d11712a6", "score": "0.43611738", "text": "public function isEnabledDataProvider()\n {\n return [[true, true], [false, false]];\n }", "title": "" }, { "docid": "4809f7d51d9dfb977e8ccf709ccdaa70", "score": "0.4353597", "text": "public function getChannels();", "title": "" }, { "docid": "4809f7d51d9dfb977e8ccf709ccdaa70", "score": "0.4353597", "text": "public function getChannels();", "title": "" }, { "docid": "1f95aef3e04a9baeb335d824dd195d40", "score": "0.43458846", "text": "function check_activation($id_c) \r\n{\r\n $non_active=0;\r\n $active=0;\r\n $all=0;\r\n \r\n $sql=\"SELECT * FROM trace WHERE sub_cat_id_c='$id_c'\";\r\n $result=query_select($sql); \r\n //we check if there are one or more id_c - one or more traces for collected one item sub type\r\n $counter=0;\r\n while($rek=mysql_fetch_array($result))\r\n {\r\n $counter++;\r\n \r\n \r\n }\r\n echo \"all \".$all=$counter;\r\n \r\n $counter=0;\r\n \r\n $sql.=\" AND active=1\";\r\n $result=query_select($sql);\r\n while($rek=mysql_fetch_array($result))\r\n {\r\n $counter++;\r\n \r\n \r\n \r\n }\r\n echo \" active: \".$active=$counter;\r\n \r\n \r\n \r\n return array($active,$all); //returning a tuple with one item type size of active trace and all active and non active\r\n \r\n}", "title": "" }, { "docid": "92adc0e7dc9e73b2916bc4b33a02554b", "score": "0.43458736", "text": "function configLights($start_x, $end_x, $start_y, $end_y, $config, &$grid) {\n\tfor ($i = $start_x; $i <= $end_x; $i++) {\n\t\tfor ($j = $start_y; $j<= $end_y; $j++) {\n\t\t\t//echo \"$i, $j = \" . ($config == 'toggle'? ($grid[$i][$j] + 1) % 2 : $config) . \"\\n\";\n\t\t\t$current = $grid[$i . ',' . $j];\n\t\t\tif ($config === 0 && $current === 0) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$grid[$i . ',' . $j] += ($config === 'toggle') ? 2 : ($config === 0 ? -1 : 1);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "c96e307e449aa1ee33ffaec44b1a1e1d", "score": "0.4340571", "text": "private function detect_color($rgb) {\n\t\t// get the first number in RGB\n\t\t $c[0] = ($rgb >> 16) & 0xFF;\n\t\t\t// Check black or white\n\t\t\tif ($c[0] === 0) {\n\t\t\t\treturn $this->f_color;\n\t\t\t} else {\n\t\t\t\treturn $this->b_color;\n\t\t\t}\n\t}", "title": "" }, { "docid": "f076631589981648801f48901840d0cd", "score": "0.4320331", "text": "function stingColor($color6bit) {\n /*** \n Finds and returns all clothing attached 6-bit input color by reducing the all colors in database to a 6-bit RGB space\n ***/\n // Slpit the given 6-bit into the 3 components\n $r = $color6bit[0];\n $g = $color6bit[1];\n $b = $color6bit[2];\n \n // Create the color matching condition for every components\n $redCondition = \"ROUND((CONVERT(CONV(SUBSTR(code, 1, 2), 16, 10), UNSIGNED))*(3/255)) = \".$r;\n $greenCondition = \"ROUND((CONVERT(CONV(SUBSTR(code, 3, 2), 16, 10), UNSIGNED))*(3/255)) = \".$g; \n $blueCondition = \"ROUND((CONVERT(CONV(SUBSTR(code, 5, 2), 16, 10), UNSIGNED))*(3/255)) = \".$b;\n // The full color matching condition\n $colorCondition = $redCondition . \" AND \" . $greenCondition . \" AND \" . $blueCondition;\n $query = \"SELECT * FROM item WHERE \".$colorCondition;\n \n $result = mysql_query($query);\n \n $similarItems = array(); // initiate the return array\n // extraxt the item ids\n while($item = mysql_fetch_array($result)){\n $similarItems[] = $item['itemid'];\n }\n \n return $similarItems;\n}", "title": "" }, { "docid": "157391456eb054fbbc183fa13400dc58", "score": "0.43085685", "text": "public function getCompressedPixelData();", "title": "" }, { "docid": "6098ca1fa378fabc97175133dda84e56", "score": "0.4305364", "text": "function analyzeImageColors($im, $xCount =3, $yCount =3)\n {\n $imWidth =imagesx($im);\n $imHeight =imagesy($im);\n //find out the dimensions of the blocks we're going to make\n $blockWidth =round($imWidth/$xCount);\n $blockHeight =round($imHeight/$yCount);\n //now get the image colors...\n for($x =0; $x<$xCount; $x++) { //cycle through the x-axis\n for ($y =0; $y<$yCount; $y++) { //cycle through the y-axis\n //this is the start x and y points to make the block from\n $blockStartX =($x*$blockWidth);\n $blockStartY =($y*$blockHeight);\n //create the image we'll use for the block\n $block =imagecreatetruecolor(1, 1);\n //We'll put the section of the image we want to get a color for into the block\n imagecopyresampled($block, $im, 0, 0, $blockStartX, $blockStartY, 1, 1, $blockWidth, $blockHeight );\n //the palette is where I'll get my color from for this block\n imagetruecolortopalette($block, true, 1);\n //I create a variable called eyeDropper to get the color information\n $eyeDropper =imagecolorat($block, 0, 0);\n $palette =imagecolorsforindex($block, $eyeDropper);\n $colorArray[$x][$y]['r'] =$palette['red'];\n $colorArray[$x][$y]['g'] =$palette['green'];\n $colorArray[$x][$y]['b'] =$palette['blue'];\n //get the rgb value too\n $hex =sprintf(\"%02X%02X%02X\", $colorArray[$x][$y]['r'], $colorArray[$x][$y]['g'], $colorArray[$x][$y]['b']);\n $colorArray[$x][$y]['rgbHex'] =$hex;\n //destroy the block\n imagedestroy($block);\n }\n }\n //destroy the source image\n imagedestroy($im);\n return $colorArray;\n }", "title": "" }, { "docid": "11ec05d8931a7571454141e9ba947e2e", "score": "0.4304317", "text": "function imagegetclip($im): array {}", "title": "" }, { "docid": "2dce9bd71c278dcc4a5abeea8277ad1e", "score": "0.4301202", "text": "public function setColorFromPixel(ImagickPixel $pixel): bool {}", "title": "" }, { "docid": "9bc928457e68412c201e479bae215198", "score": "0.4296433", "text": "public function neckpippingcolor() \n { \n $area=$this->db->query(\"SELECT * FROM \" . DB_PREFIX . \"neck_pipping_color\"); \n return $area->rows; \n }", "title": "" }, { "docid": "0c259645d3b04b4b4bd7d12504fd0ff8", "score": "0.42778304", "text": "public function getBits(): int;", "title": "" }, { "docid": "2406491aecf9dc935957995b4580e67e", "score": "0.426947", "text": "public static function _get_image_color($im, $r, $g, $b) {\n\t\t$c=imagecolorexact($im, $r, $g, $b);\n\t\tif ($c!=-1) return $c;\n\t\t$c=imagecolorallocate($im, $r, $g, $b);\n\t\tif ($c!=-1) return $c;\n\t\treturn imagecolorclosest($im, $r, $g, $b);\n\t}", "title": "" }, { "docid": "31bae4fd6ee666d3c92fba2c6a501f21", "score": "0.42638287", "text": "public function getEnabled()\n {\n return $this->enabledIds;\n }", "title": "" }, { "docid": "df5da6833cf2418bacf216af457ddd93", "score": "0.424979", "text": "public function map() {\n \n if(!$this->isReady()) {\n $this->error(\"map() - not ready.\");\n return false;\n }\n \n $details = $this->doCommand(\"channels,map,terse\");\n \n if(!$details) {\n $this->error(\"map() - could not get channel mapping: \".$this->getError());\n return false;\n }\n \n if(count($details) < 15) {\n $this->error(\"map() - not enough mapping lines.\");\n return false;\n }\n \n $results = array();\n \n for($i=0; $i<15; $i++) {\n \n $line = trim($details[$i]);\n \n if(empty($line)) {\n continue;\n }\n \n $cols = explode(',', $line);\n \n $it = trim($cols[0]);\n $if = trim($cols[1]);\n $of = trim($cols[2]);\n $ot = trim($cols[3]);\n \n $bits = explode(\":\", trim($cols[4]));\n \n $src = $bits[0];\n $dst = $bits[1];\n \n $results[] = array($it, $if, $src, $dst, $of, $ot);\n }\n \n /* pass it back */\n \n return $results;\n }", "title": "" }, { "docid": "16c65168e813eeddd5f56f5f63e7d9a5", "score": "0.42425162", "text": "public function getFilter($side, $channel) {\n\n /* check parameters */\n \n $side = trim(strtolower($side));\n \n if(($side != \"input\") && ($side != \"output\")) {\n $this->error(\"getFilter() - side must be input or output: $side\");\n return false;\n }\n \n if($side == \"input\") {\n $side = 1;\n } else {\n $side = 2;\n }\n \n if(!is_numeric($channel)) {\n $this->error(\"getFilter() - channel must be a number: $channel\");\n return false;\n } \n \n if(($channel < 1) || ($channel > 15)) {\n $this->error(\"getFilter() - channel must be in the range 1..15: $channel\");\n return false;\n }\n $channel = (int)$channel;\n $channel--;\n \n /* try to get the complete channel mapping */\n \n $map = $this->map();\n \n if(!$map) {\n return ;\n }\n \n $filter = $map[$channel][$side];\n \n /* all done */\n \n return $filter;\n }", "title": "" }, { "docid": "5d7fa88c38b6a7901dc605d8db1fd41b", "score": "0.42406404", "text": "protected function getPixelColorImagick($x, $y)\n {\n $rgb = $this->loadedImage->getImagePixelColor($x, $y)->getColor();\n \n return new Color(array(\n $rgb['r'],\n $rgb['g'],\n $rgb['b'],\n ));\n }", "title": "" }, { "docid": "3bbeda341ad1166c57f15f1fa877f2aa", "score": "0.42402306", "text": "public function getColors(): array\n {\n return $this->colors;\n }", "title": "" }, { "docid": "67cddad60a8881a879fa61cd1f12736b", "score": "0.42378378", "text": "private function getEnabledThemes(){\n $enabledThemes = explode(\",\", GetConfig('GiftCertificateThemes'));\n $enabledThemesTmp = array();\n foreach($enabledThemes as $itemstmp){\n if(preg_match(\"/^CGC/\",$itemstmp)){\n continue;\n }\n $enabledThemesTmp[] = $itemstmp;\n }\n $enabledThemes = $enabledThemesTmp;\n return $enabledThemes;\n }", "title": "" }, { "docid": "120c392ad297d0c3ae9d954fe15ed424", "score": "0.4234482", "text": "public function getAudioChannels() {}", "title": "" }, { "docid": "a0358d19ac22531b8c01a33fb44f825b", "score": "0.4234173", "text": "protected function _get_image_color($im, $r, $g, $b) {\n $c=imagecolorexact($im, $r, $g, $b);\n if ($c!=-1) return $c;\n $c=imagecolorallocate($im, $r, $g, $b);\n if ($c!=-1) return $c;\n return imagecolorclosest($im, $r, $g, $b);\n }", "title": "" }, { "docid": "2af5d27d06ec6aef229bac5e3228c92b", "score": "0.42263192", "text": "function get_brightness($hex) {\n\t// strip off any leading #\n\t$hex = str_replace('#', '', $hex);\n\t$c_r = hexdec(substr($hex, 0, 2));\n\t$c_g = hexdec(substr($hex, 2, 2));\n\t$c_b = hexdec(substr($hex, 4, 2));\n\t$result_color_value = (($c_r * 299) + ($c_g * 587) + ($c_b * 114)) / 1000;\n\tif ($result_color_value > 130){\n\t $return_color = \"black\";\n\t}else{\n\t $return_color = \"white\";\n\t}\n\treturn $return_color;\n}", "title": "" }, { "docid": "709dff7d78b781125f4755f5821b0287", "score": "0.42244187", "text": "public function getPermColors()\n\t{\n\t\treturn $this->perm_colors;\n\t}", "title": "" }, { "docid": "e70cf1baaa81b8fae05efd200ced331e", "score": "0.4218366", "text": "private static function get_components_having_css() {\r\n\t\t$ret = self::get_all_widgets();\r\n\t\t$ret[] = self::FEATURE_RESIZABLE;\r\n\t\t$ret[] = self::FEATURE_SELECTABLE;\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "f57ed268533e8be4718c5e665f2c6eb0", "score": "0.4214373", "text": "public function getColorMap() {\n\n\t\t$image \t\t= $this->image;\n\t\t$width \t\t= $this->width;\n\t\t$height \t= $this->height;\n\t\t$arrayex \t= explode( '.', $image );\n\t\t$typeOfImage= end( $arrayex );\n\n\t\tfor( $x = 0; $x < $width; $x += $this->precision ) {\n\t\t\tfor ( $y = 0; $y < $height; $y += $this->precision ) {\n\t\t\t\t\n\t\t\t\t$index = imagecolorat($this->workingImage, $x, $y);\n\t\t\t\t$rgb = imagecolorsforindex($this->workingImage, $index);\n\n\t\t\t\t$color = $this->getClosestColor( $rgb[\"red\"], $rgb[\"green\"], $rgb[\"blue\"] );\n\n\t\t\t\t$hexarray[ $this->RGBToHex( $rgb[\"red\"], $rgb[\"green\"], $rgb[\"blue\"] ) ] = $this->RGBToHex( $color[0], $color[1], $color[2] );\n\t\t\t}\n\t\t}\n\n\t\treturn $hexarray;\n\t}", "title": "" }, { "docid": "2567ebf2123c167b8bc7081f970357fa", "score": "0.42069912", "text": "public function getEnablePointToPointAlternates()\n\t{\n\t\treturn $this->enablePointToPointAlternates;\n\t}", "title": "" }, { "docid": "9cdec3749fb662724cd415459272130a", "score": "0.42007345", "text": "function get_colour_key($image)\n\t{\n\t$width=imagesx($image);$height=imagesy($image);\n\t$colours=array(\n\t\"K\"=>array(0,0,0), \t\t\t# Black\n\t\"W\"=>array(255,255,255),\t# White\n\t\"E\"=>array(200,200,200),\t# Grey\n\t\"E\"=>array(140,140,140),\t# Grey\n\t\"E\"=>array(100,100,100),\t# Grey\n\t\"R\"=>array(255,0,0),\t\t# Red\n\t\"R\"=>array(128,0,0),\t\t# Dark Red\n\t\"R\"=>array(180,0,40),\t\t# Dark Red\n\t\"G\"=>array(0,255,0),\t\t# Green\n\t\"G\"=>array(0,128,0),\t\t# Dark Green\n\t\"G\"=>array(80,120,90),\t\t# Faded Green\n\t\"G\"=>array(140,170,90),\t\t# Pale Green\n\t\"B\"=>array(0,0,255),\t\t# Blue\n\t\"B\"=>array(0,0,128),\t\t# Dark Blue\n\t\"B\"=>array(90,90,120),\t\t# Dark Blue\n\t\"B\"=>array(60,60,90),\t\t# Dark Blue\n\t\"B\"=>array(90,140,180),\t\t# Light Blue\n\t\"C\"=>array(0,255,255),\t\t# Cyan\n\t\"C\"=>array(0,200,200),\t\t# Cyan\n\t\"M\"=>array(255,0,255),\t\t# Magenta\n\t\"Y\"=>array(255,255,0),\t\t# Yellow\n\t\"Y\"=>array(180,160,40),\t\t# Yellow\n\t\"Y\"=>array(210,190,60),\t\t# Yellow\n\t\"O\"=>array(255,128,0),\t\t# Orange\n\t\"O\"=>array(200,100,60),\t\t# Orange\n\t\"P\"=>array(255,128,128),\t# Pink\n\t\"P\"=>array(200,180,170),\t# Pink\n\t\"P\"=>array(200,160,130),\t# Pink\n\t\"P\"=>array(190,120,110),\t# Pink\n\t\"N\"=>array(110,70,50),\t\t# Brown\n\t\"N\"=>array(180,160,130),\t# Pale Brown\n\t\"N\"=>array(170,140,110),\t# Pale Brown\n\t);\n\t$table=array();\n\t$depth=50;\n\tfor ($y=0;$y<$depth;$y++)\n\t\t{\n\t\tfor ($x=0;$x<$depth;$x++)\n\t\t\t{\n\t\t\t$rgb = imagecolorat($image, $x*($width/$depth), $y*($height/$depth));\n\t\t\t$red = ($rgb >> 16) & 0xFF;\n\t\t\t$green = ($rgb >> 8) & 0xFF;\n\t\t\t$blue = $rgb & 0xFF;\n\t\t\t# Work out which colour this is\n\t\t\t$bestdist=99999;$bestkey=\"\";\n\t\t\treset ($colours);\n\t\t\tforeach ($colours as $key=>$value)\n\t\t\t\t{\n\t\t\t\t$distance=sqrt(pow(abs($red-$value[0]),2)+pow(abs($green-$value[1]),2)+pow(abs($blue-$value[2]),2));\n\t\t\t\tif ($distance<$bestdist) {$bestdist=$distance;$bestkey=$key;}\n\t\t\t\t}\n\t\t\t# Add this colour to the colour table.\n\t\t\tif (array_key_exists($bestkey,$table)) {$table[$bestkey]++;} else {$table[$bestkey]=1;}\n\t\t\t}\n\t\t}\n\tasort($table);reset($table);$colkey=\"\";\n\tforeach ($table as $key=>$value) {$colkey.=$key;}\n\t$colkey=substr(strrev($colkey),0,5);\n\treturn($colkey);\n\t}", "title": "" }, { "docid": "6f3fc049bf58984eabf3d46436d03f01", "score": "0.4200432", "text": "private function fetch_channels($str)\n {\n $array = ($str && $str != '') ? explode('|', $str) : array();\n\t\t$return = array();\n\t\tforeach($array as $val){\n\t\t\tif(is_numeric($val)){\n\t\t\t\t$return[]=$val;\n\t\t\t}else{\n\t\t\t\t$this->EE->db->select('channel_id')->from('channels');\n\t\t\t\t$this->EE->db->where(\"channel_name\",$val);\t\t\t\t\n\t\t\t\t$q = $this->EE->db->get();\n\t\t\t\tif($q->num_rows()>0){\n\t\t\t\t\t$return[]=$q->row('channel_id');\n\t\t\t\t}\n\t\t\t\t$this->EE->db->flush_cache();\n\t\t\t\t\n\t\t\t}\n\t\t}\t\t\t\n return $return;\n }", "title": "" }, { "docid": "b5bd7c413e826920e1f6805626ed2827", "score": "0.41985735", "text": "public function hasTransparency()\n {\n return $this->image->getImageAlphaChannel() == 1;\n }", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.41968158", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "ba51029342585b4063b5472c883d4870", "score": "0.41968158", "text": "public function getChannels()\n {\n return $this->channels;\n }", "title": "" }, { "docid": "4cf86d1c8fddb7472728342586951fbd", "score": "0.41927958", "text": "private function getImagesHiddenStates($rowData)\n {\n $statesArray = [];\n $mappingArray = [\n '_media_is_disabled' => '1'\n ];\n\n foreach ($mappingArray as $key => $value) {\n if (isset($rowData[$key]) && strlen(trim($rowData[$key]))) {\n $items = explode($this->getMultipleValueSeparator(), $rowData[$key]);\n\n foreach ($items as $item) {\n $statesArray[$item] = $value;\n }\n }\n }\n\n return $statesArray;\n }", "title": "" }, { "docid": "aad32cfca98d9ede9cc491dd8b480f62", "score": "0.41923633", "text": "function rgb_xyz($r,$g,$b) {\n\n\t$r /= 255;\n\t$g /= 255;\n\t$b /= 255;\n\n\t$r=(( $r > 0.04045 )?pow(( $r + 0.055 ) / 1.055,2.4):($r/12.92))*100;\n\t$g=(( $g > 0.04045 )?pow(( $g + 0.055 ) / 1.055,2.4):($g/12.92))*100;\n\t$b=(( $b > 0.04045 )?pow(( $b + 0.055 ) / 1.055,2.4):($b/12.92))*100;\n\t\n\t//Observer. = 2°, Illuminant = D65\n\t$x = $r * 0.4124 + $g * 0.3576 + $b * 0.1805;\n\t$y = $r * 0.2126 + $g * 0.7152 + $b * 0.0722;\n\t$z = $r * 0.0193 + $g * 0.1192 + $b * 0.9505;\n\t\n\treturn array($x,$y,$z);\n}", "title": "" }, { "docid": "406194fd32d1068001ef49ca717836c8", "score": "0.4188657", "text": "private function get_image_color($im, $r, $g, $b)// returns closest pallette-color match for RGB values \n\t {\n\t\t$c = imagecolorexact($im, $r, $g, $b);\n\t\tif($c != -1) return $c;\n\t\t$c = imagecolorallocate($im, $r, $g, $b);\n\t\tif($c != -1) return $c;\n\t\treturn imagecolorclosest($im, $r, $g, $b);\n\t }", "title": "" }, { "docid": "050043b2c56036258ebd21aee6894859", "score": "0.41853154", "text": "public function getAllChannelTypes()\n {\n $query=\"select channel_type_id, channel_type_name From \".$this->conf->db_prefix.\"channel_type\";\n if(($result=$this->db->CustomQuery( $query))!=null)\n {\n return $result;\n }\n\n \t$this->mlog->LogMsg(__CLASS__,__METHOD__, __FILE__,__LINE__,\"User: \".$_SESSION['user_id'].\"\\r\\nFailed to add: $start\");\n \t$this->LastMsg.\"Channel id not found <br>\";\n return false;\n }", "title": "" }, { "docid": "24c926ef9eb2e0a26e37e3bb236a0c37", "score": "0.41683227", "text": "function getChannelInformations($channelid, $port, $ip, $queryport, $username, $password)\n\t{\n\t\t// Teamspeak Daten eingeben\n\t\t$tsAdmin \t\t\t= \tnew ts3admin($ip, $queryport);\n\t\t\n\t\tif($tsAdmin->getElement('success', $tsAdmin->connect()))\n\t\t{\n\t\t\t// Im Teamspeak Einloggen\n\t\t\t$tsAdmin->login($username, $password);\n\t\t\t\n\t\t\t$tsServerID \t= \t$tsAdmin->serverIdGetByPort($port);\n\t\t\t$tsAdmin->selectServer($tsServerID['data']['server_id'], 'serverId', true);\n\t\t\t\n\t\t\t// Channel abfragen\n\t\t\treturn $tsAdmin->channelInfo($channelid);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn 'error';\n\t\t};\n\t}", "title": "" }, { "docid": "9001ae07d9f5190d8d62410b5b131c3b", "score": "0.41670004", "text": "function get_CardCanAttack() {\n foreach ($this->get_CardsOnBoard() as $key => $card) {\n if($card->get_etat() == true) {\n return true;\n }\n }\n return false;\n}", "title": "" }, { "docid": "33dd73652cc1bc44f8afb3528e1238e9", "score": "0.41651416", "text": "public function getEnabledAttributes() {\n\t\t$list = [];\n\t\tforeach($this->getAttributes() as $idx => $attribute) {\n\t\t\tif($attribute->isEnabled())\n\t\t\t\t$list[$idx] = $attribute;\n\t\t}\n\t\treturn $list;\n\t}", "title": "" }, { "docid": "fe4a847a9d831a0cbad689ec4e319cc6", "score": "0.41640785", "text": "public static function isChannelSupported($aspect, $channel)\n {\n return $channel == self::getMetaProperty($aspect, 'channel');\n }", "title": "" }, { "docid": "7be6ab622e8be108369fa24aed06eb29", "score": "0.41594058", "text": "public function getTheSupports();", "title": "" }, { "docid": "37a24e0ae10967b08551a7b3456a5c22", "score": "0.41585085", "text": "public static function get_enabled_components() {\r\n\t\treturn self::$enabled_components;\r\n\t}", "title": "" }, { "docid": "1ab266a3dea13c357e817fe54506bd8d", "score": "0.41570762", "text": "public function getChannels() {\n return $this->channels;\n }", "title": "" }, { "docid": "38d75d324de4d137a22b3252682e5fe8", "score": "0.4145517", "text": "public function getFccVisible();", "title": "" }, { "docid": "e8aaa856a18e707b6d7a197673958115", "score": "0.41376996", "text": "static public function getConditions()\n\t{\n\t\treturn array(\n\t\t\tCore::_('Ipaddress_Useragent.condition0'),\n\t\t\tCore::_('Ipaddress_Useragent.condition1'),\n\t\t\tCore::_('Ipaddress_Useragent.condition2'),\n\t\t\tCore::_('Ipaddress_Useragent.condition3'),\n\t\t\tCore::_('Ipaddress_Useragent.condition4')\n\t\t);\n\t}", "title": "" }, { "docid": "3de2de2ada394cc7bce7ebdddfe349d0", "score": "0.4135133", "text": "public function get_valid_statuses() {\n\t\treturn array_keys( _wc_cs_get_credits_statuses() ) ;\n\t}", "title": "" }, { "docid": "98a7b69ca31929a72a518cb419127e28", "score": "0.41312853", "text": "public function getStatusColor($compliance) {\n\n\t\t$is_yellow = Yii::app()->utility->getOption('kpi_yellow');\n\t\t$is_red = Yii::app()->utility->getOption('kpi_red');\n\n\t\tif ($compliance < $is_red) return 1;\n\t\tif ($compliance < $is_yellow) return 2;\n\t\treturn 3;\n\n\t}", "title": "" }, { "docid": "da02e592bcdf59709b174b19d10777b0", "score": "0.41220474", "text": "public function getFilterByInfoChannel()\n {\n return $this->filterByInfoChannel;\n }", "title": "" }, { "docid": "67721d10b13563f7738c7547ad80d844", "score": "0.41175142", "text": "public function supportsColour()\n {\n // TODO: Implement supportsColour() method.\n }", "title": "" }, { "docid": "d72130963f5b261e206e8b004fb0d27e", "score": "0.4112885", "text": "function filter(){\n\n\t\t$newpixel = array();\n\t\t$this->newimage = imagecreatetruecolor($this->size[0], $this->size[1]);\n\t\tfor($y = 0; $y < $this->size[1]; $y++){\n\t\t\tfor($x = 0; $x < $this->size[0]; $x++){\n\t\t\t\t$newpixel[0] = 0;\n\t\t\t\t$newpixel[1] = 0;\n\t\t\t\t$newpixel[2] = 0;\n\t\t\t\t$a11 = $this->rgbpixel($x - 1, $y - 1);\n\t\t\t\t$a12 = $this->rgbpixel($x, $y - 1);\n\t\t\t\t$a13 = $this->rgbpixel($x + 1, $y - 1);\n\t\t\t\t$a21 = $this->rgbpixel($x - 1, $y);\n\t\t\t\t$a22 = $this->rgbpixel($x, $y);\n\t\t\t\t$a23 = $this->rgbpixel($x + 1, $y);\n\t\t\t\t$a31 = $this->rgbpixel($x - 1, $y + 1);\n\t\t\t\t$a32 = $this->rgbpixel($x, $y + 1);\n\t\t\t\t$a33 = $this->rgbpixel($x + 1, $y + 1);\n\t\t\t\t$newpixel[0] += $a11['red'] * $this->Filter[0] + $a12['red'] * $this->Filter[1] + $a13['red'] * $this->Filter[2];\n\t\t\t\t$newpixel[1] += $a11['green'] * $this->Filter[0] + $a12['green'] * $this->Filter[1] + $a13['green'] * $this->Filter[2];\n\t\t\t\t$newpixel[2] += $a11['blue'] * $this->Filter[0] + $a12['blue'] * $this->Filter[1] + $a13['blue'] * $this->Filter[2];\n\t\t\t\t$newpixel[0] += $a21['red'] * $this->Filter[3] + $a22['red'] * $this->Filter[4] + $a23['red'] * $this->Filter[5];\n\t\t\t\t$newpixel[1] += $a21['green'] * $this->Filter[3] + $a22['green'] * $this->Filter[4] + $a23['green'] * $this->Filter[5];\n\t\t\t\t$newpixel[2] += $a21['blue'] * $this->Filter[3] + $a22['blue'] * $this->Filter[4] + $a23['blue'] * $this->Filter[5];\n\t\t\t\t$newpixel[0] += $a31['red'] * $this->Filter[6] + $a32['red'] * $this->Filter[7] + $a33['red'] * $this->Filter[8];\n\t\t\t\t$newpixel[1] += $a31['green'] * $this->Filter[6] + $a32['green'] * $this->Filter[7] + $a33['green'] * $this->Filter[8];\n\t\t\t\t$newpixel[2] += $a31['blue'] * $this->Filter[6] + $a32['blue'] * $this->Filter[7] + $a33['blue'] * $this->Filter[8];\n\t\t\t\t$newpixel[0] = max(0, min(255, intval($newpixel[0] / $this->Divisor) + $this->Offset));\n\t\t\t\t$newpixel[1] = max(0, min(255, intval($newpixel[1] / $this->Divisor) + $this->Offset));\n\t\t\t\t$newpixel[2] = max(0, min(255, intval($newpixel[2] / $this->Divisor) + $this->Offset));\n\t\t\t\timagesetpixel($this->newimage, $x, $y, imagecolorallocatealpha($this->newimage, $newpixel[0], $newpixel[1], $newpixel[2], $a11['alpha']));\n\t\t\t}\n\t\t}\n\t\timagecopy($this->im, $this->newimage, 0, 0, 0, 0, $this->size[0], $this->size[1]);\n\t\timagedestroy($this->newimage);\n\n\t}", "title": "" }, { "docid": "ae5ecf9cddd149f4905a331162951d72", "score": "0.41105986", "text": "private function getChannels()\r\n {\r\n static $channels;\r\n\r\n if (empty($channels)) {\r\n // Store the cache forever.\r\n $cache_key = 'categoryFirst';\r\n $channels = \\SCache::sear($cache_key, function () {\r\n $categories = $this->all();\r\n $channels = [];\r\n foreach ($categories as $category) {\r\n if ($category['bclassid'] == 0) {\r\n $channels[] = $category;\r\n }\r\n }\r\n return $channels;\r\n });\r\n }\r\n\r\n return $channels;\r\n }", "title": "" } ]
df40bbfd39ab33fe0842f8578e8b189b
Let the user choose delta.
[ { "docid": "e0c1ade90a76604e4c69cc195359a789", "score": "0.0", "text": "public function buildOptionsForm(&$form, FormStateInterface $form_state) {\n parent::buildOptionsForm($form, $form_state);\n\n // Check if this relation is entity-to-entity or entity-to-relation /\n // relation-to-entity.\n $endpoints_twice = isset($this->definition['entity_type_left']) && isset($this->definition['entity_type_right']);\n\n if ($this->definition['directional']) {\n $form['delta'] = array(\n '#type' => 'select',\n '#options' => array(\n -1 => t('Any'),\n 0 => t('Source'),\n 1 => t('Target'),\n ),\n '#title' => t('Position of the relationship base'),\n '#default_value' => $this->options['delta'],\n // check_plain()'d in the definition.\n '#description' => t('Select whether the entity you are adding the relationship to is source or target of @relation_type_label relation.', array('@relation_type_label' => $this->definition['label'])),\n );\n }\n foreach (array('left', 'right') as $key) {\n if (isset($this->definition['entity_type_' . $key])) {\n $form['entity_deduplication_' . $key] = array(\n '#type' => 'checkbox',\n '#title' => $endpoints_twice ?\n t('Avoid @direction @type duplication', array('@direction' => t($key), '@type' => $this->definition['entity_type_' . $key])) :\n t('Avoid @type duplication', array('@type' => $this->definition['entity_type_' . $key])),\n '#default_value' => $this->options['entity_deduplication_' . $key],\n '#description' => t('When creating a chain of Views relationships for example from node to relation and then from relation to node (both via the same relation type) then each node will display on both ends. Check this option to avoid this kind of duplication.'),\n );\n }\n }\n }", "title": "" } ]
[ { "docid": "85c8d6ba28e3b92da89ad1ecee5e6806", "score": "0.5769302", "text": "function _calcDelta()\n {\n if (abs($this->_getMaximum() - $this->_getMinimum()) == 0) {\n $this->_delta = false;\n } else {\n $this->_delta = 360 / ($this->_getMaximum() - $this->_getMinimum());\n }\n }", "title": "" }, { "docid": "23209507dc701c746b880ec8162e30e6", "score": "0.5345816", "text": "public function changeAmount($delta)\n {\n if (!$this->getDefaultAmount()) {\n $this->setAmount($this->getAmount() + $delta);\n }\n }", "title": "" }, { "docid": "efe407f89a4b18b5a7de75f32a6299c6", "score": "0.4994632", "text": "public function changeAmount($delta)\n {\n if ($this->getEnabled()) {\n $this->setAmount($this->getPublicAmount() + $delta);\n }\n }", "title": "" }, { "docid": "2818269593f6b3a5fb6edc2cad753e11", "score": "0.47756964", "text": "protected function update_game_state_specify_dice() {\n if (!$this->isWaitingOnAnyAction()) {\n foreach ($this->playerArray as $player) {\n $player->prevSwingValueArray = array();\n $player->prevOptValueArray = array();\n }\n $this->gameState = BMGameState::DETERMINE_INITIATIVE;\n }\n }", "title": "" }, { "docid": "9b8ee93cfe342c66b43e75ba26f1bafd", "score": "0.4764504", "text": "function diff($diff, $mode = 'autodetect')\n {\n }", "title": "" }, { "docid": "66984f3de90c9084e5d1f5bcd316ddfc", "score": "0.4730851", "text": "public function isValidDelta($value) {\n return is_numeric($value) && $value >= 0;\n }", "title": "" }, { "docid": "5a412fdadd02e784ea9ba3114305e3f2", "score": "0.46679968", "text": "public function check_option($old_value, $new_value)\n {\n }", "title": "" }, { "docid": "5a412fdadd02e784ea9ba3114305e3f2", "score": "0.46679968", "text": "public function check_option($old_value, $new_value)\n {\n }", "title": "" }, { "docid": "5a412fdadd02e784ea9ba3114305e3f2", "score": "0.46659806", "text": "public function check_option($old_value, $new_value)\n {\n }", "title": "" }, { "docid": "5a412fdadd02e784ea9ba3114305e3f2", "score": "0.46659806", "text": "public function check_option($old_value, $new_value)\n {\n }", "title": "" }, { "docid": "5a412fdadd02e784ea9ba3114305e3f2", "score": "0.46659806", "text": "public function check_option($old_value, $new_value)\n {\n }", "title": "" }, { "docid": "5a412fdadd02e784ea9ba3114305e3f2", "score": "0.46659806", "text": "public function check_option($old_value, $new_value)\n {\n }", "title": "" }, { "docid": "4926f2e42ef22f0d818fbcbbe5f231ea", "score": "0.46512684", "text": "public static function assertEqualsWithDelta($expected, $actual, float $delta, string $message = ''): \\void {}", "title": "" }, { "docid": "b256a87fc7931d47a04f9a4c0ccf81af", "score": "0.4647807", "text": "function qa_usage_delta($oldusage, $newusage)\r\n{\r\n\treturn array();\r\n}", "title": "" }, { "docid": "914e5032606c16a32aec4a74dac39622", "score": "0.45868433", "text": "function run_delta_update($table, $delta_op, $obj_id)\n\t{\n\t\tswitch($table){\n\t\t\tcase 'surveys':\n\t\t\t\tif(in_array($delta_op, array('refresh','import','replace','update','create','facet') )){\n\t\t\t\t\treturn $this->add_survey($obj_id); \n\t\t\t\t}\n\t\t\t\telse if(in_array($delta_op, array('publish','atomic') )){\n\t\t\t\t\treturn $this->survey_atomic_update($obj_id);\n\t\t\t\t}\n\t\t\t\t/*else if(in_array($delta_op, array('facet') )){\n\t\t\t\t\treturn $this->survey_facets_update($obj_id);\n\t\t\t\t}*/\n\t\t\t\telse if($delta_op=='delete'){\n\t\t\t\t\treturn $this->delete_document(\"survey_uid:$obj_id OR sid:$obj_id\");\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\tcase 'citations':\n\t\t\t\t//throw new exception(\"update handler not implemented for citations\");\n\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "02f09169a967eed97ea8f400b68ac344", "score": "0.45812792", "text": "function processDrpdown($selectedVal) {\n\n\t//echo (\"<H5> 아무거나 : $selectedVar <BR>\");\n\t\n}", "title": "" }, { "docid": "622ec9256af13b7cace05f6a7d46b804", "score": "0.45578855", "text": "function changeMe($change){\n $change = 10;\n }", "title": "" }, { "docid": "903d3c1996e13c5da045fd531541d1a5", "score": "0.45133683", "text": "public function dodge($precisione);", "title": "" }, { "docid": "bd75c4f0cd9ce376a8c423a44650cdc3", "score": "0.4501775", "text": "public function assertEqualsWithDelta($expected, $actual, $delta, $message = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('assertEqualsWithDelta', func_get_args()));\n }", "title": "" }, { "docid": "0fb508aac8abe8bf8aacdbb473ade18a", "score": "0.44815367", "text": "public function calculateDeltaT($celerity, $fluid,$density, $deltaPprevious, $deltaTprevious)\n {\n if($celerity == 0 || $fluid == 0){\n $deltaT = $deltaTprevious/2;\n }\n else if(is_null($deltaPprevious)) {\n $deltaT = 0 * ($this->r / 75);\n }\n else\n {\n $deltaT=(($celerity*$fluid*$density)/$deltaPprevious) * ($this->r/75);\n }\n return $deltaT;\n }", "title": "" }, { "docid": "21e1fecf0ce41d06b5ad59a0936366cb", "score": "0.4457516", "text": "public function get2dValue($delta) {\n if($delta == 'delta_b') {\n $t2d = $this->viewing_height / $this->viewing_length; //(b/a)\n } elseif ($delta == 'delta_f') {\n $t2d = $this->viewing_width_1 / $this->viewing_height; //(f/b)\n } elseif ($delta == 'delta_bf') {\n $t2d = $this->viewing_height / $this->viewing_width_1; //(b/f)\n } elseif ($delta == 'delta_yb') {\n $t2d = $this->viewing_width_2 / $this->viewing_height; //(y/b)\n } elseif ($delta == 'delta_by') {\n $t2d = $this->viewing_height / $this->viewing_width_2; //(b/y)\n } else {\n $t2d = $this->viewing_length / $this->viewing_height; //(a/b)\n }\n \n $t2d = round($t2d,3);\n return $this->supportPanel4Side->get2dReferenceValueOfT($t2d);\n }", "title": "" }, { "docid": "1a02d16e8fee9a9b3c1c33919a0f3d89", "score": "0.44382876", "text": "public function setDeltaBM(\\Mu4ddi3\\Compensa\\Webservice\\StructType\\Factor $deltaBM = null)\n {\n if (is_null($deltaBM) || (is_array($deltaBM) && empty($deltaBM))) {\n unset($this->DeltaBM);\n } else {\n $this->DeltaBM = $deltaBM;\n }\n return $this;\n }", "title": "" }, { "docid": "a23a7bf7c82139b6ca12404730e1e232", "score": "0.44376072", "text": "public function subtractOption($id, $optionName, $optionValue);", "title": "" }, { "docid": "285557492ee6c793c8f0638bb90bb564", "score": "0.4424678", "text": "static public function changeDir()\n {\n $dir = Horde_Util::getFormData('dir');\n if (is_null($dir)) {\n self::_setLabel();\n } else {\n if (strpos($dir, '/') !== 0) {\n $dir = self::$backend['dir'] . '/' . $dir;\n }\n self::setDir($dir);\n }\n }", "title": "" }, { "docid": "7591d082bf36be7d3ae1c260dd6274d5", "score": "0.44233435", "text": "public function getDelta($name1, $name2, $values = false){\n $retval = array();\n if(array_key_exists($name1, $this->marks) && array_key_exists($name2, $this->marks)){\n $one = $this->getMark($name1, $values);\n $two = $this->getMark($name2, $values);\n foreach($one as $key => $val){\n $retval[$key] = $two[$key] - $one[$key];\n }\n }\n\n return $retval;\n }", "title": "" }, { "docid": "dba399605b2817e5516ab459711d006b", "score": "0.440871", "text": "function geni_yourls_samplepage_update_option() {\n\t$in = $_POST['theme_option'];\n\t\n\tif( $in ) {\n\t\t// Validate theme_option. ALWAYS validate and sanitize user input.\n\t\t// Here, we want an integer\n\t\t//\t$in = intval( $in);\n\t\t$in = $in;\n\n\t\t\n\t\t// Update value in database\n\t\tyourls_update_option( 'theme_option', $in );\n\t}\n}", "title": "" }, { "docid": "3675094db52a890e4df79505166cb4db", "score": "0.4392014", "text": "function getDiff() {}", "title": "" }, { "docid": "3595cceafe0ed7645eaa36625c1e48f5", "score": "0.43823338", "text": "public function setDeltaWU(\\Mu4ddi3\\Compensa\\Webservice\\StructType\\Factor $deltaWU = null)\n {\n if (is_null($deltaWU) || (is_array($deltaWU) && empty($deltaWU))) {\n unset($this->DeltaWU);\n } else {\n $this->DeltaWU = $deltaWU;\n }\n return $this;\n }", "title": "" }, { "docid": "9de816c153373d1adc9474b037bdcb32", "score": "0.4378094", "text": "function calculate_score($opt,$total_score,$change_score){\n switch ($opt){\n case \"+\":\n $total=$total_score+$change_score;\n break;\n case \"-\":\n $total=$total_score-$change_score;\n break;\n }\n return $total;\n}", "title": "" }, { "docid": "637d9b4520c7b7abd6235965f85c7929", "score": "0.4368843", "text": "public function testNonPeriod_Days()\n\t{\n\t\tglobal $enable_periods, $periods;\n\t\t\n\t\t$enable_periods = false;\n\t\t$periods = null;\n\t\t\n\t\tunset($_GET['duration']);\n unset($_POST['duration']);\n unset($_COOKIE['duration']);\n unset($_REQUEST['duration']);\n \n unset($_GET['dur_units']);\n unset($_POST['dur_units']);\n unset($_COOKIE['dur_units']);\n unset($_REQUEST['dur_units']);\n \n $_REQUEST['dur_units'] = 'days';\n $_REQUEST['duration'] = '2';\n\t\t\n\t\tlist($duration, $dur_units, $units) = input_Duration();\n\t\t$this->assertEquals($duration, 2);\n\t\t$this->assertEquals($dur_units, 'days');\n\t\t$this->assertEquals($units, 24*60*60);\n\t}", "title": "" }, { "docid": "eb664be79eb0abc8a2e606919e5276ee", "score": "0.43614203", "text": "public function diff();", "title": "" }, { "docid": "9414833e8e8e1afdc79f5d6f62704008", "score": "0.43561155", "text": "protected function do_next_step_specify_dice() {\n $this->setAllToNotWaiting();\n $this->initialise_swing_value_array_array();\n $this->set_option_values();\n $this->set_swing_values();\n $this->roll_active_dice_needing_values();\n }", "title": "" }, { "docid": "d1292d8f5af45238d0abad0fa3b521e0", "score": "0.43323863", "text": "private function adapt($delta, $numPoints, $firstTime) {\n\t\t$delta = (int) (\n\t\t\t($firstTime)\n\t\t\t\t? $delta / $this->const_DAMP\n\t\t\t\t: $delta / 2\n\t\t\t);\n\t\t$delta += (int) ($delta / $numPoints);\n\t\t$k = 0;\n\t\twhile ($delta > (($this->const_BASE - $this->const_TMIN) * $this->const_TMAX) / 2) {\n\t\t\t$delta = (int) ($delta / ($this->const_BASE - $this->const_TMIN));\n\t\t\t$k = $k + $this->const_BASE;\n\t\t} //end while\n\t\t$k = $k + (int) ((($this->const_BASE - $this->const_TMIN + 1) * $delta) / ($delta + $this->const_SKEW));\n\t\treturn $k;\n\t}", "title": "" }, { "docid": "1a1e6069a732a582140d7693e144dc90", "score": "0.43312243", "text": "public static function formatDelta(string|float|int $value, array $options = []): string\n {\n $options += ['places' => 0];\n $value = number_format((float)$value, $options['places'], '.', '');\n $sign = $value > 0 ? '+' : '';\n $options['before'] = isset($options['before']) ? $options['before'] . $sign : $sign;\n\n return static::format($value, $options);\n }", "title": "" }, { "docid": "57d414b125ac0f90553757e7df63fd47", "score": "0.43250334", "text": "public function testPeriod_Default()\n\t{\n\t\tglobal $enable_periods, $periods;\n\t\t\n\t\t$enable_periods = true;\n\t\t$periods = array('1', '2', '3');\n\t\t\n\t\tunset($_GET['duration']);\n unset($_POST['duration']);\n unset($_COOKIE['duration']);\n unset($_REQUEST['duration']);\n \n unset($_GET['dur_units']);\n unset($_POST['dur_units']);\n unset($_COOKIE['dur_units']);\n unset($_REQUEST['dur_units']);\n\t\t\n\t\tlist($duration, $dur_units, $units) = input_Duration();\n\t\t$this->assertEquals($duration, 1);\n\t\t$this->assertEquals($dur_units, 'periods');\n\t\t$this->assertEquals($units, 60);\n\t}", "title": "" }, { "docid": "b9fcc1454f3c2850773a9c6ba2f6a288", "score": "0.4298498", "text": "public function toEqualWithDelta(mixed $expected, float $delta, string $message = ''): self\n {\n Assert::assertEqualsWithDelta($expected, $this->value, $delta, $message);\n\n return $this;\n }", "title": "" }, { "docid": "b282bea66529f4b739e531cd7ecc500b", "score": "0.42983305", "text": "function dmyProvider($target='day', $option=false, $selected='')\n{\n\tif($target=='day')\n\t{\n\t\t$days = array();\n\n\t\tfor($i = 1; $i<=31; $i++)\n\t\t{\n\t\t\t$var = str_pad($i, 2, '0', STR_PAD_LEFT);\n\n\t\t\tif($option)\n\t\t\t{\n\t\t\t\techo '<option value=\"'.$var.'\"'; __selected($selected, $var); echo '>'.$i.'</option>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($days, $i);\n\t\t\t}\n\t\t}\n\n\t\treturn !$option ? $days : array();\n\t}\n\n\tif($target=='month')\n\t{\n\n\t\t$months = array(\n\t\t 1 => 'January',\n\t\t 'February',\n\t\t 'March',\n\t\t 'April',\n\t\t 'May',\n\t\t 'June',\n\t\t 'July ',\n\t\t 'August',\n\t\t 'September',\n\t\t 'October',\n\t\t 'November',\n\t\t 'December',\n\t\t);\n\n\t\tforeach($months as $numeric => $alpha)\n\t\t{\n\t\t\t$var = str_pad($numeric, 2, '0', STR_PAD_LEFT);\n\n\t\t\tif($option)\n\t\t\t{\n\t\t\t\techo '<option value=\"'.str_pad($var, 2, '0', STR_PAD_LEFT).'\"'; __selected($selected, $var); echo '>'.$alpha.'</option>';\n\t\t\t}\n\t\t}\n\n\t\treturn !$option ? $months : array();\n\t}\n\n\tif($target=='year')\n\t{\n\t\t$years = array();\n\t\t$currentYear = date(\"Y\");\n\t\t$limit = 0;\n\t\twhile($limit<100)\n\t\t{\n\t\t\t$var = $currentYear-$limit++;\n\n\t\t\tif($option)\n\t\t\t{\n\t\t\t\techo '<option value=\"'.$var.'\"'; __selected($selected, $var); echo '>'.$var.'</option>';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tarray_push($years, $var);\n\t\t\t}\n\n\t\t}\n\n\n\t\treturn !$option ? $years : array();\n\t}\n\n\treturn '';\n}", "title": "" }, { "docid": "806a732c52c94891fb8956de56af9eab", "score": "0.4293767", "text": "public function getAValue($delta) {\n if($delta == 'delta_f') {\n $t2d = $this->viewing_width_1/$this->viewing_height; //(f/b)\n } elseif ($delta == 'delta_yb') {\n $t2d = $this->viewing_width_2 / $this->viewing_height; //(y/b)\n } else {\n $t2d = $this->viewing_length/$this->viewing_height; //(a/b)\n }\n \n $t2d = round($t2d,3);\n return $this->supportPanelA4Side->get2dReferenceValueOfT($t2d);\n }", "title": "" }, { "docid": "9369d3d9e0402d8702ecbeed1036be19", "score": "0.42850572", "text": "public function choords(){}", "title": "" }, { "docid": "539a459cf9bf46ba33b4ff98bb8e8cc5", "score": "0.42741436", "text": "function google_weather_delete(&$form_state, $delta = 0) {\n $title = google_weather_get_title($delta);\n $form['block_title'] = array('#type' => 'hidden', '#value' => $title);\n $form['delta'] = array('#type' => 'hidden', '#value' => $delta);\n\n return confirm_form($form, t('Are you sure you want to delete the \"%name\" block?', array('%name' => $title)), 'admin/build/block', NULL, t('Delete'), t('Cancel'));\n}", "title": "" }, { "docid": "a7096aeb552bd0547f243a7abfb00136", "score": "0.42598036", "text": "function aplicar_descuento(){\n \n if ($this->d1 == '0.1'){\n $this->porc = 0;\n $this->porc = $this->porc + ($this->resultado * 0.1);\n }\n else if($this->d2 == '50000'){\n $this->porc = 0;\n $this->porc = $this->porc + 50000;\n }\n else if($this->d3 == '0.05'){\n $this->porc = 0;\n $this->porc = + $this->porc + ($this->resultado * 0.05);\n }\n \n $this->total = $this->resultado - $this->porc;\n\n echo $this->total . \"<br>\";\n }", "title": "" }, { "docid": "e48f0da21bf5808d7678e55ebd725029", "score": "0.42479452", "text": "public function testNonPeriod_Default()\n\t{\n\t\tglobal $enable_periods, $periods;\n\t\t\n\t\t$enable_periods = false;\n\t\t$periods = null;\n\t\t\n\t\tunset($_GET['duration']);\n unset($_POST['duration']);\n unset($_COOKIE['duration']);\n unset($_REQUEST['duration']);\n \n unset($_GET['dur_units']);\n unset($_POST['dur_units']);\n unset($_COOKIE['dur_units']);\n unset($_REQUEST['dur_units']);\n\t\t\n\t\tlist($duration, $dur_units, $units) = input_Duration();\n\t\t$this->assertEquals($duration, 1);\n\t\t$this->assertEquals($dur_units, 'seconds');\n\t\t$this->assertEquals($units, 1);\n\t}", "title": "" }, { "docid": "c62f39d7b89d2a873b161f94d581838e", "score": "0.42459005", "text": "public function getOldValue();", "title": "" }, { "docid": "4343f8487caeee859de7d1990e4373cd", "score": "0.4243204", "text": "public function check_option($old_value, $new_value, $option)\n {\n }", "title": "" }, { "docid": "63b752fb27d0fb63240e0f71630f8b25", "score": "0.4225978", "text": "function google_weather_block_configure($delta, $edit) {\n $form_state = array('values' => google_weather_get_config($delta));\n return google_weather_configure_form($form_state);\n}", "title": "" }, { "docid": "757413d763b982419cdca26d1c3c1ea9", "score": "0.421236", "text": "function getDiff()\n {\n }", "title": "" }, { "docid": "56c86359d656458642f9379c087ea852", "score": "0.41995198", "text": "public static function assertNotEqualsWithDelta($expected, $actual, float $delta, string $message = ''): \\void {}", "title": "" }, { "docid": "002a3c922c6256cf00640e5e15707d22", "score": "0.41968435", "text": "public function change()\n {\n $this->query(\n \"INSERT INTO `productoption_choices` \n (`id`, `productoption_id`, `value`, `created`, `modified`) VALUES\n (UUID(), (SELECT `id` FROM `productoptions` WHERE `name` = 'kleurbewerking'), ('geen'), now(), now());\n\n INSERT INTO `productoption_choices` \n (`id`, `productoption_id`, `value`, `created`, `modified`) VALUES\n (UUID(), (SELECT `id` FROM `productoptions` WHERE `name` = 'kleurbewerking'), ('zwart/wit'), now(), now());\n\n INSERT INTO `productoption_choices` \n (`id`, `productoption_id`, `value`, `created`, `modified`) VALUES\n (UUID(), (SELECT `id` FROM `productoptions` WHERE `name` = 'kleurbewerking'), ('sepia'), now(), now());\n\n INSERT INTO `productoption_choices` \n (`id`, `productoption_id`, `value`, `created`, `modified`) VALUES\n (UUID(), (SELECT `id` FROM `productoptions` WHERE `name` = 'kleurbewerking'), ('speciaal'), now(), now());\n\n INSERT INTO `productoption_choices` \n (`id`, `productoption_id`, `value`, `created`, `modified`) VALUES\n (UUID(), (SELECT `id` FROM `productoptions` WHERE `name` = 'uitvoering'), ('glans'), now(), now());\n\n INSERT INTO `productoption_choices` \n (`id`, `productoption_id`, `value`, `created`, `modified`) VALUES\n (UUID(), (SELECT `id` FROM `productoptions` WHERE `name` = 'uitvoering'), ('mat'), now(), now());\"\n );\n }", "title": "" }, { "docid": "486a913a378e6f3fd0084de84187cb76", "score": "0.41950926", "text": "function set_age_calc($new_age)\r\n {\r\n $this->age = $new_age;\r\n }", "title": "" }, { "docid": "afb61b9413ab020471918e2834c7a446", "score": "0.4192122", "text": "function dropDown($label, $name, $valueArr, $preSelect){\n // dropDown ('Favorite Car Brand: ', 'car', array('Ford', 'Chevy', 'Dodge'), 'Chevy');\n echo \"$label <br>\";\n echo \"<select name='$name'>\\n\";\n foreach($valueArr as $e){\n if($e == $preSelect){\n echo \"<option value='$e' selected='selected'>$e</option>\\n\";\n }\n else{\n echo \"<option value='$e'>$e</option>\\n\";\n }\n }\n echo \"</select><br>\\n\";\n}", "title": "" }, { "docid": "7688de8e0f2bb6590770eab3218b0a77", "score": "0.41896954", "text": "private function setDifference(){\r\n\r\n\t\t$this->difference = $this->ratingPlayerA - $this->ratingPlayerB;\r\n\r\n\t\treturn true;\r\n\r\n\t}", "title": "" }, { "docid": "36545f2271795f5c1167b87e22b3e17b", "score": "0.41879666", "text": "public function counter($key, $delta);", "title": "" }, { "docid": "420c8f29708b27fb5bc0c8c447f96d89", "score": "0.41878173", "text": "function selected( $choice, $expected ){\n\tif( $choice == $expected ){\n\t\techo 'selected';\n\t}\n}", "title": "" }, { "docid": "307f54ef10a13f1e1b4c9bdda0fa439d", "score": "0.41864184", "text": "public function menu_changes() {\n\t\tsmarty()->assign('title', \"Menu Changes\");\n\n\t\t// Check if user has permission to access this page\n\t\tif (!auth()->hasPermission(\"view_menu_changes\")) {\n\t\t\tsession()->setFlash(\"You do not have permission to add new users\", 'error');\n\t\t\t$this->redirect();\n\t\t}\n\n\t\t// set the time frame options for the drop down menu\n\t\t$this->reportDays();\n\n\t\t$url = SITE_URL . \"/?module={$this->module}&page=reports&action=menu_change_details\";\n\n\t\tif (isset (input()->days)) {\n\t\t\t$days = input()->days;\n\t\t\t$start_date = false;\n\t\t\t$end_date = false;\n\t\t\t$url .= \"&days={$days}\";\n\t\t} elseif (isset (input()->start_date) && isset (input()->end_date)) {\n\t\t\t$start_date = date(\"Y-m-d\", strtotime(input()->start_date));\n\t\t\t$end_date = date(\"Y-m-d\", strtotime(input()->end_date));\n\t\t\t$days = false;\n\t\t\t$url .= \"&start_date={$start_date}&end_date={$end_date}\";\n\t\t} elseif (isset (input()->start_date) && !isset (input()->end_date)) {\n\t\t\t$start_date = date(\"Y-m-d\", strtotime(input()->start_date));\n\t\t\t$end_date = date(\"Y-m-d\", strtotime(\"now\"));\n\t\t\t$days = false;\n\t\t\t$url .= \"&start_date={$start_date}&end_date={$end_date}\";\n\t\t} elseif (!isset (input()->start_date) && isset (input()->end_date)) {\n\t\t\t$start_date = date(\"Y-m-d\", strtotime(input()->end_date . \" - 30 days\"));\n\t\t\t$end_date = date(\"Y-m-d\", strtotime(input()->end_date));\n\t\t\t$days = false;\n\t\t\t$url .= \"&start_date={$start_date}&end_date={$end_date}\";\n\t\t} else {\n\t\t\t$days = 30;\n\t\t\t$start_date = false;\n\t\t\t$end_date = false;\n\t\t\t$url .= \"&days={$days}\";\n\t\t}\n\n\t\t$menuChanges = $this->loadModel(\"MenuMod\")->countMenuMods($days, $start_date, $end_date);\n\t\tsmarty()->assignByRef(\"menuChanges\", $menuChanges);\n\t\tsmarty()->assign(\"url\", $url);\n\t\tsmarty()->assign(\"numDays\", $days);\n\n\t}", "title": "" }, { "docid": "988b3e9784c073603ea46570ab5b3a4d", "score": "0.4180798", "text": "private function determine_option() {\n\t\tif ( in_array( $this->type, [ 'tabbed', 'multi' ] ) ) {\n\t\t\tif ( array_key_exists( 'option', $this->form[ $this->tab ] ) ) {\n\t\t\t\t$this->current = $this->form[ $this->tab ]['option'];\n\t\t\t} else {\n\t\t\t\t$this->current = $this->prefix . $this->tab;\n\t\t\t}\n\t\t} else {\n\t\t\t$this->current = $this->prefix . $this->slug;\n\t\t}\n\t}", "title": "" }, { "docid": "25938b4607511c9e21f76a70e9fc7a34", "score": "0.41799414", "text": "function verwissel() {\n\t\tif ($this->getal2 > $this->getal1) {\n\t\t\t$temp = $this->getal1;\n\t\t\t$this->getal1 = $this->getal2;\n\t\t\t$this->getal2 = $temp;\n\t\t}\n\t}", "title": "" }, { "docid": "aef3a0514710b7d371ef5e4477605e6d", "score": "0.41770422", "text": "public function testShouldDetectIfAnArgumentsDefaultValueHasChanged(): void\n {\n $oldType = new ObjectType([\n 'name' => 'Type1',\n 'fields' => [\n 'field1' => [\n 'type' => Type::string(),\n 'args' => [\n 'name' => [\n 'type' => Type::string(),\n 'defaultValue' => 'test',\n ],\n ],\n ],\n ],\n ]);\n\n $newType = new ObjectType([\n 'name' => 'Type1',\n 'fields' => [\n 'field1' => [\n 'type' => Type::string(),\n 'args' => [\n 'name' => [\n 'type' => Type::string(),\n 'defaultValue' => 'Test',\n ],\n ],\n ],\n ],\n ]);\n\n $oldSchema = new Schema([\n 'query' => $this->queryType,\n 'types' => [$oldType],\n ]);\n\n $newSchema = new Schema([\n 'query' => $this->queryType,\n 'types' => [$newType],\n ]);\n\n self::assertSame(\n [\n [\n 'type' => BreakingChangesFinder::DANGEROUS_CHANGE_ARG_DEFAULT_VALUE_CHANGED,\n 'description' => 'Type1.field1 arg name has changed defaultValue',\n ],\n ],\n BreakingChangesFinder::findArgChanges($oldSchema, $newSchema)['dangerousChanges']\n );\n }", "title": "" }, { "docid": "aa2bc4e174b35a14ecac87ae0aa6c817", "score": "0.4177041", "text": "public static function onUpdateStageDrop($param)\n\t{\n\t\tif (empty($param['order']))\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\t\n\t\ttry\n\t\t{\n \t\tTTransaction::open('erphouse');\n \t\t\n \t\tforeach ($param['order'] as $key => $id)\n \t\t{\n \t\t\t$sequence = ++ $key;\n \n \t\t\t$fase = new Fase($id);\n \t\t\t$fase->ordem = $sequence;\n \n \t\t\t$fase->store();\n \t\t}\n \t\t\n \t\tTTransaction::close();\n }\n catch (Exception $e)\n {\n new TMessage('error', $e->getMessage());\n }\n\t}", "title": "" }, { "docid": "1455e65ea5fd086c45917bc1bb009cb7", "score": "0.4173264", "text": "public function onchange()\n {\n }", "title": "" }, { "docid": "72480c7284f1cc3ab72e6187f5921f33", "score": "0.4169951", "text": "function DIAS_FECHA($_DESDE, $_HASTA) {\r\n\tglobal $_ARGS;\r\n\tglobal $_PARAMETRO;\r\n\t$sql = \"SELECT DATEDIFF('$_HASTA', '$_DESDE');\";\r\n\t$query = mysql_query($sql) or die(getErrorSql(mysql_errno(), mysql_error(), $sql));\r\n\t$field = mysql_fetch_array($query);\r\n\t$dias = ++$field[0];\r\n\tif (substr($_HASTA, 5, 5) == \"02-28\") $dias+=2;\r\n\telseif (substr($_HASTA, 5, 5) == \"02-29\") $dias+=1;\r\n\treturn intval($dias);\r\n}", "title": "" }, { "docid": "272da54905ba2b61d5c5a59b527e6d6f", "score": "0.41695905", "text": "function inputRoots()\r\n{\r\n $d = $GLOBALS['d'];\r\n if ($d = 0) {\r\n echo 'What do think x is ? ';\r\n $userRoot1 = rtrim(fgets(STDIN));\r\n echo 'I got x = ' . $userRoot1;\r\n } else //If the discriminant is greater than 0 i.e. The quadratic equation has 2 distinct real roots\r\n {\r\n echo 'What do think a value of x is ? ';\r\n $userRoot1 = rtrim(fgets(STDIN));\r\n echo 'I got your 1st value of x = ' . $userRoot1;\r\n echo 'What do think another value of x is ? ';\r\n $userRoot2 = rtrim(fgets(STDIN));\r\n echo 'I got your 2nd value of x = ' . $userRoot2;\r\n }\r\n}", "title": "" }, { "docid": "250b7390261f5a3ac0903c49a7488686", "score": "0.41684592", "text": "public function capture_filter_pre_update_option($new_value, $option_name, $old_value)\n {\n }", "title": "" }, { "docid": "e68d99ebb2c2fe3334cd7091a7f523d6", "score": "0.41642833", "text": "public function updateDiff()\n {\n $this->_diff = $this->_dtEnd->diff($this->_dtStart);\n }", "title": "" }, { "docid": "5c3993fba2c7f6904017d6dd8b5346c0", "score": "0.41592208", "text": "protected abstract function validate_option($dirty, $clean, $old);", "title": "" }, { "docid": "82a4f9a65daa0cb7cb1e856f38de80a3", "score": "0.415492", "text": "public function selection(): void\n {\n $_SESSION[\"summa\"] = $_SESSION[\"summa\"] ?? 0;\n $_SESSION[\"diceHand\"] = $_SESSION[\"diceHand\"] ?? new DiceHand();\n\n $selection = $_SESSION[\"selection\"][0] ?? null;\n $sumNumber = $_SESSION[\"diceHand\"]->getSumNumber((int)$selection) ?? 0;\n if ($selection == \"1\") {\n $_SESSION[\"select1\"] = $sumNumber;\n }\n if ($selection == \"2\") {\n $_SESSION[\"select2\"] = $sumNumber;\n }\n if ($selection == \"3\") {\n $_SESSION[\"select3\"] = $sumNumber;\n }\n if ($selection == \"4\") {\n $_SESSION[\"select4\"] = $sumNumber;\n }\n if ($selection == \"5\") {\n $_SESSION[\"select5\"] = $sumNumber;\n }\n if ($selection == \"6\") {\n $_SESSION[\"select6\"] = $sumNumber;\n }\n if ($selection) {\n $_SESSION[\"rollCounter\"] = 0;\n $_SESSION[\"check\"] = [\"0\", \"1\", \"2\", \"3\", \"4\"];\n $_SESSION[\"summa\"] += $sumNumber;\n $_SESSION[\"end\"] = $this->checkAllBoxes();\n }\n }", "title": "" }, { "docid": "22c48e8a06f5aadad08cac918900703a", "score": "0.41537422", "text": "public function changes();", "title": "" }, { "docid": "543af008f667274ed9f553df8ce7486b", "score": "0.41523588", "text": "public function import_stop() {\n\n\t\t//validate IDs\n\t\tif ( isset( $this->id_list[ $this->demo_id ] ) && is_array( $this->id_list[ $this->demo_id ] ) ) {\n\n\t\t\t$option_name = sprintf( 'bs_demo_id_%s', $this->demo_id );\n\t\t\t$option_value = get_option( $option_name, array() );\n\n\t\t\t//save IDs\n\t\t\tupdate_option(\n\t\t\t\t$option_name,\n\t\t\t\tarray_merge( $option_value, $this->id_list[ $this->demo_id ] ),\n\t\t\t\t'no'\n\t\t\t);\n\t\t}\n\n\t\t//validate rollback data\n\t\tif ( isset( $this->rollback_data[ $this->demo_id ] ) && is_array( $this->rollback_data[ $this->demo_id ] ) ) {\n\n\t\t\t$option_name = sprintf( 'bs_demo_rollback_%s', $this->demo_id );\n\t\t\t$option_value = get_option( $option_name, array() );\n\n\t\t\t//save rollback data\n\t\t\tupdate_option(\n\t\t\t\t$option_name,\n\t\t\t\tarray_merge( $option_value, $this->rollback_data[ $this->demo_id ] ),\n\t\t\t\t'no'\n\t\t\t);\n\t\t}\n\n\t}", "title": "" }, { "docid": "8cf1122778f965d056cb29b3fc3cbf0a", "score": "0.41511914", "text": "protected function get_original_option()\n {\n }", "title": "" }, { "docid": "ec8783bd3de65b80994769bb1b05023f", "score": "0.4150935", "text": "public function edit(Factor $factor)\n {\n //\n }", "title": "" }, { "docid": "80b19bb2cc7c74ab1603d39c3bef9791", "score": "0.41485745", "text": "public static function assertEqualsWithDelta($expected, $actual, $delta, $message = '')\n {\n $constraint = new IsEqualWithDelta(\n $expected,\n $delta\n );\n\n static::assertThat($actual, $constraint, $message);\n }", "title": "" }, { "docid": "3e9d33332d722f033191dc4f60524c3e", "score": "0.41441655", "text": "public function testFindDangerousArgChanges()\n {\n $oldType = new ObjectType([\n 'name' => 'Type1',\n 'fields' => [\n 'field1' => [\n 'type' => Type::string(),\n 'args' => [\n 'name' => [\n 'type' => Type::string(),\n 'defaultValue' => 'test'\n ]\n ]\n ]\n ]\n ]);\n\n $newType = new ObjectType([\n 'name' => 'Type1',\n 'fields' => [\n 'field1' => [\n 'type' => Type::string(),\n 'args' => [\n 'name' => [\n 'type' => Type::string(),\n 'defaultValue' => 'Testertest'\n ]\n ]\n ]\n ]\n ]);\n\n $oldSchema = new Schema([\n 'query' => $this->queryType,\n 'types' => [\n $oldType\n ]\n ]);\n\n $newSchema = new Schema([\n 'query' => $this->queryType,\n 'types' => [\n $newType\n ]\n ]);\n\n $this->assertEquals(\n [\n 'type' => FindBreakingChanges::DANGEROUS_CHANGE_ARG_DEFAULT_VALUE,\n 'description' => 'Type1->field1 arg name has changed defaultValue'\n ],\n FindBreakingChanges::findArgChanges($oldSchema, $newSchema)['dangerousChanges'][0]\n );\n }", "title": "" }, { "docid": "3ce89d5c98ec3388c35d798bd07db9e2", "score": "0.41353786", "text": "public function assertNotEqualsWithDelta($expected, $actual, $delta, $message = null) {\n return $this->getScenario()->runStep(new \\Codeception\\Step\\Action('assertNotEqualsWithDelta', func_get_args()));\n }", "title": "" }, { "docid": "d7b4ce31e1735f53a0cbe5f52f0d6da8", "score": "0.4125546", "text": "public function applyDelta($Delta)\n {\n parent::applyDelta($Delta);\n $this->mCommitData = $this->mData;\n $this->parseCommit();\n }", "title": "" }, { "docid": "984478f5c7af5a9e4ea5c37603af128a", "score": "0.41114956", "text": "public static function changeVoteDown($idea){\n $user = Auth::user()->id;\n if (self::checkIfAlreadyVote($user,$idea)==-1){\n Vote::where(['user'=>$user,'idea'=>$idea])->delete();\n }\n elseif(self::checkIfAlreadyVote($user,$idea) == 1){\n Vote::where(['user'=>$user,'idea'=>$idea])->delete();\n Vote::create([\n 'vote'=>-1,\n 'date_vote'=>date('Y-m-d'),\n 'user'=>$user,\n 'idea'=>$idea,\n ]);\n }\n else{\n Vote::create([\n 'vote' => -1,\n 'date_vote' => date('Y-m-d'),\n 'user' => $user,\n 'idea' => $idea,\n ]);\n }\n\n return redirect()->route('idea',$idea);\n }", "title": "" }, { "docid": "b501a36bcaaf5591fac088995d2d14e5", "score": "0.41065213", "text": "function playerDropMenu($event, $letter, $active, $def = \"\\n\")\n{\n // and will only use registered players who are still active\n // (ie. who haven't dropped)\n // if $active is not set, function will return all registered\n // players\n $playernames = $event->getRegisteredPlayers($active);\n\n echo \"<select class=\\\"inputbox\\\" name=\\\"newmatchplayer$letter\\\">\";\n if (strcmp(\"\\n\", $def) == 0) {\n echo \"<option value=\\\"\\\">- Player $letter -</option>\";\n } else {\n echo '<option value=\"\">- None -</option>';\n }\n foreach ($playernames as $player) {\n $selstr = (strcmp($player, $def) == 0) ? 'selected' : '';\n echo \"<option value=\\\"{$player}\\\" $selstr>\";\n echo \"{$player}</option>\";\n }\n echo '</select>';\n}", "title": "" }, { "docid": "7063b7a2a8250919c2e9bd63b3facb66", "score": "0.41055474", "text": "function FeeStageSelect($proj_id,$ts_entry) {\n\t\t\n\tGLOBAL $conn;\n\t\t\n\t$sql_fees = \"SELECT ts_fee_id, ts_fee_text, ts_fee_commence, ts_fee_time_end FROM intranet_timesheet_fees WHERE ts_fee_project = $proj_id ORDER BY ts_fee_commence\";\n\t$result_fees = mysql_query($sql_fees, $conn) or die(mysql_error());\n\t\t\n\t\n\t\techo \"<select name=\\\"update_ts_entry_fee[]\\\">\";\n\t\t\n\t\techo \"<option value=\\\"\\\">-- Not Assigned --</option>\";\n\t\t\n\t\t$check_selected = 0;\n\t\t\n\t\twhile ($array_fees = mysql_fetch_array($result_fees)) {\n\t\t\t\n\t\t$stage_start = explode(\"-\",$array_fees['ts_fee_commence']);\n\t\t$stage_start = mktime(0,0,0,$stage_start[1],$stage_start[2],$stage_start[0]);\n\t\t$stage_end = $stage_start + $array_fees['ts_fee_time_end'];\n\t\t\n\t\t$begin = TimeFormat($stage_start);\n\t\t$end = TimeFormat($stage_end);\n\t\t\t\n\t\t\t$ts_fee_id = $array_fees['ts_fee_id'];\n\t\t\t$ts_fee_text = $array_fees['ts_fee_text'];\n\t\t\tif (($ts_entry >= $stage_start && $ts_entry <= $stage_end) && $check_selected == 0) { $selected = \" selected=\\\"selected\\\" \"; $check_selected = 1; } else { unset($selected); }\n\t\t\techo \"<option value=\\\"$ts_fee_id\\\" $selected>$ts_fee_text ($begin - $end)</option>\";\n\t\t\t\n\t\t}\n\t\t\t\t\n\t\techo \"</select>\";\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "f72092c15f59ffb45d9adf4bcd43bf2f", "score": "0.4100463", "text": "public function DDB($cost, $salvage, $life, $period, $factor = 2) {\n\n $total = 0.0;\n $i = 0;\n $dep = 0.0;\n\n if ($life <= 0) {\n trigger_error(\"Bad input in DDB, need more life\");\n return FALSE;\n }\n\n for ($i=0;$i<$life-1;$i++) {\n \n $dep = ($cost - $total) * ($factor / $life);\n \n if ($period - 1 == $i) {\n return (float) ($dep);\n } else {\n $total += $dep;\n }\n }\n\n return (float) ($cost - $total - $salvage);\n\n }", "title": "" }, { "docid": "f1515ef21fa3c02a43c7dbb9032ef9c6", "score": "0.40954003", "text": "public function getBValue($delta) {\n if( $delta == 'delta_bf') {\n $t2d = $this->viewing_height/$this->viewing_width_1; //(b/f)\n } elseif ($delta == 'delta_by') {\n $t2d = $this->viewing_height/$this->viewing_width_2; //(b/y)\n } else {\n $t2d = $this->viewing_height/$this->viewing_length; //(b/a)\n }\n \n $t2d = round($t2d,3);\n return $this->supportPanelB4Side->get2dReferenceValueOfT($t2d);\n }", "title": "" }, { "docid": "a6256f6f22928f6be504f64aa1f10f0f", "score": "0.4088245", "text": "function bevel($amount) {\n $this->_execute($command = \"-raise {$amount}\");\n }", "title": "" }, { "docid": "6e42f02eef701be1daf0753cddccbc00", "score": "0.40714553", "text": "public static function addInputDecimal(array $args): void\n {\n $field = $args['field'];\n $value = get_option($field);\n if (!$value) {\n $value = '.';\n }\n\n printf('<input type=\"text\" name=\"%s\" id=\"%s\" value=\"%s\" size=\"2\" maxlength=\"1\">', $field, $field, $value);\n self::infoText(__('Used in prices, such as 100,00.', Plugin::TEXT_DOMAIN));\n }", "title": "" }, { "docid": "dea05bb409185a08d2bd0ea26240a782", "score": "0.4067899", "text": "function diaDaSemana($numero)\n{\n switch ($numero) {\n case 1:\n echo \"1 - Domingo\";\n break;\n case 2:\n echo \"2 - Segunda\";\n break;\n case 3:\n echo \"3 - Terça\";\n break;\n case 4:\n echo \"4 - Quarta\";\n break;\n case 5:\n echo \"5 - Quinta\";\n break;\n case 6:\n echo \"6 - Sexta\";\n break;\n case 7:\n echo \"7 - Sábado\";\n break;\n default:\n echo \"Valor inválido\";\n }\n}", "title": "" }, { "docid": "aaf93077d0a87f68cb249659c583ef96", "score": "0.4049648", "text": "public static function shiftLevel($delta, $first, $last, $scope = null, PropelPDO $con = null)\n {\n if ($con === null) {\n $con = Propel::getConnection(CausadiferidoPeer::DATABASE_NAME, Propel::CONNECTION_WRITE);\n }\n\n $whereCriteria = new Criteria(CausadiferidoPeer::DATABASE_NAME);\n $whereCriteria->add(CausadiferidoPeer::LEFT_COL, $first, Criteria::GREATER_EQUAL);\n $whereCriteria->add(CausadiferidoPeer::RIGHT_COL, $last, Criteria::LESS_EQUAL);\n $whereCriteria->add(CausadiferidoPeer::SCOPE_COL, $scope, Criteria::EQUAL);\n\n $valuesCriteria = new Criteria(CausadiferidoPeer::DATABASE_NAME);\n $valuesCriteria->add(CausadiferidoPeer::LEVEL_COL, array('raw' => CausadiferidoPeer::LEVEL_COL . ' + ?', 'value' => $delta), Criteria::CUSTOM_EQUAL);\n\n BasePeer::doUpdate($whereCriteria, $valuesCriteria, $con);\n }", "title": "" }, { "docid": "154f1d9fbbb0c4d0d43cbb59ba4bcb75", "score": "0.4049538", "text": "function hook_block_configure($delta = '') {\n if ($delta == 'exciting') {\n $form['items'] = array(\n '#type' => 'select',\n '#title' => t('Number of items'),\n '#default_value' => variable_get('mymodule_block_items', 0),\n '#options' => array('1', '2', '3'),\n );\n return $form;\n }\n}", "title": "" }, { "docid": "689ca06c0b8e4a8fd120351b5d059851", "score": "0.40437758", "text": "function google_weather_get_config($delta = NULL) {\n $config = array(\n 'delta' => $delta,\n 'google_weather_location' => 'London',\n 'google_weather_days' => 3,\n );\n\n if ($delta) {\n $config['google_weather_location'] = variable_get(\"google_weather_location_{$delta}\", 'London');\n $config['google_weather_days'] = variable_get(\"google_weather_days_{$delta}\", 3);\n }\n return $config;\n}", "title": "" }, { "docid": "1cbad236a000b4d1b9658a732d4b85df", "score": "0.4035537", "text": "function eventNewValue() {\n\n // if seperate date vars are available for this varName, grab them here \n if (isset($_POST[$this->hVarName]))\n $this->hSel = $_POST[$this->hVarName];\n if (isset($_POST[$this->mVarName]))\n $this->mSel = $_POST[$this->mVarName];\n if (isset($_POST[$this->sVarName]))\n $this->sSel = $_POST[$this->sVarName];\n\n // if we already have a value, and no single values, parse it out\n if (($this->value != '')&&(($this->hSel == '')||($this->mSel=='')||($this->sSel==''))) {\n \n // try to identify different formats\n // \n if (preg_match(\"/(\\d\\d*)[:\\/](\\d\\d*)[:\\/](\\d\\d)/\",$this->value, $regs)) {\n $this->hSel = $regs[1];\n $this->mSel = $regs[2];\n $this->sSel = $regs[3];\n }\n \n settype($this->hSel,'integer');\n settype($this->mSel,'integer');\n settype($this->sSel,'integer');\n \n }\n \n\n // if we have any of the *Sel vars now, setup the main one as well\n if (($this->hSel != '')&&($this->mSel!='')&&($this->sSel!='')) {\n $_POST[$this->varName] = $this->hSel.':'.$this->mSel.':'.$this->sSel;\n }\n\n }", "title": "" }, { "docid": "1938d98e62bd2ff872aab5d68f1cc092", "score": "0.40281308", "text": "public function getPrevStep();", "title": "" }, { "docid": "d4bd87a7ccb9055d1838e08191fee801", "score": "0.4024856", "text": "public function setDePara($dePara)\n {\n $this->dePara = $dePara;\n }", "title": "" }, { "docid": "24292b334f29a9bd12434ef81f2ecbbf", "score": "0.40179017", "text": "public function changeStateDependence(Request $request){\n $dir = Direction::findOrFail($request->id);\n $dir->dependence=!$dir->dependence;\n $dir->save();\n return response()->json('actualizado correctamente',200);\n }", "title": "" }, { "docid": "eea99d80ac561bb95230cf2b7d60ecb9", "score": "0.4010452", "text": "function select_to_drop($table,$value,$label,$name)\n{\n\t$query = \"SELECT * FROM $table\";\n\t$results = mysql_query($query) or\n\t\tdie(\"<li>errorno=\".mysql_errno()\n\t\t\t.\"<li>error=\" .mysql_error()\n\t\t\t.\"<li>query=\".$query);\n\t$number_cols = mysql_num_fields($results);\n\t//display query\n\techo \"<b>query: $query</b>\";\n\techo \"<select name=$name id=$name>\";\n\tdo \n\t{ \n \t\techo \"<option value=\" .$row_members[$value] . \">\";\n \t\techo $row_members[$label];\n \t\techo \"</option>\";\n\t} while ($row_members = mysql_fetch_assoc($results));\n \t$rows = mysql_num_rows($results);\n \tif($rows > 0) \n \t{\n \tmysql_data_seek($results, 0);\n\t\t$row_members = mysql_fetch_assoc($results);\n \t}\n\n}", "title": "" }, { "docid": "9c37798b2949b5956c714798e86282d7", "score": "0.40081495", "text": "function expectedDifficulty() {\n return 0.001;\n }", "title": "" }, { "docid": "e38d2dc2e3c1311e0692231f5cf6a1e9", "score": "0.39945507", "text": "public function check_wordproof_option_disabled($old_value, $new_value)\n {\n }", "title": "" }, { "docid": "ba5fd034bccb85456855b451443f08c6", "score": "0.39926678", "text": "public function move($group_id, $delta);", "title": "" }, { "docid": "feba30ee49e58da7767ae9fd253609ec", "score": "0.39924273", "text": "function substract($a, $b) {\n $text = \"The values substracted are:\";\n if ($a >= $b) {\n return $text . $a . \" - \" . $b . \" = \" . ($a - $b);\n } else {\n return $text . $b . \" - \" . $a . \" = \" . ($b - $a);\n }\n }", "title": "" }, { "docid": "5761d898b29a2e678e5c09b9046b6ed9", "score": "0.399147", "text": "function hitungDeterminan($a, $b, $c, $d){\n $matriks = (($a*$d)-($b*$c));\n //menampilkan matriks\n echo \"<table cellpadding='5' cellspacing='5'>\n <tr>\n <td>$a</td>\n <td>$b</td>\n </tr>\n <tr>\n <td>$c</td>\n <td>$d</td>\n </tr>\n </table>\";\n echo \"<br>\";\n echo \"<b>Determinan dari matriks tersebut adalah <b>\" . $matriks; //menampilkan teks dibawah matriks\n}", "title": "" }, { "docid": "48a2e80134e7e8fdbee87866d13004c3", "score": "0.39883175", "text": "public function modifier() {\n if(isset($this->post->quantiteChiffre)){\n $quantiteEauNew = $this->post->quantiteChiffre;\n unset($this->post->quantiteChiffre);\n $consommation = new Consommation($this->post);\n $quantiteEauOld = $consommation->getQuantiteChiffre();\n $consommation->setQuantiteChiffre($quantiteEauNew);\n $this->em->update($consommation);\n // Mettre à jour pointeur compteur\n $compteur = $this->em->selectById('compteur', $consommation->getIdCompteur());\n $compteur->setPointeur($compteur->getPointeur() - $quantiteEauOld + $quantiteEauNew);\n $this->em->update($compteur);\n $this->handleStatus('Consommation modifiée avec succès.');\n }\n $url = explode('/', $_GET['url']);\n $id = $url[2];\n $this->loadView('modifier', 'content');\n $consommation = $this->em->selectById('consommation', $id); //var_dump($abonnement); exit;\n $this->dom->getElementById('id')->value = $consommation->getId();\n $this->dom->getElementById('quantiteChiffre')->value = $consommation->getQuantiteChiffre();\n $this->dom->getElementById('quantiteLettre')->value = $consommation->getQuantiteLettre();\n $this->dom->getElementById('date')->value = $consommation->getDate();\n }", "title": "" }, { "docid": "f8f2446ebbfefbc72f12796713461640", "score": "0.3983515", "text": "public function edit(demande $demande)\n {\n //\n }", "title": "" }, { "docid": "b8eb272505885c3f97a30a63e892e1c4", "score": "0.3980855", "text": "protected function validate_option($dirty, $clean, $old)\n {\n }", "title": "" }, { "docid": "4e899c4d6d679977dac5b8bfc226e351", "score": "0.3980403", "text": "public function eq(){\n\t\t\n\t\t$this->change_year =(intval(intval($this->change_day) / 365));\n\t\t\n\t\t$mod = fmod($this->change_day, 365);\n\n\t\t$this->change_month = intval($mod / 30);\n\n\t\t$this->change_days = intval(fmod($mod, 30));\n\t}", "title": "" }, { "docid": "e73aefaeb30a8999cdb14840776543c6", "score": "0.39777222", "text": "protected function getSoftDeletesInput() {\n $value = $this->option('soft-deletes');\n $ask = (!$value && !$this->option('no-interaction') && !$this->option('quiet'));\n\n if ($ask) {\n $value = $this->choice('Do you wish to add SoftDeletes?', $this->getDatesModifiersChoices('softDeletes'), 0);\n }\n\n $this->crud->setSoftDeletes($value);\n\n if (!$ask) {\n $this->dl('Soft deletes', $this->crud->softDeletes() ? $this->crud->softDeletes() : 'none');\n }\n }", "title": "" }, { "docid": "c240e72e1126efd1f8f19ffc15d434ed", "score": "0.39772427", "text": "public function _changed($orig, $final)\n {\n }", "title": "" }, { "docid": "6e44842b272131ca972f2a56e0908773", "score": "0.39757335", "text": "function changeQuantity($currentQuantity): int\n {\n\n if($_POST[\"action\"] = \"add\"){\n return $currentQuantity + 1;\n } else if ($_POST[\"action\"] = \"remove\" && $currentQuantity > 0){\n return $currentQuantity - 1;\n }\n }", "title": "" } ]
e2207c034557edfcac7504b8fdb03de6
Add language hyperlink button to entry buttons
[ { "docid": "c4de5e201f62e0cbb75fb164843dff2e", "score": "0.54911894", "text": "public function editL10n($row, $href, $label, $title, $icon)\n {\n $strTitle = sprintf(\n $GLOBALS['TL_LANG']['MSC']['editL10n'],\n \"\\\"{$row['title']}\\\"\"\n );\n\n $strButtonUrl = $this->addToUrl($href . '&amp;node=' . $row['id']);\n\n // Select icon by localization publishing status\n $strImgName = $row['i18nl10n_published'] ? 'i18nl10n.png' : 'i18nl10n_invisible.png';\n\n return sprintf(\n '<a href=\"%1$s\" title=\"%2$s\"><img src=\"system/modules/i18nl10n/assets/img/%3$s\"></a>',\n $strButtonUrl,\n specialchars($strTitle),\n $strImgName\n );\n }", "title": "" } ]
[ { "docid": "1a41186ce06afea74272b46bb671d977", "score": "0.6616036", "text": "function addEntry()\n {\n global $_CORELANG, $_ARRAYLANG;\n\n $this->_strPageTitle = $_CORELANG['TXT_BLOG_ENTRY_ADD_TITLE'];\n $this->_objTpl->loadTemplateFile('module_blog_entries_edit.html',true,true);\n\n $options = array(\n 'type' => 'button', \n 'data-cx-mb-views' => 'filebrowser', \n 'data-cx-mb-startmediatype' => 'blog',\n 'id' => 'mediabrowser_button',\n 'style' => 'display:none'\n );\n $mediaBrowser = self::getMediaBrowserButton($_ARRAYLANG['TXT_BLOG_ENTRY_ADD_IMAGE_BROWSE'], $options, 'blogSetUrl');\n \n $this->_objTpl->setVariable(array(\n 'TXT_EDIT_LANGUAGES' => $_ARRAYLANG['TXT_BLOG_CATEGORY_ADD_LANGUAGES'],\n 'TXT_EDIT_SUBMIT' => $_ARRAYLANG['TXT_BLOG_SAVE'],\n 'BLOG_MEDIABROWSER_BUTTON' => $mediaBrowser,\n ));\n\n $arrCategories = $this->createCategoryArray();\n\n //Show language-selection\n if (count($this->_arrLanguages) > 0) {\n $intLanguageCounter = 0;\n $arrLanguages = array(0 => '', 1 => '', 2 => '');\n $strJsTabToDiv = '';\n\n foreach($this->_arrLanguages as $intLanguageId => $arrTranslations) {\n\n $arrLanguages[$intLanguageCounter%3] .= '<input checked=\"checked\" type=\"checkbox\" name=\"frmEditEntry_Languages[]\" value=\"'.$intLanguageId.'\" onclick=\"switchBoxAndTab(this, \\'addEntry_'.$arrTranslations['long'].'\\');\" />'.$arrTranslations['long'].' ['.$arrTranslations['short'].']<br />';\n\n $strJsTabToDiv .= 'arrTabToDiv[\"addEntry_'.$arrTranslations['long'].'\"] = \"'.$arrTranslations['long'].'\";'.\"\\n\";\n\n //Parse the TABS at the top of the language-selection\n $this->_objTpl->setVariable(array(\n 'TABS_LINK_ID' => 'addEntry_'.$arrTranslations['long'],\n 'TABS_DIV_ID' => $arrTranslations['long'],\n 'TABS_CLASS' => ($intLanguageCounter == 0) ? 'active' : 'inactive',\n 'TABS_DISPLAY_STYLE' => 'display: inline;',\n 'TABS_NAME' => $arrTranslations['long']\n\n ));\n $this->_objTpl->parse('showLanguageTabs');\n \n //Parse the DIVS for every language\n $this->_objTpl->setVariable(array(\n 'TXT_DIV_SUBJECT' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_SUBJECT'],\n 'TXT_DIV_KEYWORDS' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_KEYWORDS'],\n 'TXT_DIV_IMAGE' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_IMAGE'],\n 'TXT_DIV_IMAGE_BROWSE' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_IMAGE_BROWSE'],\n 'TXT_DIV_CATEGORIES' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_CATEGORIES']\n ));\n\n //Filter out active categories for this language\n $intCategoriesCounter = 0;\n $arrCategoriesContent = array(0 => '', 1 => '', 2 => '');\n foreach ($arrCategories as $intCategoryId => $arrCategoryValues) {\n if ($arrCategoryValues[$intLanguageId]['is_active']) {\n $arrCategoriesContent[$intCategoriesCounter%3] .= '<input type=\"checkbox\" name=\"frmEditEntry_Categories_'.$intLanguageId.'[]\" value=\"'.$intCategoryId.'\" />'.$arrCategoryValues[$intLanguageId]['name'].'<br />';\n ++$intCategoriesCounter;\n }\n }\n\n $this->_objTpl->setVariable(array(\n 'DIV_ID' => $arrTranslations['long'],\n 'DIV_LANGUAGE_ID' => $intLanguageId,\n 'DIV_DISPLAY_STYLE' => ($intLanguageCounter == 0) ? 'display: block;' : 'display: none;',\n 'DIV_TITLE' => $arrTranslations['long'],\n 'DIV_CATEGORIES_1' => $arrCategoriesContent[0],\n 'DIV_CATEGORIES_2' => $arrCategoriesContent[1],\n 'DIV_CATEGORIES_3' => $arrCategoriesContent[2],\n 'DIV_CONTENT' => new \\Cx\\Core\\Wysiwyg\\Wysiwyg('frmEditEntry_Content_'.$intLanguageId, null, 'full', $intLanguageId),\n ));\n $this->_objTpl->parse('showLanguageDivs');\n\n ++$intLanguageCounter;\n }\n\n $this->_objTpl->setVariable(array(\n 'EDIT_POST_ACTION' => '?cmd=Blog&amp;act=insertEntry',\n 'EDIT_MESSAGE_ID' => 0,\n 'EDIT_LANGUAGES_1' => $arrLanguages[0],\n 'EDIT_LANGUAGES_2' => $arrLanguages[1],\n 'EDIT_LANGUAGES_3' => $arrLanguages[2],\n 'EDIT_JS_TAB_TO_DIV' => $strJsTabToDiv\n ));\n }\n }", "title": "" }, { "docid": "bb71db20500bec32a31348fbfb56bae3", "score": "0.6408316", "text": "private function getLangLinks()\n\t{\n\t\t$this->result = '<div class=\"dropdown ' . $this->options['class'] . '\">';\n\t\t$this->result .= '<button class=\"btn btn-primary dropdown-toggle\" type=\"button\" data-toggle=\"dropdown\">' . HdbkLanguage::getLanguageByCode(Yii::$app->language)->code . ' ';\n\t\t$this->result .= '<span class=\"caret\"></span></button>';\n\t\t$this->result .= '<ul class=\"dropdown-menu\" id=\"main_ls\">';\n\t\t$this->getInacLanguagesTrait();\n\t\t$this->result .= '</ul></div>';\n\t}", "title": "" }, { "docid": "1fa903eb9097c4c97ab046a10d81d95f", "score": "0.62953794", "text": "function qtrans_languange_menu(){\n\t\t$currentUrl = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : site_url();\n\n\t\tif (qtrans_getlanguage() === 'es') { ?>\n\t\t\t<a href=\"<?php echo qtrans_convertURL($currentUrl, 'en'); ?>\"><p>En</p></a><?php\n\t\t} else { ?>\n\t\t\t<a href=\"<?php echo qtrans_convertURL($currentUrl, 'es'); ?>\"><p>Es</p></a><?php\n\t\t}\n\t}", "title": "" }, { "docid": "557e766222de37e1ea57faa1eec08cc2", "score": "0.60499644", "text": "function lex_tinymce_buttons(){\r\n\tadd_filter( \"mce_external_plugins\", \"lex_add_buttons\" );\r\n add_filter( 'mce_buttons', 'lex_register_buttons' );\t\r\n}", "title": "" }, { "docid": "d8bd39649e1de93bc1616418f937a278", "score": "0.59929055", "text": "public function showLanguageSwitch();", "title": "" }, { "docid": "f069c01fd1dfee27e38e2e3a8015caaf", "score": "0.5953287", "text": "private function injectLinks()\n\t{\n global $lang;\n\t\t\n\t\tforeach($this->myLinks as $pagename => $tableau)\n\t\t{\n\t\t\t$after = $tableau[0];\n\t\t\t$langname = $tableau[1];\n\t\t\t\n\t $add = $lang['lm_'.$after] . \"</a>\n </font></div>\n </td>\n </tr>\n\n\n <tr>\n <td>\n\n <div align=\\\"center\\\"><font color=\\\"#FFFFFF\\\">\n <a href='game.php?page=$pagename'>$langname\";\n\t \n\t\t\t$this->addLang(\"lm_$after\", $add, TRUE);\n\t\t}\n }", "title": "" }, { "docid": "4d9dc5b6dc90a0f05d9bb5719d3211bf", "score": "0.5937012", "text": "function tm_language_switcher( $button = false ) {\n\tif( function_exists('icl_get_languages') && function_exists('tm_icon') ) {\n\t\t$current_lang_code = apply_filters( 'wpml_current_language', NULL );\n\t\t$languages = icl_get_languages('skip_missing=0&orderby=code');\n\n\t\t$current_lang = current(array_filter($languages,function($v,$k) use ($current_lang_code){\n\t\t\treturn $v['code'] == $current_lang_code;\n\t\t}, ARRAY_FILTER_USE_BOTH));\n\n\t\tif( !$current_lang ) return;\n\n\t\t$button_css_class = $button ? 'px-6 py-3 rounded-full border-2 border-gray-300' : 'p-2 rounded';\n\n\t\t?>\n\t\t<div class=\"wpml-lang-switcher relative hover:bg-gray-100 dark:hover:bg-slate-700 group cursor-pointer <?php echo $button_css_class; ?>\">\n\t\t<div class=\"flex items-center text-black dark:text-white font-semibold\">\n\t\t<?php \n\t\techo $current_lang['native_name'];\n\t\t\n\t\ttm_icon('chevron-down', 24, 'w-4 h-4 ml-1')\n\t\t?>\n\t\t</div>\n\t\t<?php\n\t\tif(!empty($languages)){\n\t\t\t?>\n\t\t\t<ul class=\"hidden group-hover:block absolute top-full left-0 bg-white dark:bg-slate-900 shadow rounded p-2\">\n\t\t\t<?php foreach($languages as $l){ ?>\n\t\t\t\t<li>\n\t\t\t\t\t<a class=\"block p-2 hover:bg-gray-100 dark:hover:bg-slate-600 rounded\" href=\"<?php echo $l['url']; ?>\">\n\t\t\t\t\t<p class=\"block font-semibold text-black dark:text-white\"><?php echo $l['native_name']; ?></p>\n\t\t\t\t\t<p class=\"text-xs\"><?php echo $l['translated_name']; ?></p>\n\t\t\t\t\t</a>\n\t\t\t\t</li>\n\t\t\t\t<?php\n\t\t\t} ?>\n\t\t\t</ul>\n\t\t\t<?php\n\t\t} ?>\n\t\t</div>\n\t\t<?php\n\t} \n}", "title": "" }, { "docid": "0b7c3e979f46c88f98a4475c6f4f16a9", "score": "0.5894274", "text": "public function injectLinks($e)\n {\n $viewModel = $e->getParam('viewModel');\n $viewModel->setVariable('localeLink', 1);\n }", "title": "" }, { "docid": "64575c9153e5ac74d5a19e8f67e0cba2", "score": "0.5890248", "text": "public function edit_form_after_title() {\n\t\t$this->replace = true;\n\t\t$post = get_post();\n\t\t$link = self::get_link( $post );\n\n\t\tif ( ! $link ) {\n\t\t\treturn;\n\t\t}\n\n\t\techo '<div class=\"plt-links-to\"><strong>' . __( 'Links to:', 'page-links-to' ) . '</strong> <a href=\"' . esc_url( $link ) . '\">' . esc_html( $link ) . '</a> <button type=\"button\" class=\"edit-slug button button-small hide-if-no-js\">Edit</button></div>';\n\t}", "title": "" }, { "docid": "26c34975781d4446f7377977f001280d", "score": "0.5826332", "text": "function wcms_order_button_label()\n{\n return 'Continue &rarr;';\n}", "title": "" }, { "docid": "c1208ea09f4c7607246fe6ad67eedd7a", "score": "0.5826331", "text": "function wl_titulo () {\n\techo \"<a href='?'>\".$this->valores['titulo'].\"</a>\";\n}", "title": "" }, { "docid": "56605e4a4500e0983fa68318da655de4", "score": "0.58214015", "text": "public function add_menu_button() {\n\n\t\t$template = require __DIR__ . '/templates/add-menu-button.php';\n\t\t$template();\n\n\t}", "title": "" }, { "docid": "4a90e2c8ce171d834266452145f38141", "score": "0.5807488", "text": "function hrefLangMB_output( $post )\n{\n \n wp_nonce_field( 'my_hrefLangMB_nonce', 'hrefLangMB_nonce' ); // create a nonce field\n\n\n $num=sizeof(hreflang_get_custom_field('hreflang_url'));\n\n \n for($i=0;$i<$num+1;$i++)\n {\n if($i==$num) echo '<b>Create new:</b><br/>';\n hreflang_addLine($i);\n }\n\n echo '<input name=\"save\" type=\"submit\" class=\"button button-primary button-large\" id=\"publish\" value=\"Add\">';\n \n}", "title": "" }, { "docid": "e75db2cb8887922ef6d50164db1826c7", "score": "0.5800924", "text": "function display_table_add_button()\n\t{\n\t\t$page_name = $this->get_page_name();\n\t\t$id = isset($_GET['id']) ? $_GET['id'] : '';\n\t\t?>\n\t\t<a href=\"<?php echo get_admin_url(get_current_blog_id(), 'admin.php?page=' . $page_name . '&action=catalog&id=' . $id . '&sub=add');?>\"\n\t\t\tclass=\"page-title-action\"\n\t\t>\n\t\t\t<?php _e('Add new', 'elberos-core')?>\n\t\t</a>\n\t\t<?php\n\t}", "title": "" }, { "docid": "6c4613fb83ff08eb96e169de90ddeafb", "score": "0.5780964", "text": "function change_entry() {\n\t\t//Sprachen raussuchen\n\t\t$this->make_lang();\n\t\t$this->get_cat_list();\n\n\n\t\t//Es soll eingetragen werden\n\t\tif ($this->checked->submitentry) {\n\n\t\t\t$sql = sprintf(\"UPDATE %s SET linkliste_link='%s', cat_linkliste_id='%s' WHERE linkliste_id='%s'\",\n\t\t\t$this->cms->tbname['papoo_linkliste_daten'],\n\t\t\t$this->db->escape($this->checked->linkliste_link),\n\t\t\t$this->db->escape($this->checked->cat_linkliste_id),\n\t\t\t$this->db->escape($this->checked->linkliste_id)\n\t\t\t);\n\t\t\t$this->db->query($sql);\n\t\t\t$insertid=$this->db->escape($this->checked->linkliste_id);\n\t\t\t//Alle Sprachen linkliste_descrip\n\t\t\t$sql=sprintf(\"DELETE FROM %s WHERE linkliste_lang_id='%s'\",\n\t\t\t$this->cms->tbname['papoo_linkliste_daten_lang'],\n\t\t\t$insertid\n\t\t\t);\n\t\t\t$this->db->query($sql);\n\n\t\t\tforeach ($this->checked->linkliste_Wort as $key => $value) {\n\t\t\t\t$sql=sprintf(\"INSERT INTO %s SET linkliste_lang_id='%s', linkliste_lang_lang='%s', linkliste_Wort='%s', linkliste_descrip='%s'\",\n\t\t\t\t$this->cms->tbname['papoo_linkliste_daten_lang'],\n\t\t\t\t$insertid,\n\t\t\t\t$key,\n\t\t\t\t$value,\n\t\t\t\t$this->db->escape($this->checked->linkliste_descrip[$key])\n\t\t\t\t);\n\t\t\t\t$this->db->query($sql);\n\t\t\t}\n\t\t\t//Sql Datei erneuern\n\t\t\t$sql=sprintf(\"SELECT linkliste_xml_yn FROM %s\",\n\t\t\t$this->cms->tbname['papoo_linkliste_pref']\n\t\t\t);\n\t\t\t$this->export_xml=$this->db->get_var($sql);\n\t\t\tif ($this->export_xml==1){\n\t\t\t\t$this->diverse->make_sql(\"linkliste\");\n\t\t\t}\n\n\n\n\t\t\t$location_url = $_SERVER['PHP_SELF'].\"?menuid=\".$this->checked->menuid.\"&template=\".$this->checked->template.\"&fertig=drin\";\n\t\t\tif ($_SESSION['debug_stopallredirect'])\n\t\t\techo '<a href=\"'.$location_url.'\">Weiter</a>';\n\t\t\telse\n\t\t\theader(\"Location: $location_url\");\n\t\t\texit;\n\t\t}\n\n\t\tif (!empty ($this->checked->glossarid)) {\n\t\t\t//Nach id aus der Datenbank holen\n\t\t\t$sql = sprintf(\"SELECT * FROM %s WHERE linkliste_id='%s'\",\n\t\t\t$this->cms->tbname['papoo_linkliste_daten'],\n\t\t\t$this->db->escape($this->checked->glossarid)\n\t\t\t);\n\n\t\t\t$result = $this->db->get_results($sql);\n\t\t\t#print_r($result);\n\t\t\tif (!empty ($result)) {\n\t\t\t\tforeach ($result as $glos) {\n\t\t\t\t\t$this->content->template['linkliste_Wort'] = $glos->linkliste_Wort;\n\t\t\t\t\t$this->content->template['linkliste_descrip'] = \"nobr:\".$glos->linkliste_descrip;\n\t\t\t\t\t$this->content->template['edit'] = \"ok\";\n\t\t\t\t\t$this->content->template['altereintrag'] = \"ok\";\n\t\t\t\t\t$this->content->template['linkliste_id'] = $glos->linkliste_id;\n\t\t\t\t\t$this->content->template['linkliste_link'] = $glos->linkliste_link;\n\t\t\t\t\t$this->content->template['cat_linkliste_id'] = $glos->cat_linkliste_id;\n\n\t\t\t\t}\n\t\t\t\t//Sprachdaten raussuchen\n\t\t\t\t$sql=sprintf(\"SELECT * FROM %s WHERE linkliste_lang_id='%s'\",\n\t\t\t\t$this->cms->tbname['papoo_linkliste_daten_lang'],\n\t\t\t\t$this->db->escape($this->checked->glossarid)\n\t\t\t\t);\n\t\t\t\t$resultx = $this->db->get_results($sql);\n\t\t\t\t#print_r($resultx);\n\t\t\t\tforeach ($resultx as $lang) {\n\t\t\t\t\t#print_r($lang);\n\t\t\t\t\t$wort[$lang->linkliste_lang_lang] = $lang->linkliste_Wort;\n\t\t\t\t\t$des[$lang->linkliste_lang_lang] = \"nobr:\".$lang->linkliste_descrip;\n\t\t\t\t}\n\t\t\t\t$this->content->template['linkliste_Wort']=$wort;\n\t\t\t\t$this->content->template['linkliste_descrip']=$des;\n\t\t\t\t#print_r($this->content->template['linkliste_descrip']);\n\t\t\t}\n\t\t} else {\n\t\t\t//Daten rausholen und als Liste anbieten\n\t\t\t$this->content->template['list'] = \"ok\";\n\t\t\t//Daten rausholen\n\t\t\t$sql = sprintf(\"SELECT * FROM %s, %s WHERE linkliste_id=linkliste_lang_id AND linkliste_lang_lang='1' ORDER BY linkliste_Wort ASC\",\n\t\t\t$this->cms->tbname['papoo_linkliste_daten'],\n\t\t\t$this->cms->tbname['papoo_linkliste_daten_lang']\n\t\t\t);\n\t\t\t$result = $this->db->get_results($sql, ARRAY_A);\n\t\t\t//print_r($result);\n\t\t\t//Daten f�r das Template zuweisen\n\t\t\t$this->content->template['list_dat'] = $result;\n\t\t\t$this->content->template['link'] = $_SERVER['PHP_SELF'].\"?menuid=\".$this->checked->menuid.\"&template=\".$this->checked->template.\"&glossarid=\";\n\t\t\t;\n\t\t}\n\t\tif ($this->checked->fertig == \"drin\") {\n\t\t\t$this->content->template['eintragmakeartikelfertig'] = \"ok\";\n\t\t}\n\t\t//Anzeigen das Eintrag gel�scht wurde\n\t\tif ($this->checked->fertig == \"del\") {\n\t\t\t$this->content->template['deleted'] = \"ok\";\n\t\t}\n\t\t//Soll gel�scht werden\n\t\tif (!empty ($this->checked->submitdelecht)) {\n\t\t\t//Eintrag nach id l�schen und neu laden\n\t\t\t$sql = sprintf(\"DELETE FROM %s WHERE linkliste_id='%s'\",\n\t\t\t$this->cms->tbname['papoo_linkliste_daten'],\n\t\t\t$this->db->escape($this->checked->linkliste_id)\n\t\t\t);\n\t\t\t$this->db->query($sql);\n\t\t\t$insertid=$this->db->escape($this->checked->linkliste_id);\n\t\t\t//Alle Sprachen linkliste_descrip\n\t\t\t$sql=sprintf(\"DELETE FROM %s WHERE linkliste_lang_id='%s'\",\n\t\t\t$this->cms->tbname['papoo_linkliste_daten_lang'],\n\t\t\t$insertid\n\t\t\t);\n\t\t\t$this->db->query($sql);\n\t\t\t$location_url = $_SERVER['PHP_SELF'].\"?menuid=\".$this->checked->menuid.\"&template=\".$this->checked->template.\"&fertig=del\";\n\t\t\tif ($_SESSION['debug_stopallredirect'])\n\t\t\techo '<a href=\"'.$location_url.'\">Weiter</a>';\n\t\t\telse\n\t\t\theader(\"Location: $location_url\");\n\t\t\texit;\n\t\t}\n\n\t\t//Soll wirklich gel�scht werden?\n\t\tif (!empty ($this->checked->submitdel)) {\n\t\t\t$this->content->template['glossarname'] = $this->checked->glossarname;\n\t\t\t$this->content->template['glossarid'] = $this->checked->glossarid;\n\t\t\t$this->content->template['fragedel'] = \"ok\";\n\t\t\t$this->content->template['edit'] = \"\";\n\t\t}\n\n\t}", "title": "" }, { "docid": "fcb7123c63336d0740eefae223121152", "score": "0.5778125", "text": "function _editButtonLink() {\n\n $editResourceSetting = $this->modx->getObject('modSystemSetting',\n array('key' => 'edit_resource',\n 'namespace' => 'frontpage'));\n\n $editId = $editResourceSetting->get('value');\n $url = $this->modx->makeURL($editId);\n return $url;\n\n }", "title": "" }, { "docid": "5608c7a0d409a6e870c5955906c6c93b", "score": "0.5748698", "text": "public function admin_menu() {\n\t\tadd_options_page( __( 'Available Languages', 'babble' ), __( 'Available Languages' ), 'manage_options', 'babble_languages', array( $this, 'options' ) );\n\t}", "title": "" }, { "docid": "8967021b7963130d26d7b6491b2197e1", "score": "0.5715458", "text": "function getLanguage()\n{\n return array(\n \"general:button:home\" => \"Αρχική\",\n \"general:button:courses\" => \"Μαθήματα\",\n \"general:button:signin\" => \"Συνδεθείτε\",\n \"general:button:save\" => \"Αποθήκευση\",\n \"general:button:delete\" => \"Διαγραφή\",\n \"general:button:remove\" => \"Μετακινήστε\",\n \"general:button:edit\" => \"Επεξεργασία\",\n \"general:button:yes\" => \"Ναι\",\n \"general:button:no\" => \"Οχι\",\n \"general:button:description\" => \"Περιγραφή\",\n \"general:button:help\" => \"Βοήθεια\",\n \"general:button:manageUsers\" => \"Manage Users\",\n \"general:button:LoginToECQA\" => \"Login to ECQA\",\n\n \"general:header:back\" => \"Πίσω\",\n\n \"general:footer:virtus\" => \"VIRTUS - Κέντρο Εικονικής Επαγγελματικής Εκπαίδευσης και Κατάρτισης\",\n \"general:footer:reach\" => \"Προσεγγίστε μας στο: \",\n \"general:footer:erasmus\" => \"Το σχέδιο αυτό χρηματοδοτήθηκε με την υποστήριξη της Ευρωπαϊκής Επιτροπής. Η παρούσα δημοσίευση δεσμεύει μόνο τον συντάκτη της και η Επιτροπή δεν ευθύνεται για τυχόν χρήση των πληροφοριών που περιέχονται σε αυτήν.\",\n\n \"main:welcome:headline\" => \"Καλώς ήλθατε στο Έργο V3C!\",\n \"main:welcome:v3cgoal\" => \"Το έργο \\\"Εικονική Επαγγελματική Εκπαίδευση και Κατάρτιση - VIRTUS\\\" θα αναπτύξει ένα καινοτόμο, πλήρως λειτουργικό εικονικό κέντρο επαγγελματικής εκπαίδευσης και κατάρτισης, το οποίο θα παρέχει κατάλληλα σχεδιασμένα σπονδυλωτά πιστοποιημένα μαθήματα στις Αρθρωτές Χρησιμοποιούμενες Δεξιότητες (MES), που αντιστοιχούν σε ένα ευρύ φάσμα συνθηκών, όπως περιφερειακό αναπτυξιακό δυναμικό ή / και την αναδιάρθρωση της εταιρείας και με κύριο στόχο την αύξηση του ποσοστού συμμετοχής των ενηλίκων εκπαιδευομένων στην επαγγελματική εκπαίδευση και κατάρτιση.\",\n \"main:welcome:v3ccourses\" => \"Ειδικότερα, το εικονικό κέντρο ΕΕΚ θα προσφέρει δύο modular πιστοποιημένα μαθήματα για:\",\n \"main:welcome:tourism\" => \"Τουρισμός και Υπηρεσίες Φιλοξενίας\",\n \"main:welcome:social\" => \"Κοινωνική επιχειρηματικότητα\",\n \"main:welcome:courses\" => \"Μαθήματα\",\n \"main:welcome:listcourses\" => \"Δείτε τη λίστα λίστα με όλα τα διαθέσιμα μαθήματα εδώ.\",\n\n \"main:subjects:subject\" => \"Θέματα\",\n\n \"addcourse:add:create\" => \"Δημιουργήστε ένα νέο μάθημα\",\n \"addcourse:content:name\" => \"Το όνομα του μαθήματος:\",\n \"addcourse:placeholder:name\" => \"Πληκτρολογήστε το όνομα του μαθήματος\",\n \"addcourse:content:language\" => \"Προεπιλεγμένη Γλώσσα\",\n \"addcourse:content:domain\" => \"Τομέας μαθήματος:\",\n \"addcourse:placeholder:domain\" => \"Εισάγετε τον τομέα του μαθήματος\",\n \"addcourse:content:profession\" => \"Επάγγελμα μαθήματος:\",\n \"addcourse:placeholder:profession\" => \"Εισάγετε το επάγγελμα του μαθήματος\",\n \"addcourse:content:desription\" => \"Περιγραφή:\",\n \"addcourse:placeholder:description\" => \"Εισάγετε την περιγραφή του μαθήματος\",\n\n \"course:content:courseunits\" => \"Ενότητες μαθημάτων\",\n \"course:content:enterroom\" => \"Είσοδος στο μάθημα\",\n \"course:content:createdby\" > \"Δημιουργήθηκε από:\",\n \"course:content:domain\" => \"Πεδίο ορισμού::\",\n \"course:content:profession\" => \"Επάγγελμα:\",\n \"course:content:description\" => \"Περιγραφή:\",\n \"course:content:notstarted\" => \"Το module δεν έχει ξεκινήσει ακόμα\",\n \"course:content:unitnotstarted\" => \"Η υποενότητα/κεφάλαιο δεν έχει ξεκινήσει ακόμα\",\n\n \"coursedel:head:name\" => \"Διαγραφή μαθήματος {COURSENAME}\",\n \"coursedel:head:name_tmp\" => \"Διαγραφή μαθήματος\",\n \"coursedel:head:confirm\" => \"Θέλετε πραγματικά να διαγράψετε αυτό το μάθημα {COURSENAME}?\",\n \"coursedel:head:confirm_tmp1\" => \"Θέλετε πραγματικά να διαγράψετε αυτά τα μάθημα;\",\n \"coursedel:head:confirm_tmp2\" => \"?\",\n\n \"courselist:head:subcourses\" => \"{SUBJECT} μαθήματα\",\n \"courselist:head:subcourses_tmp\" => \" μαθήματα\",\n \"courselist:head:add\" => \"Προσθέστε νέο μάθημα\",\n \"courselist:head:search\" => \"Εύρεση\",\n \"courselist:choose:choose\" => \"Επιλέξτε μάθημα\",\n \"courselist:choose:name\" => \"Το όνομα του μαθήματος\",\n \"courselist:choose:creator\" => \"Δημιουργήθηκε από\",\n \"courselist:choose:start\" => \"Ημερομηνίες έναρξης μαθήματος\",\n \"courselist:choose:description\" => \"Περιγραφή\",\n\n \"courselist:admin:translate\" => \"Μετάφραση σε\",\n \"courselist:admin:edit\" => \"Επεξεργασία\",\n \"courselist:admin:delete\" => \"Διαγραφή\",\n\n \"editcourse:head:edit\" => \"Επεξεργαστείτε το μάθημά σας\",\n \"editcourse:edit:name\" => \"Το όνομα του μαθήματος:\",\n \"editcourse:edit:domain\" => \"Τομέας μαθήματος:\",\n \"editcourse:edit:profession\" => \"Επάγγελμα μαθήματος:\",\n \"editcourse:edit:description\" => \"Περιγραφή:\",\n \"editcourse:edit:design\" => \"Σχεδιασμός περιβάλλον μάθησης\",\n \"editcourse:units:add\" => \"Προσθήκη ενότητας\",\n\n \"editcourseunit:edit:name\" => \"Ονομασία ενότητας:\",\n \"editcourseunit:edit:points\" => \"ECVET Points:\",\n \"editcourseunit:edit:startdate\" => \"Ημερομηνία έναρξης:\",\n \"editcourseunit:edit:description\" => \"Περιγραφή:\",\n\n \"overview:head:gallery\" => \"Gallery\",\n\n \"usermanagement:choose:family_name\" => \"Επώνυμο\",\n \"usermanagement:choose:given_name\" => \"Όνομα\",\n \"usermanagement:choose:role\" => \"Ρόλος\",\n \"usermanagment:choose:affiliation\" => \"Φορέας\",\n \"usermanagement:button:update\" => \"Αναβάθμιση χρήστη\",\n \"usermanagement:search:name\" => \"Εύρεση με το όνομα\",\n\n \"designunit:head:title\" => \"Επεξεργασία ενότητας\",\n \"designunit:content:addcontent\" => \"Προσθήκη Περιεχομένου\",\n \"designunit:content:uploadfile\" => \"Ανέβασμα αρχείου\",\n \"designunit:content:apply\" => \"Εφαρμογή\",\n \"designunit:content:slideswidget\" => \"Slides Widget\",\n \"designunit:content:videowidget\" => \"Video Widget\",\n \"designunit:content:imagewidget\" => \"Image Widget\",\n \"designunit:content:hangoutwidget\" => \"Video Conference Widget\",\n \"designunit:content:quizwidget\" => \"Quizzes Widget\",\n \"designunit:content:title\" => \"Τίτλος\",\n \"designunit:content:link\" => \"Link\",\n \"designunit:content:videolink\" => \"Video or Audio\",\n \"designunit:content:questions\" => \"Ερωτήσεις\",\n \"designunit:content:addquestion\" => \"Προσθήκη ερωτήσεων\",\n \"designunit:content:question\" => \"Ερώτηση\",\n \"designunit:content:answers\" => \"Απαντήσεις\",\n \"designunit:content:answer\" => \"Απάντηση\",\n \"designunit:content:addanswer\" => \"Προσθήκη απάντησης\",\n \"designunit:content:save\" => \"Αποθήκευση αλλαγών\",\n \"designunit:content:toolbox\" => \"Toolbox\",\n \"designunit:content:rolespace\" => \"ROLE Space\",\n \"designunit:content:addtoflow\" => \"Προσθήκη στη ροή\",\n \"designunit:content:removefromflow\" => \"Απομάκρυνση από τη ροή\",\n \"designunit:content:imageURL\" => \"Image URL\",\n\n \"designunit:message:inprogress\" => \"Παρακαλώ περιμένετε...\",\n \"designunit:message:stored\" => \"Επιτυχής αποθήκευση!\",\n \"designunit:message:error\" => \"Ένα λάθος συνέβη. Παρακαλώ κάντε ανανέωση της σελίδας.\",\n \"designunit:message:advice\" => \"Οι αλλαγές στα widgets και στα περιεχόμενα αυτών εφαρμόζονται αμέσως μετά που θα πατήσετε αυτό εδώ το κουμπί\",\n\n \"widget:quiz:overview\" => \"Συνολική εικόνα\",\n \"widget:quiz:submittedanswers\" => \"Υποβληθείσες απαντήσεις\",\n \"widget:quiz:correctanswers\" => \"Διόρθωση απαντήσεων\",\n \"widget:quiz:start\" => \"Έναρξη\",\n \"widget:quiz:submit\" => \"Υποβολή\",\n \"widget:chat:join\" => \"Join Room\",\n \"widget:feedback:submit\" => \"Υποβολή\",\n \"widget:feedback:submitted\" => \"Η απάντηση υποβλήθηκε\",\n\n \"widget:general:deactivated\" => \"Αυτό το widget είναι κλειδωμένο. Παρακαλώ εργαστείτε σε άλλα widgets έως ότου αυτό ξεκλειδώσει.\",\n \"widget:general:unlock\" => \"Ξεκλείδωμα\",\n\n \"widget:type:quiz\" => \"Κουίζ\",\n \"widget:type:image\" => \"Εικόνα\",\n \"widget:type:slides\" => \"Διαφάνειες\",\n \"widget:type:video\" => \"video\",\n \"widget:type:hangout\" => \"Τηλεδιάσκεψη\",\n \"widget:type:feedback\" => \"Έντυπο ανατροφοδότησης\",\n\n \"help:help\" => \"Βοήθεια\",\n \"help:importantLinks\" => \"Σημαντικοί σύνδεσμοι\",\n \"help:coursesDesc\" => \"Μια λίστα με όλα τα διαθέσιμα μαθήματα.\", \n \"help:info\" => \"Για περισσότερες πληροφορίες επισκεφθείτε\",\n \"help:handbook\" => \"Εγχειρίδιο\",\n \"help:handbookLink\" => \"GR\",\n \"help:handbookDesc\" => \"Εγχειρίδιο Εκπαιδευόμενου.\",\n );\n}", "title": "" }, { "docid": "b6f14b28aa21639982fddd8c5a2d5bc9", "score": "0.5710509", "text": "function easy_multi_pages_addbuttons() {\r\n\tif ( get_user_option('rich_editing') == 'true') {\r\n\t// add the button for wp25 in a new way\r\n\t\tadd_filter(\"mce_external_plugins\", \"add_easy_multi_pages_tinymce_plugin\", 5);\r\n\t\tadd_filter('mce_buttons', 'register_easy_multi_pages_button', 5);\r\n\t}\r\n}", "title": "" }, { "docid": "9195b9dc1721ffa16966cf25e4647a1e", "score": "0.57023364", "text": "public function localize_script() {\n\t\twp_localize_script( 'editor', 'tinymce_email_button', array(\n\t\t\t'url' => plugin_dir_url( __FILE__ ),\n\t\t\t'title' => __( 'Insert e-mail link', 'tinymce-email-button' ),\n\t\t\t'prompt' => __( 'Enter the email address to link to:', 'tinymce-email-button' ),\n\t\t) );\n\t}", "title": "" }, { "docid": "eb1d71be807152f60e5e33720b566f03", "score": "0.5702136", "text": "function langswitcheradvanced_theme($links) {\n $arlink = array ();\n foreach ($links as $eachc) {\t// language-code\n $arlink[] = $eachc->link;\n }\n return theme('item_list', array('items' => $arlink), array('class' => array(\"language-switcher-locale-url\")));\n // title => '', type => 'ul'\n // https://api.drupal.org/api/drupal/includes!theme.inc/function/theme_item_list/7\n}", "title": "" }, { "docid": "4558e2d52516594cea63658d8003b5a2", "score": "0.56768143", "text": "function translate(){\n\t load_plugin_textdomain('wp-simple-links', false, 'wp-simple-links/languages');\n\t}", "title": "" }, { "docid": "393c33ac310911ae599994b3b3ce4ae9", "score": "0.56668186", "text": "function editEntry($intEntryId)\n {\n global $_CORELANG, $_ARRAYLANG, $objDatabase;\n $count = $objDatabase->Execute('SELECT message_id\n FROM '.DBPREFIX.'module_blog_messages\n WHERE message_id = \"'.$intEntryId.'\"');\n if($count->RecordCount() != 1) {\n \\Permission::noAccess();\n }\n\n\n $this->_strPageTitle = $_ARRAYLANG['TXT_BLOG_ENTRY_EDIT_TITLE'];\n $this->_objTpl->loadTemplateFile('module_blog_entries_edit.html',true,true);\n \n $options = array(\n 'type' => 'button', \n 'data-cx-mb-views' => 'filebrowser', \n 'data-cx-mb-startmediatype' => 'blog',\n 'id' => 'mediabrowser_button',\n 'style' => 'display:none'\n );\n $mediaBrowser = self::getMediaBrowserButton($_ARRAYLANG['TXT_BLOG_ENTRY_ADD_IMAGE_BROWSE'], $options, 'blogSetUrl');\n \n $this->_objTpl->setVariable(array(\n 'TXT_EDIT_LANGUAGES' => $_ARRAYLANG['TXT_BLOG_CATEGORY_ADD_LANGUAGES'],\n 'TXT_EDIT_SUBMIT' => $_ARRAYLANG['TXT_BLOG_SAVE'],\n 'BLOG_MEDIABROWSER_BUTTON' => $mediaBrowser,\n ));\n\n $arrCategories = $this->createCategoryArray();\n $arrEntries = $this->createEntryArray();\n\n $intEntryId = intval($intEntryId);\n \n $forcedLanguage = null;\n if (isset($_GET['langId']) && in_array(contrexx_input2raw($_GET['langId']), \\FWLanguage::getIdArray())) {\n $forcedLanguage = contrexx_input2raw($_GET['langId']);\n }\n\n if ($intEntryId > 0 && key_exists($intEntryId,$arrEntries)) {\n if (count($this->_arrLanguages) > 0) {\n $intLanguageCounter = 0;\n $boolFirstLanguage = true;\n $arrLanguages = array(0 => '', 1 => '', 2 => '');\n $strJsTabToDiv = '';\n\n foreach($this->_arrLanguages as $intLanguageId => $arrTranslations) {\n\n $boolLanguageIsActive = $arrEntries[$intEntryId]['translation'][$intLanguageId]['is_active'];\n if (!$boolLanguageIsActive && $forcedLanguage == $intLanguageId) {\n $boolLanguageIsActive = true;\n }\n\n $arrLanguages[$intLanguageCounter%3] .= '<input '.(($boolLanguageIsActive) ? 'checked=\"checked\"' : '').' type=\"checkbox\" name=\"frmEditEntry_Languages[]\" value=\"'.$intLanguageId.'\" onclick=\"switchBoxAndTab(this, \\'addEntry_'.$arrTranslations['long'].'\\');\" />'.$arrTranslations['long'].' ['.$arrTranslations['short'].']<br />';\n $strJsTabToDiv .= 'arrTabToDiv[\"addEntry_'.$arrTranslations['long'].'\"] = \"'.$arrTranslations['long'].'\";'.\"\\n\";\n \n $activeTab = $boolFirstLanguage;\n if ($forcedLanguage) {\n $activeTab = $forcedLanguage == $intLanguageId;\n }\n\n //Parse the TABS at the top of the language-selection\n $this->_objTpl->setVariable(array(\n 'TABS_LINK_ID' => 'addEntry_'.$arrTranslations['long'],\n 'TABS_DIV_ID' => $arrTranslations['long'],\n 'TABS_CLASS' => ($activeTab && $boolLanguageIsActive) ? 'active' : 'inactive',\n 'TABS_DISPLAY_STYLE' => ($boolLanguageIsActive) ? 'display: inline;' : 'display: none;',\n 'TABS_NAME' => $arrTranslations['long']\n\n ));\n $this->_objTpl->parse('showLanguageTabs');\n \n //Parse the DIVS for every language\n $this->_objTpl->setVariable(array(\n 'TXT_DIV_SUBJECT' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_SUBJECT'],\n 'TXT_DIV_KEYWORDS' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_KEYWORDS'],\n 'TXT_DIV_IMAGE' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_IMAGE'],\n 'TXT_DIV_IMAGE_BROWSE' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_IMAGE_BROWSE'],\n 'TXT_DIV_CATEGORIES' => $_ARRAYLANG['TXT_BLOG_ENTRY_ADD_CATEGORIES']\n ));\n\n //Filter out active categories for this language\n $intCategoriesCounter = 0;\n $arrCategoriesContent = array(0 => '', 1 => '', 2 => '');\n foreach ($arrCategories as $intCategoryId => $arrCategoryValues) {\n if ($arrCategoryValues[$intLanguageId]['is_active']) {\n $arrCategoriesContent[$intCategoriesCounter%3] .= '<input type=\"checkbox\" name=\"frmEditEntry_Categories_'.$intLanguageId.'[]\" value=\"'.$intCategoryId.'\" '.(key_exists($intCategoryId, $arrEntries[$intEntryId]['categories'][$intLanguageId]) ? 'checked=\"checked\"' : '').' />'.$arrCategoryValues[$intLanguageId]['name'].'<br />';\n ++$intCategoriesCounter;\n }\n }\n \n $this->_objTpl->setVariable(array(\n 'DIV_ID' => $arrTranslations['long'],\n 'DIV_LANGUAGE_ID' => $intLanguageId,\n 'DIV_DISPLAY_STYLE' => ($boolFirstLanguage && $boolLanguageIsActive) ? 'display: block;' : 'display: none;',\n 'DIV_TITLE' => $arrTranslations['long'],\n 'DIV_SUBJECT' => $arrEntries[$intEntryId]['translation'][$intLanguageId]['subject'],\n 'DIV_KEYWORDS' => $arrEntries[$intEntryId]['translation'][$intLanguageId]['tags'],\n 'DIV_IMAGE' => $arrEntries[$intEntryId]['translation'][$intLanguageId]['image'],\n 'DIV_CATEGORIES_1' => $arrCategoriesContent[0],\n 'DIV_CATEGORIES_2' => $arrCategoriesContent[1],\n 'DIV_CATEGORIES_3' => $arrCategoriesContent[2],\n 'DIV_CONTENT' => new \\Cx\\Core\\Wysiwyg\\Wysiwyg('frmEditEntry_Content_'.$intLanguageId, $arrEntries[$intEntryId]['translation'][$intLanguageId]['content'], 'full', $intLanguageId), \n ));\n\n $this->_objTpl->parse('showLanguageDivs');\n\n if ($boolLanguageIsActive) {\n $boolFirstLanguage = false;\n }\n\n ++$intLanguageCounter;\n }\n\n $this->_objTpl->setVariable(array(\n 'EDIT_POST_ACTION' => '?cmd=Blog&amp;act=updateEntry',\n 'EDIT_MESSAGE_ID' => $intEntryId,\n 'EDIT_LANGUAGES_1' => $arrLanguages[0],\n 'EDIT_LANGUAGES_2' => $arrLanguages[1],\n 'EDIT_LANGUAGES_3' => $arrLanguages[2],\n 'EDIT_JS_TAB_TO_DIV' => $strJsTabToDiv\n ));\n }\n } else {\n $this->_strErrMessage = $_ARRAYLANG['TXT_BLOG_ENTRY_EDIT_ERROR_ID'];\n }\n }", "title": "" }, { "docid": "866297e8659b34992da1d027ff7c2b89", "score": "0.5651904", "text": "public function add_submenu_button() {\n\n\t\t$template = require __DIR__ . '/templates/add-submenu-button.php';\n\t\t$template();\n\n\t}", "title": "" }, { "docid": "396fc2aa9d226b02a8fd4a4afd4c1105", "score": "0.5639853", "text": "function exampleAddPage() {\n\tadd_menu_page( esc_html__( 'I18n Example', 'i18n-example' ), esc_html__( 'I18n Example', 'i18n-example' ), 'manage_options', 'i18n', 'exampleAdminPage', 'dashicons-translation', 2 );\n}", "title": "" }, { "docid": "881d34a2043f294d5f44f14a25de1677", "score": "0.55866754", "text": "public function tinymce_button() {\n\t\t\t// filters\n\t\t\tadd_filter('mce_external_plugins', array(&$this, 'tinymce_external_plugins'));\n\t\t}", "title": "" }, { "docid": "ad80466a9205202a2e3040cec83a8cf2", "score": "0.55818397", "text": "function viewLangWith() {\n\t\tglobal $bw,$vsTemplate;\n\n\t\t$_SESSION ['url_href'] = $bw->input ['vs'];\n\n\t\t$show['CURRENT_LANG_ITEM']=$this->getLangItemList ();\n\n\t\t$show['CURRENT_LANG_ADD_ITEM']=$this->html->addLangItemForm();\n\n\t\t$this->output = $this->html->FileLangMain($show);\n\n\t}", "title": "" }, { "docid": "1293fb69b953cb15d423271f3beb9fc0", "score": "0.55744183", "text": "public static function onWallEntryAddonInit($event)\n {\n $event->sender->addWidget(widgets\\WallEntryLinks::className(), array(\n 'object' => $event->sender->object,\n 'seperator' => \"&nbsp;&middot;&nbsp;\",\n 'template' => '<div class=\"wall-entry-controls\">{content}</div>',\n ), array('sortOrder' => 10)\n ); \n }", "title": "" }, { "docid": "36786546f0fa31abb1e719b9647e4c66", "score": "0.5569369", "text": "public function menuButtons()\n\t{\n\t\tglobal $context, $board_info;\n\n\t\tif (empty($context['first_message']))\n\t\t\treturn;\n\n\t\t// Generated description from the text of the first post of the topic\n\t\tif (is_on('optimus_topic_description'))\n\t\t\t$this->makeDescriptionFromFirstMessage();\n\n\t\t// Use own description of topic\n\t\tif (! empty($context['topicinfo']['optimus_description']))\n\t\t\t$context['meta_description'] = $context['topicinfo']['optimus_description'];\n\n\t\t// Additional data\n\t\t$context['optimus_og_type']['article'] = array(\n\t\t\t'published_time' => date('Y-m-d\\TH:i:s', (int) $context['topicinfo']['topic_started_time']),\n\t\t\t'modified_time' => empty($context['topicinfo']['topic_modified_time']) ? null : date('Y-m-d\\TH:i:s', (int)\n\t\t\t$context['topicinfo']['topic_modified_time']),\n\t\t\t'author' => empty($context['topicinfo']['topic_started_name']) ? null : $context['topicinfo']['topic_started_name'],\n\t\t\t'section' => $board_info['name'],\n\t\t\t'tag' => $context['optimus_keywords'] ?? null\n\t\t);\n\t}", "title": "" }, { "docid": "7d93db016659c0f14c0dc454e60ccefe", "score": "0.556373", "text": "function component_button() { ?>\n\n\t\t<div class=\"oxygen-add-section-element\"\n \t\t\tdata-searchid=\"<?php echo strtolower( preg_replace('/\\s+/', '_', sanitize_text_field( $this->options['name'] ) ) ) ?>\"\n\t\t\tng-click=\"iframeScope.addComponent('<?php echo esc_attr($this->options['tag']); ?>','nav_menu')\">\n\t\t\t<img src='<?php echo CT_FW_URI; ?>/toolbar/UI/oxygen-icons/add-icons/menu.svg' />\n\t\t\t<img src='<?php echo CT_FW_URI; ?>/toolbar/UI/oxygen-icons/add-icons/menu-active.svg' />\n\t\t\t<?php echo esc_html($this->options['name']); ?>\n\t\t</div>\n\n\t<?php }", "title": "" }, { "docid": "1987117323dae7d1dfd0971274f0cedb", "score": "0.5559808", "text": "function make_linklisteplugin() {\n\n\t\t//echo $this->checked->template;\n\t\tif (defined(\"admin\")){\n\n\t\t\tglobal $template;\n\t\t\tif ($template!=\"login.utf8.html\"){\n\n\t\t\t\tswitch ($this->checked->template) {\n\n\t\t\t\t\t//Die Standardeinstellungen werden bearbeitet\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklisteplugin.html\" :\n\t\t\t\t\t$this->check_pref();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t//Einen Eintrag erstellen\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklisteplugin_create.html\" :\n\t\t\t\t\t$this->make_entry();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t//Einen EIntrag bearbeiten\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklisteplugin_edit.html\" :\n\t\t\t\t\t$this->change_entry();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t//Eine e Kategorie erstellen\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklistecat_create.html\" :\n\t\t\t\t\t$this->make_cat_entry();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t//Einee Kategorie bearbeiten\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklistecat_edit.html\" :\n\t\t\t\t\t$this->change_cat_entry();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t//Einen Dump erstellen oder einspielen\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklisteplugin_dump.html\" :\n\t\t\t\t\t$this->linkliste_dump();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t//Linkeintr�ge sortieren\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklistesort.html\" :\n\t\t\t\t\t$this->linkliste_sort();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t//Kategorien sortieren\n\t\t\t\t\tcase \"../../plugins/linkliste/templates/linklistecat_sort.html\" :\n\t\t\t\t\t$this->linkliste_sort_cat();\n\t\t\t\t\tbreak;\n\n\t\t\t\t\tdefault :\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}", "title": "" }, { "docid": "f25e22895a4d9753d27a6f58491d30d6", "score": "0.55596143", "text": "function add_qiniu_button() {\n add_filter('tiny_mce_version', array (&$this, 'change_tinymce_version') );\n\n // init process for button control\n add_action('init', array (&$this, 'addbuttons') );\n }", "title": "" }, { "docid": "635afaf4693b59103095b50e7f7d95c1", "score": "0.5558935", "text": "function write_here_action_links( $links ) {\n $links[] = '<a href=\"'. esc_url( get_admin_url(null, 'options-general.php?page=write-here-setting') ) .'\">Settings</a>';\n $links[] = '<a href=\"http://wp.ohsikpark.com/write-here/\" target=\"_blank\">Documentation</a>';\n return $links;\n}", "title": "" }, { "docid": "3fb3bc6c3ec649ffff1fd4f3293b4bea", "score": "0.555119", "text": "function displayLanguagesForm() {\n\t\t$show['form'] = $this->addEditLangForm ();\n\t\t$show['list'] = $this->getLangsList ();\n\n\t\treturn $this->output = $this->html->languagesMain($show);\n\t}", "title": "" }, { "docid": "b528dcb841878097ce5dc1d91aa58ac7", "score": "0.554164", "text": "public function Base_GetAppSettingsMenuItems_Handler(&$Sender) {\n $Menu = $Sender->EventArguments['SideMenu'];\n $Menu->AddLink('Forum', T('Censored Words'), 'plugin/tongue', 'Garden.Moderation.Manage');\n }", "title": "" }, { "docid": "14f522616df09380341b23c998ca1a16", "score": "0.5528214", "text": "function learn_press_course_buttons() {\n\t\t// learn_press_get_template( 'single-course/buttons.php' );\n\t}", "title": "" }, { "docid": "3d0ce58028487b0cf36eec7db65e7dbc", "score": "0.55170757", "text": "public static function button( $args ) {\n\t\tif ( empty( $args['url'] ) || empty( $args['label'] ) ) {\n\t\t\treturn;\n\t\t}\n\t\t?>\n\n\t\t<p>\n\t\t\t<a href=\"<?php echo esc_url( $args['url'] ); ?>\" class=\"button-secondary\"><?php echo esc_html( $args['label'] ); ?></a>\n\t\t</p>\n\n\t\t<?php\n\t\tself::show_description( $args );\n\t}", "title": "" }, { "docid": "11f97db32570f699cb1325c3a7e7b4f7", "score": "0.55153435", "text": "public function addEntry($name, $link = '', $active = false)\n\t{\n\t\t$this->appendButton($name, $link, $active);\n\t}", "title": "" }, { "docid": "d60c10750bcfd5a8ec9f7ad64ba632e3", "score": "0.55138", "text": "public function provideTranslations()\n {\n echo '\n <script type=\"text/javascript\">\n if (typeof(LbwpFormEditor) == \"undefined\") { var LbwpFormEditor = {}; }\n // Add text resources\n LbwpFormEditor.Text = {\n saveButton : \"' . esc_js(__('Formular Speichern', 'lbwp')) . '\",\n createNewForm : \"' . esc_js(__('Neues Formular erstellen', 'lbwp')) . '\",\n editorLoading : \"' . esc_js(__('Einen Moment. Der Editor wird geladen.', 'lbwp')) . '\",\n confirmDelete : \"' . esc_js(__('Wollen sie dieses Element wirklich löschen?', 'lbwp')) . '\",\n titleEditField : \"' . esc_js(__('Feld bearbeiten', 'lbwp')) . '\",\n titleEditCondition : \"' . esc_js(__('Konditionen bearbeiten', 'lbwp')) . '\",\n titleEditMultiField : \"' . esc_js(__('Mehrere Felder bearbeiten', 'lbwp')) . '\",\n titleEditMultiCondition : \"' . esc_js(__('Gemeinsame Konditionen bearbeiten', 'lbwp')) . '\",\n conditionText : \"' . esc_js(__('Sie können diese Action unter definierten Umständen ausführen.', 'lbwp')) . '\",\n conditionAndSelection : \"' . esc_js(__('Alle Konditionen müssen zutreffen', 'lbwp')) . '\",\n conditionOrSelection : \"' . esc_js(__('Eine Kondition muss zutreffen', 'lbwp')) . '\",\n conditionValue : \"' . esc_js(__('Wert', 'lbwp')) . '\",\n conditionField : \"' . esc_js(__('Formularfeld', 'lbwp')) . '\",\n conditionAdd : \"' . esc_js(__('Kondition hinzufügen', 'lbwp')) . '\",\n itemConditionText : \"' . esc_js(__('Sie können das Verhalten des Feldes mittels Konditionen steuern.', 'lbwp')) . '\",\n itemMultiConditionText : \"' . esc_js(__('Sie können das Verhalten aller markierten Felder mittels Konditionen steuern. Neue Konditionen werden für alle Felder hinzugefügt. Das Löschen führt dazu, dass die Kondition für alle Felder gelöscht wird.', 'lbwp')) . '\",\n itemConditionField : \"' . esc_js(__('Feld', 'lbwp')) . '\",\n itemConditionType : \"' . esc_js(__('Operator', 'lbwp')) . '\",\n itemConditionValue : \"' . esc_js(__('Wert', 'lbwp')) . '\",\n itemConditionAction : \"' . esc_js(__('Verhalten', 'lbwp')) . '\",\n itemConditionValuePlaceholder : \"' . esc_js(__('Leer', 'lbwp')) . '\",\n multiSelectEditFieldsText : \"' . esc_js(__('Sie bearbeiten mehrere Felder:', 'lbwp')) . '\",\n deletedAction : \"<p>' . esc_js(__('Die Aktion wurde gelöscht.', 'lbwp')) . '</p>\",\n deletedField : \"<p>' . esc_js(__('Das Feld wurde gelöscht.', 'lbwp')) . '</p>\",\n useFromFieldHeading : \"' . esc_js(__('Formular-Feld verwenden', 'lbwp')) . '\",\n useFromFieldCheckbox : \"' . esc_js(__('Feld-Inhalt anhängen statt überschreiben', 'lbwp')) . '\",\n useFromFieldText : \"' . esc_js(__('Klicken Sie auf ein Formular-Feld um dessen Inhalt für das gewählte Aktionsfeld zu verwenden', 'lbwp')) . '\",\n addOption : \"' . esc_js(__('Option hinzufügen', 'lbwp')) . '\"\n };\n </script>\n ';\n }", "title": "" }, { "docid": "b3396ce8be0eded4a2246f6122d31d68", "score": "0.5505781", "text": "private function add_edit_button() {\n $html = '';\n $url = $this->get_edit_button_url_by_pagetype();\n $url->param('sesskey', sesskey());\n\n if ($this->page->user_is_editing()) {\n $icon = 'power-off';\n } else {\n $icon = 'edit';\n }\n $attributes['class'] = 'icon fa fa-' . $icon;\n $attributes['aria-hidden'] = 'true';\n $attributes['href'] = $url;\n $tag = \\html_writer::tag('a', '', $attributes);\n $html .= \\html_writer::div($tag, 'nav-link');\n return $html;\n }", "title": "" }, { "docid": "96c59296add4b78fe3e3212439601b11", "score": "0.5501658", "text": "function addCtaButton(){\n\techo '<a class=\"button secondary-button\" href=\"/contact\">Contact Me</a>';\n}", "title": "" }, { "docid": "02bbb0f409027509f665c63292f07b94", "score": "0.5495661", "text": "function add_vkontakte_button() {\n global $wp_admin_bar;\n if ( !is_super_admin() || !is_admin_bar_showing() || !is_admin())\n {return;}\n\n $wp_admin_bar->add_menu(\n array(\n 'id' => 'vkontakte_top_menu',\n 'title' => __('VKontakte', 'vkontakte')\n )\n );\n\n $wp_admin_bar->add_menu(\n array(\n 'id' => 'vkontakte_ajax_generate_setings',\n 'title' => __('Settings', 'vkontakte'),\n 'href'=> get_site_url().'/wp-admin/admin.php?page=wc-settings&tab=integration&section=integration-vkontakte',\n 'parent' => 'vkontakte_top_menu',\n 'class' => 'vkontakte_ajax_settings'\n )\n );\n }", "title": "" }, { "docid": "a86cbe0c46196e4fabfb50cf5b455b6a", "score": "0.5474802", "text": "function _addButtons()\r\n {\r\n $model\t\t=& $this->getModel();\r\n $params \t=& $model->getParams();\r\n $this->showEmail = $params->get( 'email', 0 );\r\n\r\n if (JRequest::getVar('tmpl') != 'component') {\r\n if ($this->showEmail) {\r\n $this->emailLink = '';\r\n }\r\n\r\n $this->showPrint = $params->get( 'print', 0 );\r\n if ($this->showPrint) {\r\n $this->printLink = '';\r\n }\r\n\r\n $this->showPDF = $params->get( 'pdf', 0 );\r\n if ($this->showPDF) {\r\n $this->pdfLink = '';\r\n }\r\n } else {\r\n $this->showPDF = $this->showPrint = false;\r\n }\r\n }", "title": "" }, { "docid": "75d1d2ff20f0338705840357fa7c5aa5", "score": "0.54584956", "text": "public function addFileButton() {\n // тут не используем шаблон изза неправильного наследования шаблонов\n $name = $this->owner->getName();\n $out = '<a data-silent=\"#editformtable\" legotarget=\"' . $name .\n '\" data-silent-action=\"append\" href=\"' . $this->owner->actUri('addfilefield')->ajaxurl($name) .\n '\"><input type=\"button\" id=\"addfilebutton\" value=\"Добавить файлов\" ></a>';\n $out .= '<a data-silent=\"#editformtable\" legotarget=\"' . $name .\n '\" data-silent-action=\"append\" href=\"' . $this->owner->actUri('addfilelink')->ajaxurl($name) .\n '\" id=addfilelinkbutton><input type=\"button\" id=\"addfilebutton\" value=\"Добавить линки на файлы\" ></a>';\n $out .= \"<script>\n $('#addfilelinkbutton').click(function(){\n var filename=document.bazaapplet.addFile();\n if (filename=='nullnull') return false; // это иззатого что в апплете плюсуются путь и имя, а переписывать лень\n if(filename.substring(0,1).search(/[tzTZ]/)!= -1) {\n $(this).attr('href',$(this).attr('href')+'&filename='+filename);\n return true;\n } else {\n alert('Только на дисках Т и Z!!!');\n return false;\n }\n });\n </script>\";\n return $out;\n }", "title": "" }, { "docid": "35e3cb5104030451a49abc8768bd197e", "score": "0.54517204", "text": "public static function adminLabels();", "title": "" }, { "docid": "8f4f04824f9365dbaa0fef45f4b6917f", "score": "0.54503334", "text": "function linkForAdminEditPostTitle($file_name){\r\n return ui::links()->adminEditPostTitle($file_name)->add_child(\r\n ui::images()->edit_icon()->max_width(\"32px\")->vertical_align_middle().\r\n \"&rarr;Change Title or SECTION\"\r\n );\r\n }", "title": "" }, { "docid": "1662d9e6b642d59d9a6c6b86009ac496", "score": "0.5445737", "text": "function lnkctrl_add_options() {\n add_options_page('Link Control', 'Link Control', 8, 'linkcontrol/options.php');\n}", "title": "" }, { "docid": "b2286684f00e9f4960058ff91a304389", "score": "0.5435515", "text": "function ecv2_SET_TUTORIAL_LINK($lang, $escaped, $param)\n{\n $value = '';\n if ($GLOBALS['XSS_DETECT']) {\n ocp_mark_as_escaped($value);\n }\n\n if ((array_key_exists(1, $param)) && ($param[1] != '') && ($param[1][0] != '#')) {\n require_code('comcode_renderer');\n set_tutorial_link($param[0], $param[1]);\n }\n\n return $value;\n}", "title": "" }, { "docid": "671b70e6e40162b007089116d8c2b7a1", "score": "0.54147744", "text": "function display_language_selection()\n{ ?>\n\t<h1><?php get_lang('WelcomeToTheDokeosInstaller');?></h1>\n\t<h2><?php echo display_step_sequence(); ?><?php echo get_lang('InstallationLanguage');?></h2>\n\t<p><?php echo get_lang('PleaseSelectInstallationProcessLanguage');?>:</p>\n\t<form id=\"lang_form\" method=\"post\" action=\"<?php echo api_get_self(); ?>\">\n<?php display_language_selection_box(); ?>\n\t\t<input type=\"submit\" name=\"step1\" value=\"<?php get_lang('Next');?> &gt;\" />\n\t</form>\n<?php }", "title": "" }, { "docid": "d94e7d2ca763710ff2cb45c82d13a8a1", "score": "0.54115105", "text": "public function addButton()\n {\n add_submenu_page(\n 'wpcf7',\n 'Images Optimize & Upload - Settings',\n 'Optimize & Upload',\n 'manage_options',\n 'optimizer-3000',\n [$this, 'template']\n );\n }", "title": "" }, { "docid": "58c248931138ac7064e97e98dbf3bfb6", "score": "0.5410062", "text": "public function add_editor_button() {\n\t\tglobal $pagenow;\n\n\t\tif ( get_user_option( 'rich_editing' )\n\t\t && ( 'post.php' == $pagenow || 'post-new.php' == $pagenow ) ) :\n\t\t\tadd_filter( 'mce_buttons', array( $this, 'register_button' ) );\n\t\t\tadd_filter( 'mce_external_plugins', array( $this, 'add_button' ) );\n\t\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'load_css' ) );\n\t\t\tadd_action( 'admin_footer', array( $this, 'popup_content' ) );\n\t\t\tadd_filter( 'mce_external_languages', array( $this, 'localization' ) );\n\t\tendif;\n\t}", "title": "" }, { "docid": "8a227a07b3724be9d6563a01f2503ebb", "score": "0.5404498", "text": "function revcon_change_post_label() {\n global $menu;\n global $submenu;\n $menu[5][0] = __( 'News', 'toro_developer' );\n $submenu['edit.php'][5][0] = __( 'News', 'toro_developer' );\n $submenu['edit.php'][10][0] = __( 'Add News', 'toro_developer' );\n $submenu['edit.php'][16][0] = __( 'News Tags', 'toro_developer' );\n echo '';\n }", "title": "" }, { "docid": "85cf4d9d44333af25ef8da76a4ac68cf", "score": "0.5397462", "text": "public function LinkToAddItem() {\r\n\t\tif ($this->AdminAllowToAddItem()) {\r\n\t\t\t$redirect = (!empty($this->url_referer) ? $this->url_referer : $this->LinkToList($this->archtype));\r\n\t\t\treturn __ADMINURL__.\"?pn=3&archtype=\".$this->archtype.\"&id=\".el_encript_info('0').\"&redirect=\".urlencode( el_remove_url_param($redirect,'redirect') );\r\n\t\t} else {\r\n\t\t\treturn 'javascript:cst_notify(\\'Nu ai drepturi pentru aceasta operatiune !\\',\\'Atentie\\',2);';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "21343b9e982d6429c045b3eb1be7174c", "score": "0.53961104", "text": "function wl_links_internos () {\n\techo $this->valores['links'];\n}", "title": "" }, { "docid": "0bf2856d6edc852892389b27ba5f507f", "score": "0.53858936", "text": "function jflex_menu_link($vars) {\n $element = $vars['element'];\n $sub_menu = '';\n if ($element['#below']) {\n $sub_menu = drupal_render($element['#below']);\n }\n if (isset($element['#localized_options']['attributes']['name'])) {\n $sub_menu .= ' <small>' . $element['#localized_options']['attributes']['name'] . '</small>';\n }\n $text = '<span>' . $element['#title'] . '</span>';\n $element['#localized_options']['html'] = TRUE;\n $output = l($text, $element['#href'], $element['#localized_options']);\n\n return '<li' . drupal_attributes($element['#attributes']) . '>' . $output . $sub_menu . \"</li>\\n\";\n}", "title": "" }, { "docid": "767f8210f58c572d3cb35c79a4ca8580", "score": "0.53794324", "text": "function ozakx_link_editor($text) {\r\r\n/* \r\r\nTo add link use the following syntex\r\r\n $text = preg_replace('\"Word/Phrase\"','<b><a title=\"Title Comes Here\" target=\"_blank\" href=\"http://www.yourdomain.com/link,html\">Word/Phrase Again</a></b>',$text);\r\r\n\r\r\nTo add Bold with tooltip use the following syntex\r\r\n $text = preg_replace('\"Word/Phrase\"','<b title=\"Tootip title\">Word/Phrase Again</b>',$text);\r\r\n\r\r\nTo add Italic with tooltip use the following syntex\r\r\n $text = preg_replace('\"Word/Phrase\"','<i title=\"Tootip title\">Word/Phrase Again</i>',$text);\r\r\n\r\r\nTo add Underline with tooltip use the following syntex\r\r\n $text = preg_replace('\"Word/Phrase\"','<u title=\"Tootip title\">Word/Phrase Again</u>',$text);\r\r\n\r\r\nYou can also use combinations like of bold with italic and underline. A little HTML knowledge can make you control better.\r\r\n*/\r\r\n\r\r\n\r\r\n $text = preg_replace('\"Ozakx Text Editor\"','<u title=\"Wordpress Plugin Provided By Ozakx Technologies - Developed By Anurag Bhateja\">Ozakx Text Editor</u>',$text);\r\r\n\r\r\n return $text;\r\r\n\r\r\n}", "title": "" }, { "docid": "225317bc860e3df703a37b54c5931164", "score": "0.5374024", "text": "public function getLabel() {\n $hlp = plugin_load('action', 'file2dw');\n return $hlp->getLang('import_button');\n }", "title": "" }, { "docid": "65c79f65ab8566c42e6b30b665d5d2e0", "score": "0.53739387", "text": "function upd_addMenuEntry() {\n global $sn, $plugin_tx, $pth;\n\n $imgtag = tag('img src=\\\"' . $pth['folder']['plugins']\n . 'hi_updatecheck/images/update-available-24.png\\\" '\n . 'title=\\\"' . $plugin_tx['hi_updatecheck']['message_qc-update-found'] . '\\\" '\n . 'alt=\\\"' . $plugin_tx['hi_updatecheck']['message_qc-update-found'] . '\\\"'\n );\n $href = $sn . '?&amp;hi_updatecheck&amp;admin=plugin_main&amp;normal';\n $t = \"\\n\";\n $t .= '<script type=\"text/javascript\">\n jQuery(document).ready(function($){\n $(\"#edit_menu\").append(\"<li id=\\\"editmenu_update\\\"><a href=\\\"' . $href . '\\\">' . $imgtag . '<\\/a></li>\"); //before xh1.6\n $(\"#xh_adminmenu > ul\").append(\"<li id=\\\"xh_adminmenu_update\\\"><a href=\\\"' . $href . '\\\">' . $imgtag . '<\\/a></li>\"); //since xh1.6RC\n });\n </script>' . \"\\n\";\n return $t;\n}", "title": "" }, { "docid": "674ef13dd7a533c9310d09d414c38985", "score": "0.5373098", "text": "private function getLangLinksSimpleList()\n {\n $this->result = '<li>';\n $this->result .= HdbkLanguage::getLanguageByCode(Yii::$app->language)->code;\n $this->getInacLanguagesTrait();\n }", "title": "" }, { "docid": "6fd0d95de73c3b5b405abba5591be0af", "score": "0.5370229", "text": "public function link_button( $text, $url, $out = false ) {\n\t\t?>\n\t\t<a href=\"<?php echo esc_url( $url ); ?>\" target=\"<?php echo esc_attr( $out ? '_blank' : '_self' ); ?>\" class=\"button\"><?php echo esc_html( $text ); ?></a>\n\t\t<?php\n\t}", "title": "" }, { "docid": "c4486f45c700014f089d474a5fb32206", "score": "0.53701013", "text": "public static function addButtons(): void\n {\n add_filter('mce_buttons', [__CLASS__, 'registerButtons'], 999, 2);\n add_filter('mce_external_plugins', [__CLASS__, 'addScripts'], 999);\n add_thickbox();\n }", "title": "" }, { "docid": "c0d8c827b3d203bba51c0f89fef4d537", "score": "0.5368365", "text": "function display_edit_field() {\n data_field_admin::check_lang_strings($this);\n parent::display_edit_field();\n }", "title": "" }, { "docid": "9f9be5a4ecabc955e310b0d6421c1bc4", "score": "0.5359622", "text": "public function add_link_plugin(){\r\n\t\tadd_action( 'plugin_action_links_' . plugin_basename( __FILE__ ), function( $links ){\r\n\t\t\treturn array_merge( array(\r\n\t\t\t\t'<a href=\"' . esc_url( admin_url( DCMS_MINAMOUNT_SUBMENU . '?page=dcms-minamount' ) ) . '\">' . __( 'Settings', 'dcms-min-amount-per-rol' ) . '</a>'\r\n\t\t\t), $links );\r\n\t\t} );\r\n\t}", "title": "" }, { "docid": "31d4bda727cbeee7bb7bb30956120e40", "score": "0.5354297", "text": "public function changeLanguageAction()\n {\n\n }", "title": "" }, { "docid": "269668bd49d75c9abfdd930b692a9094", "score": "0.53509605", "text": "function aisis_media_buttons_link(){\n\tglobal $post_ID, $temp_ID, $iframe_post_id;\n\t\n\tif ('post' == get_post_type( $post_ID )){\n\t\t$iframe_post_id = (int) (0 == $post_ID ? $temp_ID : $post_ID);\n\t\t$url = admin_url(\"/admin-ajax.php?post_id=$iframe_post_id&codes=aisis-codes&action=aisis_codes&TB_iframe=true\");\n\t\techo \"<a href='\".$url.\"' class='move thickbox' title='Add Aisis Short Codes to Your Post!'>\n\t\t\t<img src='\".get_template_directory_uri() . \"/assets/images/addition.png\" . \"' width='16' height='16'></a>\";\n\t}\n}", "title": "" }, { "docid": "e72d57a8012558ba95118036121a40e7", "score": "0.53488123", "text": "function _createButtonLink() {\n\n $createResourceSetting = $this->modx->getObject('modSystemSetting',\n array('key' => 'create_resource',\n 'namespace' => 'frontpage'));\n\n $createId = $createResourceSetting->get('value');\n $url = $this->modx->makeURL($createId);\n return $url;\n\n }", "title": "" }, { "docid": "b60bc6b7bd3af288e37667b20da11cac", "score": "0.53480697", "text": "function aisis_page_button_link(){\n\tglobal $post_ID, $temp_ID, $iframe_post_id;\n\t\n\tif ('page' == get_post_type( $post_ID )){\n\t\t$iframe_post_id = (int) (0 == $post_ID ? $temp_ID : $post_ID);\n\t\t$url = admin_url(\"/admin-ajax.php?post_id=$iframe_post_id&codes=aisis-page-codes&action=aisis_page_codes&TB_iframe=true\");\n\t\t$url_codes = admin_url(\"/admin-ajax.php?post_id=$iframe_post_id&codes=aisis-codes&action=aisis_codes&TB_iframe=true\");\n\t\techo \"<a href='\".$url.\"' class='move thickbox' title='Create amazing pages with these codes!'>\n\t\t\t<img src='\".get_template_directory_uri() . \"/assets/images/pages.png\" . \"' width='16' height='16'></a>\";\n\t\techo \"<a href='\".$url_codes.\"' class='move thickbox' title='Add Aisis Short Codes to Your Post!'>\n\t\t\t<img src='\".get_template_directory_uri() . \"/assets/images/addition.png\" . \"' width='16' height='16'></a>\";\n\t}\n\t\n}", "title": "" }, { "docid": "262b29bad5296973eb5263b9ca7e8cd3", "score": "0.5343237", "text": "public function add_lang_indicator( $post ) {\n\n\t\twp_enqueue_style( 'alwprt_translate_menu_style', ALWPR_TRANSLATE_URL . '/assets/css/style.css');\n\n\t\t$available_lang = get_option ( 'alwpr_langs', array() );\n\n\t\t\t?>\n\n\n<ul class=\"wpr-lang-list wpr-lang-list-flags\">\n<?php \nforeach ( $available_lang as $key=>$value ) {\n\n ?>\n<li class=\"wpr-lang-list-element wpr-lang-flag-element\">\n <a href=\"?wpr-lang=<?php echo $key; ?>\"\n \n <?php \n \n if ( $current_lang == $key ) {\n\n echo 'class=\"selected\"';\n\n } \n\n ?>\n\n >\n <img src=\"<?php echo ALWPR_TRANSLATE_URL . '/flags/' . $value['flag'] ; ?>\" alt=\"<?php echo $key; ?>\">\n </a>\n</li>\n\n<?php\n}\n\n?>\n\n</ul>\n\n\t\t\t<?php\n\t}", "title": "" }, { "docid": "9224b0b39021ac1b11d31c25259911bc", "score": "0.5336556", "text": "function addbuttons() {\n if ( !current_user_can('edit_posts') && !current_user_can('edit_pages') ) return;\n\n // Add only in Rich Editor mode\n if ( get_user_option('rich_editing') == 'true') {\n\n // add the button for wp2.5 in a new way\n add_filter(\"mce_external_plugins\", array (&$this, \"add_tinymce_plugin\" ), 5);\n add_filter('mce_buttons', array (&$this, 'register_button' ), 5);\n }\n }", "title": "" }, { "docid": "822d18d2811437792f05abb0b7e45e11", "score": "0.53356886", "text": "public function n_link()\n {\n $data['seo']['title']='Thông báo - Quang Na - Phần mềm quany lý';\n\n $data[ 'template' ] = 'backend/auth/n_link';\n $this->load->view( 'backend/layout/auth', isset( $data ) ? $data : null );\n }", "title": "" }, { "docid": "3b99c551385bdc92a1955b56295b7b32", "score": "0.53352344", "text": "function language_toggle() {\n $items = '';\n\n if (function_exists('icl_get_languages')) {\n $languages = icl_get_languages('skip_missing=0');\n if(1 < count($languages)){\n foreach($languages as $l){\n if(!$l['active']){\n if (!isset($l['missing']) || !$l['missing']) {\n $items = $items.'<li class=\"menu-item\"><a class=\"btn btn-primary\" href=\"'.$l['url'].'\">'.strtoupper($l['language_code']).'</a></li>';\n } else {\n $items = $items.'<li class=\"menu-item\"><button class=\"btn btn-gray btn-lg\" disabled=\"disabled\">'.strtoupper($l['language_code']).'</button></li>';\n }\n }\n }\n }\n }\n \n return $items;\n}", "title": "" }, { "docid": "243df3ec8b63f427bfdc2e7cea603c0f", "score": "0.5331031", "text": "function pepe_lite_link_to_menu_editor( $args )\n{\n if ( ! current_user_can( 'manage_options' ) )\n {\n return;\n }\n\n // see wp-includes/nav-menu-template.php for available arguments\n extract( $args );\n\n $link = $link_before\n . '<a href=\"' .esc_url(admin_url( 'nav-menus.php' )) . '\">' . $before .__('Add a menu','pepe-lite') . $after . '</a>'\n . $link_after;\n\n // We have a list\n if ( FALSE !== stripos( $items_wrap, '<ul' )\n or FALSE !== stripos( $items_wrap, '<ol' )\n )\n {\n $link = \"<li>$link</li>\";\n }\n\n $output = sprintf( $items_wrap, $menu_id, $menu_class, $link );\n if ( ! empty ( $container ) )\n {\n $output = \"<$container class='$container_class' id='$container_id'>$output</$container>\";\n }\n\n if ( $echo )\n {\n echo $output;\n }\n\n return $output;\n}", "title": "" }, { "docid": "3daaee72b7ea27175fbc2084cec11a88", "score": "0.5328091", "text": "function hook_language_switch_links_alter(array &$links, $type, $path) {\n global $language;\n\n if ($type == LANGUAGE_TYPE_CONTENT && isset($links[$language->language])) {\n foreach ($links[$language->language] as $link) {\n $link['attributes']['class'][] = 'active-language';\n }\n }\n}", "title": "" }, { "docid": "45aa9d7a1126d6fff989f53e52fc8531", "score": "0.5326214", "text": "function kiso_preprocess_links__language_block(&$variables) {\n // Use language code instead of full name for language switcher block.\n //\n // Related WCAG resources:\n // - SC 3.1.2 Language of Parts (Level AA):\n // - H58: Using language attributes to identify changes in the human language.\n // - SC 3.1.4 Abbreviations (Level AAA):\n // - H28: Providing definitions for abbreviations by using the abbr element.\n // - SC 4.1.2 Name, Role, Value (Level A):\n // - ARIA14: Using aria-label to provide an invisible label where a visible\n // label cannot be used \n // \n foreach ($variables['links'] as $langcode => &$link) {\n if (isset($link['link'])) {\n $language_name = t('@language', ['@language' => $link['text']], ['langcode' => $langcode]);\n $link['link']['#options']['attributes']['lang'] = $langcode;\n $link['link']['#options']['attributes']['aria-label'] = $language_name;\n $link['link']['#title'] = Markup::create('<abbr title=\"' . $language_name . '\">' . strtoupper($langcode) . '</abbr>');\n }\n else {\n $link['title'] = t('@language (unavailable)', ['@language' => $link['text']], ['langcode' => $langcode]);\n $link['text_attributes']['lang'] = $langcode;\n $link['text_attributes']['aria-label'] = $link['title'];\n $link['text'] = strtoupper($langcode);\n }\n }\n}", "title": "" }, { "docid": "fdb6e8c661a8506ec2945f8c390ac27d", "score": "0.5324772", "text": "public function add_lang_page()\n\t{\n\t\tif ($this->checkLogin('A') == '')\n\t\t{\n\t\t\tredirect('admin');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->data['heading'] = 'Add New Language Page';\n\t\t\t$this->data['cms_details'] = $this->cms_model->get_all_details(CMS,array('lang_code'=>'en'));\n\t\t\t$this->data['lang_details'] = $this->cms_model->get_all_details(LANGUAGES,array('status'=>'Active'));\n $this->data['top_menu_details'] = $this->cms_model->get_all_details(CMS_TOP_MENU,array());\n\t\t\t$this->load->view('admin/cms/add_lang_page',$this->data);\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "40fe4ab9e7995a1faf9a09e919adae11", "score": "0.5324633", "text": "public function customize_controls_l10n()\n {\n\n // Register the l10n script.\n wp_register_script('kirki-l10n', trailingslashit(Kirki::$url) . 'assets/js/l10n.js');\n\n // Add localization strings.\n // We'll do this on a per-config basis so that the filters are properly applied.\n $configs = Kirki::$config;\n $l10n = array();\n foreach ($configs as $id => $args) {\n $l10n[$id] = Kirki_l10n::get_strings($id);\n }\n\n wp_localize_script('kirki-l10n', 'kirkiL10n', $l10n);\n wp_enqueue_script('kirki-l10n');\n\n }", "title": "" }, { "docid": "eadb6d4513e12209cd7c7589ce5cdf88", "score": "0.53220534", "text": "function add_admin_link($array)\n {\n $area = $array['area'];\n $title = $array['title'];\n $link = $array['link'];\n }", "title": "" }, { "docid": "6517e9272da08b1d1f09885d5e783e93", "score": "0.53173584", "text": "function revcon_change_post_label() {\n global $menu;\n global $submenu;\n $menu[5][0] = 'News';\n $submenu['edit.php'][5][0] = 'News';\n $submenu['edit.php'][10][0] = 'Add Post';\n $submenu['edit.php'][16][0] = 'News Tags';\n}", "title": "" }, { "docid": "924a7f64b0639c3258b8e7b989fc0c58", "score": "0.5317055", "text": "function mention_mycode_add_codebuttons($edit_lang)\n{\n\tglobal $lang, $mybb;\n\n\tif($mybb->settings['mention_minify_js'])\n\t{\n\t\t$min = '.min';\n\t}\n\t$lang->mentionme_codebutton = <<<EOF\n<script type=\"text/javascript\" src=\"jscripts/MentionMe/mention_codebutton{$min}.js\"></script>\n\nEOF;\n\n\t$edit_lang[] = 'editor_mention';\n\treturn $edit_lang;\n}", "title": "" }, { "docid": "0a97efce1549a70c03584d8b1e95573f", "score": "0.5316362", "text": "function air_facetapi_link_active($variables) {\n if (isset($variables['text'])) {\n // Set custom titles for specific content types names.\n $bundle = $_GET['f'][0];\n if (preg_match('/product/', $bundle)) {\n $variables['text'] = t('Produkt');\n }\n if (preg_match('/case/', $bundle)) {\n $variables['text'] = t('Cases');\n }\n if (preg_match('/page/', $bundle)) {\n $variables['text'] = t('Andet');\n }\n if (preg_match('/user/', $bundle)) {\n $variables['text'] = t('Employees');\n }\n\n if (empty($variables['options']['html'])) {\n $prefix = ' ' . check_plain(t($variables['text']));\n }\n else {\n $prefix = ' ' . t($variables['text']);\n }\n }\n $variables['options']['html'] = TRUE;\n $variables['text'] = ' <span>(x)</span>';\n\n return '<em>' . $prefix . '</em>' . theme_link($variables);\n}", "title": "" }, { "docid": "98c2ac3a15aad8a4c051e8651f8226cb", "score": "0.5312933", "text": "function addControlButtons($current_link_code) {\n $prefix = home_url('?' . PKG_AUTOLOGIN_VALUE_NAME . '=');\n ?>\n <input type=\"hidden\" autocomplete=\"off\" id=\"pkg_autologin_code\" name=\"pkg_autologin_code\" value=\"<?php echo $current_link_code; ?>\" />\n <input type=\"button\" value=\"<?php _e(\"New\", PKG_AUTOLOGIN_LANGUAGE_DOMAIN); ?>\" id=\"pkg_autologin_new_link_button\" onclick=\"pkg_autologin_new_link_click(this, <?php echo \"'$prefix'\"; ?>)\" />\n <input type=\"button\" value=\"<?php _e(\"Delete\", PKG_AUTOLOGIN_LANGUAGE_DOMAIN); ?>\" id=\"pkg_autologin_delete_link_button\" onclick=\"pkg_autologin_delete_link_click(this)\" />\n <?php\n }", "title": "" }, { "docid": "f59a4be886224a61a5190686bd810217", "score": "0.5308013", "text": "function _build_modify_button($caption=RAPYD_BUTTON_MODIFY) {\n\t\tif ($this->_status == 'show' && $this->rapyd->uri->is_set('show')) {\n\t\t\t$modify_uri = $this->rapyd->uri->change_clause($this->rapyd->uri->uri_array, 'show', 'modify');\n\t\t\t$action = 'javascript:window.location=\\''.site_url($modify_uri).'\\'';\n\t\t\t$this->button('btn_modify', $caption, $action, 'TR');\n\t\t}\n\t}", "title": "" }, { "docid": "2a802a71f3eff11632655e1ddcc19c66", "score": "0.53071684", "text": "function event_booking_options_buttons(){\n\t\tglobal $EM_Event;\n $header_button_classes = is_admin() ? 'page-title-action':'button add-new-h2';\n\t\t?><a href=\"<?php echo em_add_get_params($EM_Event->get_bookings_url(), array('action'=>'manual_booking','event_id'=>$EM_Event->event_id)); ?>\" class=\"<?php echo $header_button_classes; ?>\"><?php _e('Add Booking','em-pro') ?></a><?php\t\n\t}", "title": "" }, { "docid": "8b05dd0e2aa90f8c6902a78a2119129e", "score": "0.5301988", "text": "public function addLink(AdminLink $link): CrumbtrailWidget;", "title": "" }, { "docid": "d1d259784ed7cc737426281a9d7f0968", "score": "0.529305", "text": "function kmw_get_button($atts, $content = null) {\n\t\textract( shortcode_atts( array(\n\t\t\t'link' => '#',\n\t\t\t'target' => '_self',\n\t\t\t'subtitle' => '',\n\t\t), $atts ) );\n\t\treturn '<a href=\"'.$link.'\" target=\"'.$target.'\" class=\"button\">' . do_shortcode($content) . '<span>'.$subtitle.'</span></a>';\n\t}", "title": "" }, { "docid": "9d6544901cc5d45144912e6c3f45b4d0", "score": "0.529293", "text": "public function pu_shortcode_button()\n {\n if( current_user_can('edit_posts') && current_user_can('edit_pages') )\n {\n add_filter( 'mce_external_plugins', array($this, 'pu_add_buttons' ));\n add_filter( 'mce_buttons', array($this, 'pu_register_buttons' ));\n }\n }", "title": "" }, { "docid": "bc3bf2c567b46149233e06f08bb096bc", "score": "0.5287335", "text": "function BS_Add_My_Admin_Link()\n{\n add_menu_page(\n 'My Admin Page', // Title of the page\n 'Menu ajouté', // Text to show on the menu link\n 'manage_options', // Capability requirement to see the link\n 'ajout-menu-admin/includes/BS-first-acp-page.php' // The 'slug' - file to display when clicking the link\n );\n}", "title": "" }, { "docid": "ad6a5ca62e2575056f1fb201c49c98d3", "score": "0.52835745", "text": "function actionEdit() {\n\t\t$primarykey = $this->getActionFromRequest(false,1);\n\n\t\t$this->getMenuItems()->getItem(self::ACTION_EDIT)->addItem(\n\t\t\tnew mvcControllerMenuItem(\n\t\t\t\t$this->buildUriPath(\n\t\t\t\t\tself::ACTION_TRANSLATE, $primarykey\n\t\t\t\t), 'Translate', self::ACTION_TRANSLATE, 'Translate', false, mvcControllerMenuItem::PATH_TYPE_URI\n\t\t\t)\n\t\t);\n\n\t\tparent::actionEdit();\n\t}", "title": "" }, { "docid": "747a7410ff98799f15f48ff305385eb1", "score": "0.5278835", "text": "public function render_content() {\n ?>\n <button class=\"button button-primary\" id=\"create-new-menu-submit\" tabindex=\"0\"><?php _e( 'Create Menu' ); ?></button>\n <?php\n }", "title": "" }, { "docid": "db8d649af51c9dc78932435ae50a5585", "score": "0.5278448", "text": "function fn_add_breadcrumb($lang_value, $link = '', $nofollow = false)\n{\n //check permissions in the backend\n if (AREA == 'A' && !fn_check_view_permissions($link, 'GET')) {\n return false;\n }\n\n $bc = Tygh::$app['view']->getTemplateVars('breadcrumbs');\n\n if (!empty($link)) {\n fn_set_hook('add_breadcrumb', $lang_value, $link);\n }\n\n // Add home link\n if (AREA == 'C' && empty($bc)) {\n $bc[] = array(\n 'title' => __('home'),\n 'link' => fn_url(''),\n );\n }\n\n $bc[] = array(\n 'title' => $lang_value,\n 'link' => $link,\n 'nofollow' => $nofollow,\n );\n\n Tygh::$app['view']->assign('breadcrumbs', $bc);\n\n return true;\n}", "title": "" }, { "docid": "48436de658bbff474ad3590b1857a6bc", "score": "0.52713", "text": "public function lang_menu() {\n return '';\n }", "title": "" }, { "docid": "b63fbc138a8ce8d5856a5cf4d33145b3", "score": "0.5268366", "text": "function cwEditSectionLink($skin, $title, $sectionNum, $tooltip, $result) {\n\t// get rid of the brackets & make it look like an edit button.\n\t$result = str_replace('class=\"editsection\">[<a ', 'style=display:block;float:right><a class=\"editBut\" ', str_replace('>]<', '><', $result));\n\treturn true;\n}", "title": "" }, { "docid": "c3a732686ae48168ab228397097cd024", "score": "0.52669513", "text": "public function edit_link($hook) {\n $edit_link = \"<a href='index.php?section=admin&page=mods&act=edit&id=\".$hook.\"' class='mod-action' style='margin-top:4px;'>\".$this->lang->mod_edit.\"</a>\";\n return $edit_link;\n }", "title": "" }, { "docid": "fe9f65c66f050bf9dc28ddf1d238d1e1", "score": "0.52664", "text": "function pt_shortcode_buttons() {\n\t\t// Don't bother doing this stuff if the current user lacks permissions\n\t\tif ( ! current_user_can ( 'edit_posts' ) && ! current_user_can ( 'edit_pages' ) )\n\t\t\treturn;\n\n\t\t// Add only in Rich Editor mode\n\t\tif ( get_user_option ( 'rich_editing' ) == 'true' ) {\n\t\t\t// filter the tinyMCE buttons and add our own\n\t\t\tadd_filter ( \"mce_external_plugins\", array ( 'PublishThis_Shortcodes', \"add_pt_tinymce_plugin\" ) );\n\t\t\tadd_filter ( 'mce_buttons', array ( 'PublishThis_Shortcodes', 'register_shortcode_buttons' ) );\n\t\t\tadd_filter ( 'mce_before_init', array ( 'PublishThis_Shortcodes', 'add_pt_settings' ) );\n\t\t}\n\t}", "title": "" }, { "docid": "b70ec5f4e68fd8f09e0c4359db8e05a6", "score": "0.5265751", "text": "public function get_type_edit_link();", "title": "" }, { "docid": "bf3a389e3becd781aae194539bd81364", "score": "0.5262502", "text": "function editorshortcutshelpbutton() {\n\n global $CFG;\n return \"\";\n $imagetext = '<img src=\"' . $CFG->wwwroot . '/commun/editeurs/htmlarea/images/kbhelp.gif\" alt=\"'.\n get_string('editorshortcutkeys').'\" class=\"iconkbhelp\" />';\n\n return helpbutton('editorshortcuts', get_string('editorshortcutkeys'), 'moodle', true, false, '', true, $imagetext);\n}", "title": "" }, { "docid": "74c2f99d1564622c5a5736640aa63628", "score": "0.5261386", "text": "function getHeaderButtons()\t{\n\t\tglobal $LANG;\n\n\t\t$buttons = array(\n\t\t\t'csh' => '',\n\t\t\t'view' => '',\n\t\t\t'edit' => '',\n\t\t\t'record_list' => '',\n//\t\t\t'new_record' => '',\n//\t\t\t'paste' => '',\n\t\t\t'level_up' => '',\n\t\t\t'reload' => '',\n\t\t\t'shortcut' => '',\n\t\t\t'back' => '',\n\t\t\t'csv' => '',\n\t\t\t'export' => ''\n\t\t);\n\n\n\t\t$backPath = $GLOBALS['BACK_PATH'];\n\n\t\t\t// CSH\n\t\tif (!strlen($this->id))\t{\n\t\t\t$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txttnewsM1', 'list_module_noId', $backPath);\n\t\t} elseif(!$this->id) {\n\t\t\t$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txttnewsM1', 'list_module_root', $backPath);\n\t\t} else {\n\t\t\t$buttons['csh'] = t3lib_BEfunc::cshItem('_MOD_web_txttnewsM1', 'list_module', $backPath);\n\t\t}\n\n\t\tif (isset($this->id)) {\n\t\t\tif ($GLOBALS['BE_USER']->check('modules','web_list'))\t{\n\t\t\t\t$href = $backPath . 'db_list.php?id=' . $this->pageinfo['uid'] . '&returnUrl=' . rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'));\n\t\t\t\t$buttons['record_list'] = '<a href=\"' . htmlspecialchars($href) . '\">' .\n\t\t\t\t\t\t'<img' . t3lib_iconWorks::skinImg($backPath, 'gfx/list.gif', 'width=\"11\" height=\"11\"') . ' title=\"' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showList', 1) . '\" alt=\"\" />' .\n\t\t\t\t\t\t'</a>';\n\t\t\t}\n\n\t\t\t\t// View\n\t\t\t$buttons['view'] = '<a href=\"#\" onclick=\"' . htmlspecialchars(t3lib_BEfunc::viewOnClick($this->id, $backPath, t3lib_BEfunc::BEgetRootLine($this->id))) . '\">' .\n\t\t\t\t\t\t\t'<img' . t3lib_iconWorks::skinImg($backPath, 'gfx/zoom.gif') . ' title=\"' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.showPage', 1) . '\" alt=\"\" />' .\n\t\t\t\t\t\t\t'</a>';\n\n\t\t\t\t// If edit permissions are set (see class.t3lib_userauthgroup.php)\n\t\t\tif ($this->localCalcPerms&2 && !empty($this->id))\t{\n\t\t\t\t\t// Edit\n\t\t\t\t$params = '&edit[pages][' . $this->pageinfo['uid'] . ']=edit';\n\t\t\t\t$buttons['edit'] = '<a href=\"#\" onclick=\"' . htmlspecialchars(t3lib_BEfunc::editOnClick($params, $backPath, -1)) . '\">' .\n\t\t\t\t\t\t\t\t'<img' . t3lib_iconWorks::skinImg($backPath, 'gfx/edit2.gif') . ' title=\"' . $LANG->getLL('editPage', 1) . '\" alt=\"\" />' .\n\t\t\t\t\t\t\t\t'</a>';\n\t\t\t}\n\n//\t\t\tif ($this->table) {\n\t\t\t\t\t// Export\n\t\t\t\tif (t3lib_extMgm::isLoaded('impexp')) {\n\t\t\t\t\t$modUrl = t3lib_extMgm::extRelPath('impexp') . 'app/index.php';\n\t\t\t\t\t$params = $modUrl . '?tx_impexp[action]=export&tx_impexp[list][]=';\n\t\t\t\t\t$params .= rawurlencode('tt_news:' . $this->id).'&tx_impexp[list][]=';\n\t\t\t\t\t$params .= rawurlencode('tt_news_cat:' . $this->id);\n\t\t\t\t\t$buttons['export'] = '<a href=\"' . htmlspecialchars($backPath.$params).'\">' .\n\t\t\t\t\t\t\t\t\t'<img' . t3lib_iconWorks::skinImg($backPath, t3lib_extMgm::extRelPath('impexp') . 'export.gif') . ' title=\"' . $LANG->sL('LLL:EXT:lang/locallang_core.php:rm.export', 1) . '\" alt=\"\" />' .\n\t\t\t\t\t\t\t\t\t'</a>';\n\t\t\t\t}\n//\t\t\t}\n\n\t\t\t\t// Reload\n\t\t\t$buttons['reload'] = '<a href=\"' . htmlspecialchars(t3lib_div::linkThisScript()) . '\">' .\n\t\t\t\t\t\t\t'<img' . t3lib_iconWorks::skinImg($backPath, 'gfx/refresh_n.gif') . ' title=\"' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.reload', 1) . '\" alt=\"\" />' .\n\t\t\t\t\t\t\t'</a>';\n\n\t\t\t\t// Shortcut\n\t\t\tif ($GLOBALS['BE_USER']->mayMakeShortcut()) {\n\t\t\t\t$buttons['shortcut'] = $this->doc->makeShortcutIcon('id, showThumbs, pointer, table, search_field, searchLevels, showLimit, sortField, sortRev', implode(',', array_keys($this->MOD_MENU)), 'web_txttnewsM1');\n\t\t\t}\n\n\t\t\t\t// Back\n\t\t\tif ($this->returnUrl) {\n\t\t\t\t$buttons['back'] = '<a href=\"' . htmlspecialchars(t3lib_div::linkThisUrl($this->returnUrl, array('id' => $this->id))) . '\" class=\"typo3-goBack\">' .\n\t\t\t\t\t\t\t\t'<img' . t3lib_iconWorks::skinImg($backPath, 'gfx/goback.gif') . ' title=\"' . $LANG->sL('LLL:EXT:lang/locallang_core.php:labels.goBack', 1) . '\" alt=\"\" />' .\n\t\t\t\t\t\t\t\t'</a>';\n\t\t\t}\n\t\t}\n\n\t\treturn $buttons;\n\t}", "title": "" }, { "docid": "dfd2f4a1cb4479cc535eb4bdcec18b67", "score": "0.5259336", "text": "function newd_lnw_control () {\r\n\t\t$options = newd_lnw_get_options();\r\n \r\n\t\tif ($_POST['newd_lnw_submit']) {\r\n\t\t\t$options['displayTitle'] = $_POST['newd_lnw_display_title'];\r\n\t\t\t$options['linkTitle'] = $_POST['newd_lnw_link_title'];\r\n\t\t\tupdate_option(\"newd_lnw_options\", $options);\r\n\t\t}\r\n \r\n\t\t?>\r\n\t\t<p>\r\n\t\t\tUse the options below to configure how the menu will display.\r\n\t\t<p>\r\n\t\t<h4>\r\n\t\t\tParent Menu options\r\n\t\t</h4>\r\n\t\t<p>\r\n\t\t\t<input type=\"checkbox\" <?php if ($options['displayTitle']) echo ' checked=\"checked\" '; ?> id=\"newd_lnw_display_title\" name=\"newd_lnw_display_title\" value=\"1\" />\r\n\t\t\t<label for=\"newd_lnw_display_title\">Display parent menu title</label><br />\r\n\t\t\t\r\n\t\t\t<input type=\"checkbox\" <?php if ($options['linkTitle']) echo ' checked=\"checked\" '; ?> id=\"newd_lnw_link_title\" name=\"newd_lnw_link_title\" value=\"1\" />\r\n\t\t\t<label for=\"newd_lnw_link_title\">Link parent menu title</label>\r\n\t\t\t\r\n\t\t\t<input type=\"hidden\" id=\"newd_lnw_submit\" name=\"newd_lnw_submit\" value=\"1\" />\r\n\t\t</p>\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "d26681dc1eaa0677ddade4d070b7b4b7", "score": "0.52591544", "text": "function ztjalali_add_settings_link( $links ) {\n $settings_link = '<a href=\"'.menu_page_url('ztjalali_admin_page',FALSE).'\">'.__('setting','ztjalali').'</a>';\n Array_unshift( $links, $settings_link );\n return $links;\n}", "title": "" }, { "docid": "6893d36d8d45bb182483be6411657086", "score": "0.5257991", "text": "public function actionSiteLanguage() {\r\n\t\t$this->render('sitelanguage');\r\n\t}", "title": "" } ]
91dcccb2d1995e752bdc612608bf2240
end function moveDatabaseFiles Lists recent orders
[ { "docid": "1c5d8bb31f60b8e32f7be2239eacd054", "score": "0.0", "text": "public function listLastOrders( ){\n if( !isset( $this->aOrders ) )\n $this->generateCache( );\n $content= null;\n\n if( isset( $this->aOrders ) ){\n foreach( $this->aOrders as $iOrder => $aData ){\n $aOrders[] = $iOrder;\n } // end foreach\n }\n\n if( isset( $aOrders ) ){\n rsort( $aOrders );\n $iMax = 5;\n $iCount = count( $aOrders );\n if( $iCount > $iMax )\n $iCount = $iMax;\n \n $content = null;\n\n for( $i = 0; $i < $iCount; $i++ ){\n $aData = $this->aOrders[$aOrders[$i]];\n $content .= '<tr><td class=\"id\">'.$aData['iOrder'].'</td><td class=\"name\"><a href=\"?p=orders-form&amp;iOrder='.$aData['iOrder'].'\">'.$aData['sFirstName'].' '.$aData['sLastName'].'</a></td><td class=\"data\">'.$aData['sDate'].'</td></tr>';\n } // end for\n \n unset( $this->aOrders );\n return '<table><thead><tr><td>'.$GLOBALS['lang']['Id'].'</td><td>'.$GLOBALS['lang']['Name'].'</td><td>'.$GLOBALS['lang']['Date'].'</td></tr></thead>'.$content.'</tbody></table>';\n }\n }", "title": "" } ]
[ { "docid": "67f6be72b11f2a3a31a8b17280f82a70", "score": "0.7517316", "text": "private function moveDatabaseFiles( ){\n\n if( is_file( DB_ORDERS_PRODUCTS.'-backup' ) ){\n unlink( DB_ORDERS_PRODUCTS );\n rename( DB_ORDERS_PRODUCTS.'-backup', DB_ORDERS_PRODUCTS );\n chmod( DB_ORDERS_PRODUCTS, FILES_CHMOD );\n }\n\n if( is_file( DB_ORDERS_EXT.'-backup' ) ){\n unlink( DB_ORDERS_EXT );\n rename( DB_ORDERS_EXT.'-backup', DB_ORDERS_EXT );\n chmod( DB_ORDERS_EXT, FILES_CHMOD );\n }\n\n if( is_file( DB_ORDERS.'-backup' ) ){\n unlink( DB_ORDERS );\n rename( DB_ORDERS.'-backup', DB_ORDERS );\n chmod( DB_ORDERS, FILES_CHMOD );\n }\n }", "title": "" }, { "docid": "bba9f485979d0f0e57af916104270302", "score": "0.62800527", "text": "private function moveFiles()\n\t{\n\t\t$fileCount = 0;\n\n\t\t// Move the translationlist\n\t\t$src = $this->savePathTranslationlist . '/' . $this->versionConfig->xmlFile;\n\t\t$dest = str_replace($this->savePathTranslationlist, $this->webRoot . '/language', $src);\n\n\t\tif (@rename($src, $dest))\n\t\t{\n\t\t\tif ($this->verbose)\n\t\t\t{\n\t\t\t\techo \"Moving of $dest was successful.\\n\";\n\t\t\t}\n\n\t\t\t$fileCount++;\n\t\t}\n\n\t\t// Get list of detail files\n\t\t$files = array_keys($this->detailFileNames);\n\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\t$src = $file;\n\t\t\t$dest = str_replace($this->absolutePath, $this->webRoot . '/language', $file);\n\n\t\t\tif (@rename($src, $dest))\n\t\t\t{\n\t\t\t\tif ($this->verbose)\n\t\t\t\t{\n\t\t\t\t\techo \"Moving of $dest was successful.\\n\";\n\t\t\t\t}\n\n\t\t\t\t$fileCount++;\n\t\t\t}\n\t\t}\n\n\t\tif ($this->verbose)\n\t\t{\n\t\t\techo \"Finished moving files\\n\";\n\t\t}\n\n\t\techo date('Y-m-d H:m:s') . \": $fileCount files copied to update server.\\n\";\n\t}", "title": "" }, { "docid": "2839e1ca46952972735abff1a967725e", "score": "0.57402784", "text": "private function _addFilesToDb($files) {\n\t\tglobal $wpdb;\n\n\t\t// Adds file to db\n\t\tforeach($files as $file) {\n\n\t\t\tif (stristr($file, 'wp-content')) {\n\t\t\t\t$remotePath = preg_split('$wp-content$', $file);\n\t\t\t\t$remotePath = 'wp-content'.$remotePath[1];\n\t\t\t} else if (stristr($file, 'wp-includes')) {\n\t\t\t\t$remotePath = preg_split('$wp-includes$', $file);\n\t\t\t\t$remotePath = 'wp-includes'.$remotePath[1];\n\t\t\t} else if (stristr($file, ABSPATH)) {\n\t\t\t\t$remotePath = preg_split('$'.ABSPATH.'$', $file);\n\t\t\t\t$remotePath = $remotePath[1];\n\t\t\t}\n\n\t\t\t$row = $wpdb->get_row(\"SELECT * FROM `\".CST_TABLE_FILES.\"` WHERE `remote_path` = '\".$remotePath.\"'\");\n\n\t\t\t$changedate = filemtime($file);\n\n\t\t\tif ((!empty($row) && $changedate != $row->changedate) || (isset($_POST['cst-options']['syncall']) && $row != NULL)) {\n\t\t\t\t$wpdb->update(\n\t\t\t\t\tCST_TABLE_FILES,\n\t\t\t\t\tarray('changedate' => $changedate, 'synced' => '0'),\n\t\t\t\t\tarray('remote_path' => $remotePath)\n\t\t\t\t);\n\t\t\t} else if (!isset($row) || empty($row)) {\n\t\t\t\t$wpdb->insert(\n\t\t\t\t\tCST_TABLE_FILES,\n\t\t\t\t\tarray(\n\t \t\t\t'file_dir' => $file,\n\t \t\t\t 'remote_path' => $remotePath,\n\t \t\t\t 'changedate' => filemtime($file),\n\t \t \t\t\t 'synced' => '0'\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b4d570469ce53abbcc61224d1603b33a", "score": "0.572131", "text": "function reorder_images()\n\t{\n\t\t$sql=sprintf(\"UPDATE %s SET image_dir='0'\",\n\t\t\t$this->cms->tbname['papoo_images']\n\t\t);\n\t\t$this->db->query($sql);\n\t\t$sql=sprintf(\"UPDATE %s SET downloadkategorie='0'\",\n\t\t\t$this->cms->tbname['papoo_download']\n\t\t);\n\t\t$this->db->query($sql);\n\t}", "title": "" }, { "docid": "1fac7f05813b2b415eda9f6a8959d1a6", "score": "0.56349504", "text": "private function migrateDocuments()\n {\n // check if old table exists\n $checkTable = DB::query(\"SHOW TABLES LIKE '_obsolete_DMSDocument'\")->numRecords();\n if ($checkTable > 0) {\n // check that it's a SS3 version of the table\n $checkField = DB::query(\"SHOW COLUMNS FROM `_obsolete_DMSDocument` LIKE 'CanEditType'\")->numRecords();\n if ($checkField > 0) {\n $rows = DB::query('SELECT * FROM \"_obsolete_DMSDocument\";');\n\n $this->log(\"found \" . $rows->numRecords() . \" records\", 2);\n\n foreach ($rows as $row) {\n\n $this->log(\"migrating \" . $row['Filename'] . \"... \");\n\n // make sure file doesn't exist yet\n if (File::get()->filter(['OriginalDMSDocumentIDFile' => $row['ID']])->count() == 0) {\n\n // get old file path\n $oldFilePath = PUBLIC_PATH. DIRECTORY_SEPARATOR . self::config()->old_dms_folder . DIRECTORY_SEPARATOR . $row['Folder'] . DIRECTORY_SEPARATOR . $row['Filename'];\n if (file_exists($oldFilePath)) {\n\n $this->log(\"old file exists, copying... \", 0);\n\n $newFolder = Folder::find_or_make(DMSDocumentSet::config()->dms_document_folder);\n\n $newFile = File::create();\n $newFile->Created = $row['Created'];\n $newFile->LastEdited = $row['LastEdited'];\n $newFile->Name = $row['Filename'];\n $newFile->Title = $row['Title'];\n $newFile->Description = $row['Description'];\n $newFile->CreatedByID = $row['CreatedByID'];\n $newFile->LastEditedByID = $row['LastEditedByID'];\n $newFile->CanViewType = $row['CanViewType'];\n $newFile->CanEditType = $row['CanEditType'];\n $newFile->OriginalDMSDocumentIDFile = $row['ID'];\n $newFile->write();\n\n $newFile->generateFilename();\n $newFile->setFromLocalFile($oldFilePath, $this->getFilenameWithoutID($row['Filename']));\n $newFile->ParentID = $newFolder->ID;\n $newFile->write();\n\n $newFile->publishRecursive();\n\n $this->log(\"done.\");\n\n $this->log(\"updating document sets... \", 0);\n\n DB::query(\"UPDATE DMSDocumentSet_Documents SET FileID = \" . $newFile->ID . \" WHERE DMSDocumentID = \" . $row['ID']);\n\n $this->log(\"done.\", 2);\n } else {\n $this->log(\"skipping, old file does not exist: \" . $oldFilePath, 2);\n }\n } else {\n $this->log(\"skipping, already migrated.\", 2);\n }\n }\n } else {\n $this->log(\"Nothing to migrate.\", 2);\n }\n } else {\n $this->log(\"Nothing to migrate.\", 2);\n }\n }", "title": "" }, { "docid": "95273c508d9654712d290b27a6028821", "score": "0.56161404", "text": "public function updateDatabase()\n\t{\n\t\t$archiveURL = $this->geolocINI->variable('General', 'IPDatabaseURL');\n\t\t$varDir = eZSys::varDirectory();\n\t\t$this->zipArchive = $this->downloadArchive($archiveURL);\n\t\t$archive = ezcArchive::open($this->zipArchive);\n\t\tforeach($archive as $entry)\n\t\t{\n\t\t\t$csvPath = $varDir.'/'.$entry->getPath();\n\t\t\t$this->aCSV[] = $csvPath;\n\t\t\t\n\t\t\t$this->cli->warning('Inflating '.$csvPath);\n\t\t\t$archive->extractCurrent($varDir);\n\t\t\t$this->handleCSVFile($csvPath);\n\t\t}\n\t}", "title": "" }, { "docid": "e59b8a03ab494972e7faa9fa661d4e53", "score": "0.56007105", "text": "function import () {\n\n $pattern = '\\.(sql)$';\n $newstamp = 0;\n $newname = '';\n $dc = opendir(WP_SQL_DIR);\n\n while ($fn = readdir($dc)) {\n \n # Eliminate current directory, parent directory\n if (ereg('^\\.{1,2}$',$fn)) \n continue;\n \n # Eliminate other pages not in pattern\n if (! ereg($pattern,$fn)) \n continue;\n\n $timedat = filemtime(WP_SQL_DIR.'/'.$fn);\n if ($timedat > $newstamp)\n $file_name = $fn;\n\n }\n\n $shell = 'mysql -u '.DB_USER.' -p '.DB_NAME.' < '.$sql_dir.'/'.$file_name;\n\n echo 'Importing latest data for \"'.get_bloginfo('name').'\"'.\"\\n\";\n echo '- Import '.$sql_dir.'/'.$file_name.'? Enter password to confirm'.\"\\n\";\n echo shell_exec($shell);\n\n}", "title": "" }, { "docid": "4cc39f62dbbc2691fa2758750d2988f0", "score": "0.54883736", "text": "function fileMove()\n{\n\tglobal $files;\n\n\tsecurityCheck();\n\t$basePath = getBasePath();\n\t$currentPath = getCurrentPath();\n\t$selectedItem = getSelectedItem();\n\t$pathname = getPathname();\n\t$files->fileMove($basePath, $currentPath, $selectedItem, $pathname);\n\techo $files->buildDirectoryList($basePath, $currentPath, $_SESSION['courseMsg']);\n}", "title": "" }, { "docid": "f8358a9ab0e25198f44c2a8404144843", "score": "0.5461852", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_processed_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_fetch_job_enquiry_processed_fids';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "9b934e428ec72022948673e39e6b9a23", "score": "0.54139113", "text": "function move_attachments_to_database()\r\n{\r\n global $ilance, $ilconfig, $phrase, $ilpage;\r\n \r\n $notice = '';\r\n \r\n $sql = $ilance->db->query(\"\r\n SELECT attachid, attachtype, filehash, filename\r\n FROM \" . DB_PREFIX . \"attachment\r\n ORDER BY attachid ASC\r\n \");\r\n if ($ilance->db->num_rows($sql) > 0)\r\n {\r\n $notice = '<ol>';\r\n while ($res = $ilance->db->fetch_array($sql))\r\n {\r\n $attachpath = fetch_attachment_path($res['attachtype']);\r\n $filename = $attachpath . $res['filehash'] . '.attach';\r\n \r\n if (file_exists($filename))\r\n {\r\n $filesize = filesize($filename);\r\n \r\n $fp = fopen($filename, \"rb\");\r\n $newfiledata = fread($fp, $filesize);\r\n fclose($fp);\r\n \r\n if (empty($newfiledata) OR !isset($newfiledata))\r\n {\r\n $newfiledata = 'empty_filedata';\r\n }\r\n \r\n $ilance->db->query(\"\r\n UPDATE \" . DB_PREFIX . \"attachment\r\n SET filedata = '\" . $ilance->db->escape_string($newfiledata) . \"'\r\n WHERE attachid = '\" . $res['attachid'] . \"'\r\n \");\r\n unset($newfiledata, $fp);\r\n \r\n // remove attachment from file system\r\n @unlink($filename);\r\n \r\n $notice .= '<li>Moved <strong>' . $filename . ' to database</strong></li>';\r\n }\r\n } \r\n $notice .= '</ol>';\r\n \r\n /*$empties = $ilance->db->query(\"\r\n SELECT *\r\n FROM \" . DB_PREFIX . \"attachment\r\n WHERE filedata = 'empty_filedata'\r\n \");\r\n $emptystring = '';\r\n if ($ilance->db->num_rows($empties) > 0)\r\n {\r\n while ($empty = $ilance->db->fetch_array($empties))\r\n {\r\n $attachmentids[] = $empty['attachid'];\r\n }\r\n if (is_array($attachmentids))\r\n {\r\n $emptystring = \"<br /><br /><strong>Notice:</strong> \" . sizeof($attachmentids) . \" empty attachments were imported, to remove these empty attachments run the following database queries<br />\\n\";\r\n $emptystring .= \"DELETE FROM \" . DB_PREFIX . \"attachment WHERE attachid IN(\" . implode(',', $attachmentids) . \")<br />\\n\";\r\n }\r\n }*/\r\n }\r\n \r\n $ilance->db->query(\"\r\n UPDATE \" . DB_PREFIX . \"configuration\r\n SET value = '1'\r\n WHERE name = 'attachment_dbstorage'\r\n \");\r\n \r\n return $notice;\r\n}", "title": "" }, { "docid": "4bbe0cc2c9c58a4737992e9c3e4482db", "score": "0.53774625", "text": "function dbDelOrderMass( ){\n\n $aFile = file( DB_ORDERS );\n $iCount = count( $aFile );\n $rFile = fopen( DB_ORDERS, 'w' );\n $iTime = time( );\n\n for( $i = 0; $i < $iCount; $i++ ){\n if( $i > 0 ){\n $aExp = explode( '$', $aFile[$i] );\n $iDiff = $iTime - substr( $aExp[1], 0, 10 );\n if( $aExp[2] == 0 && $iDiff >= 86400 ){\n $aFile[$i] = null;\n $aId[$aExp[0]] = true;\n }\n }\n fwrite( $rFile, $aFile[$i] );\n } // end for\n \n fclose( $rFile );\n \n if( isset( $aId ) && is_array( $aId ) ){\n $aFile = file( DB_ORDERS_PRODUCTS );\n $iCount = count( $aFile );\n $rFile = fopen( DB_ORDERS_PRODUCTS, 'w' );\n\n for( $i = 0; $i < $iCount; $i++ ){\n if( $i > 0 ){\n $aExp = explode( '$', $aFile[$i] );\n if( isset( $aId[$aExp[1]] ) ){\n $aFile[$i] = null;\n }\n }\n fwrite( $rFile, $aFile[$i] );\n } // end for\n \n fclose( $rFile );\n }\n }", "title": "" }, { "docid": "de0a9d60349fea9695b95c8db404d236", "score": "0.5356571", "text": "private function ftpFiles()\r\n\t{\n\t\t$config = new Config();\n\t\t$fileCount = 0;\n\t\t// Get list of detail files\n\t\t$files = array_keys($this->detailFileNames);\n\n\t\t// Connect to FTP destination\n\n\t\t$connectionId = ftp_connect($config->ftpSite);\n\t\t$login = ftp_login($connectionId, $config->ftpUser, $config->ftpPassword);\n\t\tif (!$connectionId || !$login)\n\t\t{\n\t\t\t$this->error = \"FTP error: could not log in\\n\";\n\t\t\t$this->__destruct();\n\t\t}\n\n\t\t// Copy the translationlist xml file\n\t\t// 2013-04-28 : These lines commented out. Now the login goes directly to the language folder and chdir not allowed\n//\t\tif (!ftp_chdir($connectionId, '/public_html/language'))\n//\t\t{\n//\t\t\t$this->error = \"FTP cannot change directory to language\\n\";\n//\t\t\t$this->__destruct();\n//\t\t}\n\n\t\t$copy = @ftp_put($connectionId, $this->versionConfig->xmlFile, $this->savePathTranslationlist . $this->versionConfig->xmlFile, FTP_BINARY);\n\t\tif ($copy)\n\t\t{\n\t\t\tif ($this->verbose) echo \"Copy of \" . $this->versionConfig->xmlFile . \" was successful.\\n\";\n\t\t\t$fileCount++;\n\t\t}\n\n\t\t// Copy detail files\n\t\t$ftpDestination = dirname($this->detailsXmlUrl);\n\t\tif (!ftp_chdir($connectionId, '/' . $this->versionConfig->detailsFolder))\n\t\t{\n\t\t\t$this->error = \"FTP cannot change directory to \" . $this->versionConfig->detailsFolder . \"\\n\";\r\n\t\t\t$this->__destruct();\n\t\t}\n\n\t\tforeach ($files as $fromFile)\n\t\t{\n\t\t\t$toFile = basename($fromFile);\n\t\t\t$copy = @ftp_put($connectionId, $toFile, $fromFile, FTP_BINARY);\n\t\t\tif ($copy)\n\t\t\t{\n\t\t\t\tif ($this->verbose) echo \"Copy of $toFile was successful.\\n\";\n\t\t\t\t$fileCount++;\n\t\t\t}\n\t\t}\n\t\tftp_close($connectionId);\n\t\tif ($this->verbose) echo \"end of file transfer\\n\";\n\t\techo date('Y-m-d H:m:s') . \": $fileCount files copied to update server.\\n\";\n\t}", "title": "" }, { "docid": "844e0dd05fd2a2a76b5901e37f990d6c", "score": "0.531653", "text": "private function _refreshOrder()\n\t {\n\t\t$this->_createTables($this->_name);\n\n\t\t$order = array();\n\n\t\tif ($this->_limit > 0)\n\t\t {\n\t\t\t$result = $this->_db->query(\n\t\t\t \"SELECT message_id FROM \" . $this->_name . \" \" .\n\t\t\t \"ORDER BY creationtime ASC LIMIT \" . $this->_limit\n\t\t\t);\n\t\t }\n\t\telse\n\t\t {\n\t\t\t$result = $this->_db->query(\n\t\t\t \"SELECT message_id FROM \" . $this->_name\n\t\t\t);\n\t\t }\n\n\t\tif ($result !== false)\n\t\t {\n\t\t\tforeach ($result as $row)\n\t\t\t {\n\t\t\t\tif ($this->_limit > 0 && count($order) < $this->_limit || $this->_limit === 0)\n\t\t\t\t {\n\t\t\t\t\t$order[] = $row[\"message_id\"];\n\t\t\t\t } //end if\n\t\t\t }\n\n\t\t }\n\n\t\t$this->_order = $order;\n\t }", "title": "" }, { "docid": "fa1a982277675642b6d258261e0f86f1", "score": "0.53137434", "text": "public function update()\n {\n $this->setUpVersion();\n $connection = $this->getConnection();\n foreach ($this->folders as $name => $path) {\n $folder = new FolderImpl($path);\n if (!$folder->exists()) {\n continue;\n }\n /** @var File[] $files */\n $files = $folder->listFolder(Folder::LIST_FOLDER_FILES);\n\n usort($files, function (File $a, File $b) {\n return $this->leadingNumber($a->getFilename()) - $this->leadingNumber($b->getFilename());\n });\n $lastFile = null;\n $version = $this->getVersion($name);\n foreach ($files as $file) {\n if ($file->getExtension() != 'sql') {\n continue;\n }\n\n if ($this->leadingNumber($file->getFilename()) <= $version) {\n continue;\n }\n\n $stmt = $connection->prepare($file->getContents());\n $stmt->execute();\n\n while ($stmt->nextRowset()) ; //Polling row sets\n\n $lastFile = $file;\n }\n if ($lastFile == null) {\n continue;\n }\n $this->setVersion($name, $this->leadingNumber($lastFile->getFilename()));\n\n }\n }", "title": "" }, { "docid": "af0798b04e11f0dd860d7e8fcd2cb0d0", "score": "0.529536", "text": "public function execute()\n {\n $fileList = $this->getFileList(parent::FTP_ORDER_INWARD_DIR);\n\n if (count($fileList) > 0) {\n foreach ($fileList as $statusFile) {\n $ids = $this->getOrderIds($statusFile['filename']);\n if (count($ids) > 0) {\n $connection = $this->resource->getConnection('core_write');\n $bind = ['status' => self::ORDER_STATUS_BOOKED_ERP];\n $where = ['entity_id IN(?)' => $ids];\n $count = $connection->update($connection->getTableName('sales_order'), $bind, $where);\n\n if (count($count)) {\n $this->logger->info(\n __(\n 'Order statuses updated as \"%1\" for order ids: %2',\n self::ORDER_STATUS_BOOKED_ERP,\n implode(', ', $ids)\n )\n );\n }\n }\n }\n }\n }", "title": "" }, { "docid": "61bdc68925cdd0fadd27205ef0af70a5", "score": "0.52940106", "text": "public function deleteOrder( $iOrder ){\n if( isset( $this->aOrders[$iOrder] ) ){\n unset( $this->aOrders[$iOrder] );\n\n $rFile = fopen( DB_ORDERS.'-backup', 'w' );\n fwrite( $rFile, '<?php exit; ?>'.\"\\n\" );\n foreach( $this->aOrders as $iKey => $aValue ){\n fwrite( $rFile, serialize( compareArrays( $this->aOrdersFields, $aValue ) ).\"\\n\" );\n } // end foreach\n fclose( $rFile );\n\n $rFile1 = fopen( DB_ORDERS_EXT, 'r' );\n $rFile2 = fopen( DB_ORDERS_EXT.'-backup', 'w' );\n fwrite( $rFile2, '<?php exit; ?>'.\"\\n\" );\n $i = 0;\n while( !feof( $rFile1 ) ){\n $sContent = fgets( $rFile1 );\n if( $i > 0 && !empty( $sContent ) ){\n $aData = unserialize( trim( $sContent ) );\n if( $aData['iOrder'] != $iOrder ){\n fwrite( $rFile2, trim( $sContent ).\"\\n\" );\n }\n }\n $i++;\n } // end while\n fclose( $rFile1 );\n fclose( $rFile2 );\n\n $rFile1 = fopen( DB_ORDERS_PRODUCTS, 'r' );\n $rFile2 = fopen( DB_ORDERS_PRODUCTS.'-backup', 'w' );\n fwrite( $rFile2, '<?php exit; ?>'.\"\\n\" );\n $i = 0;\n while( !feof( $rFile1 ) ){\n $sContent = fgets( $rFile1 );\n if( $i > 0 && !empty( $sContent ) ){\n $aData = unserialize( trim( $sContent ) );\n if( $aData['iOrder'] != $iOrder ){\n fwrite( $rFile2, trim( $sContent ).\"\\n\" );\n }\n }\n $i++;\n } // end while\n fclose( $rFile1 );\n fclose( $rFile2 );\n\n $this->moveDatabaseFiles( );\n\n }\n }", "title": "" }, { "docid": "7cfb8315552b553754a18788f13ff639", "score": "0.52711856", "text": "public function insertLastDay($zone = 1) {\n\n $pathZone = $this->getFtpPathZone($zone);\n $mostRecent = array(\n 'time' => 0,\n 'fileFtp' => null\n );\n $listFile = \"\";\n//il sistema e' connesso in ftp direttamente nella cartella principale\n//scorro le cartelle sapendo il nome della cartella\n $listFile = $this->ftp->getListFile(\"./\" . $pathZone);\n echo \"<br>Recupero lista file num. file:\" . count($listFile);\n $mostRecent = $this->findLastFtpFile($listFile);\n echo \"<br>Ultimo file creato:<br>\" . $mostRecent['fileFtp'];\n\n\n //scarica su folder test\n $fileRemote = $mostRecent['fileFtp'];\n $filename = basename($mostRecent['fileFtp']);\n $local = \"tempFile/\" . $filename;\n //se non scarico il file blocco tutto\n \n if (!$this->ftpDownload($local, $fileRemote)) {\n die(\"error download File \" . $fileRemote);\n } else {\n /* x TEST\n if ($this->checkAndInsertToLogImport($local, $filename, $fileRemote, $zone, date('Y-m-d H:i:s', $mostRecent['time']))) {\n echo \"<br>INIZIO ANALISI FILE<br>\";\n } else {\n die('<br>ALREADY inserted file ' . $filename . \" PROCESSO TERMINATO\");\n }*/\n }\n\n $this->ftp->ftpClose();\n\n $filename = basename($mostRecent['fileFtp']);\n $pathIn = ROOTPATH . \"/\" . $local;\n $filenameRegex = preg_replace('/\\s+/', '', $filename);\n $pathOut = ROOTPATH . \"/tempFile/\" . substr($filenameRegex, 0, -5) . \".csv\";\n echo \"<br> FILE ORIGINE:\" . $pathIn . \"<br> FILE DESTINAZIONE:\" . $pathOut;\n\n $this->convertXlsToCsv($pathIn, $pathOut);\n $CsvData = $this->parseCsvToArray($pathOut);\n\n $this->insertCsvToDb($CsvData, $zone, $filename);\n //remove used file\n unlink($pathIn);\n unlink($pathOut);\n }", "title": "" }, { "docid": "c27b64c1b73f42c8b2e5df6116f5df12", "score": "0.52661234", "text": "function drush_publisher_migrate_filepath() {\n // Source directory to be cleaned up. All images in this directory will be relocated.\n $source_directory = rtrim(drush_get_option('source', ''), '/');\n // Directory to place the new structure under. If does not exist will be created.\n $target_directory = rtrim(drush_get_option('target', ''), '/');\n \n // Regular expression to find files in the source directory.\n // For now assume public files only.\n // public://field/image/imagefield_hENvtS.png\n $extensions = array('jpeg', 'jpg', 'gif', 'png', 'txt');\n \n // Construct a expression to find images located in the source directory.\n $file_pattern = \"[^\\/]*\"; // Finds anything that does not contain \"/\", should be fine.\n \n // Append the trailing slash for the regular expression.\n // Note, in some instances drupal places under public:/// (three slashes)\n // even when no folder specified. Reason for this is not known yet.\n $source_pattern = $source_directory ? $source_directory . \"\\/\" : '';\n $regex = \"^public:\\/\\/\" . $source_pattern . \"(\" . $file_pattern . \")\\.(\" . implode($extensions, '|') . \")$\";\n\n // Query the database for files that match this pattern.\n $filetypes = array('image/jpeg', 'image/jpg', 'image/gif', 'image/png', 'text/plain');\n $query = db_select('file_managed', 'f')\n ->condition('filemime', $filetypes , 'IN')\n ->condition('uri', $regex, 'REGEXP');\n $total_count = $query->countQuery()->execute()->fetchField();\n \n drush_print(dt('@count entries are to be moved.', array('@count' => $total_count)));\n \n // Select the files to be moved.\n $files = $query->fields('f', array('fid', 'filename', 'uri', 'timestamp'))\n ->execute()\n ->fetchAll();\n \n $count = 1;\n foreach ($files as $file) {\n preg_match_all(\"/$regex/i\", $file->uri, $matches); // Note, $file->filename can be the SAME for different uri-s!\n $file_base = $matches[1][0];\n $file_extension = $matches[2][0];\n $file_name = $file_base . \".\" . $file_extension;\n \n $old_file_wrapper = file_stream_wrapper_get_instance_by_uri($file->uri);\n \n // If the file has already been moved, or does not exist in the filesystem, move on.\n if (FALSE === ($status = $old_file_wrapper->url_stat($file->uri, STREAM_URL_STAT_QUIET))) {\n drush_log(\"File entry in the database does not exist on the filesystem.\", 'notice');\n continue;\n }\n \n // Each file should go to the directory based on its timestamp.\n $year = date('Y', $file->timestamp);\n $month = date('m', $file->timestamp);\n $target_directory_for_file = $target_directory . '/' . $year . '/' .$month;\n \n // Construct a dummy URI for it so we can use the stream wrappers.\n $new_directory = file_build_uri($target_directory_for_file);\n $wrapper = file_stream_wrapper_get_instance_by_uri($new_directory);\n // Make sure that the new directory exists.\n if (!file_exists($new_directory)) {\n $wrapper->mkdir($new_directory, 0755, STREAM_MKDIR_RECURSIVE | STREAM_REPORT_ERRORS);\n }\n\n // If a file with that name already exists in the directory, find a new name.\n $file_count = 1;\n while (file_exists($new_directory . '/' . $file_name)) {\n $file_name = $file_base . '_' . $file_count . '.' . $file_extension;\n $file_count++;\n }\n \n // Construct the new directory.\n $wrapper = file_stream_wrapper_get_instance_by_uri($file->uri);\n $new_uri = file_build_uri($target_directory_for_file . '/' . $file_name);\n $wrapper->rename($file->uri, $new_uri);\n \n $progress = round(($count / $total_count) * 100);\n drush_print($progress . '%');\n\n $query = db_update('file_managed')\n ->fields(array('uri' => $new_uri))\n ->condition('fid', $file->fid)\n ->execute();\n\n if (module_exists('file_entity_revisions')) {\n $query = db_update('file_managed_revisions')\n ->fields(array('uri' => $new_uri))\n ->condition('fid', $file->fid)\n ->execute();\n }\n\n $count++;\n }\n\n if ($count > 0) {\n db_query('truncate table cache_entity_file');\n }\n}", "title": "" }, { "docid": "3ae354f903e0904e3ba51998886ce4fc", "score": "0.5262857", "text": "function sortImages(){\n global $wpdb;\n\n $order = array();\n $order = explode(',', $_POST['data']);\n\n for ($i=0; $i<count($order)-1; $i++){\n $newPos = $i+1;\n $wpdb->update(DOPTG_Images_table, array('position' => $newPos), array(id => $order[$i]));\n }\n\n echo $_POST['data'];\n\n \tdie();\n }", "title": "" }, { "docid": "ea9ae01852f25b586eae1c2feec19111", "score": "0.5243331", "text": "function checkout() {\n die(\"this is depricated..\");\n set_time_limit(0);\n $count = 0;\n try {\n $db = dbConnect(0);\n } catch (PDOException $e) {\n die(\"DB error, try again.\");\n }\n //Read file for now.\n $files = glob('posts/posts.txt.*');\n //$postsFName = $file;\n foreach ($files as $postsFName){\n if (!(file_exists($postsFName) && $postsFilePtr = fopen($postsFName, \"r\")))\n return \"error opening the file\";\n $file = $db->quote(substr(strrchr($postsFName,\".\"),1));\n //Make sure the file does not exist.\n $result = $db->query(\"SELECT * FROM page WHERE name=$file\");\n if(($row=$result->fetch())) {\n $result->closeCursor();\n continue;\n }\n $result->closeCursor();\n print \"Adding $file <br/>\\n\"; flush(); ob_flush();\n //Create page row.\n $count++;\n $db->query(\"START TRANSACTION\");\n $sql = \"INSERT INTO page (name) VALUES (\".$file.\")\";\n $db->query($sql);\n $insertId = $db->lastInsertId();\n $postsCount = 0;\n\n $sql = 'INSERT IGNORE INTO post (page_fb_id, time_stamp, status, seq, date, post_fb_id)'.\n ' VALUES ( '.$insertId.', UNIX_TIMESTAMP(), \\'new\\', ?, ?, ?)';\n $sth = $db->prepare($sql);\n while(!feof($postsFilePtr)){\n fscanf($postsFilePtr, \"%s\\n\", $currentTime);\n fscanf($postsFilePtr, \"%s\\n\", $currentPost);\n $postsCount++;\n $sth->execute(array($postsCount,$currentTime,$currentPost));\n $sth->closeCursor();\n }\n $db->query(\"COMMIT\");\n print \"\\t+ $postsCount rows added.<br/>\\n\"; flush(); ob_flush();\n }\n print \"$count pages added.<br/>\\n\";\n}", "title": "" }, { "docid": "3b7248fbd56bfabc458966805b1ac84d", "score": "0.52401644", "text": "public function pull($listTables){\n\n $this->seedProcess($listTables);\n $file=new file();\n $time=time();\n\n if(count($listTables)){\n $path=root.'/src/app/'.$this->project.'/'.$this->version.'/migrations/schemas';\n foreach($listTables as $key=>$object){\n if(!$file->exists($path.'/'.$key.'')){\n $file->mkdir($path,$key);\n }\n\n $this->checkIfThereIsIndexes($key);\n $writeInfo=$this->writeInfo($key,$object);\n\n\n if($writeInfo['status']==\"first\"){\n $modelFile='__'.$time.'__'.$key.'';\n $file->touch($path.'/'.$key.'/'.$modelFile.'.php');\n $this->fileProcess($key,[\n\n '__namespace__'=>'src\\\\app\\\\'.$this->project.'\\\\'.$this->version.'\\\\migrations\\\\schemas\\\\'.$key,\n '__classname__'=>$modelFile\n ],$object);\n }\n\n if($writeInfo['status']==\"noupdate\"){\n echo $this->colors->warning(' !!! '.$key.' table does not have updating information');\n }\n\n if($writeInfo['status']==\"update\"){\n\n if(array_key_exists('references',$writeInfo)){\n $time=time()+100+1;\n $modelFile='__'.$time.'__'.$key.'';\n $file->touch($path.'/'.$key.'/'.$modelFile.'.php');\n $this->fileProcessUpdate($key,[\n\n '__namespace__'=>'src\\\\app\\\\'.$this->project.'\\\\'.$this->version.'\\\\migrations\\\\schemas\\\\'.$key,\n '__classname__'=>$modelFile\n ],[\n 'references'=>$writeInfo['references']\n ]);\n }\n\n if(array_key_exists(\"diff\",$writeInfo['data'])){\n $updateData=[];\n foreach ($writeInfo['data']['diff']['beforeField'] as $okey=>$ovalue){\n $time=time()+100+$okey+1;\n $updateData['diff']['beforeField']=$ovalue;\n $updateData['diff']['Field']=$writeInfo['data']['diff']['Field'][$okey];\n $updateData['diff']['Type']=$writeInfo['data']['diff']['Type'][$okey];\n $updateData['diff']['Null']=$writeInfo['data']['diff']['Null'][$okey];\n $updateData['diff']['Key']=$writeInfo['data']['diff']['Key'][$okey];\n $updateData['diff']['Default']=$writeInfo['data']['diff']['Default'][$okey];\n $updateData['diff']['Extra']=$writeInfo['data']['diff']['Extra'][$okey];\n $modelFile='__'.$time.'__'.$key.'';\n $file->touch($path.'/'.$key.'/'.$modelFile.'.php');\n $this->fileProcessUpdate($key,[\n\n '__namespace__'=>'src\\\\app\\\\'.$this->project.'\\\\'.$this->version.'\\\\migrations\\\\schemas\\\\'.$key,\n '__classname__'=>$modelFile\n ],$updateData);\n }\n }\n\n if(array_key_exists(\"change\",$writeInfo['data'])){\n\n $updateData=[];\n foreach ($writeInfo['data']['change']['beforeField'] as $okey=>$ovalue){\n $time=time()+100+$okey+2;\n $updateData['change']['beforeField']=$ovalue;\n $updateData['change']['Field']=$writeInfo['data']['change']['Field'][$okey];\n $updateData['change']['Type']=$writeInfo['data']['change']['Type'][$okey];\n $updateData['change']['Null']=$writeInfo['data']['change']['Null'][$okey];\n $updateData['change']['Key']=$writeInfo['data']['change']['Key'][$okey];\n $updateData['change']['Default']=$writeInfo['data']['change']['Default'][$okey];\n $updateData['change']['Extra']=$writeInfo['data']['change']['Extra'][$okey];\n $modelFile='__'.$time.'__'.$key.'';\n $file->touch($path.'/'.$key.'/'.$modelFile.'.php');\n $this->fileProcessUpdate($key,[\n\n '__namespace__'=>'src\\\\app\\\\'.$this->project.'\\\\'.$this->version.'\\\\migrations\\\\schemas\\\\'.$key,\n '__classname__'=>$modelFile\n ],$updateData);\n }\n\n }\n\n if(array_key_exists(\"changeField\",$writeInfo['data'])){\n\n $updateData=[];\n foreach ($writeInfo['data']['changeField']['Field']['old'] as $okey=>$ovalue){\n $time=time()+100+$okey+3;\n $updateData['changeField']['old']=$ovalue;\n $updateData['changeField']['new']=$writeInfo['data']['changeField']['Field']['new'][$okey];\n $updateData['changeField']['Type']=$writeInfo['data']['changeField']['Type'][$okey];\n $updateData['changeField']['Null']=$writeInfo['data']['changeField']['Null'][$okey];\n $updateData['changeField']['Key']=$writeInfo['data']['changeField']['Key'][$okey];\n $updateData['changeField']['Default']=$writeInfo['data']['changeField']['Default'][$okey];\n $updateData['changeField']['Extra']=$writeInfo['data']['changeField']['Extra'][$okey];\n\n $modelFile='__'.$time.'__'.$key.'';\n $file->touch($path.'/'.$key.'/'.$modelFile.'.php');\n $this->fileProcessUpdate($key,[\n\n '__namespace__'=>'src\\\\app\\\\'.$this->project.'\\\\'.$this->version.'\\\\migrations\\\\schemas\\\\'.$key,\n '__classname__'=>$modelFile\n ],$updateData);\n }\n\n }\n if(array_key_exists(\"dropField\",$writeInfo['data'])){\n\n foreach($writeInfo['data']['dropField']['Field'] as $okey=>$oval){\n $time=time()+100+$okey+4;\n $updateData['dropField']['Field']=$writeInfo['data']['dropField']['Field'][$okey];\n\n $modelFile='__'.$time.'__'.$key.'';\n $file->touch($path.'/'.$key.'/'.$modelFile.'.php');\n $this->fileProcessUpdate($key,[\n\n '__namespace__'=>'src\\\\app\\\\'.$this->project.'\\\\'.$this->version.'\\\\migrations\\\\schemas\\\\'.$key,\n '__classname__'=>$modelFile\n ],$updateData);\n\n $migrationYaml=root.'/src/app/'.$this->project.'/'.$this->version.'/migrations/migration.yaml';\n if(file_exists($migrationYaml)){\n $yaml = Yaml::parse(file_get_contents(root.'/src/app/'.$this->project.'/'.$this->version.'/migrations/migration.yaml'));\n $yaml['migration'][]=$modelFile.'.php';\n\n $yaml = Yaml::dump($yaml);\n\n file_put_contents($migrationYaml, $yaml);\n }\n else{\n $yaml = Yaml::dump(['migration'=>[''.$modelFile.'.php']]);\n\n file_put_contents($migrationYaml, $yaml);\n\n }\n }\n\n }\n\n\n }\n\n }\n }\n else{\n return $this->colors->error(\"There is no project model \");\n }\n\n\n\n }", "title": "" }, { "docid": "28c5afa1d3383a36c48939845ba86dd3", "score": "0.52246684", "text": "private function downloadSqlFiles() \n {\n $this->logger->progressMessage('Downloading sql files');\n \n foreach ($this->sourceSqlFiles as $sqlFile) {\n $this->logger->progressMessage('Downloading sql file: ' . $sqlFile);\n\n $this->client->getObject([\n 'Bucket' => $this->bucket,\n 'Key' => $sqlFile,\n 'SaveAs' => $this->storageDir . pathinfo($sqlFile, PATHINFO_BASENAME)\n ]);\n\n $this->logger->completeMessage('File download complete');\n }\n\n $this->logger->completeMessage('SQL file downloads complete');\n }", "title": "" }, { "docid": "be11f2adbeaf2ed0302bbfd67d5356a6", "score": "0.5190252", "text": "private function get_archivos_ddl()\r\n\t{\r\n\t\t$directorio = $this->get_dir_ddl();\r\n\t\t$patron = '|pgsql_a.*\\.sql|';\r\n\t\t$this->archivos = toba_manejador_archivos::get_archivos_directorio( $directorio, $patron );\r\n\t\tsort($this->archivos);\r\n\t}", "title": "" }, { "docid": "c95fb1480fdcff785fb30245f3055265", "score": "0.5181101", "text": "public function\n\timage_manager__Update_CSV__Memos__ListFromCSV() {\n\n\t\t/*******************************\n\t\t PDO file\n\t\t*******************************/\n\t\t$fpath = Utils::get_fpath();\n\t\t\n\t\t/*******************************\n\t\t validate: db file exists\n\t\t*******************************/\n\t\t$res = file_exists($fpath);\n\t\t\n\t\tif ($res == false) {\n\t\t\n\t\t\tdebug(\"data folder => not exist: $fpath\");\n\t\t\t\t\n\t\t\treturn null;\n\t\t\n\t\t} else {\n\t\t\t\t\n\t\t\tdebug(\"data folder => exists: $fpath\");\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t/*******************************\n\t\t get: the latest db file\n\t\t*******************************/\n\t\t$fname = Utils::get_Latest_File__By_FileName($fpath);\n\t\t\n\t\t/*******************************\n\t\t valid: file exists\n\t\t*******************************/\n\t\tif ($fname == null) {\n\t\t\n\t\t\tdebug(\"Utils::get_Latest_File__By_FileName => returned null\");\n\t\t\n\t\t\treturn null;\n\t\t\n\t\t}//$fname == null\n\t\t\n\t\t$fpath .= DIRECTORY_SEPARATOR.$fname;\n\t\t\t\n\t\tdebug(\"fpath => $fpath\");\n\t\t\n\t\t/*******************************\n\t\t pdo: setup\n\t\t*******************************/\n\t\t//REF http://www.if-not-true-then-false.com/2012/php-pdo-sqlite3-example/\n\t\t$file_db = new PDO(\"sqlite:$fpath\");\n\t\t\t\n\t\tif ($file_db === null) {\n\t\t\n\t\t\tdebug(\"pdo => null\");\n\t\t\n\t\t\treturn null;\n\t\t\n\t\t} else {\n\t\t\t\t\n// \t\t\tdebug(\"pdo => created\");\n\t\t\t\t\n\t\t}\n\t\t\t\n\t\t// Set errormode to exceptions\n\t\t$file_db->setAttribute(PDO::ATTR_ERRMODE,\n\t\t\t\tPDO::ERRMODE_EXCEPTION);\n\t\t\n\t\t/*******************************\n\t\t range\n\t\t*******************************/\n\t\t$start = Utils::get_Admin_Value(\"add_image_Range_Start\", \"val1\");\n\t\t\n\t\tif ($start === null) {\n\t\t\t\t\n\t\t\t$start = \"2015-08-15\";\n\t\t\t\t\n\t\t}//$start === null\n\t\t\n\t\t$end = Utils::get_Admin_Value(\"add_image_Range_End\", \"val1\");\n\t\t\n\t\tif ($end === null) {\n\t\t\n\t\t\t$end = \"2015-09-03\";\n\t\t\n\t\t}//$start === null\n\t\t\n\t\tdebug(\"start = $start / end = $end\");\n\t\t\n\t\t/*******************************\n\t\t params\n\t\t*******************************/\n\t\t$sort_ColName = \"_id\";\n\t\t\n\t\t$sort_Direction = \"DESC\";\n\t\t\n\t\t/*******************************\n\t\t build list: from CSV\n\t\t*******************************/\n\t\t$where_Col = \"file_name\";\n\t\t\n\t\t$q = \"SELECT * FROM \".CONS::$tname_IFM11\n\t\t\t.\" \".\"WHERE\".\" \"\n\t\t\t.$where_Col.\" \".\">=\".\" \".\"'$start'\"\n\t\t\t.\" \".\"AND\".\" \"\n\t\t\t.$where_Col.\" \".\"<=\".\" \".\"'$end'\"\n\t\t\t.\" \".\"AND\".\" \"\n\t\t\t.\"memos is null\"\n\t\t\t\t\t\n\t\t\t//ref http://www.tutorialspoint.com/sqlite/sqlite_order_by.htm\n\t\t\t.\" \".\"ORDER BY\".\" \"\n\t\t\t.$sort_ColName.\" \".$sort_Direction\n\t\t\t;\n\t\t\t\n\t\tdebug(\"q => $q\");\n\t\t\t\n\t\t$result = $file_db->query($q);\n\t\t\n// \t\tdebug(get_class($result));\n\n\t\t/*******************************\n\t\t\tget: num of images\n\t\t*******************************/\n\t\t$q = \"SELECT Count(*) FROM \".CONS::$tname_IFM11\n\t\t\t.\" \".\"WHERE\".\" \"\n\t\t\t.$where_Col.\" \".\">=\".\" \".\"'$start'\"\n\t\t\t.\" \".\"AND\".\" \"\n\t\t\t.$where_Col.\" \".\"<=\".\" \".\"'$end'\"\n\t\t\t.\" \".\"AND\".\" \"\n\t\t\t.\"memos is null\"\n\t\t\t//ref http://www.tutorialspoint.com/sqlite/sqlite_order_by.htm\n\t\t\t.\" \".\"ORDER BY\".\" \"\n\t\t\t.$sort_ColName.\" \".$sort_Direction\n\t\t\t;\n\n\t\t$result_Num = $file_db->query($q);\n\t\t\n\t\t$numOf_Images = $result_Num->fetchColumn();\n\t\t\n\t\t/*******************************\n\t\t pdo => reset\n\t\t*******************************/\n\t\t$file_db = null;\n\t\t\n\t\t/*******************************\n\t\t\treturn\n\t\t*******************************/\n\t\treturn array($result, $numOf_Images);\n// \t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "210764fad399f37416f2ca99d6310ebe", "score": "0.5175861", "text": "function PKGBUILDER_listFiles()\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\n\tHTML_submit(\"BUT_reload\",$I18N_refresh);\n\tif (HTML_submit(\"BUT_recreatePackageIndex\",$I18N_recreatePackageIndex))\n\t{\n\t\tPKGBUILDER_tar2deb(false);\n\t}\n\t\n\n\t$pressedAction=array_keysSearch($_POST,\"/^BUT_action/\");\n\tif (!($pressedAction === false))\n\t{\n\t\t$dumpActionFilename=explode(\"?\",$pressedAction);\n\n\t\t$fileName=EXTRA_DEBS_DIRECTORY.base64_decode($dumpActionFilename[2]);\n\t\t\n\t\tswitch ($dumpActionFilename[1])\n\t\t{\n\t\t\tcase \"d\":\n\t\t\t\tunlink($fileName);\n\t\t\t\tPKGBUILDER_tar2deb(false);\n\t\t\t\tbreak;\n\t\t\tcase \"c\":\n\t\t\t\techo(\"<br><span class=\\\"title\\\">$I18N_tar2debConversionStatus</span>\");\n\t\t\t\tHTML_showTableHeader();\n\t\t\t\techo(\"<pre>\");\n\t\t\t\tPKGBUILDER_tar2deb($fileName);\n\t\t\t\techo(\"</pre>\");\n\t\t\t\tHTML_showTableEnd();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\n\n\techo(\"<br><span class=\\\"title\\\">$I18N_fileList</span>\");\n\tHTML_showTableHeader();\n\n\techo(\"<tr>\n\t<td><span class=\\\"subhighlight\\\">$I18N_fileName</span></td>\n\t<td><span class=\\\"subhighlight\\\">$I18N_fileSize</span></td>\n\t<td><span class=\\\"subhighlight\\\">$I18N_fileChangeTime</span></td>\n\t<td><span class=\\\"subhighlight\\\">$I18N_action</span></td>\n\t</tr>\n\t\");\n\t\n\t$i=0;\n\t\n\t//scan the directory for files\n\t$dir=opendir(EXTRA_DEBS_DIRECTORY);\n\twhile ($fileName = readdir($dir))\n\t{\n\t\tif ($fileName != \".\" && $fileName != \"..\")\n\t\t\t$files[$i++]=$fileName;\n\t}\n\t//close the directory handle\n\tclosedir($dir);\n\tsort($files);\n\n\n\tforeach ($files as $fileName)\n\t{\n\t\tif ($colorBlue)\n\t\t\t{\n\t\t\t\t$color=' bgcolor=\"#A4D9FF\" bordercolor=\"#A4D9FF\"';\n\t\t\t\t$colorBlue = false;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t\t$color='';\n\t\t\t\t$colorBlue = true;\n\t\t\t}\n\n\t\tif (preg_match(\"/(tar.bz2$|tb2$|tar.gz$|tgz$)/i\",$fileName) > 0)\n\t\t{\n\t\t\t//it's a tar file => convert or do nothing\n\t\t\t$htmlName=\"BUT_action?d?\".base64_encode($fileName);\n\t\t\tHTML_submitDefine(\"$htmlName\",$I18N_delete);\n\t\t\t\n\t\t\t$htmlName2=\"BUT_action?c?\".base64_encode($fileName);\n\t\t\tHTML_submitDefine($htmlName2,$I18N_convertToDeb);\n\t\t\t$code=constant($htmlName).\" \".constant($htmlName2);\n\t\t}\n\t\telseif (preg_match(\"/Packages(.bz2$|.gz$|)/\",$fileName) > 0)\n\t\t{\n\t\t\t//Debian package index file (Packages, Packages.gz, Packages.bz2)\n\t\t\t$code=$I18N_packageIndexFile;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//all other files (Debian packages etc.) can be deleted\n\t\t\t$htmlName=\"BUT_action?d?\".base64_encode($fileName);\n\t\t\tHTML_submitDefine(\"$htmlName\",$I18N_delete);\n\t\t\t$code=constant($htmlName);\n\t\t}\n\t\t\n\t\t$fullPath = EXTRA_DEBS_DIRECTORY.$fileName;\n\t\techo(\"<tr$color>\n\t\t<td>$fileName</td>\n\t\t<td>\".filesize($fullPath).\"</td>\n\t\t<td>\".date($DATE_TIME_FORMAT,filectime($fullPath)).\"</td>\n\t\t<td>\".$code.\"</td>\n\t\t</tr>\");\n\t}\n\t\n\techo(\"\n\t<tr>\n\t\t<td colspan=\\\"4\\\"><hr></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=\\\"4\\\" align=\\\"right\\\">\".BUT_recreatePackageIndex.\" \".BUT_reload.\"</td>\n\t</tr>\");\n\n\tHTML_showTableEnd();\n}", "title": "" }, { "docid": "b63ec74a48b141005680aed760b3a8b5", "score": "0.5170042", "text": "public function saveOrders( $aForm ){\n if( isset( $aForm['aStatus'] ) && is_array( $aForm['aStatus'] ) && $aForm['iStatus'] > 0 ){\n if( !isset( $this->aOrders ) )\n $this->generateCache( );\n\n foreach( $aForm['aStatus'] as $iOrder => $sValue ){\n if( $this->aOrders[$iOrder]['iStatus'] != $aForm['iStatus'] ){\n $aChange[$iOrder] = $aForm['iStatus'];\n }\n }\n }\n\n if( isset( $aChange ) ){\n $iTime = time( );\n\n $rFile = fopen( DB_ORDERS.'-backup', 'w' );\n fwrite( $rFile, '<?php exit; ?>'.\"\\n\" );\n foreach( $this->aOrders as $iOrder => $aValue ){\n if( isset( $aChange[$iOrder] ) )\n $aValue['iStatus'] = $aChange[$iOrder];\n fwrite( $rFile, serialize( compareArrays( $this->aOrdersFields, $aValue ) ).\"\\n\" );\n } // end foreach\n fclose( $rFile );\n\n $rFile1 = fopen( DB_ORDERS_EXT, 'r' );\n $rFile2 = fopen( DB_ORDERS_EXT.'-backup', 'w' );\n fwrite( $rFile2, '<?php exit; ?>'.\"\\n\" );\n $i = 0;\n while( !feof( $rFile1 ) ){\n $sContent = trim( fgets( $rFile1 ) );\n if( $i > 0 && !empty( $sContent ) ){\n $aData = unserialize( $sContent );\n if( isset( $aChange[$aData['iOrder']] ) ){\n $aData['aStatuses'][] = Array( 0 => $iTime, 1 => $aChange[$aData['iOrder']] );\n fwrite( $rFile2, serialize( $aData ).\"\\n\" );\n }\n else\n fwrite( $rFile2, $sContent.\"\\n\" );\n }\n $i++;\n } // end while\n fclose( $rFile1 );\n fclose( $rFile2 );\n\n $this->moveDatabaseFiles( );\n $this->generateCache( );\n }\n }", "title": "" }, { "docid": "3b32cc977986e8369807dbf0035aff78", "score": "0.51687604", "text": "public function loadVersionnedFilesFromHistory() {\n\t\t$this->setVersionnedFiles($this->checkoutFromHistory());\n\t\t$this->setRevNumber($this->getRevNumberFromHistory());\n\t}", "title": "" }, { "docid": "2708d4a540a1ac76ba8cec1d397942ae", "score": "0.5153829", "text": "function MoveProcessedToMain ($filename) {\n\tglobal $PHOTOS_GALLERY, $THUMBNAILS, $MATTED, $FRAMED, $ORIGINALS, $SLIDES;\n\tglobal $SITEIMAGES, $PROCESSEDDIR, $PROCESSED_PHOTOS, $PROCESSED_THUMBNAILS, $PROCESSED_MATTED, $PROCESSED_FRAMED, $PROCESSED_ORIGINALS, $PROCESSED_SLIDES;\n\tglobal $BASEDIR, $LOGS;\n\tglobal $msg, $error;\n\n\t$DEBUG = 0;\n\t$DEBUG && $msg .= \"<BR>\".__FUNCTION__ .\" $filename<BR>\";\n \t\n \t$logerror = \"\";\n \t\n\t// Move processed images to the storage directories\n\t//$fromDirs = array ($PROCESSED_PHOTOS, $PROCESSED_THUMBNAILS, $PROCESSED_MATTED, $PROCESSED_FRAMED, $PROCESSED_SLIDES);\n\t//$toDirs = array ($PHOTOS_GALLERY, $THUMBNAILS, $MATTED, $FRAMED, $SLIDES);\n\t$fromDirs = array ($PROCESSED_ORIGINALS, $PROCESSED_PHOTOS, $PROCESSED_THUMBNAILS, $PROCESSED_SLIDES);\n\t$toDirs = array ($ORIGINALS, $PHOTOS_GALLERY, $THUMBNAILS, $SLIDES);\n\t\n\t// Is the file locked? If so, return\n\tif (is_processing_image ($filename)) {\n\t\tfp_error_log(__FUNCTION__.__LINE__.\": Oops, $filename is being processed or moved!\", 3, FP_PICTURES_LOG);\n\t\treturn false;\n\t}\n\t\n\t// Lock the file\n\tset_lock_for_file ($filename);\n\t\n\t\n\t// Do all versions exist? The system might still be processing even though some files exist\n\t$missing = 0;\n\tfor ($i=0; $i < count($fromDirs); $i++) {\n\t\t$from = \"{$BASEDIR}/{$fromDirs[$i]}/{$filename}\";\n\t\tif (!file_exists ($from)) {\n\t\t\t$missing++;\n\t\t}\n\t}\n\n\tif (!$missing) {\n\t\t$debug && fp_error_log(__FUNCTION__.__LINE__.\": Moving \" . basename($filename) . \" out of 'processed' folders.\", 3, FP_PICTURES_LOG);\n\t\tfor ($i=0; $i < count($fromDirs); $i++) {\n\t\t\t$from = $BASEDIR.\"/\".$fromDirs[$i] . \"/\" . $filename;\n\t\t\t$to = $BASEDIR.\"/\".$toDirs[$i] . \"/\" . $filename;\n\n\t\t\t$DEBUG && (file_exists ($from) || $logerror .= __FUNCTION__.__LINE__.\": missing : $from<BR>\");\n\t\t\t\n\t\t\t$DEBUG && $msg .= __FUNCTION__ .\":\".__LINE__ .\": Move $from to $to<BR>\\n\";\n\t\t\tif (file_exists($from)) {\n\t\t\t\tcopy ($from, $to) || $logerror .= __LINE__.\": Could not copy $from to $to<BR>\";\n\t\t\t\tunlinkb ($from) || $logerror .= __LINE__.\": Could not delete $from<BR>\";\n\t\t\t\tchmod ($to, 0644) || $logerror .= __LINE__.\": Could fix permissions (0644) for $to<BR>\";\n\t\t\t}\n\t\t}\n\t} else {\n\t\t$DEBUG && $logerror .= __LINE__.\": Did not move files...some are missing\";\n\t}\n\t$logerror && fp_error_log(__FUNCTION__.$logerror, 3, FP_PICTURES_LOG);\n\tclear_lock_for_file ($filename);\n\t$result = ($logerror == \"\");\n\treturn ($result);\n}", "title": "" }, { "docid": "05a939edec02c71afce0d1eed1334ea6", "score": "0.5145969", "text": "function migrateFiles($journal = null, $conn = null) {\n\t\n\tif ($journal === null) {\n\t\tif ($conn === null) {\n\t\t\techo \"\\n-------- Connection with the database to migrate the files -----------\\n\";\n\t\t\techo \"\\n\";\n\t\t\t$conn = askAndConnect(); //from helperFunctions.php function #03\n\t\t}\n\t\t\n\t\t$journal = chooseJournal($conn); //from helperFunctions.php function #08\n\t}\n\t\n\techo \"\\n\\nFILES MIGRATION\\n\\n\";\n\t\n\t$filesOld = readline('Enter the location of the files_dir for the OLD OJS instalation: ');\n\t$filesNew = readline('Enter the location of the files_dir for the NEW OJS instalation: ');\n\t$copiedFiles = 0; // the number of copied files\n\t$fileErrors = array(); // array to store the errors while copying the files\n\t\n\t$dataMapping = getDataMapping($journal['path']); // from this script function #03\n\t\n\tif (is_array($dataMapping)) {\n\t\tprocessFiles($filesOld, $filesNew, $dataMapping, $copiedFiles, $fileErrors); // from this script function #04\n\t}\n\telse {\n\t\t//error when trying to get the data mapping\n\t\techo \"\\n\\nERROR: Could not copy the files to the new files directory.\\n\";\n\t\treturn 1;\n\t}\n\t\n\t\n\tif (!empty($fileErrors)) {\n\t\techo \"\\nErrors while copying:\\n\";\n\t\tprint_r($fileErrors);\n\t}\n\t\n\t$errorCount = count($fileErrors);\n\t\n\techo \"\\nNumber of copied files: $copiedFiles\\n\";\n\techo \"\\nNumber of errors: $errorCount\\n\";\n\t\n\treturn $errorCount;\n}", "title": "" }, { "docid": "9bb805a43c53e9a64dcbc685949c8d6f", "score": "0.51382464", "text": "function processMigrations()\r\n {\r\n $filesystem = new Filesystem;\r\n $project = $this->application->getProject();\r\n $migrations = $project->getPath('build php Storage Migration');\r\n if($filesystem->exists($migrations)) {\r\n $filesystem->remove($migrations);\r\n }\r\n $filesystem->mkdir($migrations);\r\n\r\n $finder = new Finder();\r\n\r\n if(!is_dir($project->getPath('resources php migrations'))) {\r\n return true;\r\n }\r\n\r\n $finder\r\n ->files()\r\n ->name(\"*.php\")\r\n ->in($project->getPath('resources php migrations'));\r\n\r\n foreach($finder as $file) {\r\n\r\n $date = substr($file->getFileName(), 0, 8);\r\n $time = substr($file->getFileName(), 9, 6);\r\n $index = substr($file->getBasename('.php'), 16);\r\n $name = String::convertToCamelCase($index);\r\n\r\n $class_name = $name . '_' . $date . '_' . $time;\r\n $class = 'Storage\\\\Migration\\\\' . $class_name;\r\n \r\n $filesystem->copy($file->getRealPath(), $migrations . DIRECTORY_SEPARATOR . $class_name . '.php');\r\n\r\n if(!class_exists($class)) {\r\n include $file->getRealPath();\r\n }\r\n $this->application->getManager()->get($class)->process($this);\r\n $this->setNamespace(null);\r\n }\r\n }", "title": "" }, { "docid": "f897ebeea3efeca9fa9e29a335f21af4", "score": "0.5137265", "text": "public static function syncFolders($folderToSync) {\n $debug = self::$debug;\n $mode = self::$mode;\n \n import('dao.Folder'); \n $folder = new Folder();\n \n import('dao.File');\n $file = new File();\n\n $folderFullName = $folderToSync['path'];\n $folderId = $folderToSync['fd_id'];\n\n // If folder is locked, ignore. Unless set mode greater than 0.\n if($folderToSync['locked'] && $mode == 0) {\n if($debug) ZDebug::my_echo('Ignore locked folder: ' . $folderFullName . '(' . $folderId . ')');\n return TRUE;\n }\n\n // Step 1: If folder is not physically exist, set to deleted in DB.\n if (!is_dir($folderFullName)) {\n $folder->deleteFolder($folderId);\n if($debug) ZDebug::my_echo ('Delete folder in DB: ' . $folderFullName . '(' . $folderId . ')');\n return TRUE;\n }\n\n // Step 2: Get the result set of files under this folder\n $filesInFolder = $folder->getFilesInFolder($folderId); \n $fileNameArr = array();\n foreach ($filesInFolder as $theFile) { \n // Step 3: If a file is not physically exist, delete it in table files.\n if(!file_exists($theFile['path'])) {\n $file->deleteFile($theFile['fid']);\n if($debug) ZDebug::my_echo ('Delete file in DB: ' . $theFile['path'] . '(' . $theFile['fid'] . ')');\n }\n // Step 4: If file exists but modified, update the file in table files.\n elseif($theFile['last_modified'] != my_filemtime($theFile['path'])) {\n $theFile['last_modified'] = my_filemtime($theFile['path']);\n $file->saveFile($theFile);\n if($debug) ZDebug::my_echo ('Update file in DB: ' . $theFile['path'] . '(' . $theFile['fid'] . ')');\n }\n elseif($mode > 1) {\n $file->saveFile($theFile);\n if($debug) ZDebug::my_echo ('Update file in DB: ' . $theFile['path'] . '(' . $theFile['fid'] . ')');\n }\n else {}\n $fileNameArr[] = $theFile['name'];\n }\n\n // Step 5: Get result set of sub-folders under this folder\n $subFoldera = $folder->getSubFolder($folderId);\n $folderNameArr = array();\n foreach ($subFoldera as $theFolder) {\n // Step 6: If a folder is not physically exist, set deleted flag in table folders.\n if(!file_exists($theFolder['path'])) {\n $folder->deleteFolder($theFolder['fd_id']);\n if($debug) ZDebug::my_echo ('Delete folder in DB: ' . $theFolder['path'] . '(' . $theFolder['fd_id'] . ')');\n }\n // Step 7: If folder exists but modified, update the folder in table folders.\n // and recursive call syncFolder\n elseif($theFolder['last_modified'] != my_filemtime($theFolder['path'])) {\n $theFolder['last_modified'] = my_filemtime($theFolder['path']);\n $folder->saveFolder($theFolder);\n if($debug) ZDebug::my_echo ('Update folder in DB: ' . $theFolder['path'] . '(' . $theFolder['fd_id'] . ')');\n self::syncFolders($theFolder);\n }\n else {\n self::syncFolders($theFolder);\n }\n $folderNameArr[] = $theFolder['name'];\n }\n\n $hdl=opendir($folderFullName); \n while($item = readdir($hdl)) { \n $itemFullName = $folderFullName . DIRECTORY_SEPARATOR . $item;\n\n // Step 8: If physical file is not in DB file result set, then add a file\n if (($item != \".\") && ($item != \"..\") && is_file($itemFullName) && !in_array($item, $fileNameArr)) {\n $file->saveFile(array('path'=>$itemFullName, 'fd_id'=>$folderId));\n if($debug>1) ZDebug::my_echo ('Adding new file in DB: ' . $itemFullName);\n }\n // Step 9: if physical folder is not in DB folder result set, then add a folder\n if(($item != \".\") && ($item != \"..\") && is_dir($itemFullName) && !in_array($item, $folderNameArr)) {\n self::addFolder($itemFullName, $folderId);\n }\n }\n closedir($hdl);\n\n }", "title": "" }, { "docid": "8899e1802399f075b1ea0c5909779c0c", "score": "0.51309705", "text": "private function importDbs()\n {\n $files = glob($this->storageDir . '*.sql'); // get all sql file names\n\n foreach($files as $sqlFile) {\n $this->logger->progressMessage('Importing ' . basename($sqlFile));\n \n if (filesize($sqlFile) > 100000000) { // 500 MB\n $this->splitAndImportFile($sqlFile);\n } else {\n $this->importDbFile($sqlFile);\n }\n\n $this->logger->completeMessage('Import complete'); \n }\n }", "title": "" }, { "docid": "c3bb26de9b2f18ac21511600c68709fe", "score": "0.512191", "text": "function BuildFileList ($files, $sourcedir, $ftp_server, $nocopylist = array ()) {\n\tglobal $history, $dofullupdate;\n\tglobal $testing;\t\n\n\t$DEBUG = 0;\n\t\n\t// $history is loaded at beginning with known data\n\t\n\t$filelist = array ();\n\tforeach ($files as $entry) {\n\t\t// parse entry\n\t\t$f = explode (\"\\t\", trim($entry));\n\t\t$file = trim($f[0]);\n\t\t\n\t\tif ($file[0] == \">\")\n\t\t\tcontinue;\n\n\t\tif (!file_exists (\"$sourcedir/$file\"))\n\t\t\tcontinue;\n\t\t\t\t\n\t\t$destination_file = $file;\n\t\t\n\t\t// if item is a directory\n\t\tif (is_dir(\"$sourcedir/$file\")) {\n\t\t\t$DEBUG && print \"<hr><i>Send directory: $sourcedir/$file</i><BR>\";\n\t\t\tisset($f[1]) ? $ncl = explode (\",\", $f[1]) : $ncl = array ();\n\t\t\t$nocopylist = array_merge ($nocopylist, $ncl);\n\t\t\tarray_walk ($nocopylist, 'trimME');\n\t\t\t$nocopylist && $DEBUG && print \"<i>No-copy list: \".join(\", \", $nocopylist).\"</i><br>\";\n\n\t\t\t$f2 = array ();\n\t\t\tforeach (glob (\"$sourcedir/$file/*\") as $f) {\n\t\t\t\t$f = trim ($f);\n\t\t\t\t$f = str_replace(\"$sourcedir/\", \"\", $f);\n\t\t\t\tif (!in_array(basename($f), $nocopylist)) {\n\t\t\t\t\t//$f = basename($f);\n\t\t\t\t\t$f2[] = $f;\n\t\t\t\t} else {\n\t\t\t\t\t$DEBUG && print \"<b>SKIPPING $f (in copy list)</b><BR>\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t$filelist = array_merge ($filelist, BuildFileList ($f2, $sourcedir, $ftp_server, $nocopylist));\n\t\t\t$DEBUG && print \"<hr>\";\n\t\t} else {\n\t\t\t$filename = str_replace($sourcedir, \"\", trim($file));\n\t\t\t// If mod date on the file is newer than last transfer, then send it again\n\t\t\t$lastTransfer = $history[$ftp_server][$filename] + 0;\n\t\t\t$change = filectime (\"$sourcedir/$file\") ;\n\t\t\tif ($dofullupdate || $change > $lastTransfer) {\n\t\t\t\t$DEBUG && print \"transfer --> $ftp_server/$file ($change > $lastTransfer)<BR>\";\n\t\t\t\t$filelist[] = $filename;\n\t\t\t\t!$testing && $history[$ftp_server][$filename] = time();\n\t\t\t} else {\n\t\t\t\t$DEBUG && print \"skip --> $ftp_server/$file<BR>\";\n\t\t\t}\n\t\t}\n\t}\n\treturn $filelist;\n}", "title": "" }, { "docid": "470589a168457fb1d2fddb44e7c44c2f", "score": "0.5111364", "text": "function directoryMove()\n{\n\tglobal $files;\n\n\tsecurityCheck();\n\t$basePath = getBasePath();\n\t$currentPath = getCurrentPath();\n\t$selectedItem = getSelectedItem();\n\t$pathname = getPathname();\n\t$files->directoryMove($basePath, $currentPath, $selectedItem, $pathname);\n\techo $files->buildDirectoryList($basePath, $currentPath, $_SESSION['courseMsg']);\n}", "title": "" }, { "docid": "08b3c9376c6a6290a39f0ec46194293b", "score": "0.510291", "text": "public function updateFileOrderWithinPage($fileList, $pageId)\n {\n foreach ($fileList as $index => $file) {\n File::where('uploaded_to', '=', $pageId)->where('id', '=', $file['id'])->update(['order' => $index]);\n }\n }", "title": "" }, { "docid": "10e8e318b143ad13e798550e7c13b25d", "score": "0.5100424", "text": "function dropOldDatabaseTableAndFiles() {\n\t\tglobal $wpdb;\n\n\t\t// todo: bisogna ripetere questo procedimento anche per prev_table_bannerize, quindi bisogna rifare una showtable\n\t\t// in modo da capire quale tabella c'è\n\t\t\n\t\t$sql = sprintf(\"SELECT * FROM `%s`\", $this->old_table_bannerize);\n\t\t$old = $wpdb->get_results($sql);\n\t\tforeach($old as $olditem) {\n\t\t\t@unlink( $olditem->realpath );\n\t\t}\n\t\t$this->dropOldDatabaseTable();\n\t\t?>\n\t\t\t<div class=\"wrap\">\n\t\t\t\t<div class=\"wp_saidmade_box\">\n\t\t\t\t\t<p class=\"wp_saidmade_copy_info\"><?php _e('For more info and plugins visit', 'wp-bannerize') ?> <a href=\"http://www.saidmade.com\">Saidmade</a></p>\n\t\t\t\t\t<a class=\"wp_saidmade_logo\" href=\"http://www.saidmade.com/prodotti/wordpress/wp-bannerize/\">\n\t\t\t\t\t\t<?php echo $this->plugin_name ?> ver. <?php echo $this->version ?>\n\t\t\t\t\t</a>\n\t\t\t\t</div>\n\t\t\t\t<h3 class=\"wp_bannerize_info\"><?php _e('Results','wp-bannerize') ?></h3>\n\t\t\t\t<p class=\"wp_bannerize_info\"><?php _e('Ok, ALL previous image file have been deleted succesfully. The old WP Bannerize Database table has been deleted.','wp-bannerize') ?></p>\n\t\t\t\t<form class=\"wp_bannerize_form_action\" method=\"post\" action=\"\">\n\t\t\t\t\t<input type=\"submit\" value=\"<?php _e('Continue', 'wp-bannerize') ?>\" />\n\t\t\t\t</form>\n\t\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "50e75938531f5d2aea90f5be66987cbe", "score": "0.50898004", "text": "function move_attachments_to_filepath()\r\n{\r\n global $ilance, $ilconfig, $phrase, $ilpage;\r\n \r\n $notice = '';\r\n \r\n $sql = $ilance->db->query(\"\r\n SELECT attachid, attachtype, filedata, filename\r\n FROM \" . DB_PREFIX . \"attachment\r\n ORDER BY attachid ASC\r\n \");\r\n if ($ilance->db->num_rows($sql) > 0)\r\n {\r\n $notice = '<ol>';\r\n while ($res = $ilance->db->fetch_array($sql))\r\n {\r\n $attachpath = fetch_attachment_path($res['attachtype']);\r\n $newfilehash = md5(uniqid(microtime()));\r\n $newfilename = $attachpath . $newfilehash . '.attach';\r\n \r\n // remove attachment from database and set the new file hash\r\n $ilance->db->query(\"\r\n UPDATE \" . DB_PREFIX . \"attachment\r\n SET filehash = '\" . $ilance->db->escape_string($newfilehash) . \"',\r\n filedata = ''\r\n WHERE attachid = '\" . $res['attachid'] . \"'\r\n \");\r\n \r\n // write the attachment to the file system\r\n $fp = @fopen($newfilename, \"wb\");\r\n fwrite($fp, $res['filedata']);\r\n @fclose($fp);\r\n \r\n $notice .= '<li>Moved <strong>' . $res['filename'] . ' to ' . $newfilename . '</strong></li>';\r\n }\r\n $notice .= '</ol>';\r\n }\r\n \r\n $ilance->db->query(\"\r\n UPDATE \" . DB_PREFIX . \"configuration\r\n SET value = '0'\r\n WHERE name = 'attachment_dbstorage'\r\n \");\r\n \r\n return $notice;\r\n}", "title": "" }, { "docid": "731f034c6fc14853b012b650b781a84a", "score": "0.5081541", "text": "private static function rotateLogs()\n {\t\n\t\tif(is_dir(self::$logDir))// id dir and exist\n\t\t{\t\t\t\n\t\t\t$ficheros = scandir(self::$logDir);\n\t\t\tforeach ($ficheros as $key => $value) \n\t\t\t{\n\t\t\t\tif (!in_array($value,array(\".\",\"..\"))) \n\t\t\t\t{\n\t\t\t\t\tif(strrpos($value,'old-') === false) // not contain 'old-' prefix\n\t\t\t\t\t{\n\t\t\t\t\t$file = self::$logDir . DIRECTORY_SEPARATOR . $value;\n\t\t\t\t\t$file2 = self::$logDir . DIRECTORY_SEPARATOR . 'old-' .$value;\n\t\t\t\t\t\n\t\t\t\t\t if(is_file($file))\n\t\t\t\t\t {\n\t\t\t\t\t\t if(filesize($file) > self::$logMaxSize )// if exceeds the max file size\n\t\t\t\t\t\t {\n\t\t\t\t\t\t\t if(file_exists($file2))// if exist a previous 'old-' file, deletes them\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t unlink($file2);\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t rename($file,$file2);// and create a new 'old-' file\n\t\t\t\t\t\t }\n\t\t\t\t\t }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} \n\n }", "title": "" }, { "docid": "ffd039bf6a430bad537130dd8592226f", "score": "0.507133", "text": "function filesToDatabase ($moduleId){\n\trequire 'database.php';\n\n/*--------extensions----------*/\n\t//get Labs files from moudule directory\n\t$Extensiondir= sprintf(\"/home/sithuaung/public_html/131website/resources/%s/extensions\",$moduleId);\n\t$Extensiondh= opendir($Extensiondir);\n\n\t// store all Labs files in an array\n\twhile (false !== ($filename = readdir($Extensiondh))) {\n\t\t$Extensionfiles[] = $filename;\n\t}\n\tsort($Extensionfiles);\n\n\t//loop through Labs files array and update each Labs file data to Database \n\tfor ($i= 2; $i< count($Extensionfiles); $i++){\n\t\t$stmt= $mysqli->prepare(\"insert into extensions (extension_name, extension_path, module_id) values (?, ?, ?)\");\n\t\tif (!$stmt){\n\t\t\tprintf(\"Query Prep Failed: %s\\n\", $mysqli->error);\n\t\t\texit;\n\t\t}\n\t $extension_path= sprintf(\"resources/%s/extensions/%s\",$moduleId,$Extensionfiles[$i]);\n\t\t$stmt->bind_param('sss', $Extensionfiles[$i], $extension_path, $moduleId);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}\n\n/*--------goals----------*/\n\t//get Labs files from moudule directory\n\t$Goaldir= sprintf(\"/home/sithuaung/public_html/131website/resources/%s/goals\",$moduleId);\n\t$Goaldh= opendir($Goaldir);\n\n\t// store all Labs files in an array\n\twhile (false !== ($filename = readdir($Goaldh))) {\n\t\t$Goalfiles[] = $filename;\n\t}\n\tsort($Goalfiles);\n\n\t//loop through Labs files array and update each Labs file data to Database \n\tfor ($i= 2; $i< count($Goalfiles); $i++){\n\t\t$stmt= $mysqli->prepare(\"insert into goals (goal_name, goal_path, module_id) values (?, ?, ?)\");\n\t\tif (!$stmt){\n\t\t\tprintf(\"Query Prep Failed: %s\\n\", $mysqli->error);\n\t\t\texit;\n\t\t}\n\t $goal_path= sprintf(\"resources/%s/goals/%s\",$moduleId,$Goalfiles[$i]);\n\t\t$stmt->bind_param('sss', $Goalfiles[$i], $goal_path, $moduleId);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}\n\n/*--------exericses----------*/\n\t//get Labs files from moudule directory\n\t$Exercisedir= sprintf(\"/home/sithuaung/public_html/131website/resources/%s/exercises\",$moduleId);\n\t$Exercisedh= opendir($Exercisedir);\n\n\t// store all Labs files in an array\n\twhile (false !== ($filename = readdir($Exercisedh))) {\n\t\t$Exercisefiles[] = $filename;\n\t}\n\tsort($Exercisefiles);\n\n\t//loop through Labs files array and update each Labs file data to Database \n\tfor ($i= 2; $i< count($Exercisefiles); $i++){\n\t\t$stmt= $mysqli->prepare(\"insert into exercises (exercise_name, exercise_path, module_id) values (?, ?, ?)\");\n\t\tif (!$stmt){\n\t\t\tprintf(\"Query Prep Failed: %s\\n\", $mysqli->error);\n\t\t\texit;\n\t\t}\n\t $exercise_path= sprintf(\"resources/%s/exercises/%s\",$moduleId,$Exercisefiles[$i]);\n\t\t$stmt->bind_param('sss', $Exercisefiles[$i], $exercise_path, $moduleId);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}\n\n/*--------studios----------*/\n\t//get Labs files from moudule directory\n\t$Studiodir= sprintf(\"/home/sithuaung/public_html/131website/resources/%s/studios\",$moduleId);\n\t$Studiodh= opendir($Studiodir);\n\n\t// store all Labs files in an array\n\twhile (false !== ($filename = readdir($Studiodh))) {\n\t\t$Studiofiles[] = $filename;\n\t}\n\tsort($Studiofiles);\n\n\t//loop through Labs files array and update each Labs file data to Database \n\tfor ($i= 2; $i< count($Studiofiles); $i++){\n\t\t$stmt= $mysqli->prepare(\"insert into studios (studio_name, studio_path, module_id) values (?, ?, ?)\");\n\t\tif (!$stmt){\n\t\t\tprintf(\"Query Prep Failed: %s\\n\", $mysqli->error);\n\t\t\texit;\n\t\t}\n\t $studio_path= sprintf(\"resources/%s/studios/%s\",$moduleId,$Studiofiles[$i]);\n\t\t$stmt->bind_param('sss', $Studiofiles[$i], $studio_path, $moduleId);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}\n\n/*--------Labs----------*/\n\t//get Labs files from moudule directory\n\t$Labdir= sprintf(\"/home/sithuaung/public_html/131website/resources/%s/labs\",$moduleId);\n\t$Labdh= opendir($Labdir);\n\n\t// store all Labs files in an array\n\twhile (false !== ($filename = readdir($Labdh))) {\n\t\t$Labfiles[] = $filename;\n\t}\n\tsort($Labfiles);\n\n\t//loop through Labs files array and update each Labs file data to Database \n\tfor ($i= 2; $i< count($Labfiles); $i++){\n\t\t$stmt= $mysqli->prepare(\"insert into labs (lab_name, lab_path, module_id) values (?, ?, ?)\");\n\t\tif (!$stmt){\n\t\t\tprintf(\"Query Prep Failed: %s\\n\", $mysqli->error);\n\t\t\texit;\n\t\t}\n\t $lab_path= sprintf(\"resources/%s/labs/%s\",$moduleId,$Labfiles[$i]);\n\t\t$stmt->bind_param('sss', $Labfiles[$i], $lab_path, $moduleId);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}\n\n/*--------Videos----------*/\n\t//get Video files from moudule directory\n\t$Videodir= sprintf(\"/home/sithuaung/public_html/131website/resources/%s/videos\",$moduleId);\n\t$Videodh= opendir($Videodir);\n\n\t// store all Video files in an array\n\twhile (false !== ($Videoname = readdir($Videodh))) {\n\t\t$Videofiles[] = $Videoname;\n\t}\n\tsort($Videofiles);\n\n\t//loop through Video files array and update each Video file data to Database \n\tfor ($i= 2; $i< count($Videofiles); $i++){\n\t\t$stmt= $mysqli->prepare(\"insert into videos (video_name, video_path,module_id) values (?, ?, ?)\");\n\t\tif (!$stmt){\n\t\t\tprintf(\"Query Prep Failed: %s\\n\", $mysqli->error);\n\t\t\texit;\n\t\t}\n\t $video_path= sprintf(\"resources/%s/videos/%s\",$moduleId,$Videofiles[$i]);\n\t\t$stmt->bind_param('sss', substr($Videofiles[$i], 0, -4), $video_path, $moduleId);\n\t\t$stmt->execute();\n\t\t$stmt->close();\n\t}\n}", "title": "" }, { "docid": "a368c38b00dc2de372846d9282695533", "score": "0.5065967", "text": "protected function persistFiles( array $fileIDs = array() ){\n $db = Loader::db();\n $fileIDs = array_unique($fileIDs);\n $db->Execute(\"DELETE FROM {$this->btTableSecondary} WHERE bID = ?\", array($this->bID));\n foreach( $fileIDs AS $orderIndex => $fileID ){\n $db->Execute(\"INSERT INTO {$this->btTableSecondary} (bID, fileID, displayOrder) VALUES(?,?,?)\", array(\n $this->bID, $fileID, ($orderIndex + 1)\n ));\n }\n }", "title": "" }, { "docid": "27a0e1299e696255b4b710bf79b7ded3", "score": "0.5062666", "text": "function bagithelpers_getFilesForAdd($page, $order) {\n $db = get_db();\n $fileTable = $db->getTable('File');\n\n $select = $fileTable->select()\n ->from(array('f' => $db->prefix . 'files'))\n ->columns(array('size', 'type' => 'type_os', 'name' => 'original_filename', 'parent_item' =>\n \"(SELECT text from `$db->ElementText` WHERE record_id = f.item_id AND element_id = 50)\"))\n ->limitPage($page, get_option('per_page_admin'))\n ->order($order);\n\n return $fileTable->fetchObjects($select);\n}", "title": "" }, { "docid": "8a8a2e1f064ad2e0447a4f2b35672ae0", "score": "0.50587857", "text": "public function runCron()\n\t{\n\t\t// Remove all old files before starting\n\t\t$this->deleteXMLFiles();\n\t\t$this->createXmls();\n\n\t\t// Get list of detail files\n\t\t$files = array_keys($this->detailFileNames);\n\n\t\t$this->moveFiles();\n\t}", "title": "" }, { "docid": "f2ebc77a9a47f0c49b6038b7cdfee25f", "score": "0.5046103", "text": "function cmsmasters_save_imgs_order() {\n global $wpdb;\n\n $order = explode(',', $_POST['order']);\n $counter = 0;\n\n foreach ($order as $img_id) {\n $wpdb->update($wpdb->posts, array('menu_order' => $counter), array('ID' => $img_id));\n\n $counter++;\n }\n\n die(1);\n}", "title": "" }, { "docid": "4b669e4e3aa0aa4dac1c6d8de7517baa", "score": "0.50407827", "text": "function deleteOldFiles (){\r\n$dir = \"../php_up\";\r\n$video_files = glob(\"$dir/*.{mp4,webm,ogg}\", GLOB_BRACE );//video files\r\n//print_r ($video_files);echo \"<br />\";\r\n$picture_files = glob(\"$dir/*.{jpg,jpeg,png}\", GLOB_BRACE);//pictures\r\n//print_r ($picture_files);echo \"<br />\";\r\n$text_files = glob(\"$dir/*.{txt,doc,docx}\", GLOB_BRACE);//all text files\r\n//print_r ($text_files);echo \"<br />\";\r\n\r\n//sort the arrays according to the date of modification\r\n$new_vid = sortByDate($video_files);\r\n$new_img = sortByDate($picture_files);\r\n$new_text = sortByDate($text_files);\r\n\r\n$cnt = count($video_files);\r\n\r\n//delete oldest files if there are more than 5 files in the folder\r\nif($cnt>4){\r\nunlink(end($new_vid));\r\nunlink(end($new_img));\r\nunlink(end($new_text));\r\n}\r\n}", "title": "" }, { "docid": "0091e018f1b764a17d97e1fa329dbc68", "score": "0.50355554", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_extra_files_sent_to_c() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_fetch_job_extra_files_to_c_fids';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "3b1cf663d53be7fd40b56de462067a6b", "score": "0.5022618", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_job_feedback_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_job_feedback_files';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "bdc549c373ce3dafc976905af41c92ea", "score": "0.50200444", "text": "function moveOrders_postMoveOrder(&$orderdata,&$detaildata) {\n\t\t$mailkind = 0;\n\t\t$this->processOrdermails($orderdata,$detaildata,$mailkind);\n\t}", "title": "" }, { "docid": "eb4623632d9d0fb9e2e0cb6e0d21cf4e", "score": "0.5016034", "text": "function migrateData() {\n\n $database =& JFactory::getDBO();\n $msg = JText::_('EZREALTY_DATA_MIGRATED');\n $app = &JFactory::getApplication();\n\n\n\n\t\t# migrate the shortlist data from the old table into the J3.0x EZ Realty shortlist table\n\n\t\t$query = \"INSERT INTO #__ezrealty_lightbox ( id, uid, propid, date ) SELECT id, uid, propid, date FROM #__ezrealty_lightbox_old\";\n\t\t$database->setQuery($query);\n\t\t$database->query();\n\n\n\t\t# migrate the image data from the old table into the J3.0x EZ Realty images table\n\n\n\n # find out if the new images table has been created\n\n\t\t$imgtable = $app->getCfg('dbprefix').\"ezrealty_images_old\";\n\n\n\t\t$database->setQuery( \"SHOW TABLES LIKE '\".$imgtable.\"'\" );\n\t\t$rows = $database->loadObjectList();\n\n\t\tif ($rows){\n\n\t\t\t$query = \"INSERT INTO #__ezrealty_images (propid, fname, title, description, path, rets_source, ordering) SELECT propid, fname, title, description, path, rets_source, ordering FROM #__ezrealty_images_old\";\n\t\t\t$database->setQuery($query);\n\t\t\t$database->query();\n\n\t\t} else {\n\n\t\t\t// we need to transfer the images from the old #__ezrealty table into the new images table\n\t\t\t//query the EZ Realty database and find all of the properties\n\n\t\t\t$query = \"SELECT * FROM #__ezrealty_old\";\n\t\t\t$database->setQuery( $query );\n\t\t\t$rows = $database->loadObjectList();\n\n\t\t\tforeach($rows as $row) {\n\n\t\t\t//while looping through the listings - check images 1-24 and insert their details into the new EZ Realty images table\n\n\t\t\t\tfor($i=1; $i < 24+1; $i++){\n\t\t\t\t\t$cur_img=\"image\".$i;\n\t\t\t\t\t$img_desc=\"image\".$i.\"desc\";\n\n\t \t\tif($row->$cur_img){\n\t \t\t\t$query = ' INSERT INTO #__ezrealty_images SET ';\n\t \t\t\t$query .= ' propid = '.intval($row->id);\n\t \t\t\t$query .= ', fname = \"'.$row->$cur_img.'\"'; \t\t\t\n\t \t\t\t$query .= ', title = \"'.$row->$img_desc.'\"'; \t\t\t\n\t \t\t\t$query .= ', ordering = \"'.intval($i).'\"';\n\t \t\t\t$database->setQuery($query);\t \t\t\t\n\t \t\t\t$database->Query();\n\t \t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\n\t\t#\tmigrate the categories\n\n\t\t$query = \"SELECT * FROM #__ezrealty_catg_old\";\n\t\t$database->setQuery( $query );\n\t\t$rows = $database->loadObjectList();\n\n\t\tif ($rows) {\n\n\t\t\t$k = 0;\n\t\t\tfor ($i=0, $n=count( $rows ); $i < $n; $i++) {\n\t\t\t\t$row = $rows[$i];\n\n\t\t\t\tif ( !$row->alias ) {\n\t\t\t\t\t$alias = $row->name;\n\t\t\t\t\t$thealias = JApplication::stringURLSafe($alias);\n\t\t\t\t} else {\n\t\t\t\t\t$thealias = $row->alias;\n\t\t\t\t}\n\n\t\t\t\t$database->setQuery(\"INSERT INTO `#__ezrealty_catg` ( \n\t\t\t\t`id` , `name` , `alias` , `description` , `image` , `metadesc` , `metakey` , `access` , `published` , `language` , `checked_out` , `checked_out_time` , `ordering` \n\t\t\t\t) VALUES (\n\t\t\t\t'\".addslashes($row->id).\"', '\".addslashes($row->name).\"', '\".addslashes($thealias).\"', '\".addslashes($row->description).\"', '\".addslashes($row->image).\"', '', '', '\".addslashes($row->access).\"', '\".addslashes($row->published).\"', '\".addslashes($row->language).\"', '\".addslashes($row->checked_out).\"', '\".addslashes($row->checked_out_time).\"', '\".addslashes($row->ordering).\"')\");\n\t\t\t\t$database->query();\n\t\t\t}\n\t\t}\n\n\n\t\t#\tmigrate the suburbs\n\n\t\t$query = \"SELECT * FROM #__ezrealty_locality_old\";\n\t\t$database->setQuery( $query );\n\t\t$rows = $database->loadObjectList();\n\n\t\tif ($rows) {\n\n\t\t\t$k = 0;\n\t\t\tfor ($i=0, $n=count( $rows ); $i < $n; $i++) {\n\t\t\t\t$row = $rows[$i];\n\n\t\t\t\t$alias = $row->ezcity;\n\t\t\t\t$thealias = JApplication::stringURLSafe($alias);\n\n\t\t\t\t$database->setQuery(\"INSERT INTO `#__ezrealty_locality` ( \n\t\t\t\t`id` , `stateid` , `ezcity` , `alias` , `postcode` , `declat` , `declong` , `zoom` , `owncoords` , `image` , `ezcity_desc` , `metadesc` , `metakey` , `published` , `language` , `checked_out` , `checked_out_time` , `ordering` \n\t\t\t\t) VALUES (\n\t\t\t\t'\".addslashes($row->id).\"', '\".addslashes($row->stateid).\"', '\".addslashes($row->ezcity).\"', '\".addslashes($thealias).\"', '', '', '', '', '', '\".addslashes($row->image).\"', '\".addslashes($row->ezcity_desc).\"', '', '', '\".addslashes($row->published).\"', '\".addslashes($row->language).\"', '\".addslashes($row->checked_out).\"', '\".addslashes($row->checked_out_time).\"', '\".addslashes($row->ordering).\"')\");\n\t\t\t\t$database->query();\n\t\t\t}\n\t\t}\n\n\n\t\t#\tmigrate the states\n\n\t\t$query = \"SELECT * FROM #__ezrealty_state_old\";\n\t\t$database->setQuery( $query );\n\t\t$rows = $database->loadObjectList();\n\n\t\tif ($rows) {\n\n\t\t\t$k = 0;\n\t\t\tfor ($i=0, $n=count( $rows ); $i < $n; $i++) {\n\t\t\t\t$row = $rows[$i];\n\n\t\t\t\t$alias = $row->name;\n\t\t\t\t$thealias = JApplication::stringURLSafe($alias);\n\n\t\t\t\t$database->setQuery(\"INSERT INTO `#__ezrealty_state` ( \n\t\t\t\t`id` , `countid` , `name` , `alias` , `declat` , `declong` , `metadesc` , `metakey` , `owncoords` , `published` , `language` , `checked_out` , `checked_out_time` , `ordering` \n\t\t\t\t) VALUES (\n\t\t\t\t'\".addslashes($row->id).\"', '\".addslashes($row->countid).\"', '\".addslashes($row->name).\"', '\".addslashes($thealias).\"', '', '', '', '', '', '\".addslashes($row->published).\"', '\".addslashes($row->language).\"', '\".addslashes($row->checked_out).\"', '\".addslashes($row->checked_out_time).\"', '\".addslashes($row->ordering).\"')\");\n\t\t\t\t$database->query();\n\t\t\t}\n\t\t}\n\n\n\t\t#\tmigrate the countries\n\n\t\t$query = \"SELECT * FROM #__ezrealty_country_old\";\n\t\t$database->setQuery( $query );\n\t\t$rows = $database->loadObjectList();\n\n\t\tif ($rows) {\n\n\t\t\t$k = 0;\n\t\t\tfor ($i=0, $n=count( $rows ); $i < $n; $i++) {\n\t\t\t\t$row = $rows[$i];\n\n\t\t\t\t$alias = $row->name;\n\t\t\t\t$thealias = JApplication::stringURLSafe($alias);\n\n\t\t\t\t$database->setQuery(\"INSERT INTO `#__ezrealty_country` ( \n\t\t\t\t`id` , `name` , `alias` , `declat` , `declong` , `owncoords` , `published` , `language` , `checked_out` , `checked_out_time` , `ordering` \n\t\t\t\t) VALUES (\n\t\t\t\t'\".addslashes($row->id).\"', '\".addslashes($row->name).\"', '\".addslashes($thealias).\"', '', '', '', '\".addslashes($row->published).\"', '\".addslashes($row->language).\"', '\".addslashes($row->checked_out).\"', '\".addslashes($row->checked_out_time).\"', '\".addslashes($row->ordering).\"')\");\n\t\t\t\t$database->query();\n\t\t\t}\n\t\t}\n\n\n\t\t#\tmigrate the old EZ Realty profile information into EZ Portal table\n\n\n\t\t$query = \"SELECT * FROM #__ezrealty_profile_old\";\n\t\t$database->setQuery( $query );\n\t\t$rows = $database->loadObjectList();\n\n\t\tif ($rows) {\n\n\t\t\t$k = 0;\n\t\t\tfor ($i=0, $n=count( $rows ); $i < $n; $i++) {\n\t\t\t\t$row = $rows[$i];\n\n\t\t\t\t$alias = $row->dealer_name;\n\t\t\t\t$thealias = JApplication::stringURLSafe($alias);\n\n\t\t\t\t$database->setQuery(\"INSERT INTO `#__ezportal` (`id` , `alias` , `uid` , `cid` , `seller_name` ,\n\t\t\t\t`seller_company` , `job_title` , `seller_info` , `seller_bio` , `seller_unitnum` , \n\t\t\t\t`seller_address1` , `seller_address2` , `seller_suburb` , `seller_pcode` , `seller_state` , \n\t\t\t\t`seller_country` , `show_addy` , `seller_declat` , `seller_declong` , `seller_email` , \n\t\t\t\t`seller_phone` , `seller_fax` , `seller_mobile` , `seller_sms` , `show_sms` , \n\t\t\t\t`seller_exempt` , `seller_unlimited` , `feat_upgr` , `publish_own` , `reset_own` , \n\t\t\t\t`seller_fbook` , `seller_twitter` , `seller_pinterest` , `seller_linkedin` , `seller_youtube` , \n\t\t\t\t`seller_msn` , `seller_skype` , `seller_ymsgr` , `seller_icq` , `seller_web` , \n\t\t\t\t`seller_blog` , `seller_image` , `seller_logo` , `seller_banner` , `seller_pdfbkgr` , \n\t\t\t\t`seller_pdf` , `calcown` , `featured` , `metadesc` , `metakey` , \n\t\t\t\t`published` , `rets_source` , `listdate` , `lastupdate` , `checked_out` , \n\t\t\t\t`checked_out_time` , `ordering`) VALUES ('\".addslashes($row->id).\"' , '\".addslashes($thealias).\"' , '\".addslashes($row->mid).\"' , '' , '\".addslashes($row->dealer_name).\"' , \n\t\t\t\t'\".addslashes($row->dealer_company).\"', '', '\".addslashes($row->dealer_info).\"', '\".addslashes($row->dealer_bio).\"', '\".addslashes($row->dealer_unitnum).\"', \n\t\t\t\t'\".addslashes($row->dealer_address1).\"', '\".addslashes($row->dealer_address2).\"', '\".addslashes($row->dealer_locality).\"', '\".addslashes($row->dealer_pcode).\"', '\".addslashes($row->dealer_state).\"', \n\t\t\t\t'\".addslashes($row->dealer_country).\"', '\".addslashes($row->show_addy).\"', '\".addslashes($row->dealer_declat).\"', '\".addslashes($row->dealer_declong).\"', '\".addslashes($row->dealer_email).\"', \n\t\t\t\t'\".addslashes($row->dealer_phone).\"', '\".addslashes($row->dealer_fax).\"', '\".addslashes($row->dealer_mobile).\"', '' , '' , \n\t\t\t\t'\".addslashes($row->dealer_exempt).\"', '', '\".addslashes($row->feat_upgr).\"', '\".addslashes($row->publish_own).\"', '\".addslashes($row->reset_own).\"', \n\t\t\t\t'' , '' , '' , '' , '' , \n\t\t\t\t'' , '\".addslashes($row->dealer_skype).\"', '\".addslashes($row->dealer_ymsgr).\"', '\".addslashes($row->dealer_icq).\"', '\".addslashes($row->dealer_web).\"', \n\t\t\t\t'\".addslashes($row->dealer_blog).\"', '\".addslashes($row->dealer_image).\"', '\".addslashes($row->logo_image).\"', '\".addslashes($row->page_topper).\"', '', \n\t\t\t\t'\".addslashes($row->pdf_promo).\"' , '' , '' , '' , '' , \n\t\t\t\t'\".addslashes($row->published).\"' , '' , '' , '' , '' , \n\t\t\t\t'','' )\");\n\t\t\t\t$database->query();\n\n\t\t\t}\n\t\t}\n\n\n\n\t\t#\tupdate the empty listdate and lastupdate values\n\n $listdate = date(\"Y-m-d\");\n\t\t\t$lastupdate=date(\"Y-m-d H:i:s\");\n\n\n\t\t\t$database->setQuery(\"UPDATE #__ezportal SET #__ezportal.listdate = '$listdate' WHERE #__ezportal.listdate = '0000-00-00'\");\n\t\t\t$database->query();\n\n\t\t\t$database->setQuery(\"UPDATE #__ezportal SET #__ezportal.lastupdate = '$lastupdate' WHERE #__ezportal.lastupdate = '0000-00-00 00:00:00'\");\n\t\t\t$database->query();\n\n\n\n\n\t\t#\tmigrate the properties\n\n\t\t$query = \"SELECT * FROM #__ezrealty_old\";\n\t\t$database->setQuery( $query );\n\t\t$rows = $database->loadObjectList();\n\n\t\tif ($rows) {\n\n\t\t\t$k = 0;\n\t\t\tfor ($i=0, $n=count( $rows ); $i < $n; $i++) {\n\t\t\t\t$row = $rows[$i];\n\n\t\t\t\tif ($row->pool){\n\t\t\t\t\t$pool = JText::_('EZREALTY_APF1').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$pool = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->fplace){\n\t\t\t\t\t$fplace = JText::_('EZREALTY_APF2').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$fplace = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->bbq){\n\t\t\t\t\t$bbq = JText::_('EZREALTY_APF3').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$bbq = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->gazebo){\n\t\t\t\t\t$gazebo = JText::_('EZREALTY_APF4').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$gazebo = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->lug){\n\t\t\t\t\t$lug = JText::_('EZREALTY_APF5').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$lug = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->bir){\n\t\t\t\t\t$bir = JText::_('EZREALTY_APF6').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$bir = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->heating){\n\t\t\t\t\t$heating = JText::_('EZREALTY_APF7').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$heating = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->airco){\n\t\t\t\t\t$airco = JText::_('EZREALTY_APF8').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$airco = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->shops){\n\t\t\t\t\t$shops = JText::_('EZREALTY_APF9').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$shops = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->schools){\n\t\t\t\t\t$schools = JText::_('EZREALTY_APF10').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$schools = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->elevator){\n\t\t\t\t\t$elevator = JText::_('EZREALTY_APF12').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$elevator = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra1){\n\t\t\t\t\t$extra1 = JText::_('EZREALTY_APF13').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra1 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra2){\n\t\t\t\t\t$extra2 = JText::_('EZREALTY_APF14').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra2 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra3){\n\t\t\t\t\t$extra3 = JText::_('EZREALTY_APF15').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra3 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra4){\n\t\t\t\t\t$extra4 = JText::_('EZREALTY_APF16').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra4 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra5){\n\t\t\t\t\t$extra5 = JText::_('EZREALTY_APF17').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra5 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra6){\n\t\t\t\t\t$extra6 = JText::_('EZREALTY_APF18').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra6 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra7){\n\t\t\t\t\t$extra7 = JText::_('EZREALTY_APF19').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra7 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->extra8){\n\t\t\t\t\t$extra8 = JText::_('EZREALTY_APF20').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$extra8 = \"\";\n\t\t\t\t}\n\t\t\t\tif ($row->pets){\n\t\t\t\t\t$pets = JText::_('EZREALTY_APF11').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$pets = \"\";\n\t\t\t\t}\n\t\t\t\tif ( $row->furnished==1 ) {\n\t\t\t\t\t$furnished = JText::_('EZREALTY_FURNISHED2').\";\";\n\t\t\t\t} else if ( $row->furnished==2 ) {\n\t\t\t\t\t$furnished = JText::_('EZREALTY_FURNISHED3').\";\";\n\t\t\t\t} else if ( $row->furnished==3 ) {\n\t\t\t\t\t$furnished = JText::_('EZREALTY_FURNISHED4').\";\";\n\t\t\t\t} else {\n\t\t\t\t\t$furnished = \"\";\n\t\t\t\t}\n\n\t\t\t\tif ( !$row->alias ) {\n\t\t\t\t\t$alias = $row->adline;\n\t\t\t\t\t$thealias = JApplication::stringURLSafe($alias);\n\t\t\t\t} else {\n\t\t\t\t\t$thealias = $row->alias;\n\t\t\t\t}\n\n\t\t\t\t$appliances = \"\";\n\t\t\t\t$indoorfeatures = $fplace.$bir.$furnished;\n\t\t\t\t$outdoorfeatures = $pool.$bbq.$gazebo.$lug;\n\t\t\t\t$buildingfeatures = $heating.$airco.$elevator.$pets;\n\t\t\t\t$communityfeatures = $shops.$schools;\n\t\t\t\t$otherfeatures = $extra1.$extra2.$extra3.$extra4.$extra5.$extra6.$extra7.$extra8;\n\n\t\t\t\tif ($row->vidtype == 1){\n\t\t\t\t\t$mediaUrl = $row->vtour;\n\t\t\t\t\t$mediaType = \"1\";\n\t\t\t\t} else {\n\t\t\t\t\t$mediaUrl = \"\";\n\t\t\t\t\t$mediaType = \"0\";\n\t\t\t\t}\n\n\n\t\t\t\t$id = isset($row->id) ? $row->id : '';\n\t\t\t\t$type = isset($row->type) ? $row->type : '';\n\t\t\t\t$rent_type = isset($row->rent_type) ? $row->rent_type : '';\n\t\t\t\t$cid = isset($row->cid) ? $row->cid : '';\n\t\t\t\t$locid = isset($row->locid) ? $row->locid : '';\n\t\t\t\t$stid = isset($row->stid) ? $row->stid : '';\n\t\t\t\t$cnid = isset($row->cnid) ? $row->cnid : '';\n\t\t\t\t$soleAgency = isset($row->soleAgency) ? $row->soleAgency : '';\n\t\t\t\t$bldg_name = isset($row->bldg_name) ? $row->bldg_name : '';\n\t\t\t\t$unit_num = isset($row->unit_num) ? $row->unit_num : '';\n\n\t\t\t\t$lot_num = isset($row->lot_num) ? $row->lot_num : '';\n\t\t\t\t$street_num = isset($row->street_num) ? $row->street_num : '';\n\t\t\t\t$address2 = isset($row->address2) ? $row->address2 : '';\n\t\t\t\t$postcode = isset($row->postcode) ? $row->postcode : '';\n\t\t\t\t$county = isset($row->county) ? $row->county : '';\n\t\t\t\t$locality = isset($row->locality) ? $row->locality : '';\n\t\t\t\t$state = isset($row->state) ? $row->state : '';\n\t\t\t\t$country = isset($row->country) ? $row->country : '';\n\t\t\t\t$viewad = isset($row->viewad) ? $row->viewad : '';\n\t\t\t\t$owncoords = isset($row->owncoords) ? $row->owncoords : '';\n\n\t\t\t\t$price = isset($row->price) ? $row->price : '';\n\t\t\t\t$offpeak = isset($row->offpeak) ? $row->offpeak : '';\n\t\t\t\t$showprice = isset($row->showprice) ? $row->showprice : '';\n\t\t\t\t$freq = isset($row->freq) ? $row->freq : '';\n\t\t\t\t$bond = isset($row->bond) ? $row->bond : '';\n\t\t\t\t$closeprice = isset($row->closeprice) ? $row->closeprice : '';\n\t\t\t\t$priceview = isset($row->priceview) ? $row->priceview : '';\n\t\t\t\t$year = isset($row->year) ? $row->year : '';\n\t\t\t\t$yearRemodeled = isset($row->yearRemodeled) ? $row->yearRemodeled : '';\n\t\t\t\t$houseStyle = isset($row->houseStyle) ? $row->houseStyle : '';\n\n\t\t\t\t$houseConstruction = isset($row->houseConstruction) ? $row->houseConstruction : '';\n\t\t\t\t$exteriorFinish = isset($row->exteriorFinish) ? $row->exteriorFinish : '';\n\t\t\t\t$roof = isset($row->roof) ? $row->roof : '';\n\t\t\t\t$flooring = isset($row->flooring) ? $row->flooring : '';\n\t\t\t\t$porchPatio = isset($row->porchPatio) ? $row->porchPatio : '';\n\t\t\t\t$landtype = isset($row->landtype) ? $row->landtype : '';\n\t\t\t\t$frontage = isset($row->frontage) ? $row->frontage : '';\n\t\t\t\t$depth = isset($row->depth) ? $row->depth : '';\n\t\t\t\t$subdivision = isset($row->subdivision) ? $row->subdivision : '';\n\t\t\t\t$LandAreaSqFt = isset($row->LandAreaSqFt) ? $row->LandAreaSqFt : '';\n\n\t\t\t\t$AcresTotal = isset($row->AcresTotal) ? $row->AcresTotal : '';\n\t\t\t\t$LotDimensions = isset($row->LotDimensions) ? $row->LotDimensions : '';\n\t\t\t\t$bedrooms = isset($row->bedrooms) ? $row->bedrooms : '';\n\t\t\t\t$sleeps = isset($row->sleeps) ? $row->sleeps : '';\n\t\t\t\t$totalrooms = isset($row->totalrooms) ? $row->totalrooms : '';\n\t\t\t\t$otherrooms = isset($row->otherrooms) ? $row->otherrooms : '';\n\t\t\t\t$livingarea = isset($row->livingarea) ? $row->livingarea : '';\n\t\t\t\t$bathrooms = isset($row->bathrooms) ? $row->bathrooms : '';\n\t\t\t\t$fullBaths = isset($row->fullBaths) ? $row->fullBaths : '';\n\t\t\t\t$thqtrBaths = isset($row->thqtrBaths) ? $row->thqtrBaths : '';\n\n\t\t\t\t$halfBaths = isset($row->halfBaths) ? $row->halfBaths : '';\n\t\t\t\t$qtrBaths = isset($row->qtrBaths) ? $row->qtrBaths : '';\n\t\t\t\t$ensuite = isset($row->ensuite) ? $row->ensuite : '';\n\t\t\t\t$parking = isset($row->parking) ? $row->parking : '';\n\t\t\t\t$garageDescription = isset($row->garageDescription) ? $row->garageDescription : '';\n\t\t\t\t$parkingGarage = isset($row->parkingGarage) ? $row->parkingGarage : '';\n\t\t\t\t$parkingCarport = isset($row->parkingCarport) ? $row->parkingCarport : '';\n\t\t\t\t$stories = isset($row->stories) ? $row->stories : '';\n\t\t\t\t$declat = isset($row->declat) ? $row->declat : '';\n\t\t\t\t$declong = isset($row->declong) ? $row->declong : '';\n\n\t\t\t\t$adline = isset($row->adline) ? $row->adline : '';\n\t\t\t\t//$alias = isset($row->alias) ? $row->alias : '';\n\t\t\t\t$propdesc = isset($row->propdesc) ? $row->propdesc : '';\n\t\t\t\t$smalldesc = isset($row->smalldesc) ? $row->smalldesc : '';\n\t\t\t\t$panorama = isset($row->panorama) ? $row->panorama : '';\n\t\t\t\t//$mediaUrl = isset($row->mediaUrl) ? $row->mediaUrl : '';\n\t\t\t\t//$mediaType = isset($row->mediaType) ? $row->mediaType : '';\n\t\t\t\t$pdfinfo1 = isset($row->pdfinfo1) ? $row->pdfinfo1 : '';\n\t\t\t\t$pdfinfo2 = isset($row->pdfinfo2) ? $row->pdfinfo2 : '';\n\t\t\t\t$epc1 = isset($row->epc1) ? $row->epc1 : '';\n\n\t\t\t\t$epc2 = isset($row->epc2) ? $row->epc2 : '';\n\t\t\t\t$flpl1 = isset($row->flpl1) ? $row->flpl1 : '';\n\t\t\t\t$flpl2 = isset($row->flpl2) ? $row->flpl2 : '';\n\t\t\t\t$ctown = isset($row->ctown) ? $row->ctown : '';\n\t\t\t\t$ctport = isset($row->ctport) ? $row->ctport : '';\n\t\t\t\t$schooldist = isset($row->schooldist) ? $row->schooldist : '';\n\t\t\t\t$preschool = isset($row->preschool) ? $row->preschool : '';\n\t\t\t\t$primaryschool = isset($row->primaryschool) ? $row->primaryschool : '';\n\t\t\t\t$highschool = isset($row->highschool) ? $row->highschool : '';\n\t\t\t\t$university = isset($row->university) ? $row->university : '';\n\n\t\t\t\t$hofees = isset($row->hofees) ? $row->hofees : '';\n\t\t\t\t$AnnualInsurance = isset($row->AnnualInsurance) ? $row->AnnualInsurance : '';\n\t\t\t\t$TaxAnnual = isset($row->TaxAnnual) ? $row->TaxAnnual : '';\n\t\t\t\t$TaxYear = isset($row->TaxYear) ? $row->TaxYear : '';\n\t\t\t\t$Utlities = isset($row->Utlities) ? $row->Utlities : '';\n\t\t\t\t$ElectricService = isset($row->ElectricService) ? $row->ElectricService : '';\n\t\t\t\t$AverageUtilElec = isset($row->AverageUtilElec) ? $row->AverageUtilElec : '';\n\t\t\t\t$AverageUtilHeat = isset($row->AverageUtilHeat) ? $row->AverageUtilHeat : '';\n\t\t\t\t$BasementAndFoundation = isset($row->BasementAndFoundation) ? $row->BasementAndFoundation : '';\n\t\t\t\t$BasementSize = isset($row->BasementSize) ? $row->BasementSize : '';\n\n\t\t\t\t$BasementPctFinished = isset($row->BasementPctFinished) ? $row->BasementPctFinished : '';\n\t\t\t\t//$appliances = isset($row->appliances) ? $row->appliances : '';\n\t\t\t\t//$indoorfeatures = isset($row->indoorfeatures) ? $row->indoorfeatures : '';\n\t\t\t\t//$outdoorfeatures = isset($row->outdoorfeatures) ? $row->outdoorfeatures : '';\n\t\t\t\t//$buildingfeatures = isset($row->buildingfeatures) ? $row->buildingfeatures : '';\n\t\t\t\t//$communityfeatures = isset($row->communityfeatures) ? $row->communityfeatures : '';\n\t\t\t\t//$otherfeatures = isset($row->otherfeatures) ? $row->otherfeatures : '';\n\t\t\t\t$CovenantsYN = isset($row->CovenantsYN) ? $row->CovenantsYN : '';\n\t\t\t\t$PhoneAvailableYN = isset($row->PhoneAvailableYN) ? $row->PhoneAvailableYN : '';\n\t\t\t\t$GarbageDisposalYN = isset($row->GarbageDisposalYN) ? $row->GarbageDisposalYN : '';\n\n\t\t\t\t$RefrigeratorYN = isset($row->RefrigeratorYN) ? $row->RefrigeratorYN : '';\n\t\t\t\t$OvenYN = isset($row->OvenYN) ? $row->OvenYN : '';\n\t\t\t\t$FamilyRoomPresent = isset($row->FamilyRoomPresent) ? $row->FamilyRoomPresent : '';\n\t\t\t\t$LaundryRoomPresent = isset($row->LaundryRoomPresent) ? $row->LaundryRoomPresent : '';\n\t\t\t\t$KitchenPresent = isset($row->KitchenPresent) ? $row->KitchenPresent : '';\n\t\t\t\t$LivingRoomPresent = isset($row->LivingRoomPresent) ? $row->LivingRoomPresent : '';\n\t\t\t\t$ParkingSpaceYN = isset($row->ParkingSpaceYN) ? $row->ParkingSpaceYN : '';\n\t\t\t\t$custom1 = isset($row->custom1) ? $row->custom1 : '';\n\t\t\t\t$custom2 = isset($row->custom2) ? $row->custom2 : '';\n\t\t\t\t$custom3 = isset($row->custom3) ? $row->custom3 : '';\n\n\t\t\t\t$custom4 = isset($row->custom4) ? $row->custom4 : '';\n\t\t\t\t$custom5 = isset($row->custom5) ? $row->custom5 : '';\n\t\t\t\t$custom6 = isset($row->custom6) ? $row->custom6 : '';\n\t\t\t\t$custom7 = isset($row->custom7) ? $row->custom7 : '';\n\t\t\t\t$custom8 = isset($row->custom8) ? $row->custom8 : '';\n\t\t\t\t$takings = isset($row->takings) ? $row->takings : '';\n\t\t\t\t$returns = isset($row->returns) ? $row->returns : '';\n\t\t\t\t$netprofit = isset($row->netprofit) ? $row->netprofit : '';\n\t\t\t\t$bustype = isset($row->bustype) ? $row->bustype : '';\n\t\t\t\t$bussubtype = isset($row->bussubtype) ? $row->bussubtype : '';\n\n\t\t\t\t$stock = isset($row->stock) ? $row->stock : '';\n\t\t\t\t$fixtures = isset($row->fixtures) ? $row->fixtures : '';\n\t\t\t\t$fittings = isset($row->fittings) ? $row->fittings : '';\n\t\t\t\t$squarefeet = isset($row->squarefeet) ? $row->squarefeet : '';\n\t\t\t\t$SqFtLower = isset($row->SqFtLower) ? $row->SqFtLower : '';\n\t\t\t\t$SqFtMainLevel = isset($row->SqFtMainLevel) ? $row->SqFtMainLevel : '';\n\t\t\t\t$SqFtUpper = isset($row->SqFtUpper) ? $row->SqFtUpper : '';\n\t\t\t\t$percentoffice = isset($row->percentoffice) ? $row->percentoffice : '';\n\t\t\t\t$percentwarehouse = isset($row->percentwarehouse) ? $row->percentwarehouse : '';\n\t\t\t\t$loadingfac = isset($row->loadingfac) ? $row->loadingfac : '';\n\n\t\t\t\t$fencing = isset($row->fencing) ? $row->fencing : '';\n\t\t\t\t$rainfall = isset($row->rainfall) ? $row->rainfall : '';\n\t\t\t\t$soiltype = isset($row->soiltype) ? $row->soiltype : '';\n\t\t\t\t$grazing = isset($row->grazing) ? $row->grazing : '';\n\t\t\t\t$cropping = isset($row->cropping) ? $row->cropping : '';\n\t\t\t\t$irrigation = isset($row->irrigation) ? $row->irrigation : '';\n\t\t\t\t$waterresources = isset($row->waterresources) ? $row->waterresources : '';\n\t\t\t\t$carryingcap = isset($row->carryingcap) ? $row->carryingcap : '';\n\t\t\t\t$storage = isset($row->storage) ? $row->storage : '';\n\t\t\t\t$services = isset($row->services) ? $row->services : '';\n\n\t\t\t\t$currency_position = isset($row->currency_position) ? $row->currency_position : '';\n\t\t\t\t$currency = isset($row->currency) ? $row->currency : '';\n\t\t\t\t$currency_format = isset($row->currency_format) ? $row->currency_format : '';\n\t\t\t\t$schoolprof = isset($row->schoolprof) ? $row->schoolprof : '';\n\t\t\t\t$hoodprof = isset($row->hoodprof) ? $row->hoodprof : '';\n\t\t\t\t$openhouse = isset($row->openhouse) ? $row->openhouse : '';\n\t\t\t\t$ohouse_desc = isset($row->ohouse_desc) ? $row->ohouse_desc : '';\n\t\t\t\t$ohdate = isset($row->ohdate) ? $row->ohdate : '';\n\t\t\t\t$ohstarttime = isset($row->ohstarttime) ? $row->ohstarttime : '';\n\t\t\t\t$ohendtime = isset($row->ohendtime) ? $row->ohendtime : '';\n\n\t\t\t\t$ohdate2 = isset($row->ohdate2) ? $row->ohdate2 : '';\n\t\t\t\t$ohstarttime2 = isset($row->ohstarttime2) ? $row->ohstarttime2 : '';\n\t\t\t\t$ohendtime2 = isset($row->ohendtime2) ? $row->ohendtime2 : '';\n\t\t\t\t$viewbooking = isset($row->viewbooking) ? $row->viewbooking : '';\n\t\t\t\t$availdate = isset($row->availdate) ? $row->availdate : '';\n\t\t\t\t$aucdate = isset($row->aucdate) ? $row->aucdate : '';\n\t\t\t\t$auctime = isset($row->auctime) ? $row->auctime : '';\n\t\t\t\t$aucdet = isset($row->aucdet) ? $row->aucdet : '';\n\t\t\t\t$private = isset($row->private) ? $row->private : '';\n\t\t\t\t$office_id = isset($row->office_id) ? $row->office_id : '';\n\n\t\t\t\t$mls_id = isset($row->mls_id) ? $row->mls_id : '';\n\t\t\t\t$mls_agent = isset($row->mls_agent) ? $row->mls_agent : '';\n\t\t\t\t$agentInfo = isset($row->agentInfo) ? $row->agentInfo : '';\n\t\t\t\t$rets_source = isset($row->rets_source) ? $row->rets_source : '';\n\t\t\t\t$mls_disclaimer = isset($row->mls_disclaimer) ? $row->mls_disclaimer : '';\n\t\t\t\t$mls_image = isset($row->mls_image) ? $row->mls_image : '';\n\t\t\t\t$oh_id = isset($row->oh_id) ? $row->oh_id : '';\n\t\t\t\t$closedate = isset($row->closedate) ? $row->closedate : '';\n\t\t\t\t$contractdate = isset($row->contractdate) ? $row->contractdate : '';\n\t\t\t\t$sold = isset($row->sold) ? $row->sold : '';\n\n\t\t\t\t$featured = isset($row->featured) ? $row->featured : '';\n\t\t\t\t$camtype = isset($row->camtype) ? $row->camtype : '';\n\t\t\t\t$owner = isset($row->owner) ? $row->owner : '';\n\t\t\t\t$assoc_agent = isset($row->assoc_agent) ? $row->assoc_agent : '';\n\t\t\t\t$email_status = isset($row->email_status) ? $row->email_status : '';\n\t\t\t\t$skipimp = isset($row->skipimp) ? $row->skipimp : '';\n\t\t\t\t$listdate = isset($row->listdate) ? $row->listdate : '';\n\t\t\t\t$lastupdate = isset($row->lastupdate) ? $row->lastupdate : '';\n\t\t\t\t$expdate = isset($row->expdate) ? $row->expdate : '';\n\t\t\t\t$metadesc = isset($row->metadesc) ? $row->metadesc : '';\n\n\t\t\t\t$metakey = isset($row->metakey) ? $row->metakey : '';\n\t\t\t\t$hits = isset($row->hits) ? $row->hits : '';\n\t\t\t\t$published = isset($row->published) ? $row->published : '';\n\t\t\t\t$language = isset($row->language) ? $row->language : '';\n\t\t\t\t$checked_out = isset($row->checked_out) ? $row->checked_out : '';\n\t\t\t\t$checked_out_time = isset($row->checked_out_time) ? $row->checked_out_time : '';\n\t\t\t\t$ordering = isset($row->ordering) ? $row->ordering : '';\n\n\t\t\t\t$database->setQuery(\"INSERT INTO `#__ezrealty` ( `id` , `type` , `rent_type` , `cid` , `locid` , `stid` , `cnid` , `soleAgency` , `bldg_name` , `unit_num`, \n\t\t\t\t`lot_num` , `street_num` , `address2` , `postcode` , `county` , `locality` , `state` , `country` , `viewad` , `owncoords`, \n\t\t\t\t`price` , `offpeak` , `showprice` , `freq` , `bond` , `closeprice` , `priceview` , `year` , `yearRemodeled` , `houseStyle`, \n\t\t\t\t`houseConstruction` , `exteriorFinish` , `roof` , `flooring` , `porchPatio` , `landtype` , `frontage` , `depth` , `subdivision` , `LandAreaSqFt`, \n\t\t\t\t`AcresTotal` , `LotDimensions` , `bedrooms` , `sleeps` , `totalrooms` , `otherrooms` , `livingarea` , `bathrooms` , `fullBaths` , `thqtrBaths`, \n\t\t\t\t`halfBaths` , `qtrBaths` , `ensuite` , `parking` , `garageDescription` , `parkingGarage` , `parkingCarport` , `stories` , `declat` , `declong` , \n\t\t\t\t`adline` , `alias` , `propdesc` , `smalldesc` , `panorama` , `mediaUrl` , `mediaType` , `pdfinfo1` , `pdfinfo2` , `epc1` , \n\t\t\t\t`epc2` , `flpl1` , `flpl2` , `ctown` , `ctport` , `schooldist` , `preschool` , `primaryschool` , `highschool` , `university` , \n\t\t\t\t`hofees` , `AnnualInsurance` , `TaxAnnual` , `TaxYear` , `Utlities` , `ElectricService` , `AverageUtilElec` , `AverageUtilHeat` , `BasementAndFoundation` , `BasementSize`, \n\t\t\t\t`BasementPctFinished` , `appliances` , `indoorfeatures` , `outdoorfeatures` , `buildingfeatures` , `communityfeatures` , `otherfeatures` , `CovenantsYN` , `PhoneAvailableYN` , `GarbageDisposalYN` , \n\t\t\t\t`RefrigeratorYN` , `OvenYN` , `FamilyRoomPresent` , `LaundryRoomPresent` , `KitchenPresent` , `LivingRoomPresent` , `ParkingSpaceYN` , `custom1` , `custom2` , `custom3` , \n\t\t\t\t`custom4` , `custom5` , `custom6` , `custom7` , `custom8` , `takings` , `returns` , `netprofit` , `bustype` , `bussubtype` , \n\t\t\t\t`stock` , `fixtures` , `fittings` , `squarefeet` , `SqFtLower` , `SqFtMainLevel` , `SqFtUpper` , `percentoffice` , `percentwarehouse` , `loadingfac` , \n\t\t\t\t`fencing` , `rainfall` , `soiltype` , `grazing` , `cropping` , `irrigation` , `waterresources` , `carryingcap` , `storage` , `services` , \n\t\t\t\t`currency_position` , `currency` , `currency_format` , `schoolprof` , `hoodprof` , `openhouse` , `ohouse_desc` , `ohdate` , `ohstarttime` , `ohendtime` , \n\t\t\t\t`ohdate2` , `ohstarttime2` , `ohendtime2` , `viewbooking` , `availdate` , `aucdate` , `auctime` , `aucdet` , `private` , `office_id` , \n\t\t\t\t`mls_id` , `mls_agent` , `agentInfo` , `rets_source` , `mls_disclaimer` , `mls_image` , `oh_id` , `closedate` , `contractdate` , `sold`, \n\t\t\t\t`featured` , `camtype` , `owner` , `assoc_agent` , `email_status` , `skipimp` , `listdate` , `lastupdate` , `expdate` , `metadesc` , \n\t\t\t\t`metakey` , `hits` , `published` , `language` , `checked_out` , `checked_out_time` , `ordering`\n\t\t\t\t ) VALUES ( '\".addslashes($id).\"', \n\t\t\t\t'\".addslashes($type).\"', '\".addslashes($rent_type).\"', '\".addslashes($cid).\"', '\".addslashes($locid).\"', '\".addslashes($stid).\"', '\".addslashes($cnid).\"', '\".addslashes($soleAgency).\"', '\".addslashes($bldg_name).\"', '\".addslashes($unit_num).\"',\n\t\t\t\t'\".addslashes($lot_num).\"', '\".addslashes($street_num).\"', '\".addslashes($address2).\"', '\".addslashes($postcode).\"', '\".addslashes($county).\"', '\".addslashes($locality).\"', '\".addslashes($state).\"', '\".addslashes($country).\"', '\".addslashes($viewad).\"', '\".addslashes($owncoords).\"',\n\t\t\t\t'\".addslashes($price).\"', '\".addslashes($offpeak).\"', '\".addslashes($showprice).\"', '\".addslashes($freq).\"', '\".addslashes($bond).\"', '\".addslashes($closeprice).\"', '\".addslashes($priceview).\"', '\".addslashes($year).\"', '\".addslashes($yearRemodeled).\"', '\".addslashes($houseStyle).\"',\n\t\t\t\t'\".addslashes($houseConstruction).\"', '\".addslashes($exteriorFinish).\"', '\".addslashes($roof).\"', '\".addslashes($flooring).\"', '\".addslashes($porchPatio).\"', '\".addslashes($landtype).\"', '\".addslashes($frontage).\"', '\".addslashes($depth).\"', '\".addslashes($subdivision).\"', '\".addslashes($LandAreaSqFt).\"',\n\t\t\t\t'\".addslashes($AcresTotal).\"', '\".addslashes($LotDimensions).\"', '\".addslashes($bedrooms).\"', '\".addslashes($sleeps).\"', '\".addslashes($totalrooms).\"', '\".addslashes($otherrooms).\"', '\".addslashes($livingarea).\"', '\".addslashes($bathrooms).\"', '\".addslashes($fullBaths).\"', '\".addslashes($thqtrBaths).\"',\n\t\t\t\t'\".addslashes($halfBaths).\"', '\".addslashes($qtrBaths).\"', '\".addslashes($ensuite).\"', '\".addslashes($parking).\"', '\".addslashes($garageDescription).\"', '\".addslashes($parkingGarage).\"', '\".addslashes($parkingCarport).\"', '\".addslashes($stories).\"', '\".addslashes($declat).\"', '\".addslashes($declong).\"',\n\t\t\t\t'\".addslashes($adline).\"', '\".addslashes($thealias).\"', '\".addslashes($propdesc).\"', '\".addslashes($smalldesc).\"', '\".addslashes($panorama).\"', '\".addslashes($mediaUrl).\"', '\".addslashes($mediaType).\"', '\".addslashes($pdfinfo1).\"', '\".addslashes($pdfinfo2).\"', '\".addslashes($epc1).\"',\n\t\t\t\t'\".addslashes($epc2).\"', '\".addslashes($flpl1).\"', '\".addslashes($flpl2).\"', '\".addslashes($ctown).\"', '\".addslashes($ctport).\"', '\".addslashes($schooldist).\"', '\".addslashes($preschool).\"', '\".addslashes($primaryschool).\"', '\".addslashes($highschool).\"', '\".addslashes($university).\"',\n\t\t\t\t'\".addslashes($hofees).\"', '\".addslashes($AnnualInsurance).\"', '\".addslashes($TaxAnnual).\"', '\".addslashes($TaxYear).\"', '\".addslashes($Utlities).\"', '\".addslashes($ElectricService).\"', '\".addslashes($AverageUtilElec).\"', '\".addslashes($AverageUtilHeat).\"', '\".addslashes($BasementAndFoundation).\"', '\".addslashes($BasementSize).\"',\n\t\t\t\t'\".addslashes($BasementPctFinished).\"', '\".addslashes($appliances).\"', '\".addslashes($indoorfeatures).\"', '\".addslashes($outdoorfeatures).\"', '\".addslashes($buildingfeatures).\"', '\".addslashes($communityfeatures).\"', '\".addslashes($otherfeatures).\"', '\".addslashes($CovenantsYN).\"', '\".addslashes($PhoneAvailableYN).\"', '\".addslashes($GarbageDisposalYN).\"',\n\t\t\t\t'\".addslashes($RefrigeratorYN).\"', '\".addslashes($OvenYN).\"', '\".addslashes($FamilyRoomPresent).\"', '\".addslashes($LaundryRoomPresent).\"', '\".addslashes($KitchenPresent).\"', '\".addslashes($LivingRoomPresent).\"', '\".addslashes($ParkingSpaceYN).\"', '\".addslashes($custom1).\"', '\".addslashes($custom2).\"', '\".addslashes($custom3).\"',\n\t\t\t\t'\".addslashes($custom4).\"', '\".addslashes($custom5).\"', '\".addslashes($custom6).\"', '\".addslashes($custom7).\"', '\".addslashes($custom8).\"', '\".addslashes($takings).\"', '\".addslashes($returns).\"', '\".addslashes($netprofit).\"', '\".addslashes($bustype).\"', '\".addslashes($bussubtype).\"',\n\t\t\t\t'\".addslashes($stock).\"', '\".addslashes($fixtures).\"', '\".addslashes($fittings).\"', '\".addslashes($squarefeet).\"', '\".addslashes($SqFtLower).\"', '\".addslashes($SqFtMainLevel).\"', '\".addslashes($SqFtUpper).\"', '\".addslashes($percentoffice).\"', '\".addslashes($percentwarehouse).\"', '\".addslashes($loadingfac).\"',\n\t\t\t\t'\".addslashes($fencing).\"', '\".addslashes($rainfall).\"', '\".addslashes($soiltype).\"', '\".addslashes($grazing).\"', '\".addslashes($cropping).\"', '\".addslashes($irrigation).\"', '\".addslashes($waterresources).\"', '\".addslashes($carryingcap).\"', '\".addslashes($storage).\"', '\".addslashes($services).\"',\n\t\t\t\t'\".addslashes($currency_position).\"', '\".addslashes($currency).\"', '\".addslashes($currency_format).\"', '\".addslashes($schoolprof).\"', '\".addslashes($hoodprof).\"', '\".addslashes($openhouse).\"', '\".addslashes($ohouse_desc).\"', '\".addslashes($ohdate).\"', '\".addslashes($ohstarttime).\"', '\".addslashes($ohendtime).\"',\n\t\t\t\t'\".addslashes($ohdate2).\"', '\".addslashes($ohstarttime2).\"', '\".addslashes($ohendtime2).\"', '\".addslashes($viewbooking).\"', '\".addslashes($availdate).\"', '\".addslashes($aucdate).\"', '\".addslashes($auctime).\"', '\".addslashes($aucdet).\"', '\".addslashes($private).\"', '\".addslashes($office_id).\"',\n\t\t\t\t'\".addslashes($mls_id).\"', '\".addslashes($mls_agent).\"', '\".addslashes($agentInfo).\"', '\".addslashes($rets_source).\"', '\".addslashes($mls_disclaimer).\"', '\".addslashes($mls_image).\"', '\".addslashes($oh_id).\"', '\".addslashes($closedate).\"', '\".addslashes($contractdate).\"', '\".addslashes($sold).\"',\n\t\t\t\t'\".addslashes($featured).\"', '\".addslashes($camtype).\"', '\".addslashes($owner).\"', '\".addslashes($assoc_agent).\"', '\".addslashes($email_status).\"', '\".addslashes($skipimp).\"', '\".addslashes($listdate).\"', '\".addslashes($lastupdate).\"', '\".addslashes($expdate).\"', '\".addslashes($metadesc).\"',\n\t\t\t\t'\".addslashes($metakey).\"', '\".addslashes($hits).\"', '\".addslashes($published).\"', '\".addslashes($language).\"', '\".addslashes($checked_out).\"', '\".addslashes($checked_out_time).\"', '\".addslashes($ordering).\"'\n\t\t\t\t)\");\n\t\t\t\t$database->query();\n\t\t\t}\n\t\t}\n\n\t\t#\tmigrate the property category data into the incats table\n\n\t\t$query = \"INSERT IGNORE INTO #__ezrealty_incats(property_id,category_id) SELECT id,cid FROM #__ezrealty\";\n\t\t$database->setQuery($query);\n\t\t$database->query();\n\n\n\t}", "title": "" }, { "docid": "56f6e6131193e52e7ee9392c28ecbd9d", "score": "0.5015358", "text": "public function backupTables()\n {\n foreach($this->tablesToPrune as $tableName => $idColumnName) {\n $this->backupTable($tableName);\n }\n }", "title": "" }, { "docid": "77ae7c81769b01b334133e661ba0bea3", "score": "0.5009178", "text": "public function saveOrder( $aForm ){\n $aOrderBefore = $this->aOrders[$aForm['iOrder']];\n $this->aOrders[$aForm['iOrder']] = $aForm = array_merge( $this->aOrders[$aForm['iOrder']], changeMassTxt( $aForm, 'H', Array( 'sComment', 'LenHNds' ) ) );\n\n $rFile = fopen( DB_ORDERS.'-backup', 'w' );\n fwrite( $rFile, '<?php exit; ?>'.\"\\n\" );\n foreach( $this->aOrders as $iKey => $aValue ){\n fwrite( $rFile, serialize( compareArrays( $this->aOrdersFields, $aValue ) ).\"\\n\" );\n } // end foreach\n fclose( $rFile );\n\n $rFile1 = fopen( DB_ORDERS_EXT, 'r' );\n $rFile2 = fopen( DB_ORDERS_EXT.'-backup', 'w' );\n fwrite( $rFile2, '<?php exit; ?>'.\"\\n\" );\n $i = 0;\n while( !feof( $rFile1 ) ){\n $sContent = trim( fgets( $rFile1 ) );\n if( $i > 0 && !empty( $sContent ) ){\n $aData = unserialize( $sContent );\n if( $aData['iOrder'] == $aForm['iOrder'] ){\n if( $aForm['iStatus'] != $aOrderBefore['iStatus'] ){\n $aData['aStatuses'][] = Array( 0 => time( ), 1 => $aForm['iStatus'] );\n }\n \n $aStatuses = isset( $aData['aStatuses'] ) ? Array( 'aStatuses' => $aData['aStatuses'] ) : null;\n if( isset( $aStatuses ) )\n fwrite( $rFile2, serialize( array_merge( compareArrays( $this->aOrdersExtFields, $aForm ), $aStatuses ) ).\"\\n\" ); \n else\n fwrite( $rFile2, serialize( compareArrays( $this->aOrdersExtFields, $aForm ) ).\"\\n\" ); \n \n }\n else{\n fwrite( $rFile2, $sContent.\"\\n\" );\n }\n }\n $i++;\n } // end while\n fclose( $rFile1 );\n fclose( $rFile2 );\n unset( $this->aOrders );\n\n if( !empty( $aForm['aNewProduct']['iProduct'] ) && !empty( $aForm['aNewProduct']['sName'] ) && !empty( $aForm['aNewProduct']['fPrice'] ) && !empty( $aForm['aNewProduct']['iQuantity'] ) ){\n $bChangeProducts = true;\n $bAddProduct = true;\n }\n\n $this->generateProducts( $aForm['iOrder'] );\n if( isset( $this->aProducts ) || isset( $bAddProduct ) ){\n if( isset( $aForm['aProductsDelete'] ) ){\n $bChangeProducts = true;\n }\n else{\n if( isset( $this->aProducts ) ){\n foreach( $this->aProducts as $iElement => $aData ){\n if( isset( $aForm['aProducts'][$iElement] ) && ( $aForm['aProducts'][$iElement]['sName'] != $aData['sName'] || $aForm['aProducts'][$iElement]['fPrice'] != $aData['fPrice'] || $aForm['aProducts'][$iElement]['iQuantity'] != $aData['iQuantity'] ) ){\n $bChangeProducts = true;\n break;\n }\n } // end foreach\n }\n }\n\n if( isset( $bChangeProducts ) ){\n $rFile1 = fopen( DB_ORDERS_PRODUCTS, 'r' );\n $rFile2 = fopen( DB_ORDERS_PRODUCTS.'-backup', 'w' );\n fwrite( $rFile2, '<?php exit; ?>'.\"\\n\" );\n $i = 0;\n $iLastElement = 0;\n while( !feof( $rFile1 ) ){\n $sContent = trim( fgets( $rFile1 ) );\n if( $i > 0 && !empty( $sContent ) ){\n $aData = unserialize( $sContent );\n if( $aData['iOrder'] == $aForm['iOrder'] ){\n if( !isset( $aForm['aProductsDelete'][$aData['iElement']] ) ){\n fwrite( $rFile2, serialize( compareArrays( $this->aOrdersProductsFields, array_merge( $aData, changeMassTxt( $aForm['aProducts'][$aData['iElement']] ) ) ) ).\"\\n\" );\n }\n }\n else{\n fwrite( $rFile2, $sContent.\"\\n\" );\n }\n if( $aData['iElement'] > $iLastElement )\n $iLastElement = $aData['iElement'];\n }\n $i++;\n } // end while\n\n if( isset( $bAddProduct ) ){\n $aAdd = $aForm['aNewProduct'];\n $aAdd['iElement'] = ( $iLastElement + 1 );\n $aAdd['fPrice'] = normalizePrice( $aAdd['fPrice'] );\n $aAdd['sName'] = trim( $aAdd['sName'] );\n $aAdd['iOrder'] = $aForm['iOrder'];\n fwrite( $rFile2, serialize( compareArrays( $this->aOrdersProductsFields, changeMassTxt( $aAdd, 'H' ) ) ).\"\\n\" );\n }\n fclose( $rFile1 );\n fclose( $rFile2 );\n }\n }\n $this->moveDatabaseFiles( );\n\n }", "title": "" }, { "docid": "d86d8d13628cbc9d734fd0322adb9ab4", "score": "0.5003009", "text": "protected function migration_process() {\n\n\t\t$this->update_menu_items();\n\t\t$this->update_portfolio_settings();\n\t\t$this->update_header_bg_color();\n\n\t}", "title": "" }, { "docid": "f35d8ef65d429d425877643ea1aa7d22", "score": "0.49976376", "text": "function directoryMoveUp()\n{\n\tglobal $files;\n\n\t$basePath = getBasePath();\n\t$currentPath = getCurrentPath();\n\t$currentPath = $files->directoryMoveUp($basePath, $currentPath);\n\techo $files->buildDirectoryList($basePath, $currentPath, $_SESSION['courseMsg']);\n}", "title": "" }, { "docid": "ca558ca91d6d9df13eeee920f20c51a6", "score": "0.49881554", "text": "public static function syncFiles()\n\t{\n\t\t@ini_set('max_execution_time', 0);\n\n\t\t// Consider the suhosin.memory_limit (see #7035)\n\t\tif (extension_loaded('suhosin'))\n\t\t{\n\t\t\tif ($limit = ini_get('suhosin.memory_limit'))\n\t\t\t{\n\t\t\t\t@ini_set('memory_limit', $limit);\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@ini_set('memory_limit', -1);\n\t\t}\n\n\t\t$objDatabase = \\Database::getInstance();\n\n\t\t// Lock the files table\n\t\t$objDatabase->lockTables(array('tl_files'=>'WRITE'));\n\n\t\t// Reset the \"found\" flag\n\t\t$objDatabase->query(\"UPDATE tl_files SET found=''\");\n\n\t\t/** @var \\SplFileInfo[] $objFiles */\n\t\t$objFiles = new \\RecursiveIteratorIterator(\n\t\t\tnew \\Filter\\SyncExclude(\n\t\t\t\tnew \\RecursiveDirectoryIterator(\n\t\t\t\t\tTL_ROOT . '/' . \\Config::get('uploadPath'),\n\t\t\t\t\t\\FilesystemIterator::UNIX_PATHS|\\FilesystemIterator::FOLLOW_SYMLINKS|\\FilesystemIterator::SKIP_DOTS\n\t\t\t\t)\n\t\t\t), \\RecursiveIteratorIterator::SELF_FIRST\n\t\t);\n\n\t\t$strLog = 'system/tmp/' . md5(uniqid(mt_rand(), true));\n\n\t\t// Open the log file\n\t\t$objLog = new \\File($strLog, true);\n\t\t$objLog->truncate();\n\n\t\t$arrModels = array();\n\n\t\t// Create or update the database entries\n\t\tforeach ($objFiles as $objFile)\n\t\t{\n\t\t\t$strRelpath = str_replace(TL_ROOT . '/', '', $objFile->getPathname());\n\n\t\t\t// Get all subfiles in a single query\n\t\t\tif ($objFile->isDir())\n\t\t\t{\n\t\t\t\t$objSubfiles = \\FilesModel::findMultipleFilesByFolder($strRelpath);\n\n\t\t\t\tif ($objSubfiles !== null)\n\t\t\t\t{\n\t\t\t\t\twhile ($objSubfiles->next())\n\t\t\t\t\t{\n\t\t\t\t\t\t$arrModels[$objSubfiles->path] = $objSubfiles->current();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Get the model\n\t\t\tif (isset($arrModels[$strRelpath]))\n\t\t\t{\n\t\t\t\t$objModel = $arrModels[$strRelpath];\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$objModel = \\FilesModel::findByPath($strRelpath);\n\t\t\t}\n\n\t\t\tif ($objModel === null)\n\t\t\t{\n\t\t\t\t// Add a log entry\n\t\t\t\t$objLog->append(\"[Added] $strRelpath\");\n\n\t\t\t\t// Get the parent folder\n\t\t\t\t$strParent = dirname($strRelpath);\n\n\t\t\t\t// Get the parent ID\n\t\t\t\tif ($strParent == \\Config::get('uploadPath'))\n\t\t\t\t{\n\t\t\t\t\t$strPid = null;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$objParent = \\FilesModel::findByPath($strParent);\n\n\t\t\t\t\tif ($objParent === null)\n\t\t\t\t\t{\n\t\t\t\t\t\tthrow new \\Exception(\"No parent entry for $strParent\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$strPid = $objParent->uuid;\n\t\t\t\t}\n\n\t\t\t\t// Create the file or folder\n\t\t\t\tif (is_file(TL_ROOT . '/' . $strRelpath))\n\t\t\t\t{\n\t\t\t\t\t$objFile = new \\File($strRelpath, true);\n\n\t\t\t\t\t$objModel = new \\FilesModel();\n\t\t\t\t\t$objModel->pid = $strPid;\n\t\t\t\t\t$objModel->tstamp = time();\n\t\t\t\t\t$objModel->name = $objFile->name;\n\t\t\t\t\t$objModel->type = 'file';\n\t\t\t\t\t$objModel->path = $objFile->path;\n\t\t\t\t\t$objModel->extension = $objFile->extension;\n\t\t\t\t\t$objModel->found = 2;\n\t\t\t\t\t$objModel->hash = $objFile->hash;\n\t\t\t\t\t$objModel->uuid = $objDatabase->getUuid();\n\t\t\t\t\t$objModel->save();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$objFolder = new \\Folder($strRelpath);\n\n\t\t\t\t\t$objModel = new \\FilesModel();\n\t\t\t\t\t$objModel->pid = $strPid;\n\t\t\t\t\t$objModel->tstamp = time();\n\t\t\t\t\t$objModel->name = $objFolder->name;\n\t\t\t\t\t$objModel->type = 'folder';\n\t\t\t\t\t$objModel->path = $objFolder->path;\n\t\t\t\t\t$objModel->extension = '';\n\t\t\t\t\t$objModel->found = 2;\n\t\t\t\t\t$objModel->hash = $objFolder->hash;\n\t\t\t\t\t$objModel->uuid = $objDatabase->getUuid();\n\t\t\t\t\t$objModel->save();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Check whether the MD5 hash has changed\n\t\t\t\t$objResource = $objFile->isDir() ? new \\Folder($strRelpath) : new \\File($strRelpath, true);\n\t\t\t\t$strType = ($objModel->hash != $objResource->hash) ? 'Changed' : 'Unchanged';\n\n\t\t\t\t// Add a log entry\n\t\t\t\t$objLog->append(\"[$strType] $strRelpath\");\n\n\t\t\t\t// Update the record\n\t\t\t\t$objModel->found = 1;\n\t\t\t\t$objModel->hash = $objResource->hash;\n\t\t\t\t$objModel->save();\n\t\t\t}\n\t\t}\n\n\t\t// Check for left-over entries in the DB\n\t\t$objFiles = \\FilesModel::findByFound('');\n\n\t\tif ($objFiles !== null)\n\t\t{\n\t\t\t$arrMapped = array();\n\t\t\t$arrPidUpdate = array();\n\n\t\t\t/** @var \\Model\\Collection|\\FilesModel $objFiles */\n\t\t\twhile ($objFiles->next())\n\t\t\t{\n\t\t\t\t$objFound = \\FilesModel::findBy(array('hash=?', 'found=2'), $objFiles->hash);\n\n\t\t\t\tif ($objFound !== null)\n\t\t\t\t{\n\t\t\t\t\t// Check for matching file names if the result is ambiguous (see #5644)\n\t\t\t\t\tif ($objFound->count() > 1)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile ($objFound->next())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif ($objFound->name == $objFiles->name)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$objFound = $objFound->current();\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// If another file has been mapped already, delete the entry (see #6008)\n\t\t\t\t\tif (in_array($objFound->path, $arrMapped))\n\t\t\t\t\t{\n\t\t\t\t\t\t$objLog->append(\"[Deleted] {$objFiles->path}\");\n\t\t\t\t\t\t$objFiles->delete();\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$arrMapped[] = $objFound->path;\n\n\t\t\t\t\t// Store the PID change\n\t\t\t\t\tif ($objFiles->type == 'folder')\n\t\t\t\t\t{\n\t\t\t\t\t\t$arrPidUpdate[$objFound->uuid] = $objFiles->uuid;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Add a log entry BEFORE changing the object\n\t\t\t\t\t$objLog->append(\"[Moved] {$objFiles->path} to {$objFound->path}\");\n\n\t\t\t\t\t// Update the original entry\n\t\t\t\t\t$objFiles->pid = $objFound->pid;\n\t\t\t\t\t$objFiles->tstamp = $objFound->tstamp;\n\t\t\t\t\t$objFiles->name = $objFound->name;\n\t\t\t\t\t$objFiles->type = $objFound->type;\n\t\t\t\t\t$objFiles->path = $objFound->path;\n\t\t\t\t\t$objFiles->found = 1;\n\n\t\t\t\t\t// Delete the newer (duplicate) entry\n\t\t\t\t\t$objFound->delete();\n\n\t\t\t\t\t// Then save the modified original entry (prevents duplicate key errors)\n\t\t\t\t\t$objFiles->save();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Add a log entry BEFORE changing the object\n\t\t\t\t\t$objLog->append(\"[Deleted] {$objFiles->path}\");\n\n\t\t\t\t\t// Delete the entry if the resource has gone\n\t\t\t\t\t$objFiles->delete();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update the PID of the child records\n\t\t\tif (!empty($arrPidUpdate))\n\t\t\t{\n\t\t\t\tforeach ($arrPidUpdate as $from=>$to)\n\t\t\t\t{\n\t\t\t\t\t$objChildren = \\FilesModel::findByPid($from);\n\n\t\t\t\t\tif ($objChildren !== null)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile ($objChildren->next())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$objChildren->pid = $to;\n\t\t\t\t\t\t\t$objChildren->save();\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// Close the log file\n\t\t$objLog->close();\n\n\t\t// Reset the found flag\n\t\t$objDatabase->query(\"UPDATE tl_files SET found=1 WHERE found=2\");\n\n\t\t// Unlock the tables\n\t\t$objDatabase->unlockTables();\n\n\t\t// Return the path to the log file\n\t\treturn $strLog;\n\t}", "title": "" }, { "docid": "ae960ec5ecb2785239fc69247a53f385", "score": "0.4978728", "text": "public function runImport() {\n\t\t$files = $this->fileCrawler->getFilesForGivenDirectory($this->directory);\n\t\tforeach ($files as $filepath) { \n\t\t\t$item = null;\n\t\t\tif ($this->moveFilesToOrigsDirectory) {\n\t\t\t\t$item = $this->getNewPersistedItem();\n\t\t\t\t// set title of item to filename\n\t\t\t\t$item->setTitle(basename($filepath));\n\t\t\t\t$filepath = $this->moveFileToOrigsDirectory($filepath, $item);\n\t\t\t}\n $this->importFileByFilename($filepath, $item);\n\t\t}\n\t\t$this->runPostImportAction();\n\t}", "title": "" }, { "docid": "d537ec014aec52ff3b52cabc5b52dae6", "score": "0.49721426", "text": "public function insertReceived() {\n\t\t$dirs = $this->api->glob($this->recvPathPrefix . \"*\", true );\n\n\t\tforeach ($dirs as $dir){\n\t\t\t$locationName = $this->api->baseName($dir);\t\n\t\t\tforeach (self::$tables as $queuedTable => $receivedTable) { //order doesn't matter here because we finish reading in all before processing\n\t\t\t\t$full_file = \"{$dir}/{$queuedTable}.sql\";\n\t\t\t\tif(!$this->api->fileExists($full_file)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$this->mysqlExecuteFile($full_file, $locationName);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a20a7057ba7a98b266169a54bc5bcf62", "score": "0.49647957", "text": "function dbListOrders( ){\n return $GLOBALS['oFF']->throwFileArrayPages( DB_ORDERS_EXT, null, $GLOBALS['iPage'], ADMIN_LIST );\n }", "title": "" }, { "docid": "3065a1dc5b5d717f65c8084b98789b03", "score": "0.4947109", "text": "function delete_b2c_cache_files()\r\n\t{\t\r\n\t\t$expire_time = 86400; //seconds for 1 day\t\r\n\t\t$files = glob(realpath('../b2c').'/cache/*');\t\t\r\n\t\tforeach($files as $file){ // iterate files\r\n\t\t if(is_file($file)){\r\n\t\t\t if(filemtime($file) < time() - $expire_time) {\t\t\t \t\r\n\t\t\t\t unlink($file); // delete file \r\n\t\t\t }\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t$insert_data = array(\r\n\t\t\t'deleted_file_count'=>count($files),\r\n\t\t\t'module'=>'b2c_cache',\r\n\t\t\t'created_datetime'=>date('Y-m-d H:i:s')\r\n\t\t\t);\r\n\t\t$this->custom_db->insert_record('cache_remove_logger', $insert_data);\r\n\t}", "title": "" }, { "docid": "b3baab1973fc92d9ad08d6ca94c344a7", "score": "0.49440747", "text": "abstract protected function restoreSql($file, $remove = false);", "title": "" }, { "docid": "349e1642f8e62660f0d9212f88d465e2", "score": "0.49405608", "text": "protected function deleteFiles()\n {\n if (count($this->deleteList) > 0) {\n //check and create the recycle bin path\n $currentRecycleBinPath = $this->mediaRecycleBinPath . DIRECTORY_SEPARATOR . date('Ymd_His');\n if (file_exists($currentRecycleBinPath) == false) {\n $this->io->mkdir($currentRecycleBinPath, 0777, true);\n }\n }\n\n $deleteCounter = 0;\n foreach ($this->deleteList as $file) {\n if (file_exists($file) === true) {\n if ($this->dryRun == false) {\n try {\n //get recycle bin path\n $newFilePath = $currentRecycleBinPath . str_replace($this->magentoMediaPath, '', $file);\n $this->log('moving: ' . $file . ' to recycle bin: ' . $newFilePath);\n\n //check if directory exists\n $pathToCheck = str_replace(basename($newFilePath), '', $newFilePath);\n if (file_exists($pathToCheck) == false) {\n $this->io->mkdir($pathToCheck, 0777, true);\n }\n\n //move to recycle bin\n copy($file, $newFilePath);\n\n //delete the original file\n $this->log('deleting: ' . $file);\n unlink($file);\n } catch (Exception $e) {\n $this->log('error during file cleanup: ' . $e->getMessage());\n }\n }\n\n $deleteCounter ++;\n }\n\n $this->pingDb();\n }\n\n $this->log('deleted ' . $deleteCounter . ' obsolete media files');\n }", "title": "" }, { "docid": "a45cfac33e926d616885f97108abac8c", "score": "0.49365753", "text": "public function onAfterArchive()\n {\n $this->owner->getListObject()->doArchive();\n }", "title": "" }, { "docid": "1db63d2ac4ee0df3e8b70efcc009b96c", "score": "0.49303553", "text": "function execute() {\n\t\tglobal $wgLang;\n\t\tif ( !$this->all && !$this->ids ) {\n\t\t\t// Do nothing\n\t\t\treturn $this->file->repo->newGood();\n\t\t}\n\n\t\t$exists = $this->file->lock();\n\t\t$dbw = $this->file->repo->getMasterDB();\n\t\t$status = $this->file->repo->newGood();\n\n\t\t// Fetch all or selected archived revisions for the file,\n\t\t// sorted from the most recent to the oldest.\n\t\t$conditions = array( 'fa_name' => $this->file->getName() );\n\t\tif( !$this->all ) {\n\t\t\t$conditions[] = 'fa_id IN (' . $dbw->makeList( $this->ids ) . ')';\n\t\t}\n\n\t\t$result = $dbw->select( 'filearchive', '*',\n\t\t\t$conditions,\n\t\t\t__METHOD__,\n\t\t\tarray( 'ORDER BY' => 'fa_timestamp DESC' )\n\t\t);\n\n\t\t$idsPresent = array();\n\t\t$storeBatch = array();\n\t\t$insertBatch = array();\n\t\t$insertCurrent = false;\n\t\t$deleteIds = array();\n\t\t$first = true;\n\t\t$archiveNames = array();\n\t\twhile( $row = $dbw->fetchObject( $result ) ) {\n\t\t\t$idsPresent[] = $row->fa_id;\n\n\t\t\tif ( $row->fa_name != $this->file->getName() ) {\n\t\t\t\t$status->error( 'undelete-filename-mismatch', $wgLang->timeanddate( $row->fa_timestamp ) );\n\t\t\t\t$status->failCount++;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif ( $row->fa_storage_key == '' ) {\n\t\t\t\t// Revision was missing pre-deletion\n\t\t\t\t$status->error( 'undelete-bad-store-key', $wgLang->timeanddate( $row->fa_timestamp ) );\n\t\t\t\t$status->failCount++;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$deletedRel = $this->file->repo->getDeletedHashPath( $row->fa_storage_key ) . $row->fa_storage_key;\n\t\t\t$deletedUrl = $this->file->repo->getVirtualUrl() . '/deleted/' . $deletedRel;\n\n\t\t\t$sha1 = substr( $row->fa_storage_key, 0, strcspn( $row->fa_storage_key, '.' ) );\n\t\t\t# Fix leading zero\n\t\t\tif ( strlen( $sha1 ) == 32 && $sha1[0] == '0' ) {\n\t\t\t\t$sha1 = substr( $sha1, 1 );\n\t\t\t}\n\n\t\t\tif( is_null( $row->fa_major_mime ) || $row->fa_major_mime == 'unknown'\n\t\t\t\t|| is_null( $row->fa_minor_mime ) || $row->fa_minor_mime == 'unknown'\n\t\t\t\t|| is_null( $row->fa_media_type ) || $row->fa_media_type == 'UNKNOWN'\n\t\t\t\t|| is_null( $row->fa_metadata ) ) {\n\t\t\t\t// Refresh our metadata\n\t\t\t\t// Required for a new current revision; nice for older ones too. :)\n\t\t\t\t$props = RepoGroup::singleton()->getFileProps( $deletedUrl );\n\t\t\t} else {\n\t\t\t\t$props = array(\n\t\t\t\t\t'minor_mime' => $row->fa_minor_mime,\n\t\t\t\t\t'major_mime' => $row->fa_major_mime,\n\t\t\t\t\t'media_type' => $row->fa_media_type,\n\t\t\t\t\t'metadata' => $row->fa_metadata\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( $first && !$exists ) {\n\t\t\t\t// This revision will be published as the new current version\n\t\t\t\t$destRel = $this->file->getRel();\n\t\t\t\t$insertCurrent = array(\n\t\t\t\t\t'img_name' => $row->fa_name,\n\t\t\t\t\t'img_size' => $row->fa_size,\n\t\t\t\t\t'img_width' => $row->fa_width,\n\t\t\t\t\t'img_height' => $row->fa_height,\n\t\t\t\t\t'img_metadata' => $props['metadata'],\n\t\t\t\t\t'img_bits' => $row->fa_bits,\n\t\t\t\t\t'img_media_type' => $props['media_type'],\n\t\t\t\t\t'img_major_mime' => $props['major_mime'],\n\t\t\t\t\t'img_minor_mime' => $props['minor_mime'],\n\t\t\t\t\t'img_description' => $row->fa_description,\n\t\t\t\t\t'img_user' => $row->fa_user,\n\t\t\t\t\t'img_user_text' => $row->fa_user_text,\n\t\t\t\t\t'img_timestamp' => $row->fa_timestamp,\n\t\t\t\t\t'img_sha1' => $sha1\n\t\t\t\t);\n\t\t\t\t// The live (current) version cannot be hidden!\n\t\t\t\tif( !$this->unsuppress && $row->fa_deleted ) {\n\t\t\t\t\t$storeBatch[] = array( $deletedUrl, 'public', $destRel );\n\t\t\t\t\t$this->cleanupBatch[] = $row->fa_storage_key;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$archiveName = $row->fa_archive_name;\n\t\t\t\tif( $archiveName == '' ) {\n\t\t\t\t\t// This was originally a current version; we\n\t\t\t\t\t// have to devise a new archive name for it.\n\t\t\t\t\t// Format is <timestamp of archiving>!<name>\n\t\t\t\t\t$timestamp = wfTimestamp( TS_UNIX, $row->fa_deleted_timestamp );\n\t\t\t\t\tdo {\n\t\t\t\t\t $archiveName = wfTimestamp( TS_MW, $timestamp ) . '!' . $row->fa_name;\n\t\t\t\t\t $timestamp++;\n\t\t\t\t\t} while ( isset( $archiveNames[$archiveName] ) );\n\t\t\t\t}\n\t\t\t\t$archiveNames[$archiveName] = true;\n\t\t\t\t$destRel = $this->file->getArchiveRel( $archiveName );\n\t\t\t\t$insertBatch[] = array(\n\t\t\t\t\t'oi_name' => $row->fa_name,\n\t\t\t\t\t'oi_archive_name' => $archiveName,\n\t\t\t\t\t'oi_size' => $row->fa_size,\n\t\t\t\t\t'oi_width' => $row->fa_width,\n\t\t\t\t\t'oi_height' => $row->fa_height,\n\t\t\t\t\t'oi_bits' => $row->fa_bits,\n\t\t\t\t\t'oi_description' => $row->fa_description,\n\t\t\t\t\t'oi_user' => $row->fa_user,\n\t\t\t\t\t'oi_user_text' => $row->fa_user_text,\n\t\t\t\t\t'oi_timestamp' => $row->fa_timestamp,\n\t\t\t\t\t'oi_metadata' => $props['metadata'],\n\t\t\t\t\t'oi_media_type' => $props['media_type'],\n\t\t\t\t\t'oi_major_mime' => $props['major_mime'],\n\t\t\t\t\t'oi_minor_mime' => $props['minor_mime'],\n\t\t\t\t\t'oi_deleted' => $this->unsuppress ? 0 : $row->fa_deleted,\n\t\t\t\t\t'oi_sha1' => $sha1 );\n\t\t\t}\n\n\t\t\t$deleteIds[] = $row->fa_id;\n\t\t\tif( !$this->unsuppress && $row->fa_deleted & File::DELETED_FILE ) {\n\t\t\t\t// private files can stay where they are\n\t\t\t\t$status->successCount++;\n\t\t\t} else {\n\t\t\t\t$storeBatch[] = array( $deletedUrl, 'public', $destRel );\n\t\t\t\t$this->cleanupBatch[] = $row->fa_storage_key;\n\t\t\t}\n\t\t\t$first = false;\n\t\t}\n\t\tunset( $result );\n\n\t\t// Add a warning to the status object for missing IDs\n\t\t$missingIds = array_diff( $this->ids, $idsPresent );\n\t\tforeach ( $missingIds as $id ) {\n\t\t\t$status->error( 'undelete-missing-filearchive', $id );\n\t\t}\n\n\t\t// Remove missing files from batch, so we don't get errors when undeleting them\n\t\t$storeBatch = $this->removeNonexistentFiles( $storeBatch );\n\n\t\t// Run the store batch\n\t\t// Use the OVERWRITE_SAME flag to smooth over a common error\n\t\t$storeStatus = $this->file->repo->storeBatch( $storeBatch, FileRepo::OVERWRITE_SAME );\n\t\t$status->merge( $storeStatus );\n\n\t\tif ( !$status->ok ) {\n\t\t\t// Store batch returned a critical error -- this usually means nothing was stored\n\t\t\t// Stop now and return an error\n\t\t\t$this->file->unlock();\n\t\t\treturn $status;\n\t\t}\n\n\t\t// Run the DB updates\n\t\t// Because we have locked the image row, key conflicts should be rare.\n\t\t// If they do occur, we can roll back the transaction at this time with\n\t\t// no data loss, but leaving unregistered files scattered throughout the\n\t\t// public zone.\n\t\t// This is not ideal, which is why it's important to lock the image row.\n\t\tif ( $insertCurrent ) {\n\t\t\t$dbw->insert( 'image', $insertCurrent, __METHOD__ );\n\t\t}\n\t\tif ( $insertBatch ) {\n\t\t\t$dbw->insert( 'oldimage', $insertBatch, __METHOD__ );\n\t\t}\n\t\tif ( $deleteIds ) {\n\t\t\t$dbw->delete( 'filearchive',\n\t\t\t\tarray( 'fa_id IN (' . $dbw->makeList( $deleteIds ) . ')' ),\n\t\t\t\t__METHOD__ );\n\t\t}\n\n\t\t// If store batch is empty (all files are missing), deletion is to be considered successful\n\t\tif( $status->successCount > 0 || !$storeBatch ) {\n\t\t\tif( !$exists ) {\n\t\t\t\twfDebug( __METHOD__ . \" restored {$status->successCount} items, creating a new current\\n\" );\n\n\t\t\t\t// Update site_stats\n\t\t\t\t$site_stats = $dbw->tableName( 'site_stats' );\n\t\t\t\t$dbw->query( \"UPDATE $site_stats SET ss_images=ss_images+1\", __METHOD__ );\n\n\t\t\t\t$this->file->purgeEverything();\n\t\t\t} else {\n\t\t\t\twfDebug( __METHOD__ . \" restored {$status->successCount} as archived versions\\n\" );\n\t\t\t\t$this->file->purgeDescription();\n\t\t\t\t$this->file->purgeHistory();\n\t\t\t}\n\t\t}\n\t\t$this->file->unlock();\n\t\treturn $status;\n\t}", "title": "" }, { "docid": "9690fcee73790629c7fb3b26dc13bdc1", "score": "0.49252385", "text": "function migrate($dbfile){\n\t\t$this->db->beginTransaction();\n\t\t\n\t\t$this->db->exec(\"CREATE TABLE activity (time REAL, UID TEXT, user TEXT, type TEXT, data, image TEXT, token TEXT, loc TEXT);\");\n\t\t$this->db->exec(\"CREATE TABLE users (time REAL, UID TEXT, user TEXT, email TEXT, pass TEXT, name TEXT, image TEXT, data TEXT, token TEXT, loc TEXT);\");\n\t\t$this->db->exec(\"CREATE TABLE items (time REAL, IID TEXT, UID TEXT, title TEXT, images TEXT, description TEXT, token TEXT, loc TEXT);\");\n\t\t$this->db->exec(\"CREATE TABLE messages (time REAL, IID TEXT, toUID TEXT, fromUID TEXT, read TEXT, data TEXT, token TEXT, loc TEXT);\");\n\t\t$this->db->exec(\"CREATE TABLE contact (time REAL, ID TEXT, time_date TEXT, IP TEXT, UID TEXT, UA TEXT, data TEXT, token TEXT, loc TEXT);\");\n\n\t\t$this->db->exec(\"INSERT INTO 'users' (time, UID, user, email, pass, name) VALUES('\".time().\"', '0', 'admin', '[email protected]', 'cbce842347134649246fe232bfb9d85423d79aea', 'Administrator');\");\n\t\t$this->db->commit();\n\n\t}", "title": "" }, { "docid": "f34a978ef3e728287696b7608eb5f183", "score": "0.4917233", "text": "public function filesToDelete() {\n\t\t$thirty_days = time() - (30 * 24 * 60 * 60);\n\t\t$files = Yii::app()->db->createCommand()\n\t\t\t->select('id, temp_file_path, problem_file')\n\t\t\t->from($this->file_info)\n\t\t\t->where(':download_time <= download_time', array(':download_time' => $thirty_days))\n\t\t\t->queryAll();\n\t\t\n\t\treturn $files;\n\t}", "title": "" }, { "docid": "2f0a985c6408873a7db75c216e74f0c5", "score": "0.4915172", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_reference_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_fetch_job_enquiry_reference_fids';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "a9532b8a32e81d82d7d971bb53fcdfed", "score": "0.49151352", "text": "function preMigrate( $scriptName, &$args, $db )\n\t{\n\t\t$maxread = 0;\n\t\tjimport('joomla.filesystem.file');\n\t\tif(function_exists('memory_get_usage')) {\n\t\t\t$memlimit = JInstallationHelper::return_bytes(ini_get('memory_limit'));\n\t\t\t$maxread = $memlimit / 16; \t// Read only a eigth of our max amount of memory, we could be up to a lot by now\n\t\t\t\t\t\t\t\t\t\t// By default this pegs us at 0.5MB\n\t\t}\n\t\t$buffer = '';\n\t\t$newPrefix = $args['DBPrefix'];\n\t\t/*\n\t\t * search and replace table prefixes\n\t\t */\n\t\t$oldPrefix = trim( $args['oldPrefix']);\n\t\t$oldPrefix = rtrim( $oldPrefix, '_' ) . '_';\n\t\t$srcEncoding = $args['srcEncoding'];\n\t\tif(!is_file($scriptName)) return false; // not a file?\n\t\t$newFile = dirname( $scriptName ).DS.'converted.sql';\n\t\t$tfilesize = filesize($scriptName);\n\t\tif($maxread > 0 && $tfilesize > 0 && $maxread < $tfilesize)\n\t\t{\n\t\t\t$parts = ceil($tfilesize / $maxread);\n\t\t\tfile_put_contents( $newFile, '' ); // cleanse the file first\n\t\t\tfor($i = 0; $i < $parts; $i++) {\n\t\t\t\t$buffer = JFile::read($scriptName, false, $maxread, $maxread,($i * $maxread));\n\t\t\t\t// Lets try and read a portion of the file\n\t\t\t\tJInstallationHelper::replaceBuffer($buffer, $oldPrefix, $newPrefix, $srcEncoding);\n\t\t\t\tJInstallationHelper::appendFile($buffer, $newFile);\n\t\t\t\tunset($buffer);\n\t\t\t}\n\t\t\tJFile::delete( $scriptName );\n\t\t} else {\n\t\t\t/*\n\t\t\t * read script file into buffer\n\t\t\t */\n\t\t\tif(is_file($scriptName)) {\n\t\t\t\t$buffer = file_get_contents( $scriptName );\n\t\t\t} else return false;\n\n\t\t\tif( $buffer == false ) return false;\n\t\t\tJInstallationHelper::replaceBuffer($buffer, $oldPrefix, $newPrefix, $srcEncoding);\n\n\t\t\t/*\n\t\t\t * write to file\n\t\t\t */\n\t\t\t//$newFile = dirname( $scriptName ).DS.'converted.sql';\n\t\t\t$ret = file_put_contents( $newFile, $buffer );\n\t\t\tunset($buffer); // Release the memory used by the buffer\n\t\t\tjimport('joomla.filesystem.file');\n\t\t\tJFile::delete( $scriptName );\n\t\t}\n\n\t\t/*\n\t\t * Create two empty temporary tables\n\t\t */\n\n\t\t$query = 'DROP TABLE IF EXISTS '.$newPrefix.'modules_migration';\n\t\t$db->setQuery( $query );\n\t\t$db->execute();\n\n\t\t$query = 'DROP TABLE IF EXISTS '.$newPrefix.'menu_migration';\n\t\t$db->setQuery( $query );\n\t\t$db->execute();\n\n\t\t$query = 'CREATE TABLE '.$newPrefix.'modules_migration SELECT * FROM '.$newPrefix.'modules WHERE 0';\n\t\t$db->setQuery( $query );\n\t\t$db->execute();\n\n\t\t$query = 'CREATE TABLE '.$newPrefix.'modules_migration_menu SELECT * FROM '.$newPrefix.'modules_menu WHERE 0';\n\t\t$db->setQuery( $query );\n\t\t$db->execute();\n\n\t\t$query = 'CREATE TABLE '.$newPrefix.'menu_migration SELECT * FROM '.$newPrefix.'menu WHERE 0';\n\t\t$db->setQuery( $query );\n\t\t$db->execute();\n\n\t\treturn $newFile;\n\t}", "title": "" }, { "docid": "374cb3c624d8319b683cf1a4e7843acb", "score": "0.4914771", "text": "function cleanupftp() {\n\tglobal $maxbackups, $conn_id;\n\t$contents = ftp_nlist($conn_id, \".\");\n\trsort($contents);\n\t$currentbackups = count($contents);\n\tif ($currentbackups > $maxbackups) {\n\t\t// delete overspill items\n\t\tfor ($i = $maxbackups; $i < $currentbackups; $i++) {\n\t\t\tdeletebackup($contents[$i]);\n\t\t}\n\t}\n\t// list directory\n\t$contents = ftp_nlist($conn_id, \".\");\n\tdirectory($contents);\n}", "title": "" }, { "docid": "b835fbd2c6bff8eda44ea7bc04b5049e", "score": "0.49119028", "text": "public function getRenameList() {\n\t\t$mResult = Query::run(\"\tSELECT\tTABLE_NAME\n\t\t\t\t\t\t\t\tFROM \tINFORMATION_SCHEMA.TABLES\n\t\t\t\t\t\t\t\tWHERE \tTABLE_SCHEMA = 'flex_rdavis'\");\n\t\tData_Source_Time::\n\t\t$aAllTables = array();\n\t\twhile ($aRow = $mResult->fetch_assoc()) {\n\t\t\t$sTableName = $aRow['TABLE_NAME'];\n\t\t\tif (in_array($sTableName, self::$_aTablesToIgnoreChanges)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$aAllTables[$sTableName] = $aRow;\n\t\t}\n\t\t\n\t\t$aTables \t\t= array();\n\t\t$iTotalChanges\t= 0;\n\t\tforeach ($aAllTables as $aRow) {\n\t\t\t$sTableName = $aRow['TABLE_NAME'];\n\t\t\tif (preg_match('/[A-Z]/', $sTableName)) {\n\t\t\t\tif ($sTableName === \"FileType\")\n\t\t\t\t\t$sNewTableName = 'file_type_';//temporary hack, duplicate table name needs to be resolved....\n\t\t\t\telse\n\t\t\t\t\t$sNewTableName \t\t\t= $this->convertDbName($sTableName);\n\t\t\t\t$aTables[$sTableName]\t= array('sNewName' => $sNewTableName, 'oColumns' => array());\n\t\t\t\t$iTotalChanges++;\n\t\t\t\tLog::getLog()->log(\"Table: {$sTableName} => {$sNewTableName}\");\n\t\t\t}\n\t\t\t\n\t\t\t$mResultColumns = Query::run(\"\tSELECT\tc.COLUMN_NAME, c.DATA_TYPE\n\t\t\t\t\t\t\t\t\t\t\tFROM\tINFORMATION_SCHEMA.COLUMNS c\n\t\t\t\t\t\t\t\t\t\t\tJOIN\tINFORMATION_SCHEMA.TABLES t ON (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tt.TABLE_NAME = c.TABLE_NAME \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND t.TABLE_SCHEMA = c.TABLE_SCHEMA \n\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND t.TABLE_TYPE = 'BASE TABLE'\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\tWHERE\tc.TABLE_SCHEMA = 'flex_rdavis'\n\t\t\t\t\t\t\t\t\t\t\tAND\t\tc.TABLE_NAME = '{$sTableName}'\");\n\t\t\twhile ($aRowColumn = $mResultColumns->fetch_assoc()) {\n\t\t\t\t// Peform conversion\n\t\t\t\t$sColumnName \t= $aRowColumn['COLUMN_NAME'];\n\t\t\t\t$sNewColumnName\t= $this->convertDbName($sColumnName, $sTableName);\n\t\t\t\t\n\t\t\t\tif (($aAllTables[$sColumnName] || $aAllTables[$sNewColumnName]) && in_array($aRowColumn['DATA_TYPE'], array('int', 'bigint'))) {\n\t\t\t\t\t// There is a table with the same name as the column and it is an int/bigint, add id, most likely a foreign key\n\t\t\t\t\t$sNewColumnName .= '_id';\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (preg_match('/[A-Z]/', $sColumnName) || ($sColumnName != $sNewColumnName)) {\n\t\t\t\t\tif (!isset($aTables[$sTableName])) {\n\t\t\t\t\t\tLog::getLog()->log(\"Table (GOOD NAME): {$sTableName}\");\n\t\t\t\t\t\t$aTables[$sTableName] = array('oColumns' => array());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$aTables[$sTableName]['oColumns'][$sColumnName] = $sNewColumnName;\n\t\t\t\t\t$iTotalChanges++;\n\t\t\t\t\tLog::getLog()->log(\"\\tColumn: {$sColumnName} => {$sNewColumnName}\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Add any other fixed table column changes\n\t\tforeach (self::$_aFixedColumnChanges as $sTableName => $aColumns) {\n\t\t\tif (!isset($aTables[$sTableName])) {\n\t\t\t\t$aTables[$sTableName] = array('oColumns' => array());\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($aColumns as $sColumnName => $sNewColumnName) {\n\t\t\t\tif ($sColumnName == $sNewColumnName) {\n\t\t\t\t\tunset($aTables[$sTableName]['oColumns'][$sColumnName]);\n\t\t\t\t\tif (count($aTables[$sTableName]['oColumns']) == 0 && !isset($aTables[$sTableName]['sNewName'])) {\n\t\t\t\t\t\tunset($aTables[$sTableName]);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$aTables[$sTableName]['oColumns'][$sColumnName] = $sNewColumnName;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$iTotalChanges++;\n\t\t\t\tLog::getLog()->log(\"Fixed column change: {$sTableName}.{$sColumnName} to {$sTableName}.{$sNewColumnName}\");\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Repeat for views\n\t\t//$mResult = Query::run(\"\tSELECT\tv.TABLE_NAME, v.VIEW_DEFINITION\n\t\t//\t\t\t\t\t\tFROM\tINFORMATION_SCHEMA.VIEWS v\n\t\t//\t\t\t\t\t\tWHERE\tv.TABLE_SCHEMA = 'flex_rdavis'\");\n\t\t$aViews\t= array();\n\n\t\t$aViewDefs = array(\t\t\t\t\t\n\t\t\t\n\t\t\t\t\t\t'current_service_account' => \"\tSELECT\n\t\t\t\t\t\t\t\t\t\tMAX(flex_rdavis.service.id) AS service_id,\n\t\t\t\t\t\t\t\t\t\tMAX(flex_rdavis.account.id) AS account_id\n\t\t\t\t\t\t\t\t\t\tFROM flex_rdavis.service\n\t\t\t\t\t\t\t\t\t\tJOIN flex_rdavis.account ON (flex_rdavis.service.account_id = flex_rdavis.account.id)\n\t\t\t\t\t\t\t\t\t\tWHERE ((flex_rdavis.account.id = flex_rdavis.service.account_id)\n\t\t\t\t\t\t\t\t\t\tAND (\tflex_rdavis.service.closed_datetime IS NULL\n\t\t\t\t\t\t\t\t\t\t\t\tOR (now() < flex_rdavis.service.closed_datetime)\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\tAND (flex_rdavis.service.created_datetime < NOW()))\n\t\t\t\t\t\t\t\t\t\tGROUP BY flex_rdavis.account.id,flex_rdavis.service.fnn\"\n\t\t\t\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t'account_services' => \"SELECT\n\t\t\t\t\t\t\t<schema_name>.service.account_id\tAS account_id,\n\t\t\t\t\t\t\t<schema_name>.service.id\t\t\tAS service_id,\n\t\t\t\t\t\t\t<schema_name>.service.fnn\t\t\tAS fnn\n\t\t\t\t\t\t\tFROM (\n\t\t\t\t\t\t\t\t\t<schema_name>.service\n\t\t\t\t\t\t\t\t\tJOIN <schema_name>.current_service_account ON(\t\t(<schema_name>.service.account_id = <schema_name>.current_service_account.account_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND (<schema_name>.service.id = <schema_name>.current_service_account.service_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAND (<schema_name>.service.service_status_id IN (400,402,403)))\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\n\t\t\t\t\t);\n\n\t\tforeach ($aViewDefs as $sViewName => $sViewDef) {\n\t\t\t$aViews[$sViewName]= $sViewDef;\n\t\t}\n\n\t\t$aStoredProcedures = array (\n\t\t\t\t\"\tCREATE LANGUAGE 'plpgsql';\n\t\t\t\t\tCREATE OR REPLACE FUNCTION rebillMotorpassInsertAndUpdate() RETURNS trigger AS '\n\t\t\t\t\tDECLARE\n\t\t\t\t\t\t acc_num INTEGER;\n\t\t\t\t\t\t expiry DATE;\n\t\t\t\t\t\t acc_name VARCHAR(256);\n\t\t\t\t\tBEGIN\n\t\t\t\t\t\tIF (NEW.motorpass_account_id IS NOT NULL) THEN\n\t\t\t\t\t\t\tSELECT\tma.account_name\n\t\t\t\t\t\t\tINTO\tacc_name\n\t\t\t\t\t\t\tFROM\tmotorpass_account ma\n\t\t\t\t\t\t\tWHERE\tma.id = NEW.motorpass_account_id;\n\n\t\t\t\t\t\t\tSELECT\tma.account_number\n\t\t\t\t\t\t\tINTO\tacc_num\n\t\t\t\t\t\t\tFROM\tmotorpass_account ma\n\t\t\t\t\t\t\tWHERE\tma.id = NEW.motorpass_account_id;\n\n\t\t\t\t\t\t\tSELECT\tmc.card_expiry_date\n\t\t\t\t\t\t\tINTO\texpiry\n\t\t\t\t\t\t\tFROM\tmotorpass_account ma\n\t\t\t\t\t\t\tJOIN\tmotorpass_card mc\n\t\t\t\t\t\t\t\t\t\tON ma.motorpass_card_id = mc.id\n\t\t\t\t\t\t\tWHERE\tma.id = NEW.motorpass_account_id;\n\n\t\t\t\t\t\t\tNEW.account_name := acc_name;\n\t\t\t\t\t\t\tNEW.account_number := acc_num;\n\t\t\t\t\t\t\tNEW.card_expiry_date := expiry;\n\n\t\t\t\t\t\t\tRETURN NEW;\n\t\t\t\t\t\tEND IF;\n\t\t\t\t\t\tRETURN NULL;\n\t\t\t\t\tEND;\n\t\t\t\t\t' LANGUAGE 'plpgsql'\",\n\t\t\t\"\tCREATE OR REPLACE FUNCTION rebillMotorpassUpdateAccountNameAndNumber() RETURNS trigger AS '\n\t\t\t\t\tBEGIN\n\t\t\t\t\t\tUPDATE\trebill_motorpass rm\n\t\t\t\t\t\tSET\trm.account_number = NEW.account_number,\n\t\t\t\t\t\t\trm.account_name = NEW.account_name\n\t\t\t\t\t\tWHERE\trm.motorpass_account_id = NEW.id;\n\t\t\t\t\t\tRETURN NEW;\n\t\t\t\t\tEND;\n\t\t\t\t' LANGUAGE 'plpgsql'\",\n\t\t\t\"CREATE OR REPLACE FUNCTION rebillMotorpassUpdateCardExpiryDate() RETURNS trigger AS '\n\t\t\t\tBEGIN\n\t\t\t\t\tUPDATE\trebill_motorpass rm\n\t\t\t\t\tSET\trm.card_expiry_date = NEW.card_expiry_date\n\t\t\t\t\tWHERE\trm.motorpass_account_id IN (\n\t\t\t\t\t\t\t\tSELECT\tma.id\n\t\t\t\t\t\t\t\tFROM\tmotorpass_account ma\n\t\t\t\t\t\t\t\tWHERE\tma.motorpass_card_id = NEW.id);\n\t\t\t\t\tRETURN NEW;\n\t\t\t\tEND;\n\t\t\t\t' LANGUAGE 'plpgsql'\");\n\n\t\t$aTriggers = array('CREATE TRIGGER rebill_motorpass_insert\n\t\t\t\t\t\t\tBEFORE INSERT ON <schema_name>.rebill_motorpass\n\t\t\t\t\t\t\tFOR EACH ROW\n\t\t\t\t\t\t\tEXECUTE PROCEDURE rebillMotorpassInsertAndUpdate()'\n\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t'CREATE TRIGGER rebill_motorpass_update\n\t\t\t\t\t\t\tBEFORE UPDATE ON <schema_name>.rebill_motorpass\n\t\t\t\t\t\t\tFOR EACH ROW\n\t\t\t\t\t\t\tEXECUTE PROCEDURE rebillMotorpassInsertAndUpdate()'\n\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\"CREATE TRIGGER rebill_motorpass_account_name_and_number\n\t\t\t\t\t\t\tAFTER UPDATE ON <schema_name>.motorpass_account\n\t\t\t\t\t\t\tFOR EACH ROW\n\t\t\t\t\t\t\tEXECUTE PROCEDURE rebillMotorpassUpdateAccountNameAndNumber()\"\n\t\t\t\t\t\t\t,\n\t\t\t\t\t\t\t\"CREATE TRIGGER rebill_motorpass_card_expiry_date\n\t\t\t\t\t\t\tAFTER UPDATE ON <schema_name>.motorpass_card\n\t\t\t\t\t\t\tFOR EACH ROW\n\t\t\t\t\t\t\tEXECUTE PROCEDURE rebillMotorpassUpdateCardExpiryDate()\"\n\n\t\t\t);\n\t\t\n\t\t// Add details for tables not to be migrated\n\t\tforeach (self::$_aTablesToNotMigrate as $sTable) {\n\t\t\tif (!isset($aTables[$sTable])) {\n\t\t\t\t$aTables[$sTable] = array();\n\t\t\t}\n\t\t\t\n\t\t\t$aTables[$sTable]['bDoNotMigrate'] = true;\n\t\t}\n\t\t\n\t\tLog::getLog()->log(\"Total Changes: {$iTotalChanges}\");\n\t\treturn array('oTables' => $aTables, 'oViews' => $aViews, 'oProcedures' => $aStoredProcedures, 'oTriggers' => $aTriggers);\n\t}", "title": "" }, { "docid": "1a8673f41c6f1e860080fe1462ca3d7b", "score": "0.49043435", "text": "public function splitOrders($ordersArray, $store){\n\t\t// set up basic connection\n\t\t$conn_id = ftp_connect(SPS_FTP_SERVER);\n\t\t$login_result = ftp_login($conn_id, SPS_FTP_USERNAME, SPS_FTP_USERPASS);\n\t\tif ((!$conn_id) || (!$login_result)) { \n\t\t\tLog::error(\"FTP connection has failed! Attempted to connect to \" . SPS_FTP_SERVER . \" for user \" . SPS_FTP_USERNAME);\n\t\t\texit;\n\t\t} else {\n\t\t\tLog::info(\"Connected to \" . SPS_FTP_SERVER . \" for user \" . SPS_FTP_USERNAME);\n\t\t}\n\t\tftp_pasv($conn_id, true);\n\t\t\t\t\n\t\t// Create new XML file for each\torder\t\n\t\tforeach($ordersArray as $order){\n\t\t\t// Create DOMDocument Object to hold XML\n\t\t\t$orderFile = new \\DOMDocument('1.0');\n\t\t\t$orderFile->preserveWhiteSpace = true;\n\t\t\t$orderFile->formatOutput = true;\n\t\t\t// Add Order to document\n\t\t\t$orderFile->loadXML($order);\n\t\t\t// Save file with Order ID in file name\n\t\t\t$orderIdNode = $orderFile->getElementsByTagName(\"id\");\n\t\t\t$orderId = $orderIdNode[0]->nodeValue;\n\t\t\t$orderFile->save(resource_path('inc/xml/test/' . $store . \"Order_\" . $orderId . '.xml'));\n\t\t\t// Upload file to SPSCommerce via FTP\n\t\t\t$file = resource_path('inc/xml/test/' . $store . \"Order_\" . $orderId . \".xml\");\n\t\t\t$destination = \"/sftp-arp-root/HEX/in/\" . $store . \"Order_\" . $orderId . \".xml\";\n\t\t\t$upload = ftp_put($conn_id, $destination, $file, FTP_ASCII);\n\t\t\tif (!$upload) {\n\t\t\t\tLog::error(\"FTP upload of $file has failed!\");\n\t\t\t} \n\t\t}\n\t\tftp_close($conn_id);\n\t}", "title": "" }, { "docid": "803fb488b7fc292a56b07c8473e43929", "score": "0.49031714", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_job_question_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_fetch_job_question_fids';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "635115745f7ca077a1ff7ecd1dd2001b", "score": "0.48930788", "text": "public function _processNewFileObjects()\n\t{\n\t\t//check if file_obj_a empty so don't do anything\n\t\tif(empty($this->_file_obj_a))\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\t//turn off commit\n\t\t$this->file_manager_db->commitOff();\n\n\t\t//now update the records\n\t\tforeach($this->_file_obj_a as $file_manager_id => $file_obj)\n\t\t{\n\t\t\tif(!$this->file_manager_db->updateFileManagerAllDetails($file_obj))\n\t\t\t{\n\t\t\t\t//delete the record just in case\n\t\t\t\t$this->file_manager_db->deleteFileManagerId($file_manager_id);\n\n\t\t\t\t//delete files to make sure it is all cleaned up\n\t\t\t\t$this->_deleteFile($file_obj->getDir(),$file_manager_id);\n\t\t\t}\n\t\t}\n\n\t\t//turn on commit\n\t\t$this->file_manager_db->commit();\n\t\t$this->file_manager_db->commitOn();\n\n\t\t//reset file_obj_a just in case\n\t\t$this->_file_obj_a = array();\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "7bcac1b7de806fcdbd1f9947e436e572", "score": "0.48896116", "text": "public function run()\n {\n $images = Image::all();\n\n foreach ($images as $image) {\n if(!$image->order) {\n $image->order = $image->id;\n $image->save();\n }\n }\n }", "title": "" }, { "docid": "2b79931f0c7214d3adef0e1d3c70d3a6", "score": "0.48879036", "text": "function drush_whiteboard_migration_migrate_whiteboard_files_sent_to_c() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_fetch_job_files_to_c_fids';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "676831b0aae6011ed35d541d22889aca", "score": "0.4881242", "text": "function sortPageOrder($present_sortid,$future_sortid,$current_pageID){\n\t\t$dbobj = new Cdb(SERVER, DBNAME, DBUSER, DBPASS); \n\t\t$dbobj->connectDB();\n\t\tif($present_sortid!='' && $future_sortid!=''){\n\t\t$dbobj->updateInDB(\"sortOrder='\".$present_sortid.\"'\",\"sortOrder='\".$future_sortid.\"'\",\"contentspagetemplate\");\n\t\t$dbobj->updateInDB(\"sortOrder='\".$future_sortid.\"'\",\"ContentPageID='\".$current_pageID.\"'\",\"contentspagetemplate\");\n\t\t}\n\t\t$dbobj->disconnectDB();\n\t}", "title": "" }, { "docid": "773a8107fd5bd9937e4198638bd05a44", "score": "0.4871734", "text": "function _removeOldFiles()\n\t{\n\t\tJoomlapackLogger::WriteLog(_JP_LOG_DEBUG, \"JoomlapackDomainDBBackup :: Deleting leftover files, if any\");\n\t\tif( file_exists( $this->_tempFile ) ) @unlink( $this->_tempFile );\n\t}", "title": "" }, { "docid": "18783d91af72673ba2cba524b1d4bbfa", "score": "0.48617062", "text": "function compare_start_store_cron_job(){\r\n\tglobal $wpdb;\r\n\t$stores = $wpdb->get_results( \"SELECT * FROM {$wpdb->prefix}stores WHERE store_status = '1' AND store_xml_feed <> ''\" );\r\n\tif( !empty( $stores ) ){\r\n\t\t$content = date_i18n( 'm/d/Y H:i', current_time( 'timestamp' ) );\r\n\t\tforeach( $stores as $store ){\r\n\t\t\t$store_id = $store->store_id;\r\n\t\t\tob_start();\r\n\t\t\tinclude( locate_template('includes/import/import-store.php') );\r\n\t\t\t$content .= ob_get_contents();\r\n\t\t\tob_end_clean();\r\n\t\t\t$content .= \"\\n\\n\";\r\n\t\t}\r\n\t\t$content = str_replace( \"<br/>\", \"\\n\", $content );\r\n\t\t$content = str_replace( \"<br />\", \"\", $content );\r\n\t\t$log_file = get_template_directory().'/store-import-log.txt';\r\n\t\tWP_Filesystem();\r\n\t\tglobal $wp_filesystem;\r\n\t\tif( file_exists( $log_file ) ){\r\n\t\t\t$old_content = $wp_filesystem->get_contents( $log_file );\r\n\t\t\t$content = $content.$old_content.\"\\n\\n\\n\\n\";\r\n\t\t}\r\n\t\t$wp_filesystem->put_contents( $log_file, $content );\r\n\t}\r\n}", "title": "" }, { "docid": "97f03f4cec78810355fe8aac1d6908fe", "score": "0.48554453", "text": "private function _processFileIntoDB(){\n\t\t// Also, set the member_expire date to today. This way, we can delete them perm from the system\n\t\t// after a year.\n\t\n\t\t\tif( is_array( $this->Get_Data('removed_users') ) && count( $this->Get_Data('removed_users') ) ) {\n\n\t\t\t\t$sql = \"UPDATE member set member_status=\". STATUS_NOT_LIVE . \", member_expire_date=\".$this->dbReady(mktime(), true).\" where member_email in (\";\n\t\t\t\t$x=0;\n\t\t\t\tforeach( $this->Get_Data('removed_users') as $key=>$val) {\n\t\t\t\t\t$x++;\n\t\t\t\t\t$sql .= ($x==count($this->Get_Data('removed_users')))? $this->dbReady( strtolower( $key ), true ):$this->dbReady( strtolower( $key ) );\n\t\t\t\t}\n\t\t\t\t$sql .= \")\";\n\t\t\t\t\n\t\t\t\t$this->Execute($sql);\n\t\t\t}\n\n\t\t\t\n\t\t// Next, add the new users to the DB, but double check that they aren't already in the db with a status of 2!\n\t\t\tif( is_array( $this->Get_Data('new_users') ) && count( $this->Get_Data('new_users') ) ) {\n\t\t\t\t$x=0;\n\t\t\t\tforeach( $this->Get_Data('new_users') as $nui_key=>$new_user_item ) {\n\t\t\t\t\t $status_flag = NULL;\n\t\t\t\t\t// Let's check to see if the email already exists so we can just switch the status flag\n\t\t\t\t\t\tif( $status_flag = $this->doesEmailExist( $new_user_item[ 2 ] ) ) {\n\t\t\t\t\t\t\tif( $status_flag == STATUS_NOT_LIVE ){ // We found them, make 'em live... they paid their bill.\n\t\t\t\t\t\t\t\t$sql =\"UPDATE member set member_status=\". STATUS_LIVE . \", member_expire_date=NULL where member_email=\".$this->dbReady( strtolower( $new_user_item[2] ) , true);\n\t\t\t\t\t\t\t\t$this->Execute($sql);\n\t\t\t\t\t\t\t} else {\t// What??? They are in the database AND their status is 1??? WTF? How did they get this far!\n\t\t\t\t\t\t\t\tprint \"JUST A WARNING:\". $new_user_item[ 2 ] .\" must be exported twice... Why is that?<br />\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t// Ok, it's a new member!\n\t\t\t\t\t\t\t$sql = \"INSERT into member (member_email, member_name_first, member_name_last) values (\";\n\t\t\t\t\t\t\t$sql .= $this->dbReady( strtolower( $new_user_item[ 2 ] ) );\n\t\t\t\t\t\t\t$sql .= $this->dbReady( $new_user_item[ 0 ] );\n\t\t\t\t\t\t\t$sql .= $this->dbReady( $new_user_item[ 1 ], true ) . \")\";\n\t\t\t\t\t\t\t$this->Execute($sql);\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "043e2aef7958a5f837cd49f39dc6d2d8", "score": "0.48498926", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_enquiry_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_fetch_job_enquiry_fids';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "b620eaa146dc45d044827403ba235cda", "score": "0.4844946", "text": "function get_backup_dbs() {\n global $db;\n $oldfetch = $db->SetFetchMode(ADODB_FETCH_ASSOC);\n $res = $db->Execute(\"SELECT `archive` from `GLOBAL_archive_data`\" .\n \"order by `creation` desc\");\n $dbnames = array();\n while ($row = $res->FetchRow()) {\n $dbnames[] = $row['archive'];\n }\n $db->SetFetchMode($oldfetch);\n return $dbnames;\n}", "title": "" }, { "docid": "e3710cb52d48e58c21b41b11288d5d57", "score": "0.48432133", "text": "public function readdata() \n {\n \n \n $dir = scandir($this->dirName);\n \n foreach($dir as $key => $data){\n if($key>1){ \n $batchsequence = false;\n if(substr($data, 0, 13)==$this->filePreFix)\n {\n $this->readReplyFile($data);\n }\n }\n \n } \n }", "title": "" }, { "docid": "80118bbba60b2d813a0d72d7ace744b3", "score": "0.48324937", "text": "function emp_add_tables()\n{\n $sql = file_get_contents(ABSPATH . 'wp-content/plugins/employees-data/test-tables/test.sql');\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n}", "title": "" }, { "docid": "d0360447ec74fb4d2727164eff9387c0", "score": "0.48298174", "text": "public function syncFiles() {\n\t\tglobal $wpdb;\n\n\t\t$this->createConnection();\n\n\t\tif (isset(CST_Page::$messages) && !empty(CST_Page::$messages)) {\n\t\t\tforeach (CST_Page::$messages as $message) {\n\t\t\t\techo $message;\n\t\t\t}\n\t\t\texit;\n\t\t}\n\t\t\n\t\tif ($this->connectionType == 'Origin') {\n\t\t\techo '<div class=\"cst-progress\">Sync not required on origin pull CDNs.';\n\t\t} else {\n\t\t\t$this->findFiles();\n\t\t\t\n\t\t\t$filesToSync = $wpdb->get_results(\"SELECT * FROM `\".CST_TABLE_FILES.\"` WHERE `synced` = '0'\", ARRAY_A);\n\t\t\t$total = count($filesToSync);\n\t\t\t$i = 1;\n\t\t\techo '<h2>Syncing Files..</h2>';\n\t\t\techo '<div class=\"cst-progress\" style=\"height: 500px; overflow: auto;\">';\n\t\t\tforeach($filesToSync as $file) {\n\t\t\t\t$this->pushFile($file['file_dir'], $file['remote_path']);\n\t\t\t\t$padstr = str_pad(\"\", 512, \" \");\n\t\t\t\techo $padstr;\n\t\t\t\techo 'Syncing ['.$i.'/'.$total.'] '.$file['remote_path'].'<br />';\n\t\t\t\tflush();\n\t\t\t\t$i++;\n\t\t\t\t$wpdb->update(\n\t\t\t\t\tCST_TABLE_FILES,\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'synced' => '1'\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'id' => $file['id']\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\t\t\techo 'All files synced.';\n\t\t}\n\t\techo '</div><br /><br />Return to <a href=\"'.CST_URL.'?page=cst\">CST Options</a>.';\n\t}", "title": "" }, { "docid": "42d0b1cff0d75489c51a7d31aac91567", "score": "0.48124722", "text": "function doReorder($table, $moveto, $update_array, $where_array)\n {\n global $serendipity;\n\n if (is_array($update_array) && is_array($where_array)) {\n $where = '';\n foreach ($where_array as $key => $value) {\n if (strlen($where)) {\n $where .= ' AND ';\n }\n $where .= $key . ' = ' . $value;\n }\n $q = 'SELECT '.implode(\", \", array_keys($update_array)).'\n FROM '. $serendipity['dbPrefix'] . $table .'\n WHERE '.$where;\n $old = serendipity_db_query($q, true, 'assoc');\n\n if (is_array($old)) {\n $where = array();\n $update = array();\n switch ($moveto) {\n case 'up':\n foreach ($update_array as $key => $value) {\n if ($value) {\n $where[$key] = ($old[$key] - 1);\n $update[$key] = $old[$key];\n $update_1[$key] = ($old[$key] - 1);\n } else {\n $where[$key] = $old[$key];\n }\n }\n break;\n case 'down':\n foreach ($update_array as $key => $value) {\n if ($value) {\n $where[$key] = ($old[$key] + 1);\n $update[$key] = $old[$key];\n $update_1[$key] = ($old[$key] + 1);\n } else {\n $where[$key] = $old[$key];\n }\n }\n break;\n default:\n return false;\n }\n serendipity_db_update($table, $where, $update);\n serendipity_db_update($table, $where_array, $update_1);\n return true;\n }\n }\n return false;\n }", "title": "" }, { "docid": "bb0b535b418bdb9410e7d217b8735400", "score": "0.48114258", "text": "function drush_whiteboard_migration_migrate_whiteboard_invoices_upload() {\n $files = whiteboard_migration_select_unmigrated_files('invoice');\n whiteboard_migration_create_batch($files, 50,\n 'whiteboard_migration_move_invoice_files_to_s3',\n 'whiteboard_migration_invoice_batch_complete',\n 'Batch Process for moving files to s3.'\n );\n}", "title": "" }, { "docid": "80887a1b39ce2fa299142d4ab4b91e02", "score": "0.48097485", "text": "function uploadSql( &$args, $migration = false, $preconverted = false )\n\t{\n\t\tglobal $app;\n\t\t$archive = '';\n\t\t$script = '';\n\n\t\t/*\n\t\t * Check for iconv\n\t\t */\n\t\tif ($migration && !$preconverted && !function_exists( 'iconv' ) ) {\n\t\t\treturn JText::_( 'WARNICONV' );\n\t\t}\n\n\n\t\t/*\n\t\t * Get the uploaded file information\n\t\t */\n\t\tif( $migration )\n\t\t{\n\t\t\t$sqlFile\t= JFactory::getApplication()->input->getVar('migrationFile', '', 'files', 'array');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sqlFile\t= JFactory::getApplication()->input->getVar('sqlFile', '', 'files', 'array');\n\t\t}\n\n\t\t/*\n\t\t * Make sure that file uploads are enabled in php\n\t\t */\n\t\tif (!(bool) ini_get('file_uploads'))\n\t\t{\n\t\t\treturn JText::_('WARNINSTALLFILE');\n\t\t}\n\n\t\t/*\n\t\t * Make sure that zlib is loaded so that the package can be unpacked\n\t\t */\n\t\tif (!extension_loaded('zlib'))\n\t\t{\n\t\t\treturn JText::_('WARNINSTALLZLIB');\n\t\t}\n\n\t\t/*\n\t\t * If there is no uploaded file, we have a problem...\n\t\t */\n\t\tif (!is_array($sqlFile) || $sqlFile['size'] < 1)\n\t\t{\n\t\t\treturn JText::_('WARNNOFILE');\n\t\t}\n\n\t\t/*\n\t\t * Move uploaded file\n\t\t */\n\t\t// Set permissions for tmp dir\n\t\tJInstallationHelper::_chmod(JPATH_SITE.DS.'tmp', 0777);\n\t\tjimport('joomla.filesystem.file');\n\t\t$uploaded = JFile::upload($sqlFile['tmp_name'], JPATH_SITE.DS.'tmp'.DS.$sqlFile['name']);\n\t\tif(!$uploaded) {\n\t\t\treturn JText::_('WARNUPLOADFAILURE');\n\t\t}\n\n\t\tif( !preg_match('#\\.sql$#i', $sqlFile['name']) )\n\t\t{\n\t\t\t$archive = JPATH_SITE.DS.'tmp'.DS.$sqlFile['name'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$script = JPATH_SITE.DS.'tmp'.DS.$sqlFile['name'];\n\t\t}\n\n\t\t// unpack archived sql files\n\t\tif ($archive )\n\t\t{\n\t\t\t$package = JInstallationHelper::unpack( $archive, $args );\n\t\t\tif ( $package === false )\n\t\t\t{\n\t\t\t\treturn JText::_('WARNUNPACK');\n\t\t\t}\n\t\t\t$script = $package['folder'].DS.$package['script'];\n\t\t}\n\n\t\t$db = & JInstallationHelper::getDBO($args['DBtype'], $args['DBhostname'], $args['DBuserName'], $args['DBpassword'], $args['DBname'], $args['DBPrefix']);\n\n\t\t/*\n\t\t * If migration perform manipulations on script file before population\n\t\t */\n\t\tif ( $migration )\n\t\t{\n\t\t\t$script = JInstallationHelper::preMigrate($script, $args, $db);\n\t\t\tif ( $script == false )\n\t\t\t{\n\t\t\t\treturn JText::_( 'Script operations failed' );\n\t\t\t}\n\t\t}\n\n\t\t$errors = null;\n\t\t$msg = '';\n\t\t$result = JInstallationHelper::populateDatabase($db, $script, $errors);\n\n\t\t/*\n\t\t * If migration, perform post population manipulations (menu table construction)\n\t\t */\n\t\t$migErrors = null;\n\t\tif ( $migration )\n\t\t{\n\t\t\t$migResult = JInstallationHelper::postMigrate( $db, $migErrors, $args );\n\n\t\t\tif ( $migResult != 0 )\n\t\t\t{\n\t\t\t\t/*\n\t\t\t\t * Merge populate and migrate processing errors\n\t\t\t\t */\n\t\t\t\tif( $result == 0 )\n\t\t\t\t{\n\t\t\t\t\t$result = $migResult;\n\t\t\t\t\t$errors = $migErrors;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$result += $migResult;\n\t\t\t\t\t$errors = array_merge( $errors, $migErrors );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t/*\n\t\t * prepare sql error messages if returned from populate and migrate\n\t\t */\n\t\tif (!is_null($errors))\n\t\t{\n\t\t\tforeach($errors as $error)\n\t\t\t{\n\t\t\t\t$msg .= stripslashes( $error['msg'] );\n\t\t\t\t$msg .= chr(13).\"-------------\".chr(13);\n\t\t\t\t$txt = '<textarea cols=\"40\" rows=\"4\" name=\"instDefault\" readonly=\"readonly\" >'.JText::_(\"Database Errors Reported\").chr(13).$msg.'</textarea>';\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// consider other possible errors from populate\n\t\t\t$msg = $result == 0 ? JText::_('SQL script installed successfully') : JText::_('Error installing SQL script') ;\n\t\t\t$txt = '<input size=\"50\" value=\"'.$msg.'\" readonly=\"readonly\" />';\n\t\t}\n\n\t\t/*\n\t\t * Clean up\n\t\t */\n\t\tif ($archive)\n\t\t{\n\t\t\tJFile::delete( $archive );\n\t\t\tJFolder::delete( $package['folder'] );\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJFile::delete( $script );\n\t\t}\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "7562ac151e4b3cec4e311b96aff0b6a4", "score": "0.48090544", "text": "function jd_file_latest_updated($matches){\n global $jDFPrank, $jDFPcatids, $jlistConfigM;\n \n $db = JFactory::getDBO();\n $user = JFactory::getUser();\n \n $query = $db->getQuery(true);\n $groups = implode(',', $user->getAuthorisedViewLevels());\n \n $jDFPcatids = '';\n $bidon = getCategoryIDs(0);\n\n $days = $jlistConfigM['days.is.file.updated'];\n if (!$days) $days = 15;\n\n $until_day = mktime(0,0,0,date(\"m\"), date(\"d\")-$days, date(\"Y\"));\n $until = date('Y-m-d H:m:s', $until_day);\n\n $filesql =\"SELECT file_id FROM #__jdownloads_files WHERE cat_id IN (\".$jDFPcatids.\") AND (update_active = 1) AND (modified_date >= '.$until.') AND access IN ($groups) AND published = 1 ORDER BY {dado} DESC LIMIT \".$db->escape($matches[2]).\";\";\n \n if ($matches[1] == 'updated'){\n $filesql = str_replace(\"{dado}\",'modified_date',$filesql);\n } else {\n $filesql = str_replace(\"{dado}\",'downloads',$filesql);\n }\n\n $db->setQuery($filesql);\n $files = $db->loadObjectList();\n \n $filetable = '';\n $jDFPrank = 1;\n \n if ($files){\n foreach ($files as $thefile){\n $sim_matches = array(\"\", \"file\", $thefile->file_id);\n $filetable .= jd_file_createdownload($sim_matches);\n $jDFPrank++;\n }\n }\n return $filetable;\n }", "title": "" }, { "docid": "dd649336b0f5d45dbdbe5855300ef18a", "score": "0.4807808", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_job_question_extra_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_job_quesiton_extra_files';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "76955ba5e68cb6f4836356e3fb6718e4", "score": "0.48073173", "text": "function archive($tab)\n{\n\t//to put in log file\n\t$moved = array();\n\n\tif (!is_dir(SOURCEDIR . ARCHIVES))\n\t{\n\t\tmkdir(SOURCEDIR . ARCHIVES);\n\t}\n\n\tif (!is_dir(RAWDIR . ARCHIVES))\n\t{\n\t\tmkdir(RAWDIR . ARCHIVES);\n\t}\n\n\tforeach ($tab as $elem => $nothing)\n\t{\n\t\t$pdfFile = findFile($elem);\n\t\t$rawFile = findFile($elem, RAWDIR, RAW_EXT);\n\n\t\tif (is_file($pdfFile))\n\t\t{\n\t\t\t//move to the archives dir\n\t\t\tif (rename($pdfFile, SOURCEDIR . ARCHIVES . \"$elem.\" . pathinfo($pdfFile, PATHINFO_EXTENSION)))\n\t\t\t{\n\t\t\t\t$moved[] = $pdfFile;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$moved[] = \"tried $pdfFile but couldn't\";\n\t\t\t}\n\t\t}\n\n\t\tif (is_file($rawFile))\n\t\t{\n\t\t\tif (rename($rawFile, RAWDIR . ARCHIVES . \"$elem.\" . pathinfo($rawFile, PATHINFO_EXTENSION)))\n\t\t\t{\n\t\t\t\t$moved[] = $rawFile;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$moved[] = \"tried $rawFile but couldn't\";\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!empty ($moved))\n\t{\n\t\taddLog(logmsg(\"Archived \" . implode(' ', $moved) , true));\n\t}\n}", "title": "" }, { "docid": "1d2751e43b9629a9b68bd715b5565574", "score": "0.48011547", "text": "protected function migrateBlobs() {\n\t\t// stop if prior migrations haven't finished\n\t\tif ( !($this->finishState['fal_blob'] && $this->finishState['item']) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$sourceTable = 'tx_' . $this->sourceExtensionKey . '_item';\n\t\t$sourceDataTable = 'tx_' . $this->sourceExtensionKey . '_itemfield';\n\t\t$sourceMmTable = 'tx_' . $this->sourceExtensionKey . '_item_mm';\n\t\t$targetTable = 'tx_' . $this->extensionKey . '_domain_model_itemblob';\n\t\t$propertyMap = [\n\t\t\t'pid' => 'pid',\n\t\t\t'item_key' => 'item_key',\n\t\t\t'sequence' => 'sequence',\n\t\t\t//'file' => 'file',\n\t\t\t'item' => 'item',\n\t\t\t'tstamp' => 'tstamp',\n\t\t\t'crdate' => 'crdate',\n\t\t\t'cruser_id' => 'cruser_id',\n\t\t\t'deleted' => 'deleted',\n\t\t\t'hidden' => 'hidden',\n\t\t\t'starttime' => 'starttime',\n\t\t\t'endtime' => 'endtime'\n\t\t];\n\n\t\t// query to get all BLOB item records in correct order with all relevant properties attached\n\t\t$select = 'it.pid AS pid,it.itemkey AS item_key,itf1.fieldvalue AS sequence,\n\t\t\tit.migrated_file AS file,it2.migrated_uid AS item,it.tstamp AS tstamp,\n\t\t\tit.crdate AS crdate,it.cruser_id AS cruser_id,it.deleted AS deleted,\n\t\t\tit.hidden AS hidden,it.starttime AS starttime,it.endtime AS endtime,\n\t\t\tit.uid AS uid,UNIX_TIMESTAMP(itf2.fieldvalue) AS docdate';\n\t\t$from = sprintf(\n\t\t\t'%1$s it\n\t\t\tLEFT JOIN %2$s itf1 ON (it.uid = itf1.item_id AND itf1.fieldname=\\'SEQUENCE\\')\n\t\t\tLEFT JOIN %2$s itf2 ON (it.uid = itf2.item_id AND itf2.fieldname=\\'DOCUMENT_DATE\\')\n\t\t\tLEFT JOIN (%3$s itr,%1$s it2) ON (it.uid = itr.uid_local AND itr.uid_foreign = it2.uid)',\n\t\t\t$sourceTable,\n\t\t\t$sourceDataTable,\n\t\t\t$sourceMmTable\n\t\t);\n\t\t$where = 'it.itemtype = \\'BLOB\\'\n\t\t\tAND it.migrated_uid = 0 AND it.no_migrate = 0\n\t\t\tAND it2.migrated_uid > 0';\n\t\t// note that docdate is only used for extra sorting, if sequence is not provided\n\t\t$orderBy = 'item ASC,sequence ASC,docdate ASC,uid ASC';\n\n\t\t$max = $this->databaseService->countTableRecords($from, $where);\n\n\t\t// no results means we're done migrating\n\t\tif ($max === 0) {\n\t\t\t$this->finishState['blob'] = TRUE;\n\t\t\treturn;\n\t\t}\n\n\t\t$this->io->text('Migrate BLOB items to itemblob table.');\n\t\t$this->io->progressStart($max);\n\n\t\t$count = 0;\n\t\t$parentItem = 0;\n\t\t$sequence = 0;\n\t\twhile ($count < $max) {\n\n\t\t\t$toMigrate = $this->databaseService->selectTableRecords($from, $where, $select, 5, $orderBy);\n\n\t\t\t// first check for:\n\t\t\t// - file id's not set to <1, we skip these from insert but not from update\n\t\t\t// - fields that aren't in propertyMap\n\t\t\t// - missing sequences and provide them if necessary\n\t\t\t$toInsert = [];\n\t\t\t$remainder = [];\n\t\t\t$fileUid = [];\n\t\t\tforeach ($toMigrate as $uid => $row) {\n\t\t\t\tif ((int) $row['file'] > 0) {\n\t\t\t\t\t$fileUid[$uid] = (int) $row['file'];\n\t\t\t\t\t// it's a bit hacky, but meh, it's just a few lines in an update script\n\t\t\t\t\tunset($row['file']);\n\t\t\t\t\tunset($row['docdate']);\n\t\t\t\t\tunset($row['uid']);\n\t\t\t\t\tif (isset($row['sequence'])) {\n\t\t\t\t\t\t$sequence = $row['sequence'];\n\t\t\t\t\t\t$parentItem = (int) $row['item'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ($parentItem !== (int) $row['item']) {\n\t\t\t\t\t\t\t// it only gets here if the entire parent-item has no blobs with a sequence set\n\t\t\t\t\t\t\t$sequence = 1;\n\t\t\t\t\t\t\t$parentItem = (int) $row['item'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// this way, we always start with 1 or do +1 for a single parent-item\n\t\t\t\t\t\t$row['sequence'] = $sequence++;\n\t\t\t\t\t}\n\n\t\t\t\t\t$toInsert[$uid] = $row;\n\t\t\t\t} else {\n\t\t\t\t\t// these are registered to flag as no_migrate = 1\n\t\t\t\t\t$remainder[] = $uid;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($toInsert)) {\n\t\t\t\t// insert!\n\t\t\t\t$this->databaseService->insertTableRecords(\n\t\t\t\t\t$targetTable, $propertyMap, $toInsert\n\t\t\t\t);\n\t\t\t\t// not nice, but it's a very specific part of an update script, I really don't care\n\t\t\t\t// get first insert ID\n\t\t\t\t// @extensionScannerIgnoreLine TYPO3_DB-usage needs a rewrite anyway once this ext goes standalone\n\t\t\t\t$i = $GLOBALS['TYPO3_DB']->sql_insert_id();\n\t\t\t\tforeach ($toInsert as $uid => $row) {\n\t\t\t\t\t// update migrated_uid for inserted records\n\t\t\t\t\t$this->databaseService->updateTableRecords($sourceTable, ['migrated_uid' => $i], ['uid' => $uid]);\n\t\t\t\t\t// create the file reference\n\t\t\t\t\t$this->fileService->setFileReference($fileUid[$uid], $targetTable, $i++, 'file', (int) $row['pid']);\n\t\t\t\t\t// for every $toInsert, there is a matching $fileUid, so no need for a condition\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($remainder)) {\n\t\t\t\t// set no_migrate to 1 for records that did not meet criteria\n\t\t\t\t$this->databaseService->updateTableRecords(\n\t\t\t\t\t$sourceTable,\n\t\t\t\t\t['no_migrate' => 1],\n\t\t\t\t\t['uid' => [\n\t\t\t\t\t\t'operator' => ' IN (%1$s)',\n\t\t\t\t\t\t'no_quote' => TRUE,\n\t\t\t\t\t\t'value' => '\\'' . join('\\',\\'', $remainder) . '\\''\n\t\t\t\t\t]]\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// set no_migrate to 1 for all itemfields of these records\n\t\t\t$this->databaseService->updateTableRecords(\n\t\t\t\t$sourceDataTable,\n\t\t\t\t['no_migrate' => 1],\n\t\t\t\t['item_id' => [\n\t\t\t\t\t'operator' => ' IN (%1$s)',\n\t\t\t\t\t'no_quote' => TRUE,\n\t\t\t\t\t'value' => '\\'' . join('\\',\\'', array_keys($toMigrate)) . '\\''\n\t\t\t\t]]\n\t\t\t);\n\n\t\t\t$steps = count($toMigrate);\n\t\t\t$count += $steps;\n\t\t\t$this->io->progressAdvance($steps);\n\t\t}\n\n\t\t$this->io->newLine(2);\n\t\t$this->addMessage(\n\t\t\tsprintf($this->lang['migrateSuccess'], $targetTable, $count),\n\t\t\t'',\n\t\t\tFlashMessage::OK\n\t\t);\n\n\t\t$this->finishState['blob'] = TRUE;\n\t}", "title": "" }, { "docid": "6fd56fbfd5e455d24ed0ed7734db8404", "score": "0.47830883", "text": "public function syncSources() {\n // Select all files from db in array format\n $qb = Db::get()->createQueryBuilder();\n $dbFiles = $qb\n ->select('f')\n ->from('MyTravel\\Core\\Model\\File', 'f')\n ->getQuery()\n ->getArrayResult();\n $dbFileSources = array_column($dbFiles, 'source', 'id');\n // Fetch all files from files directory\n $dirFiles = Finder::create()\n ->files()\n ->followLinks() // Follow symbolic links!\n ->in(Config::get()->directories['files']);\n $i = 0;\n foreach ($dirFiles as $splFile) {\n $filePathName = str_replace('\\\\', '/', $splFile->getRelativePathname());\n $id = array_search($filePathName, $dbFileSources);\n if ($id !== false) {\n // Skip already recorded files\n unset($dbFileSources[$id]);\n continue;\n }\n ++$i;\n $file = new File($splFile);\n Db::get()->persist($file);\n if (($i % Db::BATCHSIZE) === 0) {\n Db::get()->flush();\n Db::get()->clear(); // Detaches all objects from Doctrine!\n }\n }\n // Remove orphan records\n foreach ($dbFileSources as $id => $data) {\n $df = new File();\n $df->id = $id;\n $file = Db::get()->merge($df);\n Db::get()->remove($file);\n }\n Db::get()->flush(); //Persist objects that did not make up an entire batch\n Db::get()->clear();\n //\n return array_keys($dbFileSources);\n }", "title": "" }, { "docid": "32a90d7d40aef18e6250805823cd7ec1", "score": "0.4777131", "text": "public function sortMediaOrderList($sortList){\n\t\tif(!empty($sortList)){\n\t\t\t$tempArray = explode(\",\",$sortList);\n\t \tforeach ($tempArray as $key => $temp) {\n\t \t\tif(!empty($temp)){\n\t \t\t\t$data = explode(\"_\",trim($temp));\n\t \t\t\tif(!empty($data[0]) && !empty($data[1])){\n\t \t\t\t\tif($data[0] == 'media'){\n\t \t\t\t\t\t$media = Media::find($data[1]);\n\t \t\t\t\t\tif($media){\n\t\t \t\t\t\t\t$media->position=$key+1;\n\t\t\t\t\t\t\t\t$media->save();\n\t\t\t\t\t\t\t}\n\t \t\t\t\t}else{\n\t \t\t\t\t\t$media = TempMedia::find($data[1]);\n\t \t\t\t\t\tif($media){\n\t\t \t\t\t\t\t$media->position=$key+1;\n\t\t\t\t\t\t\t\t$media->save();\n\t\t\t\t\t\t\t}\n\t \t\t\t\t}\n\t \t\t\t}\n\n\t \t\t}\n\t \t}\n\t\t}\n\t}", "title": "" }, { "docid": "5c1b3c8123b06fd3f4015d6177bc3260", "score": "0.47734326", "text": "private function _cleanDownloads()\n {\n $files = array();\n $fileExtensions = array();\n $iterator = new DirectoryIterator(DOWNLOAD_PATH);\n foreach ($iterator as $fileinfo) {\n if (!$fileinfo->isFile()) {\n continue;\n }\n $filename = $fileinfo->getFilename();\n $fileExtension = pathinfo($filename, PATHINFO_EXTENSION);\n $fileNameWoExt = substr($filename, 0, -(strlen($fileExtension)+1));\n if (!in_array($fileExtension, $fileExtensions)) {\n $fileExtensions[] = $fileExtension;\n }\n if (!in_array($fileNameWoExt, $files)) {\n $mTime = $fileinfo->getMTime();\n $files[\"$mTime\"] = $fileNameWoExt;\n }\n }\n if (empty($files)) {\n return;\n }\n krsort($files); // move latest file to top\n\n $fileKeys = array_keys($files);\n unset($fileKeys[0]); // remove latest file from array for not deleting it\n foreach ($fileKeys as $key) {\n foreach ($fileExtensions as $ext) {\n $filename = DOWNLOAD_PATH . '/' . $files[$key] . '.' .$ext;\n if (is_readable($filename)) {\n @unlink($filename);\n }\n }\n }\n }", "title": "" }, { "docid": "7bad6e3c30fa2a3368b5965c8bffdfe6", "score": "0.47713777", "text": "function backup_files($files)\n{\n\tpa(\"START BACKUP:\");\n\t\n\t$paths = array();\n\t\n\tforeach ($files as $file) {\n\t\t$paths[] = $file['path'];\n\t}\n\t\n\tglobal $current;\n\tcreate_distributive($paths, '!backup-'.$current.'.tgz');\n\t\n\tpa(\"END BACKUP!\");\n\tob_flush();\n\tflush();\n}", "title": "" }, { "docid": "aaed72291c64b43b5e3586f766a25a1e", "score": "0.47639987", "text": "public function orderAttSequence() {\n foreach ($_POST['order'] AS $k => $v) {\n mysql_query(\"UPDATE `\".DB_PREFIX.\"faqattach` SET\n\t`ts` = UNIX_TIMESTAMP(UTC_TIMESTAMP),\n\t`orderBy` = '{$v}'\n WHERE `id` = '{$k}'\n \") or die(mswMysqlErrMsg(mysql_errno(),mysql_error(),__LINE__,__FILE__));\n }\n}", "title": "" }, { "docid": "666a0f11df835d18e3cd7a2ffe4f070e", "score": "0.47575688", "text": "function eventBackup(){\r\n\r\n\t\tglobal $sql;\r\n\r\n\t\t//get a list of the users tables\r\n\t\t$tables = $this->updater->GetTables(true);\r\n\r\n\t\t//get a list of the guilds dkp table\r\n\t\t$points = array();\r\n\t\t$guildid = $this->guild->id;\r\n\t\t$result = $sql->Query(\"SELECT *, dkp_users.id AS userid FROM dkp_points, dkp_users, dkp_guilds\r\n\t\t\t\t\t\t \t WHERE dkp_points.guild='$guildid' AND dkp_points.user = dkp_users.id AND dkp_guilds.id = dkp_users.guild ORDER BY tableid, points DESC\");\r\n\t\twhile($row = mysql_fetch_array($result)){\r\n\t\t\t$points[] = $row;\r\n\t\t}\r\n\t\t//get a list of all the guilds point history\r\n\r\n\r\n\t\t$result = $sql->Query(\"\tSELECT *\r\n\t\t\t\t\t\t\t\tFROM dkp_awards, dkp_pointhistory, dkp_users\r\n\t\t\t\t\t\t\t \tWHERE dkp_awards.guild='$guildid'\r\n\t\t\t\t\t\t\t\tAND dkp_pointhistory.award = dkp_awards.id\r\n\t\t\t\t\t\t\t\tAND dkp_pointhistory.user = dkp_users.id\");\r\n\t\t$history = array();\r\n\r\n\t\t//we are going to run though all of the history entries for the guild.\r\n\t\t//Whenever we find a history entry shared by more than one person, we create\r\n\t\t//a single entry but list all players under it. This allows us to cut down\r\n\t\t//on our backup file size\r\n\t\twhile($row = mysql_fetch_array($result)) {\r\n\t\t\tunset($entry);\r\n\t\t\t$entry = new dkpAward();\r\n\t\t\t$entry->loadFromRow($row);\r\n\t\t\tif($entry->date != $lastDate || $entry->reason != $lastReason) {\r\n\t\t\t\tif($currentEntry!=\"\")\r\n\t\t\t\t\t$history[]=$currentEntry;\r\n\t\t\t\t$currentEntry = \"\";\r\n\t\t\t\t$entry->reason = str_replace(\",\",\"[!]\",$entry->reason);\r\n\t\t\t\t$entry->location = str_replace(\",\",\"[!]\",$historyEntry->location);\r\n\t\t\t\t$currentEntry[\"data\"]=$entry;\r\n\t\t\t\t$currentEntry[\"users\"][]=$row[\"name\"]; //add the users name to the list of players who recieved this award\r\n\t\t\t\t$lastDate = $entry->date;\r\n\t\t\t\t$lastReason = $entry->reason;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$currentEntry[\"users\"][]=$row[\"name\"];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$history[]=$currentEntry;\r\n\r\n\t\t//now to echo all this information to a stream\r\n\t\t$filename = \"WebDKP_Backup_\".date(\"M_d_g-ia\");\r\n\t\theader(\"Content-Type: text/plain; charset=UTF-8\");\r\n\t\theader(\"Content-Disposition: attachment; filename=$filename.csv\");\r\n\t\theader('Cache-Control: no-cache');\r\n\t\theader('Pragma: no-cache');\r\n\t\t//header(\"Content-Transfer-Encoding: binary\\n\");\r\n\t\techo(\"TABLES\\r\\n\");\r\n\t\tforeach($tables as $table) {\r\n\t\t\techo(\"$table->tableid, $table->name \\r\\n\");\r\n\t\t}\r\n\t\techo(\"DKPTABLE\\r\\n\");\r\n\t\tif($points!=\"\"){\r\n\t\tforeach($points as $entry) {\r\n\t\t\tif($entry[\"tableid\"] > 1000 )\r\n\t\t\t\tcontinue;\r\n\t\t\techo($entry[\"tableid\"].\",\");\r\n\t\t\techo($entry[\"name\"].\", \");\r\n\t\t\techo($entry[\"class\"].\",\");\r\n\t\t\techo($entry[\"gname\"].\",\");\r\n\r\n\t\t\t$points = str_replace(\".00\", \"\", $entry[\"points\"]);\r\n\t\t\t$totaldkp = str_replace(\".00\", \"\", $entry[\"lifetime\"]);\r\n\t\t\techo(\"$points,$totaldkp\\r\\n\");\r\n\t\t}}\r\n\t\techo(\"POINTHISTORY\\r\\n\");\r\n\t\tforeach($history as $entry){\r\n\t\t\tif($entry[\"data\"]->tableid > 1000 )\r\n\t\t\t\tcontinue;\r\n\t\t\techo($entry[\"data\"]->tableid.\",\");\r\n\t\t\techo($entry[\"data\"]->points.\",\");\r\n\t\t\techo($entry[\"data\"]->reason.\",\");\r\n\t\t\techo($entry[\"data\"]->foritem.\",\");\r\n\t\t\techo($entry[\"data\"]->location.\",\");\r\n\t\t\techo($entry[\"data\"]->awardedby.\",\");\r\n\t\t\techo($entry[\"data\"]->date.\",\");\r\n\t\t\techo(implode(\"|\",$entry[\"users\"]).\"\\r\\n\");\r\n\t\t}\r\n\t\tdie();\r\n\t}", "title": "" }, { "docid": "a38ba15f2b6219861fe561c525e934b5", "score": "0.47507524", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_job_question_upload_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_job_question_upload_files';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "385a312f7052e106c7cf9eb455036c6f", "score": "0.47501212", "text": "public function main() {\n $ftp = new Ftp($this->url);\n\n $absolutePath = $this->localDir->getAbsolutePath().\"/\";\n $records = $this->listDir($absolutePath);\n \n foreach ($records as $record) {\n if (is_dir($absolutePath.$record)) {\n $ftp->mkDirRecursive($record);\n continue;\n\n }\n\n //upload\n $remote_change = $ftp->mdtm($record);\n $local_change = filemtime($absolutePath.$record);\n if ($remote_change == $local_change) {\n $this->log(\"file \".$record.\" is same\");\n } else if ($remote_change > $local_change) {\n $this->log(\"file \".$record.\" is newer on ftp\");\n } else {\n $ftp->put($record, $absolutePath.$record, $ftp::BINARY);\n $this->log(\"upload file \".$record);\n }\n\n }\n \n //$count = $ftp->download(\".\", $this->localDir->getAbsolutePath());\n $ftp->close();\n //$this->log(\"All files (\".$count.\") has been copied\");\n }", "title": "" }, { "docid": "a6fa6f0b36c34b2f86898b67537652ca", "score": "0.47352412", "text": "protected function migrateXmlFileDir() {\n\t\t// stop if prior migrations haven't finished\n\t\tif ( !$this->finishState['fal_itemxml'] ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$table = 'tx_' . $this->sourceExtensionKey . '_itemxml';\n\t\t$where = 'migrated_uid = 0 AND migrated_filedir = 0 AND migrated_file > 0';\n\t\t$max = $this->databaseService->countTableRecords($table, $where);\n\n\t\t// no results means we're done migrating\n\t\tif ($max === 0) {\n\t\t\t$this->finishState['itemxml_filedirpath'] = TRUE;\n\t\t\treturn;\n\t\t}\n\n\t\t$this->io->text('Migrate XML filedirpaths.');\n\t\t$this->io->progressStart($max);\n\n\t\t$sitePath = \\TYPO3\\CMS\\Core\\Core\\Environment::getPublicPath() . '/';\n\t\t$count = 0;\n\t\t$errorCount = 0;\n\t\twhile ($count+$errorCount < $max) {\n\n\t\t\t$okUidArray = [];\n\t\t\t$xmlArray = $this->databaseService->selectTableRecords($table, $where, '*', 50);\n\t\t\tforeach ($xmlArray as $uid => $xml) {\n\t\t\t\t// get all the necessary paths\n\t\t\t\t$file = $this->fileService->getFileObjectByUid($xml['migrated_file']);\n\t\t\t\t$xmlPath = pathinfo($file->getPublicUrl());\n\t\t\t\t$xmlDirPath = $sitePath . $xmlPath['dirname'] . '/';\n\t\t\t\t$fileDirPath = rtrim($xml['filedirpath'], '/') . '/';\n\n\t\t\t\tif ($xmlDirPath === $fileDirPath) {\n\t\t\t\t\t$okUidArray[] = $uid;\n\t\t\t\t} else {\n\t\t\t\t\t$sourceFileDir = $fileDirPath . $xmlPath['filename'] . '/';\n\t\t\t\t\t$targetFileDir = $xmlDirPath . $xmlPath['filename'] . '/';\n\n\t\t\t\t\tif (file_exists($targetFileDir)) {\n\t\t\t\t\t\t// if we get here, the filedir was moved to the correct location, in which case we can automatically fix the filedirpath\n\t\t\t\t\t\t$okUidArray[] = $uid;\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// if the assumed sourceFileDir exists, we can suggest where to move it next so that this method can fix the issue, but\n\t\t\t\t\t\t// we will NOT move files automatically, since the reason for its current location may be related to available harddisk space\n\t\t\t\t\t\t$advice = file_exists($sourceFileDir)\n\t\t\t\t\t\t\t? sprintf(\n\t\t\t\t\t\t\t\t$this->lang['dirMoveAutomatic'],\n\t\t\t\t\t\t\t\t$sourceFileDir,\n\t\t\t\t\t\t\t\t$targetFileDir\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t// otherwise, we can only suggest a fully manual solution..\n\t\t\t\t\t\t\t: sprintf(\n\t\t\t\t\t\t\t\t$this->lang['dirMoveManual'],\n\t\t\t\t\t\t\t\t$sourceFileDir,\n\t\t\t\t\t\t\t\t$table\n\t\t\t\t\t\t\t);\n\n\t\t\t\t\t\t$this->io->newLine(2);\n\t\t\t\t\t\t$this->addMessage(\n\t\t\t\t\t\t\tsprintf(\n\t\t\t\t\t\t\t\t$this->lang['dirMismatch'],\n\t\t\t\t\t\t\t\t$fileDirPath,\n\t\t\t\t\t\t\t\t$xmlDirPath,\n\t\t\t\t\t\t\t\t$advice\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'',\n\t\t\t\t\t\t\tFlashMessage::ERROR\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$errorCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (!empty($okUidArray)) {\n\t\t\t\t$step = count($okUidArray);\n\t\t\t\t$count += $step;\n\t\t\t\t$this->io->progressAdvance($step);\n\n\t\t\t\t// any xml found ok will be marked as such\n\t\t\t\tforeach ($okUidArray as $uid) {\n\t\t\t\t\t$this->databaseService->updateTableRecords(\n\t\t\t\t\t\t$table,\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'migrated_filedir' => 1\n\t\t\t\t\t\t],\n\t\t\t\t\t\t[\n\t\t\t\t\t\t\t'uid' => $uid\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\tif ($count > 0) {\n\t\t\t$this->io->newLine(2);\n\t\t\t$this->addMessage(\n\t\t\t\tsprintf(\n\t\t\t\t\t$this->lang['migrateSuccess'],\n\t\t\t\t\t$table . '.filedirpath',\n\t\t\t\t\t$count\n\t\t\t\t),\n\t\t\t\t'',\n\t\t\t\tFlashMessage::OK\n\t\t\t);\n\t\t}\n\n\t\tif ($errorCount <= 0) {\n\t\t\t// no results means we're done migrating\n\t\t\t$this->finishState['itemxml_filedirpath'] = TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "f1adc2e7f25a5cd4a5dd13e893249794", "score": "0.47322136", "text": "public function runFiles($rename)\n {\n\n foreach ($this->getFiles() as $file) {\n $fileFactory = $this->fileFactory->create();\n $this->logger->info('Start product import for file '.$file);\n $f = fopen($file, \"r\") or die(\"Cannot open file\");\n\n // first check if the delimiter is correct\n if ($this->getFileDelimiter($file, 5) != '\\t'){\n $this->setErrors('Your file is not properly delimited. Please check that it is delimited by a tab and fields are quoted. The file was not moved and and cannot be viewed. ');\n $this->updateTableWithFileInformation($fileFactory, $file);\n $this->setErrors([], True);\n continue;\n }\n\n // place it in the processing directory while the file is running to avoid\n // multiple files processing in the same time if one file takes longer\n // don't do it if $rename is false (when it is run manually via the admin)\n if ($rename) {\n //rename($file, $this->paths->getProductsProcessingDirectory() . \"/\" . basename($file));\n }\n\n $row = 0;\n while ( ($data = fgetcsv( $f, 0, \"\\t\") ) !== FALSE) {\n\n # skip if there aren't enough rows. Prevent against empty files.\n if (sizeof($data) < 2 ) {\n continue;\n }\n\n #set headers\n if ($row === 0) {\n $this->setFieldsHeader($data);\n $row++;\n continue;\n }\n\n $productInformationWithheaders = array_combine($this->getFieldsHeader(), $data);\n $this->processProducts->manageTypeOfProducts($productInformationWithheaders, $row);\n\n $row++;\n }\n\n // place it in the processed directory afterwards\n if ($rename) {\n// rename(\n// $this->paths->getProductsProcessingDirectory() . \"/\" . basename($file),\n// $this->paths->getProductsProcessedDirectory() . \"/\" . basename($file)\n// );\n } else {\n $this->setErrors('File uploaded manually, cannot be rerun or viewed. ');\n }\n $this->updateTableWithFileInformation($fileFactory, $file);\n $this->setErrors([], True);\n $this->logger->info('End product import for file '.$file);\n }\n }", "title": "" }, { "docid": "ed8ca6979f51db5c9ce0a4a8784710cb", "score": "0.47297558", "text": "function move_item($table, $id, $direction)\n {\n global $connid;\n if($direction=='up')\n {\n $result = mysqli_query($connid, \"SELECT order_id FROM \".$table.\" WHERE id = \".intval($id).\" LIMIT 1\") or die(mysqli_error($connid));\n $data = mysqli_fetch_array($result);\n mysqli_free_result($result);\n if($data['order_id'] > 1)\n {\n mysqli_query($connid, \"UPDATE \".$table.\" SET order_id=0 WHERE order_id=\".$data['order_id'].\"-1\");\n mysqli_query($connid, \"UPDATE \".$table.\" SET order_id=order_id-1 WHERE order_id=\".$data['order_id']);\n mysqli_query($connid, \"UPDATE \".$table.\" SET order_id=\".$data['order_id'].\" WHERE order_id=0\");\n }\n }\n else // down\n {\n list($item_count) = mysqli_fetch_row(mysqli_query($connid, \"SELECT COUNT(*) FROM \".$table));\n $result = mysqli_query($connid, \"SELECT order_id FROM \".$table.\" WHERE id = \".intval($id).\" LIMIT 1\") or die(mysqli_error($connid));\n $data = mysqli_fetch_array($result);\n mysqli_free_result($result);\n if ($data['order_id'] < $item_count)\n {\n mysqli_query($connid, \"UPDATE \".$table.\" SET order_id=0 WHERE order_id=\".$data['order_id'].\"+1\");\n mysqli_query($connid, \"UPDATE \".$table.\" SET order_id=order_id+1 WHERE order_id=\".$data['order_id']);\n mysqli_query($connid, \"UPDATE \".$table.\" SET order_id=\".$data['order_id'].\" WHERE order_id=0\");\n }\n }\n }", "title": "" }, { "docid": "16602a047088f5b442e89d2967aaae55", "score": "0.47284216", "text": "function drush_whiteboard_migration_files_migrate_whiteboard_job_question_reference_files() {\n $fid = drush_get_option('fid');\n $function_fetch_fids = '_whiteboard_migration_files_job_quesiton_reference_files';\n $limit = drush_get_option('limit');\n whiteboard_migration_files_prepare_batch($function_fetch_fids, $limit, $fid);\n}", "title": "" }, { "docid": "878335e54010c7524dbf983e9b142e85", "score": "0.4723712", "text": "public function order_insertupload() {// Connection data (server_address, database, name, poassword)\r\n if ($_POST['action'] != 'order_bulkupload') {\r\n return \"Invalid action supplied for bulkupload.\";\r\n }\r\n $fName = trim('../comm/fileuplaod_temp/' . $_POST['fileName']);\r\n if ($fName == NULL) {\r\n return \"Invalid File Name supplied .\";\r\n }\r\n\r\n try {\r\n //$handle = fopen($fName, \"r\");\r\n\r\n $c = -1;\r\n $_sql = array();\r\n $file = fopen($fName, \"r\") or die(\"error open file \" . $fName);\r\n\r\n while (!feof($file)) {\r\n $filesop = array();\r\n $filesop = fgetcsv($file);\r\n $c++;\r\n if ($c == 0) {\r\n\r\n continue;\r\n }\r\n //INSERT INTO `stock_order`(`cear_id`, `router_model`, `description`, `po_qty`, `customer_name`, `req_by`, `Req_date`, `vendor`, `po_id`, `po_date`, `EDD`)\r\n //CEAR # //cear_id\tItem Name //router_model\tDescription//description\tPO Quantity//po_qty\tCustomer Name//customer_name\tRequested By//req_by\tORIGINATION DATE//Req_date\tVendor//vendor\tPO #//po_id\tPO DATE//po_date\tEDD//EDD\r\n//( `customer_name`, `po_id`, `vendor`, `RouterClass`, `router_model`, `description`, `po_qty`, `cear_id`, `req_by`, `Req_date`, `po_date`, `EDD`, `user_add`)\r\n $cust_name = $filesop[0];\r\n $po_id = $filesop[1];\r\n $vendor = $filesop[2];\r\n $RouterClass = $filesop[3];\r\n $Item_Name = $filesop[4];\r\n $Description = $filesop[5];\r\n $PO_QTY = $filesop[6];\r\n $CEAR_id = $filesop[7];\r\n $Req_by = $filesop[8];\r\n\r\n\r\n\r\n\r\n\r\n $Req_date = ($filesop[9] == null or $filesop[9] == '') ? null : date(\"Y-m-d H:i:s\", strtotime($filesop[9])); //$filesop[6];\r\n\r\n\r\n $po_date = ($filesop[10] == null or $filesop[10] == '') ? null : date(\"Y-m-d H:i:s\", strtotime($filesop[10])); //$filesop[10];\r\n $EDD = $filesop[11];\r\n $user = $_SESSION['user']['email'];\r\n // check for cust name and qty and router\r\n if (($cust_name != '' and ! (is_null($cust_name)) and isset($cust_name)) and ( $PO_QTY >= 0 and ! (is_null($PO_QTY)) and isset($PO_QTY)) and ( $Item_Name != '' and ! (is_null($Item_Name)) and isset($Item_Name))) {\r\n //echo '<br/> loop#'.$c.'values are : '.'(\"'.mysql_real_escape_string($Party_id).'\",\"'.mysql_real_escape_string($acc_num).'\", \"'.mysql_real_escape_string($acc_Name).'\", \"'.mysql_real_escape_string($service).'\", \"'.mysql_real_escape_string($Section).'\", \"'.mysql_real_escape_string($Router_model).'\", '.mysql_real_escape_string($Qty).', \"'.mysql_real_escape_string($Prob).'\", \"'.mysql_real_escape_string($req_by).'\")<br/>-----------------------------------';\r\n $_sql[] = '(\"' . mysql_real_escape_string($cust_name) . '\",\"' . mysql_real_escape_string($po_id) . '\", \"' . mysql_real_escape_string($vendor) . '\", \"' . mysql_real_escape_string($RouterClass) . '\", \"' . mysql_real_escape_string($Item_Name) . '\", \"' . mysql_real_escape_string($Description) . '\", ' . mysql_real_escape_string($PO_QTY) . ', \"' . mysql_real_escape_string($CEAR_id) . '\", \"' . mysql_real_escape_string($Req_by) . '\", \"' . mysql_real_escape_string($Req_date) . '\", \"' . mysql_real_escape_string($po_date) . '\", \"' . mysql_real_escape_string($EDD) . '\", \"' . $user . '\")';\r\n }\r\n }\r\n fclose($file);\r\n // chmod('../comm/fileuplaod_temp/', 0777);\r\n\r\n\r\n\r\n $sql = 'INSERT INTO `stock_order`( `customer_name`, `po_id`, `vendor`, `RouterClass`, `router_model`, `description`, `po_qty`, `cear_id`, `req_by`, `Req_date`, `po_date`, `EDD`, `user_add`) VALUES ' . implode(',', $_sql);\r\n\r\n try {\r\n unlink($fName);\r\n $result = $this->query($sql);\r\n if ($result > 0) {\r\n\r\n return TRUE;\r\n } else {\r\n return FALSE;\r\n }\r\n } catch (PDOException $e) {\r\n unlink($fName);\r\n return('error pdo ' . $e->getMessage());\r\n }\r\n } catch (Exception $ex) {\r\n unlink($fName);\r\n return('error opening ' . $ex->getMessage());\r\n }\r\n }", "title": "" } ]
84a1f34e1ad210c5bbb43569a600c750
set attribute carrierDefinedCategory Optional category, where a carrier has used a nonstandard IATA tax category. The tax category will be set to "DU"
[ { "docid": "fa4c0d49b48fcf8ab142033da0cae1c9", "score": "0.7025271", "text": "public function setCarrierDefinedCategory($value = NULL)\n\t{\n\t\tif (NULL !== $value) {\n\t\t $this->carrierDefinedCategory = $value;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" } ]
[ { "docid": "4ba79468560097a173fc3c48992c731a", "score": "0.66856855", "text": "public function getCarrierDefinedCategory()\n\t{\n\t\treturn $this->carrierDefinedCategory;\n\t}", "title": "" }, { "docid": "bf8e781a80918f30ded9cf3a8d34c70b", "score": "0.5920252", "text": "private function _set_category() {\n $this->_category = gpc_get_string( 'category', '' );\n\n if (isset( $this->_categories[ $this->_category ] ) == FALSE) {\n $this->_category = NULL;\n }\n\n }", "title": "" }, { "docid": "fb7176ec670e5d1782a52f60f2b1503b", "score": "0.5094011", "text": "public function getTaxCategory();", "title": "" }, { "docid": "fb7176ec670e5d1782a52f60f2b1503b", "score": "0.5094011", "text": "public function getTaxCategory();", "title": "" }, { "docid": "4bad12a370594b4ab0adc3f2635fbfcb", "score": "0.5030345", "text": "public function getTaxCategory()\n {\n return $this->taxCategory;\n }", "title": "" }, { "docid": "18d3a3182d2cd0899ffde487d14b6456", "score": "0.4882154", "text": "protected function setCategory(): void\n {\n $columnConfiguration = $this->getImporter()->getExternalConfiguration()->getColumnConfiguration();\n\n if($this->extensionConfiguration['importCategoryName'] != '') {\n $query = $this->categoryRepository->createQuery();\n $queryResult = $query->statement(\n 'SELECT * \n FROM tx_cmscensus_domain_model_category\n WHERE name = ?\n AND deleted = 0',\n [$this->extensionConfiguration['importCategoryName']]\n )->execute();\n\n if(count($queryResult) == 0){\n $newCategory = GeneralUtility::makeInstance(Category::class);\n $newCategory->setName($this->extensionConfiguration['importCategoryName']);\n $newCategory->setPid((int)$this->extensionConfiguration['storagePID']);\n $this->categoryRepository->add($newCategory);\n $this->persistenceManager->persistAll();\n\n $categoriesTransformations[10] = array('value' => $newCategory->getUid());\n }else{\n $categoriesTransformations[10] = array('value' => $queryResult[0]->getUid());\n }\n\n $categories['transformations'] = $categoriesTransformations;\n $columnConfiguration['categories'] = $categories;\n $this->getImporter()->getExternalConfiguration()->setColumnConfiguration($columnConfiguration);\n }\n }", "title": "" }, { "docid": "a24ee022e79cb4b9e5af73be55d9acc0", "score": "0.48307085", "text": "public function getTaxCategory()\n {\n return $this->taxCategory instanceof TaxCategoryResourceIdentifierBuilder ? $this->taxCategory->build() : $this->taxCategory;\n }", "title": "" }, { "docid": "a24ee022e79cb4b9e5af73be55d9acc0", "score": "0.48307085", "text": "public function getTaxCategory()\n {\n return $this->taxCategory instanceof TaxCategoryResourceIdentifierBuilder ? $this->taxCategory->build() : $this->taxCategory;\n }", "title": "" }, { "docid": "cf773f9384e11e6ea3c7d28aaaba6f31", "score": "0.47742766", "text": "public function beforeSet()\n {\n $category_fabrics = trim($this->getProperty('category_fabrics'));\n if (empty($category_fabrics)) {\n $this->modx->error->addField('category_fabrics', $this->modx->lexicon('msfabrics_category_err_category_fabrics'));\n } elseif ($this->modx->getCount($this->classKey, array('category_fabrics' => $category_fabrics))) {\n $this->modx->error->addField('category_fabrics', $this->modx->lexicon('msfabrics_category_err_ae'));\n }\n\n return parent::beforeSet();\n }", "title": "" }, { "docid": "55513291c7955138099eddabc504c2ae", "score": "0.4770677", "text": "function setCarrier($carrier)\r\n {\r\n $this->_carrier = $carrier;\r\n }", "title": "" }, { "docid": "cf561b86cf11538cc182c4e71313b7b2", "score": "0.47158745", "text": "function themify_custom_category( $null, $column, $termid ) {\n\treturn $termid;\n}", "title": "" }, { "docid": "b3d2a8c08a2b38b5460054b9cdb9f0e1", "score": "0.47151807", "text": "public function setCategory($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->category !== $v || $v === 'Incomplete') {\n\t\t\t$this->category = $v;\n\t\t\t$this->modifiedColumns[] = MwgfApplicationPeer::CATEGORY;\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "422e3a734ade1c4a005bf2f8c1a811dd", "score": "0.4707537", "text": "public function setUnapplicable()\n {\n $this->is_applicable = false;\n }", "title": "" }, { "docid": "0a0355165ff1e0e9a78e4e6394d55116", "score": "0.4699586", "text": "protected function setNoCarrier()\n {\n $this->context->cart->setDeliveryOption(null);\n $this->context->cart->update();\n }", "title": "" }, { "docid": "7dfb7e240184be9857110625c0655891", "score": "0.46920043", "text": "public function getTaxCategory()\n {\n return $this->taxCategory instanceof TaxCategoryReferenceBuilder ? $this->taxCategory->build() : $this->taxCategory;\n }", "title": "" }, { "docid": "7dfb7e240184be9857110625c0655891", "score": "0.46920043", "text": "public function getTaxCategory()\n {\n return $this->taxCategory instanceof TaxCategoryReferenceBuilder ? $this->taxCategory->build() : $this->taxCategory;\n }", "title": "" }, { "docid": "f3c549b3fed3fab6f9388b04337b3523", "score": "0.46829695", "text": "public function setMalwareCategory(?string $value): void {\n $this->getBackingStore()->set('malwareCategory', $value);\n }", "title": "" }, { "docid": "609d4ac4943a5c21c830501889fc3169", "score": "0.4682257", "text": "public function getDefaultCategory()\n {\n return $this->oxshops__oxdefcat->value;\n }", "title": "" }, { "docid": "25f5090180c2c698abc8a3890eb62d7d", "score": "0.46774575", "text": "public function setCategoryIdAttribute($category){\n $this->attributes['category_id'] = Category::find($category) ? $category : Category::create(['name' => $category ])->id;\n }", "title": "" }, { "docid": "22722d46bdf7f7aae45d590bbd2ea3a1", "score": "0.46560657", "text": "function tkugp_set_termcat($post_id, $cat_id){\n\t$cat_id = $cat_id;\n\t\n\t//Looking inside meta if the CAT is already in.\n\t$post_meta = get_post_meta( $post_id, 'tkugp_category_item', true);\n\t$found = false;\n\tforeach($post_meta as $meta){\n\t\tif($meta['cat_id'] == $cat_id){\n\t\t\t\t$found = true;\n\t\t\t\treturn false; //The cat is already found in the Post meta. Stop.\n\t\t\t}\n\t\t\t\n\t\t}\n\t\n\tif ($found==false) \n\t\t$term_taxonomy_ids = wp_set_object_terms( $post_id, (int)$cat_id, TKUGP_POST . '_cat', TRUE );\n\t\n\t\t\n\tif ( is_wp_error( $term_taxonomy_ids ) ) {\n\t\treturn false;\n\t} else {\n\n\t\treturn true;\n\t}\n\n}", "title": "" }, { "docid": "9873602f61f62d7aa75e17b2fd3c66d4", "score": "0.46522066", "text": "public function add_category_config($term)\n {\n ?>\n <tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\" style=\"padding: 0;\">\n <hr>\n <h2>Mobbex Marketplace</h2>\n </th>\n </tr>\n <?php if (get_option('mm_option_integration') !== 'dokan') { ?>\n <tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\">\n <label for=\"mobbex_marketplace_cuit\"><?= __('Tax Id', 'mobbex-marketplace'); ?></label>\n </th>\n <td>\n <input type=\"text\" name=\"mobbex_marketplace_cuit\" id=\"mobbex_marketplace_cuit\" size=\"3\" \n value=\"<?= get_term_meta($term->term_id, 'mobbex_marketplace_cuit', true) ?>\">\n <br/>\n <span class=\"description\"><?= __('Written without hyphens. Cuit of store to which you want to allocate the payment.', 'mobbex-marketplace') ?>\n </span>\n </td>\n </tr>\n <?php } ?>\n\n <tr class=\"form-field\">\n <th scope=\"row\" valign=\"top\" style=\"border-bottom: 1px solid #ddd;\">\n <label for=\"mobbex_marketplace_fee\"><?= __('Fee (optional)', 'mobbex-marketplace'); ?></label>\n </th>\n <td>\n <input type=\"text\" name=\"mobbex_marketplace_fee\" id=\"mobbex_marketplace_fee\" size=\"3\"\n value=\"<?= get_term_meta($term->term_id, 'mobbex_marketplace_fee', true) ?>\">\n <br/>\n <span class=\"description\"><?= __('This option has priority over the one applied at vendor and default level.', 'mobbex-marketplace') ?>\n </span>\n </td>\n </tr>\n <?php\n }", "title": "" }, { "docid": "fde34aa370afda27b0c439914ad4f7c4", "score": "0.4641233", "text": "public function testDispatchWithNonProductAttribute(): void\n {\n $categoryAttribute = $this->attributeRepository->get(\n Category::ENTITY,\n 'test_attribute_code_666'\n );\n $this->getRequest()->setMethod(Http::METHOD_POST);\n $this->dispatch(sprintf($this->uri, $categoryAttribute->getAttributeId()));\n $this->assertSessionMessages(\n $this->equalTo([$this->escaper->escapeHtml((string)__('We can\\'t delete the attribute.'))]),\n MessageInterface::TYPE_ERROR\n );\n }", "title": "" }, { "docid": "cb5a58325cc941f260c8cfd48fcca72e", "score": "0.46378052", "text": "public function getVatCategory(): ?string\n {\n return $this->vatCategory;\n }", "title": "" }, { "docid": "d9b483e7867262b17d644fdfecb79ee7", "score": "0.46334463", "text": "public function applyDefaultValues()\n {\n $this->arcucustid = '';\n }", "title": "" }, { "docid": "e99b76229785a0c60f758a9e09e3cb2b", "score": "0.46295282", "text": "private function applyAttributesFromTaxonomyTerm(CollectEvent $event, TermInterface $term) {\n\n if ($term->bundle() == 'recipe_category') {\n $category = $term->name->value;\n $event->addCommand(new Set('dimension1', $category));\n }\n }", "title": "" }, { "docid": "4a6d916f6b9b04ed8b14fe8937e6a339", "score": "0.46217507", "text": "function snax_image_category_field() {\n\t$default = snax_get_legacy_category_required_setting();\n\n\treturn apply_filters( 'snax_image_category_field', get_option( 'snax_image_category_field', $default ) );\n}", "title": "" }, { "docid": "64de3abea8f16eacc96f853ed47a2333", "score": "0.46130282", "text": "function px_save_extra_post_category_fileds( $term_id ) {\r\n\t\tif ( isset( $_POST['cat_meta'] ) ) {\r\n\t\t\t$t_id = $term_id;\r\n\t\t\t$cat_meta = get_option( \"cat_$t_id\");\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t$cat_meta['menu_style'] = $_POST['cat_meta']['menu_style'];\r\n\t\t\t\r\n\t\t\tif(!isset($_POST['cat_meta']['menu']) || $_POST['cat_meta']['menu'] <> 'on'){\r\n\t\t\t\t$cat_meta['menu'] = 'off';\r\n\t\t\t} else {\r\n\t\t\t\t$cat_meta['menu'] = 'on';\r\n\t\t\t}\r\n\t\t\tupdate_option( \"cat_$t_id\", $cat_meta );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "5d40f42cf8d1476ea16854d230164498", "score": "0.45963496", "text": "public function setup_category() {\n $this->_setup( 'category' );\n }", "title": "" }, { "docid": "ffaae9dad35f027c454edfc38e3d2470", "score": "0.45934954", "text": "public function setCarrier($carrier = null)\n {\n // validation for constraint: string\n if (!is_null($carrier) && !is_string($carrier)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($carrier)), __LINE__);\n }\n if (is_null($carrier) || (is_array($carrier) && empty($carrier))) {\n unset($this->Carrier);\n } else {\n $this->Carrier = $carrier;\n }\n return $this;\n }", "title": "" }, { "docid": "79c8a08ad312ba771f95312c2dab31fb", "score": "0.45619732", "text": "function useCategory($field)\n\t{\n\t\treturn $this->getFieldData($field, \"UseCategory\");\n\t}", "title": "" }, { "docid": "8dfd1ca2dac34f672ac9f88726a9a200", "score": "0.45602673", "text": "public function reset() {\n\t\t$this->setProperties(CsvimprovedModelAvailablefields::DbFields('vm_manufacturer_category'));\n\t}", "title": "" }, { "docid": "25981c749d85eb501142f7ebbb72d658", "score": "0.45569742", "text": "function setProduct_category($cat) { $this->product_category = $cat; }", "title": "" }, { "docid": "644790f747a2a731883f58902fe7bae2", "score": "0.4522539", "text": "function setCustomerCountry($value)\n {\n $this->setAttribute(\"Customer::Country\", $value);\n }", "title": "" }, { "docid": "219305a93a7bd53124cf1dc4d9613418", "score": "0.45203888", "text": "public function testIsGlobalDiscount_DiscountForCategory_False()\n {\n $oDiscount = oxNew('oxDiscount');\n $oDiscount->setId('testGlobalDiscount');\n $oDiscount->save();\n\n oxDb::getDb()->Execute(\"insert into oxobject2discount (OXID, OXDISCOUNTID, OXOBJECTID, OXTYPE) VALUES( 'testIsGlobalDiscount', 'testGlobalDiscount','1000','oxcategories')\");\n\n $this->assertFalse($oDiscount->isGlobalDiscount());\n }", "title": "" }, { "docid": "77bac49edaf509893ac27afb8f08db4a", "score": "0.4519466", "text": "public function get_category_type()\n {\n return C__CMDB__CATEGORY__TYPE_SPECIFIC;\n }", "title": "" }, { "docid": "77bac49edaf509893ac27afb8f08db4a", "score": "0.4519466", "text": "public function get_category_type()\n {\n return C__CMDB__CATEGORY__TYPE_SPECIFIC;\n }", "title": "" }, { "docid": "77bac49edaf509893ac27afb8f08db4a", "score": "0.4519466", "text": "public function get_category_type()\n {\n return C__CMDB__CATEGORY__TYPE_SPECIFIC;\n }", "title": "" }, { "docid": "a319dd2fecbf5cb64ef930db4910dd2c", "score": "0.44845358", "text": "function setCustomerCity($value)\n {\n $this->setAttribute(\"Customer::City\", $value);\n }", "title": "" }, { "docid": "e94de07df5aaa0f2d76e271f557fcc11", "score": "0.44488376", "text": "function set_farenheit_or_celsius($fc='c'){\n\t\t$this->farenheit_or_celsius=$fc;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "bca8958b5284913ed92fae2ac5202ffb", "score": "0.44189644", "text": "function woocommerce_api_create_product_category($term_id, $data)\r\n{\r\n if (empty($data))\r\n return new WP_Error('null value', __FUNCTION__ . ': $data is null');\r\n if (! isset($data['name']))\r\n return new WP_Error('null value', __FUNCTION__ . ': Category name is null');\r\n $term = get_term($term_id, 'product_cat');\r\n if (empty($term))\r\n return new WP_Error('null value', __FUNCTION__ . ': $term is null');\r\n if (is_wp_error($term))\r\n return $term;\r\n $account_number = $data['accountnumber'];\r\n $default_vat_percentage = $data['defaultvatpercentage'];\r\n $allow_only_categories = (bool)$data['onlyallowcategories'] ? 'on' : '';\r\n if (empty($default_vat_percentage))\r\n $default_vat_percentage = 0;\r\n if (! empty($data['parentcategoryid']))\r\n {\r\n $parent_category_id = $data['parentcategoryid'];\r\n // Set parent category of created category\r\n $terms = get_terms(array(\r\n 'taxonomy' => 'product_cat',\r\n 'hide_empty' => false\r\n ));\r\n if (is_wp_error($terms))\r\n return $terms;\r\n $parent_cat_exists = false;\r\n foreach ($terms as $category)\r\n {\r\n $cat_term_id = $category->term_id;\r\n $category_id = get_term_meta($cat_term_id, 'wh_meta_cat_id', true);\r\n if ($category_id === $parent_category_id)\r\n {\r\n $parent_cat_exists = true;\r\n wp_update_term(\r\n $term_id,\r\n 'product_cat',\r\n array(\r\n 'parent' => $cat_term_id\r\n )\r\n );\r\n break;\r\n }\r\n }\r\n if (! $parent_cat_exists)\r\n {\r\n $error_msg = 'Parent category ID ' . $parent_category_id . 'doesn\\'t exist';\r\n return new WP_Error('invalid category id', __FUNCTION__ . $error_msg);\r\n }\r\n }\r\n update_term_meta($term_id, 'wh_meta_account', $account_number);\r\n update_term_meta($term_id, 'wh_meta_only_cat', $allow_only_categories);\r\n update_term_meta($term_id, 'wh_meta_default_vat', $default_vat_percentage);\r\n update_term_meta($term_id, 'wh_meta_pending_crud', 0x1);\r\n}", "title": "" }, { "docid": "564ae70cce304c4a365862a513e712f4", "score": "0.44148996", "text": "public\n function getCategoryTextAttribute()\n {\n if ($this->category == '') return '尚未定義';\n\n return self::$catList[$this->category];\n }", "title": "" }, { "docid": "6419a5c9698d2d01ef5d65df3cbb3efe", "score": "0.44045764", "text": "public function updated_category_image( $term_id, $tt_id ) {\n \n if( isset( $_POST['developer_phone'] )){\n update_term_meta( $term_id, 'developer_phone', $_POST['developer_phone'] );\n }\n if( isset( $_POST['developer_email'] )){\n update_term_meta( $term_id, 'developer_email', $_POST['developer_email'] );\n } \n if( isset( $_POST['developer_Whatsapp'] )){\n update_term_meta( $term_id, 'developer_Whatsapp', $_POST['developer_Whatsapp'] );\n } \n\n if (!empty($_POST['featured_developer'])) {\n update_term_meta( $term_id, 'featured_developer', esc_attr( $_POST['featured_developer'] ) );\n } \n else {\n delete_term_meta( $term_id, 'featured_developer');\n }\n\n\n if( isset( $_POST['developer_image_id'] ) && '' !== $_POST['developer_image_id'] ){\n update_term_meta( $term_id, 'developer_image_id', absint( $_POST['developer_image_id'] ) );\n } else {\n update_term_meta( $term_id, 'developer_image_id', '' );\n }\n }", "title": "" }, { "docid": "d598f4310a755a12ee5b8d6386ced2ee", "score": "0.440192", "text": "function initializeClassAttribute( $classAttribute )\n {\n eZCountryInfo::updateCountryList();\n }", "title": "" }, { "docid": "4a6e737bfbd9847b3d0a1dbd1c4f6d3b", "score": "0.43926007", "text": "protected function initializeAttributes() {\r\n\t\tparent::initializeAttributes();\r\n\r\n\t\t$this->attributes['subtype'] = \"wine\";\r\n\t}", "title": "" }, { "docid": "5788a9ff5d32b4c280ecc183a9e424ca", "score": "0.43914467", "text": "public function getMobileAppCategoryConstant()\n {\n return $this->mobile_app_category_constant;\n }", "title": "" }, { "docid": "deedf40e1df61fc29599fbb7fe3ac6fb", "score": "0.43898132", "text": "public function setCarrier(?array $carrier = null): self\n {\n // validation for constraint: array\n if ('' !== ($carrierArrayErrorMessage = self::validateCarrierForArrayConstraintsFromSetCarrier($carrier))) {\n throw new InvalidArgumentException($carrierArrayErrorMessage, __LINE__);\n }\n if (is_null($carrier) || (is_array($carrier) && empty($carrier))) {\n unset($this->Carrier);\n } else {\n $this->Carrier = $carrier;\n }\n \n return $this;\n }", "title": "" }, { "docid": "f364eabde4193ce81dffbcbda4045334", "score": "0.43843502", "text": "public function setDomicilioAttribute($value) {\n\t\t$this->attributes['domicilio'] = mb_strtoupper($value);\n\t}", "title": "" }, { "docid": "e8047f29c133e804256af332fd86c47c", "score": "0.4350237", "text": "public function setApplicableDeviceType($val)\n {\n $this->_propDict[\"applicableDeviceType\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "60ded663ad81a2eafbf8397bb605911b", "score": "0.4341337", "text": "public function setCategory($category);", "title": "" }, { "docid": "7e353f52565f3cc8ad8d07291ee92223", "score": "0.4340976", "text": "private function setTax()\n {\n if($this->taxIncluded){\n $this->tax = $this->calculateTaxIncluded();\n $this->setTotalBeforeTax();\n }else{\n $this->tax = $this->calculateTaxAddOn();\n } \n }", "title": "" }, { "docid": "e74bc38de422a47fb7da836a57394373", "score": "0.43200538", "text": "public function actionSetingredientcategory(){\n $id = $this->getMenuId();\n $this->model->sessionSet('temp_category', $id);\n $this->no_output = true;\n return true;\n }", "title": "" }, { "docid": "b32b474cfba064c1f61d8e889aa1ade5", "score": "0.43127343", "text": "public function setDefaults(){\t\t$this->dryrun = false;\n\t\t$this->template = \"category-base.xml\";\n\t\t$this->rootCategories = 1;\n\t\t$this->categoryRecursion = 1;\n\t}", "title": "" }, { "docid": "4fc1e9cbf8a669637298581954f3a876", "score": "0.43121463", "text": "public function setDisc($val)\n {\n $this->_propDict[\"disc\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "0812e487f81280f3b2a8f392654016e4", "score": "0.42953137", "text": "function setCustomerCompany($value)\n {\n $this->setAttribute(\"Customer::Company\", $value);\n }", "title": "" }, { "docid": "8a753ce1154cdbddc68bbb8b8f4281ee", "score": "0.42871824", "text": "public function carrier($carrier)\n {\n return $this->setProperty('carrier', $carrier);\n }", "title": "" }, { "docid": "26456fbac32dec576bce59378d463bdb", "score": "0.4285047", "text": "public function get_category()\n {\n return C__CATG__IP;\n }", "title": "" }, { "docid": "14ad09d87128de94593371dfdd955991", "score": "0.42791432", "text": "public function setBaseCategory($baseCategory)\n {\n if (!($baseCategory instanceof BaseCategory)) {\n throw new InvalidArgumentException('The given base category instance does not match ' .\n 'the base category id of this base price');\n }\n if ($baseCategory->getId() !== $this->getBaseCategoryId() && !$this->isNew()) {\n throw new InvalidBaseCategoryException('The given base category instance does not match ' .\n 'the base category id of this base price');\n } else if ($this->isNew()) {\n $this->source['base_category_id'] = $baseCategory->getId();\n $this->source['event_id'] = $baseCategory->getEventId();\n }\n return $this->baseCategory = $baseCategory;\n }", "title": "" }, { "docid": "dcbe8fa849e64678953bd5b2661cd937", "score": "0.42779535", "text": "public function getIndustryClassificationCode()\n {\n return $this->industryClassificationCode;\n }", "title": "" }, { "docid": "02a9a2d04a6bfba49e72484ff9ca7697", "score": "0.42773908", "text": "public function getAttributeName(): string\n {\n return 'Carrier';\n }", "title": "" }, { "docid": "c783a030abe21b984ddba80a7de409f0", "score": "0.4272849", "text": "public function setDiscountUid(?string $discountUid): void\n {\n $this->discountUid['value'] = $discountUid;\n }", "title": "" }, { "docid": "b526dad451faebfe36536240fc9d93ca", "score": "0.42696428", "text": "public function applyDefaultValues()\n\t{\n\t\t$this->category = 'Incomplete';\n\t\t$this->signature = false;\n\t\t$this->income_social_security = false;\n\t\t$this->income_alimony = false;\n\t\t$this->income_salary = false;\n\t\t$this->income_pension = false;\n\t\t$this->income_public_assistance = false;\n\t\t$this->income_short_term_disability = false;\n\t\t$this->income_in_kind = false;\n\t\t$this->income_child_support = false;\n\t\t$this->income_family_friends = false;\n\t\t$this->income_ssd = false;\n\t\t$this->income_unemployment = false;\n\t\t$this->income_ssi = false;\n\t\t$this->income_sick_leave = false;\n\t\t$this->income_self_employed = false;\n\t\t$this->income_employment = false;\n\t\t$this->income_other = false;\n\t\t$this->health_insurance = false;\n\t\t$this->met_deductible = false;\n\t\t$this->health_insurance_other = false;\n\t\t$this->therapist_current = false;\n\t\t$this->garment_current = false;\n\t\t$this->fee_processed = false;\n\t\t$this->materials_received = false;\n\t}", "title": "" }, { "docid": "2e75c1bbc564082bf679a5cf2757c529", "score": "0.42681652", "text": "function create_my_cat () {\n if (file_exists (ABSPATH.'/wp-admin/includes/taxonomy.php')) {\n require_once (ABSPATH.'/wp-admin/includes/taxonomy.php'); \n if ( ! get_cat_ID( 'Feature' ) ) {\n wp_create_category( 'Feature' );\n }\n }\n}", "title": "" }, { "docid": "7610d1d3a9c15561004781dc6f2f4521", "score": "0.42630988", "text": "public function setCategory ($value, $label = false, array $attributes = [])\n {\n $this->_setProperty (new Schemas\\DCTerms\\Properties\\Alternative ($value, $label), str_replace ('set', '', __FUNCTION__), $attributes);\n }", "title": "" }, { "docid": "e23944ca9fd61cdf9034fdaf3da13c4c", "score": "0.4252899", "text": "public function setCofType($type);", "title": "" }, { "docid": "e24ff984349ede892290f1c40f91ef72", "score": "0.42515233", "text": "public function setIndustry(?string $value): void {\n $this->getBackingStore()->set('industry', $value);\n }", "title": "" }, { "docid": "124b23d0b7c7f5a2a20babd7f80582bf", "score": "0.42436904", "text": "public function setTaxUid(string $taxUid): void\n {\n $this->taxUid = $taxUid;\n }", "title": "" }, { "docid": "5ba7a4a20e31f30b940391a3ac96aab7", "score": "0.42427933", "text": "public function save_category_image( $term_id, $tt_id ) {\n if( isset( $_POST['developer_image_id'] ) && '' !== $_POST['developer_image_id'] ){\n add_term_meta( $term_id, 'developer_image_id', absint( $_POST['developer_image_id'] ), true );\n }\n if (isset($_POST['developer_phone'])) {\n add_term_meta( $term_id, 'developer_phone', $_POST['developer_phone'], true );\n }\n if (isset($_POST['developer_email'])) {\n add_term_meta( $term_id, 'developer_email', $_POST['developer_email'], true );\n }\n\n if (!empty($_POST['featured_developer'])) {\n update_post_meta( $term_id, 'featured_developer', esc_attr( $_POST['featured_developer'] ) );\n } \n else {\n delete_post_meta( $term_id, 'featured_developer');\n }\n\n\n if (isset($_POST['developer_Whatsapp'])) {\n add_term_meta( $term_id, 'developer_Whatsapp', $_POST['developer_Whatsapp'], true );\n } \n\n\n }", "title": "" }, { "docid": "cf58120904b96bd8b9eb850270ad7e21", "score": "0.42405915", "text": "public function add_category()\n\t\t{\n\t\t\t$this->modify_object('Ecommerce_category');\n\t\t}", "title": "" }, { "docid": "9b7f18bf190970ef30cfb0d3643a5b6a", "score": "0.4236356", "text": "protected function getCategory() {\n\t\treturn 'General';\n\t}", "title": "" }, { "docid": "102bbd5bf273e7971da43ed89d5547d0", "score": "0.42349944", "text": "public function setCategoryData(?LoyaltyProgramAccrualRuleCategoryData $categoryData): void\n {\n $this->categoryData = $categoryData;\n }", "title": "" }, { "docid": "7ce4d9b8fd7474d25a23709df5856e84", "score": "0.42270175", "text": "public function save_category_config($term_id)\n {\n // Get options and update category metadata\n $cuit = !empty($_POST['mobbex_marketplace_cuit']) ? esc_attr($_POST['mobbex_marketplace_cuit']) : null;\n $fee = !empty($_POST['mobbex_marketplace_fee']) ? esc_attr($_POST['mobbex_marketplace_fee']) : null;\n\n // Only save category cuit if there are no active integrations\n if (get_option('mm_option_integration') !== 'dokan') {\n update_term_meta($term_id, 'mobbex_marketplace_cuit', $cuit);\n }\n update_term_meta($term_id, 'mobbex_marketplace_fee', $fee);\n }", "title": "" }, { "docid": "cad7dfe1d4cb993a9a28519690884939", "score": "0.42249054", "text": "public function setNotRequired($field)\n {\n if ( isset($this->_all_required[$field]) ) {\n unset($this->_all_required[$field]);\n }\n\n foreach ($this->_categorized_fields as &$cat) {\n foreach ( $cat as &$f ) {\n if ( $f['field_id'] === $field ) {\n $f['required'] = 0;\n return;\n }\n }\n }\n }", "title": "" }, { "docid": "1bfc2c8f5f3c2df03fbc7428f456fe0d", "score": "0.42241395", "text": "private function addManufacturer_attribute()\n {\n # Reason: to prevent our out of stock products manufacturer attribute value going blank\n $result = $this->db_do(\"\n INSERT INTO \" . Mage::getSingleton('core/resource')->getTableName('catalog_product_entity_int') . \" (\n entity_type_id,\n attribute_id,\n store_id,\n entity_id,\n value\n )(\n SELECT\n \" . $this->_getProductEntityTypeId() . \",\n \" . $this->_getProductAttributeId('manufacturer') . \",\n 0,\n a.entity_id,\n pm.manufacturer_option_id\n FROM \" . Mage::getSingleton('core/resource')->getTableName('catalog_product_entity') . \" a\n INNER JOIN \" . Mage::getSingleton('core/resource')->getTableName('stINch_products_mapping') . \" pm\n ON a.entity_id = pm.entity_id\n )\n ON DUPLICATE KEY UPDATE\n value = IFNULL(pm.manufacturer_option_id, value)\n \");\n }", "title": "" }, { "docid": "b7f86dcf8b15eb8d897471072e4a96da", "score": "0.4214097", "text": "public function offsetGet($offset): ?\\SengentoBV\\CdiscountMarketplaceSdk\\Structs\\CdiscountCarrier\n {\n return parent::offsetGet($offset);\n }", "title": "" }, { "docid": "bb9431397f8e8df6467a65ad560ed7f9", "score": "0.41997728", "text": "public function setCategory($val)\n {\n $this->_propDict[\"category\"] = $val;\n return $this;\n }", "title": "" }, { "docid": "b98021c52f152fe56797dd91ab5cb46f", "score": "0.41981593", "text": "public function setMarcGenre() {\n if (! isset($this->marc_genre)) {\n $genre = $this->dom->createElementNS(mods::MODS_NS, \"mods:genre\");\n $genre->setAttribute(\"authority\", \"marc\");\n $this->domnode->appendChild($genre);\n $this->update();\n }\n $this->marc_genre = \"thesis\";\n }", "title": "" }, { "docid": "06a6099a05c609ba4d45b4fd7cc8164c", "score": "0.41957575", "text": "function set_attr_defaults( ){\n\t\t\n\t\tif ( empty( $this->attr ) || is_null( $this->attr ) ) {\n\t\t\t$this->attr = \\gcalc\\db\\product\\book::get_attr_defaults();\n\t\t}\n\t}", "title": "" }, { "docid": "4f64feb961ec772252c3a626f28828fe", "score": "0.419564", "text": "public function getCategoryAttribute(): string\n {\n return PaymentCategory::find($this->attributes['category'])->payment_type;\n }", "title": "" }, { "docid": "be77f88210f5adb8345610702cfade00", "score": "0.41948307", "text": "public function set_taxRate($taxRate) {\n \n $this->taxRate = (is_null($taxRate) ? NULL : (double)$taxRate);\n \n }", "title": "" }, { "docid": "1dfad849f4b4ed7189b413f25363b23c", "score": "0.41902614", "text": "function save_category_custom_meta( $term_id ) {\n \t$term_id = $_POST['tag_ID'];\n\n\tif ( isset( $_POST['cat_col'] ) ) {\n\tdelete_term_meta( $term_id, 'cat_col' );\n\tadd_term_meta( $term_id, 'cat_col', $_POST['cat_col'], true );\n\t}\n\tif ( isset( $_POST['cat_style'] ) ) {\n\tdelete_term_meta( $term_id, 'cat_style' );\n\tadd_term_meta( $term_id, 'cat_style', $_POST['cat_style'], true );\n\t}\n\tif ( isset( $_POST['fslider'] ) ) {\n\tdelete_term_meta( $term_id, 'fslider' );\n\tadd_term_meta( $term_id, 'fslider', $_POST['fslider'], true );\n\t}\n\tif ( isset( $_POST['title_background'] ) ) {\n\tdelete_term_meta( $term_id, 'title_background' );\n\tadd_term_meta( $term_id, 'title_background', $_POST['title_background'], true );\n\t}\n}", "title": "" }, { "docid": "e6f4b69a71efac8179ca6b3be4247b4f", "score": "0.41878328", "text": "function bcat_taxonomy_term_edit($tag, $taxonomy) {\n\n\t\t// Should not happen. But just in case.\n\t\tif ($tag->taxonomy != \"bcat\")\treturn;\n\t\t\n\t\t$this->load_config();\n\n\t\tif (isset($this->opts['icons_category'][$tag->term_id])) {\n\t\t\t$bcat_image_id = $this->opts['icons_category'][$tag->term_id];\n\t\t} else {\n\t\t\t$bcat_image_id = 0;\n\t\t}\n\t\t?>\n\t\t<tr>\n\t\t\t<th scope=\"row\" valign=\"top\"><label for=\"bcat_category_type\"><?php _ex('Network Type', 'Network Type', SITE_CATEGORIES_I18N_DOMAIN); ?></label></th>\n<?php /* ?>\t\t\t\n\t\t\t<td>\n\t\t\t\t<ul>\n\t\t\t\t\t<li><input type=\"radio\" name=\"bcat_category_type\" id=\"bcat_category_type_regular\" value=\"\" /> <label \n\t\t\t\t\t\tfor=\"bcat_category_type_regular\"><?php _e('Regular', SITE_CATEGORIES_I18N_DOMAIN); ?></label></li>\n\t\t\t\t\t<li><input type=\"radio\" name=\"bcat_category_type\" id=\"bcat_category_type_network_admin\" value=\"\" /> <label \n\t\t\t\t\t\tfor=\"bcat_category_type_network_admin\"><?php _e('Network Admin Assigned', SITE_CATEGORIES_I18N_DOMAIN); ?></label></li>\n\t\t\t</td>\n<?php */ ?>\n\t\t</tr>\t\n\n\t\t<tr>\n\t\t\t<th scope=\"row\" valign=\"top\"><label for=\"upload_image\"><?php _ex('Image', 'Network Image', SITE_CATEGORIES_I18N_DOMAIN); ?></label></th>\n\t\t\t<td>\n\t\t\t\t<p class=\"description\"><?php _e('The image used for the network icon will be displayed square.', SITE_CATEGORIES_I18N_DOMAIN) ?></p>\n\t\t\t\t<input type=\"hidden\" id=\"bcat_image_id\" value=\"<?php echo $bcat_image_id; ?>\" name=\"bcat_image_id\" />\n\t\t\t\t<input id=\"bcat_image_upload\" class=\"button-secondary\" type=\"button\" value=\"<?php _e('Select Image', SITE_CATEGORIES_I18N_DOMAIN); ?>\" <?php\n\t\t\t\t\tif ($bcat_image_id) { echo ' style=\"display: none;\" '; }; ?> />\n\t\t\t\t<input id=\"bcat_image_remove\" class=\"button-secondary\" type=\"button\" value=\"<?php _e('Remove Image', SITE_CATEGORIES_I18N_DOMAIN); ?>\" <?php\n\t\t\t\t\tif (!$bcat_image_id) { echo ' style=\"display: none;\" '; }; ?> />\n\t\t\t\t<br />\n\t\t\t\t<?php\n\t\t\t\t\t$bcat_image_default_src = $this->get_default_category_icon_url();\n\t\t\t\t\tif ($bcat_image_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$image_src \t= wp_get_attachment_image_src($bcat_image_id, array(100, 100));\n\t\t\t\t\t\tif (!$image_src) {\n\t\t\t\t\t\t\t$image_src[0] = \"#\";\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$image_src[0] = $bcat_image_default_src;\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t\t<img id=\"bcat_image_src\" src=\"<?php echo $image_src[0]; ?>\" alt=\"\" style=\"margin-top: 10px; max-width: 300px; max-height: 300px\" \n\t\t\t\t\t\trel=\"<?php echo $bcat_image_default_src; ?>\"/>\n\t\t\t\t\t<?php\n\t\t\t\t?></p>\n\t\t\t</td>\n\t\t</tr>\n\t\t<?php\n\t}", "title": "" }, { "docid": "6cb22f61f7c71d7d868d01ab93d9343a", "score": "0.418436", "text": "private function setDiscount()\n {\n if (Session::has('discount_code')){\n $this->discountCode = DiscountCode::where('code', Session()->get('discount_code')['code'])->first();\n }\n $this->discount = $this->discountExists() ? $this->calculateDiscount() : 0;\n }", "title": "" }, { "docid": "f72c527f49b284ab9623e13fca711937", "score": "0.41836798", "text": "function SetCategory(Category $category = null)\n {\n $this->category = $category;\n }", "title": "" }, { "docid": "f8a84b528558b403ac0ac0d7241a362e", "score": "0.41775647", "text": "private function set_attribute($attribute, $value){\r\nreturn !is_null($value) ? $attribute.' = \"'.trim($value).'\"': null;\r\n}", "title": "" }, { "docid": "748577bab52108c5d62ae95560fea748", "score": "0.41730008", "text": "function SetCategory(&$category)\r\n\t{\r\n\t\t$this->categoryId = $category->categoryId;\r\n\t}", "title": "" }, { "docid": "d00ab706c8f0ba54171fb60a197ee505", "score": "0.4167233", "text": "public function setCategory($category = null)\n {\n // validation for constraint: string\n if (!is_null($category) && !is_string($category)) {\n throw new \\InvalidArgumentException(sprintf('Invalid value, please provide a string, \"%s\" given', gettype($category)), __LINE__);\n }\n if (is_null($category) || (is_array($category) && empty($category))) {\n unset($this->Category);\n } else {\n $this->Category = $category;\n }\n return $this;\n }", "title": "" }, { "docid": "bc0cf7bdd42d1589b7d9b56979250fa8", "score": "0.4164334", "text": "public function setCategory(string $category)\n {\n $this->category = $category;\n }", "title": "" }, { "docid": "4d8401482874d47b6bd3144f2b08feec", "score": "0.4161926", "text": "function my_woo_mapper_get_categories($tax='product_cat'){\n\t$my_terms_12345=get_terms('product_cat',array('hide_empty'=>false\n\t));\n\t$arr[0]=__(\"Change pin display to category\",\"woo_image_mapper_domain\");\n\tif(!empty($my_terms_12345)){\t\n\t\tforeach($my_terms_12345 as $k=>$v){\n\t\t\t$arr[$v->term_id]=$v->name;\n\t\t}\n\t}\n\treturn $arr;\n}", "title": "" }, { "docid": "94526539b41000f4683d4b718813fda3", "score": "0.4156063", "text": "public function setExpenseCategoryIdAttribute($input)\n {\n $this->attributes['categoria_despesa_id'] = $input ? $input : null;\n }", "title": "" }, { "docid": "a9d870e01b83a1aba32e34a5786db88c", "score": "0.4156012", "text": "function ed_dynam_perks_create_default_cats(){\r\n\t$parent_term = term_exists( 'dynamic-perk-category' ); // array is returned if taxonomy is given\r\n\t$parent_term_id = $parent_term['term_id']; // get numeric term id\r\n\t$version = get_option( 'ed_dynam_perks_theme' );\r\n\tif($version == 'ed5'){\r\n\t\t$default_terms = array('Home Row 1', 'Home Row 2');\r\n\t} else {\r\n\t\t$default_terms = array('Home');\r\n\t}\r\n\r\n\tforeach ($default_terms as $term) {\r\n\t\t$term_slug = str_replace(' ', '-', strtolower($term));\r\n\t\t$term_descrip = $term . ' Perk Category';\r\n\t\twp_insert_term(\r\n\t\t $term, // the term \r\n\t\t 'dynamic-perk-category', // the taxonomy\r\n\t\t array(\r\n\t\t 'description'=> $term_descrip,\r\n\t\t 'slug' => $term_slug,\r\n\t\t 'parent'=> $parent_term_id\r\n\t\t )\r\n\t\t);\r\n\t}\r\n}", "title": "" }, { "docid": "584a9c73472e1f4bef124bbc31013e09", "score": "0.4152193", "text": "function snax_image_get_category_auto_assign() {\n\t$default = snax_get_legacy_category_auto_assign_setting();\n\n\treturn apply_filters( 'snax_image_category_auto_assign', get_option( 'snax_image_category_auto_assign', $default ) );\n}", "title": "" }, { "docid": "50a1e859a331f7d928511f80f84bc934", "score": "0.4152137", "text": "function SetCategory(&$category)\n\t{\n\t\t$this->categoryId = $category->categoryId;\n\t}", "title": "" }, { "docid": "694c5aa13051d20b37b25b85a3685b47", "score": "0.41517878", "text": "protected function setCurrencyCode() {\n\t\t//at this point, we can have either currency, or currency_code.\n\t\t//-->>currency_code has the authority!<<-- \n\t\t$currency = false;\n\t\t\n\t\tif ( $this->isSomething( 'currency' ) ) {\n\t\t\t$currency = $this->getVal( 'currency' );\n\t\t\t$this->expunge( 'currency' );\n\t\t\t$this->log( $this->getLogMessagePrefix() . \"Got currency from 'currency', now: $currency\", LOG_DEBUG );\n\t\t}\n\t\tif ( $this->isSomething( 'currency_code' ) ) {\n\t\t\t$currency = $this->getVal( 'currency_code' );\n\t\t\t$this->log( $this->getLogMessagePrefix() . \"Got currency from 'currency_code', now: $currency\", LOG_DEBUG );\n\t\t}\n\t\t\n\t\t//TODO: This is going to fail miserably if there's no country yet.\n\t\tif ( !$currency ){\n\t\t\trequire_once( dirname( __FILE__ ) . '/nationalCurrencies.inc' );\n\t\t\t$currency = getNationalCurrency($this->getVal('country'));\n\t\t\t$this->log( $this->getLogMessagePrefix() . \"Got currency from 'country', now: $currency\", LOG_DEBUG );\n\t\t}\n\t\t\n\t\t$this->setVal( 'currency_code', $currency );\n\t}", "title": "" }, { "docid": "82148b76150920f8604d351e36c4837a", "score": "0.4148298", "text": "public function getPhoneCarrierAttribute(){\n if($this->contact_type !== 'phone') return;\n\n $carrierMapper = \\libphonenumber\\PhoneNumberToCarrierMapper::getInstance();\n $carrierName = $carrierMapper->getNameForNumber(PhoneNumber::make($this->contact)->getPhoneNumberInstance(),'EN');\n\n // lшbphonenumber don't know all carriers. Help him.\n if($carrierName == '' && $this->isMobilePhone) {\n if(preg_match('/\\+798[78]/',$this->contact) === 1){\n return 'MTS';\n }\n }\n\n return $carrierName;\n }", "title": "" }, { "docid": "02a7981ee15c7e61860bee0f356c0956", "score": "0.4141941", "text": "public function setDiscountAppliedBeforeTax(?bool $value): void {\n $this->getBackingStore()->set('discountAppliedBeforeTax', $value);\n }", "title": "" }, { "docid": "e182f248cd19b8e0e55047e006e3986f", "score": "0.4130086", "text": "public function setCategory($value)\n\t{\n\t\t$this->category = $value;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "4a9f2aeb2e8bbfc00fc5a586d03ffcd4", "score": "0.41143575", "text": "public function getIndiceCateg(): ?int {\n return $this->indiceCateg;\n }", "title": "" }, { "docid": "6d3c4a468266893c0181730c22c82da2", "score": "0.4112752", "text": "public function set_term( $term_code ) {\n\t\tif(!$term_code) throw new \\InvalidArgumentException('Term Code must provided');\n\n\t\t$this->term_code = $term_code;\n\t\t$this->_calc_aid();\n\t\t$this->_load_current_term_aid();\n\n\t\t$this->_calc_deposits();\n\n\t\t$this->_calc_memos();\n\t\t$this->_calc_notes();\n\t\t$this->_load_current_term_memos();\n\t\t$this->_load_current_term_misc_memos();\n\n\t\t$this->_calc_receivables();\n\n\t\t$this->_load_pending_total();\n\t\t$this->_load_balance();\n\t\t$this->_load_account_balance();\n\n\t\t$this->_load_refund_available();\n\n\t\tif( isset( $this->data['not_billed'] ) ) {\n\t\t\t$this->_load_not_billed();\n\t\t}//end if\n\t}", "title": "" }, { "docid": "cc358e220e198f51e55bcfc09eda9a14", "score": "0.41068852", "text": "public function getBaseCategory()\n {\n return $this->baseCategory;\n }", "title": "" }, { "docid": "d1f928b7b8611b1e4ed9fc407a01e256", "score": "0.4100294", "text": "public function set_attribute( $attribute, $value = '' );", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "e3d0ccd4ada2dc88b7c57c5065e7e2e8", "score": "0.0", "text": "public function store(Request $request)\n {\n //\n }", "title": "" } ]
[ { "docid": "4d4665c3172bd48271ac325e48734b03", "score": "0.6960531", "text": "public function store()\n {\n $request = $this->makeRequest('store');\n $model = $this->service->create($request);\n\n if(is_a($model, \\Exception::class)) {\n\n return $this->getErrorResource($model);\n\n } else {\n\n return $this->maybeMakeResource('single', $model, 201);\n }\n\n }", "title": "" }, { "docid": "08b1c0fc414209453959162737452406", "score": "0.68456596", "text": "public function save()\n {\n $storage = new Storage();\n $storage->store();\n // ....\n }", "title": "" }, { "docid": "0af8c4e64c8f59b58839884dd423bdba", "score": "0.66870487", "text": "public function store()\n {\n return $this->_resourcePersistence->store();\n }", "title": "" }, { "docid": "cec443e02222c256f4cdc94a793632da", "score": "0.6618901", "text": "public function store() {\n\t\t$this->_storePrecheck();\n\t\t$model = $this->loadModel($this->params['model']);\n\t\t$fileData = StorageUtils::fileToUploadArray($this->args[0]);\n\n\t\t$entity = $model->newEntity([\n\t\t\t'adapter' => $this->params['adapter'],\n\t\t\t'file' => $fileData,\n\t\t\t'filename' => $fileData['name']\n\t\t]);\n\n\t\tif ($model->save($entity)) {\n\t\t\t$this->out('File successfully saved!');\n\t\t\t$this->out('UUID: ' . $entity->id);\n\t\t\t$this->out('Path: ' . $entity->path());\n\t\t} else {\n\t\t\t$this->abort('Failed to save the file.');\n\t\t}\n\t}", "title": "" }, { "docid": "3529d0e71e6d8ea828f2de852437018a", "score": "0.6586192", "text": "public function store()\n {\n // ...\n }", "title": "" }, { "docid": "d867e1815ae7201548cd26c492de3a7b", "score": "0.6553343", "text": "public function save(Storage $storage)\n {\n $storage->store();\n // ....\n }", "title": "" }, { "docid": "7407adcc5b0a18e46fd06cc8c7fc4fdf", "score": "0.6511526", "text": "public function store(Request $request)\n {\n\n $request->validate([\n 'user' => ['required'],\n 'phone' => ['required', ],\n 'email' => ['required', 'email:rfc,dns'],\n 'resource' => ['required'],\n ]);\n $resources = json_decode(Storage::get('resources.json'));\n $resources[] = [\n 'id' => uniqid(),\n 'user' => $request->input('user'),\n 'phone' => $request->input('phone'),\n 'email' => $request->input('email'),\n 'resource' => $request->input('resource'),\n 'date' => now()->format('d-m-Y'),\n ];\n\n Storage::put('resources.json', json_encode($resources));\n\n return redirect()->route('person-area')->with('success', \"Resource from \\\"{$request->input('user')}\\\" was added succesfully!\");\n }", "title": "" }, { "docid": "8ee7e267114dc7aff05b19f9ebc39079", "score": "0.6424367", "text": "public function create($resource);", "title": "" }, { "docid": "40718558d61a4c56dc5b2c2b6422e8cf", "score": "0.6419359", "text": "abstract public function createStorage();", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6342437", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "8e8e03727ca6544a2d009483f6d1aca9", "score": "0.0", "text": "public function destroy($id)\n {\n //\n }", "title": "" } ]
[ { "docid": "ef853768d92b1224dd8eb732814ce3fa", "score": "0.7318632", "text": "public function deleteResource(Resource $resource);", "title": "" }, { "docid": "32d3ed9a4be9d6f498e2af6e1cf76b70", "score": "0.6830789", "text": "public function removeResource($resource)\n {\n // Remove the Saved Resource\n $join = new User_resource();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n\n // Remove the Tags from the resource\n $join = new Resource_tags();\n $join->user_id = $this->user_id;\n $join->resource_id = $resource->id;\n $join->list_id = $this->id;\n $join->delete();\n }", "title": "" }, { "docid": "d9f10892d48fdfd7debb2a97681f0912", "score": "0.6659381", "text": "public function destroy(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "c3b6a958d3ad1b729bfd6e4353c3feba", "score": "0.6540415", "text": "public function deleteFile(ResourceObjectInterface $resource);", "title": "" }, { "docid": "00aa681a78c0d452ad0b13bfb8d908dd", "score": "0.64851683", "text": "public function removeResource(IResource $resource): void {\n\t\t$this->resources = array_filter($this->getResources(), function (IResource $r) use ($resource) {\n\t\t\treturn !$this->isSameResource($r, $resource);\n\t\t});\n\n\t\t$query = $this->connection->getQueryBuilder();\n\t\t$query->delete(Manager::TABLE_RESOURCES)\n\t\t\t->where($query->expr()->eq('collection_id', $query->createNamedParameter($this->id, IQueryBuilder::PARAM_INT)))\n\t\t\t->andWhere($query->expr()->eq('resource_type', $query->createNamedParameter($resource->getType())))\n\t\t\t->andWhere($query->expr()->eq('resource_id', $query->createNamedParameter($resource->getId())));\n\t\t$query->execute();\n\n\t\tif (empty($this->resources)) {\n\t\t\t$this->removeCollection();\n\t\t} else {\n\t\t\t$this->manager->invalidateAccessCacheForCollection($this);\n\t\t}\n\t}", "title": "" }, { "docid": "e63877a9259e2bac051cf6c3de5eca30", "score": "0.6431514", "text": "public function deleteResource(Resource $resource) {\n\t\t$pathAndFilename = $this->getStoragePathAndFilenameByHash($resource->getSha1());\n\t\ttry {\n\t\t\t$result = $this->filesystem->delete($pathAndFilename);\n\t\t} catch (\\Exception $e) {\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "680170dae622eedce573be6ddf82f8db", "score": "0.6371304", "text": "public function removeStorage($imgName,$storageName);", "title": "" }, { "docid": "95caa506b86f6d24869dcb0b83d598e5", "score": "0.63126063", "text": "public function unlink(IEntity $source, IEntity $target, string $relation): IStorage;", "title": "" }, { "docid": "2f5ddf194cad1d408d416d31cae16f05", "score": "0.6301321", "text": "public function delete()\n {\n Storage:: delete();\n }", "title": "" }, { "docid": "b907271045dec6299e819d6cb076ced8", "score": "0.6288393", "text": "abstract protected function doRemove(ResourceInterface $resource, $files);", "title": "" }, { "docid": "90bf57c42b6c381768022b254ea3b8e9", "score": "0.62784326", "text": "public static function remove ($resource, $data) {\n // Retrieve resource.\n $list = self::retriveJson($resource);\n // If resource is not availabe.\n if ($list == 1) return 1;\n\n // Iterate through list.\n foreach($list as $i => $object) {\n // If an object with the given id exists, remove it.\n if ($object['id'] == $data['id']) {\n array_splice($list, $i, 1);\n return 0;\n }\n }\n\n // If object does not exists.\n return 2;\n }", "title": "" }, { "docid": "5eda1f28deed9cc179d6350748fe7164", "score": "0.62480205", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n activity()\n ->performedOn(Auth::user())\n ->causedBy($resource)\n ->withProperties(['remove user' => 'customValue'])\n ->log('Resource Deleted successfully');\n $notification = array(\n 'message' => 'Resource Deleted successfully', \n 'alert-type' => 'success'\n );\n \n return back()->with($notification); \n }", "title": "" }, { "docid": "42a9b004cc56ed1225f545039f158828", "score": "0.6130072", "text": "function delete_resource($ref)\n\t{\n\t\n\tif ($ref<0) {return false;} # Can't delete the template\n\n\t$resource=get_resource_data($ref);\n\tif (!$resource) {return false;} # Resource not found in database\n\t\n\t$current_state=$resource['archive'];\n\t\n\tglobal $resource_deletion_state, $staticsync_allow_syncdir_deletion, $storagedir;\n\tif (isset($resource_deletion_state) && $current_state!=$resource_deletion_state) # Really delete if already in the 'deleted' state.\n\t\t{\n\t\t# $resource_deletion_state is set. Do not delete this resource, instead move it to the specified state.\n\t\tsql_query(\"update resource set archive='\" . $resource_deletion_state . \"' where ref='\" . $ref . \"'\");\n\n # log this so that administrator can tell who requested deletion\n resource_log($ref,'x','');\n\t\t\n\t\t# Remove the resource from any collections\n\t\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\t\t\t\n\t\treturn true;\n\t\t}\n\t\n\t# Get info\n\t\n\t# Is transcoding\n\tif ($resource['is_transcoding']==1) {return false;} # Can't delete when transcoding\n\n\t# Delete files first\n\t$extensions = array();\n\t$extensions[]=$resource['file_extension']?$resource['file_extension']:\"jpg\";\n\t$extensions[]=$resource['preview_extension']?$resource['preview_extension']:\"jpg\";\n\t$extensions[]=$GLOBALS['ffmpeg_preview_extension'];\n\t$extensions[]='icc'; // also remove any extracted icc profiles\n\t$extensions=array_unique($extensions);\n\t\n\tforeach ($extensions as $extension)\n\t\t{\n\t\t$sizes=get_image_sizes($ref,true,$extension);\n\t\tforeach ($sizes as $size)\n\t\t\t{\n\t\t\tif (file_exists($size['path']) && ($staticsync_allow_syncdir_deletion || false !== strpos ($size['path'],$storagedir))) // Only delete if file is in filestore\n\t\t\t\t {unlink($size['path']);}\n\t\t\t}\n\t\t}\n\t\n\t# Delete any alternative files\n\t$alternatives=get_alternative_files($ref);\n\tfor ($n=0;$n<count($alternatives);$n++)\n\t\t{\n\t\tdelete_alternative_file($ref,$alternatives[$n]['ref']);\n\t\t}\n\n\t\n\t// remove metadump file, and attempt to remove directory\n\t$dirpath = dirname(get_resource_path($ref, true, \"\", true));\n\tif (file_exists(\"$dirpath/metadump.xml\")){\n\t\tunlink(\"$dirpath/metadump.xml\");\n\t}\n\t@rmdir($dirpath); // try to delete directory, but if it has stuff in it fail silently for now\n\t\t\t // fixme - should we try to handle if there are other random files still there?\n\t\n\t# Log the deletion of this resource for any collection it was in. \n\t$in_collections=sql_query(\"select * from collection_resource where resource = '$ref'\");\n\tif (count($in_collections)>0){\n\t\tif (!function_exists(\"collection_log\")){include (\"collections_functions.php\");}\n\t\tfor($n=0;$n<count($in_collections);$n++)\n\t\t\t{\n\t\t\tcollection_log($in_collections[$n]['collection'],'d',$in_collections[$n]['resource']);\n\t\t\t}\n\t\t}\n\n\thook(\"beforedeleteresourcefromdb\",\"\",array($ref));\n\n\t# Delete all database entries\n\tsql_query(\"delete from resource where ref='$ref'\");\n\tsql_query(\"delete from resource_data where resource='$ref'\");\n\tsql_query(\"delete from resource_dimensions where resource='$ref'\");\n\tsql_query(\"delete from resource_keyword where resource='$ref'\");\n\tsql_query(\"delete from resource_related where resource='$ref' or related='$ref'\");\n\tsql_query(\"delete from collection_resource where resource='$ref'\");\n\tsql_query(\"delete from resource_custom_access where resource='$ref'\");\n\tsql_query(\"delete from external_access_keys where resource='$ref'\");\n\tsql_query(\"delete from resource_alt_files where resource='$ref'\");\n\t\t\n\thook(\"afterdeleteresource\");\n\t\n\treturn true;\n\t}", "title": "" }, { "docid": "d9b3f9cbdf088b174df39b489f05872c", "score": "0.6087595", "text": "public function delete(UriInterface $uri, \\stdClass $resource)\n {\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n\n if(!property_exists($resource, '_links')) {\n return;\n }\n\n $links = $resource->_links;\n\n if($links) {\n foreach ($links as $link) {\n if(is_object($link) && property_exists($link, 'href')) {\n $uri = Client::getInstance()\n ->getDataStore()\n ->getUriFactory()\n ->createUri($link->href);\n }\n\n $this->cachePool->deleteItem($this->createCacheKey($uri));\n }\n }\n\n }", "title": "" }, { "docid": "9b39cbd70aa1aa97e5e5907676b3271e", "score": "0.60398406", "text": "public function removeResource ($name)\n\t{\n\t\t\n\t\tif (isset ($this->resources[$name]))\n\t\t{\n\t\t\t\n\t\t\tunset ($this->resources[$name]);\n\t\t\t\n\t\t\tif (isset ($this->$name))\n\t\t\t{\n\t\t\t\tunset ($this->$name);\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "21644a433a62c5fd1c528ea36afc90b8", "score": "0.6036098", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return redirect()->route('resource.index');\n }", "title": "" }, { "docid": "ba57ef5b5809e7e9dff4ab48e18b343a", "score": "0.603003", "text": "public function delete()\n\t{\n\t\t$this->fs->remove($this->file);\n\t}", "title": "" }, { "docid": "d0b2a4440bb64c6f1cf160d3a82d7633", "score": "0.60045654", "text": "public function destroy($id)\n {\n $student=Student::find($id);\n //delete related file from storage\n $student->delete();\n return redirect()->route('student.index');\n }", "title": "" }, { "docid": "73c704a80ae4a82903ee86a2b821245a", "score": "0.5944851", "text": "public function delete()\n {\n unlink($this->path);\n }", "title": "" }, { "docid": "b4847ad1cd8f89953ef38552f8cdddbe", "score": "0.5935105", "text": "public function remove($identifier)\n {\n $resource = $this->repository->findOneByIdentifier($identifier);\n $this->repository->remove($resource);\n }", "title": "" }, { "docid": "b3d5aa085167568cd1836dd269d2e8dc", "score": "0.59211266", "text": "public function delete(User $user, Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "b1845194ffa32f9bcc26cc1bed8ee573", "score": "0.5896058", "text": "public function destroy()\n {\n $item = Item::find(request('id'));\n if ($item) {\n if ($item->image_url != '' && file_exists(public_path().'/uploads/item/'.$item->image_url)) {\n unlink(public_path().'/uploads/item/'.$item->image_url);\n }\n $item->delete();\n return response()->json(['success'=>'Record is successfully deleted']);\n }\n}", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "53eee40f2e33c1c3b53b819bb59d254d", "score": "0.58634996", "text": "public function delete()\n {\n Storage::delete($this->path);\n return parent::delete();\n }", "title": "" }, { "docid": "28f192e8f4063c3aaceba80a5680f10b", "score": "0.5845638", "text": "public function deleteResource(Resource $resource)\n {\n $whitelist = ['id'];\n $reflObj = new \\ReflectionClass($resource);\n\n //null out all fields not in the whitelist\n foreach ($reflObj->getProperties() as $prop) {\n if (!in_array($prop->getName(), $whitelist)) {\n $prop->setAccessible(true);\n $prop->setValue($resource, null);\n }\n }\n\n //set delete date and status\n $resource->setDateDeleted(new \\DateTime());\n $resource->setStatus(Resource::STATUS_DELETED);\n\n return $resource;\n }", "title": "" }, { "docid": "90ed2fbe159714429baa05a4796e3ed0", "score": "0.58285666", "text": "public function destroy() { return $this->rm_storage_dir(); }", "title": "" }, { "docid": "62415c40499505a9895f5a25b8230002", "score": "0.58192986", "text": "public function destroy($id)\n {\n $storage = Storage::find($id);\n $storage->delete();\n return redirect()->route('storage.index')->with('success', 'Data Deleted');\n }", "title": "" }, { "docid": "a2754488896ea090fe5191a49d9d85b9", "score": "0.58119655", "text": "public function deleteFile()\n { \n StorageService::deleteFile($this);\n }", "title": "" }, { "docid": "368230bb080f8f6c51f1832974a498e2", "score": "0.58056664", "text": "public function destroy($id)\n {\n $product = Product::where('id',$id)->first();\n $photo = $product->image;\n if($photo){\n unlink($photo);\n $product->delete();\n }else{\n $product->delete();\n }\n\n }", "title": "" }, { "docid": "31e5cc4a0b6af59482a96519deaba446", "score": "0.5797684", "text": "public function delete()\r\n {\r\n $directory = rtrim(config('infinite.upload_path'), \"/\");\r\n\r\n Storage::delete($directory . '/' . $this->file_name . '.' . $this->extension);\r\n }", "title": "" }, { "docid": "5760f6df7c6ebd5440da74e84ef8e734", "score": "0.57779175", "text": "public function remove($identifier);", "title": "" }, { "docid": "c473e5d9c679fa421932f0d830432589", "score": "0.5770938", "text": "abstract public function destroyResource(\n DrydockBlueprint $blueprint,\n DrydockResource $resource);", "title": "" }, { "docid": "80ccefee911dbbebc88e3854b170acf7", "score": "0.5765826", "text": "public function removeRecord();", "title": "" }, { "docid": "22ecee59028ed62aa46bfb196c94d320", "score": "0.5745101", "text": "function remove_from_set($setID, $resource) {\n\tglobal $wpdb;\n\t$resource_table = $wpdb->prefix . 'savedsets_resources';\n\t\n\t$wpdb->delete( $resource_table, array( 'set_id' => $setID, 'resource_id' => $resource ), array( '%d','%d' ) );\n\t\n}", "title": "" }, { "docid": "80279a1597fc869ef294d03bcd1a6632", "score": "0.5721846", "text": "public function rm($id)\n {\n }", "title": "" }, { "docid": "f1357ea9bb8630aa33594f5035e30b53", "score": "0.57217026", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // if the stash file is not referenced any more, delete it\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "45fc5fca7261f9ee05d7a7cfb701d0c1", "score": "0.5717582", "text": "public function destroy($id)\n {\n $del = File::find($id);\n\n if ($del->user_id == Auth::id()) {\n Storage::delete($del->path);\n $del->delete();\n return redirect('/file');\n } else {\n echo \"Its not your file!\";\n }\n }", "title": "" }, { "docid": "19b2a562afcef7db10ce9b75c7e6a8dc", "score": "0.57099277", "text": "public function deleteFromDisk(): void\n {\n Storage::cloud()->delete($this->path());\n }", "title": "" }, { "docid": "493060cb88b9700b90b0bdc650fc0c62", "score": "0.5700126", "text": "public function drop() {\n global $DB;\n\n if (!$DB->count_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid))) {\n throw new coding_exception('Attempt to delete non-existing stash (record)');\n }\n if (!is_writable($this->get_storage_filename())) {\n throw new coding_exception('Attempt to delete non-existing stash (file)');\n }\n\n $DB->delete_records('amos_stashes', array('id' => $this->id, 'hash' => $this->hash, 'ownerid' => $this->ownerid));\n // If the stash file is not referenced any more, delete it.\n if (!$DB->record_exists('amos_stashes', array('hash' => $this->hash))) {\n $filename = $this->get_storage_filename();\n unlink($filename);\n @rmdir(dirname($filename));\n @rmdir(dirname(dirname($filename)));\n }\n }", "title": "" }, { "docid": "a85f5bb361425e120c2b1c92b82b2fe9", "score": "0.56977797", "text": "public function destroy($id)\n {\n $file = File::findOrFail($id);\n Storage::disk('public')->delete(str_replace('/storage/','',$file->path));\n $file->delete();\n return redirect('/admin/media');\n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "c553ef667073b35a27db9e6a3bae3be3", "score": "0.56575704", "text": "public function unlink() {\n\t\t$return = unlink($this->fullpath);\n\t\t// destroy object ...testing :)\n\t\tunset($this);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "0532947b7106b0e9285319a9eaf76b8e", "score": "0.56488144", "text": "public function destroy($id)\n\t{\n $entry = Fileentry::find($id);\n Storage::disk('local')->delete($entry->filename);\n $entry->delete();\n\n return redirect()->back();\n\t}", "title": "" }, { "docid": "c29cf340a7685b50d4992018f03a1a37", "score": "0.5645965", "text": "public function destroy() {\n return $this->resource->destroy();\n }", "title": "" }, { "docid": "0b78e5e9a8d5d2a166659b0988261da1", "score": "0.5633292", "text": "public function destroy($id)\n {\n //\n //\n $slider = Slider::findOrFail($id);\n// if(Storage::exists($slider->image_path))\n// {\n// Storage::delete($slider->image_path);\n// }\n $slider->delete();\n return redirect()->back()->with('success', 'Slider was deleted successfully!');\n }", "title": "" }, { "docid": "e56ffdb12b7e8ce9ce9b709dd82f37f7", "score": "0.56325144", "text": "public function removeById($id);", "title": "" }, { "docid": "f0bca51252baaca5a816eef1c2c06fc0", "score": "0.56296647", "text": "public function detach()\n {\n $oldResource=$this->resource;\n fclose($this->resource);\n $this->resource=NULL;\n return $oldResource;\n }", "title": "" }, { "docid": "41660f6084f57c1f6d52218d45380858", "score": "0.5612277", "text": "public function destroy($id)\n {\n $destroy = File::find($id);\n Storage::delete('public/img/'.$destroy->src);\n $destroy->delete();\n return redirect('/files');\n }", "title": "" }, { "docid": "b6093338d60ff2644649eac3d576e7d9", "score": "0.5606613", "text": "public function delete($resource, array $options = [])\n {\n return $this->request('DELETE', $resource, $options);\n }", "title": "" }, { "docid": "59de27765b5cb766d8d7c06e25831e55", "score": "0.5604046", "text": "function delete() {\n\n return unlink($this->path);\n\n }", "title": "" }, { "docid": "547eb07f41c94e071fb1daf6da02654d", "score": "0.55980563", "text": "public function destroy($id)\n {\n $product = Product::findOrFail($id);\n unlink(public_path() .'/images/'.$product->file->file);\n session(['Delete'=>$product->title]);\n $product->delete();\n return redirect()->back();\n }", "title": "" }, { "docid": "2b68a0dafbed1898fb849c8102af4ac1", "score": "0.55952084", "text": "public function destroy($id){\n $book = Book::withTrashed()->where('id', $id)->firstOrFail(); \n\n if ($book->trashed()) {\n session()->flash('success', 'El libro se a eliminado exitosamente');\n Storage::delete($book->image); \n $book->forceDelete();\n }else{\n session()->flash('success', 'El libro se envio a la papelera exitosamente');\n $book->delete();\n }\n return redirect(route('books.index'));\n }", "title": "" }, { "docid": "0354eb11a59ab56fb4c68c1ca1a34f9e", "score": "0.55922675", "text": "public function removeUpload(){\n if($file = $this->getAbsolutePath()){\n unlink($file);\n }\n \n }", "title": "" }, { "docid": "8a2965e7fd915ac119635055a709e09f", "score": "0.5591116", "text": "public function destroy($id, Request $request)\n {\n $imagePath = DB::table('game')->select('image')->where('id', $id)->first();\n\n $filePath = $imagePath->image;\n\n if (file_exists($filePath)) {\n\n unlink($filePath);\n\n DB::table('game')->where('id',$id)->delete();\n\n }else{\n\n DB::table('game')->where('id',$id)->delete();\n }\n\n return redirect()->route('admin.game.index');\n }", "title": "" }, { "docid": "954abc5126ecf3e25d5e32fc21b567ff", "score": "0.55901456", "text": "public function remove( $resourceId )\n {\n unset( $this->resourceList[ $resourceId ] );\n \n $this->database->exec( \"\n DELETE FROM\n `{$this->tbl['library_collection']}`\n WHERE\n collection_type = \" . $this->database->quote( $this->type ) . \"\n AND\n ref_id = \" . $this->database->quote( $this->refId ) . \"\n AND\n resource_id = \" . $this->database->escape( $resourceId ) );\n \n return $this->database->affectedRows();\n }", "title": "" }, { "docid": "f7194357aa4e137cfa50acffda93fc27", "score": "0.55829436", "text": "public static function delete($path){}", "title": "" }, { "docid": "a22fc9d493bea356070527d5c377a089", "score": "0.5578515", "text": "public function remove($name) { return IO_FS::rm($this->full_path_for($name)); }", "title": "" }, { "docid": "8a6c54307038aeccb488677b49209dac", "score": "0.5574026", "text": "public function destroy($id)\n {\n //\n //\n $resource = Resource::find($id);\n $resource->delete();\n return redirect()->back();\n\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "fa9a2e384d55e25ff7893069c00561f7", "score": "0.5568524", "text": "public function destroy($id)\n {\n $data = Crud::find($id);\n $image_name = $data->image;\n unlink(public_path('images'.'/'.$image_name));\n $data->delete();\n return redirect('crud')->with('success','record deleted successfully!');\n\n\n }", "title": "" }, { "docid": "9e4e139799275c6ed9f200c63b6d4a6d", "score": "0.55617994", "text": "public function delete($resource)\n {\n // Make DELETE Http request\n $status = $this->call('DELETE', $resource)['Status-Code'];\n if ($status) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "2160551c2833f1a763a1634fee961123", "score": "0.5560052", "text": "public function deleteItem($path, $options = null)\n {\n $this->_rackspace->deleteObject($this->_container,$path);\n if (!$this->_rackspace->isSuccessful()) {\n throw new Zend_Cloud_StorageService_Exception('Error on delete: '.$this->_rackspace->getErrorMsg());\n }\n }", "title": "" }, { "docid": "684ee86436e720744df6668b707a5ac0", "score": "0.5557478", "text": "public function deleteImage()\n {\n Storage::delete($this->image);\n }", "title": "" }, { "docid": "1bc9bf0c3a8c77c07fcaf9de0c876d86", "score": "0.5555183", "text": "public function destroy($id)\n { \n $record = Post::findOrFail($id); \n\n if($record->thumbnail !== 'default.png'){\n Storage::delete('Post/'.$record->thumbnail); \n } \n \n $done = Post::destroy($id); \n\n return back()->with('success' , 'Record Deleted');\n }", "title": "" }, { "docid": "9e9a9d9363b0ac3e68a1243a8083cd0b", "score": "0.55495435", "text": "public function destroy($id)\n {\n \n $pro=Product::find($id);\n $one=$pro->image_one;\n \n $two=$pro->image_two;\n $three=$pro->image_three;\n $four=$pro->image_four;\n $five=$pro->image_five;\n $six=$pro->image_six;\n $path=\"media/products/\";\n Storage::disk('public')->delete([$path.$one,$path.$two,$path.$three,$path.$four,$path.$five,$path.$six]);\n\n\n\n $pro->delete();\n Toastr()->success('Product Deleted successfully');\n return redirect()->back();\n \n }", "title": "" }, { "docid": "2c6776be63eac31e1729852dfa8745a9", "score": "0.5548924", "text": "public function destroy($id)\n {\n $partner = Partner::findOrFail($id);\n\n if($partner->cover && file_exists(storage_path('app/public/' . $partner->cover))){\n \\Storage::delete('public/'. $partner->cover);\n }\n \n $partner->delete();\n \n return redirect()->route('admin.partner')->with('success', 'Data deleted successfully');\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "fb75e67696c980503f7ebd09ae729fe9", "score": "0.5538126", "text": "final public function delete() {}", "title": "" }, { "docid": "aa31cbc566ad4ff78241eb4b0f49fe1e", "score": "0.5536226", "text": "public function destroy($id)\n\t{\n\t\t$this->resource->find($id)->delete();\n\n\t\treturn Redirect::route('backend.resources.index');\n\t}", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.55271083", "text": "public function delete();", "title": "" }, { "docid": "ec759861dd3d396dcc09d5e1bfcf628b", "score": "0.5521281", "text": "public function unlink($path);", "title": "" }, { "docid": "b896244b5af3e4822537d0d1d7ab8fdf", "score": "0.5519644", "text": "public function destroy($id)\n {\n $input = $request->all();\n \t$url = parse_url($input['src']);\n \t$splitPath = explode(\"/\", $url[\"path\"]);\n \t$splitPathLength = count($splitPath);\n \tImageUploads::where('path', 'LIKE', '%' . $splitPath[$splitPathLength-1] . '%')->delete();\n }", "title": "" }, { "docid": "0d93adedaef8f05d9f7cbb129944a438", "score": "0.55152917", "text": "public function delete()\n {\n imagedestroy($this->image);\n $this->clearStack();\n }", "title": "" }, { "docid": "ceab6acdbc23ed7a9a41503580c0a747", "score": "0.55148435", "text": "public function delete()\n {\n $this->value = null;\n $this->hit = false;\n $this->loaded = false;\n $this->exec('del', [$this->key]);\n }", "title": "" }, { "docid": "28797da9ff018d2e75ab89e4bc5cd50d", "score": "0.5511856", "text": "public function destroy($id)\n {\n $user= Auth::user();\n\n $delete = $user->profileimage;\n $user->profileimage=\"\";\n $user->save();\n $image_small=public_path().'/Store_Erp/books/profile/'.$delete ;\n unlink($image_small);\n Session::flash('success',' Profile Image Deleted Succesfully!');\n return redirect()->route('user.profile'); \n \n }", "title": "" }, { "docid": "a92d57f4ccac431a9299e4ad1f0d1618", "score": "0.54956895", "text": "public function destroy($id)\n {\n //\n\n $personaje=Personaje::findOrFail($id);\n\n if(Storage::delete('public/'.$personaje->Foto)){\n \n Personaje::destroy($id);\n }\n\n\n\n\n\n return redirect('personaje')->with('mensaje','Personaje Borrado');\n }", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "48a57deb7c791b1ea810616329e3805e", "score": "0.54922575", "text": "abstract public function delete($path);", "title": "" }, { "docid": "df0b2bf2ed8277a4cd77f933418a9cd1", "score": "0.5491558", "text": "public function deleteFile()\n\t{\n\t\tif($this->id)\n\t\t{\n\t\t\t$path = $this->getFileFullPath();\n\t\t\tif($path)\n\t\t\t{\t\t\t\n\t\t\t\t@unlink($path);\n\t\t\t\t$this->setFile(null);\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
ae53641d08dff824dda41ea86f961098
END constructor displays field for publish/saef
[ { "docid": "6247548da4ded878a233bcc58b22b3ba", "score": "0.0", "text": "public function display_field($data)\n\t{\n\t\t$data = $this->prep_data($data);\n\n\t\tee()->load->model('freeform_form_model');\n\n\t\tif ( ! $this->fob()->data->show_all_sites())\n\t\t{\n\t\t\tee()->freeform_form_model->where(\n\t\t\t\t'site_id',\n\t\t\t\tee()->config->item('site_id')\n\t\t\t);\n\t\t}\n\n\t\t$c_forms =\tee()->freeform_form_model\n\t\t\t\t\t\t->key('form_id', 'form_label')\n\t\t\t\t\t\t->where('composer_id !=', 0)\n\t\t\t\t\t\t->get();\n\n\t\t$return = '<p>' . lang('no_available_composer_forms', $this->field_name . '[form]') . '</p>';\n\n\t\tif ($c_forms !== FALSE)\n\t\t{\n\t\t\t$output_array = array(0 => '--');\n\n\t\t\tforeach ($c_forms as $form_id => $form_label)\n\t\t\t{\n\t\t\t\t$output_array[$form_id] = $form_label;\n\t\t\t}\n\n\t\t\t$return = '<p>';\n\t\t\t$return .= lang('choose_composer_form', $this->field_name . '[form]');\n\t\t\t$return .= form_dropdown(\n\t\t\t\t$this->field_name . '[form]',\n\t\t\t\t$output_array,\n\t\t\t\tisset($data['form']) ? $data['form'] : ''\n\t\t\t);\n\t\t\t$return .= '</p>';\n\n\t\t\t$return .= '<p>';\n\t\t\t$return .= lang('return_page_field', $this->field_name . '[return]');\n\t\t\t$return .= '<p>' . form_input(array(\n\t\t\t\t'name'\t=> $this->field_name . '[return]',\n\t\t\t\t'value'\t=> isset($data['return']) ? $data['return'] : '',\n\t\t\t\t'style'\t=> 'width:25%;'\n\t\t\t));\n\t\t\t$return .= '</p>';\n\t\t}\n\n\t\treturn $return;\n\t}", "title": "" } ]
[ { "docid": "6f31c193a5a28183f6123e1a3125bf45", "score": "0.68339026", "text": "public function __construct() {\n parent::__construct( $this->id(), '(ClanPress) ' . $this->name(), array(\n 'description' => $this->description(),\n ));\n }", "title": "" }, { "docid": "a31675c8181397ceed78ba0c813d3a8b", "score": "0.6633686", "text": "public function __construct() {\n $this->_display = new StdClass;\n }", "title": "" }, { "docid": "a67490270b8c83544411c9975ed15d99", "score": "0.66222316", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->title = \"MetOrg\";\n\t\t$this->value = \"Value\";\n\t\t$this->metric = \"Metric\";\n\t}", "title": "" }, { "docid": "a47a7c55ed88f273bc5b174619865c78", "score": "0.6459869", "text": "public function __construct(){\n parent::__construct();\n $this->title = \"FODA\";\n $this->item = \"Item\";\n $this->priority = \"Priority\";\n $this->type = \"FODA_Type\";\n }", "title": "" }, { "docid": "3d0727f9f77ffa1c584d72a12267d396", "score": "0.6424992", "text": "public function __construct() {\n $this->_title = '';\n $this->_description = '';\n $this->_timestamp = 0;\n $this->_content = '';\n $this->_link = '';\n $this->_creator = '';\n }", "title": "" }, { "docid": "9797ab56cf5a75b30c4bdbee847b24dc", "score": "0.6347263", "text": "function __toString(){\n\n\t\treturn <<<EOF\n\nEspecie: {$this->especie}\nPeso: {$this->peso}\nVelocidade: {$this->velocidade}\nFome: {$this->fome}\n\n--------------------------------------\n\nEOF;\n\t}", "title": "" }, { "docid": "a56647920055e418226dffff808dea27", "score": "0.63296163", "text": "function __construct() {\n\t\tparent::__construct(\n\t\t\t'newsletter_widget', // Base ID\n\t\t\t__('הרשמה לניוזלטר', 'bama'), // Name\n\t\t\tarray( 'description' => __( 'ווידגט הרשמה לניוזלטר', 'bama' ), ) // Args\n\t\t);\n\t}", "title": "" }, { "docid": "ac8e2c242a5eef83a36e2eb1876d4416", "score": "0.63137984", "text": "public function __construct() {\n\t\t\t\n\t\t\tparent::__construct(\n\t\t\t\n\t\t\t\t'rb_latest_news', // BASE ID\n\t\t\t\t__('Latest News', ''), // NAME\n\t\t\t\tarray('description' => __('Displays latest news', '')) // DESCRIPTION\n\t\t\t\n\t\t\t);\n\t\t\t\n\t\t}", "title": "" }, { "docid": "a68d725470c54beb4689d74dcc813bc7", "score": "0.6304058", "text": "function __construct() \n\t{\t\t\n\t\tparent::__construct(\n\t\t\t'wnzh', \n\t\t\t__('Prerequisite for a residence permit'), \n\t\t\tarray( \n\t\t\t\t'description' => __('Add a prerequisite for a residence permit to sidebar.'), \n\t\t\t\t'classname' => 'widget-wnzh'\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "3d1c1863c082cbcd5d87e9a8694187ca", "score": "0.6303419", "text": "function __construct()\n {\n parent::__construct();\n\n //SHIN_Core::$_libs['seo']->addToTitle(SHIN_Core::$_language->line('lang_label_gtrwebsite_sf_title'));\n //SHIN_Core::$_libs['seo']->addToTitle(SHIN_Core::$_language->line('lang_label_gtrwebsite_sf_mainpage'));\n }", "title": "" }, { "docid": "1bbb82752ac3d44f37409e0342fadb33", "score": "0.63000673", "text": "public function __construct(){\n\t\t\t// call the parent constructor\n\t\t\tparent::__construct();\n\t\t\t// set the name of the field\n\t\t\t$this->_name = __('CSS 3 Filters');\n\t\t\t// permits to make it required\n\t\t\t$this->_required = false;\n\t\t\t// permits the make it show in the table columns\n\t\t\t$this->_showcolumn = true;\n\t\t\t// set as not required by default\n\t\t\t$this->set('required', 'no');\n\t\t\t// set not unique by default\n\t\t\t$this->set('unique', 'no');\n\n\t\t}", "title": "" }, { "docid": "f66ca8cc8522b462a82bee10085c7244", "score": "0.6295065", "text": "function __construct () {\n\t\t$this->metaData = Lang::get('metadata');\n\t}", "title": "" }, { "docid": "57572eb6409416b35a51983e20bf5176", "score": "0.62896085", "text": "public function __toString(){\n\t return 'id: '. $this->getId() .'<br />'.\n\t 'name: '. $this->getName() .'<br />'.\n\t 'description: '. $this->getDescription();\n\t}", "title": "" }, { "docid": "ef41eefbe3dd80411b8bd8e15ab02d85", "score": "0.6285861", "text": "function __toString() {\r\n\t\t$page =& $this->get_page();\r\n\t\treturn $this->get_name().' (id='.$page->ID.')';\r\n\t}", "title": "" }, { "docid": "d82a27db61dc4428596a7dcb215bf308", "score": "0.62556237", "text": "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->data['meta_title'] = \"NextGate Music Database\";\n\t}", "title": "" }, { "docid": "0c2d72f3547600fe37f644a94b02ca76", "score": "0.62352556", "text": "function myCustomFields() { $this->__construct(); }", "title": "" }, { "docid": "c7ad164020163878a4a48852177ed892", "score": "0.6216571", "text": "public function __toString(){\n return \"prenom: {$this->prenom}\";\n }", "title": "" }, { "docid": "f3e26f584446b88143988ac08dfe523c", "score": "0.62143475", "text": "function __toString () {\r\n return $this->title;\r\n }", "title": "" }, { "docid": "8ee033abcacef65ff3d3438395781aa0", "score": "0.62132233", "text": "public function __toString()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "19a0e506bb5c899c00f6161dc6cb98f8", "score": "0.62107724", "text": "function __construct($display){\n $this->display = $display;\n }", "title": "" }, { "docid": "66f1ab84310bf032d0870db262b74203", "score": "0.62086624", "text": "function __construct() {\n\n\t\t$widget_opts = array(\n\t\t\t'description' => __(\n\t\t\t\tHSCLib_Data_Management::$widget_os['description_en'], 'text_domain' ),\n\t\t);\n\t\tparent::__construct(\n\t\t\t// Base ID\n\t\t\tHSCLib_Data_Management::$params['id-base'],\n\t\t\t// Config Page Name for display is next.\n\t\t\t// Note: cannot call __() to compute a class-initialized value in $params,\n\t\t\t// so we do it here. Also, 'text_domain' need not vary now so we hard code it here.\n\t\t\t__( HSCLib_Data_Management::$params['name_config_page_en'], 'text_domain' ),\n\t\t\t// array of args, also called Widget Options\n\t\t\t$widget_opts\n\t\t\t// No control options need to be passed for this class.\n\t\t);\n\t}", "title": "" }, { "docid": "97d1f6e0e4149e45d02b6372fa407315", "score": "0.61942255", "text": "public function __toString() {\n\t}", "title": "" }, { "docid": "f782e5e0bb1ba66d618e56dbdfdbdd41", "score": "0.6193025", "text": "function payment_fields(){\n\t\t\techo $this->description;\n\t\t}", "title": "" }, { "docid": "f36211e4dc3c5f13056d31a2cfe19526", "score": "0.6184396", "text": "function __toString(){\n // . \"Cognome : \". $this -> cognome . \"<br>\"\n // .\"Anno di Nascita: \". $this -> annoNascita.\"<br>\" ;\n\n return parent::__toString().\"Anno di Nascita: \". $this -> annoNascita.\"<br>\" ;\n }", "title": "" }, { "docid": "86b55a261110f50ec1540494cf7fe0da", "score": "0.61812854", "text": "public function get_desc(){ return $this->desc; }", "title": "" }, { "docid": "e073810948f556082b77a6bf5e8bb0ea", "score": "0.6180357", "text": "function __construct() {\n\t\tparent::__construct(\n\t\t\t'ke_future_posts', // Base ID\n\t\t\t__('KE Future Posts', 'text_domain'), // Name\n\t\t\tarray( 'description' => __( 'Register and future post list', 'text_domain' ), ) // Args\n\t\t);\n\t}", "title": "" }, { "docid": "2ace7f2f2152fc21b7d30fc6d1f9d33f", "score": "0.61774254", "text": "function __construct()\r\n {\r\n parent::__construct(\r\n 'NK_contact', // Base ID\r\n esc_html__('(nK) Contact', 'khaki-widgets'), // Name\r\n array('description' => esc_html__('List with social links.', 'khaki-widgets'),) // Args\r\n );\r\n }", "title": "" }, { "docid": "ebdbe7644a201faa8d8e1b9b65363d4b", "score": "0.617165", "text": "function payment_fields()\n {\n echo $this->description;\n }", "title": "" }, { "docid": "cbd4f5b98354791aeee30473ed3bfb46", "score": "0.6144543", "text": "protected function __construct()\r\n {\r\n //TODO remove constructor's content\r\n $name = get_class($this);\r\n // echo 'creating ' . $name . ' @ ' . date('Y-m-d H:i:s');\r\n }", "title": "" }, { "docid": "655b989d471f9fb4c66f6bce09d1094e", "score": "0.61437565", "text": "public function description() { return ''; }", "title": "" }, { "docid": "c2a131781b081cdf45da4d821dea200b", "score": "0.6129757", "text": "public function __construct(){\n\t\t\tparent::__construct();\n\n\t\t\t$this->_name = __('Multilingual Meta Keys');\n\t\t}", "title": "" }, { "docid": "fb9bef7a691cc57f24821f5d23c479da", "score": "0.61237484", "text": "public function __construct()\n {\n parent::__construct();\n $this->setTemplate('antidot/system/config/form/field/acpfeeds.phtml');\n }", "title": "" }, { "docid": "38287ce20500d7974bbafc3a1014785a", "score": "0.6122816", "text": "public function __construct() {\n parent::__construct();\n\n $this->allowedTypes = array(\n CultureFeed_Activity::CONTENT_TYPE_EVENT,\n CultureFeed_Activity::CONTENT_TYPE_PRODUCTION,\n );\n\n $this->viewPrefix = t('has');\n $this->viewSuffix = t('wrote a review');\n $this->action = t('review');\n $this->label = t('Reviews');\n $this->titleDo = t('Write a review');\n $this->titleDoFirst = t('Be the first to write a review');\n $this->pointsOverviewPrefix = t('Wrote a review for');\n\n }", "title": "" }, { "docid": "9a5f7471953e16081516d7103e9ba68b", "score": "0.6118039", "text": "function __toString()\n {\n return $print= \"NOME: \" . $this->utente->getNome() . \" | COGNOME: \" . $this->utente->getCognome() . \" | DATA DI PRENOTAZIONE: \". date_format($this->getData(),\"d/m/Y H:i:s\");\n }", "title": "" }, { "docid": "1eef8e3e51fea6d105ba993db88554ed", "score": "0.61152214", "text": "public function __toString()\n {\n // TODO: Implement __toString() method.\n }", "title": "" }, { "docid": "1eef8e3e51fea6d105ba993db88554ed", "score": "0.61152214", "text": "public function __toString()\n {\n // TODO: Implement __toString() method.\n }", "title": "" }, { "docid": "1eef8e3e51fea6d105ba993db88554ed", "score": "0.61152214", "text": "public function __toString()\n {\n // TODO: Implement __toString() method.\n }", "title": "" }, { "docid": "dfb397b670a5a6ee3731e27d9da03f36", "score": "0.61127067", "text": "function __construct() {\r\r\n\t\t\tparent::__construct(\r\r\n\t\t\t\t'WPRDTS_Widget', // Base ID\r\r\n\t\t\t\t__('WPRDTS Widget', 'text_domain'), // Name\r\r\n\t\t\t\tarray( 'description' => __( 'WPRDTS Widget', 'text_domain' ), ) // Args\r\r\n\t\t\t);\r\r\n\t\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.61117625", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.61117625", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.61117625", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.61117625", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "d0626143d49b8310a768607403c286cb", "score": "0.61117625", "text": "public function __construct() {\n\t\t// TODO Auto-generated constructor\n\t}", "title": "" }, { "docid": "c1e353fdc80b599e3781bfaeeba6ad91", "score": "0.61105824", "text": "public function __construct()\n {\n parent::__construct();\n $this->fields = [\n \"topic\" => new IntegerField(),\n \"text\" => new StringField(),\n \"created\" => new IntegerField([\"default\" => time()]),\n ];\n }", "title": "" }, { "docid": "0243d50770ebde8b71b6ce3851ce9f28", "score": "0.61074597", "text": "function construct() {\n // as we use it in the option_definintion() call.\n $this->link_type = $this->definition['link_type'];\n\n parent::construct();\n $this->additional_fields['sid'] = 'sid';\n $this->additional_fields['nid'] = 'nid';\n }", "title": "" }, { "docid": "07cbdc031f2a74a07d711ff44ce81bf8", "score": "0.60998154", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->library('form_builder');\n\t\t$this->mTitle = 'CP ';\n\t}", "title": "" }, { "docid": "6a6aa62eae0341beb00a85528b6f5968", "score": "0.609203", "text": "public function __construct(){\n parent::__construct();\n $this->genero = \"\";\n $this->paisOrigen = \"\";\n }", "title": "" }, { "docid": "e5832ad740dbc7c7d06885de97bcf917", "score": "0.60894084", "text": "function __construct($n='', $v=null , $l=null, $s=11, $h='') {\n if ($n=='')\n $n = \"text\".date('his');\n\n if ($l=='')\n $l = ucfirst($n);\n\n $this->type = \"text\";\n $this->name = $n;\n if ($v==null) {\n global $$n;\n $this->value = $$n;\n } else {\n $this->value = $v;\n }\n $this->label = $l;\n $this->size = $s;\n $this->help = $h;\n $this->keyName = \"id\";\n $this->db = \" INT(\".$this->size.\") NOT NULL\";\n $this->hidden = '';\n //$this->configuration();\n }", "title": "" }, { "docid": "6c9889be276462ab190237bc10dd2665", "score": "0.60853845", "text": "function construct() {\n parent::construct();\n $this->additional_fields['uid'] = 'uid';\n }", "title": "" }, { "docid": "c3929c8f835eb5962bec45ab84721b5a", "score": "0.6079687", "text": "function __construct() {\n\t\tparent::__construct(\n\t\t\t__CLASS__, // Base ID\n\t\t\t__( 'Comic Easel - Comic Chapters', 'comiceasel' ), // Name\n\t\t\tarray( 'classname' => __CLASS__, 'description' => __( 'Display dropdown list of comic chapters.', 'comiceasel' ), )\n\t\t);\n\t}", "title": "" }, { "docid": "4ac0a5f073697c8d3ff1ba0055192f6c", "score": "0.6073566", "text": "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "title": "" }, { "docid": "4ac0a5f073697c8d3ff1ba0055192f6c", "score": "0.6073566", "text": "public function __construct() {\r\n\t\t// TODO Auto-generated constructor\r\n\t}", "title": "" }, { "docid": "4007a8bf5602e78638d55b9553ad78b6", "score": "0.6068529", "text": "function __construct( $fieldName )\n {\n parent::__construct( \"The field '{$fieldName}' is not defined.\" );\n }", "title": "" }, { "docid": "694f9670c1991512be0867619ed1f378", "score": "0.6068307", "text": "public function __construct() {\n $this->param['title'] = 'Pengguna Admin' ;\n \n }", "title": "" }, { "docid": "1de3c0cb150d4f374f77860f496c0bb7", "score": "0.6058094", "text": "public function __construct()\n {\n parent::__construct('This record is not yet loaded and thus cannot be deleted or updated.');\n }", "title": "" }, { "docid": "0cc723821ee61aeffcfbbfca4403be08", "score": "0.60481143", "text": "function __construct(){\n\t\t\t$this->setAsigId(0);\n\t\t\t$this->setSerialNro('');\n\t\t\t$this->setPlaza('');\n\t\t\t$this->setGestorId(0);\n\t\t\t$this->setFechaAsig('');\n\t\t\t$this->setFechaDev('');\n\t\t\t$this->setObs('');\n\t\t\t$this->setObsDev('');\n\t\t\t$this->setTipoDev('');\n\t\t\t\n\t\t}", "title": "" }, { "docid": "40252bed031bd894b3f43ce37d4b709e", "score": "0.6047758", "text": "public function __construct() {\n foreach(self::getDefaultData() as $key => $value) {\n $this->$key = $value;\n }\n $this->titleMultiLanguage = $this->wire('modules')->isInstalled(\"FieldtypePageTitleLanguage\") && $this->wire('fields')->get('title')->type instanceof FieldtypePageTitleLanguage;\n }", "title": "" }, { "docid": "84edb302d5a4bbf313b0cbb4409aadff", "score": "0.60436165", "text": "public function __construct() {\n parent::__construct(__CLASS__, 'Listas de valores', 'Personalización');\n }", "title": "" }, { "docid": "8ac2b89d77fc16ae37c7afd12302c23f", "score": "0.60422903", "text": "public function __construct() {\n parent::__construct(\n 'vtcore_wordpress_widgets_contact',\n 'Contact Information',\n array('description' => 'Displaying a configured contact information')\n );\n }", "title": "" }, { "docid": "7638e66a97e929d20b2e8fc86e5b15cb", "score": "0.6041686", "text": "public function __construct( ){\n\t\n\t}", "title": "" }, { "docid": "208fdacc15ed4dfbbc0780f780b76b42", "score": "0.6040991", "text": "function __construct() {\n parent::__construct(\n 'jsdoc', // Base ID\n __('jsdoc', 'flare_twentysixteen'), // Name\n array('description' => __('JSdoc API Widget', 'flare_twentysixteen'),) // Args\n );\n }", "title": "" }, { "docid": "0313315abcde71039f40915f6501ea26", "score": "0.60401064", "text": "public function __construct()\n {\n parent::__construct('ebanx_currency_converter',\n __('Ebanx Currency Converter', 'ebanx_currency_converter'), [\n 'description' => esc_html__('Ebanx Currency Converter Widget', 'ebanx_currency_converter'),\n ]\n );\n }", "title": "" }, { "docid": "43a4cafa811a556b2f15a7dcaaca7ce2", "score": "0.60320085", "text": "function __construct()\n {\n parent::__construct();\n\t$this->trace .= '>> construct article model<br/>';\n }", "title": "" }, { "docid": "4a75c1b6af4d72e4aa1c729816ee7636", "score": "0.60319215", "text": "public function __construct() {\n $this->add_field(new IntegerField('id', array('auto_increment' => true)));\n $this->add_field(new VarcharField('rut', array('lenght' => 10, 'null' => false)));\n $this->add_field(new VarcharField('nombre', array('lenght' => 50, 'null' => false)));\n }", "title": "" }, { "docid": "16a10fe0037fdc0f766268452e076b73", "score": "0.6027077", "text": "function __construct(){\n\t\t\t$this->setId(0);\n\t\t\t$this->setCP('');\t\t\t\t\t\t\n\t\t\t$this->setCPNombre('');\t\t\t\t\t\t\n\t\t\t$this->setPlaza('');\t\t\t\t\t\t\n\t\t\t$this->setEstado(true);\n\t\t}", "title": "" }, { "docid": "087d7bd77d8966018eb8fe567f8f8c73", "score": "0.6024755", "text": "function __construct()\n {\n\tparent::__construct();\n\t$this->data = array();\n $this->data['pagetitle'] = 'Van Dragons';\n }", "title": "" }, { "docid": "12308e62d0deef055ebd227a709e96aa", "score": "0.6020042", "text": "public function __construct()\n {\n parent::__construct(array(\n 'name' => __('Last Posts', 'fl-builder'),\n 'description' => __('Last Posts', 'fl-builder'),\n 'category'\t\t=> __('Erstellbar Modules', 'fl-builder'),\n 'dir' => ERSTELLBAR_MODULES_DIR . 'last-posts/',\n 'url' => ERSTELLBAR_MODULES_URL . 'last-posts/',\n 'editor_export' => true, // Defaults to true and can be omitted.\n 'enabled' => true, // Defaults to true and can be omitted.\n ));\n\n }", "title": "" }, { "docid": "6b191ebe0d5be079637e99a8875a0cd3", "score": "0.60170114", "text": "public function toString() {\n return sprintf(\n \"%s(#%d)@{\\n\".\n \" [title] %s\\n\".\n \" [url] %s\\n\".\n \" [language] %s\\n\".\n \" [mimetype] %s\\n\".\n \" [excerpt] %s\\n\".\n \" [details] %s\\n\".\n \" [meta] %s\\n\".\n \"}\",\n nameof($this),\n $this->index,\n $this->title,\n $this->url,\n $this->language ? $this->language : '(none)',\n $this->mimeType ? $this->mimeType : '(none)',\n $this->excerpt,\n \\xp::stringOf($this->details),\n \\xp::stringOf($this->meta)\n );\n }", "title": "" }, { "docid": "4067ca9d8d997368f2d916abca1bcf67", "score": "0.6015746", "text": "public function __construct() {\n parent::__construct('BacSocialMediaClotheirs', __('Social Platforms', 'translation_domain'), \n array('description' => __('Social Platform Links', 'translation_domain'),)\n );\n }", "title": "" }, { "docid": "c088a00e5ed4e21b28a6296b1d3bbbc7", "score": "0.6009897", "text": "public function __construct() {\n\t\tparent::__construct(\n\t\t\tfalse, // ID, auto generate when false\n\t\t\t_x( \"Carpress: Latest News\" , 'backend', 'carpress_wp'), // Name\n\t\t\tarray(\n\t\t\t\t'description' => _x( 'Use this widget only on the home page of the Carpress theme', 'backend', 'carpress_wp'),\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "27d38789b8498ed56723cd14f486685e", "score": "0.60094744", "text": "function __construct() {\n\t\t\tadd_filter( 'acf/format_value', array( $this, 'filter' ) );\n\t\t}", "title": "" }, { "docid": "25034c999039677487793860498eca28", "score": "0.6002123", "text": "function __construct() {\r\n\t\tparent::__construct(\r\n\t\t\t'desiratech_become_a_member_widget', // Base ID\r\n\t\t\t__( 'Desiratech: Become a Member', 'awaken' ), // Name\r\n\t\t\tarray( 'description' => __( 'Become a Member Widget', 'awaken' ), ) // Args\r\n\t\t);\r\n\t}", "title": "" }, { "docid": "f782c011a50a65b02eefb7966b659c8d", "score": "0.60010684", "text": "public function __construct() {\t}", "title": "" }, { "docid": "4e28ec52e9e4273bc3ca78fea2698421", "score": "0.5999867", "text": "function get_brief_display()\n\t{}", "title": "" }, { "docid": "22a632372c12f0eb0fbbefee17d304e5", "score": "0.5996748", "text": "public function __toString()\n {\n \treturn \"\";\n }", "title": "" }, { "docid": "318df2a1c710f33c7113923506b08fe1", "score": "0.5991799", "text": "function __toString() {\n\t}", "title": "" }, { "docid": "0a9d472224aa120864bb57f04a0500f6", "score": "0.59895647", "text": "function __construct() {\r\n \r\n\r\n parent::__construct(\r\n 'OVA_WON_FOOTER_LEFT', // Base ID\r\n esc_html__( 'Won Footer Left', 'ova-won' ) // Name\r\n );\r\n }", "title": "" }, { "docid": "b3891965e3f433b8f2c4ef7c8e0743cb", "score": "0.5984788", "text": "public function __construct() {\n $widget_options = array( \n\t\t'classname' => 'opensign', \n\t\t'description' => 'This Widget give the door status', \n\t);\n parent::__construct( 'opensign', 'Novalabs Opensign Widget', $widget_options );\n }", "title": "" }, { "docid": "925f66dc43ca21171f0185c3857c0d08", "score": "0.5983711", "text": "function __toString()\n {\n return $this->libelle.\"\" ;\n }", "title": "" }, { "docid": "65cb93c056914387cca221739b51d614", "score": "0.59780645", "text": "public function __construct()\n\t\t{\n\t\t\t//\n\t\t}", "title": "" }, { "docid": "c4833e8e2cb9e8eb340505c3267ee294", "score": "0.59743476", "text": "private function __construct() {\r\n\t\t/**\r\n\t\t * Filter Allows you to set the global author.\r\n\t\t *\r\n\t\t * @since 1.3\r\n\t\t *\r\n\t\t * @param string $order_template a set of ###replace### target.\r\n\t\t *\r\n\t\t */\r\n\t\t$this->configurable_options['TIMESTAMP_HTML_TEMPLATE'] = apply_filters( 'livepress_global_time_template', $this->configurable_options['TIMESTAMP_HTML_TEMPLATE'] );\r\n\t\t/**\r\n\t\t * Filter Allows you to change the order of the elements and add to teh meta info html.\r\n\t\t *\r\n\t\t * @since 1.3\r\n\t\t *\r\n\t\t * @param string $order_template a set of ###replace### target.\r\n\t\t *\r\n\t\t */\r\n\t\t$this->configurable_options['AUTHOR_TEMPLATE'] = apply_filters( 'livepress_global_author_template', $this->configurable_options['AUTHOR_TEMPLATE'] );\r\n\t}", "title": "" }, { "docid": "619e59c09fe0adc05ac8f8d298fbc1da", "score": "0.59739834", "text": "public function __construct() {\n\t\t//\n\t}", "title": "" }, { "docid": "619e59c09fe0adc05ac8f8d298fbc1da", "score": "0.59739834", "text": "public function __construct() {\n\t\t//\n\t}", "title": "" }, { "docid": "619e59c09fe0adc05ac8f8d298fbc1da", "score": "0.59739834", "text": "public function __construct() {\n\t\t//\n\t}", "title": "" }, { "docid": "da23eb887ade71e3494a57c6da051642", "score": "0.59702444", "text": "function __construct() {\n\t\tparent::__construct(\n\t\t\t'box-social', // Base ID\n\t\t\t__( 'Caseta cu Harta', 'adrc' ), // Name\n\t\t\tarray( 'description' => __( '', 'adrc' ), ) // Args\n\t\t);\n\t}", "title": "" }, { "docid": "e019472b5c31401752419916fdd6d196", "score": "0.59654903", "text": "public function __toString()\n {\n }", "title": "" }, { "docid": "e019472b5c31401752419916fdd6d196", "score": "0.59654903", "text": "public function __toString()\n {\n }", "title": "" }, { "docid": "e019472b5c31401752419916fdd6d196", "score": "0.59654903", "text": "public function __toString()\n {\n }", "title": "" }, { "docid": "0e3e5209136abc448101243ca500be69", "score": "0.59641033", "text": "protected function _construct() {\n parent::_construct();\n //$this->setTemplate('todopago_modulodepago/standard_info.phtml');\n }", "title": "" }, { "docid": "578f13c26ad1fcacdbf0185e651a2a1a", "score": "0.5962135", "text": "public function __construct()\n {\n parent::__construct(\n 'htmladd_widget', // Base ID\n 'M_Publicidad: HTML o Javascript', // Name\n array('description' => __('Bloque para publicidad HTML o Javascript', 'text_domain'),) // Args\n );\n\n }", "title": "" }, { "docid": "42748a02a173d6f520778ce19ac45137", "score": "0.59611094", "text": "public function __construct( ){\n\t\t\n\t\tparent::__construct();\n\t\t\n\t}", "title": "" }, { "docid": "cfe5b26fe176b90b5d34ce9c32c9959a", "score": "0.59571946", "text": "public function __construct(){\n $this->objFields = new Fields();\n }", "title": "" }, { "docid": "dd93dafeeea9e01426c1379ac28ec7a5", "score": "0.5956072", "text": "public function __toString() {\n return 'AU #'.$this->id;\n }", "title": "" }, { "docid": "0e96e2c77796be518b7afcbb1729b1c4", "score": "0.5956013", "text": "public function __toString() {\n return $this->display();\n }", "title": "" }, { "docid": "4229fdfc092e204a8da62072cb275cde", "score": "0.5955393", "text": "function __construct ($intType)\n\t\t{\n\t\t\tparent::__construct ('RecordDisplayType');\n\t\t\t\n\t\t\t$strName\t= $GLOBALS['RecordDisplayRateName'][$intType];\n\t\t\t$strSuffix\t= $GLOBALS['RecordDisplayRateSuffix'][$intType];\n\t\t\t\n\t\t\t$this->oblintType\t\t= $this->Push (new dataInteger\t('Id',\t\t$intType));\n\t\t\t$this->oblstrName\t\t= $this->Push (new dataString\t('Name',\t$strName));\n\t\t\t$this->oblstrSuffix\t\t= $this->Push (new dataString\t('Suffix',\t$strSuffix));\n\t\t}", "title": "" }, { "docid": "30d6d0cd808e633804a08ce9095359d3", "score": "0.5952884", "text": "public function __construct()\n {\n parent::__construct('StnData');\n $this->_params['meta'] = array('uid');\n return;\n }", "title": "" }, { "docid": "311bfdfaeb69210a7f31b45a8d063e9b", "score": "0.59527934", "text": "function __construct() {\n\t\t parent::__construct( array(\n\t\t'plural' => 'mayflower_staff', //plural label, also this well be one of the table css class\n\t\t) );\n\t }", "title": "" }, { "docid": "fb50ffcd648ca10e148b8cf8328fd3dd", "score": "0.5951674", "text": "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "title": "" }, { "docid": "fb50ffcd648ca10e148b8cf8328fd3dd", "score": "0.5951674", "text": "function payment_fields() {\n\t\t\tif ($this->description) echo wpautop(wptexturize($this->description));\n\t\t}", "title": "" }, { "docid": "f0fafb427bdcfaa25ad6bcd9150a59aa", "score": "0.5950382", "text": "public function __toString() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "c3a44a239ea7de3b2f497dd0ee406476", "score": "0.59488285", "text": "public function __construct()\n\t{\n\t\t$this->Id=0;\n\t\t$this->Name=\"\";\n\t\t$this->Type=\"\";\n\t\t$this->Size=0;\n\t\t$this->Content=\"\";\n\t}", "title": "" } ]
a1cdf4d05f740527c4c266045e63ed55
Operation allUsers Get All Users
[ { "docid": "bd8df0b339510d1376b98270954068b9", "score": "0.0", "text": "public function allUsers($fields = null, $page = null, $per_page = null, $limit = null, $offset = null, $sorts = null, $ids = null)\n {\n list($response) = $this->allUsersWithHttpInfo($fields, $page, $per_page, $limit, $offset, $sorts, $ids);\n return $response;\n }", "title": "" } ]
[ { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.87360406", "text": "public function getAllUsers();", "title": "" }, { "docid": "aeb32087ac5bc4329167b016686f2f7d", "score": "0.87360406", "text": "public function getAllUsers();", "title": "" }, { "docid": "3a347d1cd548dff38e060ea793d25475", "score": "0.84268826", "text": "public function getAllUsers() {\n\t\treturn $this->query ( \"SELECT * FROM user\");\n\t}", "title": "" }, { "docid": "99f8b526b83c53e71bd6bf1b4e9b9c3f", "score": "0.83045375", "text": "public static function getAllUsers()\n\t{\n\t\treturn User::all();\n\t}", "title": "" }, { "docid": "7229a02ede82fc5a223bfafc15280daa", "score": "0.82787216", "text": "public function getAllUsers(){\n return $this->securityDAO->getAllUsersDAO();\n }", "title": "" }, { "docid": "02b7a9361e686809354760b3814731a1", "score": "0.8251234", "text": "private function getAllUsers()\n {\n return User::all();\n }", "title": "" }, { "docid": "64e2e68b91926fc59cbab504b2866347", "score": "0.82157964", "text": "public function get_all_users() {\n\t\t\t$request = $this->base_uri . '/people?output=' . static::$output;\n\t\t\treturn $this->fetch( $request );\n\t\t}", "title": "" }, { "docid": "682b4e82e253a07c1e5bc9637e995051", "score": "0.82004327", "text": "public function getAllUsers()\n {\n $conn = Db::getConnection();\n\n $result = $conn->query(\"SELECT * FROM Users\");\n return $result->fetchAll();\n }", "title": "" }, { "docid": "08c61aa3415173a3314986594fa8a719", "score": "0.8178298", "text": "function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}", "title": "" }, { "docid": "08c61aa3415173a3314986594fa8a719", "score": "0.8178298", "text": "function findAllUsers() {\r\n\r\n\t\treturn ($this->query('SELECT * FROM users;'));\r\n\r\n\t}", "title": "" }, { "docid": "158f0bde8c2d8f213a2fb2b464ae6794", "score": "0.8122702", "text": "public function getAllUsers()\r\n\t{\r\n\t\t$query = \"SELECT * FROM users\";\r\n\t\t$stmt = $this->getConnection()->prepare($query);\r\n\t\t$stmt->execute();\r\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\r\n\t}", "title": "" }, { "docid": "93e87bd9d0b38cdbd7b4f73d4009a1a7", "score": "0.81018496", "text": "public function getAllUser()\n {\n return $this->dao->getAllUser();\n }", "title": "" }, { "docid": "5f21f021a5fb49ab4d9241e165cb96bf", "score": "0.80857044", "text": "public function getAllUsers(): array;", "title": "" }, { "docid": "0426f0f525361d1b077595fcd68b0b39", "score": "0.8083112", "text": "public function getAllUsers(){\n return $this->findAll();\n }", "title": "" }, { "docid": "4de00ba786dfe6d7b0aae9845161b94c", "score": "0.80760354", "text": "public function getAllUsers()\n {\n return BaseObject::toObjectArray($this->invokeApiGet('SHOW_ALL_USERS'), User::class, $this);\n }", "title": "" }, { "docid": "5c1877f8281759a4f79a7d081cabab57", "score": "0.80294245", "text": "public function getAll()\n {\n return User::all();\n }", "title": "" }, { "docid": "0af451d32a6ae529f87322a5aa82a80d", "score": "0.80261725", "text": "public function all()\n {\n $endpoint = 'users.json';\n $response = $this->request($endpoint);\n return $this->createCollection(User::class, $response['users']);\n }", "title": "" }, { "docid": "048a33a9533952f08cdb371e121e2e67", "score": "0.8021195", "text": "public function getAllUsers() {\n\n $query = Doctrine_Core::getTable('User')\n ->createQuery('c')\n ->where('c.isActive = ?', User::FLAG_ACTIVE);\n\n return $query->execute();\n }", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.8016206", "text": "public function getUsers();", "title": "" }, { "docid": "346574b6db988f7a4cf05130407ea312", "score": "0.8016206", "text": "public function getUsers();", "title": "" }, { "docid": "10a6fb9a4356c61bf7a5c572afd71c7d", "score": "0.8002529", "text": "public function AllUsers()\r\n {\r\n\t\t@$sql = \"SELECT * FROM usuarios\";\r\n\t\t$result=mysqli_query($this->conn, $sql);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "201a70ea9364d27cf759dd3c8f1f6f12", "score": "0.80001736", "text": "public function all()\n {\n return User::get();\n }", "title": "" }, { "docid": "24f6dc0ef7ddc62c2bd6f15bf6588c69", "score": "0.7995031", "text": "function getAll()\n {\n return $this->userRepository->getAll();\n }", "title": "" }, { "docid": "eb50c55aca444bdb08d4d0b1735c67a4", "score": "0.79718345", "text": "public function all()\n {\n return $this->userRepo->all();\n }", "title": "" }, { "docid": "c2538b2e7cfadce3272b765154d8cb32", "score": "0.79713964", "text": "public function getAllUsers()\n {\n $users = User::all();\n\n if(!empty($users)){\n $users = $users ;\n }else{$users = array();}\n return Helpers::Get_Response(200, 'success', '', '',$users);\n }", "title": "" }, { "docid": "a3a605ee34b1017e8140a9fd32f330bd", "score": "0.7965638", "text": "public function AllUsers() {\n $path = base_url();\n $url = $path . 'api/Admin_api/allUsers';\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_HTTPGET, true);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $response_json = curl_exec($ch);\n curl_close($ch);\n $response = json_decode($response_json, true);\n return $response;\n }", "title": "" }, { "docid": "3bad232137679f2f76831c0a4bab4e8a", "score": "0.79582095", "text": "public function getAll()\n {\n return $this->userModel->get();\n }", "title": "" }, { "docid": "b3a3830abda427c3003f11e7458e14f5", "score": "0.79563516", "text": "public function getAllUsers(){\n $query = $this->db->get('users');\n return $query->result();\n }", "title": "" }, { "docid": "4b3fc36e9d05f91c845468559eee2380", "score": "0.7905061", "text": "public function getAllUsers()\n {\n\n $em = $this->getEntityManager();\n\n $query = $em\n ->createQuery('SELECT u FROM AppBundle:User u');\n\n return array('code' => 200, 'response' => $query->getArrayResult());\n\n }", "title": "" }, { "docid": "fa05d3a74a86cd28c44e0b190315968f", "score": "0.79027194", "text": "public function getAllUser()\n {\n $r = $this->model->paginate(10);\n return $this->resultReturn($r);\n }", "title": "" }, { "docid": "00a6266794c76ed088577d44dce7f56d", "score": "0.78832173", "text": "public function showAllUsers()\n {\n $results = $this->getAllUsers();\n\n return $results;\n //echo \"Username: \" . $results[0]['username'] . \"<br>Fullname: \" . $results[0]['fullname'] . \"<br>Email: \" . $results[0]['email'];\n }", "title": "" }, { "docid": "f11d54439219c82b76a31b806629fd36", "score": "0.7869912", "text": "private function getAllUsers()\n {\n $em = $this->getDoctrine()->getManager();\n $resu = $this->getDoctrine()\n ->getRepository('AdminBundle:Usuario')\n ->findAll(); \n return $resu;\n }", "title": "" }, { "docid": "55bf4e8ec3db6f5e95b8c2e5baf44db1", "score": "0.78479415", "text": "public function getUsers()\n {\n return $this->api->makeAPICall('GET', $this->api::USERS_URL);\n }", "title": "" }, { "docid": "34ee9c7be39c30c45e92d66dda175dbf", "score": "0.78357077", "text": "public function getAll(){\n return $this->db->getAllUsers();\n }", "title": "" }, { "docid": "4e0b77072c30f34b805f400bf85672e8", "score": "0.78269017", "text": "public function getAllUsers(){\n\t\t$query = \"SELECT * FROM users\";\n\t\t$dbcontroller = new DBController();\n\t\t$this->user = $dbcontroller->executeSelectQuery($query);\n\t\treturn $this->user;\n\t}", "title": "" }, { "docid": "9cae48c84e40eb67a9dddb8e4928ffb9", "score": "0.7821092", "text": "public function getAllUser()\n {\n $query = \"SELECT *\n FROM users\";\n\n $stmt = self::$dbh->prepare($query);\n\n $stmt->execute();\n\n return $stmt->fetchall(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "3aa698f06d876f57761893be4509eea2", "score": "0.78177565", "text": "function getUsersAll() {\n\t\t\t$data = $this->fetch(\"SELECT * FROM `\" . $this->prefix . \"users` ORDER BY created DESC\");\n\t\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "3dc1b36c0631ef340f5e5b8468d44b5c", "score": "0.779389", "text": "private function getUsers()\n\t{\n\n\t\treturn $this->_userService->getUsers();\n\n\t}", "title": "" }, { "docid": "49def523c89b36f410239e36fb33bbd9", "score": "0.77923733", "text": "public function index()\n {\n $users = $this->userRepository->all();\n\n return $users;\n }", "title": "" }, { "docid": "3322b370d2ea9f5b54ff9854718b8397", "score": "0.7768352", "text": "public function getUsers() {\n\t\t\treturn User::all();\n\t}", "title": "" }, { "docid": "65fd3f080cd9fff3e881a69c0d9be052", "score": "0.7766238", "text": "public function get_all_users()\n\t\t{\n\t\t\t$this->db->order_by('role', 'ASC');\n\n\t\t\treturn $this->db->get('co_users')->result_array();\n\t\t}", "title": "" }, { "docid": "5866a8ba11edd9862b68881169f5dcfd", "score": "0.7764139", "text": "public function getAllUsers()\n {\n $id = $this->user->id();\n return $this->users->with('countries')->get();\n // return $this->users->find($id)->countries->get();\n }", "title": "" }, { "docid": "d33929394c22184b2d50b233f882cc1e", "score": "0.77564436", "text": "public function getUsers() {\n $users = $this->apiGet($this->endpoints[\"users\"]);\n return $users;\n }", "title": "" }, { "docid": "9d417f92f6256dd49687a807df0e2ca2", "score": "0.7709894", "text": "public static function getUsers()\n\t{\n\t\t// collect them all\n\t\treturn self::loadUsersByQuery(\n\t\t\t'SELECT * FROM `users` ORDER BY name_last, name_first, name_middle, USER_ID;'\n\t\t);\n\t}", "title": "" }, { "docid": "b8bc9de61c3aab923512a30fc6c05d47", "score": "0.7704854", "text": "public function index()\n {\n return $this->usersRepository->getAll();\n }", "title": "" }, { "docid": "8638475ed0e432df7df7da6c1399014c", "score": "0.7699525", "text": "public function getAllUser()\n {\n return $this->db->get('user')->result_array();\n }", "title": "" }, { "docid": "c9da2d550183f80115120601adc40beb", "score": "0.76951283", "text": "public function allUsers()\n {\n // Check if user has the admin role\n $userRoles = Auth::user()->roles->pluck('name');\n if (!$userRoles->contains('Super Administrator')) {\n return response([\n 'error' => 'You are not permitted to view this resource'\n ], Response::HTTP_UNAUTHORIZED);\n } else {\n // $users = User::with('roles')->get();\n $users = User::with('roles')->paginate(10);\n return response([\n 'data' => $users,\n ], Response::HTTP_OK);\n }\n }", "title": "" }, { "docid": "55653d20257684f8c8828505d24792b8", "score": "0.7693901", "text": "public function GetAllUsers(){\n \n $queryUser = $this->getAdapter()->select()\n ->from($this->_name);\n $user = $this->getAdapter()->fetchAll($queryUser);\n \n return ($user)?$user:array();\n }", "title": "" }, { "docid": "8f26c979f18929108cb0edde2ef04847", "score": "0.7691757", "text": "public function index()\n {\n return $this->userRepository->getAll();\n }", "title": "" }, { "docid": "35b33e416487cb60497830ea42f36dbd", "score": "0.76607746", "text": "public function get_All_User()\n\t{\n\t\t//return $this->getArrayResult($sql);\n\t\t$arrSelectCol = array('id','name','username','mailaddress','password','status','userType');\n\t\treturn $this->select(TABLE_USER,$arrSelectCol);\n\t\n\t}", "title": "" }, { "docid": "de385fb3d2911d16e57b0fca575dfdc6", "score": "0.76562136", "text": "public function getUsers()\n {\n return $this->makeRequest('GET', 'users');\n }", "title": "" }, { "docid": "9adb39653eea247e53fe56be076cb79e", "score": "0.76556116", "text": "public static function getAllUsers() {\n return DB::table('user')->get()->toJson();\n }", "title": "" }, { "docid": "f9bb436a500e61309b2afa37fde8a372", "score": "0.7637142", "text": "public static function get_all_user(){\n $user = User::all();\n if(count($user->toArray())){\n return $user->toArray();\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "72927fac48205f7e074860ba9e41303b", "score": "0.76353884", "text": "public function allUsers()\n {\n $sql = \"select * from person\";\n $conn = DB::getInstance()->getConnection();\n $stmt = $conn->prepare($sql);\n $stmt->execute();\n $this->allUsersList = $stmt->fetchAll();\n\n return $this->allUsersList;\n }", "title": "" }, { "docid": "5d98f1bebc3111c70c7420a865c3bc0c", "score": "0.7634605", "text": "public function get_users()\n\t{\n\t\treturn $this->get_table_rows(\"users\");\n\t}", "title": "" }, { "docid": "607ca2792f5eafb81fa07897f4c5b473", "score": "0.76341033", "text": "public function getAllUsers()\n {\n return $this->selectAll('SELECT * FROM `faculty`');\n }", "title": "" }, { "docid": "8716a88c23d0d68cd3ca024873206ec4", "score": "0.76339084", "text": "public function getUsersList() \n \t{\n\t\t$select = $this->db->select()->from('users', array('*'));\n\t\t\t\t\n\t\treturn $this->fetchAll($select, 'User');\n \t}", "title": "" }, { "docid": "1e2bb372f10d580bc3fefbef11be8c89", "score": "0.7609275", "text": "public static function getAllUsers() {\n $rows = array(array('id'=>'ID', 'name'=>'Username', 'mail'=>'E-mail', 'registered'=>'Registered at', 'lastloggedin'=>'Last logged in', 'admin'=>'Permission', 'remove'=>'Remove'));\n $sql = \"SELECT id, name, mail, registered, lastloggedin, admin FROM buza_peter_Users LIMIT 30;\";\n $db = database::getConnection();\n $result = $db->query($sql);\n return array_merge($rows, $result->fetchAll(PDO::FETCH_ASSOC));\n }", "title": "" }, { "docid": "83d4e7f49a8ff5f75ee8595256dbdd6b", "score": "0.7608277", "text": "public function index()\n\t{\n\t\treturn User::all();\n\t}", "title": "" }, { "docid": "52ca2f889dac675ebc3e513204a9c997", "score": "0.76025677", "text": "function getAllUsers()\n\t{\n\t\t$this->db->order_by('login', 'asc');\n\t\t$query = $this->db->get('user');\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "adc5f00964737ac41d41c40a934778a7", "score": "0.75951", "text": "public function getUsers() {\n $sql = 'select * from users';\n $users = $this->executerRequete($sql);\n return $users;\n }", "title": "" }, { "docid": "8cbea32a6e590c71af2a3d7147ab4e0f", "score": "0.75928974", "text": "public function list_users() {\n global $om;\n return $om->shed->list_keys($this->_localize('users'));\n }", "title": "" }, { "docid": "4fb5f1a8f0e0492f66578f9d6024d4dd", "score": "0.7589812", "text": "public function getUsers()\n {\n $arrayOUsers = $this->userModel->getAllUsers(); // request to model\n //return a json\n\t\t\t\techo count($arrayOUsers) > 1 ? $this->jsonbourne->forge(0, \"Users exist\", $arrayOUsers): $this->jsonbourne->forge(1, \"no user\", null);\n }", "title": "" }, { "docid": "64dbb2658da223c545ee6f5e877778e2", "score": "0.75887656", "text": "public function getAllUsers()\n {\n $user = factory('App\\User',1)->make()->first();\n $this->actingAs($user)->get('/admin/allUsers/');\n\n $this->assertResponseStatus(401);\n\n\n $admin = factory(App\\User::class, 'admin', 1)->make()->first();\n $this->actingAs($admin)->get('/admin/allUsers/');\n\n $this->assertResponseStatus(200);\n $this->seeJsonStructure(\n [[\n 'id',\n 'login',\n 'email',\n 'first_name',\n 'last_name',\n 'sex',\n 'birth',\n 'city',\n 'avatar',\n 'description',\n 'email_confirmed',\n 'blocked',\n 'role_id'\n ]\n ]\n );\n }", "title": "" }, { "docid": "cee8ab4d26b715f08c1d8ca1def3f333", "score": "0.75854635", "text": "public function viewAllUsers()\n {\n $sql = 'SELECT users.id, login, users_roles.role_id, users_roles.user_id FROM users JOIN users_roles ON users.id = users_roles.user_id;';\n return $this->_db->fetchAll($sql);\n }", "title": "" }, { "docid": "7fe475d6a2f676446438dc46e58decd4", "score": "0.7575418", "text": "public function getUsers(){\n\t\t$reqBearer = $this->bearer;\t\n\t\t$this->model->getUsers($reqBearer);\n\t\t\n\t}", "title": "" }, { "docid": "ed1ed98072c31e7f7f0df981237be790", "score": "0.7575184", "text": "public function allUsers(){ \n return response()->json(\n User::all()\n );\n }", "title": "" }, { "docid": "8f3b0a87925a143e1f350225f627336b", "score": "0.75666887", "text": "protected function getUsers() {\n\t\t$userList = new UserList;\n\t\treturn $userList->get(INF);\n\t}", "title": "" }, { "docid": "64e836c11893e8d423b2c84c3389f3a0", "score": "0.75665915", "text": "public function readAllUsers() {\n $users = User::all();\n require_once('views/users/readallusers.php');\n }", "title": "" }, { "docid": "6ff59680eff9e9e0709f55fc4ca26794", "score": "0.75660414", "text": "public function getAllUsers()\n {\n return $this->db->select('full_name,profile,gender,username,user_id,created_at')->from('users')->get()->result_array();\n }", "title": "" }, { "docid": "3761a246be6731741d55dd2d2805b1e3", "score": "0.75633717", "text": "public function getAllUsers()\n\t{\n\t\t// Check for request forgeries.\n\t\tSession::checkToken() or jexit(Text::_('JINVALID_TOKEN'));\n\n\t\t$userOptions = array();\n\n\t\t// Initialize array to store dropdown options\n\t\t$userOptions[] = HTMLHelper::_('select.option', \"\", Text::_('COM_TJFIELDS_OWNERSHIP_USER'));\n\n\t\tBaseDatabaseModel::addIncludePath(JPATH_ADMINISTRATOR . '/components/com_users/models');\n\t\t$userModel = BaseDatabaseModel::getInstance('Users', 'UsersModel', array('ignore_request' => true));\n\t\t$userModel->setState('filter.state', 0);\n\n\t\t$allUsers = $userModel->getItems();\n\n\t\tif (!empty($allUsers))\n\t\t{\n\t\t\tforeach ($allUsers as $user)\n\t\t\t{\n\t\t\t\t$userOptions[] = HTMLHelper::_('select.option', $user->id, trim($user->username));\n\t\t\t}\n\t\t}\n\n\t\techo new JsonResponse($userOptions);\n\t\tjexit();\n\t}", "title": "" }, { "docid": "05b44892d3c51de4d1d46426d6ee28cd", "score": "0.7562956", "text": "public function index()\n {\n return $this->user::all();\n }", "title": "" }, { "docid": "0976bfb67d518b458c80f4f92cd3f8db", "score": "0.75545526", "text": "public function getAllUsers(){\n\n return $this->db->select('*')\n ->from($this->users)\n ->get()\n ->result();\n\n }", "title": "" }, { "docid": "3463e249741939b07ba2eea041b7b678", "score": "0.75517446", "text": "public static function all( ){\r\n $users = UserManagerDB::all();\r\n return $users;\r\n }", "title": "" }, { "docid": "a066c39af4e13a34560965a0de1d5dbd", "score": "0.7550014", "text": "public function getListOfUsers_get() {\n\n $lists = $this->user_model->getListOfUsers();\n if (!is_null($lists)) {\n $this->response($lists, 200);\n } else {\n $this->response(array('error' => 'NO HAY RESULTADOS'), 404);\n }\n }", "title": "" }, { "docid": "f54185eecfe969dc117d8399299b4719", "score": "0.754066", "text": "public function userList()\n {\n return $this->getService()->resourceList('User', $this->getUrl('users'), $this);\n }", "title": "" }, { "docid": "4bef1802abb5dcd6ae301c5f3248f82c", "score": "0.7526562", "text": "public function index()\n {\n return response(UserResource::collection(User::all()));\n }", "title": "" }, { "docid": "a2d2723a9c3897d9607e7df8a5f30547", "score": "0.7523722", "text": "public static function getAllUsers()\n {\n $table = Doctrine_Core::getTable(self::DB_CLASS_NAME);\n $users = $table->getAllUsers();\n\n return new Koryukan_Helper_Collection($users, 'Koryukan_Model_User');\n }", "title": "" }, { "docid": "f9f72ab393488d29c796a3c4628e0bfa", "score": "0.7516369", "text": "public function getUsers()\n {\n $this->getDatabase();\n return $this->getAllUsers();\n }", "title": "" }, { "docid": "15907cb6cdfcd0bf0d08fe5faa82bec8", "score": "0.75155395", "text": "public function getAllUsers() {\n\n\t\t$conn = $this->connect();\n\t\t$users = array();\n\n\t\ttry {\n\t\t\t\n\t\t\t$stmt = $conn->prepare(\"SELECT id, username, email, user_role, image FROM users\");\n\t\t\t\n\t\t\t$stmt->execute();\n\n\t\t\t$i = 0;\n\n\n\t\t\twhile($row = $stmt->fetch()) {\n\n\t\t\t\t$users[$i]['id'] = $row['id'];\n\t\t\t\t$users[$i]['username'] = $row['username'];\n\t\t\t\t$users[$i]['email'] = $row['email'];\n\t\t\t\t$users[$i]['user_role'] = $row['user_role'];\n\t\t\t\t$users[$i]['image'] = $row['image'];\n\n\t\t\t\t\n\t\t\t\t$i++;\t\t\n\t\t\t}\n\n\t\t\treturn $users;\n\n\t\t} catch (Exception $e) {\n\n\t\t\techo \"Error: \" . $e->getMessage();\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "aab47ada878484ff2a279bd4e8d3ac74", "score": "0.7501877", "text": "function fetchAllUsers() {\n\t$db = DB::getInstance();\n\t$query = $db->query(\"SELECT * FROM users\");\n\t$results = $query->results();\n\treturn ($results);\n}", "title": "" }, { "docid": "39c5a0f04fabbd7a162d69e798f9384e", "score": "0.7500713", "text": "public function getUsers()\r\n {\r\n\r\n $query = \"SELECT * FROM usersuser\";\r\n $result = $this->db->query($query);\r\n $users = $result->result();\r\n return $users;\r\n }", "title": "" }, { "docid": "0c1ae601df896091ea311f7116ac3f95", "score": "0.74955845", "text": "public function getUsers() : array;", "title": "" }, { "docid": "7b740f58f3460af3ba76a513d773cca5", "score": "0.74955255", "text": "public function all()\n {\n $path = '/users';\n $response = $this->requestor->get($path);\n\n return (new Responder($response))->buildResponse();\n }", "title": "" }, { "docid": "0e65fbccad196a3fb5f6ccc9564171a7", "score": "0.7479906", "text": "public function getAllUsers() {\n \t$this->db->query('SELECT * FROM user JOIN role ON role_id_FK = role_id');\n\n \t$results = $this->db->resultSet();\n\n \treturn $results;\n\t}", "title": "" }, { "docid": "e3d36315179262817c805aabde02ad96", "score": "0.74744976", "text": "public function index()\n {\n return User::all();\n }", "title": "" }, { "docid": "94557d41aee3866dc4df28e73323b560", "score": "0.74732375", "text": "public function getUsers()\n {\n\n $users = $this->userRepo->getUsers();\n $this->userView->displayUser($users);\n }", "title": "" }, { "docid": "ec58c858b618d633893f4b86062b748e", "score": "0.7472815", "text": "public function allUsers()\n {\n return $this->users->merge([$this->owner]);\n }", "title": "" }, { "docid": "ec58c858b618d633893f4b86062b748e", "score": "0.7472815", "text": "public function allUsers()\n {\n return $this->users->merge([$this->owner]);\n }", "title": "" }, { "docid": "8b90534e3aefd9b87b2ec39e3ae16de9", "score": "0.7471984", "text": "public function showAllUsers()\n {\n $allusers = $this->usersService->showAllUsers();\n return view('users.userlist', compact('allusers'));\n }", "title": "" }, { "docid": "05a2071ebee56eb40a92f46710f06f01", "score": "0.7469306", "text": "public function getAllUsers()\n {\n //Establishing connection to the database.\n $link = new Database();\n $database = $link->getConnection();\n \n //Creating SQL query and establishing result set.\n $sql = \"SELECT * FROM users\";\n $result = mysqli_query($database, $sql);\n \n //Creating array for storage.\n $index = 0;\n $users = array();\n \n //Iterating through results and adding users into the array.\n while($row = $result->fetch_assoc())\n {\n $users[$index] = array($row['id'], $row['name'], $row['email'], $row['age'],\n $row['username'], $row['created_at'], $row['updated_at'], $row['role'],\n $row['banned'], $row['suspended']);\n ++$index;\n }\n \n //Freeing results and closing connection.\n $result->free();\n mysqli_close($database);\n \n //Returning array.\n return $users;\n }", "title": "" }, { "docid": "f96257c9a5fd1a122a2264697a9d2861", "score": "0.74630105", "text": "public function findAllUsers()\n {\n $query = \"SELECT U.id, G.name as `group`, U.username, U.email, U.activated, U.date_created AS registred, U.date_modified AS modified\n FROM users AS U\n INNER JOIN user_groups AS G ON G.id = U.group_id\n ORDER BY U.id ASC\";\n\n $result = $this->conn->query($query);\n\n\n if(mysqli_num_rows($result) > 0) {\n $users = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\n return $users;\n }\n }", "title": "" }, { "docid": "bbfbc8c4c1cb9caf4e33287bda49c990", "score": "0.7453677", "text": "public function index()\n {\n $users = User::all();\n \n }", "title": "" }, { "docid": "ce4c01f0a4aeb395df721ebf3380e8b0", "score": "0.74467224", "text": "public function retrieveUsers() {\n return DB::table('users')->get();\n }", "title": "" }, { "docid": "a4d49274bde7ad83f698b973a58b039f", "score": "0.7445402", "text": "public function showAll(){\n return User::all();\n }", "title": "" }, { "docid": "15c10840a7f186d57f0fec8b7d20c801", "score": "0.7433792", "text": "public function index()\n {\n return Users::all();\n }", "title": "" }, { "docid": "40d8876c76dee2081c37f1ff085cf3d4", "score": "0.7431134", "text": "public function index()\n\t{\n\t\treturn UserListCollection::collection(User::all());\n\t}", "title": "" }, { "docid": "812e16d8643939fb22a9a4d1db03b43c", "score": "0.7424013", "text": "public function getUsers()\n {\n $this->loadModel('UsersApp');\n\n // $this->viewBuilder()->layout(null);\n \n $results = $this->UsersApp\n ->find('all')\n ->select(['id','username','name','linkedin','email','job_title','company','user_type','picture_url']);\n $this->set('results',$results);\n\n }", "title": "" }, { "docid": "10dd674fb763889ff09fea5350c7fc57", "score": "0.7423808", "text": "public function listUsers()\n {\n return $this->BunqClient->requestAPI(\n \"GET\",\n $this->getResourceEndpoint()\n );\n }", "title": "" }, { "docid": "ab74c79183dff016a11d732a9e7f7807", "score": "0.7422678", "text": "public function index()\n {\n return User::all();\n }", "title": "" }, { "docid": "ab74c79183dff016a11d732a9e7f7807", "score": "0.7422678", "text": "public function index()\n {\n return User::all();\n }", "title": "" } ]
0b573d907076e5a191eb669b18074f7b
Get a single parameter from the given request
[ { "docid": "44f94fe62727c1bb49e2975c9a4f9b65", "score": "0.0", "text": "protected abstract function get($name, $target, $request);", "title": "" } ]
[ { "docid": "56fa2d852406f8da38fab0df5f5a0e07", "score": "0.7432005", "text": "public function getParameter($request, $name, $default = null);", "title": "" }, { "docid": "6154ad08e28b5aa688fb4640d96a6a2f", "score": "0.71907383", "text": "function qp_get($query_parameter) {\n global $request;\n\n if(qp_set($query_parameter)) {\n return $request->query_parameters[$query_parameter];\n } else return null;\n}", "title": "" }, { "docid": "bc76344e87241b8d5b20cdf01d75fe28", "score": "0.7151705", "text": "public function getParameter($parameter);", "title": "" }, { "docid": "bc76344e87241b8d5b20cdf01d75fe28", "score": "0.7151705", "text": "public function getParameter($parameter);", "title": "" }, { "docid": "bb947763093a8281210529a80a0e9513", "score": "0.7114345", "text": "public function getParameter($name);", "title": "" }, { "docid": "38fcd223a4379e3932f64a7b26613496", "score": "0.7031395", "text": "public function getParameter($param) {\r\n\t\tif(is_string($param)){\r\n\t\t\t//verifica se o indice solicitado esta armazenado no objeto Request\r\n\t\t\tif(array_key_exists($param,$this->collection)){\n\t\t\t\treturn $this->collection[$param];\r\n\t\t\t}else{\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\tthrow new Exception(\"Parametro inv�lido no m�todo getParameter() de Request().\\n\");\r\n\t\t}\n\t}", "title": "" }, { "docid": "60c9e1ce7c00b7b629f248a69bbed404", "score": "0.6994468", "text": "public function getParameter( $name );", "title": "" }, { "docid": "b135bf2ed1dc3bdc9b9846b535635370", "score": "0.6953766", "text": "public function getParam($name);", "title": "" }, { "docid": "b135bf2ed1dc3bdc9b9846b535635370", "score": "0.6953766", "text": "public function getParam($name);", "title": "" }, { "docid": "b135bf2ed1dc3bdc9b9846b535635370", "score": "0.6953766", "text": "public function getParam($name);", "title": "" }, { "docid": "647ae0b01cc6db3b3d8f27effb4af668", "score": "0.6937951", "text": "function get_parameter($param) {\n if (empty($param)) {\n return null;\n } else {\n return $param;\n }\n }", "title": "" }, { "docid": "7aa5fa38e8baf4eec497f58c07d0eb44", "score": "0.69172657", "text": "public function getParameter();", "title": "" }, { "docid": "7aa5fa38e8baf4eec497f58c07d0eb44", "score": "0.69172657", "text": "public function getParameter();", "title": "" }, { "docid": "a2bb4d165ae3b38a3e5a6c53d8d083cc", "score": "0.6808391", "text": "public function getParam($key);", "title": "" }, { "docid": "fb9835de1de2397fef6dff5f6497b4e5", "score": "0.6796697", "text": "public function getParameter($name)\n\t\t{\n\t\t\treturn $this->services->getParameter($name);\t\t\t\n\t\t}", "title": "" }, { "docid": "c2c12a307517a47e3377b01c622c41d8", "score": "0.67911303", "text": "public static function getRequestParam($param) {\n\t\treturn self::getEngine()->getParam( $param );\n\t}", "title": "" }, { "docid": "d427b38e3c1a803157e0c36b40bf526b", "score": "0.67725366", "text": "private static function getParam(Request $request = null, array $parameters = [], $key = null)\n {\n // Parameter is specified\n if (array_key_exists($key, $parameters)) {\n return $parameters[$key];\n }\n\n // Param is not specified but the $request has the $key\n elseif ($request && $request->has($key)) {\n return $request->input($key);\n }\n\n // Not parameter passed\n else {\n return null;\n }\n }", "title": "" }, { "docid": "712353d85df0172007a2574e415bb714", "score": "0.67633134", "text": "public function get_value($parameter)\n\t{\n\t\tif (!$parameter)\n\t\t\treturn null;\n\n\t\treturn $this->request->input->{$parameter};\n\t\t\n\t}", "title": "" }, { "docid": "3df93675ec4b9886762437b82853aaeb", "score": "0.67541516", "text": "abstract public function getRequestParameter(string $name, $default = null);", "title": "" }, { "docid": "1c13f5c7d49e40621020ddb2f87a502b", "score": "0.67419946", "text": "public function getParameter()\n\t{\n\t\treturn $this->parameter;\n\t}", "title": "" }, { "docid": "89cb59edc182720b1a3860bed6930f7d", "score": "0.67257696", "text": "public function getParam($param) {\n if (isset($this->params[$param])) {\n return $this->params[$param];\n }\n return null;\n }", "title": "" }, { "docid": "29120334edf84361b1dcda2bc042cd21", "score": "0.6724391", "text": "public function getParameter()\n {\n return $this->parameter;\n }", "title": "" }, { "docid": "af76b9ca98771eff499645a31c8f954f", "score": "0.66961884", "text": "function getParam(array $request, string $name, array $filters = []) {\n return $request['data']->get($name, $filters);\n}", "title": "" }, { "docid": "8c3f450b51e520c16c6a0ae9be6ed518", "score": "0.6694638", "text": "public function getParam($key){\n if(isset($this->params[$key])){\n return $this->params[$key];\n }\n return null;\n }", "title": "" }, { "docid": "feceb97b6822cb658da153eae370b631", "score": "0.6683445", "text": "public function getParameter(string $name)\n {\n return isset($this[$name]) ? $this[$name] : null;\n }", "title": "" }, { "docid": "f54d030a171f03d60c3cc0beedbfb402", "score": "0.6670223", "text": "function getParameter($name) {\r\n\r\n\t\tif($this->parsed == False) {\r\n\t\t\t$this->parseParameters();\r\n\t\t}\r\n\r\n\t\t$values = NULL; //array()\r\n\t\tif(array_key_exists($name, $this->parameters)) {\r\n\t\t\t$values = $this->parameters[$name];\r\n\t\t}\r\n\r\n\t\tif($values != NULL) {\r\n\t\t\tif(is_array($values)) {\r\n\t\t\t\treturn $values[0];\t// return only the first one !!!\r\n\t\t\t}else {\r\n\t\t\t\treturn $values;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\treturn NULL;\r\n\t\t}\t\r\n\r\n\t}", "title": "" }, { "docid": "298b76cf56b826b9b07e9dce09861cae", "score": "0.6663919", "text": "function get_get_param($name, $default = '') {\n\treturn get_key_value($_GET, $name, $default);\n}", "title": "" }, { "docid": "2eafb9b4873c90c5fb79df703ae18486", "score": "0.6660576", "text": "function fd_get($form_parameter) {\n global $request;\n\n if(fd_set($form_parameter)) {\n return $request->form_parameters[$form_parameter];\n } else return null;\n}", "title": "" }, { "docid": "30c045c8d8f0c0d8c0df02db6b4ad3d6", "score": "0.6654271", "text": "public function get_param($name) {\n return $this->CI->input->{$this->method}($name);\n }", "title": "" }, { "docid": "21a085de2544a91a51372d84d04ac3bd", "score": "0.66243523", "text": "public function getRouteParam($name = null);", "title": "" }, { "docid": "163050cb3beac7e226be296068bf205d", "score": "0.65954334", "text": "public function getParameter($name) {\n\t\tif ($this->isParameter ( $name )) {\n\t\t\treturn $this->parameters [$name];\n\t\t} else {\n\t\t\tthrow new Exception ( \"Parameter '$name' is not in the request\" );\n\t\t}\n\t}", "title": "" }, { "docid": "6850cb492f50a737638250a5c56d6fa3", "score": "0.65902", "text": "public function getParameter($key) {\n return $this->params[$key];\n }", "title": "" }, { "docid": "cad5c261a7c32b2c2e73b55dd2a3ed5a", "score": "0.6584215", "text": "function getParameter($key, $defaultValue=null){\n return $this->requestHandler->getParameter($key, $defaultValue);\n }", "title": "" }, { "docid": "534dd1490df94cf4ad11726702e81033", "score": "0.65824145", "text": "public static function RequestParam($key, $default_value = NULL) {\n if (isset($_POST[$key])){\n return $_POST[$key];\n } else if (isset($_GET[$key])) {\n return $_GET[$key];\n } else if (isset($_COOKIE[$key])) {\n return $_COOKIE[$key];\n } else {\n return $default_value;\n }\n }", "title": "" }, { "docid": "9ec13a6505d804ba06d825ebbbb10e91", "score": "0.6562449", "text": "public function getParam($param)\n {\n if (isset($this->params[$param])) {\n return $this->params[$param];\n }\n }", "title": "" }, { "docid": "25da728e7ad52951eeb2bc1616a80976", "score": "0.655807", "text": "public static function get(string $name) {\n return self::$params[$name];\n }", "title": "" }, { "docid": "104fbb656586ec0d8810a5c0f6fb4b71", "score": "0.65525633", "text": "function get_request($param) {\n if (isset($_REQUEST[$param])) {\n //exit early\n return $_REQUEST[$param];\n }\n //if not found\n return false;\n}", "title": "" }, { "docid": "93dbd23af01d4c4b6299c7e8d1059848", "score": "0.65523905", "text": "public static function routeParam(): string;", "title": "" }, { "docid": "970fbd2ea945a13317012f903628d121", "score": "0.6543966", "text": "public function getParam($name)\n {\n return $this->getResponseParam($name);\n }", "title": "" }, { "docid": "2e201f49e67314818000fbfbd5bb9704", "score": "0.6533561", "text": "public function getParam($key)\n {\n return $this->params[$key];\n }", "title": "" }, { "docid": "5a61a3724bcdbc5c7c95dea12ecc4d01", "score": "0.6528728", "text": "public function getParameter($name)\n {\n return isset($this->parameters[$name]) ? $this->parameters[$name] : null;\n }", "title": "" }, { "docid": "7ad2ce33281247e68ec16b6e91f3b099", "score": "0.65277445", "text": "public function getParam($key) {\n return (isset ($this->params[$key])) ? $this->params[$key] : null;\n }", "title": "" }, { "docid": "a995b19f792a78acbacc313e4d6dc072", "score": "0.6527467", "text": "public function getParam($key)\n {\n return (isset($this->_params[$key]) ? $this->_params[$key] : null);\n }", "title": "" }, { "docid": "280a3a4f104b73fd817b5496a0591f08", "score": "0.6522492", "text": "public function param(string $name)\n {\n if (isset($this->parameters[$name])) {\n return $this->parameters[$name];\n }\n if (isset($this->get[$name])) {\n return $this->get[$name];\n }\n if (isset($this->post[$name])) {\n return $this->post[$name];\n }\n if ($this->contentType() == Http::CONTENT_JSON) {\n $data = $this->content();\n if (empty($this->post) && is_array($data)) {\n // Cache the json body in the post array\n $this->post = $data;\n }\n if (is_array($data) && isset($data[$name])) {\n return $data[$name];\n }\n }\n return null;\n }", "title": "" }, { "docid": "a8af26a83f21f3dabd8e1baee5c7818f", "score": "0.6520173", "text": "private static function getRequestParam($name, $optType = null) {\n $param = null;\n if (array_key_exists($name, $_GET)) {\n $param = $_GET[$name];\n } else if (array_key_exists($name, $_POST)) {\n $param = $_POST[$name];\n }\n if (empty($param)) {\n $param = null;\n }\n if (isset($param) && isset($optType)) {\n switch (strtolower($optType)) {\n case 'boolean':\n case 'bool':\n if (($param) === \"false\") {\n $param = \"0\";\n }\n }\n if (!settype($param, $optType)) {\n throw new MakeRequestParameterException(\"Parameter '$name' should be convertable to $optType.\");\n }\n }\n return $param;\n }", "title": "" }, { "docid": "e7e2ee2b6b99404e8d7372f76d161fca", "score": "0.6519355", "text": "public function getParameter($key);", "title": "" }, { "docid": "b4d55247a3356af0232d2ec1420279cd", "score": "0.6513836", "text": "public static function getParam($name)\n {\n $routing = self::getRouting();\n return !empty($routing) && isset($routing['params'][$name]) ? $routing['params'][$name] : null;\n }", "title": "" }, { "docid": "48dab49d548db2e17b7484ce894184e6", "score": "0.64922976", "text": "public function getParameter($key = null);", "title": "" }, { "docid": "dc2bf17bf80e2fca54f4410eaf391e16", "score": "0.6487576", "text": "function get_request_var_request($name, $default = \"\")\r\n{\r\n\tif (isset($_REQUEST[$name]))\r\n\t{\r\n\t\treturn $_REQUEST[$name];\r\n\t} else\r\n\t{\r\n\t\treturn $default;\r\n\t}\r\n}", "title": "" }, { "docid": "77207db99e857445d40503d68f5f29ff", "score": "0.6481769", "text": "public function getParam($key)\n {\n return $this->get($key);\n }", "title": "" }, { "docid": "ae40ab2e89f9440a9c639412989a606b", "score": "0.64790857", "text": "public function param($param) {\n\t\tif(empty($this->request->params[$param])) {\n\t\t\tif(empty($this->request->params['named'][$param])) {\n\t\t\t\tif(empty($this->passedArgs[$param]))\n\t\t\t\t\treturn false;\n\t\t\t\treturn $this->passedArgs[$param];\n\t\t\t}\n\t\t\treturn $this->request->params['named'][$param];\n\t\t}\n\t\treturn $this->request->params[$param];\n\t}", "title": "" }, { "docid": "7fd3e6ec0b8119b38d8bba1cdfd4c3b5", "score": "0.6476851", "text": "public function getParameter($name)\n {\n return $this\n ->parameters\n ->get($name);\n }", "title": "" }, { "docid": "024ba4bcda34e6d4a74d4ff862e5e36d", "score": "0.64738816", "text": "protected function getParam()\n\t{\n\t\t$param = strstr($this->line, \" \");\n\t\t$param = ($param) ? substr($param, 1) : $param;\n\n\t\treturn $param;\n\t}", "title": "" }, { "docid": "e3c9d2bffddf23c6508b41f27b64bfea", "score": "0.64614224", "text": "public function getParameter($name)\n\t{\n\t\tif (!isset($this->parameters[$name])) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn $this->parameters[$name];\n\t}", "title": "" }, { "docid": "89a9cd714a128d4277a54f1cda56f3a7", "score": "0.6458033", "text": "public static function param($item){\n if(isset($_POST[$item])){\n return $_POST[$item];\n } else {\n return $_GET[$item];\n }\n }", "title": "" }, { "docid": "30ba475fd6627164eeeb7c007b76a1dd", "score": "0.64505506", "text": "public function getParam($key)\n {\n return isset($this->params[$key]) ? $this->params[$key] : null;\n }", "title": "" }, { "docid": "d490d1288cf90fbe4174a96bd6a37b23", "score": "0.6447122", "text": "function get_param($param_name)\r\n{\r\n global $HTTP_POST_VARS;\r\n global $HTTP_GET_VARS;\r\n\r\n $param_value = \"\";\r\n if(isset($HTTP_POST_VARS[$param_name]))\r\n $param_value = $HTTP_POST_VARS[$param_name];\r\n else if(isset($HTTP_GET_VARS[$param_name]))\r\n $param_value = $HTTP_GET_VARS[$param_name];\r\n return $param_value;\r\n}", "title": "" }, { "docid": "d5aebe85e4608054d0bf5f6fe41418b9", "score": "0.643934", "text": "function getJsonParam($key = null, $default = null)\n{\n $result = $default;\n try{\n $app = \\Slim\\Slim::getInstance();\n $params = json_decode($app->request()->getBody(), true);\n\n if(!is_null($key))\n {\n if(isset($params[$key]))\n {\n $result = $params[$key];\n }\n else\n {\n $result = $default;\n }\n }\n else\n {\n $result = $params;\n }\n }\n catch(Exception $e)\n {\n $result = $e->getMessage();\n }\n\n return $result;\n}", "title": "" }, { "docid": "625e77b794bcd1d245271bcd2c108785", "score": "0.6436142", "text": "public function getParam($param)\n {\n return $this->data[$param];\n }", "title": "" }, { "docid": "e6d28957ee4cf13ff52c321cea21136b", "score": "0.64218354", "text": "public function param( $key, $validator = null )\n {\n\n if( isset( $_GET[$key] ) )\n {\n $data = $_GET[$key];\n\n return $data;\n }\n else\n {\n return null;\n }\n\n }", "title": "" }, { "docid": "bbc72221696a7c4d0c01c1ede5cd3254", "score": "0.6418462", "text": "public function getParam($paramName,$default){\n return $this->getRequest()->get($paramName,$default);\n }", "title": "" }, { "docid": "db77db79217a615d1670bb0d7d088726", "score": "0.6415704", "text": "public function getParameter($name)\n {\n return $this->parameterBag->get($name);\n }", "title": "" }, { "docid": "9c81e08324fcb90da0d99c1c086e5cb7", "score": "0.64034635", "text": "function get_param($param, $default=''){\n return (isset($_POST[$param]) ? $_POST[$param] : (isset($_GET[$param])?$_GET[$param]:$default));\n }", "title": "" }, { "docid": "2cef6feec71012171f97d35ef4b52fb0", "score": "0.639812", "text": "function get_param($var_name, $default = '', $mode = '')\n{\n if (is_integer($var_name)) {\n if (!isset($_SERVER['QUERY_STRING'])) {\n return $default;\n }\n $p = $_SERVER['QUERY_STRING'];\n $g = explode(',', $p);\n array_unshift($g, $p);\n\n if (empty($g[$var_name])) {\n return $default;\n }\n $v = $g[$var_name];\n } else {\n if (!isset($_GET[$var_name])) {\n return $default;\n }\n $v = $_GET[$var_name];\n }\n\n $v = filter_param($v, $mode);\n return trim($v);\n}", "title": "" }, { "docid": "6c91294d046d7ceeb107917ee11307a4", "score": "0.6397016", "text": "protected function getParameter($name)\n {\n return $this->container->getParameter($name);\n }", "title": "" }, { "docid": "6c91294d046d7ceeb107917ee11307a4", "score": "0.6397016", "text": "protected function getParameter($name)\n {\n return $this->container->getParameter($name);\n }", "title": "" }, { "docid": "6f4983e60a5c0285f11206fb68457a06", "score": "0.6395211", "text": "public static function getParam($name, $default = null, $type='')\n {\n $type = strtolower($type);\n if ($type == 'get') {\n $result = isset($_GET[$name])?$_GET[$name]:$default;\n }\n elseif ($type == 'post') {\n $result = isset($_POST[$name])?$_POST[$name]:$default;\n }\n else {\n $result = isset($_REQUEST[$name])?$_REQUEST[$name]:$default;\n }\n return $result;\n }", "title": "" }, { "docid": "0915cb9c75dd3f749552f07e26af4786", "score": "0.63943756", "text": "public function getParameterByName($name) {\n\t\tforeach ($this->parameters as $parameter) {\n\t\t\tif ($parameter->getName() == $name) {\n\t\t\t\treturn $parameter;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "5b86e19bc83daa75ad3ac2a6efbbccf4", "score": "0.63888776", "text": "public function getParam() {\n return $this->param;\n }", "title": "" }, { "docid": "5b86e19bc83daa75ad3ac2a6efbbccf4", "score": "0.63888776", "text": "public function getParam() {\n return $this->param;\n }", "title": "" }, { "docid": "b4949556069b6625fa65358436371375", "score": "0.63777864", "text": "public function getParam($key)\n {\n return $this->params[$key] ?? null;\n }", "title": "" }, { "docid": "1062e60c92c173dad839a2a3ad356b3a", "score": "0.63754296", "text": "public function getParam($key, $default = null) {\n return (array_key_exists($key, self::$_request['params'])) ? self::$_request['params'][$key] : $default;\n }", "title": "" }, { "docid": "aa6fcc95f8c8ac96166e5691d621cd2c", "score": "0.6369563", "text": "public static function getParameter($parameter) {\n if(isset($_REQUEST[$parameter])) {\n return $_REQUEST[$parameter];\n }\n else\n return '';\n }", "title": "" }, { "docid": "adebe73dc6a1fdfa7e2499a092ae3822", "score": "0.6355108", "text": "protected function singleParameter($name)\n {\n $value = false;\n $existInGet = $this->existParamGet($name);\n $existInPost = $this->existParamPost($name);\n\n if ($existInGet && $existInPost) {\n //The parameter exist in GET and in POST.\n\n $value = array(\n self::GET => $_GET[$name],\n self::POST => $_POST[$name]\n );\n } elseif ($existInGet) {\n //The parameter exist in GET.\n\n $value = $_GET[$name];\n } elseif ($existInPost) {\n //The parameter exist in POST.\n\n $value = $_POST[$name];\n }\n\n return $value;\n }", "title": "" }, { "docid": "5117935cd3c2640888f4cb289df3a4f0", "score": "0.63517517", "text": "public function getParam ( ) {\n\n return $this->param;\n }", "title": "" }, { "docid": "6f80dc630cda69efa136af9ebbf6b295", "score": "0.6336894", "text": "public function get($name)\n {\n if(isset($this->parameter[$name]))\n {\n return $this->parameter[$name];\n }\n }", "title": "" }, { "docid": "468f96fde99a73b6df4657a65ffed0fd", "score": "0.6323874", "text": "public static function getParameterGet($parameter){\n if(isset($_GET[$parameter])) {\n return $_GET[$parameter];\n }\n else\n return '';\n }", "title": "" }, { "docid": "19ae7a7986cf31157b7ff7ce0e58aacc", "score": "0.63189286", "text": "public function getParam($name)\n {\n if (!array_key_exists($name, $this->params)) {\n return null;\n }\n\n return $this->params[$name];\n }", "title": "" }, { "docid": "a3e711695eccf2f4d1ed742cbef2498b", "score": "0.6313475", "text": "public function getParam($key)\n {\n if (! isset($this->params[$key])) {\n return null;\n }\n\n return $this->params[$key];\n }", "title": "" }, { "docid": "3c6f54d4e596c892cb096ab4917de5f8", "score": "0.63050467", "text": "function param ( $key, $default = null ) {\n\treturn isset( $_REQUEST[$key] ) ? $_REQUEST[$key] : $default;\n}", "title": "" }, { "docid": "47dc586c8e1334b4253c8be9848620c9", "score": "0.63049275", "text": "public function getParameter(string $name, $default = null);", "title": "" }, { "docid": "04f332facf6862b5b76317bba6bfa184", "score": "0.63036823", "text": "public function getParamFromUrl($key) {\n return (isset ($this->routeParams[$key])) ? $this->routeParams[$key] : null;\n }", "title": "" }, { "docid": "325cfb67b57a7dcb0a552316520bea21", "score": "0.629222", "text": "protected function getRouteParameter()\n {\n return $this->request->route($this->subdomainKey());\n }", "title": "" }, { "docid": "9cfd1ad4d6781a57984c703c246e036b", "score": "0.6291165", "text": "public function getParam()\n\t{\n\t\treturn $this->_param;\n\t}", "title": "" }, { "docid": "2a94e26f7392a7bb61413d340dcb35c9", "score": "0.6289552", "text": "public function getParam($key = '')\n {\n $formData = (array) json_decode($this->request->getRawBody());\n\n if (strlen($key) > 0 && array_key_exists($key, $formData)) {\n return $formData[$key];\n } else {\n return $formData;\n }\n }", "title": "" }, { "docid": "4199a678e1622a5fd3c1f16f13a73d14", "score": "0.6287439", "text": "protected function getParameter($paramName) \r\n\t{\r\n\t\t$params = $this->getAllowedParams();\r\n\t\t$paramSettings = $params[$paramName];\r\n\t\treturn $this->getParameterFromSettings($paramName, $paramSettings);\r\n\t}", "title": "" }, { "docid": "3243199c832e4bb3951382d779e5e0aa", "score": "0.6282443", "text": "public function getParameter($name, $default = null);", "title": "" }, { "docid": "6d6c385a17bf8fdb5add42494640a6fd", "score": "0.6274397", "text": "function readParam($field, $default = null) {\n //Variable auf default Wert setzen\n $var = $default;\n //Überprüfen, ob das Feld als POST oder GET Parameter existiert\n //und gesetzt ist.\n if (ALLOW_POST && isset($_POST[$field]) && $_POST[$field] != '') {\n $var = $_POST[$field];\n } else if (ALLOW_GET && isset($_GET[$field]) && $_GET[$field] != '') {\n $var = $_GET[$field];\n }\n return $var;\n}", "title": "" }, { "docid": "f5812b8380882411b6c5e0418442ccb5", "score": "0.62736887", "text": "public function getParam($field) {\n\t\treturn (isset($this->valids[$field]))\n\t\t\t? $this->valids[$field]\n\t\t\t: null;\n\t}", "title": "" }, { "docid": "dfe0d95754fbf023f87a02e78d19b080", "score": "0.6266984", "text": "public function request($key) {\n\t\t return $this->route_variables[$key];\n\t\t }", "title": "" }, { "docid": "64bdaec6afbe5e7cb0d9ee64d68584be", "score": "0.6265359", "text": "function getParam( $pname ) {\n\t\treturn isset($this->params[$pname])?$this->params[$pname]:null;\n\t}", "title": "" }, { "docid": "85a6515baba64392380fae6dfea5d25e", "score": "0.62533706", "text": "public function getParameter($name, $default=null)\n {\n if (!isset($this->params[$name])) {\n return $default;\n }\n return $this->params[$name];\n }", "title": "" }, { "docid": "45d5ce0c2d00b8980d2b491bb7db6516", "score": "0.6245749", "text": "protected function param($key = null)\n {\n return array_get($this->params(), $key);\n }", "title": "" }, { "docid": "ad115f07cc9d126cdce0cf44fb3ea25b", "score": "0.62430125", "text": "public function parameterInGet($name)\n {\n return $this->existParamGet($name) ? $_GET[$name] : false;\n }", "title": "" }, { "docid": "3034677c218d91575979db31fadae9c1", "score": "0.6242806", "text": "public function getParam($key)\n {\n if (isset($this->_params[(string) $key]))\n return $this->_params[$key];\n return null;\n }", "title": "" }, { "docid": "926be33438beffa64571713e10d395f9", "score": "0.6239517", "text": "function get_param($name, $default) {\n\t\tif (isset($_GET[$name]))\n\t\t\treturn urldecode($_GET[$name]);\n\t\telse\n\t\t\treturn $default;\n\t}", "title": "" }, { "docid": "400186a1610e5591c26b67e74b91f996", "score": "0.623865", "text": "public function getParameter(string $key, string $default = '')\n {\n return $this->request->get($key, $default);\n }", "title": "" }, { "docid": "9539764a83f89b751836312cf06fada6", "score": "0.62322587", "text": "function get_parameter( $name, $default = null )\n {\n return $this->engine->get_parameter($name, $default);\n }", "title": "" }, { "docid": "45d8a236170f04eb80ffc31f1d067b1a", "score": "0.6213346", "text": "protected function getApiParameter($key) {\n return $this->apiParameters[$key];\n }", "title": "" }, { "docid": "879be9c6568887c9d02f6e2d65c4c789", "score": "0.6205832", "text": "function getParamGet($paramGet){\n\t\tif(isset($_GET[$paramGet])){\n\t\t\t$param = $_GET[$paramGet];\n\t\t\treturn $param;\n\t\t}\n\t}", "title": "" }, { "docid": "7536a25b9fe07e400816103fcd8d77fc", "score": "0.62026066", "text": "public static function getParam($param, $default = false)\n {\n $headers = Layer::getAllHeaders();\n\n $return = $default;\n\n if ($param == 'session_id') {\n $return = self::getSessionIdFromHeaders($headers);\n } elseif (self::$globalRouter !== null && self::getRouter()->hasParam($param)) {\n $return = self::$globalRouter->getParam($param);\n } elseif (isset($headers[$param])) {\n $return = $headers[$param];\n } elseif (isset($_POST[$param])) {\n $return = $_POST[$param];\n } elseif (isset($_GET[$param])) {\n $return = $_GET[$param];\n }\n\n return $return;\n }", "title": "" } ]
d0fd2d2e991c5baa1ead29045db866af
To store a new CMS page in storage
[ { "docid": "b5f1491bb005577c4ab110ec14cda7c1", "score": "0.6651014", "text": "public function store()\n {\n $data = request()->all();\n\n // part one of the validation in case partials pages were generated or generating partial pages\n $this->validate(request(), [\n 'channels' => 'required',\n 'locales' => 'required',\n 'url_key' => 'required'\n ]);\n\n $channels = $data['channels'];\n $locales = $data['locales'];\n\n $this->validate(request(), [\n 'html_content' => 'required|string',\n 'page_title' => 'required|string',\n 'meta_title' => 'required|string',\n 'meta_description' => 'string',\n 'meta_keywords' => 'required|string'\n ]);\n\n $data['content']['html'] = $data['html_content'];\n $data['content']['page_title'] = $data['page_title'];\n $data['content']['meta_keywords'] = $data['meta_keywords'];\n $data['content']['meta_title'] = $data['meta_title'];\n $data['content']['meta_description'] = $data['meta_description'];\n\n $data['content'] = json_encode($data['content']);\n\n $totalCount = 0;\n $actualCount = 0;\n\n foreach ($channels as $channel) {\n foreach ($locales as $locale) {\n $pageFound = $this->cms->findOneWhere([\n 'channel_id' => $channel,\n 'locale_id' => $locale,\n 'url_key' => $data['url_key']\n ]);\n\n $totalCount++;\n\n $data['channel_id'] = $channel;\n\n $data['locale_id'] = $locale;\n\n if (! $pageFound) {\n $result = $this->cms->create($data);\n\n if ($result) {\n $actualCount++;\n }\n }\n\n unset($pageFound);\n }\n }\n\n if (($actualCount != 0 && $totalCount != 0) && ($actualCount == $totalCount)) {\n session()->flash('success', trans('admin::app.cms.pages.create-success'));\n } else if (($actualCount != 0 && $totalCount != 0) && ($actualCount != $totalCount)) {\n session()->flash('warning', trans('admin::app.cms.pages.create-partial'));\n } else {\n session()->flash('error', trans('admin::app.cms.pages.create-failure'));\n }\n\n return redirect()->route($this->_config['redirect']);\n }", "title": "" } ]
[ { "docid": "37204fd79e6c81622cfcee256c4a8651", "score": "0.73006", "text": "public function store()\n {\n $attributes = request()->validate(Page::$rules, Page::$messages);\n\n $attributes['is_header'] = boolval(input('is_header'));\n $attributes['is_hidden'] = boolval(input('is_hidden'));\n $attributes['is_footer'] = boolval(input('is_footer'));\n $attributes['is_featured'] = boolval(input('is_featured'));\n $attributes['url_parent_id'] = ($attributes['url_parent_id'] == 0 ? $attributes['parent_id'] : $attributes['url_parent_id']);\n\n $page = $this->createEntry(Page::class, $attributes);\n\n if ($page) {\n $page->updateUrl()->save();\n $page->banners()->sync(input('banners'));\n }\n\n return redirect_to_resource();\n }", "title": "" }, { "docid": "45941dfa38785fe0fe586364e935686d", "score": "0.72482646", "text": "public function store()\n\t{\n\t\tPage::create(\n\t\t\tarray(\n\t\t\t\t'title' => Input::get('title'),\n\t\t\t\t'slug' => Str::slug( Input::get('title') ),\n\t\t\t\t'content' => Input::get('content'),\n\t\t\t)\n\t\t);\n\t\treturn Redirect::route('adminPages')->with('message', 'New page has been saved.');\n\t}", "title": "" }, { "docid": "d8dd2818f16148d4769a70776cd58fe7", "score": "0.7141697", "text": "public function savePage()\r\n\t{\t\r\n\t\t$form = $this->initPageForm(\"create\");\r\n\t\tif ($form->checkInput() && $this->checkPermissionBool(\"write\"))\r\n\t\t{\r\n\t\t\tinclude_once(\"Modules/Portfolio/classes/class.ilPortfolioPage.php\");\r\n\t\t\t$page = $this->getPageInstance();\r\n\t\t\t$page->setType(ilPortfolioPage::TYPE_PAGE);\t\t\r\n\t\t\t$page->setTitle($form->getInput(\"title\"));\t\t\r\n\t\t\t\r\n\t\t\t// use template as basis\r\n\t\t\t$layout_id = $form->getInput(\"tmpl\");\r\n\t\t\tif($layout_id)\r\n\t\t\t{\r\n\t\t\t\tinclude_once(\"./Services/Style/classes/class.ilPageLayout.php\");\r\n\t\t\t\t$layout_obj = new ilPageLayout($layout_id);\r\n\t\t\t\t$page->setXMLContent($layout_obj->getXMLContent());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$page->create();\r\n\r\n\t\t\tilUtil::sendSuccess($this->lng->txt(\"prtf_page_created\"), true);\r\n\t\t\t$this->ctrl->redirect($this, \"view\");\r\n\t\t}\r\n\r\n\t\t$this->tabs_gui->clearTargets();\r\n\t\t$this->tabs_gui->setBackTarget($this->lng->txt(\"back\"),\r\n\t\t\t$this->ctrl->getLinkTarget($this, \"view\"));\r\n\r\n\t\t$form->setValuesByPost();\r\n\t\t$this->tpl->setContent($form->getHtml());\r\n\t}", "title": "" }, { "docid": "2e353b147a5999a1a6e58d6a95deeba6", "score": "0.7138795", "text": "public function store(Requests\\PageStoreRequest $request)\n {\t\n \t// var_export($request);exit(0);\n \t$createdpage = $this->sitepages->create($request->only( 'title', 'slug', 'summary', 'content', 'user_id'));\n // $page = $this->sitepages->find(4);\n // var_dump($pageid);exit(0);\n $sidebarvalue = $request->only('pagesidebar');\n // var_dump($sidebarvalue['content']);exit(0);\n if(!empty($sidebarvalue['pagesidebar']))\n $createdpage->page_meta()->create(['meta'=> 'pagesidebar', 'value'=> $sidebarvalue['pagesidebar']]);\n // var_dump($request->only('pagesidebar'));exit(0);\n \treturn redirect(route('admin::pages')) ->with('status', 'Page has been created.');\n }", "title": "" }, { "docid": "022803f7ac3d95874a988da63a9da536", "score": "0.68675077", "text": "public function store()\n {\n $this->validate([\n 'section' => 'required',\n 'title' => 'required',\n 'description' => 'required',\n 'url' => 'required',\n ]);\n \n SitePages::updateOrCreate(['id' => $this->sitePage_id], [\n 'section' => $this->section,\n 'title' => $this->title,\n 'description' => $this->description,\n 'url' => $this->url,\n ]);\n \n session()->flash('message', \n $this->sitePage_id ? 'Site Page Updated Successfully.' : 'Site Page Created Successfully.');\n \n $this->closeModal();\n $this->resetInputFields();\n }", "title": "" }, { "docid": "59129f928d201cb366f2fd2e33dceafb", "score": "0.68252474", "text": "function store_this_page()\n\t{\n\t\t$buffer = JResponse::getBody();\n\t\t$this->_cache->store( $buffer, $this->page_request_hash, $this->_name );\n\t\t$expires = $_SERVER['REQUEST_TIME'] + $this->params->get( 'cache_life_time', 7200 );\n\n\t\t$query = \"INSERT INTO #__jomcdn\n\t\t\t( `cache`, `request`, `expires` )\n\t\t\t\tVALUES ( '{$this->page_request_hash}', '{$this->_cache_request}', '{$expires}' )\";\n\t\t$this->_db->setQuery( $query );\n\t\t$this->_db->query();\n\t}", "title": "" }, { "docid": "108c4303ac94dccc60d7719a9cd04c5d", "score": "0.6771756", "text": "public function store()\n\t{\n\n // Declare the rules for the form validation\n $rules = array(\n 'title' => 'required',\n 'content' => 'required',\n 'status' => 'required',\n 'lang_id' => 'required'\n );\n\n // Create a new validator instance from our validation rules\n $validator = Validator::make(Input::all(), $rules);\n\n // If validation fails, we'll exit the operation now.\n if ($validator->fails())\n {\n // Ooops.. something went wrong\n return Redirect::back()->withInput()->withErrors($validator);\n }\n\n try{\n $page = new Page(array(\n 'user_id' => Input::get('user_id'),\n 'title' => Input::get('title'),\n 'content' => Input::get('content'),\n 'status' => Input::get('status'),\n 'slug' => Input::get('slug'),\n 'static' => Input::get('mode'),\n 'front' => Input::get('front'),\n 'lang_id' => Input::get('lang_id'),\n 'category_id' => Input::get('category_id'),\n 'description' => Input::get('description'),\n 'email_to' => Input::get('email_to'),\n 'email_cc' => Input::get('email_cc')\n ));\n\n // And don't forget to save!\n $page->save();\n\n }catch (InvalidArgumentException $e){\n\n }\n return Redirect::to(\"admin/page\")->with('flash_error', 'the page was added successfully');\n\t}", "title": "" }, { "docid": "4a446def916fb1d662c7823e59d0c1de", "score": "0.6770867", "text": "public function store()\n {\n $validator = Validator::make($data = Input::all(), Page::$rules);\n\n if ($validator->fails())\n {\n return Redirect::back()->withErrors($validator)->withInput();\n }\n\n $page = Page::create($data);\n\n return Redirect::to('admin/pages')->with(array('note' => 'New Page Successfully Added!', 'note_type' => 'success') );\n }", "title": "" }, { "docid": "6690ee031172d2065532800aecdee3b6", "score": "0.67211777", "text": "public function store(PageRequest $request)\n {\n Page::create($request->all());\n\n flash()->success('Page Created');\n\n return redirect('admin/page');\n }", "title": "" }, { "docid": "3406739006cdc07d1dde4b0f08c1320a", "score": "0.67172295", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'title' => 'required|max:255',\n 'content' => 'required',\n ]);\n $values = [\n 'title' => $request->title,\n 'content' => $request->input('content'),\n 'isAllowCommet' => empty($request->isAllowCommet) ? 0 : 1,\n 'isTop' => empty($request->isTop) ? 0 : 1,\n 'order' => $request->order ?: 0,\n 'status' => $request->status,\n 'type' => 2,\n ];\n\n $page = Page::create($values);\n\n return redirect(route('admin.page.index'));\n }", "title": "" }, { "docid": "3ae4787fec911772ccc9d238aece6846", "score": "0.6709016", "text": "public function save(){\n\t\tif (!$_POST['title'] or !isset($_POST['alias'])){\n\t\t\tthrow new Exception(lang('no_value'));\n\t\t}\n\n\t\tforeach ($_POST as $k => $v){\n\t\t\t${$k} = trim($v);\n\t\t}\n\n\t\t$content = preg_replace_callback('!<code>(.*?)</code>!ms', create_function('$match', 'return \"<code>\".htmlspecialchars($match[1]).\"</code>\";'), $content);\n\t\t\n\t\tif(!$_GET['id']){//create new page\n\t\t\tif ($alias){\n\t\t\t\t$alias = properUri($alias);\n\t\t\t} elseif ($title){\n\t\t\t\t$alias = properUri($title);\n\t\t\t} else {\n\t\t\t\tthrow new Exception(lang('no_value'));\n\t\t\t}\n\n\t\t\t$status = 1;\n\t\t\t$type = $this -> type;\n\t\t\t$parentPath = '';\n\t\t\tif ((int)$parent_id != 0){\n\t\t\t\t$stmt = Core::$db -> query(\"SELECT fullpath FROM pages WHERE id = \" . (int)$parent_id);\n\t\t\t\t$parentPath = $stmt -> fetchColumn();\n\t\t\t}\n\t\t\t$fullpath = $parentPath . '/' . $alias;\n\n\t\t\t$stmt = Core::$db -> prepare(\"INSERT INTO pages (alias, template, parent_id, status, type, fullpath) VALUES (:alias, :template, :parent_id, :status, :type, :fullpath)\");\n\t\t\tif (!$stmt->execute(array('alias' => $alias, 'template' => $template, 'parent_id' => $parent_id, 'status' => $status, 'type' => $type, 'fullpath' => $fullpath))) throw new Exception(lang('error_not_saved'));\n\t\t\t$id = Core::$db -> lastInsertId();\n\t\t\t$stmt = Core::$db -> prepare(\"INSERT INTO pages_content (page_id, locale, title, content) VALUES ($id, :locale, :title, :content)\");\n\t\t\tif (!$stmt->execute(array('content' => $content, 'title' => $title, 'locale' => Core::$locale))) throw new Exception(lang('error_not_saved'));\n\t\t\tclearAllCache();\n\t\t} else {//update old page\n\t\t\t$id = (int)$_GET['id'];\n\t\t\tif ($id == 0) throw new Exception(lang('unauthorized_request'));\n\t\t\t$stmt = Core::$db -> prepare(\"UPDATE pages SET template = :template WHERE id = :id\");\n\t\t\tif (!$stmt->execute(array('id' => $id, 'template' => $template))) throw new Exception(lang('error_not_saved'));\n\t\t\t$stmt = Core::$db -> prepare(\"INSERT OR REPLACE INTO pages_content VALUES (:id,:locale,:title,:content)\");\n\t\t\tif (!$stmt->execute(array('id' => $id, 'content' => $content, 'title' => $title, 'locale' => Core::$locale))) throw new Exception(lang('error_not_saved'));\n\t\t\t$this -> clearcache();\n\t\t}\n\t\t$p['redirect']['url'] = '?mod=pages&type=' . $this -> type . '&act=edit&id=' . $id;\n\t\t$p['redirect']['message'] = lang('saved');\n\t\treturn $p;\n\t}", "title": "" }, { "docid": "947e2771fb11141a3d7601aef8d33615", "score": "0.6706606", "text": "public function store(Request $request)\n\t{\n \t\t$this->validate($request, [\n\t\t\t'title' => 'required|unique:pages|max:255',\n\t\t\t'content' => 'required',\n\t\t]);\n\n\n\t\t$page = new Page;\n\t\t$page->title = e(Input::get('title'));\n\t\t$page->thumb = Input::get('thumb')?e(Input::get('thumb')):'';\n\t\t$page->content = e(Input::get('content'));\n\t\t$page->user_id = Auth::user()->id;\n\n\t\tif ($page->save()) {\n\t\t\treturn Redirect::to('admin');\n\t\t} else {\n\t\t\treturn Redirect::back()->withInput($request->input())->withErrors('保存失败!');\n\t\t}\n\n\t}", "title": "" }, { "docid": "21a378c5c148b738a4f585dfed5ce7d6", "score": "0.6705831", "text": "public function store(CreatePageRequest $request)\n {\n $template = Template::findOrFail($request->get('template_id'));\n\n $page = new Page();\n $page->fill($request->all());\n $page->template_id = $template->id;\n\n event(\n new PageWillBeCreated($page)\n );\n\n $page->save();\n\n $this->attachDefaultPartials($page, $template);\n $this->attachTags($page, $request);\n $blockIdentifier = $template->blocks()->firstOrFail()->identifier;\n\n event(\n new PageWasCreated($page)\n );\n\n return redirect()->route('zxadmin.page.edit', [$page->id, $blockIdentifier]);\n }", "title": "" }, { "docid": "bdd98c6c71201d206803ae233e2d6c44", "score": "0.6700841", "text": "public function store()\n\t{\n\t\t$page = new Page;\n\t\t$page->title = \"a brand new page!\";\n\t\t$page->save();\n\n\t\treturn Response::json($page, 201);\n\t}", "title": "" }, { "docid": "8114ff171140f138dd4fdf2efd5512ac", "score": "0.6693107", "text": "public function store(Request $request) {\n $param = array(\n 'title' => $request->input('title'),\n 'content' => $request->input('editor1'),\n 'pageTypeId' => $request->input('pageTypes'),\n 'created_date' => $request->input('created_date'),\n 'is_active' => $request->input('is_active') == \"on\" ? 1 : 0\n );\n\n $isSaved = Page::savePage($param);\n if ($isSaved) {\n return Redirect::to('admin/page')->with('success', 'Хуудас амжилттай үүслээ!');\n } else {\n return Redirect::to('admin/page')->with('failed', 'Алдаа гарлаа!');\n }\n }", "title": "" }, { "docid": "616c52c8d05c45f4b16639072cf4de1d", "score": "0.6687317", "text": "public function store(PageRequest $request)\n {\n\n $page = new Page;\n $page->name=$request->input('name');\n $page->title=$request->input('title');\n $page->slug=$request->input('slug');\n $page->content=$request->input('content');\n $page->status=$request->input('status');\n $page->save();\n return redirect('admin/pages')->with('success','Page created successfully');\n }", "title": "" }, { "docid": "c548bd9cfae220fb24f6ca4fba12e78b", "score": "0.65729344", "text": "public function store(Request $request) {\n $validator = Validator::make($request->all(), [\n 'title' => 'required|max:255|unique:cms',\n 'description' => 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect('/admin/cms/create')\n ->withInput()\n ->withErrors($validator);\n }\n\n $cms = new Cms;\n $cms->title = $request->title;\n $cms->slug = preg_replace('/[^a-zA-Z0-9_.]/', '_', strtolower($request->title));\n $cms->description = $request->description;\n $cms->status = $request->status;\n $cms->save();\n\n $msg = \"Page Added Successfully.\";\n $log = ActivityLog::createlog(Auth::Id(), \"CMS\", $msg, Auth::Id());\n\n Session::flash('success_msg', $msg);\n return redirect('/admin/cms');\n }", "title": "" }, { "docid": "688f03b06f6d7d09487d6982cdc6fed3", "score": "0.6513223", "text": "public function store(PageRequest $request)\n {\n Page::create($request->all());\n\n Session::flash('success', 'Page added!');\n\n return redirect('pages');\n }", "title": "" }, { "docid": "0e39b9c6842f407d0b655b8a9d23b164", "score": "0.6504685", "text": "public function store(CreatePageRequest $request)\n {\n $this->page->create($request->all());\n\n return redirect()->route('admin.page.page.index')\n ->withSuccess(trans('page::messages.page created'));\n }", "title": "" }, { "docid": "866e2114eaed79f90e67f9a92880cc8c", "score": "0.65019304", "text": "public function store(Request $request, Page $page)\n {\n $page->create([\n 'name' => $request->input('name'),\n 'slug' => createSlug($request->input('name')),\n 'content' => $request->input('content')\n ]);\n\n return redirect()->back();\n }", "title": "" }, { "docid": "0b337e6c2812905425b57ba0feb19b92", "score": "0.6481943", "text": "public function store(PageRequest $request)\n {\n // Create page\n $page = new Page($request->getValues());\n $page->language_id = $this->getLanguage()->id;\n $page->save();\n\n $this->saveContentAndModules($page, $request);\n\n if ($page->parent_id) {\n $page->makeChildOf(Page::find($page->parent_id));\n }\n\n if($request->hasFile('image')) {\n\n // Save image and create thumb\n $imageName = 'image.' . $request->image->getClientOriginalExtension();\n\n $imageDir = $page->images_path;\n\n if (!file_exists($imageDir)) {\n mkdir($imageDir, 0755, true);\n }\n\n $request->file('image')->move($imageDir, $imageName);\n\n $page->image = $imageName;\n $page->createThumbnail();\n $page->save();\n }\n\n flash('Stránka byla úspěšně vytvořena!', 'success');\n\n return redirect()->route('admin.pages.index');\n }", "title": "" }, { "docid": "47d5f00208808e13ec26f99a49f93bfc", "score": "0.6481508", "text": "protected function save()\n {\n if ($this->pageObj) {\n // Finish previous page\n $this->pageGateway->save($this->pageObj);\n }\n }", "title": "" }, { "docid": "05ccf1ee07a0830df5757df144a0f40d", "score": "0.645269", "text": "public function store(SavePageRequest $request)\n {\n $page = new Page();\n\n $this->savePage($request, $page);\n\n return redirect()\n ->route('admin.page.index')\n ->with('message', 'La page ' . $page->title . ' a bien été créée');\n }", "title": "" }, { "docid": "e456662e3cb3e772c8964dfe8d870b32", "score": "0.64438444", "text": "public function store(PageRequest $request)\n {\n // dd($request);\n $result=Page::create(request()->all());\n return redirect('/page-edit/' . $result->id)->with('info','New page added.');\n }", "title": "" }, { "docid": "bd488d4852caa7c370963c796b26f2e6", "score": "0.6435297", "text": "function xcms_create_page()\n{\n global $SETTINGS, $pageid;\n $result = array(\n \"error\" => false,\n \"output\" => \"\",\n );\n\n $loc_name = xcms_get_key_or($_POST, \"create-name\");\n if (!xcms_check_page_id($loc_name, true))\n {\n $result[\"error\"] = \"Недопустимый физический путь страницы. \";\n return $result;\n }\n\n $alias = xcms_get_key_or($_POST, \"alias\");\n if (!xcms_check_page_alias($alias))\n {\n $result[\"error\"] = \"Недопустимый alias страницы. \";\n return $result;\n }\n\n if (@$_POST[\"global\"])\n $dir = xcms_get_page_path($loc_name);\n else\n $dir = xcms_get_page_path(\"$pageid/$loc_name\");\n\n $page_type = xcms_get_key_or($_POST, \"create-pagetype\");\n\n @mkdir($dir);\n $info = array();\n $info[\"owner\"] = xcms_user()->login();\n $info[\"type\"] = $page_type;\n $info[\"header\"] = xcms_get_key_or($_POST, \"header\");\n $info[\"alias\"] = $alias;\n\n // set view/edit rights\n // creator always has access\n $info[\"view\"] = xcms_user()->login();\n $info[\"edit\"] = xcms_user()->login();\n xcms_acl_from_post($info);\n\n if (@$_POST[\"menu-title\"])\n $info[\"menu-title\"] = $_POST[\"menu-title\"];\n xcms_set_key_from_checkbox($info, \"menu-hidden\", @$_POST[\"menu-hidden\"]);\n\n if (file_exists(\"{$SETTINGS[\"engine_dir\"]}cms/$page_type/install.php\"))\n {\n $opageid = $pageid;\n if (@$_POST[\"global\"])\n $pageid = $loc_name;\n else\n $pageid = \"$pageid/$loc_name\";\n include(\"{$SETTINGS[\"engine_dir\"]}cms/$page_type/install.php\");\n $pageid = $opageid;\n }\n\n if (!xcms_save_list(\"$dir/info\", $info))\n {\n $result[\"error\"] = \"Cannot save INFO '$dir/info'. \";\n return $result;\n }\n $rebuild_result = xcms_rebuild_aliases_and_rewrite();\n // append output\n $result[\"output\"] .= $rebuild_result[\"output\"];\n\n if ($rebuild_result[\"error\"] !== false)\n return $rebuild_result;\n\n foreach ($_POST as $key => $value)\n unset($_POST[$key]);\n\n return $rebuild_result;\n}", "title": "" }, { "docid": "81398b9c1c3d9b88f1ee545ff84bfef4", "score": "0.6434376", "text": "public function store(Request $request)\n {\n if(!$request->ajax()) return redirect('/');\n $this->_validate();\n $page = new Page();\n $page->name = $request->nombre;\n $page->url = $request->url;\n $page->module_id = $request->modulo;\n $page->icon = '';\n $page->view_panel = $request->vistaPanel;\n $page->status = 1;\n $page->save();\n $this->logAdmin(\"Registró un nuevo page.\");\n }", "title": "" }, { "docid": "16463a24ef096ad1ad9c234bc6d8b52e", "score": "0.643068", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required|max:255|min:2',\n 'page_slug' => 'required|unique:cms_pages',\n 'content' => 'required',\n ]);\n if ($validator->fails()) {\n return back()->withErrors($validator)->withInput();\n }\n try {\n $pageData = CmsPages::create([\n 'name' => $request->name,\n 'page_slug' => $request->page_slug,\n 'content' => $request->content,\n \"status\" => $request->has('status') ? 'Active' : 'Disable',\n ]);\n return redirect('/admin/page-management')->with(['status' => 'success', 'message' => 'New page successfully created!']);\n } catch (\\Exception $e) {\n // return back()->with(['status' => 'danger', 'message' => $e->getMessage()]);\n return back()->with(['status' => 'danger', 'message' => 'Some thing went wrong! Please try again later.']);\n }\n }", "title": "" }, { "docid": "e5ad60c78b8a10efae2eb04ac07ea1db", "score": "0.64256877", "text": "public function store() {\n $input = array_except(Input::all(), array('_method', 'translation'));\n $transl_input = array_except(Input::get('translation'), 'id');\n $validation = Validator::make($input, Page::$rules);\n $transl_validation = Validator::make($transl_input, PageText::$rules);\n\n if ($validation->passes()) {\n $this->page = $this->page->create($input);\n if ($transl_validation->passes()) {\n PageText::create(array_merge(array('language_id'=> lang_id(), 'page_id'=>$this->page->id), $transl_input));\n return Redirect::route('admin.pages.index');\n }\n }\n\n return Redirect::route('admin.pages.create')\n ->withInput()\n ->withErrors($validation)\n ->withErrors($transl_validation)\n ->with('message', 'There were validation errors.');\n }", "title": "" }, { "docid": "334839213c2b1b33cd8e1262fa2883cc", "score": "0.64032835", "text": "public function store(Request $request)\n {\n \n $slug = Str::slug ($request->title_en ==null) ? Str::slug($request->title_ar) : Str::slug($request->title_en) ;\n \n $pages = new Page();\n $pages->title_ar =$request->title_ar;\n $pages->title_en =$request->title_en;\n $pages->content_ar =$request->content_ar;\n $pages->content_en =$request->content_en;\n $pages->slug =$slug;\n $pages->save();\n\n return redirect('/admin/pages');\n }", "title": "" }, { "docid": "67300775dd1f86a46a8cddfefc7ec894", "score": "0.63992256", "text": "public function store()\n\t{\n\n\t\tforeach(Language::all() as $k=>$lang){\n\t\t\tif (!isset($lastinsertId)){$lastinsertId = 0;}\n\t\t\t\telse{ \n\t\t\t\t\tif ($k==1){$lastinsertId = $r->id;\n\t\t\t\t\t\tContents::find($lastinsertId)->update(array(\"key\"=>$lastinsertId));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t$r = Contents::create(array(\n\t\t\t\t'title'=>Input::get('title.'.$lang->prefix),\n\t\t\t\t'content'=>Input::get('content.'.$lang->prefix),\n\t\t\t\t'link'=>Input::get('link.'.$lang->prefix),\n\t\t\t\t'categories_id'=>Input::get('categories_id.'.$lang->prefix),\n\t\t\t\t'lang'=>$lang->prefix,\n\t\t\t\t'key'=>$lastinsertId\n\t\t\t));\n\t\t}\n\t\t\n\t\treturn Redirect::route('admin.contents.index');\n\t}", "title": "" }, { "docid": "450985856ee49da9d381f6d6f8e004aa", "score": "0.6380312", "text": "public function store(PageFormRequest $request)\n {\n $page = Page::create($request->all());\n\n // alert()->success('Page has been added.');\n\n return redirect('/page');\n }", "title": "" }, { "docid": "e3210397d2aefc60494642d126c80064", "score": "0.63720566", "text": "public function store(StorePagesRequest $request)\n {\n ini_set('memory_limit', '-1');\n if (!Gate::allows('page_create')) {\n return abort(401);\n }\n\n $page = new Page();\n $page->title = $request->title;\n if($request->slug == \"\"){\n $page->slug = str_slug($request->title);\n }else{\n $page->slug = $request->slug;\n }\n $message = $request->get('content');\n $dom = new \\DOMDocument();\n $dom->loadHtml(mb_convert_encoding($message, 'HTML-ENTITIES', 'UTF-8'), LIBXML_HTML_NOIMPLIED | LIBXML_HTML_NODEFDTD);\n $images = $dom->getElementsByTagName('img');\n\n // foreach <img> in the submitted message\n foreach ($images as $img) {\n\n $src = $img->getAttribute('src');\n // if the img source is 'data-url'\n if (preg_match('/data:image/', $src)) {\n // get the mimetype\n preg_match('/data:image\\/(?<mime>.*?)\\;/', $src, $groups);\n $mimetype = $groups['mime'];\n // Generating a random filename\n $filename = uniqid();\n $filepath = storage_path(\"/app/public/uploads/page/$filename.$mimetype\");\n // @see http://image.intervention.io/api/\n $image = \\Image::make($src)\n // resize if required\n /* ->resize(300, 200) */\n ->encode($mimetype, 100)// encode file to the specified mimetype\n ->save($filepath);\n $new_src = asset(\"storage/uploads/$filename.$mimetype\");\n $dirname = dirname($filename);\n\n $img->removeAttribute('src');\n $img->setAttribute('src', $new_src);\n } // <!--endif\n } // <!-\n $page->content = $dom->saveHTML();\n\n $request = $this->saveFiles($request);\n $page->user_id = auth()->user()->id;\n $page->image = $request->featured_image;\n $page->meta_title = $request->meta_title;\n $page->meta_keywords = $request->meta_keywords;\n $page->meta_description = $request->meta_description;\n $page->published = $request->published;\n $page->sidebar = $request->sidebar;\n $page->save();\n\n\n\n if ($page->id) {\n return redirect()->route('admin.pages.index')->withFlashSuccess(__('alerts.backend.general.created'));\n } else {\n return redirect()->route('admin.pages.index')->withFlashDanger(__('alerts.backend.general.error'));\n\n }\n }", "title": "" }, { "docid": "15955da9fbdaa5513dee3d8dc8e3ca05", "score": "0.63677746", "text": "public function store(Request $request)\n {\n $request->validate([\n \"title\" => \"required|filled\"\n ]);\n\n $request->merge([\"slug\" => Str::slug($request->title)]);\n\n $request->validate([\n \"slug\" => \"unique:pages,page_slug,NULL,id\",\n \"content\" => \"required|filled\",\n \"publish\" => \"required|filled\",\n ]);\n\n $page = new Page();\n $page->page_title = $request->title;\n $page->page_content = $request->content;\n $page->page_slug = Str::slug($request->title);\n $page->page_excerpt = Str::limit($request->content, 200, '...');\n $page->published = $request->publish == \"1\" ? true : false;\n $page->save();\n\n return redirect()->route(\"paksuco.pages.index\")->with(\"success\", \"Page has been successfully saved.\");\n }", "title": "" }, { "docid": "c91b24e1c4b8ad89695b62638a582e90", "score": "0.63539964", "text": "public function store(Request $request)\n {\n if ($request->type==0)\n {\n $section = new Page;\n $sectionroute = new Route;\n $section->title=strtolower($request->title);\n $section->activated=0;\n $section->issection=1;\n $section->owner=1;\n $section->parent=1;\n $section->save();\n $sectionroute->record_id=$section->id;\n $sectionroute->name = 'show/' . $section->title;\n $sectionroute->caption = $section->title;\n $sectionroute->isparent=1;\n $sectionroute->parent=1;\n $sectionroute->save();\n\n \n\n }\n if ($request->type==1)\n {\n $page = new Page;\n $pageroute = new Route;\n $page->title=strtolower($request->title);\n $page->activated=0;\n $page->issection=0;\n $page->owner=1;\n $page->parent=0;\n $page->save();\n $pageroute->record_id=$page->id;\n $pageroute->name = 'show/' . strtolower($request->title);\n $pageroute->caption = $page->title;\n $pageroute->isparent=0;\n $pageroute->ischild=1;\n $pageroute->parent=$request->section;\n $pageroute->save();\n\n \n\n }\n\n if ($request->type==2)\n {\n $page = Page::find($request->id);\n \n $page->content=$request->content;\n $page->save();\n \n \n\n }\n\n return redirect()->action('PageManagerController@index');\n }", "title": "" }, { "docid": "a5511b492d55af087f9aa2bfcbae416f", "score": "0.635131", "text": "public function store(CreatePagesRequest $request)\n\t{\n\t \n\t\tPages::create($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.pages.index');\n\t}", "title": "" }, { "docid": "7008f1293f82e129be8cd7d8e54cbc7e", "score": "0.63416", "text": "public function postSavePage()\n {\n try {\n $okay = true;\n $page_id = $_REQUEST['page_id'];\n $page_content = $_REQUEST['thedata'];\n\n if ($page_id > 0) {\n $page = Page::find($page_id);\n } else {\n $page = new Page;\n $page->browser_title = $_REQUEST['browser_title'];\n $slugify = new \\Cocur\\Slugify\\Slugify();\n $page->slug = $slugify->slugify($page->browser_title);\n // verify that the slug is not already in the db\n $results = Page::where('slug', '=', $page->slug)->count();\n $okay = $okay && ( $results == 0);\n }\n if ($okay){\n $page->page_content = $page_content;\n $page->save();\n } else {\n echo \"Browser title is already in use!\";\n }\n echo \"OK\";\n } catch (\\Exception $e) {\n echo 'Caught exception: ', $e->getMessage(), \"\\n\";\n }\n }", "title": "" }, { "docid": "060b1025e309ebe29a1f84d408b5f1e8", "score": "0.63296336", "text": "public function store(Request $request)\n {\n $request->validate([\n 'title' => 'unique:pages'\n ]);\n\n $payloads = $request->except(\"_token\");\n $payloads['slug'] = str_slug($request->title);\n Page::create($payloads);\n return redirect(route(\"admin.page.index\"))->with(\"info\",\"page sukses di buat\");\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6286375", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6286375", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.6286375", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.6282404", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
1838813afbaf0539e343c5f075d2015c
Loads the global unlock percentages of all achievements for the given game
[ { "docid": "4fe03f7aaba1f778eeeceee40cdc7bfd", "score": "0.64232576", "text": "public static function getGlobalPercentages($appId) {\n $params = ['gameid' => $appId];\n $data = WebApi::getJSONObject('ISteamUserStats', 'GetGlobalAchievementPercentagesForApp', 2, $params);\n\n $percentages = [];\n foreach($data->achievementpercentages->achievements as $achievementData) {\n $percentages[$achievementData->name] = (float) $achievementData->percent;\n }\n\n return $percentages;\n }", "title": "" } ]
[ { "docid": "a92ad1d606349101a1bb995037eb4f30", "score": "0.5791874", "text": "public function getUserAchievements($steamid, $app_id) {\r\n $this->disableErrorChecking();\r\n \r\n $this->createRequest('get', \"/profiles/{$steamid}/stats/{$app_id}/achievements\", array(\r\n 'xml' => 1\r\n ));\r\n }", "title": "" }, { "docid": "1cac3c292c5b3cb1719d5dc4a61fb134", "score": "0.5611173", "text": "public function auth_achievement($earn = true) : Array {\n\n $return = array();\n\n $query_string = \"SELECT user_achievements FROM users WHERE user_id = $this->requestee_user_id LIMIT 1\";\n $query = $this->db->query($query_string);\n\n if ($query->success) {\n $rows = $this->db->get_row($query->mysqli_query);\n \n $player_achievements = $rows['user_achievements'];\n\n $this->current_achievements = $player_achievements;\n $this->current_achievements_array = json_decode($player_achievements, true);\n\n if (!empty($player_achievements)) {\n $player_achievements = json_decode($player_achievements, true);\n // check if user has achievement already!\n \n // doesnt have it.\n $return['owned'] = false;\n for ($i=0; $i < count($player_achievements); $i++) {\n $return['success'] = false;\n if ($player_achievements[$i]['achievement_id'] === $this->achievement_id) {\n // already has it.\n $return['owned'] = true;\n }\n }\n\n if (!$return['owned']) {\n if ($earn) {\n // does not have it\n $earn_achi = $this->earn_achievement($this->achievement_id);\n if ($earn_achi['success']) {\n return $earn_achi;\n } else {\n $return['success'] = false;\n $return['error_log'] = $earn['error_log'];\n }\n } else {\n $return['success'] = false;\n $return['owned'] = false;\n }\n }\n } else {\n if ($earn) {\n // user has no achievements, aka not earned.\n $earn_achi = $this->earn_achievement($this->achievement_id);\n if ($earn_achi['success']) {\n return $earn_achi;\n } else {\n $return['success'] = false;\n $return['error_log'] = $earn['error_log'];\n }\n } else {\n $return['success'] = false;\n $return['owned'] = false;\n }\n }\n } else {\n $return['success'] = false;\n $return['error_log'] = 'Failed to find user';\n }\n return $return;\n }", "title": "" }, { "docid": "2d247309cdb1b3526185cae8b013c383", "score": "0.5257556", "text": "public function getPlayerAchievements($steamid, $app_id) {\r\n $this->createRequest('get', \"/ISteamUserStats/GetPlayerAchievements/v0001\", array(\r\n 'steamid' => $steamid,\r\n 'appid' => $app_id,\r\n 'format' => 'json'\r\n ));\r\n }", "title": "" }, { "docid": "0380895cf851e6379d6f0d27aa9be7ac", "score": "0.5204327", "text": "public function achievements()\n\t{\n\t\treturn $this->has_many('Achievement');\n\t}", "title": "" }, { "docid": "435ac9656ffaf2c2d46c7f758d6ee68a", "score": "0.5173401", "text": "function getAchievements($UUID){\n $connection = get_SQL_Connection();\n $query = sprintf(\"SELECT a.achievementId FROM AchievementsUnlocked a, Users u WHERE u.facebookid='%s' AND a.userId = u.id ORDER BY achievementId\",\n mysql_real_escape_string($UUID));\n $queryresult = mysql_query($query,$connection);\n mysql_close($connection);\n if(!$queryresult) die(\"Failed to getAchievements: $query $connection\");\n else {\n $result = \"\";\n while($row = mysql_fetch_array($queryresult)){\n if($result != \"\") $result .= \",\";\n $result .= $row['achievementId'];\n }\n return $result;\n }\n}", "title": "" }, { "docid": "137cd97dc58277fd03f215f45709a291", "score": "0.5154241", "text": "private function loadGame($game)\n {\n $this->remainingShips = $game['remaining_ships'];\n $this->playerTurns = $game['player_turns'];\n $this->ships = $game['ships'];\n $this->board = $game['board'];\n }", "title": "" }, { "docid": "9f27ba5ea530ed0d353c0fbb0c410b9d", "score": "0.5152962", "text": "public function get_achievements_array()\n\t{\n\t\treturn $this->ACHIEVEMENTS;\n\t}", "title": "" }, { "docid": "e1202122cfc146892f686a1d597db60b", "score": "0.51528865", "text": "function get_all_gradable_items() {\n\n global $CFG;\n \n $sql = \"SELECT a.id, a.name, a.description as summary, a.course, c.id as cmid\n FROM {$CFG->prefix}assignment a\n INNER JOIN {$CFG->prefix}course_modules c\n ON a.id = c.instance\n WHERE c.module = {$this->mainobject->modulesettings['assignment']->id}\n AND c.visible = 1\n AND a.course IN ({$this->mainobject->course_ids})\n ORDER BY a.id\";\n\n $assignments = get_records_sql($sql);\n $this->assessments = $assignments;\n \n }", "title": "" }, { "docid": "d1aeb943d3c20d09cb046f29a7aa145d", "score": "0.5140023", "text": "public function achievements()\n {\n return $this->hasManyThrough(Achievement::class, Profile::class);\n }", "title": "" }, { "docid": "1a3f56020273a6441ab4e6047a9b340c", "score": "0.5139272", "text": "protected function _gameScoreVsAchievementTotal()\n\t{\n\t\t$dataArray = array();\n\t\tforeach($this->getGamer()->getGames() as $game)\n\t\t{\n\t\t\t$data = new BaseObject();\n\t\t\t$data->setGameScore($game->getScore());\n\t\t\t$data->setAchievementSum($game->getAchievementCollection()->sumColumn('score'));\n\t\t\t$data->setAchievementCount($game->getAchievementCollection()->count());\n\t\t\t$data->setGameAchievement($game->getAchievements());\n\t\t\t\n\t\t\t$data->setName($game->getName());\n\t\t\t\n\t\t\t$dataArray[$game->getSlug()] = $data;\n\t\t}\n\t\t\n\t\t$this->setGameVsAchievement($dataArray);\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "862f9b67cf9f0d32eb5d8110fcde4831", "score": "0.512221", "text": "public function completeAllExpiriences($achievement)\n {\n $user_id = Auth::client()->user()->id;\n $achivements = DB::select(\"select `achievements`.`id` from `achievements` left join `cards` on `cards`.`achievement_id` = `achievements`.`id` where achievements.id NOT IN (SELECT au.achievement_id FROM achievements_users au WHERE au.user_id = $user_id) and achievements.category_id = $achievement->category_id and achievements.criteria_id <> $achievement->criteria_id\");\n if(count($achivements)==0){\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "7dcaa3ee0fdffd3f733329aa176c49c0", "score": "0.5116647", "text": "function checkEverytime()\n {\n // ######### Respond in time and maybe also right ###########\n\n // Schnellfeuer\n if (!$this->achieve_array[5][2]) {\n if (count($this->timestamps) > 0) {\n if ((getdate()[0] - end($this->timestamps) <= 2) and ($this->last_evaluation)) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][2])] = $this->achieve_array[2][2];\n $this->last_achievement = $this->achieve_array[0][2];\n $this->achieve_array[5][2] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Luftschuss\n if (!$this->achieve_array[5][60]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) <= 2) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][60])] = $this->achieve_array[2][60];\n $this->last_achievement = $this->achieve_array[0][60];\n $this->achieve_array[5][60] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Spritner\n if (!$this->achieve_array[5][3]) {\n if (count($this->timestamps) > 4) {\n if (getdate()[0] - $this->timestamps[count($this->timestamps) - 5] <= 30) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][3])] = $this->achieve_array[2][3];\n $this->last_achievement = $this->achieve_array[0][3];\n $this->achieve_array[5][3] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Marathonläufer\n if (!$this->achieve_array[5][61]) {\n if (count($this->timestamps) > 9) {\n if (getdate()[0] - $this->timestamps[count($this->timestamps) - 10] <= 60) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][61])] = $this->achieve_array[2][61];\n $this->last_achievement = $this->achieve_array[0][61];\n $this->achieve_array[5][61] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Lichtgeschwindigkeit\n if (!$this->achieve_array[5][62]) {\n if (count($this->timestamps) > 9) {\n if (getdate()[0] - $this->timestamps[count($this->timestamps) - 10] <= 5) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][62])] = $this->achieve_array[2][62];\n $this->last_achievement = $this->achieve_array[0][63];\n $this->achieve_array[5][62] = true;\n $this->achievementCounter++;\n }\n }\n }\n // ######### Do nothing for some time #########\n\n // Eingeschlafen?\n if (!$this->achieve_array[5][1]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) >= 30) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][1])] = $this->achieve_array[2][1];\n $this->last_achievement = $this->achieve_array[0][1];\n $this->achieve_array[5][1] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Stillgestanden\n if (!$this->achieve_array[5][58]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) >= 5) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][58])] = $this->achieve_array[2][58];\n $this->last_achievement = $this->achieve_array[0][58];\n $this->achieve_array[5][58] = true;\n $this->achievementCounter++;\n }\n }\n }\n // Toilettenpause\n if (!$this->achieve_array[5][59]) {\n if (count($this->timestamps) > 0) {\n if (getdate()[0] - end($this->timestamps) >= 600) {\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][59])] = $this->achieve_array[2][59];\n $this->last_achievement = $this->achieve_array[0][59];\n $this->achieve_array[5][59] = true;\n $this->achievementCounter++;\n }\n }\n }\n\n }", "title": "" }, { "docid": "2706fbd387cdb7145685ff51b42a4dfa", "score": "0.50594914", "text": "function checkAchievements($memberid,$achievement_array){\n\t\n\t// Use a common database connection\n\t$database = new Database();\n\t\n\t/*\n\t * Points based achievements\n\t */\n\t\n\t/*\n\t * Ranks\n\t * - Find out current rank\n\t * - Find out current level\n\t * - Check if current level match rank\n\t * - Otherwise increment rank\n\t * - Update rank in member table\n\t * - Create achievement in achievement log\n\t * - Push achievement to be displayed\n\t */\n\t\n\t$results = $database->get('s_members',array('level,rank'),'member_id='.$memberid);\n\t$db_rank = $results[0]['rank'];\n\t$level = $results[0]['level'];\n\t\n\t$results = $database->query('SELECT fk_id FROM g_ranks WHERE min<='.$level.' ORDER BY min DESC LIMIT 1');\n\t$rank = $results[0]['fk_id'];\n\t\n\tif($db_rank!=$rank){\n\t\t$database->update('s_members','member_id',$memberid,array('rank'),array($rank));\n\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,$rank));\n\t\t$achievement_array[] = $rank;\n\t}\n\t\t\n\t// End Ranks\n\t\n\t/*\n\t * Condition based achievements\n\t * Fetch all achievements of the user to determine if user has attained achievements\n\t */\n\t\n\t$results = $database->get('g_achievements_log',array('fk_achievement_id'),'fk_member_id='.$memberid);\n\t$achievements = array();\n\tforeach($results as $achievement){\n\t\t$achievements[]=$achievement['fk_achievement_id'];\n\t}\n\t\n\t/*\n\t * - Check if achievement has been attained\n\t * - If not attained, check if user has taken quizzes in 2 different categories\n\t * - If user has met criteria\n\t * - Create achievement in achievement log\n\t * - Push achievement to be displayed\n\t */\n\t\n\t/*\n\t * Category based achievements\n\t */\n\t\n\t/*\n\t * Curiousity killed the cat\n\t * Completed at least 1 quiz each from 2 categories\n\t */\n\tif(!in_array('52',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_cat) as categories FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid);\t\t\n\t\t$categories = $results[0]['categories'];\n\t\tif($categories>=2){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,52));\n\t\t\t$achievement_array[] = 52;\n\t\t}\n\t}\n\t\n\t/*\n\t * Born an Explorer\n\t * Completed at least 1 quiz each from 4 categories\n\t */\n\tif(!in_array('53',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_cat) as categories FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid);\t\t\n\t\t$categories = $results[0]['categories'];\n\t\tif($categories>=4){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,53));\n\t\t\t$achievement_array[] = 53;\n\t\t}\n\t}\n\t\n\t/*\n\t * Jack of all Trades\n\t * Completed at least 1 quiz each from 8 categories\n\t */\n\tif(!in_array('54',$achievements)){\n\t\tif($categories>=8){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,54));\n\t\t\t$achievement_array[] = 54;\n\t\t}\n\t}\n\t\n\t/*\n\t * Generalist\n\t * Completed 10 quizzes from the General category\n\t */\n\tif(!in_array('55',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=1');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,55));\n\t\t\t$achievement_array[] = 55;\n\t\t}\n\t}\n\t\n\t\n\t/*\n\t * General Specialist\n\t * Completed 25 quizzes from the General category\n\t */\n\tif(!in_array('56',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=1');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,56));\n\t\t\t$achievement_array[] = 56;\n\t\t}\n\t}\n\t\n\t/*\n\t * Budding Geek\n\t * Completed 10 quizzes from the Technology category\n\t */\n\tif(!in_array('57',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=2');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,57));\n\t\t\t$achievement_array[] = 57;\n\t\t}\n\t}\n\t\n\t\n\t/*\n\t * Most likely a Geek\n\t * Completed 25 quizzes from the Technology category\n\t */\n\tif(!in_array('58',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=2');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,58));\n\t\t\t$achievement_array[] = 58;\n\t\t}\n\t}\n\t\n\t/*\n\t * Enjoying life\n\t * Completed 10 quizzes from the Lifestyle category\n\t */\n\tif(!in_array('59',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=3');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,59));\n\t\t\t$achievement_array[] = 59;\n\t\t}\n\t}\n\t\n\t/*\n\t * Life is a breeze\n\t * Completed 25 quizzes from the Lifestyle category\n\t */\n\tif(!in_array('60',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=3');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,60));\n\t\t\t$achievement_array[] = 60;\n\t\t}\n\t}\n\t\n\t/*\n\t * Becoming a Leader\n\t * Completed 10 quizzes from the Politics category\n\t */\n\tif(!in_array('61',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=4');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,61));\n\t\t\t$achievement_array[] = 61;\n\t\t}\n\t}\n\t\n\t/*\n\t * Consider being a Minister\n\t * Completed 25 quizzes from the Politics category\n\t */\n\tif(!in_array('62',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=4');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,62));\n\t\t\t$achievement_array[] = 62;\n\t\t}\n\t}\t\n\t\n\t/*\n\t * Wildlife Explorer\n\t * Completed 10 quizzes from the Animals category\n\t */\n\tif(!in_array('63',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=5');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,63));\n\t\t\t$achievement_array[] = 63;\n\t\t}\n\t}\n\t\n\t/*\n\t * Be a Zoologist\n\t * Completed 25 quizzes from the Animals category\n\t */\n\tif(!in_array('64',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=5');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,64));\n\t\t\t$achievement_array[] = 64;\n\t\t}\n\t}\n\t\n\t/*\n\t * Finding your role\n\t * Completed 10 quizzes from the Movies category\n\t */\n\tif(!in_array('65',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=6');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,65));\n\t\t\t$achievement_array[] = 65;\n\t\t}\n\t}\t\n\t\t\n\t/*\n\t * The Producer\n\t * Completed 25 quizzes from the Movies category\n\t */\n\tif(!in_array('66',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=6');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,66));\n\t\t\t$achievement_array[] = 66;\n\t\t}\n\t}\t\n\t\n\t/*\n\t * Getting social\n\t * Completed 10 quizzes from the Social category\n\t */\n\tif(!in_array('67',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=7');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,67));\n\t\t\t$achievement_array[] = 67;\n\t\t}\n\t}\t\t\n\t\n\t/*\n\t * Becoming a Sociologist\n\t * Completed 25 quizzes from the Social category\n\t */\n\tif(!in_array('68',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=7');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,68));\n\t\t\t$achievement_array[] = 68;\n\t\t}\n\t}\n\t\n\t/*\n\t * Getting Entertained\n\t * Completed 10 quizzes from the Entertainment category\n\t */\n\tif(!in_array('69',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=8');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=10){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,69));\n\t\t\t$achievement_array[] = 69;\n\t\t}\n\t}\n\t\n\t/*\n\t * Info-tainment!\n\t * Completed 25 quizzes from the Entertainment category\n\t */\n\tif(!in_array('70',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result LEFT JOIN q_quizzes ON fk_quiz_id=quiz_id WHERE q_store_result.fk_member_id='.$memberid.' AND fk_quiz_cat=8');\n\t\t$taken = $results[0]['quizzes'];\n\t\tif($taken>=25){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,70));\n\t\t\t$achievement_array[] = 70;\n\t\t}\n\t}\n\t\n\t/*\n\t * End category based achievements\n\t */\n\t\n\t/*\n\t * Special Achievements\n\t */\n\t\n\t/*\n\t * Officially initiated\n\t * Completed quiz taking and quiz creation\n\t */\n\tif(!in_array('51',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) as quizzes FROM q_store_result WHERE fk_member_id='.$memberid);\n\t\t$taken = $results[0]['quizzes'];\n\t\t$results = $database->query('SELECT COUNT(DISTINCT quiz_id) as quizzes FROM q_quizzes WHERE fk_member_id='.$memberid);\n\t\t$created = $results[0]['quizzes'];\n\t\tif($taken>0 && $created>0){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,51));\n\t\t\t$achievement_array[] = 51;\n\t\t}\n\t}\n\t\n\t/*\n\t * 6 quizzes in a row\n\t * Achieved a 1.5x multiplier\n\t */\n\tif(!in_array('71',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) AS count FROM `q_store_result` WHERE `fk_member_id`='.$memberid.' AND DATE(`timestamp`) = DATE(NOW())');\n\t\t$count = $results[0]['count'];\n\t\tif($count>=6){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,71));\n\t\t\t$achievement_array[] = 71;\n\t\t}\n\t}\n\t\n\t/*\n\t * 2 timer\n\t * Achieved a 2x multiplier\n\t */\n\tif(!in_array('72',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) AS count FROM `q_store_result` WHERE `fk_member_id`='.$memberid.' AND DATE(`timestamp`) = DATE(NOW())');\n\t\t$count = $results[0]['count'];\n\t\tif($count>=11){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,72));\n\t\t\t$achievement_array[] = 72;\n\t\t}\n\t}\n\t\n\t/*\n\t * 3 times!\n\t * Achieved a 3x multiplier\n\t */\n\tif(!in_array('73',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) AS count FROM `q_store_result` WHERE `fk_member_id`='.$memberid.' AND DATE(`timestamp`) = DATE(NOW())');\n\t\t$count = $results[0]['count'];\n\t\tif($count>=21){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,73));\n\t\t\t$achievement_array[] = 73;\n\t\t}\n\t}\n\n\t/*\n\t * Top of the charts\n\t * Become the 1st on the Leaderboard\n\t */\n\t\n\t/*\n\t * Amazing comeback\n\t * Regain 1st on the Leaderboard\n\t */\n\t\n\t/*\n\t * End Special Achievements\n\t */\n\t\n\t/*\n\t * Duration based\n\t */\n\t\n\t/*\n\t * Half Quiz-a-thon\n\t * Completed 21 quizzes in 24 hours\n\t */\n\tif(!in_array('76',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) AS count FROM `q_store_result` WHERE `fk_member_id`='.$memberid.' AND `timestamp` > DATE_SUB(NOW(), INTERVAL 1 DAY)');\n\t\t$count = $results[0]['count'];\n\t\tif($count>=21){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,76));\n\t\t\t$achievement_array[] = 76;\n\t\t}\n\t}\n\t\n\t/*\n\t * Quiz-a-thon\n\t * Completed 42 quizzes in 24 hours\n\t */\t\n\tif(!in_array('77',$achievements)){\n\t\t$results = $database->query('SELECT COUNT(DISTINCT fk_quiz_id) AS count FROM `q_store_result` WHERE `fk_member_id`='.$memberid.' AND `timestamp` > DATE_SUB(NOW(), INTERVAL 1 DAY)');\n\t\t$count = $results[0]['count'];\n\t\tif($count>=42){\n\t\t\t$database->save('g_achievements_log',array('fk_member_id','fk_achievement_id'),array($memberid,77));\n\t\t\t$achievement_array[] = 77;\n\t\t}\n\t}\n\t\n\t/*\n\t * 168 hours\n\t * Continuously active in Quizroo for 1 week\n\t */\n\t\n\t/*\n\t * 730.48 hours\n\t * Continuously active in Quizroo for 1 month\n\t */\n\t\n\t/*\n\t * End Duration based\n\t */\n\t\n\treturn $achievement_array;\n}", "title": "" }, { "docid": "ed43cd5a60ade9c4dd354aaf70359cf8", "score": "0.5055809", "text": "public function getAchievements() { return $this->Achievements; }", "title": "" }, { "docid": "f6775e5ef394a42861fb68265470fb58", "score": "0.505232", "text": "function getGameProgression()\n {\n $totLife = 20;\n $cards = $this->retrieveStoredObject(self::STORAGE__CARDS);\n foreach ($cards as $card)\n {\n if (\n isset($card['card']['type']) &&\n isset($card['options']['life']) &&\n $card['card']['type'] === 'player'\n )\n {\n $totLife += $card['options']['life'];\n }\n }\n\n return 100 - ($totLife * (100 / 20));\n }", "title": "" }, { "docid": "180a83d6bb89cb143bc6638dd7e4df02", "score": "0.5040478", "text": "function achievementget() {\n\n\t$user = $_POST['user_id'];\n\n\tupdate_user_meta( $user, 'achievementget', true );\n\n\tdie();\n}", "title": "" }, { "docid": "a4a5efb3fbf62783aadbf69add3620da", "score": "0.5004451", "text": "public function refreshAllSigns(){\n foreach($this->HGApi->getGlobalManager()->getGames() as $game){\n $this->refreshSigns($game);\n }\n }", "title": "" }, { "docid": "1ce6c72d3da5377854dd87fb39650ed0", "score": "0.49484843", "text": "public function completeAllRides($achievement)\n {\n $user_id = Auth::client()->user()->id;\n $achivements = DB::select(\"select `achievements`.`id` from `achievements` left join `cards` on `cards`.`achievement_id` = `achievements`.`id` where achievements.id NOT IN (SELECT au.achievement_id FROM achievements_users au WHERE au.user_id = $user_id) and achievements.category_id = $achievement->category_id and achievements.subcategory_id = $achievement->subcategory_id and achievements.criteria_id <> $achievement->criteria_id\");\n if(count($achivements)==0){\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "fd179dac0a8711bf2431532508d852b5", "score": "0.493738", "text": "function _load_gpa()\n\t{\n\t\t$this->gpa = 0;\n\t\t$this->gpa_overall = 0;\n\t\t$this->gpa_institution = 0;\n\t\t$this->gpa_transfer= 0 ;\n\t\t\n\t\t$query=\"SELECT * FROM shrlgpa WHERE shrlgpa_pidm=:pidm AND shrlgpa_levl_code=:levl\";\n\n\t\t$args = array(\n\t\t\t'pidm' => $this->pidm,\n\t\t\t'levl' => $this->level_code\n\t\t);\n\n\t\tif($results = \\PSU::db('banner')->Execute($query, $args) ) {\n\t\t\tforeach($results as $row) {\n\t\t\t\tif($row['shrlgpa_gpa_type_ind'] == 'O') {\n\t\t\t\t\t$this->gpa_overall = $row['shrlgpa_gpa'];\n\t\t\t\t} elseif ($row['shrlgpa_gpa_type_ind'] == 'I') {\n\t\t\t\t\t$this->gpa_institution = $row['shrlgpa_gpa'];\n\t\t\t\t} elseif ($row['shrlgpa_gpa_type_ind'] == 'T') {\n\t\t\t\t\t$this->gpa_transfer = $row['shrlgpa_gpa'];\n\t\t\t\t}//end if\n\t\t\t}\n\t\t\t$this->gpa = $this->gpa_overall;\n\t\t}//end if\n\t}", "title": "" }, { "docid": "6a81a9b5ceee045e4b7f1aa3f2beb004", "score": "0.4932114", "text": "public function getGlobalAbilities()\n {\n return $this->global_abilities;\n }", "title": "" }, { "docid": "6d66c72bb69dc6208d7da63069c43ad0", "score": "0.49161792", "text": "function game_calculate_best_score($game, $attempts) {\n\n switch ($game->grademethod) {\n\n case GAME_GRADEMETHOD_FIRST:\n foreach ($attempts as $attempt) {\n return $attempt->score;\n }\n break;\n\n case GAME_GRADEMETHOD_LAST:\n foreach ($attempts as $attempt) {\n $final = $attempt->score;\n }\n return $final;\n\n case GAME_GRADEMETHOD_AVERAGE:\n $sum = 0;\n $count = 0;\n foreach ($attempts as $attempt) {\n $sum += $attempt->score;\n $count++;\n }\n return (float)$sum/$count;\n\n default:\n case GAME_GRADEMETHOD_HIGHEST:\n $max = 0;\n foreach ($attempts as $attempt) {\n if ($attempt->score > $max) {\n $max = $attempt->score;\n }\n }\n return $max;\n }\n}", "title": "" }, { "docid": "32b3dbda2ad832fc4b66cc3992af6c84", "score": "0.48941347", "text": "function getMyBadges()\n\t{\n\t\tglobal $dbc;\n\t\tglobal $fgmembersite;\n\t\tif(!$fgmembersite->CheckLogin())\n\t\t\treturn false;\n\t\t$q=mysqli_query($dbc,\"SELECT b.image_id FROM backpack b, people3 p WHERE p.id_user=b.id_user AND p.username='\".$_SESSION[$fgmembersite->GetLoginSessionVar()].\"'\");\n\t\twhile($row=mysqli_fetch_array($q,MYSQLI_ASSOC))$IDs[]=$row['image_id'];\n\t\t$q=mysqli_query($dbc,\"SELECT image_id,badge_name,badge_desc FROM images3 WHERE image_id IN (\".implode(',',$IDs).\")\");\n\t\t$badges=array();\n\t\twhile($row=mysqli_fetch_array($q,MYSQLI_ASSOC))array_push($badges,$row);\n\t\treturn $badges;\n\t}", "title": "" }, { "docid": "15e4fb79f68f699d0d0b9ca36d41ee5b", "score": "0.48900223", "text": "function getGoalPercent(){\n $goal = $GLOBALS['GOAL_STEPS'];\n $cursteps = getCurrentSteps();\n $percent = ( $cursteps[0]['steps'] / $goal ) * 100;\n return round($percent);\n}", "title": "" }, { "docid": "bc354cb3cb53c01b8c87e7fc522104c1", "score": "0.487922", "text": "protected function update_overall_grades($quiz) {\n quiz_update_all_attempt_sumgrades($quiz);\n quiz_update_all_final_grades($quiz);\n quiz_update_grades($quiz);\n }", "title": "" }, { "docid": "76575ee1c031259e9bc8cfe6bedf6af1", "score": "0.48772138", "text": "public function getPlayerAchievements(Player $player)\n {\n // TODO: This does a unique filter after the query has finished \n // which could lead to performance issues\n return $player->achievements()\n ->orderByDesc('player_achievements.score')\n ->get()\n ->unique('id')\n ->values();\n }", "title": "" }, { "docid": "c44b99eac8b4a8ea39af56467d621146", "score": "0.4859215", "text": "public function fetchStats()\n\t{\n\t\t$statsData = array();\n\t\t\n\t\t// Get all cache action\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId);\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['AllActionCount'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['AllAction'][] = $row->toArray();\n\t\t\t$statsData['AllActionCount'] += 1;\n\t\t}\n\t\t\n\t\t// Calculate current cache use for every scope;\n\t\t//SELECT * FROM stats_ivc_cache WHERE session_id = 12 AND (action = \"insert\" OR action = \"cache_hit\") GROUP BY full_key;\n\t\t$select = $this->_statsTable->select()\n\t\t\t\t\t\t\t\t\t->where('session_id = ?', $this->_sessionId)\n\t\t\t\t\t\t\t\t\t->where('action = \"insert\" OR action = \"cache_hit\" OR action = \"replace\"')\n\t\t\t\t\t\t\t\t\t->group('full_key');\n\t\t$rowSet = $this->_statsTable->fetchall($select);\n\t\t$statsData['totalUse'] = 0;\n\t\t$statsData['ivcUse'] = 0;\n\t\t$statsData['clubUse'] = 0;\n\t\t$statsData['userUse'] = 0;\n\t\tforeach ($rowSet as $row)\n\t\t{\n\t\t\t$statsData['keyUseList'][$row['full_key']] = $row->toArray();\n\t\t\t$statsData['totalUse'] += $row['size'];\n\t\t\t$statsData[$row['scope'] . 'Use'] += $row['size'];\n\t\t}\n\t\t\n\t\t// Calculate average use of user session ... need user session for that\n\t\t\n\t\treturn ($statsData);\n\t}", "title": "" }, { "docid": "e5e0f80cee462849dcc630292c1a32be", "score": "0.48500708", "text": "public static function getAllAbilities()\n\t{\n\t\t$result = sql_helper::selectQuery(\"SELECT * FROM \". TABLE_ABILITY_DEFINITIONS);\n\t\n if(!$result) return null; //error\n\t\t\n\t\t$resultArray = Array(); \n\t\twhile ($row = $result->fetch_assoc())\n\t\t{\n\n\t\t\t$resultArray[$row[\"definitionName\"]] = 0;\n\t\t}\n\n\t\treturn $resultArray;\n\t}", "title": "" }, { "docid": "eca349dec09f26e167af4c07f15ff5c1", "score": "0.48432767", "text": "function load_bolusMealtimeAvgs()\n {\n $bolusMealtimeAvgs = [];\n $entries = [];\n $mealtimes = ['F', 'BB', 'AB', 'BL', 'AL', 'BD', 'AD', 'B', 'R'];\n\n $total = 0;\n $totcnt = 0;\n foreach ($mealtimes as $mealtime)\n {\n $entries = query(\"SELECT bolus FROM bglog WHERE id = ? AND mealtime = ? AND bolus > 0\", $_SESSION[\"id\"], $mealtime);\n\n $cnt = count($entries);\n $totcnt += $cnt;\n if ($cnt === 0)\n {\n $bolusMealtimeAvgs[$mealtime] = '--';\n }\n else\n {\n $sum = array_sum(array_column($entries, 'bolus'));\n $total += $sum;\n $bolusMealtimeAvgs[$mealtime] = number_format(round($sum / $cnt, 1), 1);\n }\n\n }\n\n if ($totcnt === 0)\n {\n $bolusMealtimeAvgs['ALL'] = '--';\n }\n else\n {\n $bolusMealtimeAvgs['ALL'] = number_format(round($total / $totcnt, 1), 1);\n }\n\n return $bolusMealtimeAvgs;\n }", "title": "" }, { "docid": "95f00bf32a433c0d8c56cc755a59d718", "score": "0.48374695", "text": "function loadMyGradeCount($assn_id) {\n global $CFG, $PDOX, $USER;\n $cacheloc = 'peer_grade';\n $cachekey = $assn_id . \"::\" . $USER->id;\n $grade_count = Cache::check($cacheloc, $cachekey);\n if ( $grade_count != false ) return $grade_count;\n\n $peer_marks = retrievePeerMarks($assn_id, $USER->id);\n\n $stmt = $PDOX->queryDie(\n \"SELECT COUNT(grade_id) AS grade_count\n FROM {$CFG->dbprefix}peer_submit AS S\n JOIN {$CFG->dbprefix}peer_grade AS G\n ON S.submit_id = G.submit_id\n WHERE S.assn_id = :AID AND G.user_id = :UID\",\n array( ':AID' => $assn_id, ':UID' => $USER->id)\n );\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n if ( $row !== false ) {\n $grade_count = U::get($row, 'grade_count', '0') + 0;\n } else {\n $grade_count = $peer_marks;\n }\n if ( $peer_marks > $grade_count ) $grade_count = $peer_marks;\n Cache::set($cacheloc, $cachekey, $grade_count);\n return $grade_count;\n}", "title": "" }, { "docid": "928f564c603288fc3ae8020da7ae9dd1", "score": "0.4828534", "text": "private function getBasicAssessmentStatistics()\n {\n // get active runs, users, document groups, and rating options from database\n DatabaseUtils::setEntityManager($this->em);\n $active_run_names = DatabaseUtils::getActiveRuns()['run_names'];\n $active_user_names = DatabaseUtils::getActiveUsers()['active_user_names_without_admins'];\n $active_user_groups = DatabaseUtils::getActiveUsers()['active_user_groups_without_admins'];\n $active_doc_groups = DatabaseUtils::getDocumentGroups()['document_groups'];\n $active_doc_groups_short = DatabaseUtils::getDocumentGroups()['document_groups_short'];\n $rating_levels = DatabaseUtils::getRatingOptions();\n\n // calculate progress for users\n Progress::setEntityManager($this->em);\n $user_progress = $this->getProgressForUsers($active_user_names, $active_user_groups);\n\n // calculate number of total and finished DQCombinations (without multiple assessments)\n $progress_dq = $this->getProgressForDQCombinations();\n $total_assessments = $progress_dq['total'];\n $finished_assessments = $progress_dq['finished'];\n $assessment_prop = $progress_dq['proportion'];\n\n // calculate number of skipped documents\n $skipped = (float)$this->g_repo->assessmentByRating(Constants::SKIPPED)[0][\"col_\" . Constants::SKIPPED];\n\n // calculate progress for all document groups\n $progress_groups = $this->getProgressForDocGroups($active_doc_groups_short);\n $nr_evaluations = $progress_groups['nr_evaluations'];\n $doc_groups_assessments_total = $progress_groups['doc_groups_assessments_total'];\n $doc_groups_assessments = $progress_groups['doc_groups_assessments'];\n $doc_groups_assessments_complete = $progress_groups['doc_groups_assessments_complete'];\n\n // calculate progress for multiple assessments\n $mltple = $this->getProgressForMultipleAssessments(\n $active_doc_groups_short,\n $finished_assessments,\n $doc_groups_assessments_total,\n $doc_groups_assessments_complete\n );\n $total_incl_multiple = $mltple['total_incl_multiple'];\n $finished_incl_multiple = $mltple['finished_incl_multiple'];\n $finished_incl_multiple_prop = $mltple['finished_incl_multiple_prop'];\n\n // get ratings for all runs\n $run_ratings = $this->countRatingsForRuns(\n $this->g_repo,\n $rating_levels,\n $active_run_names\n );\n $run_data = $this->getNumbersForRuns($this->g_repo, $active_run_names);\n $run_nr_assessed = $run_data['assessed'];\n $run_nr_total = $run_data['total'];\n\n // calculate progress for different rating options in all runs\n /** @var $rel_lev RatingOption */\n $rating_for_different_levels = array();\n if ($rating_levels != null) {\n foreach ($rating_levels as $rel_lev) {\n $rating_for_different_levels[$rel_lev->getName()] =\n (float)$this->g_repo->assessmentByRating(\n $rel_lev->getName(),\n $rel_lev->getShortName()\n )[0][\"col_\" . $rel_lev->getShortName()];\n }\n }\n\n return array(\n 'run_names' => $active_run_names,\n 'user_names' => $active_user_names,\n 'doc_groups_names' => $active_doc_groups,\n 'doc_groups' => $active_doc_groups_short,\n 'user_progress' => $user_progress,\n 'total_assessments' => $total_assessments,\n 'finished_assessments' => $finished_assessments,\n 'assessment_prop' => $assessment_prop,\n 'skipped' => $skipped,\n 'nr_evaluations' => $nr_evaluations,\n 'doc_groups_assessments_total' => $doc_groups_assessments_total,\n 'doc_groups_assessments' => $doc_groups_assessments,\n 'doc_groups_assessments_complete' => $doc_groups_assessments_complete,\n 'total_incl_multiple' => $total_incl_multiple,\n 'finished_incl_multiple' => $finished_incl_multiple,\n 'finished_incl_multiple_prop' => $finished_incl_multiple_prop,\n 'rating_levels_in_runs' => $run_ratings,\n 'run_number_assessed' => $run_nr_assessed,\n 'run_number_total' => $run_nr_total,\n 'rating_for_different_levels' => $rating_for_different_levels\n );\n }", "title": "" }, { "docid": "65036eace9917c8769099f90279773c2", "score": "0.4815477", "text": "public function points()\n {\n $points = 0;\n $factor = 1;\n\n // On regarde quels achievements sont locked et on en profite pour\n // calculer le nombre de points de l'utilisateur obtenus par les\n // achievements\n foreach ($this->achievements as $achievement) {\n $achievement = new Achievement($achievement);\n if (gettype($achievement->points()) == 'integer') {\n $points += $achievement->points();\n } else if ($achievement->points() == '+10%') {\n $factor += 0.1;\n } else if ($achievement->points() == '+15%') {\n $factor += 0.15;\n } else if ($achievement->points() == '+75%') {\n $factor += 0.75;\n }\n }\n return ceil($factor * $points);\n }", "title": "" }, { "docid": "3d46e2e3c2d3ea068af6e5f4f0b4c3a4", "score": "0.47854906", "text": "function scorm_get_what_grade_array(){\n return array (HIGHESTATTEMPT => get_string('highestattempt', 'scorm'),\n AVERAGEATTEMPT => get_string('averageattempt', 'scorm'),\n FIRSTATTEMPT => get_string('firstattempt', 'scorm'),\n LASTATTEMPT => get_string('lastattempt', 'scorm'));\n}", "title": "" }, { "docid": "a8c1a34fda1ac053b6b66c2a58ac6737", "score": "0.47739062", "text": "public function rideTotalHours($achievement)\n {\n $lap = Lap::getTotalHours(Auth::client()->user()->id, $achievement->criteria_value);\n if ( !empty($lap) ) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "e68842f7df63c427cdab847403e347db", "score": "0.47656706", "text": "function getStatusAllMyGames(){}", "title": "" }, { "docid": "e5d145f8d70141e3faab6a3899fefaa5", "score": "0.47495702", "text": "function load_bgMealtimeAvgs()\n {\n $bgMealtimeAvgs = [];\n $entries = [];\n $mealtimes = ['F', 'BB', 'AB', 'BL', 'AL', 'BD', 'AD', 'B', 'R'];\n\n $total = 0;\n $totcnt = 0;\n foreach ($mealtimes as $mealtime)\n {\n $entries = query(\"SELECT reading FROM bglog WHERE id = ? AND mealtime = ? AND reading > 0\", $_SESSION[\"id\"], $mealtime);\n\n $cnt = count($entries);\n $totcnt += $cnt;\n if ($cnt === 0)\n {\n $bgMealtimeAvgs[$mealtime] = '--';\n }\n else\n {\n $sum = array_sum(array_column($entries, 'reading'));\n $total += $sum;\n $bgMealtimeAvgs[$mealtime] = number_format(round($sum / $cnt, 1), 1);\n }\n\n }\n\n if ($totcnt === 0)\n {\n $bgMealtimeAvgs['ALL'] = '--';\n }\n else\n {\n $bgMealtimeAvgs['ALL'] = number_format(round($total / $totcnt, 1), 1);\n }\n\n return $bgMealtimeAvgs;\n }", "title": "" }, { "docid": "1825a8f382c8ecc1ec7813d4325d788b", "score": "0.47398874", "text": "function badge_stats() {\n\n\t\t/*\n\t\targuments:\n\t\t\tnone\n\n\t\treturns:\n\t\n\t\tReturn:\n\t\t\tif successful:\n\t\t\t{\n\t\t\t\t{\n\t\t\t\t\tbadge_id: the badge id\n\t\t\t\t\tbadge_name: the name of the badge\n\t\t\t\t\tqty: how many people have this badge\n\t\t\t\t},\n\t\t\t\t..\n\t\t\t\t..\n\t\t\t}\n\n\t\t\tif error:\n\t\t\t{\n\t\t\t\terror_code: The error code\n\t\t\t\terror_msg: The error message\n\t\t\t}\n\t\t*/\n\n\t\tglobal $dbh;\n\n\t\t// Iterate through each badge and retrieve stats for that badge\n\t\t// Iterate through each action type and determine stats for each action type\n\t\t$badges = array();\n\n\t\t$sql = 'SELECT\n\t\t\tbadge_id,\n\t\t\tbadge_name,\n\t\t\t(\n\t\t\t\tSELECT\n\t\t\t\tcount(*)\n\t\t\t\tFROM ' . CORE_DB . '.users_info\n\t\t\t\tWHERE ' . CORE_DB . '.users_info.badge_id = ' . CORE_DB . '.badges.badge_id\n\t\t\t) AS badge_qty\n\t\t\tFROM ' . CORE_DB . '.badges\n\t\t\tORDER BY badge_name ASC\n\t\t\t';\n\n\t\t$sth = $dbh->prepare($sql);\n\t\t$sth->execute();\n\n\t\twhile($row = $sth->fetch()) {\n\n\t\t\tarray_push($badges, Core::remove_numeric_keys($row));\n\n\t\t}\n\n\t\t$badges = Core::multi_sort($badges, 'badge_qty', 'desc');\n\n\t\treturn $badges;\n\n\t}", "title": "" }, { "docid": "9bf1fb1ebe2732072ea615873e1f1dd8", "score": "0.46808058", "text": "function game_calculate_best_attempt($game, $attempts) {\n\n switch ($game->grademethod) {\n\n case GAME_ATTEMPTFIRST:\n foreach ($attempts as $attempt) {\n return $attempt;\n }\n break;\n\n case GAME_GRADEAVERAGE: // need to do something with it :-)\n case GAME_ATTEMPTLAST:\n foreach ($attempts as $attempt) {\n $final = $attempt;\n }\n return $final;\n\n default:\n case GAME_GRADEHIGHEST:\n $max = -1;\n foreach ($attempts as $attempt) {\n if ($attempt->sumgrades > $max) {\n $max = $attempt->sumgrades;\n $maxattempt = $attempt;\n }\n }\n return $maxattempt;\n }\n}", "title": "" }, { "docid": "96434379242032c2f87f731e5ae14409", "score": "0.4659474", "text": "function xstats_displayMaxValueListMisc($gameId) {\n echo( \"<H3>Spitzenwerte im Spiel</H3>\");\n $statsAvailablePlayerIndicies = xstats_getAvailablePlayerIndicies($gameId);\n $statsMaxTurn = xstats_getMaxTurn($gameId);\n echo( xstats_displayMaxSum( $gameId, 'coloniestakencount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxValue( $gameId, 'planetcount') );\n echo( xstats_displayMaxValue( $gameId, 'colonistcount') );\n echo( xstats_displayMaxValue( $gameId, 'cantoxcount') );\n echo( xstats_displayMaxValue( $gameId, 'lemincount') );\n echo( xstats_displayMaxValue( $gameId, 'factorycount') );\n echo( xstats_displayMaxValue( $gameId, 'minescount') );\n xstats_displayMaxWaitTime( $gameId );\n}", "title": "" }, { "docid": "95299331336bbaa3c2a8914414e71117", "score": "0.4650942", "text": "public function updateStatistics(GameEntity $game, $action = Statistics::ACTION_ADD)\n {\n $statsRepository = $this->entityManager->getRepository('AppBundle:Statistics');\n $statisticsService = $this->container->get('app.statistic_service');\n $isDraw = false;\n // Stats by current month\n $winnerTeamStats = null;\n // Stats by current month\n $defeatTeamStats = null;\n // Stats by all period\n $winnerTeamStatsAll = null;\n // Stats by all period\n $defeatTeamStatsAll = null;\n $date = $game->getGameDate();\n // Stats by current month\n $firstTeamStats = $statsRepository\n ->getStatistic(\n $game->getFirstTeam(),\n (int)$date->format('m'),\n (int)$date->format('Y')\n );\n // Stats by all period\n $firstTeamStatsAll = $statsRepository->getStatistic($game->getFirstTeam());\n // Stats by current month\n $secondTeamStats = $statsRepository\n ->getStatistic(\n $game->getSecondTeam(),\n (int)$date->format('m'),\n (int)$date->format('Y')\n );\n // Stats by all period\n $secondTeamStatsAll = $statsRepository->getStatistic($game->getSecondTeam());\n\n if ($game->getResult() == GameEntity::RESULT_DRAW) {\n $isDraw = true;\n } else {\n if ($game->getResult() == GameEntity::RESULT_FIRST_WINNER) {\n $winnerTeamStats = $firstTeamStats;\n $defeatTeamStats = $secondTeamStats;\n $winnerTeamStatsAll = $firstTeamStatsAll;\n $defeatTeamStatsAll = $secondTeamStatsAll;\n } else {\n $winnerTeamStats = $secondTeamStats;\n $defeatTeamStats = $firstTeamStats;\n $winnerTeamStatsAll = $secondTeamStatsAll;\n $defeatTeamStatsAll = $firstTeamStatsAll;\n }\n }\n\n if ($action == Statistics::ACTION_ADD) {\n\n if ($isDraw) {\n $firstTeamStats->addDrawn();\n $secondTeamStats->addDrawn();\n $firstTeamStatsAll->addDrawn();\n $secondTeamStatsAll->addDrawn();\n } else {\n $winnerTeamStats->addWon();\n $winnerTeamStatsAll->addWon();\n $defeatTeamStats->addLost();\n $defeatTeamStatsAll->addLost();\n }\n\n } elseif ($action == Statistics::ACTION_REMOVE) {\n\n if ($isDraw) {\n $firstTeamStats->removeDrawn();\n $secondTeamStats->removeDrawn();\n $firstTeamStatsAll->removeDrawn();\n $secondTeamStatsAll->removeDrawn();\n // Update statistic streak\n $statisticsService->updateStreak($firstTeamStats);\n $statisticsService->updateStreak($firstTeamStatsAll);\n $statisticsService->updateStreak($secondTeamStats);\n $statisticsService->updateStreak($secondTeamStatsAll);\n } else {\n $winnerTeamStats->removeWon();\n $winnerTeamStatsAll->removeWon();\n $defeatTeamStats->removeLost();\n $defeatTeamStatsAll->removeLost();\n // Update statistic streak\n $statisticsService->updateStreak($winnerTeamStats);\n $statisticsService->updateStreak($winnerTeamStatsAll);\n $statisticsService->updateStreak($defeatTeamStats);\n $statisticsService->updateStreak($defeatTeamStatsAll);\n }\n\n }\n\n $this->entityManager->flush();\n }", "title": "" }, { "docid": "4a61d2e46658856c6bf6c486731673c0", "score": "0.46321416", "text": "function zg_ai_increase_elocution_stats($bot) {\n return zg_ai_goals_type([\n ['web request', 'equipment'],\n ['explode aides results'],\n ['filter aides results', 'elo'],\n ['filter aides results affordable'],\n ['purchase equipment'],\n ]);\n}", "title": "" }, { "docid": "d2f52b9c0f832720fe31b6195f3de6df", "score": "0.46179503", "text": "public function testUnlocked()\n {\n $this->app['config']->set('achievements.locked_sync', false);\n $this->assertEquals(0, $this->users[0]->achievements->count());\n $unlocked = AchievementDetails::getUnsyncedByAchiever($this->users[0])->get();\n $this->assertEquals(2, $unlocked->count());\n\n $this->users[0]->unlock($this->onePost);\n $this->users[0] = $this->users[0]->fresh();\n\n $unlocked = AchievementDetails::getUnsyncedByAchiever($this->users[0])->get();\n $this->assertEquals(1, $unlocked->count());\n\n /* Testing for sync enabled */\n $this->assertEquals(0, $this->users[1]->achievements->count());\n $this->app['config']->set('achievements.locked_sync', true);\n $this->users[1] = $this->users[1]->fresh();\n $this->assertEquals(2, $this->users[1]->achievements->count());\n }", "title": "" }, { "docid": "8c2bda8981e12b090a4746b724cf13ed", "score": "0.46138918", "text": "public function getAVGHeartZone4Xtimes($achievement)\n {\n $seconds = Rides::getAVGHeartZone4Xtimes(Auth::client()->user(), 5, $achievement->criteria_value);\n if ($seconds) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "ed830a67cc35f99791a53b2d187a840c", "score": "0.46104732", "text": "public function getPotentialOpponents() {\n\t\t\n\t\t$userID = $this->id;\n\t\t$level = $this->level;\n\t\t$agencySize = $this->agency_size;\n\t\t$minHealth = 25;\n\t\t\t\t\n\t\t// get up to 10 people to list on the attack list\n\t\t$attackListSize = 15;\n\t\t\n\t\t$maxAgencySize = $agencySize + 5;\n\t\t$minAgencySize = max(array(1, $agencySize - 5));\n\t\t\n\t\t// temporary solution for level range\n\t\t$minLevel = $level - 5 .'<br />';\n\t\t$maxLevel = $level + 5 .'<br />';\n\t\t\n/*\t\t$query = \"SELECT * FROM users,agencies WHERE (users.level <= ? AND users.level >= ? OR users.agency_size <= ? AND users.agency_size >= ?) AND (users.health > $minHealth AND users.level>3) AND (users.id != agencies.user_one_id AND users.id != agencies.user_two_id AND agencies.accepted =1) AND users.id != ? GROUP BY users.id ORDER BY RAND() LIMIT $attackListSize\";*/\n\n\t\t/*$query = \"SELECT * FROM users,agencies WHERE (users.level <= ? AND users.level >= ? OR users.agency_size <= ? AND users.agency_size >= ?) AND (users.health > $minHealth AND users.level>3) AND (users.id NOT IN (SELECT agencies.user_one_id FROM agencies WHERE agencies.user_two_id = $userID AND agencies.accepted =1)) AND (users.id NOT IN (SELECT agencies.user_two_id FROM agencies WHERE agencies.user_one_id = $userID AND agencies.accepted =1)) AND users.id != $userID GROUP BY users.id ORDER BY users.id LIMIT $attackListSize\";*/\n\t\t\n\t\t\n\t\t $query = \"SELECT * FROM users WHERE (users.level <= ? AND users.level >= ?) AND users.id != $userID GROUP BY users.id ORDER BY users.id LIMIT $attackListSize\";\n\t\t\n\t\t$objAllPotOpps = ConnectionFactory::SelectRowsAsClasses($query, array($maxLevel, $minLevel), __CLASS__);\n\t\t\t\t\n\t\tif (!$objAllPotOpps || count($objAllPotOpps) < $attackListSize) {\n\t\t\t// TODO: execute further queries with higher level or agency size ranges if too few users\n\t\t\t//the next lines is temp solution if there is 1<x<attacklistsize opponents\n\t\t\tif ($objAllPotOpps) return $objAllPotOpps;\n\t\t\telse return array();\n\t\t}\n\n\t\t// get random indices\n\t\t$randomIntegers = getRandomIntegers($attackListSize, count($objAllPotOpps));\n\t\t\n\t\t$opponents = array();\n\t\tforeach ($randomIntegers as $key=>$value) {\n\t\t\tarray_push($opponents, $objAllPotOpps[$key]);\n\t\t}\n\t\treturn $opponents;\n\t}", "title": "" }, { "docid": "321c2234295fc0cf6a379f3dd961228e", "score": "0.4607257", "text": "public function getAVGHeartZone5Xtimes($achievement)\n {\n $seconds = Rides::getAVGHeartZone5Xtimes(Auth::client()->user(), 20, $achievement->criteria_value);\n if ($seconds) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "8917fcd41a0177e63d4811cf7cadddd6", "score": "0.46066117", "text": "public function refreshModules ()\n\t{\n\n\t\t$modules = array();\n\n\t\tif ( $_SESSION[ __oSESSION_USER_PARAM__ ][ 'account' ][ 'allSet' ] && $this->hasAuthorised() )\n\t\t{\n\t\t\tif ( isset( $_SESSION[ __oSESSION_USER_PARAM__ ][ 'allowance' ][ 'discoversLimit' ] ) )\n\t\t\t{\n\t\t\t\t$modules[] = 'discover';\n\t\t\t}\n\t\t\tif ( isset( $_SESSION[ __oSESSION_USER_PARAM__ ][ 'allowance' ][ 'campaignsLimit' ] ) )\n\t\t\t{\n\t\t\t\t$modules[] = 'campaign';\n\t\t\t}\n\t\t\tglobal $freeCompanyModules;\n\t\t\tforeach ( $freeCompanyModules as $mod )\n\t\t\t{\n\t\t\t\t$modules[] = $mod;\n\t\t\t}\n\t\t\t$companyModules = $this->company->getModules();\n\t\t\tforeach ( $companyModules as $mod => $status )\n\t\t\t{\n\t\t\t\tif ( in_array( $mod, array(\n\t\t\t\t\t\t'admin',\n\t\t\t\t\t\t'reseller' ) ) )\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t$modules[] = $mod;\n\t\t\t}\n\t\t}\n\t\tif ( $_SESSION[ __oSESSION_USER_PARAM__ ][ 'representative' ] )\n\t\t{\n\t\t\tif ( $this->company->hasAccessTo( 'admin' ) )\n\t\t\t{\n\t\t\t\t$modules[] = 'admin';\n\t\t\t}\n\t\t\tif ( $this->company->hasAccessTo( 'reseller' ) )\n\t\t\t{\n\t\t\t\t$modules[] = 'reseller';\n\t\t\t}\n\t\t}\n\n\t\t$this->userInfo[ 'modules' ] = $modules;\n\n\t\treturn $modules;\n\t}", "title": "" }, { "docid": "b3322ea9b9a1cdefd75efdef2b9f3537", "score": "0.45987344", "text": "public function getHoursDuring2ndWeekOfJune($achievement)\n {\n $lap = Lap::getHoursDuring2ndWeekOfJune(Auth::client()->user()->id, $achievement->criteria_value);\n if ( !empty($lap) and $lap->total_hours>=$achievement->criteria_value) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "7dd290032d782bc727c23f396afc87ad", "score": "0.45968074", "text": "function ioLoadGameInfo($location, $gid)\n{\n global $res_games, $res_archive;\n\n $game = array();\n\n /* Load raw game data */\n if (($location == null || $location == 'opengames') && file_exists(\"$res_games/$gid\")) {\n $raw = file(\"$res_games/$gid\");\n $game['archived'] = 0;\n } else\n if (($location == null || $location == 'archive') && file_exists(\"$res_archive/$gid\")) {\n $raw = file(\"$res_archive/$gid\");\n $game['archived'] = 1;\n } else\n return null;\n /* NB: this is required since usort in loadInfos will destroy the index\n * key. Therefore each entry needs to know the game id. */\n $game['gid'] = $gid;\n\n /* Build time stamps */\n $aux = explode(' ', trim($raw[0]));\n $game['ts_start'] = mktime($aux[3], $aux[4], 0, $aux[1], $aux[2], $aux[0]);\n $game['ts_last'] = mktime($aux[8], $aux[9], 0, $aux[6], $aux[7], $aux[5]);\n\n /* Parse header */\n $hdr = explode(' ', trim($raw[1]));\n $game['white'] = $hdr[0];\n $game['black'] = $hdr[1];\n $game['curmove'] = $hdr[2];\n $game['curplyr'] = $hdr[3];\n $game['curstate'] = $hdr[4];\n\n return $game;\n}", "title": "" }, { "docid": "5e7fc766d99ed338b568853aeacd37c2", "score": "0.45904338", "text": "function freeze_gender_balance ()\n{\n // Extract the EventId and build the query\n\n $EventId = intval (trim ($_REQUEST['EventId']));\n if (0 == $EventId)\n return false;\n\n // Start by getting the maximum values for males, females and neutrals\n\n $sql = 'SELECT Title, MaxPlayersMale, MaxPlayersFemale, MaxPlayersNeutral';\n $sql .= ' FROM Events';\n $sql .= \" WHERE EventId=$EventId\";\n\n $result = mysql_query ($sql);\n if (! $result)\n return display_mysql_error ('Cannot query database');\n\n // We should have matched exactly one game\n\n if (1 != mysql_num_rows ($result))\n return display_error (\"Failed to find entry for EventId $EventId\");\n\n $row = mysql_fetch_object ($result);\n\n $Title = $row->Title;\n $MaxMale = $row->MaxPlayersMale;\n $MaxFemale = $row->MaxPlayersFemale;\n $MaxNeutral = $row->MaxPlayersNeutral;\n\n $max_signups = $MaxMale + $MaxFemale + $MaxNeutral;\n\n // Get the currnet count of males and females. There should only be\n // one run for this event...\n\n $sql = 'SELECT Signup.Gender, COUNT(Signup.Gender) AS Count';\n $sql .= ' FROM Signup, Runs';\n $sql .= \" WHERE Runs.EventId=$EventId\";\n $sql .= ' AND Signup.RunId=Runs.RunId';\n $sql .= ' AND Signup.State=\"Confirmed\"';\n $sql .= ' AND Signup.Counted=\"Y\"';\n $sql .= ' GROUP BY Gender';\n\n $result = mysql_query ($sql);\n if (! $result)\n return display_mysql_error ('Attempt to count confirmed signups for EventId $EventId Failed', $sql);\n\n $confirmed = array ();\n $confirmed['Male'] = 0;\n $confirmed['Female'] = 0;\n\n while ($row = mysql_fetch_object ($result))\n $confirmed[$row->Gender] = $row->Count;\n\n display_header ('Freeze Gender Balance');\n printf (\"<p>\\nThere are currently %d Male, %d Female and %d Neutral\\n\",\n\t $MaxMale, $MaxFemale, $MaxNeutral);\n echo \"roles for <i>$Title</i>\\n\";\n echo \"<p>\\nIf you freeze the gender balance, the neutral roles will be\\n\";\n echo \"changed to match the current balance of players signed up. If a\\n\";\n echo \"player withdraws from the game, this will force the website to\\n\";\n echo \"select the first player of the same gender on the waitlist instead\\n\";\n echo \"of simply the first player in line. You should consider doing this\\n\";\n echo \"after you've cast the game.\\n\";\n echo \"<p>\\nBased on the current list of players who have signed up for\\n\";\n echo \"<i>$Title</i>, there would be\\n\";\n printf (\"%d Male and %d Female roles, and no Neutral roles.\\n\",\n\t $confirmed['Male'],\n\t $confirmed['Female']);\n\n echo \"<p>\\n\";\n printf (\"Yes. <a href=Schedule.php?action=%d&EventId=%d&Male=%d&Female=%d>\" .\n\t \"Make the change</a>\\n\",\n\t SCHEDULE_CONFIRM_FREEZE_GENDER_BALANCE,\n\t $EventId,\n\t $confirmed['Male'],\n\t $confirmed['Female']);\n\n echo \"<p>\\n\";\n printf (\"No. <a href=Schedule.php?action=%d&EventId=%d>Return to \".\n\t \"<i>$Title</i></a>\\n\",\n\t SCHEDULE_SHOW_GAME,\n\t $EventId);\n}", "title": "" }, { "docid": "ea854434effa3c2cc35418badf45e53f", "score": "0.45834267", "text": "public function get_percentage_complete() {\n\t\t$args = $this->get_donation_argument( array( 'number' => - 1, 'output' => '' ) );\n\t\tif ( isset( $args['page'] ) ) {\n\t\t\tunset( $args['page'] );\n\t\t}\n\t\t$query = give_get_payments( $args );\n\t\t$total = count( $query );\n\t\t$percentage = 100;\n\t\tif ( $total > 0 ) {\n\t\t\t$percentage = ( ( 30 * $this->step ) / $total ) * 100;\n\t\t}\n\t\tif ( $percentage > 100 ) {\n\t\t\t$percentage = 100;\n\t\t}\n\n\t\treturn $percentage;\n\t}", "title": "" }, { "docid": "07376c311e7b4b05238a4482f95fe842", "score": "0.45746914", "text": "function ioLoadGame($gid, $uid)\n{\n global $res_games, $res_archive;\n\n $game = array();\n\n /* Load raw game data */\n if (file_exists(\"$res_games/$gid\")) {\n $raw = file(\"$res_games/$gid\");\n $game['archived'] = 0;\n } else\n if (file_exists(\"$res_archive/$gid\")) {\n $raw = file(\"$res_archive/$gid\");\n $game['archived'] = 1;\n } else\n return null;\n\n /* Build time stamps */\n $aux = explode(' ', trim($raw[0]));\n $game['ts_start'] = mktime($aux[3], $aux[4], 0, $aux[1], $aux[2], $aux[0]);\n $game['ts_last'] = mktime($aux[8], $aux[9], 0, $aux[6], $aux[7], $aux[5]);\n\n /* Parse header */\n $hdr = explode(' ', trim($raw[1]));\n $game['white'] = $hdr[0];\n $game['black'] = $hdr[1];\n $game['curmove'] = $hdr[2];\n $game['curplyr'] = $hdr[3];\n $game['curstate'] = $hdr[4];\n $game['wcs'] = $hdr[5];\n $game['wcl'] = $hdr[6];\n $game['bcs'] = $hdr[7];\n $game['bcl'] = $hdr[8];\n $game['w2spm'] = $hdr[9];\n $game['b2spm'] = $hdr[10];\n $game['lastmove'] = $hdr[11];\n $game['lastkill'] = $hdr[12];\n $game['oscf'] = $hdr[13];\n $game['olcf'] = $hdr[14];\n\n /* Fill chess board */\n $game['board'] = array('', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',\n '', '', '', '', '', '', '', '', '', '');\n $wcm = explode(' ', trim($raw[2]));\n foreach ($wcm as $cm)\n $game['board'][bc2i($cm[1] . $cm[2])] = 'w' . $cm[0];\n $bcm = explode(' ', trim($raw[3]));\n foreach ($bcm as $cm)\n $game['board'][bc2i($cm[1] . $cm[2])] = 'b' . $cm[0];\n\n /* Get move history */\n $list = array();\n for ($i = 1, $j = 0; $i <= $game['curmove']; $i++, $j += 2) {\n $moves = explode(' ', trim($raw[3 + $i]));\n if (count($moves) > 1)\n $list[$j] = $moves[1];\n else\n $list[$j] = '???';\n if (count($moves) > 2)\n $list[1 + $j] = $moves[2];\n else\n if ($i < $game['curmove'])\n $list[1 + $j] = '???';\n /* Note: Possibly missing move of black in current move\n * is not set '' or something to easily allow undo of move\n * via unset(). '' or even null would be counted as existing\n * list item. */\n }\n $game['mhistory'] = $list;\n\n /* Get chatter */\n $game['chatter'] = array();\n for ($i = 4 + $game['curmove'], $j = 0; $i < count($raw); $i++, $j++)\n $game['chatter'][$j] = trim($raw[$i]);\n\n /* Determine color and opponent */\n if ($uid == $game['black']) {\n $game['p_color'] = 'b';\n $game['p_opponent'] = $game['white'];\n } else\n if ($uid == $game['white']) {\n $game['p_color'] = 'w';\n $game['p_opponent'] = $game['black'];\n } else {\n $game['p_color'] = '';\n $game['p_opponent'] = '';\n }\n\n /* Check whether player may move/archive */\n $game['p_maymove'] = 0;\n $game['p_mayarchive'] = 0;\n if (($game['curplyr'] == 'w' && $uid == $game['white']) || ($game['curplyr'] ==\n 'b' && $uid == $game['black'])) {\n if ($game['curstate'] == '?' || $game['curstate'] == 'D')\n $game['p_maymove'] = 1;\n else\n if ($game['archived'] == 0)\n $game['p_mayarchive'] = 1;\n }\n\n /* Check whether player may abort */\n $game['p_mayabort'] = 0;\n if (!empty($game['p_color']) && $game['p_maymove'] == 0 && ($game['curstate'] ==\n 'D' || $game['curstate'] == '?')\n /*&& time() - $game['ts_last'] > 2419200 four weeks*/ && $game['archived'] == 0)\n $game['p_mayabort'] = 1;\n else\n if (!empty($game['p_color']) && $game['archived'] == 0 && $game['p_maymove'] ==\n 1 && (($game['p_color'] == 'w' && $game['curmove'] == 0) || ($game['p_color'] ==\n 'b' && $game['curmove'] == 1)))\n $game['p_mayabort'] = 1;\n\n $game['p_mayundo'] = 0;\n\n return $game;\n}", "title": "" }, { "docid": "bedd3ff3740bf826f3ca52f88d0b23a8", "score": "0.45706502", "text": "function get_abilities_with_prices(){\n $ability_tokens = func_get_args();\n if (empty($ability_tokens)){ return array(); }\n global $mmrpg_database_abilities, $raw_ability_prices;\n $ability_prices = array();\n foreach ($ability_tokens AS $ability_token){\n if (!isset($mmrpg_database_abilities[$ability_token])){ continue; }\n $ability_info = $mmrpg_database_abilities[$ability_token];\n if (isset($raw_ability_prices[$ability_token])){ $ability_info = array_merge($ability_info, $raw_ability_prices[$ability_token]); }\n $ability_price = 0;\n if (!empty($ability_info['ability_energy'])){ $ability_price = ceil($ability_info['ability_energy'] * MMRPG_SETTINGS_SHOP_ABILITY_PRICE); }\n else { $ability_price = MMRPG_SETTINGS_SHOP_ABILITY_PRICE; }\n if (empty($ability_price)){ continue; }\n $ability_prices[$ability_token] = $ability_price;\n }\n return $ability_prices;\n}", "title": "" }, { "docid": "d1a9fe4415fa72db8a28195bdb091413", "score": "0.45659333", "text": "Public Function LoadStats()\n\t{\n\t\t$this->Stats = new User_Stats($this->id);\n\t}", "title": "" }, { "docid": "0f1c971cdb528eb1064aa2ca6618d36f", "score": "0.45643982", "text": "function load_unlocker()\n{\n\t$res=mysql_query('SELECT * FROM '.DB_TABLE.' WHERE Status=1');\n\tif($res !== false && mysql_num_rows($res))\n\t{\n\t\t$unlocker_displayed=false;\n\t\twhile($row = mysql_fetch_assoc($res))\n\t\t{\n\t\t\tif($unlocker_displayed)\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$pages=explode(',',$row['Pages']);\n\t\t\tforeach($pages as $page)\n\t\t\t{\n\t\t\t\tlist($type, $id) = explode('_',$page);\n\t\t\t\t$id=intval($id);\n\t\t\t\tif($page == 'page_0')\n\t\t\t\t{\n\t\t\t\t\tif(is_home())\n\t\t\t\t\t{\n\t\t\t\t\t\techo stripslashes($row['Code']);\n\t\t\t\t\t\t$unlocker_displayed=true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif(($type == 'post' && is_single($id)) || ($type == 'page' && is_page($id)))\n\t\t\t\t{\n\t\t\t\t\techo stripslashes($row['Code']);\n\t\t\t\t\t$unlocker_displayed=true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}", "title": "" }, { "docid": "3675cbe340d342ad1197f844f6a0da07", "score": "0.45573744", "text": "public function getPercentLevel()\n { \n $experience_level = $this->getExperienceShortMax();\n\n $experience_current_level = $this->getExperienceShort();\n\n $percent = ($experience_current_level * 100)/$experience_level;\n\n return $percent;\n }", "title": "" }, { "docid": "0b96e0bb90bbf54a0770b4081a2f0ccb", "score": "0.45558396", "text": "function curstats()\n {\n global $db;\n\n //Add bonuses from equipment\n foreach ($this->equip as $arrEquip)\n\t{\n\t if ($arrEquip[0])\n\t {\n\t $this->stats['agility'][2] += ($arrEquip[5] * -1);\n\t }\n\t}\n if ($this->equip[1][0])\n\t{\n\t $this->stats['speed'][2] += $this->equip[1][7];\n\t}\n $arrStats = array('agility', 'strength', 'inteli', 'wisdom', 'speed', 'condition');\n //Add bonuses from rings\n if ($this->equip[9][2])\n\t{\n\t $arrRings = array(\"zręczności\", \"siły\", \"inteligencji\", \"woli\", \"szybkości\", \"kondycji\");\n\t $arrRingtype = explode(\" \", $this->equip[9][1]);\n\t $intAmount = count($arrRingtype) - 1;\n\t $intKey = array_search($arrRingtype[$intAmount], $arrRings);\n\t $this->stats[$arrStats[$intKey]][2] += $this->equip[9][2];\n\t}\n if ($this->equip[10][2])\n\t{\n\t $arrRings = array(\"zręczności\", \"siły\", \"inteligencji\", \"woli\", \"szybkości\", \"kondycji\");\n\t $arrRingtype = explode(\" \", $this->equip[10][1]);\n\t $intAmount = count($arrRingtype) - 1;\n\t $intKey = array_search($arrRingtype[$intAmount], $arrRings);\n\t $this->stats[$arrStats[$intKey]][2] += $this->equip[10][2];\n\t}\n //Add bonuses from bless\n $objBless = $db -> Execute(\"SELECT `bless`, `blessval` FROM `players` WHERE `id`=\".$this->id);\n if (in_array($objBless->fields['bless'], $arrStats))\n\t{\n\t $this->stats[$objBless->fields['bless']][2] += $objBless->fields['blessval'];\n\t}\n $objBless->Close();\n //Add bonuses\n foreach ($arrStats as $strStat)\n\t{\n\t $this->stats[$strStat][2] += $this->checkbonus($strStat);\n\t}\n }", "title": "" }, { "docid": "c7f6089241ded412f01ebb0e429abe0a", "score": "0.45459", "text": "function pum_get_completed_upgrades() {\n\treturn PUM_Utils_Upgrades::instance()->get_completed_upgrades();\n}", "title": "" }, { "docid": "968b25277813b94f0ae36d9967a81bf3", "score": "0.45419562", "text": "public function getUserAchievements($user, $types = []);", "title": "" }, { "docid": "4bb34f99f91de46db63bd243c140ba3a", "score": "0.45395795", "text": "function xstats_displayMaxValueShipVSShip($gameId) {\n echo( \"<H3>Spitzenwerte im Spiel</H3>\");\n $statsAvailablePlayerIndicies = xstats_getAvailablePlayerIndicies($gameId);\n $statsMaxTurn = xstats_getMaxTurn($gameId);\n echo( xstats_displayMaxSum( $gameId, 'battlecount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxSum( $gameId, 'battlewoncount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n echo( xstats_displayMaxSum( $gameId, 'battlecount-battlewoncount', $statsMaxTurn, $statsAvailablePlayerIndicies ) );\n}", "title": "" }, { "docid": "970fedea7f8300395588ce3a1bce2acb", "score": "0.453699", "text": "public function globalActivityStats(): array {\n if (($stats = $this->cache->get_value('stats_users')) === false) {\n $this->db->prepared_query(\"\n SELECT\n sum(ula.last_access > now() - INTERVAL 1 DAY) AS Day,\n sum(ula.last_access > now() - INTERVAL 1 WEEK) AS Week,\n sum(ula.last_access > now() - INTERVAL 1 MONTH) AS Month\n FROM users_main um\n INNER JOIN user_last_access AS ula ON (ula.user_id = um.ID)\n WHERE um.Enabled = '1'\n AND ula.last_access > now() - INTERVAL 1 MONTH\n \");\n $stats = $this->db->next_record(MYSQLI_ASSOC);\n $this->cache->cache_value('stats_users', $stats, 7200);\n }\n return $stats;\n }", "title": "" }, { "docid": "caf71a20bab49814f54ea6c67055b52b", "score": "0.4536749", "text": "public function getHoursDuringMonthX($achievement)\n {\n $lap = Lap::getHoursDuringMonthX(Auth::client()->user()->id, $achievement->criteria_value);\n if ( !empty($lap) ) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "8bf80ca405b1998b23c23bfa4233c217", "score": "0.45358056", "text": "static function get_paid_purchases_percent(){\r\n\t\t\r\n\t\tif(self::get_all() <= 0 ){\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn ( self::get_paid() / self::get_all() );\r\n\t}", "title": "" }, { "docid": "1b0f50ad251b9df65e156c065c872f66", "score": "0.45322293", "text": "function combatRound( &$attackingGroup, &$defendingGroup) {\n\t\techo \"Hits: \"; // hit raport\n\t\tfor( $i=0; $i < $attackingGroup['members']; $i++) {\n\t\t\t$defendingMember = mt_rand(0,$defendingGroup['members']-1);\n\t\t\tcalculateIndividualAttack( $attackingGroup, $i, $defendingGroup, $defendingMember);\n\t\t\tif( $defendingGroup['members'] <= 0)\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "b46afcd7ddafc248deb8084c920c8c8b", "score": "0.4532098", "text": "public function getIptPercent();", "title": "" }, { "docid": "1bc30f33af2ec88c7742e9ca3c51ec94", "score": "0.452982", "text": "function _getAvailableSystemaccounts($scenario_id){\r\n // remove all model associations except Systemuser \r\n $this->Scenario->unbindModel(\r\n array(\r\n 'hasMany'=>array('Resource', 'Script', 'Parameter', 'Parameterset'),\r\n 'hasAndBelongsToMany' => array('Skill')\r\n )\r\n );\r\n $this->Scenario->id = $scenario_id;\r\n $this->Scenario->recursive = 1;\r\n $maxPlayers = $this->Scenario->read(null, $scenario_id);\r\n// $maxPlayers = Set::combine($maxPlayers['Systemaccount'], '{n}.id', '{n}.player_id');\r\n $available = array();\r\n foreach($maxPlayers['Systemaccount'] as $precompiled){\r\n if ($precompiled['player_id'] == 0){ // this one is currently not used by a player\r\n $info = array(\r\n 'user' => $precompiled['name'],\r\n 'passwd' => $precompiled['passwd_clear'],\r\n 'id' => $precompiled['id']\r\n );\r\n array_push($available, $info); // add its id to list of possible systemaccounts\r\n }\r\n }\r\n return ($available);\r\n\r\n }", "title": "" }, { "docid": "3126a89e967d3d5969107b9350cfa5d4", "score": "0.4518881", "text": "function chess_ratings_num_provisional_games()\n{\n\t$rating_system = chess_moduleConfig('rating_system');\n\n\tif ($rating_system == 'none') {\n\t\treturn 0;\n\t}\n\n\t// determine function for getting number of provisional games using configured rating system\n\t$file = XOOPS_ROOT_PATH . \"/modules/chess/include/ratings_{$rating_system}.inc.php\";\n\tfile_exists($file) or trigger_error(\"missing file '$file' for rating system '$rating_system'\", E_USER_ERROR);\n\trequire_once $file;\n\t$func = \"chess_ratings_num_provisional_games_{$rating_system}\";\n\tfunction_exists($func) or trigger_error(\"missing function '$func' for rating system '$rating_system'\", E_USER_ERROR);\n\n\treturn $func();\n}", "title": "" }, { "docid": "32f44acdc48349c6320a09eeab866e9f", "score": "0.45185268", "text": "public function getUserStatsForGame($steamid, $app_id) { \r\n $this->createRequest('get', \"/ISteamUserStats/GetUserStatsForGame/v0002\", array(\r\n 'steamid' => $steamid,\r\n 'appid' => $app_id,\r\n 'format' => 'json'\r\n ));\r\n }", "title": "" }, { "docid": "ca0e92642c0de2f5dff69b0965787ad5", "score": "0.4513071", "text": "public function climbTotalElelvation($achievement)\n {\n $lap = Lap::getSumElevation(Auth::client()->user()->id);\n if ( $lap->elevation >= $achievement->criteria_value ) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "d0f256e64672fd5b75024bf1c1376595", "score": "0.45065194", "text": "public function getNextLevelPercent() {\n\t\treturn round((($this->experience - $this->getCurrentLevelExp()) / ($this->getNextLevelExp() - $this->getCurrentLevelExp())) * 100);\n\t}", "title": "" }, { "docid": "b14014b227fd8000e69e0777718e2753", "score": "0.45037207", "text": "public function getAwardedBadgeLevels()\n {\n return $this->awarded_badge_levels;\n }", "title": "" }, { "docid": "7e53d215ee926e7ea039aaf8536f3415", "score": "0.45035806", "text": "public function getFreePercentage();", "title": "" }, { "docid": "be2f3e0da728c88f832440561b76e19c", "score": "0.4489869", "text": "function getGames() {\n\treturn json_decode(file_get_contents(\"data/games.json\"), true);\n}", "title": "" }, { "docid": "4088bc67fc23d2bbab5bbf7ef0d13e46", "score": "0.44831508", "text": "public function rideTotalTwiceMilesWeekend($achievement)\n {\n $lap = Lap::getMaxDistanceTwiceInWeekend(Auth::client()->user()->id,$achievement->criteria_value);\n if (count($lap)>0 ) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "2a76db0e36a03a6a99f5bdbd59e8c72f", "score": "0.44705898", "text": "public function complete(Request $request, $userId)\n {\n $completedBadgeIds = BadgeUser::where(['user_id' => $userId, 'completed' => true])->pluck('badge_id')->all();\n $badges = Badge::whereNotIn('id', $completedBadgeIds)->get(['id', 'name']);\n\n foreach ($badges as $badge) {\n switch ($badge->name) {\n case 'Igra brez napake':\n $count = Answer::where(['user_id' => $userId, 'success' => true])\n ->select(DB::raw('COUNT(*) AS total'))\n ->groupBy('game_id')\n ->having('total', '=', 24)\n ->get()\n ->count();\n if ($count > 0) {\n BadgeUser::where(['badge_id' => $badge->id, 'user_id' => $userId])\n ->update(['completed' => true]);\n }\n break;\n case 'Igra s 50% točnostjo':\n $userGameIds = GameUser::where(['user_id' => $userId, 'finished' => true])\n ->pluck('game_id')\n ->all();\n $count = Answer::whereIn('game_id', $userGameIds)\n ->where(['user_id' => $userId, 'success' => true])\n ->select('game_id', DB::raw('COUNT(*) AS total'))\n ->groupBy('game_id')\n ->having('total', '>=', 12)\n ->get()\n ->count();\n if ($count > 0) {\n BadgeUser::where(['badge_id' => $badge->id, 'user_id' => $userId])\n ->update(['completed' => true]);\n }\n break;\n case 'Igra končana v 25 minutah':\n $userGameIds = GameUser::where(['user_id' => $userId, 'finished' => true])\n ->pluck('game_id')\n ->all();\n $count = Answer::whereIn('game_id', $userGameIds)\n ->where(['user_id' => $userId])\n ->select(DB::raw('SUM(time) AS total'))\n ->groupBy('game_id')\n ->having('total', '<=', 1000 * 60 * 25)\n ->get()\n ->count();\n if ($count > 0) {\n BadgeUser::where(['badge_id' => $badge->id, 'user_id' => $userId])\n ->update(['completed' => true]);\n }\n break;\n case 'Dokončana igra 3 dni zapored':\n if ($this->hasFinishedGame($userId, 2)) {\n BadgeUser::where(['badge_id' => $badge->id, 'user_id' => $userId])\n ->update(['completed' => true]);\n }\n break;\n case 'Dokončana igra 7 dni zapored':\n if ($this->hasFinishedGame($userId, 6)) {\n BadgeUser::where(['badge_id' => $badge->id, 'user_id' => $userId])\n ->update(['completed' => true]);\n }\n break;\n case 'Dokončana igra z vsemi različnimi inštrumenti':\n $count = GameUser::where(['user_id' => $userId, 'finished' => true])\n ->select(DB::raw('COUNT(*)'))\n ->groupBy('instrument')\n ->get()\n ->count();\n if ($count === 5) {\n BadgeUser::where(['badge_id' => $badge->id, 'user_id' => $userId])\n ->update(['completed' => true]);\n }\n break;\n case 'Zmaga v večigralski igri':\n $userGameIds = GameUser::where(['user_id' => $userId])\n ->pluck('game_id')\n ->all();\n $gameIds = Game::whereIn('id', $userGameIds)\n ->whereMode('multi')\n ->pluck('id')\n ->all();\n foreach ($gameIds as $gameId) {\n $userIds = GameUser::where(['game_id' => $gameId])\n ->orderBy('points', 'desc')\n ->pluck('user_id')\n ->all();\n if ($userIds[0] == $userId) {\n BadgeUser::where(['badge_id' => $badge->id, 'user_id' => $userId])\n ->update(['completed' => true]);\n break;\n }\n }\n break;\n }\n }\n\n return response()->json([], 204);\n }", "title": "" }, { "docid": "44c6502da995cc5d04032db1f7fc25eb", "score": "0.44682473", "text": "function updatePercentages($userWpm)\r\n{\r\n global $halfMaxWpm, $percentageArray;\r\n\r\n // if the user is between beginner and average\r\n // update the easy and intermediate values\r\n // by using intermediate as reference\r\n if($userWpm <= $halfMaxWpm)\r\n {\r\n // f(x) = 20% + (55%/(total/2))x\r\n $newIntermediate = 0.20 + (0.55/$halfMaxWpm)*$userWpm;\r\n $delta = $newIntermediate - $percentageArray[2];\r\n\r\n $percentageArray[2] = $newIntermediate;\r\n $percentageArray[1] -= $delta;\r\n }\r\n else\r\n {\r\n updatePercentages($halfMaxWpm); // resets to the desired default conf\r\n\r\n // f(x) = 5% + (x/(total/2) - 1)*65%\r\n $newHard = 0.05 + ($userWpm/$halfMaxWpm - 1)*0.65;\r\n $delta = $newHard - $percentageArray[3];\r\n\r\n $percentageArray[3] = $newHard;\r\n $percentageArray[2] -= $delta;\r\n }\r\n}", "title": "" }, { "docid": "38e01b00b407000e2fa8f937b929239a", "score": "0.4465829", "text": "function callByCounter($line, $rightanswers, $wronganswers, $rightanswersstreak)\n {\n // Go through the achievement array and check which counter has to be checked\n for ($c = 0; $c < count($this->achieve_array[0]); $c++) {\n // if achievement already got, no need to check at all\n if ($this->achieve_array[5][$c] == false) {\n // achievements for just reaching a question\n if (($this->achieve_array[3][$c] == 'rightanswers' and intval($this->achieve_array[4][$c]) == $rightanswers)\n // check achievements for collected wrong answers\n or ($this->achieve_array[3][$c] == 'wronganswers' and intval($this->achieve_array[4][$c]) == $wronganswers)\n // achievements for right answers streak\n or ($this->achieve_array[3][$c] == 'rightanswersstreak' and intval($this->achieve_array[4][$c]) == $rightanswersstreak)\n // achievements for special questions answered right\n or ($this->achieve_array[3][$c] == 'lineright' and intval($this->achieve_array[4][$c]) == $line and $this->last_evaluation)) {\n\n // Append filenames of achievements with description which have been unlocked to our array\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][$c])] = $this->achieve_array[2][$c];\n $this->last_achievement = $this->achieve_array[0][$c];\n // mark as achieved in main array\n $this->achieve_array[5][$c] = true;\n $this->achievementCounter++;\n }\n // Run through the line part 2 times, some lines have 2 achievements\n if ($this->achieve_array[3][$c] == 'line' and (intval($this->achieve_array[4][$c]) == $line) and ($this->achieve_array[5][$c] == false)) {\n // Append filenames and text of achievements which have been unlocked to our array\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][$c])] = $this->achieve_array[2][$c];\n $this->last_achievement = $this->achieve_array[0][$c];\n // mark as achieved in main array\n $this->achieve_array[5][$c] = true;\n $this->achievementCounter++;\n for ($k = 0; $k < count($this->achieve_array[0]); $k++) {\n if ($this->achieve_array[3][$c] == 'line' and (intval($this->achieve_array[4][$c]) == $line) and ($this->achieve_array[5][$c] == false)) {\n // Append filenames and text of achievements which have been unlocked to our array\n $this->achievementsToDisplay[$this->generateFilename($this->achieve_array[0][$c])] = $this->achieve_array[2][$c];\n $this->last_achievement = $this->achieve_array[0][$c];\n // mark as achieved in main array\n $this->achieve_array[5][$c] = true;\n $this->achievementCounter++;\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "0dc6f4ab279a50edb2188ba07577a37a", "score": "0.4464041", "text": "function GetAdminBadge($profile_user) {\n $ret = array();\n $AddBadge = function($name) use (&$ret) {\n $ret[] = array(\n \"name\" => $name,\n \"class\" => \"badge\"\n );\n };\n $AddBadgeImage = function($src) use (&$ret) {\n $ret[] = array(\n \"src\" => $src,\n \"class\" => \"badge\"\n );\n };\n if ($profile_user['Usermode'] == -1) {\n $AddBadge(\"Banned\");\n return $ret;\n } else if ($profile_user['Usermode'] == 0) {\n return $ret;\n }\n if (mb_strpos($profile_user['Permissions'], 'A') !== FALSE) $AddBadgeImage(\"/images/site_admin.gif\");\n if (mb_strpos($profile_user['Permissions'], 'R') !== FALSE) $AddBadge(\"Forums Moderator\");\n if (mb_strpos($profile_user['Permissions'], 'G') !== FALSE) $AddBadgeImage(\"/images/gallery_admin.gif\");\n if (mb_strpos($profile_user['Permissions'], 'F') !== FALSE) $AddBadgeImage(\"/images/fics_admin.gif\");\n if (mb_strpos($profile_user['Permissions'], 'O') !== FALSE) $AddBadge(\"Oekaki Administrator\");\n if (mb_strpos($profile_user['Permissions'], 'I') !== FALSE) $AddBadgeImage(\"/images/irc_admin.gif\");\n if (mb_strpos($profile_user['Permissions'], 'M') !== FALSE) $AddBadge(\"Minecraft Moderator\");\n if (isset($profile_user['GalleryPermissions']) && mb_strpos($profile_user['GalleryPermissions'], 'C') !== FALSE) $AddBadge(\"Gallery Contributor\");\n if (startsWith($profile_user['UserName'], IMPORTED_ACCOUNT_USERNAME_PREFIX)) $AddBadge(\"Inactive User\");\n if (sizeof($ret) == 0) $AddBadge(\"User\");\n return $ret;\n}", "title": "" }, { "docid": "745a3c6bdc84e1fad8c6b1a0e4019937", "score": "0.4463887", "text": "function scorm_grade_user($scorm, $userid, $time=false) {\n // and so whatgrade and grademethod are combined in grademethod 10s are whatgrade\n // and 1s are grademethod\n $whatgrade = intval($scorm->grademethod / 10);\n\n // insure we dont grade user beyond $scorm->maxattempt settings\n $lastattempt = scorm_get_last_attempt($scorm->id, $userid);\n if($scorm->maxattempt != 0 && $lastattempt >= $scorm->maxattempt){\n $lastattempt = $scorm->maxattempt;\n }\n\n switch ($whatgrade) {\n case FIRSTATTEMPT:\n return scorm_grade_user_attempt($scorm, $userid, 1, $time);\n break;\n case LASTATTEMPT:\n return scorm_grade_user_attempt($scorm, $userid, scorm_get_last_attempt($scorm->id, $userid), $time);\n break;\n case HIGHESTATTEMPT:\n $maxscore = 0;\n $attempttime = 0;\n for ($attempt = 1; $attempt <= $lastattempt; $attempt++) {\n $attemptscore = scorm_grade_user_attempt($scorm, $userid, $attempt, $time);\n if ($time) {\n if ($attemptscore->score > $maxscore) {\n $maxscore = $attemptscore->score;\n $attempttime = $attemptscore->time;\n }\n } else {\n $maxscore = $attemptscore > $maxscore ? $attemptscore: $maxscore;\n }\n }\n if ($time) {\n $result = new stdClass();\n $result->score = $maxscore;\n $result->time = $attempttime;\n return $result;\n } else {\n return $maxscore;\n }\n break;\n case AVERAGEATTEMPT:\n $lastattempt = scorm_get_last_attempt($scorm->id, $userid);\n $sumscore = 0;\n for ($attempt = 1; $attempt <= $lastattempt; $attempt++) {\n $attemptscore = scorm_grade_user_attempt($scorm, $userid, $attempt, $time);\n if ($time) {\n $sumscore += $attemptscore->score;\n } else {\n $sumscore += $attemptscore;\n }\n }\n\n if ($lastattempt > 0) {\n $score = $sumscore / $lastattempt;\n } else {\n $score = 0;\n }\n\n if ($time) {\n $result = new stdClass();\n $result->score = $score;\n $result->time = $attemptscore->time;\n return $result;\n } else {\n return $score;\n }\n break;\n }\n}", "title": "" }, { "docid": "86bb29552e223ff09c13b7cb7d5ae10f", "score": "0.4463252", "text": "function getAllChallengesStats() {\n if(\n is_object(\n $oStmt = DB::$PDO->query(\n 'SELECT\n c.id,\n c.name,\n IFNULL(SUM(a.passed),0) passed,\n IFNULL(SUM(NOT a.passed),0) failed,\n IFNULL(SUM(a.executed),0) total\n FROM\n challenges c\n LEFT JOIN\n attempts a\n ON\n (a.challenge_id=c.id)\n WHERE\n c.active\n GROUP BY\n 1, 2\n ORDER BY\n 1'\n )\n )\n ){\n $aStats = Array();\n while($aStat = $oStmt->fetch(PDO::FETCH_ASSOC)) $aReturn[$aStat['id']] = $aStat;\n return $aReturn;\n }\n}", "title": "" }, { "docid": "0473f9579031f19bb980a526e36f7a2a", "score": "0.445756", "text": "private function getActualRank(&$allUsersHash)\n {\n\n /**\n * First calculate opponents strengths and add to hash mpa\n */\n\n foreach ($allUsersHash as $userName => $stats)\n {\n $userName;\n $opponentsArray = $stats['opponents'];\n\n $cnt = 0;\n $sum = 0;\n foreach ($opponentsArray as $key=>$opponents)\n {\n $cnt++;\n $sum += $allUsersHash[ $opponents ]['winning'];\n }\n $allUsersHash[$userName]['strength'] = $sum / $cnt;\n $allUsersHash[$userName]['rank'] = $sum / $cnt;\n }\n\n /***\n * Rank comes from winning * stength\n *\n */\n\n }", "title": "" }, { "docid": "3538959204bb41fdbad2d01bb57a6231", "score": "0.44515696", "text": "public function loadLevelProgress() {\n\t\tswitch(true){\n\t\t\tcase ($this->data['level_pts'] >= 5000):\n\t\t\t\t$progress = $this->data['level_pts'] % 1000;\n\t\t\t\t$progress = floor($progress / 10);\n\t\t\t\tbreak;\n\t\t\tcase ($this->data['level_pts'] >= 1000):\n\t\t\t\t$progress = $this->data['level_pts'] % 500;\n\t\t\t\t$progress = floor($progress / 5);\n\t\t\t\tbreak;\n\t\t\tcase ($this->data['level_pts'] >= 600):\n\t\t\t\t$progress = $this->data['level_pts'] % 600;\n\t\t\t\t$progress = floor($progress / 4);\n\t\t\t\tbreak;\n\t\t\tcase ($this->data['level_pts'] >= 300):\n\t\t\t\t$progress = $this->data['level_pts'] % 300;\n\t\t\t\t$progress = floor($progress / 3);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$progress = floor($this->data['level_pts'] / 3);\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn $progress;\n\t}", "title": "" }, { "docid": "0268f10f35bc7d042261973addf6c7c0", "score": "0.44462293", "text": "public function getShootingPercentAttribute()\n {\n return $this->ratio($this->goals, $this->shots) * 100;\n }", "title": "" }, { "docid": "7f1c67fb4fdc6486c7f4d38870710e66", "score": "0.4442973", "text": "public function getItemsPercentages()\n {\n \treturn StatisticsService::getItemsByTypes();\n }", "title": "" }, { "docid": "9ba25e379ea4684d535ac84333c88542", "score": "0.44404435", "text": "function _mollom_calc_statistics($mode = 'nominal') {\r\n\t// Generate local statistics\r\n\t$count_nominal = array(\r\n\t\t'spam' => get_option('mollom_spam_count'),\r\n\t\t'ham' => get_option('mollom_ham_count'),\r\n\t\t'unsure' => get_option('mollom_unsure_count')\r\n\t);\r\n\t\r\n\t$total_count = 0;\r\n\tforeach($count_nominal as $count) {\r\n\t\t$total_count += $count;\r\n\t}\r\n\t\r\n\t$count_nominal['moderated'] = get_option('mollom_count_moderated');\r\n\t\r\n\t$count_percentage = array();\t\r\n\tforeach($count_nominal as $key => $count) {\r\n\t\tif ($total_count != 0) {\r\n\t\t\t$count_percentage[$key] = round(($count / $total_count * 100), 2);\r\n\t\t} else {\r\n\t\t\t$count_percentage[$key] = 0;\r\n\t\t}\r\n\t}\r\n\t\r\n\tswitch ($mode) {\r\n\t\tdefault:\r\n\t\tcase 'nominal':\r\n\t\t\t$count_nominal['total'] = $total_count;\r\n\t\t\treturn $count_nominal;\r\n\t\t\tbreak;\r\n\t\tcase 'percentage':\r\n\t\t\t$count_percentage['total'] = $total_count;\r\n\t\t\treturn $count_percentage;\r\n\t\t\tbreak;\r\n\t}\r\n}", "title": "" }, { "docid": "84a055d4391694bbb2b04bd8e595ffd6", "score": "0.44361657", "text": "public function completeRideLeast30minEntireMonth($achievement)\n {\n $rides = Rides::completeRideLeast30minEntireMonth(Auth::client()->user()->id,$achievement->criteria_value);\n if ( count($rides)>0) {\n $this->createAchievement($achievement);\n }\n }", "title": "" }, { "docid": "af9cbb70dc9de7f2f74278dff86db851", "score": "0.44348356", "text": "public function updateAchievementProgress($achievementList, $userModel) {\n // Creating an array to fill it later in the datalayer\n $userAchievementModel = array();\n\n // Filling the array\n $userAchievementModel = $this->AchievementDB->getAchievementsUserByIds($userModel, $achievementList, $userAchievementModel, 0);\n\n // Looping through the achievements and setting the progress\n foreach ($userAchievementModel as $uaModel) {\n $uaModel->setAchievementProgress($userModel->getPoints());\n }\n\n // Updating the achievement progress in the database\n $this->AchievementDB->updateAchievementProgress($userAchievementModel);\n }", "title": "" }, { "docid": "160b0b133f49add3befdea8d2c8456aa", "score": "0.44290638", "text": "public function index()\n {\n $achievements = Achievement::all();\n\n return view('admin.pages.achievements',compact('achievements'));\n }", "title": "" }, { "docid": "46c71a9fe844e9ada83a2dbaa44a8ac9", "score": "0.44230127", "text": "public function getPot($game_id)\n {\n return DB::table('players')->where(['game_id' => $game_id])->sum('bid');\n }", "title": "" }, { "docid": "9be19d842e6778b97dc06f22453d0ed2", "score": "0.44220945", "text": "function getUserBadges($userObj){\n\t if (isset($_SESSION[\"TOKEN\"])) {\n\n\t }\n }", "title": "" }, { "docid": "58cfa70f19739481f52037dd786c6866", "score": "0.4411039", "text": "public function getAvailableOptions($gameId, $playerId);", "title": "" }, { "docid": "fa456ad63958ec9b39d2a135492b8f0b", "score": "0.44104964", "text": "public function update_variables(){\n\n // Calculate this battle's count variables\n $perside_max = 0;\n if (!empty($this->values['players'])){\n foreach ($this->values['players'] AS $id => $player){\n $max = $player['counters']['robots_total'];\n if ($max > $perside_max){ $perside_max = $max; }\n }\n }\n $this->counters['robots_perside_max'] = $perside_max;\n\n // Define whether we're allowed to use experience or not\n $this->flags['allow_experience_points'] = true;\n if (!empty($this->flags['player_battle'])\n || !empty($this->flags['challenge_battle'])){\n $this->flags['allow_experience_points'] = false;\n }\n\n // Return true on success\n return true;\n\n }", "title": "" }, { "docid": "79a36ae368036fd4cbc2f6bd1f0db477", "score": "0.44075137", "text": "function scorm_get_grade_method_array(){\n return array (GRADESCOES => get_string('gradescoes', 'scorm'),\n GRADEHIGHEST => get_string('gradehighest', 'scorm'),\n GRADEAVERAGE => get_string('gradeaverage', 'scorm'),\n GRADESUM => get_string('gradesum', 'scorm'));\n}", "title": "" }, { "docid": "4f48d4a27094b8951a93644331128d95", "score": "0.4404246", "text": "public static function getRAPHPFrameworkAverageLoading ();", "title": "" }, { "docid": "139d0c61fd411470c4e9b5472e566c44", "score": "0.44041747", "text": "public function getAwardedBadges()\n {\n return $this->awarded_badges;\n }", "title": "" }, { "docid": "ab105581ccbdcb5e43db0017ae1fd318", "score": "0.4403953", "text": "function decrementIncompleteGames() {\n global $userId, $user, $difficultyId;\n\n if (isset($userId) && isset($difficultyId)) { // Makes calls to user class methods\n\n $user->decrementIncompleteGames($userId, $difficultyId);\n }\n}", "title": "" }, { "docid": "8416b5b682db59529ed0e09ce76c98a4", "score": "0.44036114", "text": "function execTurnPercent($desiredPercent)\n{\n log1(\"Executing execTurnPercent\");\n $output = execute(BACKEND_SCRIPT. ' -getAngle');\n if($output == ERROR_COMMON) {\n echo ERROR_COMMON;\n return ERROR_COMMON;\n }\n $parts = explode(\"|\", $output);\n $angle = ($parts[1] - $parts[0]) / 100 * $desiredPercent;\n log1($angle);\n return execTurn($angle);\n}", "title": "" }, { "docid": "5de1b7e6ae459db036eae9945d3ce17c", "score": "0.4399933", "text": "function bonuses_from_abilities()\n{\n global $special_ability;\n global $separate_ability;\n\n $ability_num = 0;\n for ($c = 0; $c < 5; $c++) {\n\tfor ($n = 0; $n < 40; $n++) {\n\t if ($special_ability[$c][$n]) {\n\t\t$special = strtok($special_ability[$c][$n], ',');\n\t\twhile ($special !== false) {\n\t\t // echo \"<pre>\\$separate_ability[$c][$ability_num] = \" . trim($special) . \"</pre>\\n\";\n\t\t $separate_ability[$c][$ability_num] = trim($special);\n\t\t $name = $separate_ability[$c][$ability_num];\n\t\t if (!empty($name)) {\n\t\t\t$query = \"SELECT * FROM `special_abilities` WHERE `name` = '\" . addslashes($name) . \"'\";\n\t\t\t$ability_result = issue_query($query);\n\t\t\tif ($ability_row = $ability_result->fetchRow(DB_FETCHMODE_ASSOC)) {\n\t\t\t // add any skill mods here\n\t\t\t if ($ability_row[modifiers] != \"\") {\n\t\t\t\tassign_bonuses($ability_row[modifiers]);\n\t\t\t }\n\t\t\t}\n\t\t }\n\t\t $ability_num++;\n\t\t $special = strtok(',');\n\t\t}\n\t }\n\t}\n }\n}", "title": "" }, { "docid": "98a9b056a0567bac290d16cabeed9312", "score": "0.43938598", "text": "function progress_attempts($modules, $events, $userid, $course) {\n global $DB;\n $attempts = array();\n $modernlogging = false;\n $cachingused = false;\n\n // Get readers for 2.7 onwards.\n if (function_exists('get_log_manager')) {\n $modernlogging = true;\n $logmanager = get_log_manager();\n $readers = $logmanager->get_readers();\n $numreaders = count($readers);\n }\n\n foreach ($events as $event) {\n $module = $modules[$event['type']];\n $uniqueid = $event['type'].$event['id'];\n $parameters = array('courseid' => $course, 'courseid1' => $course,\n 'userid' => $userid, 'userid1' => $userid,\n 'eventid' => $event['id'], 'eventid1' => $event['id'],\n 'cmid' => $event['cm']->id, 'cmid1' => $event['cm']->id,\n );\n // print_object($module['actions']);\n // Check for passing grades as unattempted, passed or failed\n if (isset($module['actions']['passed'])) {\n $query = $module['actions']['passed'];\n $graderesult = $DB->get_record_sql($query, $parameters);\n if ($graderesult === false || $graderesult->finalgrade === null) {\n $attempts[$uniqueid] = false;\n } else {\n $attempts[$uniqueid] = $graderesult->finalgrade >= $graderesult->gradepass ? true : 'failed';\n }\n }\n\n // Checked view actions in the log table/store/cache.\n // else if (isset($config->{'action_'.$uniqueid}) && $config->{'action_'.$uniqueid} == 'viewed') {\n // $attempts[$uniqueid] = false;\n\n // // Check if the value is cached.\n // if ($cachingused && array_key_exists($uniqueid, $cachedlogviews) && $cachedlogviews[$uniqueid]) {\n // $attempts[$uniqueid] = true;\n // }\n\n // // Check in the logs.\n // else {\n // if ($modernlogging) {\n // foreach ($readers as $logstore => $reader) {\n // if ($reader instanceof logstore_legacy\\log\\store) {\n // $query = $module['actions']['viewed']['logstore_legacy'];\n // }\n // else if ($reader instanceof \\core\\log\\sql_internal_reader) {\n // $logtable = '{'.$reader->get_internal_log_table_name().'}';\n // $query = preg_replace('/\\{log\\}/', $logtable, $module['actions']['viewed']['sql_internal_reader']);\n // }\n // $attempts[$uniqueid] = $DB->record_exists_sql($query, $parameters) ? true : false;\n // if ($attempts[$uniqueid]) {\n // $cachedlogviews[$uniqueid] = true;\n // $cachedlogsupdated = true;\n // break;\n // }\n // }\n // } else {\n // $query = $module['actions']['viewed']['logstore_legacy'];\n // $attempts[$uniqueid] = $DB->record_exists_sql($query, $parameters) ? true : false;\n // if ($cachingused && $attempts[$uniqueid]) {\n // $cachedlogviews[$uniqueid] = true;\n // $cachedlogsupdated = true;\n // }\n // }\n // }\n // } else {\n\n // // If activity completion is used, check completions table.\n // if (isset($config->{'action_'.$uniqueid}) && $config->{'action_'.$uniqueid} == 'activity_completion') {\n // $query = 'SELECT id\n // FROM {course_modules_completion}\n // WHERE userid = :userid\n // AND coursemoduleid = :cmid\n // AND completionstate >= 1';\n // }\n\n // // Determine the set action and develop a query.\n // else {\n // $action = isset($config->{'action_'.$uniqueid})?\n // $config->{'action_'.$uniqueid}:\n // $module['defaultAction'];\n // $query = $module['actions'][$action];\n // }\n\n // // Check if the user has attempted the module.\n // $attempts[$uniqueid] = $DB->record_exists_sql($query, $parameters) ? true : false;\n // }\n }\n\n // Update log cache if new values were added.\n if ($cachingused && $cachedlogsupdated) {\n $cachedlogs->set($userid, $cachedlogviews);\n }\n\n return $attempts;\n}", "title": "" }, { "docid": "d33fd12124c6d78a8f34d6dc3a42a287", "score": "0.4392473", "text": "public function getGameProgression() {\r\n\t\t// Shamelessly taken from the game \"belote\"\r\n\t\t$maxScore = $this->getMaxScore();\r\n\t\t$playerMaxScore = self::getUniqueValueFromDb(\r\n\t\t\t'SELECT MAX( player_score ) FROM player'\r\n\t\t);\r\n\t\t$playerMinScore = self::getUniqueValueFromDb(\r\n\t\t\t'SELECT MIN( player_score ) FROM player'\r\n\t\t);\r\n\r\n\t\tif ($playerMaxScore > $maxScore) {\r\n\t\t\t// End\r\n\t\t\treturn 100;\r\n\t\t}\r\n\t\tif ($playerMaxScore <= 0) {\r\n\t\t\t// Start\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\t// Average\r\n\t\t$n = 2 * ($maxScore - $playerMaxScore);\r\n\t\t$res =\r\n\t\t\t(100 * ($playerMaxScore + $playerMinScore)) /\r\n\t\t\t($n + $playerMaxScore + $playerMinScore);\r\n\t\treturn max(0, min(100, $res)); // Note: 0 => 100\r\n\t}", "title": "" }, { "docid": "6fdb7ed1f4d1a46f4750af2a253a76d7", "score": "0.43885946", "text": "abstract public function combatLevel();", "title": "" }, { "docid": "6738b8b95c77afdebacbd0a84ae8b6e2", "score": "0.43845", "text": "function getWaitingGames()\n\t{\n\t\t$uid = $_SESSION[\"uid\"];\n\t\t\n\t\t$query = \"SELECT DISTINCT g.gid, g.year, g.season, g.players\n\t\t\t\t\tFROM games g, in_game i\n\t\t\t\t\tWHERE g.running=false and g.gid=i.gid and not i.uid='$uid';\";\n\t\t\n\t\t$result = mysql_query($query) or die(\"db access error\" . mysql_error());\n\t\t\n\t\t$games = array();\n\t\t\n\t\tfor($i = 0; $i < mysql_num_rows($result); $i++)\n\t\t{\n\t\t\tarray_push($games, mysql_fetch_assoc($result));\n\t\t}\n\t\t\n\t\treturn $games;\n\t}", "title": "" } ]
58b35d006b7fbb33efeefc605cc733c3
unsetMany Unsets many $_SESSION by given array[$keys].
[ { "docid": "3caa3383c93754ce88a242d512d7a336", "score": "0.67885715", "text": "public static function unsetMany(array $keys)\n {\n foreach ($keys as $key) self::unset($key);\n }", "title": "" } ]
[ { "docid": "79ce6a88b3ae081118232bd415570a38", "score": "0.7258247", "text": "function s_unset()\r\n{\r\n\t$args = func_get_args();\r\n\tfor ($i = 0; $i < func_num_args(); $i++)\r\n\t{\r\n\t\tif (isset($_SESSION[$args[$i]]))\r\n\t\t{\r\n\t\t\tunset($_SESSION[$args[$i]]);\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "519288e81901c08500185879457987a0", "score": "0.66241354", "text": "public function forgetMany(array $keys);", "title": "" }, { "docid": "345c5607380701563bd7d4d53dc58e6e", "score": "0.645931", "text": "function unsetAll(){\n unset($_SESSION['campaign_title']);\n unset($_SESSION['campaign_description']);\n unset($_SESSION['campaign_type']);\n unset($_SESSION['campaign_logo']);\n unset($_SESSION['campaign_latlng']);\n unset($_SESSION['campaign_postcode']);\n unset($_SESSION['campaign_address']);\n unset($_SESSION['campaign_excerpt']);\n unset($_SESSION['campaign_houseId']);\n}", "title": "" }, { "docid": "7758e7914ee5e15184e14623eedde44d", "score": "0.6176401", "text": "public function clear(){\n $it = $this->session->getIterator();\n foreach ($it as $key => $value){\n unset($this->session[$key]);\n }\n }", "title": "" }, { "docid": "fb06749a268b27e2eb43cd9077e93c85", "score": "0.6128552", "text": "public function removeItemsByKey($keys){\n\t\tforeach((array)$keys as $key){\n\t\t\tunset($this->shops[$key]);\n\t\t}\n\t}", "title": "" }, { "docid": "a905283216821d1ce00d59531db08702", "score": "0.6101725", "text": "function invalidateSessions(array $sessionIds);", "title": "" }, { "docid": "007389a3876fd6f624719b294c9b382c", "score": "0.6084085", "text": "public function mclear(array $keys = array());", "title": "" }, { "docid": "705454e96da1702ff967f227d67928bb", "score": "0.6069416", "text": "public static function clearAll()\n\t{\n\t\tstatic::init();\n\n\t\tforeach ($_SESSION as $k => $v)\n\t\t{\n\t\t\tunset($_SESSION[$k]);\n\t\t}\n\t}", "title": "" }, { "docid": "f8e9c8c6f4a8a1f9bc52b950bfbd432a", "score": "0.60316503", "text": "public static function clearAll($onlyOwnNamespaces = true)\n {\n $dummy = self::getNamespace('dummy');\n $namespaces = array_keys($_SESSION);\n foreach ($namespaces as $namespace) {\n $sessionNSName = substr(\n $namespace,\n 0,\n strlen(self::SESSION_NAMESPACE)\n );\n $isOwnNS = $sessionNSName == self::SESSION_NAMESPACE;\n if ($isOwnNS || !$onlyOwnNamespaces) {\n unset($_SESSION[$namespace]);\n }\n }\n unset($dummy);\n }", "title": "" }, { "docid": "e71a01254f1fd97ac23bc467031498a5", "score": "0.6027581", "text": "function deleteMultiple(array $keys);", "title": "" }, { "docid": "22550925b5668a97413005bf0ade1851", "score": "0.6013654", "text": "public function resetAll() {\n\t\t$this->session->remove($this, true); \n\t}", "title": "" }, { "docid": "339e3ef71fdf6fa26d4b5fa5bf4fe4a1", "score": "0.5984264", "text": "public function mclear(array $keys)\n {\n foreach ($keys as &$key) {\n $key = $this->key($key);\n }\n\n $this->driver->mclear($keys);\n }", "title": "" }, { "docid": "6445af536723777df9f6f2a2f095c0db", "score": "0.5965515", "text": "function removeAllFav(){\n unset($_SESSION['favArtists']);\n unset($_SESSION['favImages']);\n}", "title": "" }, { "docid": "dfc6a7879a8db04b7ef110da3cc26e37", "score": "0.5898712", "text": "private static function unsetSessionId()\n {\n unset($_SESSION['admin_id']);\n unset($_SESSION['partner_id']);\n }", "title": "" }, { "docid": "3fd75ae57975dba01f4e56afb4fc7224", "score": "0.5884471", "text": "function clearCacheByArray(array $keys)\n{\n foreach ($keys as $key) {\n cache()->forget($key);\n }\n}", "title": "" }, { "docid": "e6562871e2b71cb43fbb3fb3d82dd1a7", "score": "0.5880485", "text": "function _destroy_cust_reward_sess(){\n\t unset($_SESSION[SES_REWARD]);\n\t unset($_SESSION[IS_RWD_AUTH]);\n\t unset($_SESSION['sel_reward_sess']);\n\t unset($_SESSION[CUST_TBL_ID]);\n\t unset($_SESSION[CUST_REQUEST_TYPE]);\n}", "title": "" }, { "docid": "df20dee7495d6a42a2439c4630a93b93", "score": "0.58644104", "text": "public function clear_cluster_session()\n\t{\n\t\t$cluster_session = array('dusun', 'rw', 'rt');\n\t\tforeach ($cluster_session as $session)\n\t\t{\n\t\t\t$this->session->unset_userdata($session);\n\t\t}\n\t}", "title": "" }, { "docid": "ecd38bd33482150186cd92d8a52bbe54", "score": "0.58613026", "text": "public static function clear()\r\n {\r\n if (isset($_SESSION['products'])) {\r\n unset($_SESSION['products']);\r\n }\r\n\r\n if (isset($_SESSION['colors'])) {\r\n unset($_SESSION['colors']);\r\n }\r\n\r\n if (isset($_SESSION['order'])) {\r\n unset($_SESSION['order']);\r\n }\r\n }", "title": "" }, { "docid": "43a764fd0423b49572181a982995d570", "score": "0.58490545", "text": "function clearEditCompanySessions(){\t\n\tunset($_SESSION['EditCompanyOriginalName']);\n\tunset($_SESSION['EditCompanyOriginalRemoveDate']);\n\n\tunset($_SESSION['EditCompanyChangedName']);\n\tunset($_SESSION['EditCompanyChangedRemoveDate']);\n\n\tunset($_SESSION['EditCompanyCompanyID']);\n}", "title": "" }, { "docid": "07c09e9f1efcc115e075bd13ab98b052", "score": "0.5843754", "text": "public function removeSessions(array $sessionIds) {\n foreach ($sessionIds as $sessionId) {\n $this->getTableGateway()->delete(array('session_id' => $sessionId));\n }\n }", "title": "" }, { "docid": "0aed21207e7f76e87a4c16365543c372", "score": "0.5825925", "text": "public function del($key): void\n {\n if (!$this->has($key)) {\n return;\n }\n $arg = $this->arrKey($key);\n $total = count($arg);\n if ($total === 1) {\n unset($_SESSION[$arg[0]]);\n }\n elseif ($total === 2) {\n unset($_SESSION[$arg[0]][$arg[1]]);\n }\n elseif ($total === 3) {\n unset($_SESSION[$arg[0]][$arg[1]][$arg[2]]);\n }\n }", "title": "" }, { "docid": "97eba6a226d3f2e4fea7580990110d67", "score": "0.58202034", "text": "public static function reset ()\n\t{\n\t\t$keys = array( 'form', 'error', 'flash' );\n\t\tforeach ($keys as $key) {\n\t\t\tif ( isset($_SESSION[$key]) ) {\n\t\t\t\tunset($_SESSION[$key]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b78e75bdd4a34cd0e2d84c7f97301cf1", "score": "0.58043975", "text": "protected function delSession($data = []){\n\t\tif(!empty($data)){\n\t\t\tforeach($data as $key){\n\t\t\t\t$this->sess[$key] = NULL;\n\t\t\t\t$_SESSION[$key] = NULL; \n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3c0666fe0bb9afcb4e140d2abc7340a8", "score": "0.5796668", "text": "public function deleteMultiple(array $keys);", "title": "" }, { "docid": "5db714a1df2c7b323476d12099eb11c2", "score": "0.5777057", "text": "function clearMergeCompanySessions(){\n\tunset($_SESSION['MergeCompanySelectedCompanyID']);\n\tunset($_SESSION['MergeCompanySelectedCompanyID2']);\n}", "title": "" }, { "docid": "170bb1c9024a014d38732fb42e70d37d", "score": "0.5764891", "text": "public function forgetMany(array $keys)\n {\n array_forget($this->storage, $this->prefixKeys($keys));\n\n return array_fill_keys($keys, true);\n }", "title": "" }, { "docid": "afa025d55c31b8ea4fa45d1d58f47c59", "score": "0.5757632", "text": "protected function reset_exercice() : void\n {\n foreach ($this->session_fields as $field) {\n $this->session->remove($field);\n }\n }", "title": "" }, { "docid": "92743eb30fb5990b0c1b0215d7931415", "score": "0.573994", "text": "public static function unsetKeys($arr, $keys){\n\n foreach ($keys as $value){\n unset($arr[$value]);\n };\n\n return $arr;\n\n }", "title": "" }, { "docid": "fde2634b1f7bdb887adbb83ec81fb922", "score": "0.5738711", "text": "public function __unset($avain) {\n unset($_SESSION[$avain]);\n }", "title": "" }, { "docid": "df52ba3ee2f7bfdac4cc53f45eb7c133", "score": "0.5737181", "text": "public function forget($keys);", "title": "" }, { "docid": "966f134da27e7f160ea2ddb90f1557cf", "score": "0.5725372", "text": "public function bs_session_unset($sdata)\n {\n \n\n if(!empty($sdata) and !is_array($sdata))\n {\n \n \n //unset sdata \n session_unset($sdata);\n \n }\n elseif(!empty($sdata) and is_array($sdata))\n {\n foreach ($sdata as $s_key ) {\n session_unset($s_key);\n }\n \n }\n\n //return true on success\n return true;\n }", "title": "" }, { "docid": "5485d3289647c108b0ae17a92fdb8bc9", "score": "0.57182825", "text": "private function clearAll() {\n \t$this->_sessionWriter->clear($this->_idHash);\n \t$this->_sessionWriter->httpClear(self::$HTTP_PERSIST_NAME);\n \t$this->_dontWrite = true;\n \t$this->_objects = array();\n }", "title": "" }, { "docid": "41ffdef01e94e4d75fcc9519a82af502", "score": "0.5708056", "text": "function undelete(array $ids);", "title": "" }, { "docid": "5c390fb93ca8292dd4c9969dfb10da78", "score": "0.5706222", "text": "function clearOutSession() {\r\n if (isset($_SESSION['__ZF']) && is_array($_SESSION['__ZF'])) {\r\n foreach($_SESSION['__ZF'] as $key => $sesszf) {\r\n $namespace = $key;\r\n break;\r\n }\r\n $session = $_SESSION;\r\n foreach ($session as $key=>$sess) {\r\n if ($key != $namespace && $key != '__ZF')\r\n unset ($_SESSION[$key]);\r\n }\r\n unset($_SESSION['__ZF'][$namespace]);\r\n }\r\n }", "title": "" }, { "docid": "50bc7a343a778c24aa603c0fae79feb3", "score": "0.5702902", "text": "function unsetKey(array &$arr, string|int ...$keys) {\n foreach ($keys as $v) unset($arr[$v]);\n }", "title": "" }, { "docid": "c67d2c58a5a220d090b01ed41a8e8e45", "score": "0.56977034", "text": "public function close_all_sessions() {\n\t\tif (is_array($this->users)) {\n\t\t\tforeach($this->users as $key => $user) {\n\t\t\t\tunset($this->users[$key]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a267ecd38b7bcc9f6aabebee03e21301", "score": "0.5696694", "text": "public function clear()\n {\n foreach($this->session->state as $table => $maxID)\n {\n $this->dao->dbh($this->dbh)->delete()->from($table)->where('id')->gt($maxID)->exec();\n }\n }", "title": "" }, { "docid": "776a0bc099016027105356ab23a4635a", "score": "0.56836116", "text": "function unsetSessionVar($key) {\n if (isset($_SESSION[$key])) {\n unset($_SESSION[$key]);\n }\n }", "title": "" }, { "docid": "cc8be2f87c8172d6b7c66f523e6f25a9", "score": "0.565639", "text": "public function clearAll() {\n $_SESSION[$this->_sessionName] = [];\n }", "title": "" }, { "docid": "4c658b6aa11591f9386c4ee262a3650e", "score": "0.56496155", "text": "function delKeySession()\n\t{\n\t\tunset($_SESSION[$this->sname]);\n\t}", "title": "" }, { "docid": "71cb29e5465bcd4582675621cb188a80", "score": "0.5613682", "text": "public function unsetUserSessVars(){\n\t\t\tif(isset($_SESSION[\"CURR_USER_NAME\"]))\n\t\t\t\tunset($_SESSION[\"CURR_USER_NAME\"]);\n\t\t\tif(isset($_SESSION[\"CURR_USER_ID\"]))\n\t\t\t\tunset($_SESSION[\"CURR_USER_ID\"]);\n\t\t\tif(isset($_SESSION[\"CURR_USER_UN\"]))\n\t\t\t\tunset($_SESSION[\"CURR_USER_UN\"]);\n\t\t\tif(isset($_SESSION[\"CURR_USER_PASS\"]))\n\t\t\t\tunset($_SESSION[\"CURR_USER_PASS\"]);\n\t\t\tif(isset($_SESSION[\"CURR_USER_AUTH\"]))\n\t\t\t\tunset($_SESSION[\"CURR_USER_AUTH\"]);\n\t\t}", "title": "" }, { "docid": "0e23cb5a022dd4a4c35696d7388feae0", "score": "0.55766094", "text": "function logout(){\n\tforeach($_SESSION as $name=>$val)\n\t\tif(strpos($name,'attempt_')===false)unset($_SESSION[$name]);\n}", "title": "" }, { "docid": "0b5ad4309def28cfbcd0587d1ff12485", "score": "0.5563202", "text": "public function forget($keys)\n {\n $items = $this->get();\n foreach ($keys as $key) {\n\n }\n $items->forget($keys);\n }", "title": "" }, { "docid": "3a366d2ffb4368cb992c69a16ac88c5c", "score": "0.5557281", "text": "function clearBookingHistorySessions(){\n\tunset($_SESSION['BookingHistoryStartDate']);\n\tunset($_SESSION['BookingHistoryEndDate']);\n\tunset($_SESSION['BookingHistoryCompanyInfo']);\n\tunset($_SESSION['BookingHistoryCompanyMergeNumber']);\n\tunset($_SESSION['BookingHistoryDisplayWithMerged']);\n}", "title": "" }, { "docid": "9e1ae18ffa4b32bbc47ce1fa2ad57fe6", "score": "0.5548239", "text": "function clear_session()\n\t{\n\t\t$fields = array('lastname'=>'', 'firstname'=>'', 'telephone'=>'', 'emailaddress'=>'', 'gender'=>'', 'marital'=>'', 'birthday'=>'', 'birthplace__addressline'=>'', 'birthplace__county'=>'', 'birthplace__district'=>'', 'birthplace__country'=>'', 'birthplace__addresstype'=>'', 'birthplace__district__hidden'=>'', 'birthplace__country__hidden'=>'', 'teacherid'=>'', 'permanentaddress'=>'', 'permanentaddress__addressline'=>'', 'permanentaddress__county'=>'', 'permanentaddress__district'=>'', 'permanentaddress__country'=>'', 'permanentaddress__addresstype'=>'', 'contactaddress'=>'', 'contactaddress__addressline'=>'', 'contactaddress__county'=>'', 'contactaddress__district'=>'', 'contactaddress__country'=>'', 'contactaddress__addresstype'=>'', 'citizenship__country'=>'', 'citizenship__citizentype'=>'', 'education_list'=>'', 'subject_list'=>'', 'is_admin_adding_teacher'=>'', 'profile_id'=>'', 'profile_personid'=>'', 'profile_loginname'=>'', 'profile_userrole'=>'', 'profile_lastname'=>'', 'profile_firstname'=>'', 'profile_signature'=>'', 'profile_telephone'=>'', 'profile_emailaddress'=>'', 'profile_photo'=>'');\n\t\t\n\t\t$this->native_session->delete_all($fields);\n\t}", "title": "" }, { "docid": "9095f729a32a1b36696c1e9f789942e1", "score": "0.5544677", "text": "public function delSessionAll()\n {\n session_unset();\n session_destroy();\n Cache::set('msjError','');\n self::authenticated();\n }", "title": "" }, { "docid": "86958a718a988b50435b27c3c305aa73", "score": "0.5535797", "text": "function clearAddCompanySessions(){\n\tunset($_SESSION['AddCompanyCompanyName']);\n}", "title": "" }, { "docid": "3384b46410b91fa9fd821cd0fd8dff53", "score": "0.5534062", "text": "function clearCart() {\n unset($_SESSION[\"cart\"]); \n $_SESSION[\"cart\"] = array();\n unset($_SESSION[\"prices\"]); \n $_SESSION[\"prices\"] = array();\n \n}", "title": "" }, { "docid": "369ed1999ff3496509081428e96a69b7", "score": "0.5508262", "text": "function user_close_sessions($username, $ids, $is_reverse = FALSE){\n\t$store = new simpleStore(DATA_STORE);\n\n\tif(!($sessions = $store->selectEntry(\"sessions\", $username))){\n\t\treturn FALSE;\n\t}\n\n\tforeach($ids as $id){\n\t\tunset($sessions[$id]);\n\t}\n\n\treturn (!empty($sessions) ? $store->replaceEntry(\"sessions\", $username, $sessions) : $store->deleteEntry(\"sessions\", $username)) !== FALSE ? $sessions : FALSE;\n}", "title": "" }, { "docid": "6c752f5f918840215b47e3e328e49cdb", "score": "0.5500019", "text": "public static function resetCartSessions()\n {\n $_SESSION['cart']->reset(true);\n unset($_SESSION['sendto']);\n unset($_SESSION['billto']);\n unset($_SESSION['shipping']);\n unset($_SESSION['payment']);\n unset($_SESSION['comments']);\n }", "title": "" }, { "docid": "b15c527946f4ed1f11fc658494acbb92", "score": "0.54951066", "text": "function unsetVar($varname) {\n\t\tif (!is_array($varname)) {\n\t\t\tif (!empty($varname)) {\n\t\t\t\tif ($this->debug & 1) {\n\t\t\t\t\tprintf(\"<b>unsetVar:</b> (with scalar) <b>%s</b><br>\\n\", $varname);\n\t\t\t\t}\n\t\t\t\tunset($this->varkeys[$varname]);\n\t\t\t\tunset($this->varvals[$varname]);\n\t\t\t}\n\t\t} else {\n\t\t\treset($varname);\n\t\t\twhile(list($k, $v) = each($varname)) {\n\t\t\t\tif (!empty($v)) {\n\t\t\t\t\tif ($this->debug & 1) {\n\t\t\t\t\t\tprintf(\"<b>unsetVar:</b> (with array) <b>%s</b><br>\\n\", $v);\n\t\t\t\t\t}\n\t\t\t\t\tunset($this->varkeys[$v]);\n\t\t\t\t\tunset($this->varvals[$v]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7769be8f065ddee8effa0a8a0ba40f55", "score": "0.54939693", "text": "private function __clearSession() {\n\t\t$this->Session->delete('Authorization');\n\t\t$this->Session->delete(\"fb_\".FACEBOOK_APP_ID.\"_code\");\n\t\t$this->Session->delete(\"fb_\".FACEBOOK_APP_ID.\"_access_token\");\n\t\t$this->Session->delete(\"fb_\".FACEBOOK_APP_ID.\"_user_id\");\n\t\t$this->Session->delete(\"ot\");\n\t\t$this->Session->delete(\"ots\");\n\t\t$this->Session->delete(\"oauth.linkedin\");\n\t\t$this->Session->delete(\"fs_access_token\");\n\t\t$this->Session->delete(\"G_token\");\n\t}", "title": "" }, { "docid": "65f9ae6e824e3e430316caee2b118b40", "score": "0.54875815", "text": "public function __unsetTab()\n {\n $erase = false;\n for ($i = 0; $i < count($_SESSION['tabSession']); $i++) {\n $name = $_SESSION['tabSession'][$i];\n $this->__unset($name);\n if (false === $this->__isset($name)) {\n $erase = true;\n } else {\n $erase = false;\n }\n }\n if ($erase === true) {\n unset($_SESSION['tabSession']);\n }\n }", "title": "" }, { "docid": "b3b9a24604829b9089c87a36b889c7bd", "score": "0.5469174", "text": "public function deleteUserVariables(array &$session):void {\n unset($session[\"user_id\"]);\n unset($session[\"token\"]);\n unset($session[\"token_time\"]);\n }", "title": "" }, { "docid": "097932218d05469d4d4fbec2120326c8", "score": "0.54649293", "text": "public function unset_all()\n {\n unset(\n $this->ID,\n $this->user_name,\n $this->password,\n $this->email,\n $this->registration_time,\n $this->rights,\n $this->confirm_code,\n $this->tmp_email\n );\n }", "title": "" }, { "docid": "6ac89348c8678cad524d82e92936171d", "score": "0.5456215", "text": "public function deleteMulti(array $keys): array;", "title": "" }, { "docid": "f60518a4f70e66c086d87790b8c5ee9d", "score": "0.54457176", "text": "public function clearMultiples()\n {\n $this->collMultiples = null; // important to set this to NULL since that means it is uninitialized\n }", "title": "" }, { "docid": "cf03f3ca45bfd511aa706265dfe0cac7", "score": "0.543281", "text": "public function deleteAll()\n {\n $this->reset();\n session_destroy();\n }", "title": "" }, { "docid": "7c50b1803b559a1bfcb670d96b4f2c6a", "score": "0.5414796", "text": "function clearBeginSurveyFromSession(){//called on lines 49,61, 150, 169 of index.php\n\t//if values are set then unset them\n\tif (isset($_SESSION['full_name'])){\n\t\tunset($_SESSION['full_name']);\n\t}\n\tif (isset($_SESSION['age'])){\n unset($_SESSION['age']);\n\t}\n\tif (isset($_SESSION['student'])){\n unset($_SESSION['student']);\n\t}\n\tif (isset($_SESSION['purchases'])){\n unset($_SESSION['purchases']);\n\t}\n\tif (isset($_SESSION['how'])){\n unset($_SESSION['how']);\n\t}\n\tif (isset($_SESSION['recommend'])){\n unset($_SESSION['recommend']);\n\t}\n\tif (isset($_SESSION['sat'])){\n unset($_SESSION['sat']);\n\t}\n\t\n}", "title": "" }, { "docid": "ca9f88ba6b02ad1d64f3750b68b5738e", "score": "0.5413376", "text": "function clearSessionVars() {\n\n\t\tif(isset($_SESSION[\"weGlossarySession\"])) {\n\t\t\tunset($_SESSION[\"weGlossarySession\"]);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "af13a8b083ac4a03d2321fffdbafc831", "score": "0.54121506", "text": "public static function del($index) {\n if (array_key_exists($index, $_SESSION))\n unset($_SESSION[$index]);\n }", "title": "" }, { "docid": "11d4d33b5f2d6c86e71fb929ffaff37c", "score": "0.5402198", "text": "public static function clearFilterSessionVars()\n {\n\n if (Yii::$app->session->has('keys')) Yii::$app->session->remove('keys');\n if (Yii::$app->session->has('related')) Yii::$app->session->remove('related');\n if (Yii::$app->session->has('staticDBsContent')) Yii::$app->session->remove('staticDBsContent');\n if (Yii::$app->session->has('matchesPercentArr')) Yii::$app->session->remove('matchesPercentArr');\n }", "title": "" }, { "docid": "0b8a75108cca3278730ff56311b78f21", "score": "0.5377737", "text": "function doLogout() {\n unset($_SESSION['user']);\n unset($_SESSION['logat']);\n }", "title": "" }, { "docid": "fa6aaff56a909dbe98b42c4eba9da282", "score": "0.536794", "text": "function UnsetSession($key)\r\n {\r\n if (isset($_SESSION[$key])) {\r\n unset($_SESSION[$key]);\r\n } else {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "a478c6eed1a598ed8b808774a7319090", "score": "0.536549", "text": "public function destroyAllSessions(): void\n\t{\n\t\t$this->issueNewSecret();\n\t\t$this->cleanOldSessions();\n\t}", "title": "" }, { "docid": "a5f832d507b16a54da4769f9c7d76fd7", "score": "0.536485", "text": "function lti_reset_session() {\r\n foreach ( $_SESSION as $k => $v ) {\r\n $pos = strpos($k, LTI_SESSION_PREFIX);\r\n if (($pos !== FALSE) && ($pos == 0) && ($k != LTI_SESSION_PREFIX . 'return_url')) {\r\n $_SESSION[$k] = '';\r\n unset($_SESSION[$k]);\r\n }\r\n }\r\n}", "title": "" }, { "docid": "e08fa9943f47976d534a7b00242fc725", "score": "0.5357805", "text": "public function clearData() {\n unset($_SESSION[$this->SArrayName]);\n }", "title": "" }, { "docid": "912616f9b72404cf898474f221abb3de", "score": "0.535417", "text": "public function remove(array $post)\n {\n if (isset($post['rm_sessions'])) {\n foreach ($post['rm_sessions'] as $id) {\n $session = Table\\UserSessionConfig::findById((int)$id);\n if (isset($session->role_id)) {\n $session->delete();\n }\n }\n }\n }", "title": "" }, { "docid": "16e536385edb1935059e1e15dc7ca19e", "score": "0.53510046", "text": "public function remove($key){\n unset($_SESSION['data'][$key]);\n }", "title": "" }, { "docid": "01b5cb21b32ea3228adcb66b1d492e0b", "score": "0.534307", "text": "public function deleteMulti(array $keys): void\n {\n $serverKeys = [];\n foreach ($keys as $key) {\n $serverKeys[] = $this->getKeyName($key);\n }\n\n $this->getInstance()->deleteMulti($serverKeys);\n }", "title": "" }, { "docid": "42470a79eed3bcc78795f7da2885bd3e", "score": "0.5328431", "text": "public function deleteMany(array $ids);", "title": "" }, { "docid": "9df02d8bd50dd449921d3eee4131d90b", "score": "0.5302895", "text": "function deleteFromSession($key) {\r\n\t\tunset ($_SESSION[$key]);\r\n\t}", "title": "" }, { "docid": "eb4b5509e2ed281285179f5f8887270c", "score": "0.5285177", "text": "function cleanSession_paymentdetail()\n{\n\n unset($_SESSION['paymentdetail']['TxnID']);\nunset($_SESSION['paymentdetail']['TxnType']);\nunset($_SESSION['paymentdetail']['TxnDate']);\nunset($_SESSION['paymentdetail']['RefNumber']);\nunset($_SESSION['paymentdetail']['TotalAmount']);\nunset($_SESSION['paymentdetail']['AppliedAmount']);\nunset($_SESSION['paymentdetail']['CustomField1']);\nunset($_SESSION['paymentdetail']['CustomField2']);\nunset($_SESSION['paymentdetail']['CustomField3']);\nunset($_SESSION['paymentdetail']['CustomField4']);\nunset($_SESSION['paymentdetail']['CustomField5']);\nunset($_SESSION['paymentdetail']['CustomField6']);\nunset($_SESSION['paymentdetail']['CustomField7']);\nunset($_SESSION['paymentdetail']['CustomField8']);\nunset($_SESSION['paymentdetail']['CustomField9']);\nunset($_SESSION['paymentdetail']['CustomField10']);\nunset($_SESSION['paymentdetail']['CustomField11']);\nunset($_SESSION['paymentdetail']['CustomField12']);\nunset($_SESSION['paymentdetail']['CustomField13']);\nunset($_SESSION['paymentdetail']['CustomField14']);\nunset($_SESSION['paymentdetail']['CustomField15']);\nunset($_SESSION['paymentdetail']['IDKEY']);\nunset($_SESSION['paymentdetail']['GroupIDKEY']);\n\n\n }", "title": "" }, { "docid": "2947350ced4ef32cc4af8fd0139672cf", "score": "0.52816194", "text": "public function cleanOldSessions(): void\n\t{\n\t\t$metas = get_user_meta( $this->getID() );\n\n\t\tforeach ( $metas as $key => $value ) {\n\n\t\t\t// Skip non-session metas\n\t\t\tif ( substr( $key, 0, strlen( 'fws_session_' ) ) !== 'fws_session_' ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Skip if session is valid\n\t\t\tif ( $value === $this->getJwtSecret() ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Delete if obsolete\n\t\t\tdelete_user_meta( $this->getID(), $key );\n\t\t}\n\t}", "title": "" }, { "docid": "69d44eefcf94d60e20e5abc5d4c48ff2", "score": "0.52766544", "text": "public function removeAll($keys)\n {\n foreach ($keys as $key) {\n $this->remove($key);\n }\n }", "title": "" }, { "docid": "be3d74cbe3b56e857b79d2ca173b6a44", "score": "0.52725965", "text": "public function unsetSession(): static;", "title": "" }, { "docid": "98e098451f8908816bc77517b28a3180", "score": "0.5267948", "text": "private function destroyOpenIDSession() {\n\n if (isset($_SESSION) && is_array($_SESSION)) {\n foreach ($_SESSION as $key => $val) {\n if (preg_match('/^openid_/', $key)) {\n unset($_SESSION[$key]);\n }\n }\n }\n\n $this->debug('OpenID session info destroyed.');\n\n }", "title": "" }, { "docid": "64ad979892f54765452e34f59bde3805", "score": "0.5260299", "text": "public function forget(\n $keys\n )\n {\n }", "title": "" }, { "docid": "41550f67a3a82ed8dbb799e292388110", "score": "0.5256488", "text": "public function deleteItems(array $keys)\n {\n }", "title": "" }, { "docid": "fb5d109292642702b80886171e2a2875", "score": "0.52546364", "text": "public function clear()\n\t{\n\t\t$_SESSION = [];\n\t}", "title": "" }, { "docid": "2fcfd1cfcb8b599268bf2de8d59ce7f2", "score": "0.5253589", "text": "public static function unsetsess($indice) {\n\t\t\tif(isset($indice)):\n\t\t\t\tunset($_SESSION[$indice]);\n\t\t\t\treturn true;\n\t\t\telse:\n\t\t\t\treturn false;\n\t\t\tendif;\n\t\t}", "title": "" }, { "docid": "b27415efec93ea8b7da1201caea29f2a", "score": "0.5253337", "text": "function logout() {\r\n unset($_SESSION[\"user\"]);\r\n unset($_SESSION[\"level\"]);\r\n session_destroy();\r\n }", "title": "" }, { "docid": "3ee16cd6bd3563214c35074e11ad92d9", "score": "0.52532846", "text": "public function remove()\n {\n if (isset($_SESSION[$this->index])) {\n unset($_SESSION[$this->index]);\n }\n }", "title": "" }, { "docid": "197f6387350544758a654e0eb593860a", "score": "0.52516365", "text": "public function limpaDados(){\n if ($this->request->session()->read('pontos') !== null){\n $this->request->session()->delete('listaCategorias');\n $this->request->session()->delete('pontos');\n $this->request->session()->delete('posicao');\n $this->request->session()->delete('idPerguntas');\n }\n }", "title": "" }, { "docid": "31f49952b91423afb1fc2c57d2715db0", "score": "0.5246855", "text": "static function clearAll()\r\n {\r\n $_SESSION = array ();\r\n return session_destroy();\r\n }", "title": "" }, { "docid": "f11bf12041746e78a2bf9601ee0bafdc", "score": "0.5237794", "text": "public function __unset($pVar)\n {\n $attribute = StringData::fromCamelCase($pVar);\n if (array_key_exists($attribute, $_SESSION)) {\n unset($_SESSION[$attribute]);\n }\n }", "title": "" }, { "docid": "679439dded9d0d776a213390081e14d9", "score": "0.52358836", "text": "public static function purgeStates() {\n $_SESSION[self::DATA_KEY] = array();\n }", "title": "" }, { "docid": "2404c6663a9846077f4affdd1cdb3ade", "score": "0.52070045", "text": "protected function deleteCollection(array $ids)\n {\n if (count($ids)) {\n User::destroy($ids);\n }\n }", "title": "" }, { "docid": "8ec1a9589970ebfeb2d69f18f8027d07", "score": "0.5203755", "text": "public function destroyFromArray(array $ids)\r\n {\r\n $this->clearCacheAll();\r\n $this->clearCacheIdArray($ids);\r\n\r\n $this->repository->destroyFromArray($ids);\r\n }", "title": "" }, { "docid": "20f0aa8a58aecdfb04991996c29471b5", "score": "0.520345", "text": "function session_unset(): void\n{\n error_clear_last();\n $safeResult = \\session_unset();\n if ($safeResult === false) {\n throw SessionException::createFromPhpError();\n }\n}", "title": "" }, { "docid": "a9371251a0a197598a5023d12972c9de", "score": "0.51936615", "text": "public function clear()\n {\n $_SESSION = array();\n }", "title": "" }, { "docid": "d34e87c99891215f50d0f5573a2520dc", "score": "0.5191004", "text": "function logout() {\n global $site_url;\n \n $_SESSION = array();\n unset($_SESSION['valid']);\n unset($_SESSION['username']);\n unset($_SESSION['regenerate_id']);\n unset($_SESSION['p_title']);\n unset($_SESSION['p_excerpt']);\n unset($_SESSION['p_body']);\n unset($_SESSION['p_category']);\n session_destroy();\n header(\"Location: {$site_url}\");\n}", "title": "" }, { "docid": "eef4c281e12e3efc0f528558c34153ef", "score": "0.5178938", "text": "function effacerValeurs()\n{\n\tunset($_SESSION[\"form\"]);\n}", "title": "" }, { "docid": "e076027d8473d48fa2cf377e34acd1a8", "score": "0.5178539", "text": "public function destroy($arrayIds);", "title": "" }, { "docid": "941827e84634e9a73974129fb5d04a7f", "score": "0.5176807", "text": "public static function clear()\n\t{\n\t\t$_SESSION = array();\n\t}", "title": "" }, { "docid": "50a6c7c6ab62e338f89bc627d370cae4", "score": "0.5160707", "text": "function logout() {\n\tunset($_SESSION[\"uid\"]);\n\tunset($_SESSION[\"username\"]);\n}", "title": "" }, { "docid": "b0d041a1ac39e13f9c85e014490b5104", "score": "0.5159698", "text": "function clean_session($persist = 0)\n{\n unset($_SESSION['get']);\n unset($_SESSION['rpfA']);\n if (!$persist) {\n unset($_SESSION['login']);\n unset($_SESSION['username']);\n unset($_SESSION['persist']);\n unset($_SESSION['ops']);\n }\n return true;\n}", "title": "" }, { "docid": "88c77d965b1b9fc442ad0509305f802c", "score": "0.5157623", "text": "function deconnecter() {\n unset($_SESSION[\"idUser\"]);\n unset($_SESSION[\"loginUser\"]);\n}", "title": "" }, { "docid": "90010368ba8b77b28df62a23c1e516d8", "score": "0.5150723", "text": "public static function remove(){\n unset($_SESSION['auth']);\n }", "title": "" }, { "docid": "fb787e6943a7a9cf8756416b25b90dfd", "score": "0.51503706", "text": "public function removeAll() {\n\t\t$keys = $this->getKeys();\n\n\t\tforeach ($keys as $key) {\n\t\t\tunset($this[$key]);\n\t\t}\n\t}", "title": "" } ]
17df4516736fe225a785456cdbd61346
Returns index in pattern array of first pattern match.
[ { "docid": "0232a0613db13f69c54b40ecc83cd767", "score": "0.5243155", "text": "public function mg_regx_vars( &$parser, &$patternArrayName, &$input )\n\t{\n\t\t// the worst that can happen is that no valid return values are received.\n\t\twfRunHooks('PageVarGet', array( &$patternArrayName, &$parray ) );\n\t\t$mIndex = self::regexMatchArray( $parray, $input );\t\n\t\t\n\t\treturn $mIndex;\n\t}", "title": "" } ]
[ { "docid": "d714ef4a7046894ec3f63aaa9c49bf8a", "score": "0.5947985", "text": "function first_index_arr($arr)\n {\n foreach ($arr as $k => $v) return $k;\n }", "title": "" }, { "docid": "0159cd1c457f1a70bbcdd795737c828f", "score": "0.59214246", "text": "function getArrayFirstIndex($arr) {\n\tforeach ($arr as $key => $value)\n\treturn $key;\n}", "title": "" }, { "docid": "70ddd62507f0cd66a30873abc29c4f8c", "score": "0.5853923", "text": "function match_first($text, $regex){\n\t\t\n\t\t$return = null;\n\t\tpreg_match_all($regex, $text, $matches, PREG_PATTERN_ORDER);\n\n\t\tif(sizeof($matches) > 0 && isset($matches[0][0])){\n\t\t\t$return = $matches[0][0];\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "dde07dffbec4d899f1a45f45c03367ee", "score": "0.58035684", "text": "public function find($pattern): mixed {\n if (preg_match_all($pattern, $this->raw, $matches)) {\n if (isset($matches[1])) {\n if (count($matches[1]) > 0) {\n return $matches[1][0];\n }\n }\n }\n return null;\n }", "title": "" }, { "docid": "4e24a89144f4348dbc7d6d599285e776", "score": "0.5754775", "text": "public function getFirstCharIndex() {}", "title": "" }, { "docid": "bef4d37fbe7276dd36ecade129cdee06", "score": "0.5704679", "text": "function preg_array_shift(&$array, $pattern)\n{\n\tif(!is_array($array)) return false;\n\tforeach($array as $key => $value)\n\t{\n\t\tif(is_string($value) && preg_match($pattern, trim($value), $out))\n\t\t{\n\t\t\tunset($array[$key]);\n\t\t\tif(isset($out[1])) return $out[1];\n\t\t\telse return $value;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "4af08d151c2cf0824984a4ea96a8a47d", "score": "0.5519831", "text": "function getMatchingLines($pattern, $array){\n $returnArray = Array();\n foreach ($array as $x) {\n if (preg_match($pattern, $x) == 1) {\n $returnArray[] = $x;\n }\n }\n return $returnArray;\n}", "title": "" }, { "docid": "8dc77057d94b17e6c2226ec9267a1421", "score": "0.54908574", "text": "public function extractFirst($pat) {\r\n preg_match($pat, $this->contents, $matches);\r\n return $matches;\r\n }", "title": "" }, { "docid": "e90ce0bb291bf9cfa712c6d35218d0f6", "score": "0.5446111", "text": "function regex_match($pattern, $string)\n{\n \n try {\n preg_match($pattern, $string, $matches, PREG_OFFSET_CAPTURE);\n if (isset($matches[1]))\n return isset($matches[1][0]) ? $matches[1][0] : null;\n return null;\n } catch (\\Throwable $e) {\n return null;\n }\n}", "title": "" }, { "docid": "8fad131e1a47a22f0a0939b6bb64d2b0", "score": "0.5345743", "text": "protected function getTrackByPattern($pattern)\n {\n if ($tracks = $this->getTracks()) {\n if (preg_match($pattern, $tracks, $matches) === 1) {\n return $matches[0];\n }\n }\n }", "title": "" }, { "docid": "886d893d6a9720bc70ff2ab29ad81ef7", "score": "0.53243256", "text": "function Preg_Match_one($regex, $string, $key = 0)\n{\n $matches = array();\n preg_match($regex, $string, $matches);\n return $matches[$key];\n}", "title": "" }, { "docid": "ebd2ad115e28bbf08b3b2b828c9a7bf8", "score": "0.5308805", "text": "public static function first($array) {\n\t\treturn $array[0];\n\t}", "title": "" }, { "docid": "4d5222563d31290afa1c45a0f1e9b14b", "score": "0.52605146", "text": "public function indexOfRegex(string $level, string $pattern): int\n {\n $pattern = '/\\[' . $level . '\\].*' . $pattern . '/';\n foreach ($this->logs as $index => $log) {\n if (preg_match($pattern, $log)) {\n return $index;\n }\n }\n return -1;\n }", "title": "" }, { "docid": "f962eedd7a801f50a389182e8e1c09f1", "score": "0.5231002", "text": "function getPattern($pattern) {\n return $this->patterns[$pattern];\n }", "title": "" }, { "docid": "3bce67e2148ce98c7b48c62b1bc9aa87", "score": "0.5196086", "text": "public function match(string $pattern, int $index = 0, $default = null)\n\t{\n\t\tpreg_match($pattern, $this->getText(), $matches);\n\n\t\tif (isset($matches[$index])) {\n\t\t\treturn $matches[$index];\n\t\t}\n\n\t\treturn $default;\n\t}", "title": "" }, { "docid": "9bfd7ac9d0c570725474b9e10b16831f", "score": "0.5195208", "text": "public function findArray($array,$item){\n for ($i=0;$i<count($array);$i++){\n if($array[$i]==$item)\n return $i;\n }\n return -1;\n }", "title": "" }, { "docid": "2b549c0746353d44e2630a3bf48d6fae", "score": "0.51649547", "text": "public static function arrayKeyFirst($array) {\n\t\tforeach ($array as $key => $unused) {\n\t\t\treturn $key;\n\t\t}\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "c4a7f42b986795d3cfd371d43c6fdef2", "score": "0.51590985", "text": "function array_first($array)\n {\n return arr::first($array);\n }", "title": "" }, { "docid": "43b9453fbc29b06f457428ad4487dca4", "score": "0.51489943", "text": "static function first_available_key($array){\n\t\tif(!is_array($array)){\n\t\t\treturn 0;\n\t\t}\n\t\t$key = 0;\n\t\tksort($array);\n\t\tforeach($array as $k=>$v){\n\t\t\tif($k != $key){\n\t\t\t\treturn $key;\n\t\t\t}\n\t\t\t$key++;\n\t\t}\n\t\treturn $key;\n\t}", "title": "" }, { "docid": "a3a642b6e9d65c764ca35adde1e0879e", "score": "0.5140392", "text": "public static function first($array) {\n if (count($array) == 0) {\n return null;\n }\n $keys = array_keys($array);\n return $array[$keys[0]];\n }", "title": "" }, { "docid": "8e70823ce9f5ed4cec362bdbc5bfcd6a", "score": "0.513401", "text": "function getIndexOfRegistry($registryNumber, $array) {\n $i = 0;\n\t$index = -1;\n\tfor ($i = 0; $i < sizeof($array); $i++) {\n\t\tif ($array[$i][0] == $registryNumber) {\n\t\t\t$index = $i;\n\t\t\tbreak;\n\t\t}\n\t} \n\treturn $index;\n}", "title": "" }, { "docid": "c9230eb32518a5a8ad4c327dea2e807f", "score": "0.5068689", "text": "public static function searchArrayByRegexpKey($pattern, $array)\n {\n $keys = array_keys($array);\n $result = preg_grep($pattern, $keys);\n \n return array_intersect_key($array, array_flip($result));\n }", "title": "" }, { "docid": "d4e435681e41fd6fe61c47702e2ba15e", "score": "0.5054194", "text": "public static function getFirstElementPointer(array &$arr)\n {\n $result = null;\n if (is_array($arr) && sizeof($arr)) {\n reset($arr);\n $result = &$arr[key($arr)];\n }\n\n return $result;\n }", "title": "" }, { "docid": "7158c4336940bee7165e14a046c26432", "score": "0.50424445", "text": "function get_index($message){\r\n\tpreg_match('/^\\D*(?=\\d)/', $message, $i);\r\n\treturn isset($i[0]) ? strlen($i[0]) : false;\r\n}", "title": "" }, { "docid": "74c4c1dc6b5d7b1faa1a091d1fb2f3f3", "score": "0.5009134", "text": "public function firstPosition($needle,$offset = 0)\n {\n return $this->provider->firstPosition($needle,$offset);\n }", "title": "" }, { "docid": "8149a6be46ddd95beac2caee46625bcf", "score": "0.50009716", "text": "function search($array, $value)\n{\n $counter = 0;\n $found = false;\n\n foreach($array as $v) {\n if(strcmp($v[0], $value) == 0) {\n $found = true;\n break;\n } \n\n $counter++;\n }\n \n if($found)\n return $counter;\n \n return -1;\n}", "title": "" }, { "docid": "133c9eee93d219314e7477d9f166177d", "score": "0.49955034", "text": "function getIndex() ;", "title": "" }, { "docid": "131bc4f3df0d183989e790e3f89f2db7", "score": "0.49947992", "text": "public static function pregMatchAll($pattern, $str)\n {\n preg_match_all($pattern, $str, $matches);\n return $matches[0];\n }", "title": "" }, { "docid": "5a6b8b82b7c47814371f5980865e8220", "score": "0.49942937", "text": "public function getIndex($key)\n {\n return floor($key / $this->_patternRowsCount) + 1;\n }", "title": "" }, { "docid": "e11972b44fad5eb2446beba79f5200a6", "score": "0.49836183", "text": "public function first()\n {\n $copy = $this->array;\n return reset($copy);\n }", "title": "" }, { "docid": "d42f08c9f12366449b685b843a104d0c", "score": "0.49797606", "text": "function _first($ar){\n\treturn array_shift(array_values($ar));\t\n}", "title": "" }, { "docid": "751925924eab73982b7209f4232379e2", "score": "0.49591517", "text": "private function findFirstIndex(SimpleNode $item): ?int\n {\n foreach ($this->elements as $key => $element) {\n if ($element !== null) {\n if ($item['value'] === $element['value']) {\n return $key;\n }\n }\n }\n\n return null;\n }", "title": "" }, { "docid": "28d0eec71696e51725a24989c586b77f", "score": "0.49445936", "text": "public function getFirstArgument()\n {\n $tokens = $this->getTokens();\n \n foreach ($tokens as $token) {\n if ($token && '-' === $token[0]) {\n continue;\n }\n \n return $token;\n }\n }", "title": "" }, { "docid": "eb402da2a73c1f5efa93ca8544841052", "score": "0.494169", "text": "public function GetPattern () {\n\t\tif ($this->pattern === NULL)\n\t\t\t$this->preparePatternAndBackReferenceIndexes();\n\t\treturn $this->pattern;\n\t}", "title": "" }, { "docid": "a77f001e0c3453b906ef4d67cf084dc9", "score": "0.49315423", "text": "function pos($array)\n{\n}", "title": "" }, { "docid": "cd834bdf590a5ed4a3c20cd72bab2c06", "score": "0.48813024", "text": "function array_first($array)\n{\n if( is_array($array) )\n {\n $keys = array_keys($array);\n if( isset($keys[0]) )\n return $array[$keys[0]];\n }\n return null;\n}", "title": "" }, { "docid": "944df15f9e11d85d332628b4ece534d5", "score": "0.4869875", "text": "function get_index($arr, $selected)\n{\n $ret = false; // return false if not found\n foreach ($arr as $key => $val) {\n if (strtolower(substr($val, 0, strlen($selected))) == strtolower($selected)) {\n $ret = $key;\n break;\n }\n }\n\n return $ret;\n}", "title": "" }, { "docid": "201a0a0aed02f604aba6c17ddfd77b15", "score": "0.48573813", "text": "function findFirstThingAtTime(&$haystack, $time, $key = \"time\") {\n if (isset($haystack[0])) $index = 0;\n else $index = 1;\n \n while ($haystack[$index][$key] < $time) {\n if (isset($haystack[$index+1])) $index++;\n else return false;\n }\n return $index;\n}", "title": "" }, { "docid": "2fe1d84f09aebb83de06ef2524b3d06f", "score": "0.4852675", "text": "public static function firstValue($array){\n\t\tforeach($array as $elt) return $elt;\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c8f839464b726551d31fd07c95346c67", "score": "0.48409274", "text": "function filterArrayKeyByPattern($array, $pattern) {\n if (!$array) {\n return false;\n }\n\n foreach ($array as $k => $item) {\n\t\t$pos = strpos($k, $pattern);\n\t\t\n\t\tif ($pos !== false) {\n\t\t\t$newArray[$k] = $item;\n\t\t}\t\t \n }\n \n return $newArray;\n}", "title": "" }, { "docid": "63a8c9dbadd51b6e6a1efcf319714e5e", "score": "0.48407114", "text": "public function indexOf(mixed $value): ?int;", "title": "" }, { "docid": "cd6282942223e37c16c7beb2b49d609d", "score": "0.4831825", "text": "public static function extractArrayKeysStartingWith( $array, $pattern )\n {\n $out = array( );\n\n foreach ( $array as $key => $value )\n {\n if ( Tools::startWith( $key, $pattern ) )\n $out[ $key ] = $value;\n }\n\n return $out;\n }", "title": "" }, { "docid": "bf31e684ee74f595269e3ecf826a9604", "score": "0.4825841", "text": "public function get_pattern()\n {\n return $this->pattern;\n }", "title": "" }, { "docid": "74bc8b561c46decf6be643b735974864", "score": "0.48049912", "text": "public function indexOf($value)\n {\n $firstIndex = array_search($value, $this->sessionData);\n if ($firstIndex === false) {\n $firstIndex = -1;\n }\n \n return $firstIndex; \n }", "title": "" }, { "docid": "70ac62db8801f1d864a01321bed297fe", "score": "0.47995955", "text": "public function indexOf ($item)\n {\n $index = array_search($item, $this->data);\n return $index === false ? -1 : $index;\n }", "title": "" }, { "docid": "10f6d6b17c5ba8a77ac0a3ad3c3d7522", "score": "0.47655505", "text": "function firstDuplicate($a)\n{\n $index = [];\n $count = count($a);\n for($i = 0; $i < $count; $i++)\n for($j = 0; $j < $count; $j++)\n {\n if($i == $j)\n {\n continue;\n }\n if($a[$i] == $a[$j]){\n $index[$j] = $a[$j];\n }\n }\n\n if (count($index) < 1)\n return -1;\n else {\n ksort($index);\n return (reset($index));\n }\n}", "title": "" }, { "docid": "55350980f5d0ca74c8d4769478824eb6", "score": "0.4759581", "text": "function searchIndex($array, $id){\n\t$i = 0;\n\t$length = count($array);\n\t$result = -1;\n\twhile ($i < $length && $array[$i]['id'] != $id){\n\t\t$i++;\n\t}\n\tif($i < $length){\n\t\t$result = $i;\n\t}\n\t\n\treturn $result;\n}", "title": "" }, { "docid": "f016cb6e2691a9e522c6cdca06e57003", "score": "0.47536162", "text": "public function getPattern() {}", "title": "" }, { "docid": "688a8c1a6191d1af0257bb3e28f68ac5", "score": "0.47286364", "text": "public function getPattern(): ?string\n {\n return $this->pattern;\n }", "title": "" }, { "docid": "48f4ceb13046d4f98c76beb6e690d61a", "score": "0.4727805", "text": "public function indexOf($value);", "title": "" }, { "docid": "be238bcdf9f08f8572b7235ac99dbc14", "score": "0.47260767", "text": "final public function getArrayIndex(): ?int\n {\n return $this->arrayIndex;\n }", "title": "" }, { "docid": "7f100c2440eb250fcdfd10756e27646f", "score": "0.47258753", "text": "public static function indexOf($c, $a){\n\t\tfor($i = count($a) - 1; $i >= 0; $i--)\n\t\t\tif( $a[$i]->equals($c) )\n\t\t\t\treturn $i;\n\t\treturn -1;\n\t}", "title": "" }, { "docid": "113986ac25404452e847d3bd4f542e98", "score": "0.47255123", "text": "public function getStartIndex();", "title": "" }, { "docid": "1f85d213c11ac39061bf709e3da24d4f", "score": "0.47249866", "text": "function parsePattern($pattern)\n{\n $data = array();\n \n $lines = explode(\"\\n\", $pattern);\n $row = 0;\n foreach ($lines as $line) {\n $row++;\n $cells = str_split($line, 1);\n $col = 0;\n foreach ($cells as $content) {\n $col++;\n $content = trim($content);\n if (!empty($content)) {\n $data[\"$row:$col\"] = 1;\n }\n }\n }\n return $data;\n}", "title": "" }, { "docid": "620a1178b5fd09cf19ec8b4770977442", "score": "0.47223747", "text": "protected function realiseFirstElement(): ?string\n {\n $safeKey = null;\n\n if (count($this->array) == 0) {\n if ($this->lazyTail->valid()) {\n $safeKey = $this->realiseCurrentPair();\n } else {\n $this->clearIndexIfAllKeysValid();\n }\n } elseif ($this->lazyTail->valid()) {\n $safeKey = array_keys($this->array)[0];\n }\n\n return $safeKey;\n }", "title": "" }, { "docid": "f5b55f2fc98eca58f7b4f07c663467fa", "score": "0.47032028", "text": "public function firstMatch(array $conditions);", "title": "" }, { "docid": "e3c42a1462d03574652d544db080b125", "score": "0.46969038", "text": "public static function first($array)\n {\n $newArr = array_slice($array, 0, 1);\n\n return !empty($newArr[0]) ? $newArr[0] : false;\n }", "title": "" }, { "docid": "ac924eec679e79ca17f96db564b6398b", "score": "0.4693125", "text": "function getKeyIndex($matchVal, $funcName)\n {\n $key = -1;\n if ($this->regxFlag=='true') {\n //For appended with '_'//\n if (in_array(\n $matchVal.'*',\n $this->functionData['function']\n )) {\n /* Check for pattern in function array */\n $key = array_search(\n $matchVal.'*',\n $this->functionData['function']\n );\n }\n } else {\n if (in_array($funcName, $this->functionData['function'])) {\n /* Check for name in function array */\n $key = array_search(\n $funcName,\n $this->functionData['function']\n );\n }\n }\n return $key;\n }", "title": "" }, { "docid": "e62883a84d6b84676965bba493a6a8dd", "score": "0.46922153", "text": "public function testIndexOf() {\n\t\t$array = array(1, 2, 3, 4, 5);\n\t\t$result = _::indexOf($array, 4);\n\t\t$this->assertEquals(3, $result);\n\n\t\t// test not finding an element's index\n\t\t$result = _::indexOf($array, 6);\n\t\t$this->assertEquals(-1, $result);\n\t}", "title": "" }, { "docid": "4377708d0c39eee2e219c3a6af45ffd3", "score": "0.4688135", "text": "public function getSmallestPeakIndex()\n {\n $PeaksNoIdx = array_values($this->arrayPeaks);\n if (!empty($PeaksNoIdx)) {\n $LfltSmallestY = $PeaksNoIdx[0];\n $lReturnIdx = 0;\n for ($i = 1; $i < $this->ListLength; $i++) {\n if ($PeaksNoIdx[$i] < $LfltSmallestY) {\n $LfltSmallestY < $PeaksNoIdx[$i];\n $lReturnIdx = $i;\n }\n }\n return $lReturnIdx;\n }\n \n }", "title": "" }, { "docid": "bf6d56dd18aea9adf33430db7e72925d", "score": "0.4681724", "text": "function firstCharOf($s1, $chars){\n\t\t$array = preg_split('//u', $s1, -1, PREG_SPLIT_NO_EMPTY);\n\t\tforeach($array as $ch){\n\t\t\tif(in_array($ch, $chars)){\n\t\t\t\treturn $ch;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}", "title": "" }, { "docid": "3cff29dc998fe66fcdcd85af4033da1d", "score": "0.4676566", "text": "function indexOccurancesOfStringInArray($arr, $str)\n{\n\t$indexs = [];\n\tforeach ($arr as $i => $val) {\n\t\tif ($val === $str) {\n\t\t\t$indexs[] = $i;\n\t\t}\n\t}\n\treturn $indexs;\n}", "title": "" }, { "docid": "66b6274a9d45b0d94eecb1c68607e457", "score": "0.46635613", "text": "private function findInitialTokenPosition( $input )\n\t{\n\t\t$pos = 0;\n\n\t\t// search for first valid annotation\n\t\twhile ( ( $pos = strpos( $input, '@', $pos ) ) !== false )\n\t\t{\n\t\t\t// if the @ is preceded by a space or * it is valid\n\t\t\tif ( $pos === 0 || $input[$pos - 1] === ' ' || $input[$pos - 1] === '*' )\n\t\t\t\treturn $pos;\n\n\t\t\t$pos++;\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "22ad24e9575d95d6917a87c6f6b79a4d", "score": "0.46581018", "text": "public function getFirstMarker()\n {\n $this->currentMarker = 0;\n return $this->getCurrentMarker();\n }", "title": "" }, { "docid": "2d3c449a41b6c208800970588724b280", "score": "0.46543968", "text": "private static function arrayCallbackSearch(array $arr, callable $searchCallback): ?int\n\t{\n\t\tforeach ($arr as $key => $item) {\n\t\t\tif (\\call_user_func($searchCallback, $item, $key)) {\n\t\t\t\treturn $key;\n\t\t\t}\n\t\t}\n\n\t\treturn null;\n\t}", "title": "" }, { "docid": "aadba709fc5fe2d7f89cc372295367aa", "score": "0.46459606", "text": "function indexOf ($value, $strict = true)\n {\n return array_search ($value, $this->A, $strict);\n }", "title": "" }, { "docid": "845447fb0dad936f250b44a256304f2a", "score": "0.46349597", "text": "function findFirstMatchingStatement($subject, $predicate, $object, $offset = 0) \r\n\t{\r\n\t\t//Call the _infFind method, but let it stop, if it finds the \r\n\t\t//first match.\t\r\n\t \t$res= $this->_infFind($subject,$predicate,$object,array(),true,$offset);\r\n\t \t\t\r\n\t\tif (isset($res[$offset]))\r\n\t\t{\r\n\t\t\treturn $res[$offset];\r\n\t\t} else \r\n\t\t{\r\n\t\t\treturn NULL;\r\n\t\t};\r\n\t}", "title": "" }, { "docid": "0d93671dc51ed1b8d8d31606dc48adf6", "score": "0.46312255", "text": "protected function getMappingKey($array) {\n return key(array_filter($array));\n }", "title": "" }, { "docid": "4502b31f1c91cfb453d22237038f1304", "score": "0.46299052", "text": "public function getPattern();", "title": "" }, { "docid": "4502b31f1c91cfb453d22237038f1304", "score": "0.46299052", "text": "public function getPattern();", "title": "" }, { "docid": "b876965df8a9ff8df8c27fabe9b62939", "score": "0.4626429", "text": "public function getPattern($pattern_key)\n {\n return $this->pattern[$pattern_key];\n }", "title": "" }, { "docid": "ec2185ac77cd53eea1703529c43045d3", "score": "0.4622571", "text": "public function first() {\n\n\t\treturn $this->search[0];\n\n\t}", "title": "" }, { "docid": "9f29e1d10beb9906048d639b3a4a65ff", "score": "0.4621697", "text": "public function GetFirstIndexInPage()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return ($this->GetResultsPerPage() * ($this->GetPageNo() - 1)) + 1;\n }", "title": "" }, { "docid": "af3ce5405b7290d95ba5aac199d6088f", "score": "0.46192184", "text": "public function array_key_index(&$arr, $key) {\n\t\t$i = 0;\n\t\t$arr_keys = array_keys($arr);\n\t\tforeach ($arr_keys as $k) {\n\t\t\tif ($k == $key) {\n\t\t\t\treturn $i;\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t}", "title": "" }, { "docid": "4af1c00e8a7ee353344da1dac562f735", "score": "0.46188876", "text": "public function findNext(File $file, $pattern);", "title": "" }, { "docid": "a506138d3a20fb2e8de1d7f118240bda", "score": "0.4612533", "text": "public function indexOfObject($object)\n {\n // RsoNumber\n return array_search($object, $this->array);\n }", "title": "" }, { "docid": "e62d40dba8b4938dc67b28b847e7b1c7", "score": "0.4609929", "text": "private static function findMark(string $pattern, array $lines): array\n {\n $tail = array_reverse(array_slice($lines, -5, 5, true), true);\n foreach ($tail as $key => $line)\n {\n if (preg_match($pattern, $line, $matches)===1)\n {\n return [$key, $matches];\n }\n }\n\n return [null, null];\n }", "title": "" }, { "docid": "42bd67f178417ac85cc058762ad17d4c", "score": "0.46066862", "text": "public function search($array, $value)\n {\n $n = count($array);\n for ($i = 0; $i < $n; $i++) {\n if ($array[$i] == $value) {\n return $i;\n }\n }\n\n return -1;\n }", "title": "" }, { "docid": "265550c44cc65c0edb2f3f85c1d080eb", "score": "0.4601277", "text": "public function getPattern()\n {\n return $this->_pattern;\n }", "title": "" }, { "docid": "2b4ed30dca9d85873764b7e31cf43f81", "score": "0.46010053", "text": "static public function regExpFindFirst($subject, $predicate, $object, $attrs=0, $haystack=false) {\r\n $found=array_shift(SimpleRdf::regExpFind($subject, $predicate, $object, $attrs, 1, $haystack));\r\n return $found;\r\n }", "title": "" }, { "docid": "0fa5aff936c32f4ac4e1e79cc91637a8", "score": "0.46001744", "text": "function preg_match_names(string $pattern, string $subject, array|null &$match, int $flags = 0, int $offset = 0): int|false\n{\n $res =@ preg_match($pattern, $subject, $match, $flags, $offset);\n\n // Act as original.\n if ($res === false) {\n $message = preg_error_message(func: 'preg_match');\n trigger_error(sprintf('%s(): %s', __function__, $message), E_USER_WARNING);\n } else {\n // Select string (named) keys.\n $match = array_filter($match, 'is_string', 2);\n }\n\n return $res;\n}", "title": "" }, { "docid": "8b20459386a9179bf873863699616343", "score": "0.45971456", "text": "public function firstKey(): ?int;", "title": "" }, { "docid": "41bf9230a3be149939ca769679c3595b", "score": "0.45962605", "text": "function search($array, $value) {\n // check for empty array\n if (empty($array)) {\n return;\n }\n // iterate through array, looking for the value\n // if value found, return the index.\n for ($i=0; $i < sizeof($array); $i++) { \n if ($value == $array[$i]) {\n return $i;\n }\n }\n}", "title": "" }, { "docid": "785862b15555b3609effa912ae80c839", "score": "0.4587388", "text": "public function preg_index($number)\n {\n }", "title": "" }, { "docid": "1ca6333d35299e4bdb8c0f41e31eab28", "score": "0.45769033", "text": "function strinarray($searchtext, $dataarray)\r\n{\r\n$i=0;\r\nforeach($dataarray as $linedata) {\r\n if(strstr($linedata,$searchtext)) break;\r\n $i++;\r\n };\r\nreturn $i;\r\n}", "title": "" }, { "docid": "bd1e2a5623cfce6ff6d9d190b9eefd47", "score": "0.4576604", "text": "function title( &$contentObjectAttribute )\r\n {\r\n $classAttribute =& $contentObjectAttribute->contentClassAttribute();\r\n $classContent = $classAttribute->content();\r\n $content = $contentObjectAttribute->content();\r\n $index = \"\";\r\n\r\n if( is_array( $classContent['pattern_selection'] ) and count( $classContent['pattern_selection'] ) > 0 )\r\n {\r\n $res = @preg_match( $classContent['regexp'], $content, $matches );\r\n\r\n if( $res !== false )\r\n {\r\n foreach( $classContent['pattern_selection'] as $patternIndex )\r\n {\r\n if( isset( $matches[$patternIndex] ) )\r\n {\r\n $index .= $matches[$patternIndex];\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n $index = $content;\r\n }\r\n\r\n return $index;\r\n }", "title": "" }, { "docid": "33ebd9c63674d09677494a5773605341", "score": "0.45759222", "text": "public function getPattern() {\n\t\treturn $this->pattern;\n\t}", "title": "" }, { "docid": "81143b5ea4e71cc7f43117d812ce41c5", "score": "0.45723122", "text": "public function firstKey(): int|string|null\n {\n return array_key_first($this->data);\n }", "title": "" }, { "docid": "3915020d07758ca0974715253854ad01", "score": "0.45711696", "text": "public static function first(array $array)\n {\n return !empty($array) ? reset($array) : null;\n }", "title": "" }, { "docid": "d002e2eb5e3611c3a8755f65691c4000", "score": "0.4570814", "text": "function preg_grep(string $pattern, array $array, int $flags = 0): array\n{\n error_clear_last();\n $safeResult = \\preg_grep($pattern, $array, $flags);\n if ($safeResult === false) {\n throw PcreException::createFromPhpError();\n }\n return $safeResult;\n}", "title": "" }, { "docid": "a9011982d85b6d8c88e33959786c4589", "score": "0.4569232", "text": "function preg_match_all(string $pattern, string $subject, ?array &$matches = null, int $flags = 0, int $offset = 0): ?int\n{\n error_clear_last();\n $safeResult = \\preg_match_all($pattern, $subject, $matches, $flags, $offset);\n if ($safeResult === false) {\n throw PcreException::createFromPhpError();\n }\n return $safeResult;\n}", "title": "" }, { "docid": "a27650da714519291a6a6c2c016d7c86", "score": "0.4565943", "text": "function first(array $array): mixed\n{\n return $array ? reset($array) : null; // No falses.\n}", "title": "" }, { "docid": "63eaaf7c6f5f8c5f03ff8d8e199fb4c4", "score": "0.45525748", "text": "function array_first($array, $callback, $default = null)\n {\n return Arr::first($array, $callback, $default);\n }", "title": "" }, { "docid": "213367f0037c9bc338e389d21693cf95", "score": "0.45516214", "text": "public function indexOfArray($arrayExpression, $searchExpression, $start = null, $end = null): static;", "title": "" }, { "docid": "25ca4fef5010444693d5c79721c1040d", "score": "0.45464122", "text": "public function first() {\n if (sizeof($this) < 1) return null;\n $keys = array_keys($this);\n return $this[$keys[0]];\n }", "title": "" }, { "docid": "7e4425e70e6048c7ae5fc47cd39a77fa", "score": "0.45463365", "text": "public function indexOf($value)\n {\n return array_search($value, $this->stack, true);\n }", "title": "" }, { "docid": "60e35b64e043ec505c801364c0bc14e9", "score": "0.45459947", "text": "public function findArrayMininum($servicesArr)\n {\n $counter = 1;\n $minIndex = [];\n foreach ($servicesArr as $value) {\n if ($counter == 1) {\n $minimum = $value['rate'];\n $minIndex = $value;\n $counter = 0;\n } else {\n if ($value['rate'] < $minimum) {\n $minimum = $value['rate'];\n $minIndex = $value;\n }\n }\n }\n return $minIndex;\n }", "title": "" }, { "docid": "62475e38c1120dc5dad237b3400348dd", "score": "0.45446423", "text": "public function indexOf($value): ?int\n {\n $i = 0;\n foreach ($this->items as $key => $iValue) {\n if ($value === $iValue) {\n return $i;\n }\n ++$i;\n }\n\n return null;\n }", "title": "" }, { "docid": "41eba9e734f8be8c8171ff6b7c887c89", "score": "0.45330268", "text": "public function getStartIndex()\n {\n return $this->start_index;\n }", "title": "" }, { "docid": "06a1d8d190af8c2eda0c3e4e78129e84", "score": "0.4523506", "text": "private function findOffset()\n {\n $this->seek(0);\n\n $offset = 0;\n\n while (!$this->isEndOfFile()) {\n if (strtolower($this->read(1)) === self::$sequence[$offset]) {\n $offset++;\n } else {\n $offset = 0;\n }\n\n if (!isset(self::$sequence[$offset + 1])) {\n break;\n }\n }\n\n $this->seek(1, SEEK_CUR);\n\n if ($offset === (count(self::$sequence) - 1)) {\n $position = $this->getPosition();\n\n if (\"\\r\\n\" === $this->read(2)) {\n return $position + 2;\n }\n\n return $position;\n }\n\n return null;\n }", "title": "" } ]
54b48b38ff7497a11cd2b9279c7d2676
This is the action to delete
[ { "docid": "1d61e5f977d7c459dacb37e2226563b6", "score": "0.0", "text": "public function actionDelete()\n\t{\t\t\n\t\t// current category\n\t\t$ids = $_POST['ids'];\n\t\t\n\t\tif (is_array($ids) && sizeof($ids)) {\n\t\t\tforeach ($ids as $id) {\n\t\t\t\tTbl_CustomerType::model()->deleteByPk($id);\n\t\t\t\tTbl_Customer::model()->updateAll(array('id_customer_type'=>0),'id_customer_type=:id_customer_type',array(':id_customer_type'=>$id));\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "8afeebf5c4b8dee434915b00d9468923", "score": "0.85833955", "text": "public function deleteAction()\n {\n \t\n }", "title": "" }, { "docid": "38cabc6063731a7a5432618d7f469fee", "score": "0.8482445", "text": "public function deleteAction()\n\t{\n\t\t \n\t}", "title": "" }, { "docid": "b5eeac180710f36bbf6a24c30075d2ce", "score": "0.8446204", "text": "public function deleteAction()\n {\n }", "title": "" }, { "docid": "b5eeac180710f36bbf6a24c30075d2ce", "score": "0.8446204", "text": "public function deleteAction()\n {\n }", "title": "" }, { "docid": "b5eeac180710f36bbf6a24c30075d2ce", "score": "0.8446204", "text": "public function deleteAction()\n {\n }", "title": "" }, { "docid": "af6a5ef0c9685f15589914ec8e476b33", "score": "0.8398692", "text": "public function actionDelete()\n\t{\n\t}", "title": "" }, { "docid": "d6252b1beb3dbc05149cb14e3e09a969", "score": "0.8360653", "text": "public function deleteAction()\n\t{\n\t}", "title": "" }, { "docid": "2723a526de641f4dc6848bcd528fd718", "score": "0.8349653", "text": "public function deleteAction() {\n\t\t// TODO: Implement deleteAction() method.\n\t}", "title": "" }, { "docid": "7e97dea970ab570d8238e28ee45efcba", "score": "0.8343057", "text": "abstract public function deleteAction();", "title": "" }, { "docid": "874c822061f1b947b8abd69f5b5d326d", "score": "0.811367", "text": "public function deleteAction()\n {\n $this->em->entry->delete(\n $this->request->fromGet()->get('id')\n );\n\n $this->indexAction();\n }", "title": "" }, { "docid": "84c0a9a6e4b28d56b11d43f317dbe2f4", "score": "0.80950505", "text": "public function deleteAction() {\n parent::deleteAction();\n }", "title": "" }, { "docid": "19e71d726180d8ee46726888ccf1a0d9", "score": "0.80633366", "text": "public function deleteAction($id);", "title": "" }, { "docid": "b36f2d8357fa62cb723d1c879d25ebfc", "score": "0.7971199", "text": "public function Delete()\n {\n $this->routeAuth();\n\n $this->standardAction('Delete');\n }", "title": "" }, { "docid": "b36f2d8357fa62cb723d1c879d25ebfc", "score": "0.7971199", "text": "public function Delete()\n {\n $this->routeAuth();\n\n $this->standardAction('Delete');\n }", "title": "" }, { "docid": "b3f16c0804de89ad65213508d89282c1", "score": "0.7951938", "text": "public function deleteAction()\n {\n\n $this->setHeader();\n\n $modelName = $this->getDefaultModel(true);\n\n $request = $this->getRestRequest();\n\n $dataSet = $request->getParams(true);\n\n if (!is_array($dataSet)) {\n $dataSet = array($dataSet);\n }\n\n foreach ($dataSet as $data) {\n\n $result = new RestResponseResult($this->getRestRequest()->getMethod());\n\n $result->setModel($modelName);\n\n if (isset($data['id'])) {\n\n $genericModel = $this->getDefaultModel();\n $model = $genericModel->findFirst(\"id = {$data['id']}\");\n\n if ($model) {\n\n $model->status = RestModel::STATUS_DELETED;\n\n if ($model->save()) {\n $result->setCode(\"200\");\n $result->setStatus('deleted');\n $result->setResult($model->dump());\n } else {\n $result->setCode(\"400\");\n $result->setStatus('bad delete request');\n $result->setResult($model->getMessages());\n }\n } else {\n $result->setCode(\"404\");\n $result->setStatus('Not Found');\n $result->setResult(\n [\"There is no $modelName with id {$data['id']} avilable\"]\n );\n }\n\n }\n $this->getRestResponse()->addResult($result);\n }\n\n echo $this->getRestResponse();\n }", "title": "" }, { "docid": "843ecd8dccfa006bf84d9d1649641284", "score": "0.7950892", "text": "public function deleteAction() \n\t\t{\n\t\t\t$this->logger->log($this->tableName.\" Delete Action Called: \", Zend_Log::DEBUG);\t\n\n\t\t}", "title": "" }, { "docid": "0eb4b2cd5a9f96b610355cb566245f51", "score": "0.79367936", "text": "public function actionDelete()\n {\n return $this->render('delete');\n }", "title": "" }, { "docid": "1efdd96fdf5fd5bbe7edc236b21c09d0", "score": "0.7912521", "text": "public function deleteAction() {\n\t\techo \"TODO: deleteAction()\";\n\t}", "title": "" }, { "docid": "0ecbb087886f98e4ac75cf2e91be6fb7", "score": "0.7879751", "text": "public function actionDelete()\n {\n if ($this->checkToken() and $_SERVER['REQUEST_METHOD'] == 'DELETE') {\n $_DELETE = array();\n parse_str(file_get_contents(\"php://input\"), $_DELETE);\n header(\"HTTP/1.1 200 OK\");\n if ($this->isIdValidForUpdating($_DELETE['id'])) {\n $query = \"DELETE FROM blog WHERE id = \" . $_DELETE['id'];\n mysqli_query($this->myDB->connect(), $query);\n }\n }\n else {\n header(\"HTTP/1.1 404 Not Found\");\n }\n }", "title": "" }, { "docid": "4aa2e289ccc8856c4c9e89349b50a29a", "score": "0.7826765", "text": "public function delete() {\n }", "title": "" }, { "docid": "bb95cc530b5fbb74d64948dadb89d02a", "score": "0.7806346", "text": "public function delete(){\n\n\t \t}", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.78009754", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "857ca450b4133a6bb916ed82187d9907", "score": "0.78009754", "text": "public function delete()\n {\n \n }", "title": "" }, { "docid": "0d0727c41c09538e3c5053ad5a5fa5f6", "score": "0.7791079", "text": "public function delete() {\n\n\t}", "title": "" }, { "docid": "d463c51bdad7a74e123a4207da3b92cc", "score": "0.7779637", "text": "public function deleteAction()\n\t{\n\t\t$this->setLayout('blanco');\n\t\t$csrf = $this->_getSanitizedParam(\"csrf\");\n\t\tif (Session::getInstance()->get('csrf')[$this->_csrf_section] == $csrf ) {\n\t\t\t$id = $this->_getSanitizedParam(\"id\");\n\t\t\tif (isset($id) && $id > 0) {\n\t\t\t\t$content = $this->mainModel->getById($id);\n\t\t\t\tif (isset($content)) {\n\t\t\t\t\t$uploadImage = new Core_Model_Upload_Image();\n\t\t\t\t\tif (isset($content->revista_imagen) && $content->revista_imagen != '') {\n\t\t\t\t\t\t$uploadImage->delete($content->revista_imagen);\n\t\t\t\t\t}\n\t\t\t\t\t$uploadDocument = new Core_Model_Upload_Document();\n\t\t\t\t\tif (isset($content->revista_pdf) && $content->revista_pdf != '') {\n\t\t\t\t\t\t$uploadDocument->delete($content->revista_pdf);\n\t\t\t\t\t}\n\t\t\t\t\t$this->mainModel->deleteRegister($id);$data = (array)$content;\n\t\t\t\t\t$data['log_log'] = print_r($data,true);\n\t\t\t\t\t$data['log_tipo'] = 'BORRAR REVISTA';\n\t\t\t\t\t$logModel = new Administracion_Model_DbTable_Log();\n\t\t\t\t\t$logModel->insert($data); }\n\t\t\t}\n\t\t}\n\t\theader('Location: '.$this->route.''.'');\n\t}", "title": "" }, { "docid": "dec8008a7ff4971074f78c213ebaaa3e", "score": "0.7760097", "text": "public function deleting()\n {\n //\n }", "title": "" }, { "docid": "278cb19ead8eedd1372306bb54f1bfdc", "score": "0.77544254", "text": "public function deleteAction()\n\t{\n\t\t$this->setLayout('blanco');\n\t\t$csrf = $this->_getSanitizedParam(\"csrf\");\n\t\tif (Session::getInstance()->get('csrf')[$this->_csrf_section] == $csrf ) {\n\t\t\t$id = $this->_getSanitizedParam(\"id\");\n\t\t\tif (isset($id) && $id > 0) {\n\t\t\t\t$content = $this->mainModel->getById($id);\n\t\t\t\tif (isset($content)) {\n\t\t\t\t\t$uploadImage = new Core_Model_Upload_Image();\n\t\t\t\t\tif (isset($content->publicidad_imagen) && $content->publicidad_imagen != '') {\n\t\t\t\t\t\t$uploadImage->delete($content->publicidad_imagen);\n\t\t\t\t\t}\n\t\t\t\t\t$this->mainModel->deleteRegister($id);$data = (array)$content;\n\t\t\t\t\t$data['log_log'] = print_r($data,true);\n\t\t\t\t\t$data['log_tipo'] = 'BORRAR BANNER';\n\t\t\t\t\t$logModel = new Administracion_Model_DbTable_Log();\n\t\t\t\t\t$logModel->insert($data); }\n\t\t\t}\n\t\t}\n\t\theader('Location: '.$this->route.''.'');\n\t}", "title": "" }, { "docid": "0164a547fe92b83c542fbcaadcc5f01a", "score": "0.77541214", "text": "public function delete() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "6440f5e43562646b46880da92bd96983", "score": "0.77506125", "text": "public function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete() !== false ? $this->success() : $this->fail();\n }", "title": "" }, { "docid": "4ce485190ebf2269c22c0961a0b2ad32", "score": "0.7748665", "text": "public function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete();\n }", "title": "" }, { "docid": "9fb4f7fee73fc3624d4cb04174246ceb", "score": "0.77433753", "text": "public function actionDelete()\n\t{\n if (isset($_GET['id'])) {\n \n $id = $_GET['id'];\n\t\t$this->loadModel($id)->delete();\n\n }\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if(!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('site/index'));\n\t}", "title": "" }, { "docid": "7313589621da47b39ac136984be9c5dd", "score": "0.77425116", "text": "protected function delete() {\n }", "title": "" }, { "docid": "eb6afc1082959e681bf43a0bee6b1de0", "score": "0.7733443", "text": "public function delete(){\r\n \r\n }", "title": "" }, { "docid": "7dc23ece5474fe4d6c55108a8f766114", "score": "0.77217185", "text": "public function actionDelete()\n {\n extract(Yii::$app->request->post());\n $this->findModel($list, $item)->delete();\n }", "title": "" }, { "docid": "f5477ebaa2369c328b21214f5b4f5527", "score": "0.7719636", "text": "public static function delete()\n{\n$record = todos::findOne($_REQUEST['id']);\n$record->delete();\nheader(\"Location: index.php?page=tasks&action=all\");\n}", "title": "" }, { "docid": "443958d13cc7da830719a75e1ac5f598", "score": "0.7709926", "text": "public function deleteAction()\n {\n $this->getResponse()->setHttpResponseCode(501);\n $this->_helper->json->sendJson( array( 'result' => 'error' ), false, true );\n }", "title": "" }, { "docid": "412186a13bd0473797afc40b9f182831", "score": "0.7700206", "text": "public function deleteAction()\n {\n return $this->notFoundAction();\n }", "title": "" }, { "docid": "4039edc0321310d62683cc7c57f8dc26", "score": "0.76692784", "text": "public static function delete()\n {\n // cnx à la bdd\n $bdd = new Database();\n $cnx = $bdd->getCnx();\n $delete=htmlspecialchars($_GET['id']);\n //préparation\n\n if (array_key_exists('id', $_GET) && ctype_digit($delete)) {\n\n $query = $cnx->prepare(\"DELETE FROM `principeActif` WHERE id = ?\");\n $query->execute([$delete]);\n\n header(\"Location: index.php?controller=principe&action=admin\");\n }\n }", "title": "" }, { "docid": "c9a09e565ae479c530b2a42291837c91", "score": "0.76684225", "text": "public function delete() {\n\n }", "title": "" }, { "docid": "5fc9fbd53ce1a46a25d762aa8bee00df", "score": "0.7664719", "text": "public function actionDelete() {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n\n //return $this->redirect(['index']);\n }", "title": "" }, { "docid": "c7bb26bc700d22b92bc2656bdf262244", "score": "0.764414", "text": "public function delete()\n {\n //\n }", "title": "" }, { "docid": "5c3aa826e9247b6b27e384008de51435", "score": "0.764163", "text": "public function deleteAction() {\n $id = $this->_getParam('id', 0);\n $token = $this->_getParam('token', 0);\n if (ZendX_Utilities_SecurityWSCheck::isValid($token)) {\n $this->view->id = $id;\n $this->view->message = sprintf('Resource #%s was Deleted', $id);\n $this->_response->ok();\n } else {\n $this->view->message = sprintf('Forbidden', $id);\n $this->_response->forbidden();\n }\n }", "title": "" }, { "docid": "c6a4c360d36fda5d5717c936ddfb81c4", "score": "0.7635063", "text": "public function deleteAction ()\r\n {\r\n $this->view->id = (int) $this->_getParam('id');\r\n $HeadlinesModel = new Admin_Model_Headlines();\r\n $this->auth_session->deleteCrsf = sha1(microtime(TRUE));\r\n $this->view->csrf = $this->auth_session->deleteCrsf;\r\n $this->view->canDelete = $HeadlinesModel->canModify(\r\n $this->auth_session->username, $this->view->id);\r\n }", "title": "" }, { "docid": "697fca7facc4fff8c145e89d8c34b44b", "score": "0.76299256", "text": "public function actionDelete()\n {\n $id = Yii::$app->request->get('id', 0);\n $this->findModel($id)->delete();\n $this->findAuth($id)->delete();\n \n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "e8e06da3052fd781641802b42e5c18d5", "score": "0.76147217", "text": "public function delete () {\n\n\t}", "title": "" }, { "docid": "0bec2d6571d80b69a639260aa7ccc795", "score": "0.7607737", "text": "public function actionDelete() {\n $id = (int) $_POST['id'];\n $this->loadModel($id)->delete();\n echo 1;\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "63ec886596fa90e6a98d8e7b252aa742", "score": "0.7599727", "text": "public function delete()\n {\n }", "title": "" }, { "docid": "bb32f6ccca14c057a9e9f3f85d8aab16", "score": "0.75938594", "text": "function action_delete()\n\t\t{\n\t\t\t$request = Request::init();\n\t\t\t$idStud = $request->get_id();\n\t\t\t$this->model->delete_students($idStud);\n\t\t\t$data=$this->model->get_data();\n\t\t\t\n\t\t\t$host = 'http://'.$_SERVER['HTTP_HOST'].'/';\n\t\t\theader('Location:'.$host.'');\n\t\t}", "title": "" }, { "docid": "6f715039d3e5e755cfa2ab85f5687700", "score": "0.75801945", "text": "public function deleteAction() {\n $this->getResponse()->setHttpResponseCode(403);\n }", "title": "" }, { "docid": "50e0460d52624285cdab99bcffe1a5b8", "score": "0.7579699", "text": "public function deletion();", "title": "" }, { "docid": "bf6a4c3ff3158a90aa7229abaa8f32ac", "score": "0.7555305", "text": "public function actionDelete() {\n $id = Yii::$app->request->post('id');\n $this->findModel($id)->delete();\n Tbsritemdetail2temp::deleteAll(['SRID' => $id]);\n // return $this->redirect(['index']);\n }", "title": "" }, { "docid": "a39a1ec33922da6b23dd5e1165ac2985", "score": "0.7551547", "text": "public function actionDelete()\n {\n $this->renderLayout = false;\n\n if (!empty(AppCore::$request->post)) {\n $vacationId = (int)AppCore::$request->post['id'];\n $vacation = Vacation::findById($vacationId);\n if ($vacation->deleteRequest()) {\n AppCore::$response->sendResponse(200, '');\n } else {\n AppCore::$response->sendResponse(400, '');\n }\n }\n\n AppCore::$response->sendResponse(400, 'post');\n }", "title": "" }, { "docid": "8cfe052e79e1a3a2c26802fd7060383f", "score": "0.754099", "text": "public function deleteAction() {\n //return $this->render('user/list.html.twig');\n }", "title": "" }, { "docid": "284ced72f559eb26e994cd226f425cbd", "score": "0.7537843", "text": "function action_delete() {\n $id = required_param('id', PARAM_INT);\n\n if(empty($id)) {\n print_error('invalid_id');\n }\n\n $obj = new $this->data_class($id);\n\n $this->print_delete_form($obj);\n }", "title": "" }, { "docid": "a04fd7b4c87ef93464957ffd39ac1077", "score": "0.7532263", "text": "public function actionDelete()\n {\n echo Api::internalServerError();\n }", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "573f58d57c5b1333e4a2ddf6048545ec", "score": "0.7531029", "text": "public function delete();", "title": "" }, { "docid": "839346761070b505c53d942c20a29f9a", "score": "0.7516754", "text": "public function deleteAction(){\n\t\tif( $this->getRequest()->getParam(\"id\") > 0 ) {\n\t\t\ttry {\n\t\t\t\t$model = Mage::getModel(\"testimonial/vishaltestimonial\");\n\t\t\t\t$model->setId($this->getRequest()->getParam(\"id\"))->delete();\n\t\t\t\tMage::getSingleton(\"adminhtml/session\")->addSuccess(Mage::helper(\"adminhtml\")->__(\"Testimonial successfully deleted\"));\n\t\t\t\t$this->_redirect(\"*/*/\");\n\t\t\t} \n\t\t\tcatch (Exception $e) {\n\t\t\t\tMage::getSingleton(\"adminhtml/session\")->addError($e->getMessage());\n\t\t\t\t$this->_redirect(\"*/*/edit\", array(\"id\" => $this->getRequest()->getParam(\"id\")));\n\t\t\t}\n\t\t}\n\t\t$this->_redirect(\"*/*/\");\n\t}", "title": "" }, { "docid": "86c186b98437b42acffd588221b70c75", "score": "0.74982536", "text": "public function deleteAction($id) {\n echo \"delete action called in IndexController!\";\n }", "title": "" }, { "docid": "36df6a7ca4599a16221026120dbbdbf8", "score": "0.74901074", "text": "public function requestDeleteAction() {\n\n //CHECK FORM VALIDATION\n if ($this->getRequest()->isPost()) {\n //GET DB\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n //GET CLAIM ITEM\n $sitepageclaim = Engine_Api::_()->getItem('sitepage_claim', $this->_getParam('claim_id'));\n if ($sitepageclaim) {\n $sitepageclaim->delete();\n }\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n\n //REDIRECTING\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 20,\n 'parentRefresh' => 20,\n 'messages' => array(Zend_Registry::get('Zend_Translate')->_(''))\n ));\n }\n //OUTPUT\n $this->renderScript('admin-claim/request-delete.tpl');\n }", "title": "" }, { "docid": "58d8fde0787b174350b535ef7c691d84", "score": "0.7466968", "text": "public function deleteAction(){\r\n \t\t\r\n \t\t/**\r\n \t\t * get form_id\r\n \t\t */\r\n \t\t$form_id = $this->getAttribute('form_id');\r\n \t\t\r\n \t\t/**\r\n \t\t * update delete flg\r\n \t\t */\r\n \t\t$this->wpcms->delete($form_id, 'form_tab');\r\n \t\t\r\n \t\t/**\r\n \t\t * update display order\r\n \t\t */\r\n \t\t$this->wpcms->updateDisplayOrder($form_id, 'form_tab');\r\n \t\t\r\n \t\t/**\r\n \t\t * page redirect to index\r\n \t\t */\r\n \t\t$url_array = array($this->module_name);\r\n \t\t$url = $this->makeUrl($url_array);\r\n \t\t$this->redirect($url);\r\n \t\t\r\n \t}", "title": "" }, { "docid": "c15fa6344cfffff968695cb0a937c3c8", "score": "0.74639666", "text": "public function deleteAction()\n {\n // In smoothbox\n $this->_helper->layout->setLayout('admin-simple');\n $id = $this->_getParam('id');\n $this->view->experience_id=$id;\n \n // Check post\n if( $this->getRequest()->isPost() )\n {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n\n //Process delete action\n try\n {\n $experience = Engine_Api::_()->getItem('experience', $id);\n // delete the experience entry into the database\n $experience->delete();\n $db->commit();\n }\n\n catch( Exception $e )\n {\n $db->rollBack();\n throw $e;\n }\n\n // Refresh parent page\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh'=> 10,\n 'messages' => array('')\n ));\n }\n\n // Output\n $this->renderScript('admin-manage/delete.tpl');\n }", "title": "" }, { "docid": "5ed61c6275ac73c64936da1970b83d92", "score": "0.7463923", "text": "public function deleteAction() {\n //retrieve the todo item first\n $todo = TodoItem::getItem($this->_params['todo_id'], $this->_params['username'], $this->_params['userpass']);\n\n //delete the TODO item while passing the username and password to authenticate\n $todo->delete($this->_params['username'], $this->_params['userpass']);\n\n //return the deleted todo item\n //in array format, for display purposes\n return $todo->toArray();\n }", "title": "" }, { "docid": "cf791ddbc1f1d45d1c4ae37674f9925a", "score": "0.7453094", "text": "public function action_delete() {\n\t\t$id = $this->request->param('id');\n\t\t\n\t\t// Load a fairy\n\t\t$fairy = $this->pixie->orm->get('fairy', $id);\n\t\t\n\t\t// If a fairy is not loaded for whatever reason - redirect to the list\n\t\tif (!$fairy->loaded()) {\n\t\t\treturn $this->redirect('/');\n\t\t}\n\t\t\n\t\t// Delete a fairy\n\t\t$fairy->delete();\n\t\t\n\t\t// Redirect back to the list\n\t\t$this->redirect('/');\n\t}", "title": "" }, { "docid": "a5d68f89fb5b7a657125fe89a64b60dc", "score": "0.74506205", "text": "public function deleteAction() {\n\n //SET LAYOUT\n $this->_helper->layout->setLayout('admin-simple');\n\n //GET DIARY ID\n $this->view->diary_id = $diary_id = $this->_getParam('diary_id');\n\n if ($this->getRequest()->isPost()) {\n $db = Engine_Db_Table::getDefaultAdapter();\n $db->beginTransaction();\n try {\n\n //DELETE DIARY CONTENT\n Engine_Api::_()->getItem('siteevent_diary', $diary_id)->delete();\n\n $db->commit();\n } catch (Exception $e) {\n $db->rollBack();\n throw $e;\n }\n $this->_forward('success', 'utility', 'core', array(\n 'smoothboxClose' => 10,\n 'parentRefresh' => 10,\n 'messages' => array('')\n ));\n }\n $this->renderScript('admin-diary/delete.tpl');\n }", "title": "" }, { "docid": "d5f860070d20087d1a0e1a62a7b76ef3", "score": "0.74495643", "text": "public function delete($id){}", "title": "" }, { "docid": "dee951c4ae35d4f9aed728b47ac38ce8", "score": "0.74393976", "text": "public function deletePost() {\n $postId = $this->request->getParameter(\"id\");\n $this->post->delete($postId);\n $this->redirect('Admin','index/');\n }", "title": "" }, { "docid": "9477b44842615e6c6b2d65e7eab33fb1", "score": "0.7437038", "text": "public function delete()\n\t{\n\t\tFoundry::info()->set( $this->getMessage() );\n\n\n\t\t$this->redirect( FRoute::dashboard( array() , false ) );\n\t}", "title": "" }, { "docid": "ea4f8dcc6913b6ff8b258782a9e69bf8", "score": "0.74352694", "text": "public function deleteAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }", "title": "" }, { "docid": "ea4f8dcc6913b6ff8b258782a9e69bf8", "score": "0.74352694", "text": "public function deleteAction() {\n return $this->getResponse()->setHttpResponseCode(403);\n }", "title": "" }, { "docid": "9b2c7eef0e9891244eee17363f21158c", "score": "0.7434169", "text": "protected function deleteAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_DELETE);\n\n if ('DELETE' !== $this->request->getMethod()) {\n return $this->redirect($this->generateUrl('easyadmin', array('action' => 'list', 'entity' => $this->entity['name'])));\n }\n\n $id = $this->request->query->get('id');\n $form = $this->createDeleteForm($this->entity['name'], $id);\n $form->handleRequest($this->request);\n\n if ($form->isValid()) {\n $easyadmin = $this->request->attributes->get('easyadmin');\n $entity = $easyadmin['item'];\n\n $this->dispatch(EasyAdminEvents::PRE_REMOVE, array('entity' => $entity));\n\n $this->executeDynamicMethod('preRemove<EntityName>Entity', array($entity));\n \n //tester s'il s'agit d'une entité de l'utilisateur (User)\n if ($this->entity['name']=='User'){\n //appel méthode pour supprimer dossier de l'utilisateur\n $entity->deleteUploadUserDir();\n }\n $this->em->remove($entity);\n $this->em->flush();\n\n $this->dispatch(EasyAdminEvents::POST_REMOVE, array('entity' => $entity));\n }\n\n $refererUrl = $this->request->query->get('referer', '');\n\n $this->dispatch(EasyAdminEvents::POST_DELETE);\n\n return !empty($refererUrl)\n ? $this->redirect(urldecode($refererUrl))\n : $this->redirect($this->generateUrl('easyadmin', array('action' => 'list', 'entity' => $this->entity['name'])));\n }", "title": "" }, { "docid": "909bf3aecc5d14ead7612f59cf16d34e", "score": "0.7429859", "text": "public function deleteAction() {\n\t\t$id = $this->getInput('id');\n\t\t$info = Lock_Service_Lock::getLock($id);\n\t\tif ($info && $info['id'] == 0) $this->output(-1, '无法删除');\n\t\tLock_Service_SubjectFile::deleteBy(array('lock_id'=>$id));\n\t\t$result = Lock_Service_Lock::deleteBy(array('id'=>$id));\n\t\tif (!$result) $this->output(-1, '操作失败');\n\t\t$this->output(0, '操作成功');\n\t}", "title": "" }, { "docid": "de9c24c32225182e42687fde051a93a0", "score": "0.7416706", "text": "public function DeleteAction()\r\n\t{\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->Publisher->delete($_GET['id']);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "ac468be7bb90144f94545d2294e40092", "score": "0.7415295", "text": "public function deleteAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('application/default', array('controller' => 'substance'));\n }\n \n $request = $this->getRequest();\n if ($request->isPost()) {\n \n // Only perform delete if value posted was 'Yes'.\n $del = $request->getPost('del', 'No');\n if ($del == 'Yes') {\n $id = (int) $request->getPost('id');\n $this->getSubstanceService()->deleteSubstanceById($id);\n }\n\n // Redirect to list of methods\n return $this->redirect()->toRoute('application/default', array('controller' => 'substance'));\n }\n \n // If not a POST request, then render the confirmation page.\n return array(\n 'id' => $id,\n 'substance' => $this->getSubstanceService()->getSubstanceById($id) \n );\n }", "title": "" }, { "docid": "4a40518021d1b0a90dd5d92b58123418", "score": "0.7409992", "text": "public function deleteAction()\n\t {\n\t\t$model = $this->_getModel();\n\t\t$model->deleteBox($this->_request->getParam('boxid'));\n\t\t$this->_redirect('/admin/box/list');\n\t }", "title": "" }, { "docid": "c8c2cb542f309deb436a94bb98d0ba9b", "score": "0.74091464", "text": "public function deleteAction()\n {\n // Gets the Id from the route, which defines the data to delete\n $id = $this->params()->fromRoute('id');\n // Checks if a ID is given\n if ($id)\n {\n // Deletes the data with the given ID from the Database\n $this->getUsersTable()->delete(array('id' => $id));\n }\n // Redirects the User to the View, that shows the User-Table\n if (isset($_SERVER['HTTP_REFERER']))\n $strLastPage = $_SERVER['HTTP_REFERER'];\n else\n $strLastPage = 'http://www.stellenanzeigen-texten.de/check/public/homepage/admin/showusers/1?user_name=&user_adresse=&user_email=&user_firma=';\n return $this->redirect()->toUrl($strLastPage);\n }", "title": "" }, { "docid": "7445ee83848836a999237a4e903b0a92", "score": "0.74085146", "text": "public function delete() {\n if (!empty($_GET[\"name\"])) {\n $this->model::delete($_GET['name']);\n }\n\n $this->route::redirect($this->view->baseUrl);\n }", "title": "" }, { "docid": "1346cad04fb21b557f323570a84bc2e8", "score": "0.7396228", "text": "public function deleteAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n if (!$id) {\n return $this->redirect()->toRoute('exam');\n }\n\n $request = $this->getRequest();\n if ($request->isPost()) {\n $del = $request->getPost('del', 'Non');\n\n if ($del == 'Oui') {\n $id = (int) $request->getPost('id');\n $this->getExamTable()->deleteExam($id);\n }\n\n // Redirect to list of exams\n return $this->redirect()->toRoute('exam');\n }\n\n return array(\n 'id' => $id,\n 'exam' => $this->getExamTable()->getExam($id)\n );\n }", "title": "" } ]
20d1eda96b275a9020def2501d90da27
Creates a new Jianding model. If creation is successful, the browser will be redirected to the 'view' page.
[ { "docid": "82c6de495ae80e782aca0266c8b133d4", "score": "0.75971407", "text": "public function actionCreate()\n {\n $model = new Jianding();\n\n if ($model->load(Yii::$app->request->post())) {\n $educationsj = Yii::$app->request->post('educationsj');\n $educationxx = Yii::$app->request->post('educationxx');\n $educationzy = Yii::$app->request->post('educationzy');\n $educationxl = Yii::$app->request->post('educationxl');\n\n $jobsj = Yii::$app->request->post('jobsj');\n $jobxx = Yii::$app->request->post('jobxx');\n $jobzy = Yii::$app->request->post('jobzy');\n\n foreach ($educationsj as $key => $value) {\n $education[] = [$educationsj[$key],$educationxx[$key],$educationzy[$key],$educationxl[$key]];\n }\n $edustr = json_encode($education);\n $model->education = $edustr;\n\n foreach ($jobsj as $key => $value) {\n $job[] = [$jobsj[$key],$jobxx[$key],$jobzy[$key]];\n }\n $jobstr = json_encode($job);\n $model->job = $jobstr;\n //exit();\n $model->save();\n return $this->redirect(['nosh']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'planlist' => $this->arr,\n ]);\n }\n }", "title": "" } ]
[ { "docid": "101e2e3d79af39a0bfd6dfa2c2d0b524", "score": "0.7544684", "text": "public function actionCreate()\n {\n $model = new Xujjat();\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 }", "title": "" }, { "docid": "74f4e5c10d8ccb1094b56ee39fd33c8d", "score": "0.7461881", "text": "public function actionCreate()\n {\n $model = new penjualan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_penjualan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "2fa0882a7f4bedf85e2867b911a54023", "score": "0.7416779", "text": "public function actionCreate()\n {\n # Basic\n $request = Yii::$app->request;\n $idJual = $request->get('id-jual');\n $searchModel = new PenjualanDetailSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n $dataProvider->query->where(['id_penjualan' => $idJual]);\n $model = new PenjualanDetail();\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render(\n 'create',\n [\n 'model' => $model,\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider\n ]\n );\n }\n }", "title": "" }, { "docid": "576247ef3f96f140efeb21becfef2297", "score": "0.73120046", "text": "public function actionCreate()\n {\n $model = new Jadwal();\n \n if ($model->load(Yii::$app->request->post())) {\n $nama_jadwal = $model->getIdMatkul($model->id_matakuliah).\" - \".$model->getIdKelas($model->id_kelas);\n $model->nama_jadwal = $nama_jadwal;\n $model->save();\n return $this->redirect(['view', 'id' => $model->id_jadwal]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "9b8f6861a48ee29e189b45318bcc9dcd", "score": "0.7258543", "text": "public function actionCreate() {\n $model = new $this->model;\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 }", "title": "" }, { "docid": "7d6f53352924ac744652c4be2730ff47", "score": "0.7206379", "text": "public function actionCreate()\n\t{\n\t\t$model = $this->getModel();\n\n\t\tif ($model->load(Yii::$app->request->post()) && $model->validate() && $model->save()) {\n\t\t\t//return $this->redirect(['view', 'id' => $model->id]);\n\t\t\treturn $this->redirect(['index']);\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}", "title": "" }, { "docid": "dfc0a71c3a58b69ae1f0e896829d4b07", "score": "0.7201262", "text": "public function actionCreate()\n {\n $model = new YuranBulanan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_yuran_bulanan]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "f5179176cfe8df3e4f86521653cc5d31", "score": "0.7148892", "text": "public function actionCreate()\r\n\t{\r\n\t\t$model=new Ingerek;\r\n\r\n\t\t// Uncomment the following line if AJAX validation is needed\r\n\t\t// $this->performAjaxValidation($model);\r\n\r\n\t\tif(isset($_POST['Ingerek']))\r\n\t\t{\r\n\t\t\t$model->attributes=$_POST['Ingerek'];\r\n\t\t\tif($model->save())\r\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\r\n\t\t}\r\n\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t\t\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "174abfbb2f09173abfc4b89b61f95e38", "score": "0.71473205", "text": "public function actionCreate()\n {\n $model = new Journey();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "dbc57dc3ca255c595eccbca48aecf308", "score": "0.71376765", "text": "public function actionCreate()\n {\n $model = new MahesabuYaliofungwa();\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 }", "title": "" }, { "docid": "b2663c6b35c54b4c5e09088af1cc6357", "score": "0.71287763", "text": "public function actionCreate()\n {\n $model = new Listing();\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 }", "title": "" }, { "docid": "3f5d3a2c5e2416c81448ebf7ac5c8b2c", "score": "0.71272844", "text": "public function actionCreate()\n {\n $model = new Model();\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 }", "title": "" }, { "docid": "dda953e84f5de599f4b1744a5275a9dc", "score": "0.7117052", "text": "public function actionCreate()\n\t{\n\t\t$model=new $this->_model;\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[$this->_model]))\n\t\t{\n\t\t\t$model->attributes=$_POST[$this->_model];\n\t\t\tif($model->save()){\n\t\t\t\tYii::app()->user->setFlash('success', self::SUCCESS_ALERT_CREATE);\n\t\t\t\t$this->redirect(array('update','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "4c404d21860a6867d830f1aad533b0b6", "score": "0.7095237", "text": "public function actionCreate()\n\t{\n\t\t$model=new Jadwal;\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['Jadwal']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Jadwal'];\n\t\t\t$model->nama_dosen = $_POST['nama_dosen'];\n\n\t\t\t$fak = Masterfakultas::model()->findByAttributes(array('kode_fakultas'=> $model->fakultas));\n\t\t\t$prodi = Masterprogramstudi::model()->findByAttributes(array('kode_prodi'=> $model->prodi));\n\t\t\t$mk = Mastermatakuliah::model()->findByAttributes(array('kode_mata_kuliah'=> $model->kode_mk));\n\n\t\t\t// $jam_ke = Jam::model()->findByPk($_POST['Jadwal']['jam_ke']);\n\t\t\t$model->jam_mulai = $_POST['Jadwal']['jam_mulai'];//substr($jam_ke->jam_mulai, 0, -3);;\n\t\t\t$model->jam_selesai = $_POST['Jadwal']['jam_selesai'];//substr($jam_ke->jam_selesai, 0, -3);\n\n\t\t\tif(strlen($model->jam_mulai) > 5 && strlen($model->jam_selesai) > 5)\n\t\t\t{\n\t\t\t\t$model->jam_mulai = substr($model->jam_mulai,0,-3);\n\t\t\t\t$model->jam_selesai = substr($model->jam_selesai,0,-3);\n\t\t\t}\n\n\t\t\t$model->jam = $model->jam_mulai.' - '.$model->jam_selesai;\n\n\t\t\t$model->nama_fakultas = $fak->nama_fakultas;\n\t\t\t$model->nama_prodi = $prodi->singkatan;\n\t\t\t$model->nama_mk = $mk->nama_mata_kuliah;\n\n\t\t\t$mk->sks = $_POST['sks'];\n\n\t\t\t$mk->save(false,array('sks'));\n\n\t\t\t\n\t\t\t$model->bentrok = 0;\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\tJadwal::model()->cekKonflik($model);\n\t\t\t\t\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "f92e258b016f43832a4138c063277fa4", "score": "0.70668364", "text": "public function actionCreate()\n {\n $model = new MHd201509t6();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \n return $this->redirect(['view', 'id' => $model->hd201509t6_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "976b566f959c1a85691df72bedd46e1d", "score": "0.70452815", "text": "public function actionCreate()\n {\n $class = $this->getModelClass();\n $model = new $class();\n\n $data = Yii::$app->request->post();\n if ($data) {\n Yii::$app->request->setBodyParams($data);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save() && $this->saveModel($model)) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n foreach ($model->errors as $error) {\n Yii::$app->session->setFlash(\n 'error',\n $error[0]\n );\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "595817dc580da353475dc7a10d544788", "score": "0.700402", "text": "public function actionCreate()\n {\n $model = new Kegiatan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_kegiatan]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "d0141b6a322127e2a385dc290def59c6", "score": "0.6996534", "text": "public function create(){\n\t\t/* \n\t\t\tkalau ada post, tetapi tidak berhasil simpan, maka \t\t\n\t\t\tcek apakah $this->_model sama dengan di $_POST\n\t\t\tkarena indexnya case sensitive\n\t\t*/\n\t\tif(isset($_POST[$this->_model])){\t\t\t\t\t// kalau ada post\n\t\t\t$objModel = new $this->_model();\t\t\t\t// buat var tipe \n\t\t\t$objModel->_attributes=$_POST[$this->_model]; \t// ambil datanya\n\t\t\t$objModel->save();\t\t\t\t\t\t\t\t// simpan\n\t\t\t// arahkan kembali ke index\n\t\t\theader(\"Location:\".$this->createUrl('index'));\t\t\t\t\n\t\t}\n\t\telse{\n\t\t\t// kalau tidak ada post, maka user baru klik create\n\t\t\t// tampilkan form disini\n\t\t\t\n\t\t\t/* Siapkan jalan kembali */ \n\t\t\techo $this->createUrl('index','Kembali'); \n\t\t}\n\t}", "title": "" }, { "docid": "7f86d6de2100a325264404bc8cd47fa5", "score": "0.6966867", "text": "public function actionCreate()\n {\n $model = new JpbonusAward();\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 }", "title": "" }, { "docid": "990ecd336a0c3a78bdf726fc1cbf5825", "score": "0.69645303", "text": "public function actionCreate()\n\t{\n\t\t$model=new Pencatatan;\n\t\t// Uncomment the following line if AJAX validation is needed\n\t //$this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Pencatatan']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Pencatatan'];\n\t\t\t$model->id_so=Yii::app()->user->getState('id_so');\n\t\t//\t$id=Yii::app()->user->getState('id_so'); //it is better to check it via has state, and also passing a default value \n\t\t\tif($model->save())\n\t\t\t\n\t\t\t\t$this->redirect(array('view','id'=>$model->id_pencatatan));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "ead20be3071eb785a577203fc2579e38", "score": "0.6944453", "text": "public function actionCreate()\n {\n $model = new Pendataan();\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 }", "title": "" }, { "docid": "6deeb65b6cb7b416b3c422b4742ce0c5", "score": "0.6917753", "text": "public function actionCreate()\n {\n $model = new Job();\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 }", "title": "" }, { "docid": "f14bcc660395a7b05854956362d08249", "score": "0.69014615", "text": "public function createJd () {\r\n\t\t$division = $this->uri->segment(3);\r\n\t\t$subDivision = $this->uri->segment(4) == \"\" ? \"\" : \"/\" . $this->uri->segment(4);\r\n\t\t$divisionAndSub = $division . $subDivision;\r\n\r\n\t\t// calling the query in this model\r\n\t\t$this->Jd_model->createJd();\r\n\t\t// create a jd history or logs\r\n\t\t$this->Jd_History_model->createJdHistory();\r\n\r\n\t\t// passing some data to show the flash message\r\n\t\t$this->session->set_flashdata(array(\r\n\t\t\t\"status\" \t=> \"is-active\",\r\n\t\t\t\"message\" \t=> \"Successfully Added\"\r\n\t\t));\r\n\r\n\t\t// redirecting the to this view\r\n\t\tredirect('division/dashboard/' . $divisionAndSub);\r\n\t}", "title": "" }, { "docid": "0a69ac10e3cae5cefe449d1d826dd79b", "score": "0.683216", "text": "public function actionCreate()\n {\n $model = new Bienes();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n $this->layout=\"main\";\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "ca2b354bc6339806a2b44d59864bb262", "score": "0.6827423", "text": "public function actionCreate()\n {\n $model = new TajwidResult();\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 }", "title": "" }, { "docid": "e64d4c73a7fd41bef0b042badeaaabe3", "score": "0.68119913", "text": "public function actionCreate()\n {\n $model = new Tuman();\n\n if ($model->load(Uni::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_Tuman]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "cf73570bcfd15de83dbe06ecc1827f47", "score": "0.6805413", "text": "public function actionCreate()\n {\n $model = new Penulis();\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 }", "title": "" }, { "docid": "fa4b7bab12c8e1a16550bf48039607a5", "score": "0.6790241", "text": "public function actionCreate()\n {\n $model = new MarkUpGoods();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "255c3db5149ce25f371506c25cf648b5", "score": "0.6775356", "text": "public function actionCreate()\n {\n $model = new Record();\n\n if ($model->load(Yii::$app->request->post()) && $model->save(false)) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "bf4b24c00a26fbefb73cda49de22a503", "score": "0.6757148", "text": "public function actionCreate()\n {\n $model = new Booking();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->booking_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "0d22685aa35cc8a9f9123957fe2885ba", "score": "0.6756545", "text": "public function create()\n {\n //create new data\n return view('HalamanJagung.create');\n }", "title": "" }, { "docid": "56cdbba1613dc133bf4e4ce6527d3b6c", "score": "0.67560303", "text": "public function actionCreate()\n {\n $this->model = $this->getModel();\n \n if ($this->model->load(Yii::$app->request->post()) && $this->model->save()) {\n return $this->redirect(['view', 'id' => $this->model->id]);\n }\n \n return $this->render('../c-r-u-d/create', [\n 'model' => $this->model,\n ]);\n }", "title": "" }, { "docid": "7be2e3da9cadd3875b6f15e675b578aa", "score": "0.67471784", "text": "public function create()\n {\n return view(\"jabatans.create\");\n }", "title": "" }, { "docid": "6772967351deb784606b86c8b0b2e849", "score": "0.67459995", "text": "public function actionCreate()\n\t{\n\t\t$model=new So();\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['So']))\n\t\t{\n\t\t\t$model = So::model()->find(\"so_cd='\".$_POST['So']['so_cd'].\"'\");\n\t\t\t$model->attributes = $_POST['So'];\n\t\t\t$model->save();\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "e4ae1fc516fba1a482584557d49a8452", "score": "0.67364365", "text": "public function actionCreate()\n\t{\n\t\t$model=new Lugares;\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['Lugares']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Lugares'];\n\t\t\t\n\t\t\t\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,'codpro'\n\t\t));\n\t}", "title": "" }, { "docid": "f130f2cd7752058513268e67ba9cc8d8", "score": "0.6734151", "text": "public function create()\n {\n return view('jenjang.create', ['jenjang' => new Jenjang]);\n }", "title": "" }, { "docid": "a8f8301b06de2d4dfce21ca0249d0454", "score": "0.6729875", "text": "public function actionCreate()\n {\n $model = new AuditingModel();\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 }", "title": "" }, { "docid": "69aa713806fdf914702d2709873d3258", "score": "0.67212516", "text": "public function actionCreate()\n {\n // $model = new MasterDaftarOrganisasi();\n\n // if ($model->load(Yii::$app->request->post()) && $model->save()) {\n \n // $model->NAMA_ORGANISASI= Yii::$app->request->post('MasterDaftarOrganisasi')['NAMA_ORGANISASI'];\n\n // $model->ID_ORGANISASI= Yii::$app->request->post('MasterDaftarOrganisasi')['ID_ORGANISASI'];\n\n // $model->ID_JENIS= Yii::$app->request->post('MasterDaftarOrganisasi')['ID_JENIS'];\n\n // $model->STATUS= Yii::$app->request->post('MasterDaftarOrganisasi')['STATUS'];\n // }\n\n // return $this->render('create', [\n // 'model' => $model,\n // ]);\n }", "title": "" }, { "docid": "fb9227396cce08532a784d8023ffb08f", "score": "0.67141557", "text": "public function actionCreate()\n {\n exit;\n $model = new CommQa();\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 }", "title": "" }, { "docid": "7bce77fcdc28a3bb5612b0a7a75c76cd", "score": "0.67037475", "text": "public function actionCreate()\n\t{\n\t\t$model=new MastersEmployeeFamilys;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\tif(isset($_GET['id']))\n\t\t\t$model->employee_id = $_GET['id'];\n\n\t\tif(isset($_POST['MastersEmployeeFamilys']))\n\t\t{\n\t\t\t$model->attributes=$_POST['MastersEmployeeFamilys'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t} else {\n\t\t\tif(isset($_GET['id'])) $model->employee_id = $_GET['id'];\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "7846d89c0fbeeeef7e3b9e59c191fca3", "score": "0.669764", "text": "public function actionCreate()\n {\n $model = new ZfStudents();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n // return $this->redirect(['view', 'id' => $model->id]);\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "b1bfb1b34f1cb93822437797bb35ee89", "score": "0.6677826", "text": "public function actionCreate()\n {\n $model = new HrJobgroupjabatan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->groupjabatan_code]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "905b088c4080853b9c8049390eb3456e", "score": "0.6664745", "text": "public function create() {\n //\n $data['title'] = 'Tambah jurusan';\n return View('backend.jurusan.create', $data);\n }", "title": "" }, { "docid": "580bfb54cf5ae720de5c91a8c1348db6", "score": "0.6664177", "text": "public function actionCreate()\n\t{\n\t\t$model=new Pegawai;\n\n\t\t// Hilangkan komentar berikut jika validasi AJAX diaktifkan\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif (isset($_POST['Pegawai'])) {\n\t\t\t$model->attributes=$_POST['Pegawai'];\n\t\t\tif ($model->save()) {\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "dfb45df1e03c3128a5f768e4f844e336", "score": "0.66606045", "text": "public function actionCreate()\n\t{\n\t\t$model=new Vehiculo;\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['Vehiculo']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Vehiculo'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->placa));\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "c438b7b2e09abd048231457559b5477f", "score": "0.6658049", "text": "public function actionCreate()\n {\n $model = new BicyclesteamworkInfo();\n\n if ($model->load(Yii::$app->request->post())) {\n// $model->empName = $this->Showempname($model->empid);\n// $model->date = Scripts::ConvertDateDMYtoYMDforSQL($model->date);\n// $model->save();\n// return $this->redirect(['index']);\n// return Yii::$app->getResponse()->redirect(Url::previous());\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "4e437d6ca5cf06216c6f8453c1cf87b5", "score": "0.665753", "text": "public function actionCreate()\n {\n $model = new programacion();\n //var_dump(Yii::$app->request->post()); exit;\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->IdProgramacion]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "9a1da768eac95533eb5d72fbb5ec4431", "score": "0.6656035", "text": "public function actionCreate()\n {\n $model = new PembedaanCpns();\n\n if ($model->load(Yii::$app->request->post())) {\n $dataLayanan = DataLayanan::findOne(['id_data_pelayanan'=>$_POST['PembedaanCpns']['no_rekam_medik']]);\n $model->no_rekam_medik = $dataLayanan->no_rekam_medik;\n $model->created_by = Yii::$app->user->identity->id;\n $model->tanggal= date('Y-m-d');\n $model->save(false);\n return $this->redirect(['view', 'id' => $model->id_pembedaan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "3b38468ea758ba7b36c3f1df5589a6e2", "score": "0.66535664", "text": "public function actionCreate() {\n $model = new $this->defaultModel;\n\n $isPjax = Yii::$app->request->isPjax;\n if (!$isPjax) {\n $this->performAjaxValidation($model);\n }\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($isPjax) {\n return $this->actionAjaxModalNameList(['selected_id' => $model->id]);\n } else {\n return $this->redirect('index');\n } \n } else {\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model,\n 'isModal' => true,\n ]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'isModal' => false,\n ]);\n }\n }\n }", "title": "" }, { "docid": "e218a2fb03b8f8ca14ae79fe2ff6a18b", "score": "0.66472393", "text": "public function actionCreate()\n {\n //make new kasus\n $kasus = new Kasus();\n\t\t\n\t\t///Find out how many document have been submitted by the form\n \t$count = count(Yii::$app->request->post('Dokumen', []));\n\n \t//sent at least one model to the form\n $doks = [new Dokumen()];\n\n //make array for submit\n for($i = 1; $i<$count; $i++){\n $doks[] = new Dokumen();\n }\n\t\t\n if ($kasus->load(Yii::$app->request->post())) \n\t\t{\n //default value for kasus\n\t\t\t$kasus->nomor_sktjm = '';\n\t\t\t$kasus->tgl_dibuat = date('Y-m-d H:i:s');\n\t\t\t$kasus->kdsatker = Yii::$app->user->getIdentity()->username;\n\t\t\t$kasus->status_kasus = 'belum diproses';\n\t\t\n if(Model::loadMultiple($dok, Yii::$app->request->post())){\n \t$kasus->save(false);\n\n\t foreach($doks as $dok){\n\t //default value for dokumen\n\t $dok->id_kasus = $kasus->id_kasus;\n\t \n\t //variable from upload\n\t $dok->upload = UploadedFile::getInstance($dok, 'upload');\n\t if($dok->upload()){\n\t $filename = $dok->id_kasus.'-'.$dok->kasus->nip.'-'.$dok->id_jenis;\n\t $filepath = 'upload/'.$filename;\n\t if($dok->upload->saveAs($filepath)){\n\t $dok->nama_dokumen = $filename;\n\t $dok->path_dokumen = $filepath;\n\t }\n\t }\n\t $dok->save(false);\n\t\t\t\t}\n return $this->redirect(['view', 'id' => $idkasus]);\n\t\t\t}\n\t\t}\n\t\treturn $this->render('create', [\n 'model' => $kasus,\n 'modelDok' => $doks,\n\t\t]);\n\t}", "title": "" }, { "docid": "411e90ff8b2ef3c50af587fd0ee6f94a", "score": "0.6639429", "text": "function actionCreate(){ \r\n\t\t$model=new Tiket;\r\n\t\tif(isset($_POST['Tiket'])){\r\n\t\t\t$model->tipe=$_POST['Tiket']['tipe'];\r\n\t\t\t$model->nama=$_POST['Tiket']['nama'];\r\n\t\t\t\r\n \t\t$model->save();\t\r\n\t\t}\r\n\t\t$this->render('create',array(\r\n\t\t\t'model'=>$model,\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "533e59569234e8e7f54cf503a1861f03", "score": "0.66353995", "text": "public function create()\n {\n //\n return view('jngajars.create');\n }", "title": "" }, { "docid": "ed23385c17265f985ef1d5b58fae21b3", "score": "0.66275233", "text": "public function actionCreate()\n {\n $model = new PresensiDetail();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_presensi]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0f0052e839361d086ea1d0711d916f56", "score": "0.66252434", "text": "public function actionCreate()\n\t{\n\t\t$model=new Information;\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['Information']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Information'];\n\t\t\t$imagefile = CUploadedFile::getInstance($model, 'image');\n\t\t\t$image = MainHelper::uploadImg($imagefile,$dir='information');\n\n\t\t\t$bigimagefile = CUploadedFile::getInstance($model,\"bigimage\");\n\t\t\t$bigimage = MainHelper::uploadImg($bigimagefile,$dir='information');\n\t\t\t$model->image = $image;\n\t\t\t$model->bigimage = $bigimage;\n\t\t\t$model->uid = Yii::app()->user->id;\n\t\t\tif($model->save()){\n\t\t\t\tYii::app()->msg->postMsg('success', '创建成功');\n\t\t\t\t$this->redirect(array('create'));\n\t\t\t}\t\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "0967b373ad9c3635536eaeb688f2be6f", "score": "0.6622126", "text": "public function create()\n {\n //\n $jabatans=JabatanModel::all();\n $golongans=GolonganModel::all();\n return view('tunjangan.create', compact('jabatans', 'golongans'));\n }", "title": "" }, { "docid": "587eb73c6ced2ea3ad874bb40f2f5adf", "score": "0.6621122", "text": "public function create()\n\t{\n\t\treturn View::make('rawat_jalan.create' );\n\t}", "title": "" }, { "docid": "c60fef936807ad5fe6244352c4c23e06", "score": "0.66007", "text": "public function actionCreate()\n\t{\n\t\t$model=new Location;\n\t\t\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\t\n\t\tif(isset($_POST['Location']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Location'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->id));\n\t\t}\n\t\t\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "c8782d4c5225274338fa0e86d71621e2", "score": "0.6598554", "text": "public function actionCreate()\n {\n $model = new MingruiOrder();\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 }", "title": "" }, { "docid": "45d061fc9a9a84654d9f64e1fd07e8ad", "score": "0.6596308", "text": "public function actionCreate() {\n $model = new PrdPengajuan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->IDPengajuan]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "ba93394aea63811c4c01fbd18d565d83", "score": "0.6589413", "text": "public function actionCreate()\n {\n $cekcount = LaporanPeriksa::find()->count();\n if ($cekcount == 0){\n $model = new LaporanPeriksa();\n $model->kode_laporan = 'C-1';\n $model->load(Yii::$app->request->post());\n if ($model->save()){\n return $this->redirect(['view', 'id' => $model->kode_laporan]);\n }\n }\n else{\n $getLastKode = LaporanPeriksa::find()->orderBy(['kode_periksa' => SORT_DESC])->one();\n $split_kode = explode('-', $getLastKode->kode_periksa);\n $to_INT = intval($split_kode[1]);\n $plus_one = $to_INT + 1;\n $array_kode = array('C',$plus_one);\n $join_kode = join('-',$array_kode);\n $model = new LaporanPeriksa();\n $model->no_kunjungan = $join_kode;\n $model->load(Yii::$app->request->post());\n if($model->save()){\n return $this->redirect(['view', 'id' => $model->kode_periksa]);\n }\n } \n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "f0682db4e0f363c85a85388ad00ec297", "score": "0.6588663", "text": "public function actionCrea()\n\t{\n\t\t$model=new Lugares;\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['Lugares']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Lugares'];\n\t\t\t\n\t\t\t\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','id'=>$model->codlugar));\n\t\t}\n\n\t\t$this->render('crear',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "26e9cf8ef4ad2ae10a615c1faf308d43", "score": "0.6585416", "text": "public function actionCreate()\n {\n $model = new Abastecimento();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n Yii::$app->session->setFlash('success', 'Abastecimento salvo com sucesso.');\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "e16d244585a52afff2dd659678e6dde5", "score": "0.6584744", "text": "public function actionCreate()\n {\n $model = new IkkPpk();\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()){\n flash('success','Data IKK PPK Berhasil Disimpan');\n return $this->redirect(['index']);\n }\n \n flash('error','Data IKK PPK Gagal Disimpan');\n \n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "926ae19e9b49f54e405275426cc4a37b", "score": "0.65798295", "text": "public function actionCreate()\n {\n $model = new Goods();\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 }", "title": "" }, { "docid": "0efdb729353d7d367930ca3b8b4cf13a", "score": "0.65787894", "text": "public function actionCreate()\n {\n $model = new UserJournal();\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 }", "title": "" }, { "docid": "0f15b7710809552e2195977320758243", "score": "0.65755475", "text": "public function actionCreate()\n {\n $model = new Tuyenduong();\n\n if ($model->load(Yii::$app->request->post())){\n $model->nguoitao = Yii::$app->user->identity->username;\n $model->ngaytao = date('Y-m-d H:i:s', time());\n $model->nguoisua = Yii::$app->user->identity->username;\n $model->ngaysua = date('Y-m-d H:i:s', time());\n $model->save();\n return $this->redirect(['view', 'id' => $model->id_tuyenduong]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "5f6d12f938909e021083d25409fea8ca", "score": "0.65723044", "text": "public function create()\n \t{\n \t\treturn view('jenisobat.create');\n \t}", "title": "" }, { "docid": "38fd7931193453c91e05e1bade365140", "score": "0.6550285", "text": "public function actionCreate()\n {\n $model = new Student();\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 }", "title": "" }, { "docid": "c8b0f96de5ee3f796c089daf5aa875f8", "score": "0.6549871", "text": "public function actionCreate()\n {\n $model = $this->getNewModel();\n\n if ($model != false) {\n $this->actionLoad($model['id'], true);\n }\n }", "title": "" }, { "docid": "b8a88b259a174d4450e0dad710dceac6", "score": "0.6542785", "text": "public function actionCreate()\n {\n $model = new ToquvKalite();\n if ($model->load(Yii::$app->request->post())) {\n if (Yii::$app->request->isAjax) {\n Yii::$app->response->format = Response::FORMAT_JSON;\n $response = [];\n if ($model->save()) {\n $response['status'] = 0;\n } else {\n $response['status'] = 1;\n $response['errors'] = $model->getErrors();\n }\n return $response;\n }\n if ($model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n }\n if (Yii::$app->request->isAjax) {\n return $this->renderAjax('create', [\n 'model' => $model,\n ]);\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "18f07df99bebf382488c397203b4a100", "score": "0.6541683", "text": "public function actionCreate()\n {\n $model = new HakKelas();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n $attributes = $model->attributeLabels();\n $data = \"\";\n foreach ($model as $key => $value) {\n $data .= $attributes[$key].\":\".$model->$key.\",\";\n }\n $activity = \"[CREATE HAKKELAS] \".$data;\n $this->historyUser($activity,$user,$ip);\n return $this->redirect(['index']);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "6a97a47104d3b14df38958d6d2e4490a", "score": "0.65343624", "text": "public function actionCreate()\n {\n $model = new Carloan();\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 }", "title": "" }, { "docid": "19323d88f9e680ebd4324b2012645efa", "score": "0.6509706", "text": "public function actionCreate()\n {\n $model = new KitCategory();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "37bf2259b07d1af5fedd8b6272bf5f08", "score": "0.6497718", "text": "public function actionCreate()\n\t{\n\t\t$model=new VinculacionProveedorJuridico;\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['VinculacionProveedorJuridico']))\n\t\t{\n\t\t\t$model->attributes=$_POST['VinculacionProveedorJuridico'];\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}", "title": "" }, { "docid": "8c0ef3e633cf1abe53fe72aa87be6dac", "score": "0.6478894", "text": "public function actionCreate()\n {\n $model = new Kegiatan();\n\n if ($model->load(Yii::$app->request->post()) ) {\n $model->isDeleted = FALSE;\n $model->seksi = \\Yii::$app->user->id;\n $model->id = \\thamtech\\uuid\\helpers\\UuidHelper::uuid();\n if($model->save()){\n return $this->redirect(['index']);\n }\n \n } else {\n $periodeDropdown = $this->periodeDropdown();\n $seksiDropdown = $this->seksiDropdown();\n return $this->render('create', [\n \"periodeDropdown\" => $periodeDropdown,\n \"seksiDropdown\" => $seksiDropdown,\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "a8711d5e594834039f4dfc16c6594e67", "score": "0.6471086", "text": "public function actionCreate()\n {\n $model = new LocationStock();\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 }", "title": "" }, { "docid": "d6d9bdc5fa364b4929fa7ce5b8e1446b", "score": "0.6469205", "text": "public function create()\n\t{\n\t\t$jabatans = Jabatan::all()->toArray();\n\t\treturn view('karyawan.create', compact('jabatans'));\n\t}", "title": "" }, { "docid": "2ad242652edecd0321bcc8876e018110", "score": "0.64672565", "text": "public function actionCreate()\n {\n $model = new TblLophocphan();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->lophp_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "07636f97d93a85b38e209dcaef10ab7c", "score": "0.6465703", "text": "public function actionCreate()\n {\n $model = new Article();\n\n \n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n else\n {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "359fa4976c66852faeb11ef25e8aaed8", "score": "0.64652145", "text": "public function actionCreate()\n {\n $model = new Orders();\n\n if( $model->load(Yii::$app->request->post()) && $model->save() )\n {\n return $this->redirect(['view', 'id' => $model->id]);\n } else\n {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "d95b937cc5cd526e57365d1eb04eff6f", "score": "0.64615417", "text": "public function actionCreate()\n {\n $model = new Request();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->req_id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "9eb9075e77563d48aa69da4da9d806df", "score": "0.64588207", "text": "public function actionCreate()\n\t{\n\t\t$model=new JadwalMakanM;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t\n\n\t\tif(isset($_POST['jenisdietid']))\n\t\t{\n// $model->jeniswaktu_id = $_POST['jeniswaktu_id'];\n// $model->jenisdiet_id = $_POST['jenisdiet_id'];\n// $model->tipediet_id = $_POST['tipediet_id'];\n// $model->menudiet_id = $_POST['menudiet_id'];\n// echo '<pre>';\n// echo print_r($_POST['JadwalMakanM']);\n// foreach ($_POST['JadwalMakanM'] as $i=>$row){\n// foreach($row['menudiet_id'] as $j=>$v){\n// $models = new JadwalMakanM;\n// $models->attributes = $row;\n// $models->menudiet_id = $v;\n// $models->jeniswaktu_id = $j;\n// echo '<pre>';\n// echo print_r($models->attributes);\n// }\n// }\n// exit();\n// echo '<pre>';\n// echo print_r($_POST['JadwalMakanM']);\n// exit();\n// if($model->validate()){\n $modDetails = $this->validateTable($_POST['JadwalMakanM']);\n $transaction = Yii::app()->db->beginTransaction();\n \n try{\n $success = true;\n foreach ($_POST['JadwalMakanM'] as $i=>$row){\n if ($row['checkList'] == 1){\n foreach($row['menudiet_id'] as $j=>$v){\n $models = new JadwalMakanM;\n $models->attributes = $row;\n $models->menudiet_id = $v;\n $models->jeniswaktu_id = $j;\n if (!empty($models->menudiet_id)){\n if($models->save()){\n\n }else{\n $success = false;\n }\n }\n }\n }\n }\n \n if($success == true){\n $transaction->commit();\n Yii::app()->user->setFlash('success','<strong>Berhasil !</strong> Data Berhasil disimpan');\n $this->redirect(array('admin'));\n }\n else{\n $transaction->rollback();\n Yii::app()->user->setFlash('error',\"Data gagal disimpan\");\n }\n }\n catch(Exception $ex){\n $transaction->rollback();\n Yii::app()->user->setFlash('error',\"Data gagal disimpan \".MyExceptionMessage::getMessage($ex,true));\n }\n// for($i=0;$i<COUNT($_POST['jenisdiet_id']);$i++)\n// {\n// $model = new JadwalMakanM;\n//// $model->attributes =$_POST['jadwalMakanM']\n// $jenisdiet = $_POST['jenisdiet_id'][$i];\n// $model->jeniswaktu_id = $_POST['jeniswaktu_id'][$i];\n// $model->tipediet_id = $_POST['tipediet_id'][$i];\n// if($model->validate())\n// $model->save();\n// for($a=0;$a<COUNT($_POST['jeniswaktu_id']);$a++)\n// {\n// $model=new JadwalMakanM;\n// $jeniswaktu = $_POST['jeniswaktu_id'][$i][$a];\n// $model->jeniswaktu_id = $_POST['jeniswaktu_id'][$i][$a];\n// $model->menudiet_id = $_POST['menudiet_id'][$jeniswaktu];\n// if($model->validate())\n// $model->save();\n// }\n// }\n// }\n \n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "de8884ac2e7dd5cad483f1f8ddadb5a6", "score": "0.6457718", "text": "public function actionCreate()\n {\n $model = new DetalleMaestra();\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 }", "title": "" }, { "docid": "12bf7286dc7e432404d35a0658a318a2", "score": "0.6457302", "text": "public function actionCreate()\n {\n $model = new Label();\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 }", "title": "" }, { "docid": "e9d3e7a1b8e34d8704a49dab7654c00b", "score": "0.6456223", "text": "public function create()\n {\n return view('crud.jurusan.create');\n }", "title": "" }, { "docid": "67410d0bf6a7bfbd49366b9869ba744b", "score": "0.64558756", "text": "public function actionCreate()\n {\n $model = new Absen();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_absen]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "145c4a9824fa8329bb1b7725a767ac11", "score": "0.6455785", "text": "public function actionCreate()\n {\n\n $model = new CGoods;\n\n if (Yii::$app->request->post()) {\n $adposted=Yii::$app->request->post('CGoods');\n $transaction = Yii::$app->db->beginTransaction();\n try {\n\n $model->attributes = [\n 'g_name'=>$adposted['g_name'],\n 'g_pic' =>$adposted['pic'],\n 'g_instroduce' =>$adposted['g_instroduce'],\n 'g_sellout' =>empty($adposted['g_sellout'])?0:$adposted['g_sellout'],\n 'g_amount' =>empty($adposted['g_amount'])?0:$adposted['g_amount'],\n 'g_score' =>empty($adposted['g_score'])?0:$adposted['g_score'],\n 'created_time' =>date('Y-m-d H:i:s')\n ];\n if (!$model->save()) {\n throw new Exception;\n }\n $transaction->commit();//提交\n Yii::$app->getSession()->setFlash('success','<i class=\"glyphicon glyphicon-ok\"></i>添加成功');\n }catch(Exception $e) {\n $transaction->rollBack();\n //var_dump($e);\n Yii::$app->getSession()->setFlash('error','<i class=\"glyphicon glyphicon-remove\"></i>添加失败');\n }\n return $this->redirect('index');\n } else {\n return $this->render('create', [\n 'model' => $model,\n 'initialPreview'=>'',\n 'initialPreviewConfig'=>array()\n ]);\n }\n }", "title": "" }, { "docid": "9a208c0688401b3a9cc56faf68e20deb", "score": "0.64521164", "text": "public function actionCreate()\n {\n $model=new Upload;\n\n // Uncomment the following line if AJAX validation is needed\n // $this->performAjaxValidation($model);\n\n if(isset($_POST['Upload']))\n {\n $model->attributes=$_POST['Upload'];\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }", "title": "" }, { "docid": "06fc7c46a7e63465086456322bd5d807", "score": "0.64497745", "text": "public function actionCreate()\n {\n $model = new Wire;\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 }", "title": "" }, { "docid": "56c0aae86da0b51d51bd16901e1abb65", "score": "0.6440977", "text": "public function actionCreate()\n {\n $model = new StationBill();\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 }", "title": "" }, { "docid": "0902aadfe30cd21ed35469c662a095df", "score": "0.6439445", "text": "public function actionCreate()\n {\n $model = new FoundPigeons();\n\t\t$ExtraFunctions = new ExtraFunctions;\n\t\t\n if ($model->load(Yii::$app->request->post())) \n\t\t{\n\t\t\t$uploadImage[\"uploadOk\"]=1;//because of $uploadImage[\"uploadOk\"]==0, if that array is not set this will be\n\t\t\tif(isset($_FILES[\"image_file\"][\"name\"]) && !empty($_FILES[\"image_file\"][\"name\"]))\n\t\t\t{\n\t\t\t\t$uploadImage = $ExtraFunctions->uploadImage($_FILES[\"image_file\"][\"name\"], $_FILES[\"image_file\"][\"tmp_name\"], $_FILES[\"image_file\"][\"size\"], $_FILES[\"image_file\"][\"error\"], $model, 'create', FoundPigeons::UPLOAD_DIR, 'image_file', FoundPigeons::IMAGE_SIZE);\n\t\t\t\t$FILE_NAME=$uploadImage[\"FILE_NAME\"];\n\n\t\t\t}\n\t\t\telse\n\t\t\t\t$FILE_NAME=ExtraFunctions::NO_PICTURE;\n\t\t\t\n\t\t\tif($uploadImage[\"uploadOk\"]==0)\n\t\t\t{\n\t\t\t\treturn $this->render('update', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$model->IDuser=Yii::$app->user->getId();\n\t\t\t\t$model->image_file=$FILE_NAME;\n\t\t\t\t$model->date_created=$ExtraFunctions->currentTime(\"ymd-his\");\n\t\t\t\t$model->save();\n\t\t\t\treturn $this->redirect(['view', 'id' => $model->ID]);\n\t\t\t}\n } \n\t\telse \n\t\t{\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "title": "" }, { "docid": "d68708a49e9664fa99c51c06c94e7ecf", "score": "0.64392513", "text": "public function actionCreate()\n {\n $model = new Category();\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 }", "title": "" }, { "docid": "ee526595947cb132769eaccfba6adfbb", "score": "0.6436743", "text": "public function actionCreate(){\n\t\tif(!isset(Yii::app()->user->adminLogin)){\n $this->redirect(array('admin/'));\n }\n\t\t/*panggil model Category*/\t\n\t\t$model=new Category;\n\t\t$this->performAjaxValidation($model);\n\t\t/*jika data kategori dikirim*/\n\t\tif(isset($_POST['Category'])){\n\t\t\t/*set attributes*/\t\n\t\t\t$model->attributes=$_POST['Category'];\n\t\t\t/*simpan data kategori*/\n\t\t\tif($model->save()){\n\t\t\t\t/*direct ke actionView*/\n\t\t\t\t$this->redirect(array('admin'));\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t\t/*menampilkan form create*/\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "30913139bc66e3784173b8947959788d", "score": "0.6433651", "text": "public function actionCreate()\n {\n $this->layout = Auth::getRole();\n $model = new PembayaranZakat();\n\n if ($data = Yii::$app->request->post()) {\n $model->pembayaranZakatBukti = UploadedFile::getInstance($model, 'pembayaranZakatBukti');\n $data['PembayaranZakat']['pembayaranZakatBukti'] = $model->pembayaranZakatBukti;\n if ($model->load($data)) {\n \n $model->pembayaranZakatTgl = date(\"Y-m-d\");\n $model->save(false);\n $model->pembayaranZakatBukti->saveAs(Yii::$app->basePath . \"/web/foto/\" . $model->pembayaranZakatBukti->name);\n }\n \n return $this->redirect(['view', 'id' => $model->pembayaranZakatId]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "ec8fc3d233355d6228e3419ea58583f2", "score": "0.6429011", "text": "public function create()\n\t{\n\t \n\t \n\t return view('admin.jnslaporan.create');\n\t}", "title": "" }, { "docid": "3a861011bda5e11b66ba5f05e55f744e", "score": "0.64274055", "text": "public function actionCreate()\n {\n $model = new Apartment();\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 }", "title": "" }, { "docid": "7569e7e479f303f8208be33dd7b8fd54", "score": "0.6420326", "text": "public function actionCreate()\n {\n $model=new Catorganization;\n\n // Uncomment the following line if AJAX validation is needed\n $this->performAjaxValidation($model);\n\n if(isset($_POST['Catorganization']))\n {\n $model->attributes=$_POST['Catorganization'];\n // Upload handler.\n $model->logo = CUploadedFile::getInstance($model, 'logo');\n // Empty multi select handler.\n $model->directions = isset($_POST['Catorganization']['directions']) ? $model->directions : array();\n\n if($model->save())\n $this->redirect(array('view','id'=>$model->id));\n }\n\n $this->render('create',array(\n 'model'=>$model,\n ));\n }", "title": "" }, { "docid": "e084c015c64b26b12c9438cb7b72f063", "score": "0.6417251", "text": "public function actionCreate()\n\t{\n Yii::import('bootstrap.widgets.TbForm');\n\t\t$model=new Employees;\n $zon=new Zones;\n\n $zones= TbForm::createForm($zon->getForm(),$zon,\n array('htmlOptions'=>array('class'=>'well'),\n 'type'=>'vertical',\n )\n );\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\n\t\tif(isset($_POST['Employees']))\n\t\t{\n\t\t\t$model->attributes=$_POST['Employees'];\n\n\t\t\tif($model->save()){\n\n $bracelets=Bracelets::model()->findAll();\n\n foreach($bracelets as $item):\n $assigment=new Assignment;\n $assigment->employeed_id=$model->id;\n $assigment->bracelet_id=$item->id;\n $assigment->date_assignment=date('Y-m-d');\n $assigment->save();\n endforeach;\n\n\n Yii::app()->user->setFlash('success','Success');\n $this->redirect(array('view','id'=>$model->id));\n }\n\n\t\t}\n\n\t\t$this->render('create',array(\n\t\t\t'model'=>$model,\n 'zones'=>$zones\n\t\t));\n\t}", "title": "" }, { "docid": "379482576ad9c7d1155f450ee434682f", "score": "0.6416503", "text": "public function actionCreate()\n {\n $model = new Document();\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 }", "title": "" }, { "docid": "5bcfb19509c80a31b9808c975388800a", "score": "0.6414098", "text": "public function actionCreate()\n {\n $model = new Comment();\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 }", "title": "" } ]
8ef242df6ad03ea33f54ee76ecc344c0
Bootstrap any application services.
[ { "docid": "40730957891843d958452e74b672a6e5", "score": "0.0", "text": "public function boot()\n {\n Validator::extend('hash', function ($attribute, $value, $parameters, $validator) {\n return Hash::check($value, $parameters[0]);\n });\n\n Validator::extend('has_stock', function ($attribute, $value, $parameters, $validator) {\n $field = str_replace('quantity', 'sku', $attribute);\n\n $product = \\App\\Models\\Product::with([\n 'purchaseItems',\n 'saleItems'\n ])\n ->find(request()->input($field));\n\n if (!$product) {\n return false;\n }\n\n return $product->stock_quantity >= $value;\n });\n\n if (Schema::hasTable('threads')) {\n View::share('share_threads', Thread::getAllLatest()->limit(5)->get());\n }\n\n Horizon::auth(function ($request) {\n if (auth()->guest()) {\n return false;\n }\n return auth()->user()->isAn('admin');\n });\n }", "title": "" } ]
[ { "docid": "e62a2aa228f26a213cf5a26dd765a006", "score": "0.795199", "text": "protected function bootstrap()\n {\n $this->app->bootstrapWith([\n DetectAndLoadEnvironment::class,\n LoadConfiguration::class,\n RegisterApplicationServiceProviders::class\n ]);\n }", "title": "" }, { "docid": "3d004bde9e10aeedcc4c81558d7dc97f", "score": "0.7315504", "text": "public function boot()\n {\n dd('we are loading our package service provider');\n }", "title": "" }, { "docid": "405f7555139fc3aae186c498c9265217", "score": "0.73135287", "text": "public function bootstrap () {\n\t\t$this -> bootstrapInternalServices();\n\t\t$this -> bootstrapConfig();\n\t\t$this -> bootstrapEnvironment();\n\t\t$this -> bootstrapMemcached();\n\t\t$this -> bootstrapDoctrine();\n\t\t$this -> bootstrapLogging();\n\t\t$this -> bootstrapSession();\n\t\t$this -> bootstrapTwig();\n\t}", "title": "" }, { "docid": "cc76d63d0ab0d6da5809597d38500746", "score": "0.727789", "text": "public function boot()\n\t{\n\t\tif ($this->booted) return;\n\n\t\tarray_walk($this->serviceProviders, function($p) {\n $p->boot();\n });\n\n\t\t$this->bootApplication();\n\t}", "title": "" }, { "docid": "5bfbaee948a11cefddf3067d273e89c5", "score": "0.7187349", "text": "public function boot()\n {\n $this->package('domain/services');\n }", "title": "" }, { "docid": "273bfad1d8fd7eb05f0dead74ab35180", "score": "0.7171911", "text": "protected function boot()\n {\n $this->bootstrap();\n\n $this->app->boot();\n }", "title": "" }, { "docid": "f45a5a210ead203d6a34a832cd01eb78", "score": "0.71079504", "text": "public function boot(): void\n {\n $this->loadJsonTranslationsFrom(__DIR__.'/../resources/lang', 'production');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'kirby');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadRoutesFrom(__DIR__.'/UI/API/V1/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n\n if ($this->app->runningUnitTests()) {\n $this->app->make(EloquentFactory::class)->load(__DIR__.'/../database/factories');\n }\n }", "title": "" }, { "docid": "99fa8969ae28a764c77f9b82ab46c9f1", "score": "0.7105118", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "f9f12a9b2425599cd1d83f92700d396c", "score": "0.708702", "text": "public function boot()\n {\n $this->bootPublishes();\n\n $this->bootRouter();\n\n $this->bootHttp();\n\n $this->bootConsole();\n\n $this->bootJobHandlers();\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "5d76afc2ee22659c2cbf0078019d466a", "score": "0.7081085", "text": "public function boot()\n {\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "31e3200cf8351f587baef9a3daeed979", "score": "0.70646065", "text": "private function bootstrap()\n {\n if (!$this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers);\n }\n }", "title": "" }, { "docid": "b65c89a4c1d7796ea6351e113be408cd", "score": "0.7054795", "text": "public function boot()\n {\n $this->app->singleton('aliyun_oss', function () {\n return new \\App\\Services\\OssService();\n });\n\n $this->app->singleton('mail_verify', function(){\n return new \\App\\Services\\MailVerifyService();\n });\n\n $this->app->singleton('sms_verify', function () {\n return new \\App\\Services\\SmsVerifyService();\n });\n\n $this->app->singleton('easemob_api', function(){\n return new \\App\\Services\\EasemobApiService();\n });\n $this->app->singleton('easemob_user_api', function(){\n return new \\App\\Services\\EasemobUserService();\n });\n $this->app->singleton('easemob_group_api', function(){\n return new \\App\\Services\\EasemobGroupService();\n });\n $this->app->singleton('easemob_room_api', function(){\n return new \\App\\Services\\EasemobRoomService();\n });\n $this->app->singleton('easemob_msg_api', function(){\n return new \\App\\Services\\EasemobMsgService();\n });\n\n $this->app->singleton('ico_data_api', function () {\n return new \\App\\Services\\IcoDataApiService();\n });\n\n $this->app->singleton('ex_notice_api', function() {\n return new \\App\\Services\\ExNoticeApiService();\n });\n\n\n }", "title": "" }, { "docid": "26b27299aa08ab5714cde589330831a3", "score": "0.7050464", "text": "public function bootstrap()\n {\n if (! $this->app->hasBeenBootstrapped()) {\n $this->app->bootstrapWith($this->bootstrappers);\n }\n }", "title": "" }, { "docid": "8ff3a37d8ea964a02d920c45f63bba1e", "score": "0.6955807", "text": "public function boot()\n {\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "e2b7c9635cf306f56ba35a4ac2c5a9c7", "score": "0.69337404", "text": "public function boot()\n {\n app()->booted(function () {\n $this->providerBooted();\n $this->installPublicAssets();\n Cache::flush();\n });\n }", "title": "" }, { "docid": "8053d38e246d052ce9e2f3e8396403b2", "score": "0.6933085", "text": "public function boot(): void\n {\n if ($this->app->runningInConsole()) {\n $this->bootConsole();\n }\n }", "title": "" }, { "docid": "28deabcb7d4043e0942f462b6d218444", "score": "0.6929805", "text": "public function boot()\n {\n $this->loadContainersInternalMiddlewares();\n }", "title": "" }, { "docid": "5344f4a4cf330f409f5c2821cd7382dc", "score": "0.6927486", "text": "public function boot()\n {\n if ($this->app instanceof Laravel) {\n $this->bootLaravelApplication();\n } elseif ($this->app instanceof Lumen) {\n $this->bootLumenApplication();\n }\n\n $this->mergeConfigFrom(__DIR__ . '/../config/responder.php', 'responder');\n $this->commands(MakeTransformer::class);\n }", "title": "" }, { "docid": "2270bfa5ed85f13ccccbd6d118a9cf35", "score": "0.69163513", "text": "protected function bootstrap(): void\n\t{\t\t\n\t\tif ( ! $this->app->hasBeenBootstrapped()) {\n\t\t\t$this->app->bootstrapWith($this->bootstrappers());\n\t\t}\n\t}", "title": "" }, { "docid": "7955a5701e62ab0e2b1e208068644a1c", "score": "0.69097614", "text": "public function boot()\n {\n $this->mergeConfigFrom(__DIR__.'/../config/bouncer-tool.php', 'bouncer-tool');\n\n $this->app->booted(function () {\n $this->policies();\n $this->routes();\n $this->models();\n });\n\n if ($this->app->runningInConsole()) {\n $this->publishes([\n __DIR__.'/../config/bouncer-tool.php' => config_path('bouncer-tool.php'),\n ], 'bouncer-tool-config');\n }\n }", "title": "" }, { "docid": "d9b56fe0f08c9a8de202b2f63a1e7386", "score": "0.6906763", "text": "public function boot()\n {\n $this->setupConfig();\n $this->setupParse($this->app);\n }", "title": "" }, { "docid": "e8e3a5fea0cd9da71e07a003e7ff070f", "score": "0.6905748", "text": "public function bootstrap() : void\n {\n if ($this->app->isBooted()) {\n return;\n }\n\n foreach ($this->getBootstrapers() as $bootstraper) {\n $this->app->make($bootstraper)->bootstrap($this->app);\n }\n }", "title": "" }, { "docid": "1882f82508af78fbf97fedaeafe26256", "score": "0.69047016", "text": "public function bootstrap()\n {\n $this->container->isInstalled() && $this->extension->repository()->each(function (Extension $extension) {\n $providers = collect($this->config->get('app.providers'));\n $providers->push($extension->service());\n $this->config->set('app.providers', $providers->toArray());\n });\n }", "title": "" }, { "docid": "22b929c23d6bc4c3346d0ad69a4abf65", "score": "0.69027954", "text": "public function boot()\n {\n View::share(\"colours\", [\"cyan lighten-3\", \"teal lighten-3\", \"orange lighten-3\", \"indigo lighten-3\"]);\n\n $this->app->bind(PostsInterface::class, PostsRepository::class);\n $this->app->bind(TagInterface::class, TagRepository::class);\n\n View::composer('*', SidebarComposer::class);\n View::composer('*', FooterComposer::class);\n }", "title": "" }, { "docid": "8f17572416431bda415aa422e4682ce2", "score": "0.68963724", "text": "public function boot()\n {\n $this->app->bind(Config::class, ConfigImpl::class);\n $this->app->bind(Container::class, LaravelContainer::class);\n $this->app->bind(JsonEncoder::class, JsonEncoderImpl::class);\n $this->app->bind(Serializer::class, SerializerImpl::class);\n $this->app->bind(JobDispatcher::class, JobDispatcherImpl::class);\n $this->app->bind(ExampleServiceInterface::class, ExampleService::class);\n\n }", "title": "" }, { "docid": "5ec83ffcc0373e64e92fdf9a3429d0e4", "score": "0.6889851", "text": "public function boot()\n {\n $this->app->booted(function () {\n $schedule = app(Schedule::class);\n $schedule->command('daily:email')->dailyAt(\"20:00\");\n });\n $this->loadRoutesFrom(__DIR__ . '/../routes/api.php');\n $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n $this->loadViewsFrom(__DIR__.'/../views', 'ads');\n\n }", "title": "" }, { "docid": "c6fc0515842a85c514a0d7bf2641937a", "score": "0.6887286", "text": "public function boot()\n {\n $this->setupMigrations($this->app);\n $this->setupConfig($this->app);\n }", "title": "" }, { "docid": "ca44830bb611f1eb9a3b6a1609d8d1dc", "score": "0.6883963", "text": "public function boot()\n {\n $this->app->register(ComposerServiceProvider::class);\n $this->app->register(AuthServiceProvider::class);\n $this->app->register(UsersServiceProvider::class);\n $this->app->register(DashboardServiceProvider::class);\n $this->app->register(ProductsServiceProvider::class);\n\n $this->mergeConfigFrom(__DIR__ . '/../../config/electronic.php', 'electronic');\n $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'bases');\n $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'bases');\n }", "title": "" }, { "docid": "2da20daca30068ad638ca9f814b3109a", "score": "0.68683463", "text": "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->setupCurrencyRateExchangeService();\n\n $this->app->singleton(CurrencyRateExchanger::class, function () {\n $service = setting('currency_rate_exchange_service', 'array');\n $options = config(\"baslat.module.currency.config.services.{$service}\");\n\n $swap = (new Builder)->add($service, $options)->build();\n\n return new CurrencyRateExchanger($swap);\n });\n }", "title": "" }, { "docid": "bcb18de84e377e470459bf869e75fde4", "score": "0.6867912", "text": "public function boot()\n {\n // Autoload most of the Containers and Ship Components\n $this->runLoadersBoot();\n\n // load all service providers defined in this class\n parent::boot();\n\n // Solves the \"specified key was too long\" error, introduced in L5.4\n Schema::defaultStringLength(191);\n\n // Registering custom validation rules\n $this->extendValidationRules();\n }", "title": "" }, { "docid": "b3cf817c2523ccfc3955fe2c8910d134", "score": "0.68575186", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'miqdadyyy');\n // $this->loadViewsFrom(__DIR__.'/../resources/views', 'miqdadyyy');\n // $this->loadMigrationsFrom(__DIR__.'/../database/migrations');\n // $this->loadRoutesFrom(__DIR__.'/routes.php');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n $this->bootForConsole();\n }\n }", "title": "" }, { "docid": "3adb834f98974605302288f95bbc409a", "score": "0.6855931", "text": "public function boot()\n {\n $this->app->bind('App\\Services\\LeagueService', function() {\n return new LeagueService;\n });\n }", "title": "" }, { "docid": "58989034a6b9e9ff4a04ae71fa41ded2", "score": "0.6850468", "text": "public function boot(): void\n {\n $this->configureComponents();\n $this->configureFortifyViews();\n $this->configureLocalization();\n $this->registerCommands();\n }", "title": "" }, { "docid": "0d52b8e01a43b4cab8d5ec40f38a5d34", "score": "0.68490857", "text": "public function boot()\n {\n if ($this->booted) {\n return;\n }\n \n $this->make('blade')->boot();\n \n array_walk($this->serviceProviders, function ($p) {\n $this->bootProvider($p);\n });\n \n $this->booted = true;\n }", "title": "" }, { "docid": "3022318af344223bd6011ae5bf36ffc2", "score": "0.68391246", "text": "public function boot()\n {\n \\App::bind('CurlService', function()\n {\n return new CurlService;\n });\n }", "title": "" }, { "docid": "821894ccec304625f0d82fdca2482fe2", "score": "0.68381774", "text": "public function boot()\r\n {\r\n \t$this->registerResources();\r\n\r\n if ($this->app->runningInConsole())\r\n {\r\n $this->registerPublishing();\r\n\r\n if ($commands = $this->commands) {\r\n $this->commands($commands);\r\n }\r\n }\r\n }", "title": "" }, { "docid": "70b398289cc00fa8143de344c2e14819", "score": "0.6834466", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->publishes(\n [\n __DIR__ . '/../config/laravel_tools.php' =>\n $this->app->make('path.config') . DIRECTORY_SEPARATOR . 'laravel_tools.php',\n ],\n 'laravel_tools'\n );\n\n $this->mergeConfigFrom(__DIR__ . '/../config/laravel_tools.php', 'laravel_tools');\n\n $this->registerCommands();\n\n $this->registerBindings();\n }\n }", "title": "" }, { "docid": "a0a04f116cb736eda5aa9bb900faf622", "score": "0.68324906", "text": "public function boot(): void\n {\n $this->configure();\n $this->registerMiddlewares();\n $this->registerGatekeeper();\n $this->commands(RunMigraitonsCommand::class);\n }", "title": "" }, { "docid": "4cd7d6a3aee9a51b77d8669e79e45e47", "score": "0.6830745", "text": "public function boot(): void\n\t{\n\t\t$this->bindServiceViewClass();\n\t\t$this->shareViewStatic();\n\t\t// $this->requireClass();\n\t}", "title": "" }, { "docid": "4d5ce18eb9d827e99403b1f5c1a68bfd", "score": "0.68190736", "text": "public function boot()\n {\n $this->composeLatestNotification();\n $this->composeLogin();\n $this->composeAppColor();\n $this->composeTenant();\n $this->composeGuard();\n $this->composeFormBuilder();\n \n }", "title": "" }, { "docid": "a66d55788d7eb544a06538a2c8dcc6d3", "score": "0.68107504", "text": "public function boot()\n {\n // Make sure we are running in console\n if ($this->app->runningInConsole()) {\n // Register Commands.\n $this->commands([\n Console\\MakeCommand::class,\n ]);\n }\n\n $this->bootAnnotations();\n }", "title": "" }, { "docid": "6565ca28caa3d946fcea6ab1b3ecf869", "score": "0.6810463", "text": "public function boot()\n {\n \\Illuminate\\Pagination\\LengthAwarePaginator::defaultView('site.partials.paginator');\n foreach ($this->storecampProviders as $provider) {\n $this->app->register($provider);\n }\n\n ini_set('curl.cainfo', asset('cacert.pem'));\n }", "title": "" }, { "docid": "66f1554a4d642582b403ab0d34e51225", "score": "0.68043554", "text": "public function boot()\n {\n /*\n * Optional methods to load your package assets\n */\n }", "title": "" }, { "docid": "b81a3c66f612b6b9085fcff0206e89df", "score": "0.67963374", "text": "public function boot(): void\n {\n $this->registerEvents();\n\n $this->loadRoutesFrom($this->path() . '/routes/web.php');\n $this->loadViewsFrom($this->path() . '/resources/views', 'security');\n $this->loadTranslationsFrom($this->path() . '/resources/lang', 'security');\n\n if ($this->app->runningInConsole()) {\n $this->console();\n }\n }", "title": "" }, { "docid": "61fcd19c22623107aa555f73b901a2ee", "score": "0.6795936", "text": "public function boot()\n {\n $this->bootMacros();\n $this->bootResources();\n $this->bootMigrations();\n $this->bootDirectives();\n $this->bootComponents();\n $this->bootCommands();\n $this->bootPublishing();\n $this->bootCloudinaryDriver();\n }", "title": "" }, { "docid": "d4ee3fde8e981af575a7fa2cdcde5ead", "score": "0.67953056", "text": "public function boot()\n {\n $this->registerProviders();\n $this->bootProviders();\n $this->registerProxies();\n }", "title": "" }, { "docid": "050b64fd770799f90fbc4f86119233ed", "score": "0.6789846", "text": "public function boot()\n {\n if($this->app->runningInConsole()) {\n $this->registerPublishing();\n }\n\n // add this so the app can path defined for nova\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'nova');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'nova-user-management');\n $this->loadMigrationsFrom(__DIR__ . '/../database/migrations');\n\n // this will bind nova login controller to our login controller to add some options\n $this->app->bind(NovaLoginController::class, config('novauser.binds.login'));\n // this will bind nova authorize to custom authorize\n $this->app->bind(NovaAuthorize::class, config('novauser.binds.authorize'));\n\n $this->app->booted(function () {\n $this->routes();\n });\n\n Nova::serving(function (ServingNova $event) {\n $this->registerPolicies();\n Nova::tools($this->registerTools());\n });\n\n\n }", "title": "" }, { "docid": "f1ec073cc50063a101de9b79d85f572f", "score": "0.67891896", "text": "protected function bootstrapContainer()\n {\n static::setInstance($this);\n \n $this->instance('app', $this);\n \n $this->bootstrapEnvironment();\n \n $this->bindPathsInContainer();\n $this->registerContainerAliases();\n $this->registerCoreServices();\n $this->registerLogBindings();\n $this->registerTheme();\n }", "title": "" }, { "docid": "86e8bc40858850455bf909afcb3857fd", "score": "0.6784957", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->registerConfig();\n $this->registerFolder();\n }\n }", "title": "" }, { "docid": "3c9fd92259df5ce622240be9f73f8842", "score": "0.67777145", "text": "public function boot()\n {\n $this->app->bind(\n PostServiceInterface::class,\n PostService::class\n );\n\n $this->app->bind(\n PostRepositoryInterface::class,\n PostRepository::class\n );\n\n $this->app->bind(\n TagServiceInterface::class,\n TagService::class\n );\n\n $this->app->bind(\n TagRepositoryInterface::class,\n TagRepository::class\n );\n }", "title": "" }, { "docid": "3c31143cd13b4a61b63fe076d246b9fc", "score": "0.6773169", "text": "public function boot()\n {\n // Add Sentry Middleware\n $this->app['router']->prependMiddlewareToGroup('api', SentryContext::class);\n\n // Load builenv\n if (!App::environment('local')) {\n \n // Load buildenv\n $dotenv = new Dotenv(base_path(), '.buildenv');\n $dotenv->load();\n\n // Tag sentry with Build\n if (app()->bound('sentry')) {\n app('sentry')->tags_context([\n 'build' => env('BUILD')\n ]);\n }\n }\n \n // Register backup drive\n config([ 'filesystems.disks.backup' => [\n 'driver' => 's3',\n 'key' => env('BACKUPS_AWS_KEY'),\n 'secret' => env('BACKUPS_AWS_SECRET'),\n 'region' => env('BACKUPS_AWS_REGION'),\n 'bucket' => env('BACKUPS_AWS_BUCKET'),\n ]]);\n\n // Register the logging processor\n $monolog = logger();\n $processor = new RequestIdProcessor(request());\n $monolog->pushProcessor($processor);\n \n // Load views\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'system');\n\n // Load routes\n $this->loadRoutesFrom(__DIR__.'/routes.php');\n }", "title": "" }, { "docid": "14fa1e80fbca40c1c586bc43d5ccaa3e", "score": "0.676744", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n $this->commands([\n Repository::class,\n View::class,\n File::class,\n Lang::class,\n Service::class,\n ClassMakeCommand::class,\n\n ]);\n }\n }", "title": "" }, { "docid": "07d2f9813537a914d4535628472016a6", "score": "0.676664", "text": "public function boot()\n {\n\tif (env('APP_ENV')=='production'){\n \\URL::forceScheme('https');\n }\n // Start indexArray\n $indexPath = 'public';\n $indexArray = [\n 'css' => url($indexPath.'/styles/css'),\n 'js' => url($indexPath.'/styles/js'),\n 'image' => url($indexPath.'/images'),\n 'users' => 'users',\n 'admin' => 'admin',\n 'panel' => 'panel'\n ];\n foreach ($indexArray as $Key => $Value){\n app()->singleton($Key,function() use ($Value){\n return $Value;\n });\n }\n // End indexArray\n }", "title": "" }, { "docid": "31b07a7f010dd73065c3450bb4de986a", "score": "0.67639613", "text": "public function boot()\n {\n $this->loadViewsFrom(__DIR__ . '/../resources/views/nova-overrides', 'nova');\n\n Nova::serving(function (ServingNova $event) {\n DashboardNova::dashboardsIn(app_path('Nova/Dashboards'));\n Nova::script('nova-multiple-dashboard', __DIR__ . '/../dist/js/MultipleDashboard.js');\n });\n\n $this->app->booted(function () {\n $this->routes();\n\n Nova::serving(function (ServingNova $event) {\n DashboardNova::copyDefaultDashboardCards();\n DashboardNova::cardsInDashboards();\n });\n });\n\n if ($this->app->runningInConsole()) {\n $this->commands([\n CreateDashboard::class,\n ]);\n }\n }", "title": "" }, { "docid": "43f696cc699b8f605f097173e9b744b6", "score": "0.67587006", "text": "public function boot()\n {\n $this->registerPublishables();\n $this->publishEnv();\n }", "title": "" }, { "docid": "ee7144dd85a99b33a5bb35edac2aa4ce", "score": "0.6754109", "text": "public function boot()\n {\n $socialite = $this->app->make(Factory::class);\n $socialite->extend('sso', function ($app) use ($socialite) {\n $config = $app['config']['sso'];\n return $socialite->buildProvider(PassportSSOProvider::class, $config);\n });\n\n $this->app->singleton(SSOClient::class, function () {\n return new SSOClient(new Client());\n });\n\n $this->setupConfig();\n $this->setupRoute();\n }", "title": "" }, { "docid": "15d309c3e260f98d160253fc46b74971", "score": "0.6752144", "text": "public function boot()\n {\n $this->publishes([__DIR__ . '/../config/asseco-open-api.php' => config_path('asseco-open-api.php')]);\n\n $this->app->singleton(Document::class);\n $this->app->singleton(SchemaGenerator::class);\n\n if ($this->app->runningInConsole()) {\n $this->commands([OpenApi::class]);\n }\n }", "title": "" }, { "docid": "fe46c78dd823222c0998cba063cfd001", "score": "0.67512476", "text": "public function boot()\n\t{\n\n\t\t$this->app->bind(\\Alnutile\\UniversalComicClient\\ComicClientInterface::class, function () {\n\t\t\t$config = [\n\t\t\t\t'base_uri' => Config::get('marvel.MARVEL_API_BASE_URL'),\n\t\t\t\t'timeout' => 0,\n\t\t\t\t'allow_redirects' => false,\n\t\t\t\t'verify' => false,\n\t\t\t\t'headers' => [\n\t\t\t\t\t'Content-Type' => 'application/json'\n\t\t\t\t]\n\t\t\t];\n\n\t\t\t$client = new Client($config);\n\t\t\t$key = env('MARVEL_API_KEY');\n\t\t\t$secret = env('MARVEL_API_SECRET');\n\t\t\t$client = new MarvelApi($key, $secret, $client);\n\t\t\t$client->setApiVersion(Config::get('marvel.MARVEL_API_VERSION'));\n\t\t\treturn $client;\n\t\t});\n\n\t\t$this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'universal-comic-client');\n\n\t\t$this->loadViewsFrom(__DIR__ . '/../../resources/views', 'universal-comic-client');\n\n\t\t$this->publishes([\n\t\t\t__DIR__.'/../../../src/config/marvel.php' => config_path('marvel.php'),\n\t\t], 'config');\n\t}", "title": "" }, { "docid": "a909f9e81cf4fa4d14672123a49a8a55", "score": "0.6751015", "text": "public function boot()\n {\n // ...\n }", "title": "" }, { "docid": "34bd215a13c30b4a8f4f9fb45141d297", "score": "0.67494017", "text": "public function boot()\n\t{\n\t\t$this->package('shaunpersad/api-foundation');\n\t}", "title": "" }, { "docid": "942e4f17c1ca25fe9fd78a7c7e081402", "score": "0.6746667", "text": "public function boot()\n {\n // Merge in the config\n $configPath = __DIR__ . '/../../../resources/config/geonames.php';\n $this->mergeConfigFrom( $configPath, 'geonames' );\n\n // Register the package's migrations\n //$this->loadMigrationsFrom( __DIR__ . '/../../../migrations');\n\n // Add the Geonames service into the service container\n $this->app->singleton( 'Lukaswhite\\Geonames\\Geonames', function( $app ) {\n return new Geonames(\n $app[ 'config' ][ 'geonames' ][ 'username']\n );\n } );\n }", "title": "" }, { "docid": "8b5ada329db1988ee1691cbb704b5b00", "score": "0.67463934", "text": "public function boot()\n {\n // Bootstrap code here.\n\n $this->app->when(MicrosoftTeamsChannel::class)\n ->needs(MicrosoftTeams::class)\n ->give(static function () {\n return new MicrosoftTeams(\n new HttpClient()\n );\n });\n }", "title": "" }, { "docid": "90b89f1884e82186c86f7ea9dd2a56a5", "score": "0.6744953", "text": "public function boot()\n {\n $kernel = $this->app->make(Kernel::class);\n $kernel->prependMiddleware(Middleware::class);\n }", "title": "" }, { "docid": "3b575c8ffb59ebe5d0237ec7f42396d5", "score": "0.67401826", "text": "public function boot()\n {\n if ($this->app->runningInConsole()) {\n //$this->publishes([__DIR__ . '/../resources/views' => resource_path('views/vendor/metronic-datatable')], 'views');\n $this->publishes([__DIR__ . '/config.php' => config_path('metronic-datatable.php')], 'config');\n $this->publishes([__DIR__ . '/../public' => public_path('admin/metronic-datatable')], 'public');\n $this->publishes([__DIR__ . '/../resources/lang' => resource_path('lang')], 'resources');\n }\n\n $this->loadViewsFrom(__DIR__ . '/../resources/views', 'metronic-datatable');\n $this->loadTranslationsFrom(__DIR__ . '/../resources/lang', 'metronic-datatable');\n $this->mergeConfigFrom(__DIR__ . '/config.php', 'metronic-datatable');\n }", "title": "" }, { "docid": "bc2bd2e9051ef3e58836a0450e50a6a5", "score": "0.67392635", "text": "public function boot()\n {\n // Setup required packages\n $this->bootPackages();\n\n // Overwrite config values if necessary\n $this->validateConfig();\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "44b6d399481468a53330e1bf9a7c91d4", "score": "0.67271423", "text": "public function boot()\n {\n app()->booted(function () {\n $this->booted();\n });\n }", "title": "" }, { "docid": "79609e487a2ebe1eb73856c760b9baa6", "score": "0.67235595", "text": "public function boot()\n {\n if (config('app.env') === 'production') {\n \\URL::forceScheme('https');\n }\n if (!app()->runningInConsole()) {\n view()->share('categories', cache()->remember('categories', 120, function () {\n return Category::all();\n }));\n\n view()->share('currencies', cache()->remember('currencies', 120, function () {\n return Currency::all();\n }));\n }\n\n app()->bind('cart-helper', \\App\\Lib\\Sale\\CartHelper::class);\n app()->bind('currency-helper', \\App\\Lib\\Sale\\CurrencyHelper::class);\n app()->bind('sale-user-helper', \\App\\Lib\\Sale\\SaleUserHelper::class);\n }", "title": "" }, { "docid": "e11cbd5bba13d52d93f0393ea5ba78b4", "score": "0.67227334", "text": "public function boot()\n {\n $this->package('domain/api');\n\n $this->requires();\n\n $this->setConnection();\n }", "title": "" }, { "docid": "e9165908fa052c72ef2ff1bb0b450afe", "score": "0.67196727", "text": "public function boot()\n {\n $service = new ComponentService();\n $service->tenant = null;\n $service->bootTenant();\n }", "title": "" }, { "docid": "8356fd5410530e9f65add97a10a62cc0", "score": "0.6715562", "text": "public function boot()\n {\n if (! config('app.installed')) {\n return;\n }\n\n $this->addThemesAssets();\n $this->addModulesAssets();\n }", "title": "" }, { "docid": "93e78e9c446a5cfea7c12a6e6387f291", "score": "0.6709157", "text": "public function boot()\n {\n $this->app->singleton('easywechat', function () {\n $accountId = \\Request::header('AccountId');\n\n $accountRepository = app(AccountRepository::class);\n\n $account = $accountRepository->find($accountId);\n\n return new \\EasyWeChat\\Foundation\\Application([\n 'debug' => env('APP_DEBUG', false),\n 'app_id' => $account->app_id,\n 'secret' => $account->app_secret,\n 'token' => $account->token,\n 'log' => [\n 'level' => \\Monolog\\Logger::DEBUG,\n 'file' => storage_path('logs/easywechat.log'),\n ],\n ]);\n });\n }", "title": "" }, { "docid": "aebafd2af8aaeb343a530bf83a2ca842", "score": "0.6707402", "text": "public function boot()\n {\n echo '<pre>';\n dd(123242123);\n $path = realpath(__DIR__ . '/../resources');\n $this->addConfigComponent($this->routeGroup, $this->routeGroup, \"{$path}/config\");\n $this->addLanguageComponent($this->routeGroup, $this->routeGroup, \"{$path}/lang\");\n $this->addViewComponent($this->routeGroup, $this->routeGroup, \"{$path}/views\");\n if (!$this->app->routesAreCached()) {\n $this->loadBackendRoutesFrom(__DIR__ . \"/routes.php\");\n }\n }", "title": "" }, { "docid": "a3d7abe2eb94fd2e23f38af7d7cc2943", "score": "0.6706062", "text": "public function boot()\n {\n // $this->loadTranslationsFrom(__DIR__.'/../resources/lang', 'aidynmakhataev');\n $this->loadViewsFrom(__DIR__.'/../resources/views', 'survey-manager');\n $this->loadRoutesFrom(__DIR__.'/routes/web.php');\n $this->loadRoutesFrom(__DIR__.'/routes/api.php');\n $this->loadMigrationsFrom(__DIR__.'../database/migrations');\n\n // Publishing is only necessary when using the CLI.\n if ($this->app->runningInConsole()) {\n\n // Publishing the configuration file.\n\n $this->definePublishable();\n }\n }", "title": "" }, { "docid": "2ae022c73e5dc203e6e3f5fabf981a63", "score": "0.67054576", "text": "public function boot()\n {\n $this->bindRepositories();\n }", "title": "" }, { "docid": "c7212b0ea698139a888f0471cc51adc3", "score": "0.6690939", "text": "public function boot() {\n }", "title": "" }, { "docid": "723f91891c16affab6d1f7c1fb0b89ad", "score": "0.6688684", "text": "public function boot()\n {\n // Find path to the package\n $componenentsFileName = with(new ReflectionClass('\\Componeint\\Seneschal\\SeneschalServiceProvider'))->getFileName();\n $componenentsPath = dirname($componenentsFileName);\n\n // Register Artisan Commands\n $this->registerArtisanCommands();\n\n // Establish Fallback Config settings\n $this->mergeConfigFrom($componenentsPath . '/../../config/hashids.php', 'hashids');\n $this->mergeConfigFrom($componenentsPath . '/../../config/jwt.php', 'jwt');\n $this->mergeConfigFrom($componenentsPath . '/../../config/seneschal.php', 'seneschal');\n $this->mergeConfigFrom($componenentsPath . '/../../config/sentry.php', 'sentry');\n\n // Establish Views Namespace\n if (is_dir(base_path() . '/resources/views/seneschal')) {\n // The package views have been published - use those views.\n $this->loadViewsFrom(base_path() . '/resources/views/seneschal', 'Seneschal');\n } else {\n // The package views have not been published. Use the defaults.\n $this->loadViewsFrom($componenentsPath . '/../../resources/views/foundation', 'Seneschal');\n }\n\n // Establish Translator Namespace\n $this->loadTranslationsFrom($componenentsPath . '/../../resources/lang', 'Seneschal');\n\n // Include custom validation rules\n include $componenentsPath . '/../../routes/validators.php';\n\n // Should we register the default routes?\n if (config('seneschal.routes_enabled')) {\n include $componenentsPath . '/../../routes/api.php';\n include $componenentsPath . '/../../routes/web.php';\n }\n\n // Set up event listeners\n $dispatcher = $this->app->make('events');\n $dispatcher->subscribe('Componeint\\Seneschal\\Listeners\\UserEventListener');\n }", "title": "" }, { "docid": "0041052c5be1cec80c2e4b959aa534b5", "score": "0.66843796", "text": "public function boot()\n {\n $this->app->register(HelperServiceProvider::class);\n $this->app->register(UsersServiceProvider::class);\n $this->app->register(CategoryServiceProvider::class);\n }", "title": "" }, { "docid": "94a025b8f6df21ea107eb7a03557a47a", "score": "0.6680926", "text": "public function boot(): void\n {\n if (!$this->app->runningInConsole()) {\n return;\n }\n\n $this->commands([\n ListenCommand::class,\n InstallCommand::class,\n EventsListCommand::class,\n ObserverMakeCommand::class,\n ]);\n\n foreach ($this->listen as $event => $listeners) {\n foreach ($listeners as $listener) {\n RabbitEvents::listen($event, $listener);\n }\n }\n }", "title": "" }, { "docid": "23c880c99180b1f0816e16153253d0d7", "score": "0.6680727", "text": "public function boot(): void\n {\n $this->bootstrapModules();\n }", "title": "" }, { "docid": "3c8d8e536d7e149698455a8754f533fd", "score": "0.66801816", "text": "public function boot()\n {\n // ..\n }", "title": "" }, { "docid": "4ba1440f26b063c753c72219cb9b2ba0", "score": "0.6675785", "text": "public function boot(): void\n {\n Socialite::extend('discord',\n fn ($app) => Socialite::buildProvider(DiscordProvider::class, $app['config']['services.discord'])\n );\n }", "title": "" }, { "docid": "05f3d1bcb301c1d5e7ee6ee69c2f0fb6", "score": "0.66738707", "text": "public function boot()\n {\n\n // $this->app->bind('translator', function($app) {\n\n // $loader = $app['translation.loader'];\n // $locale = $app['config']['app.locale'];\n\n // $trans = new NinjaTranslator($loader, $locale);\n\n // $trans->setFallback($app['config']['app.fallback_locale']);\n\n // return $trans;\n\n // });\n \n $this->app->singleton('translator', function ($app) {\n\n $loader = $app['translation.loader'];\n $locale = $app['config']['app.locale'];\n\n $trans = new NinjaTranslator($loader, $locale);\n\n $trans->setFallback($app['config']['app.fallback_locale']);\n\n return $trans;\n\n });\n }", "title": "" }, { "docid": "605911944be1f19e942d496d27550729", "score": "0.6672465", "text": "public function boot(Application $app)\n {\n\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" }, { "docid": "b81d79858044559a252103ed6f54511d", "score": "0.66722375", "text": "public function boot()\n {\n }", "title": "" } ]
7169ebadd42df3be73fb27879aefb888
Validate that LO grades are graded from Moodle grade item grades during create when run for a specific user
[ { "docid": "bdcbf7fe0fa621fd4aeed00f410704ad", "score": "0.64162207", "text": "public function test_methodcreateslearningobjectivegradeforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75);\n $this->create_grade_grade($itemid, 101, 75);\n $this->create_course_completion();\n\n // Run.\n $mintime = time();\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $maxtime = time();\n\n // Validate.\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1);\n\n // Validate time modified since we don't validate it anywhere else for creates.\n $lograde = $DB->get_record(\\student_grade::TABLE, array('classid' => 100, 'userid' => 103, 'completionid' => 1));\n $this->assertGreaterThanOrEqual($mintime, $lograde->timemodified);\n $this->assertLessThanOrEqual($maxtime, $lograde->timemodified);\n }", "title": "" } ]
[ { "docid": "fdb5eb0669db486184c1eaf275b9c26e", "score": "0.6600385", "text": "public function test_methodlockslearningobjectivegradesduringcreateforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Create enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Create LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 1);\n $this->create_grade_grade($itemid, 101, 75, 100, 1);\n $this->create_course_completion('manualitem', 50);\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 75, 1);\n }", "title": "" }, { "docid": "ac8da4e79df472f260f4e9ff6ef24b2c", "score": "0.6563955", "text": "public function test_methodlockslearningobjectivegradesduringcreate() {\n global $DB;\n\n $this->load_csv_data();\n\n // Create enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Create LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 1);\n $this->create_course_completion('manualitem', 50);\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 75, 1);\n }", "title": "" }, { "docid": "73323801ba4b53a87de0532be154c7ca", "score": "0.65131634", "text": "public function validate_grade() {\n return $this->validate_number($this->grade); \n }", "title": "" }, { "docid": "4c0db1f8a50abc5c91e22d659c752861", "score": "0.6411307", "text": "protected function create_grade_grade($itemid, $userid, $finalgrade, $rawgrademax = 100, $timemodified = null) {\n $gradegrade = new \\grade_grade(array(\n 'itemid' => $itemid,\n 'userid' => $userid,\n 'finalgrade' => $finalgrade,\n 'rawgrademax' => $rawgrademax,\n 'timemodified' => $timemodified\n ));\n $gradegrade->insert();\n }", "title": "" }, { "docid": "f9cc7e94f8c04a791c2fa1baa910ecf1", "score": "0.62750596", "text": "protected function validate_grade($value) {\n if ($value !== null && $value <= 0) {\n return new lang_string('invalidgrade', 'core_competency');\n }\n\n $action = $this->get('action');\n if ($value === null && $action == self::ACTION_COMPLETE) {\n return new lang_string('invalidgrade', 'core_competency');\n\n } else if ($value !== null && $action == self::ACTION_LOG) {\n return new lang_string('invalidgrade', 'core_competency');\n }\n\n if ($value !== null) {\n // TODO MDL-52243 Use a core method to validate the grade_scale item.\n // Check if grade exist in the scale item values.\n $competency = $this->get_competency();\n if (!array_key_exists($value - 1, $competency->get_scale()->scale_items)) {\n return new lang_string('invalidgrade', 'core_competency');\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "d5aff36fb9ae6d6f1ebaa3de36080e13", "score": "0.61063004", "text": "public function test_methodcreateslearningobjectivegrade() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75);\n $this->create_course_completion();\n\n // Run.\n $mintime = time();\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $maxtime = time();\n\n // Validate.\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1);\n\n // Validate time modified since we don't validate it anywhere else for creates.\n $lograde = $DB->get_record(\\student_grade::TABLE, array('classid' => 100, 'userid' => 103, 'completionid' => 1));\n $this->assertGreaterThanOrEqual($mintime, $lograde->timemodified);\n $this->assertLessThanOrEqual($maxtime, $lograde->timemodified);\n }", "title": "" }, { "docid": "46d1c7e85e9441cbe1780a355e04b8d0", "score": "0.61051387", "text": "public function load_final_grades() {\n global $CFG, $DB;\n\n if (!empty($this->grades)) {\n return;\n }\n\n if (empty($this->users)) {\n return;\n }\n\n // please note that we must fetch all grade_grades fields if we want to construct grade_grade object from it!\n $params = array_merge(array('courseid' => $this->courseid), $this->userselect_params);\n $sql = \"SELECT g.*\n FROM {grade_items} gi,\n {grade_grades} g\n WHERE g.itemid = gi.id AND gi.courseid = :courseid {$this->userselect}\";\n\n $userids = array_keys($this->users);\n\n if ($grades = $DB->get_records_sql($sql, $params)) {\n foreach ($grades as $graderec) {\n if (in_array($graderec->userid, $userids) and array_key_exists($graderec->itemid, $this->gtree->get_items())) { // some items may not be present!!\n $this->grades[$graderec->userid][$graderec->itemid] = new grade_grade($graderec, false);\n $this->grades[$graderec->userid][$graderec->itemid]->grade_item = $this->gtree->get_item($graderec->itemid); // db caching\n }\n }\n }\n\n // prefil grades that do not exist yet\n foreach ($userids as $userid) {\n foreach ($this->gtree->get_items() as $itemid => $unused) {\n if (!isset($this->grades[$userid][$itemid])) {\n $this->grades[$userid][$itemid] = new grade_grade();\n $this->grades[$userid][$itemid]->itemid = $itemid;\n $this->grades[$userid][$itemid]->userid = $userid;\n $this->grades[$userid][$itemid]->grade_item = $this->gtree->get_item($itemid); // db caching\n }\n }\n }\n }", "title": "" }, { "docid": "e433b1ac74f46d6835411f0d340f9135", "score": "0.60891956", "text": "function get_grade_from_item($userid,$courseid,$items){\n\n global $DB;\n if(empty($items)){\n // returning Total grade of units.\n $result=grade_get_grades($courseid, 'course',NULL,get_modinstance_id($courseid)->iteminstance, $userid)->items[null];\n if($result->grademax==$result->grades[$userid]->grade){\n return html_writer::div($result->grades[$userid]->str_grade,'text-center',array('style'=>\"color: green\"));\n }\n return $result->grades[$userid]->str_grade;\n }\n else{\n $result='';\n foreach ($items as $item){\n $grade_letter = ' <b>'.get_item_letter($item).': '.'</b>';\n $attempt=(get_attemtid_from_gradeitem_new($item,$userid));\n if($attempt){\n $url = new moodle_url('/mod/quiz/review.php', array('attempt' => $attempt->attemptid));\n if($attempt->grade==100){\n $result.= $grade_letter.html_writer::link($url, 'Satisfactory'.'('.$attempt->attempt.')',array('style'=>\"color: green\",\"target\"=>\"_blank\"));\n }\n elseif ($attempt->grade==null&&$attempt->state=='finished' ){\n $result.= $grade_letter.html_writer::link($url, 'Submitted'.'('.$attempt->attempt.')',array('style'=>\"color: blue\",\"target\"=>\"_blank\"));\n }\n elseif ($attempt->grade==null&&$attempt->state=='inprogress'){\n $result.= $grade_letter.'Not Submitted';\n }\n elseif($attempt->grade<=100&&$attempt->state=='finished'){\n $result.= $grade_letter.html_writer::link($url, 'Require Re-sub'.'('.$attempt->attempt.')',array('style'=>\"color: red\",\"target\"=>\"_blank\"));\n }\n }\n else{\n// // Checking the Manual grade and auto-graded units.\n// print_object(get_quiz_id($courseid,$item)->iteminstance);\n $manual_grade = grade_get_grades($courseid,'mod','quiz',get_quiz_id($courseid,$item)->iteminstance,$userid)->items[0];\n if($manual_grade){\n if($manual_grade->grades[$userid]->grade>0){\n if($manual_grade->grades[$userid]->grade==100){\n return html_writer::div($grade_letter.$manual_grade->grades[$userid]->str_grade.' (CT)','text-center',array('style'=>\"color: green\"));\n }\n return $grade_letter.$manual_grade->grades[$userid]->str_grade.' (CT)';\n }\n else{\n $result.= $grade_letter.'Not Submitted';\n }\n }\n\n }\n\n }\n return $result;\n }\n}", "title": "" }, { "docid": "a28effd7ae291267a7a2f8aaa8d12796", "score": "0.60633487", "text": "public function create_grade() {\n // Check for valid request method\n if($this->input->server('REQUEST_METHOD') == 'POST') {\n \n // Set error to true. \n // This should be changed only if there are no validation errors.\n $error = false;\n \n // Get all field values.\n $form_fields = $this->input->post(NULL);\n \n // Validate form fields.\n //$error = $this->validate_fields($form_fields, $fields);\n \n // Send fields to model if there are no errors\n if(!$error) {\n $params = array(\n 'gradename' => $form_fields['grade_name']\n );\n \n // Call model method to perform insertion\n $status = $this->adm_mdl->exam_create($params, 'grade');\n \n // Process model response\n switch($status) {\n \n // Unique constraint violated.\n case DEFAULT_EXIST:\n $error_msg = $this->lang->line('adm_entry_exist'); \n $this->main->set_notification_message(MSG_TYPE_WARNING, $error_msg);\n break;\n \n // There was a problem creating the entry.\n case DEFAULT_ERROR:\n $error_msg = $this->lang->line('adm_error'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n break;\n \n // Entry created successfully.\n case DEFAULT_SUCCESS:\n $success_msg = sprintf($this->lang->line('adm_success'),'Grade', 'created', '');\n $this->main->set_notification_message(MSG_TYPE_SUCCESS,$success_msg);\n break;\n \n default:\n break;\n }\n }\n \n }else{\n // Set error message for any request other than POST\n $error_msg = $this->lang->line('invalid_req_method'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n }\n \n // Redirect to exam page, showing notifiction messages if there are.\n redirect(site_url('admission/management'));\n }", "title": "" }, { "docid": "330b302f585bcdc1d77ec55490cd18cc", "score": "0.5978703", "text": "public function manageUsergrades_post() {\n $post_data = $this->post();\n $this->grading->manage_usergrades($post_data);\n }", "title": "" }, { "docid": "d616c77f51db0d76ca1e8893822c2c86", "score": "0.5954239", "text": "public function sub_test_grade_grade_deleted() {\n $dg = $this->getDataGenerator();\n\n // Create the data we need for the tests.\n $fs = new file_storage();\n $u1 = $dg->create_user();\n $c1 = $dg->create_course();\n $a1 = $dg->create_module('assign', ['course' => $c1->id]);\n $a1context = context_module::instance($a1->cmid);\n\n $gi = new grade_item($dg->create_grade_item(\n [\n 'courseid' => $c1->id,\n 'itemtype' => 'mod',\n 'itemmodule' => 'assign',\n 'iteminstance' => $a1->id\n ]\n ), false);\n\n // Add feedback files to copy as our update.\n $this->add_feedback_file_to_copy();\n\n $grades['feedback'] = 'Nice feedback!';\n $grades['feedbackformat'] = FORMAT_MOODLE;\n $grades['feedbackfiles'] = [\n 'contextid' => 1,\n 'component' => 'test',\n 'filearea' => 'testarea',\n 'itemid' => 1\n ];\n\n $grades['userid'] = $u1->id;\n grade_update('mod/assign', $gi->courseid, $gi->itemtype, $gi->itemmodule, $gi->iteminstance,\n $gi->itemnumber, $grades);\n\n // Feedback file area.\n $files = $fs->get_area_files($a1context->id, GRADE_FILE_COMPONENT, GRADE_FEEDBACK_FILEAREA);\n $this->assertEquals(2, count($files));\n\n // History file area.\n $files = $fs->get_area_files($a1context->id, GRADE_FILE_COMPONENT, GRADE_HISTORY_FEEDBACK_FILEAREA);\n $this->assertEquals(2, count($files));\n\n $gg = grade_grade::fetch(array('userid' => $u1->id, 'itemid' => $gi->id));\n\n $gg->delete();\n\n // Feedback file area.\n $files = $fs->get_area_files($a1context->id, GRADE_FILE_COMPONENT, GRADE_FEEDBACK_FILEAREA);\n $this->assertEquals(0, count($files));\n\n // History file area.\n $files = $fs->get_area_files($a1context->id, GRADE_FILE_COMPONENT, GRADE_HISTORY_FEEDBACK_FILEAREA);\n $this->assertEquals(2, count($files));\n }", "title": "" }, { "docid": "4b223107cd23bfeca07afcb53417026c", "score": "0.59257835", "text": "public function test_update_grade_update_item() {\n global $DB;\n\n $callback = 'block_mhaairs_gradebookservice_external::update_grade';\n $this->set_user('admin');\n\n // CREATE/UPDATE.\n $cases = $this->get_cases('tc_update_grade');\n foreach ($cases as $case) {\n if (!empty($case->hidden)) {\n continue;\n }\n\n try {\n $result = call_user_func_array($callback, $case->servicedata);\n } catch (Exception $e) {\n $result = get_class($e);\n }\n $this->assertEquals($case->result, $result);\n\n // Fetch the item.\n $giparams = array(\n 'itemtype' => 'manual',\n 'itemmodule' => 'mhaairs',\n 'iteminstance' => $case->iteminstance,\n 'courseid' => $this->course->id,\n 'itemnumber' => $case->itemnumber,\n );\n $gitem = grade_item::fetch($giparams);\n\n if (is_numeric($case->result) and (int) $case->result === 0) {\n // Verify successful update.\n $this->assertInstanceOf('grade_item', $gitem);\n\n $maxgrade = !empty($case->item_grademax) ? (int) $case->item_grademax : 100;\n $this->assertEquals($maxgrade, $gitem->grademax);\n\n if (!empty($case->item_categoryid)) {\n // Fetch the category.\n $fetchparams = array(\n 'fullname' => $case->item_categoryid,\n 'courseid' => $this->course->id,\n );\n $category = grade_category::fetch($fetchparams);\n $categoryid = $category->id;\n $this->assertEquals($gitem->categoryid, $categoryid);\n }\n\n } else {\n // Verify failed update.\n $this->assertEquals(false, $gitem);\n }\n }\n }", "title": "" }, { "docid": "7e23cd3332d67ebc4bcfbe5b5ab23c9d", "score": "0.59056014", "text": "public function test_methodlockslearningobjectivegradesduringupdateforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Create enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Create LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 1);\n $this->create_grade_grade($itemid, 101, 75, 100, 1);\n $this->create_course_completion('manualitem', 50);\n\n // Enrol in PM class.\n $studentgrade = new \\student_grade(array(\n 'userid' => 103,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 75,\n 'locked' => 0,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n $studentgrade = new \\student_grade(array(\n 'userid' => 104,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 75,\n 'locked' => 0,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n\n // Validate setup.\n $this->assert_num_student_grades(2);\n $count = $DB->count_records(\\student_grade::TABLE, array('locked' => 1));\n $this->assertEquals(0, $count);\n $this->assert_student_grade_exists(100, 103, 1, null, 0);\n\n // Update Moodle info.\n $DB->execute(\"UPDATE {grade_grades} SET finalgrade = 80, timemodified = 2\");\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(2);\n $count = $DB->count_records(\\student_grade::TABLE, array('locked' => 1));\n $this->assertEquals(1, $count);\n $this->assert_student_grade_exists(100, 103, 1, null, 1);\n }", "title": "" }, { "docid": "99f193d89933f8508a9475012ea89e88", "score": "0.5886815", "text": "public function test_methodscalesmoodlegradeitemgradeforspecificuserid($finalgrade, $grademax, $pmgrade) {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up the LO and related Moodle structure.\n $this->create_course_completion();\n $itemid = $this->create_grade_item('manualitem', $grademax);\n $this->create_grade_grade($itemid, 100, $finalgrade, $grademax);\n $this->create_grade_grade($itemid, 101, $finalgrade, $grademax);\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, $pmgrade);\n }", "title": "" }, { "docid": "8a4485da2f72fb96675e9e8d5158fedd", "score": "0.5882474", "text": "function assessment_get_user_grades($assessment, $userid=0) {\n global $CFG, $DB;\n\n $grades = array();\n if (empty($userid)) {\n if ($usergrades = $DB->get_records('assessment_grades', array('assessment' => $assessment->id))) {\n foreach ($usergrades as $ugrade) {\n $grades[$ugrade->userid] = new stdClass();\n $grades[$ugrade->userid]->id = $ugrade->userid;\n $grades[$ugrade->userid]->userid = $ugrade->userid;\n $grades[$ugrade->userid]->rawgrade = $ugrade->grade;\n }\n } else {\n return false;\n }\n\n } else {\n if (!$ugrade = $DB->get_record('assessment_grades', array('assessment' => $assessment->id, 'userid' => $userid))) {\n return false;\n }\n $grades[$userid] = new stdClass();\n $grades[$userid]->id = $userid;\n $grades[$userid]->userid = $userid;\n $grades[$userid]->rawgrade = $ugrade->grade;\n }\n return $grades;\n}", "title": "" }, { "docid": "8a1216c04060e7228f6670c6265a9eea", "score": "0.58306193", "text": "public function test_methodupdateslearningobjectivegradeforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 1);\n $this->create_grade_grade($itemid, 101, 75, 100, 1);\n $this->create_course_completion();\n\n // Create LO grade.\n $studentgrade = new \\student_grade(array(\n 'userid' => 103,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 75,\n 'locked' => 0,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n $studentgrade = new \\student_grade(array(\n 'userid' => 104,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 75,\n 'locked' => 0,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n\n // Validate setup.\n $this->assert_num_student_grades(2);\n $this->assert_student_grade_exists(100, 103, 1, 75);\n\n // Update Moodle grade.\n $DB->execute(\"UPDATE {grade_grades} SET finalgrade = 80, timemodified = 2\");\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(2);\n $count = $DB->count_records(\\student::TABLE, array('grade' => 80));\n $this->assertEquals(1, $count);\n $this->assert_student_grade_exists(100, 103, 1, 80);\n }", "title": "" }, { "docid": "2db77dd96c1150ae33e6922e44bcda93", "score": "0.5815176", "text": "public function test_methodonlyupdatesunlockedlearningobjectivegradesforspecificuserid() {\n global $DB;\n\n // Set up enrolment.\n $this->load_csv_data();\n $this->make_course_enrollable();\n\n // Create LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 2);\n $this->create_grade_grade($itemid, 101, 75, 100, 2);\n $this->create_course_completion('manualitem', 50);\n\n // Assign a PM grade.\n $studentgrade = new \\student_grade(array(\n 'userid' => 103,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 50,\n 'locked' => 1,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n $studentgrade = new \\student_grade(array(\n 'userid' => 104,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 50,\n 'locked' => 1,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n\n // Validate setup with element locked.\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(2);\n $this->assert_student_grade_exists(100, 103, 1, 50, 1, 1);\n $this->assert_student_grade_exists(100, 104, 1, 50, 1, 1);\n\n // Validate update with element unlocked.\n $DB->execute(\"UPDATE {\".\\student_grade::TABLE.\"} SET locked = 0\");\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(2);\n $this->assert_student_grade_exists(100, 103, 1, 75, 1);\n $this->assert_student_grade_exists(100, 104, 1, 50, 0);\n }", "title": "" }, { "docid": "b19da7585eed2eb59c71ae6f980185e1", "score": "0.5776095", "text": "function qcreate_get_grade($qcreate, $qid, $createnew=false) {\n $grade = get_record('qcreate_grades', 'qcreateid', $qcreate->id, 'questionid', $qid);\n\n if ($grade || !$createnew) {\n return $grade;\n }\n $newgrade = qcreate_prepare_new_grade($qcreate, $qid);\n if (!insert_record(\"qcreate_grades\", $newgrade)) {\n error(\"Could not insert a new empty grade\");\n }\n\n return get_record('qcreate_grades', 'qcreate', $qcreate->id, 'questionid', $qid);\n}", "title": "" }, { "docid": "cab2f875b9cff1f42c78263255a0cdb1", "score": "0.57634795", "text": "public function test_methodonlyupdateslearningobjectivegradeifkeyfieldchangedforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 40, 100, 1);\n $this->create_grade_grade($itemid, 101, 40, 100, 1);\n $this->create_course_completion('manualitem', 50);\n\n // Validate setup.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 40, 0, 1);\n\n // Only a bogus db field is updated.\n $DB->execute(\"UPDATE {grade_grades} SET information = 'updated'\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 40, 0, 1);\n\n // Update grade.\n $DB->execute(\"UPDATE {grade_grades} SET finalgrade = 45, timemodified = 2\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 45, 0, 2);\n\n // Update timegraded.\n $DB->execute(\"UPDATE {grade_grades} SET timemodified = 12345\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 45, 0, 12345);\n\n // Update locked.\n $DB->execute(\"UPDATE {\".\\coursecompletion::TABLE.\"} SET completion_grade = 45\");\n $DB->execute(\"UPDATE {grade_grades} SET timemodified = 123456\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 45, 1, 123456);\n }", "title": "" }, { "docid": "b121305e8db2d9793b97b33dfb6bb6bc", "score": "0.57384676", "text": "public function test_methodscalesmoodlecoursegradeforspecificuserid($finalgrade, $grademax, $pmgrade) {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up grade information.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->grademax = $grademax;\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n $coursegradegrade = new \\grade_grade(array(\n 'itemid' => 1,\n 'userid' => 100,\n 'rawgrademax' => $grademax,\n 'finalgrade' => $finalgrade\n ));\n $coursegradegrade->insert();\n $coursegradegrade = new \\grade_grade(array(\n 'itemid' => 1,\n 'userid' => 101,\n 'rawgrademax' => $grademax,\n 'finalgrade' => $finalgrade\n ));\n $coursegradegrade->insert();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, $pmgrade);\n }", "title": "" }, { "docid": "e009f4ec70b4fe9984ee65502d6bb32a", "score": "0.57337624", "text": "private function validateGrade($data, $field, $column, $row)\n {\n if ($data == \"\" || $data == null\n || ((is_int($data) || is_float($data)) && $data < 4.001 && $data > -0.001)\n || $data == \"S\" || $data == \"s\"\n || $data == \"U\" || $data == \"u\"\n || $data == \"I\" || $data == \"i\"\n || $data == \"0/1\"\n || strcasecmp($data, SystemConstant::DROP_GRADE_TEXT) == 0\n || strcasecmp($data, SystemConstant::ERASE_GRADE_TEXT) == 0\n // Match normal grade value or I/Grade\n || (preg_match(\"/^([Ii]\\/)?(([0-3][\\.][0-9]*)|([0-4])|(4\\.0*))$/\", $data))\n ) {\n // Ok return null;\n return null;\n } else {\n return \"Field '$field' value \".$data.\" is incorrect format at row '$column\" . ($row + 7) . \"'\";\n }\n }", "title": "" }, { "docid": "8a1cf3146c9a19f60a1ba4af320a6658", "score": "0.5733204", "text": "function qcreate_grade_item_update($qcreate) {\n global $CFG;\n if (!function_exists('grade_update')) { //workaround for buggy PHP versions\n require_once($CFG->libdir.'/gradelib.php');\n }\n\n if (!isset($qcreate->courseid)) {\n $qcreate->courseid = $qcreate->course;\n }\n\n $params = array('itemname'=>$qcreate->name, 'idnumber'=>$qcreate->cmidnumber);\n\n if ($qcreate->grade > 0) {\n $params['gradetype'] = GRADE_TYPE_VALUE;\n $params['grademax'] = $qcreate->grade;\n $params['grademin'] = 0;\n\n } else if ($qcreate->grade < 0) {\n $params['gradetype'] = GRADE_TYPE_SCALE;\n $params['scaleid'] = -$qcreate->grade;\n } else {\n $params['gradetype'] = GRADE_TYPE_NONE;\n }\n $params['itemnumber'] = 0;\n return grade_update('mod/qcreate', $qcreate->courseid, 'mod', 'qcreate', $qcreate->id, 0, NULL, $params);\n}", "title": "" }, { "docid": "3f0d064a0c6dd453c03f99003e883764", "score": "0.56650996", "text": "public function fixture_moodleenrol($userids, $itemgrades) {\n global $DB;\n\n // Import CSV data.\n $dataset = $this->createCsvDataSet(array(\n // Need PM course to create PM class.\n course::TABLE => elispm::file('tests/fixtures/pmcourse.csv'),\n // Need PM classes to create associations.\n pmclass::TABLE => elispm::file('tests/fixtures/pmclass.csv'),\n // Set up associated users.\n 'user' => elispm::file('tests/fixtures/mdluser.csv'),\n user::TABLE => elispm::file('tests/fixtures/pmuser.csv'),\n usermoodle::TABLE => elispm::file('tests/fixtures/user_moodle.csv'),\n // Set up learning objectives.\n coursecompletion::TABLE => elispm::file('tests/fixtures/course_completion.csv'),\n ));\n $this->loadDataSet($dataset);\n\n // Create course.\n $course = $this->getDataGenerator()->create_course();\n\n // Link with ELIS class.\n $DB->insert_record(classmoodlecourse::TABLE, (object)array('classid' => 100, 'moodlecourseid' => $course->id));\n\n // Create grade items.\n $items = array(\n array(\n 'courseid' => $course->id,\n 'idnumber' => 'required',\n 'itemtype' => 'manual',\n ),\n array(\n 'courseid' => $course->id,\n 'idnumber' => 'notrequired',\n 'itemtype' => 'manual',\n ),\n array(\n 'courseid' => $course->id,\n 'idnumber' => 'course',\n 'itemtype' => 'course',\n ),\n );\n foreach ($items as $item) {\n $DB->insert_record('grade_items', (object)$item);\n }\n\n // Set up our test role.\n $roleid = create_role('gradedrole', 'gradedrole', 'gradedrole');\n set_config('gradebookroles', $roleid);\n\n // Create all of our test enrolments.\n foreach ($userids as $userid) {\n $this->getDataGenerator()->enrol_user($userid, $course->id, $roleid);\n }\n\n // Assign item grades.\n foreach ($itemgrades as $itemgrade) {\n $DB->insert_record('grade_grades', (object)$itemgrade);\n }\n }", "title": "" }, { "docid": "b49282cca7a50f72e9bd7887be50d836", "score": "0.56575763", "text": "public function create_exam_grade() {\n // Check for valid request method\n if($this->input->server('REQUEST_METHOD') == 'POST') {\n \n // Set error to true. \n // This should be changed only if there are no validation errors.\n $error = false;\n \n // Get all field values.\n $form_fields = $this->input->post(NULL);\n \n // Validate form fields.\n //$error = $this->validate_fields($form_fields, $fields);\n \n // Send fields to model if there are no errors\n if(!$error) {\n $params = array(\n 'examid' => $form_fields['exam_id'],\n 'gradeid' => $form_fields['exam_grade'],\n 'gradeweight' => $form_fields['grade_weight'],\n 'gradedesc' => $form_fields['grade_desc'],\n \n );\n \n // Call model method to perform insertion\n $status = $this->adm_mdl->exam_create($params, 'exam_grade');\n \n // Process model response\n switch($status) {\n \n // Unique constraint violated.\n case DEFAULT_EXIST:\n $error_msg = $this->lang->line('adm_entry_exist'); \n $this->main->set_notification_message(MSG_TYPE_WARNING, $error_msg);\n break;\n \n // There was a problem creating the entry.\n case DEFAULT_ERROR:\n $error_msg = $this->lang->line('adm_error'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n break;\n \n // Entry created successfully.\n case DEFAULT_SUCCESS:\n $success_msg = sprintf($this->lang->line('adm_success'),'Grade added to Exam', '', '');\n $this->main->set_notification_message(MSG_TYPE_SUCCESS,$success_msg);\n break;\n \n default:\n break;\n }\n }\n \n }else{\n // Set error message for any request other than POST\n $error_msg = $this->lang->line('invalid_req_method'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n }\n \n // Redirect to exam page, showing notifiction messages if there are.\n redirect(site_url('admission/management'));\n }", "title": "" }, { "docid": "ade4d85287947142380b36ef441d095b", "score": "0.55805415", "text": "public function createGradeBookItem(\n int $orgUnitId = 0, \n CreateNumericGradeModel|CreateSelectBoxGradeModel|CreatePassFailGradeModel|CreateTextGradeModel $newGradeItem = null\n ): GradesModel {\n \n if (\n $orgUnitId > 0\n ) {\n $response = $this->callAPI(\n product: 'le',\n action: 'POST',\n route: \"/$orgUnitId/grades/\",\n data: $newGradeItem\n );\n } else {\n throw new InvalidArgumentException('Invalid or missing arguments');\n }\n \n //Will Re-examine later\n /** @phpstan-ignore-next-line */\n return new GradesModel(values: $response->data);\n }", "title": "" }, { "docid": "15c02db281928a816cfdd6558de12036", "score": "0.556891", "text": "public static function addReviewGrade($reviewId, $userId, $grade) {\r\n try {\r\n $dbconn = Database::getInstance()->getConnection();\r\n\r\n $statement = $dbconn->prepare('\r\n SELECT *\r\n FROM \r\n grades_reviews\r\n WHERE \r\n id_user = :userId\r\n AND\r\n id_review = :reviewId\r\n ');\r\n $statement->bindParam(\":userId\", $userId, PDO::PARAM_INT);\r\n $statement->bindParam(\":reviewId\", $reviewId, PDO::PARAM_INT);\r\n $statement->execute();\r\n $isExisting = $statement->rowCount() == 1;\r\n\r\n if ($isExisting) {\r\n $currentValue = $statement->fetchAll()[0][\"grade\"];\r\n $statement = $dbconn->prepare('\r\n UPDATE\r\n grades_reviews\r\n SET\r\n grade = :grade\r\n WHERE \r\n id_user = :userId\r\n AND\r\n id_review = :reviewId\r\n ');\r\n $statement->bindParam(\":userId\", $userId, PDO::PARAM_INT);\r\n $statement->bindParam(\":reviewId\", $reviewId, PDO::PARAM_INT);\r\n $statement->bindParam(\":grade\", $grade, PDO::PARAM_INT);\r\n $statement->execute();\r\n return $statement->rowCount() == 1;\r\n }\r\n\r\n // ELSE NEW GRADE \r\n $statement = $dbconn->prepare('\r\n INSERT INTO grades_reviews VALUES (\r\n :userId,\r\n :reviewId,\r\n :grade\r\n )\r\n ');\r\n $currentScore = $grade == Defaults::SCORE_DOWN ? -1 : 1;\r\n $statement->bindParam(\":userId\", $userId, PDO::PARAM_INT);\r\n $statement->bindParam(\":reviewId\", $reviewId, PDO::PARAM_INT);\r\n $statement->bindParam(\":grade\", $currentScore, PDO::PARAM_INT);\r\n $statement->execute();\r\n return $statement->rowCount() == 1;\r\n } catch (PDOException $e) {\r\n LogsService::logException($e);\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "37c2272c5a71cc1433265bcdad3046c5", "score": "0.5561254", "text": "public function test_methodscalesmoodlegradeitemgrade($finalgrade, $grademax, $pmgrade) {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up the LO and related Moodle structure.\n $this->create_course_completion();\n $itemid = $this->create_grade_item('manualitem', $grademax);\n $this->create_grade_grade($itemid, 100, $finalgrade, $grademax);\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, $pmgrade);\n }", "title": "" }, { "docid": "46cd504d55f708896b2b05f060db9481", "score": "0.5530077", "text": "public function isgradeExist($gm_gradename) {\n $is_exist = $this->commodel->isduplicate('grade_master','gm_gradename',$gm_gradename);\n if ($is_exist)\n {\n $this->form_validation->set_message('isgradeExist', 'Grade is already exist.');\n return false;\n }\n else {\n return true;\n }\n }", "title": "" }, { "docid": "e9ea6e5dc8fb293cd54fbd66c579538c", "score": "0.5522547", "text": "public function saveGrades($data, $course_id)\n\t{\n\t\t$values = array();\n\t\t$member_ids = array();\n\t\t$existing_grades = array();\n\n\t\tif (!empty($data))\n\t\t{\n\t\t\t// Get member id's\n\t\t\tforeach ($data as $member_id => $member)\n\t\t\t{\n\t\t\t\t$member_ids[] = $member_id;\n\t\t\t}\n\n\t\t\t// Query for existing data\n\t\t\t$query = \"SELECT * FROM `#__courses_grade_book` WHERE `member_id` IN (\".implode(',', $member_ids).\") AND `scope` IN ('course', 'unit')\";\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$results = $this->_db->loadObjectList();\n\n\t\t\tforeach ($results as $r)\n\t\t\t{\n\t\t\t\t$existing_grades[$r->member_id.'.'.$r->scope.'.'.$r->scope_id] = array('id'=>$r->id, 'score'=>$r->score);\n\t\t\t}\n\t\t}\n\n\t\t$inserts = array();\n\t\t$updates = array();\n\n\t\tforeach ($data as $member_id => $member)\n\t\t{\n\t\t\tforeach ($member['units'] as $unit_id => $unit)\n\t\t\t{\n\t\t\t\t// Check for empty unit_id\n\t\t\t\t// This is a hack for storing \"extra\" grades added via the gradebook - they come in with unit_id of NULL\n\t\t\t\tif (empty($unit_id))\n\t\t\t\t{\n\t\t\t\t\t$unit_id = 0;\n\t\t\t\t}\n\n\t\t\t\tif (is_numeric($unit['unit_weighted']))\n\t\t\t\t{\n\t\t\t\t\tif (array_key_exists($member_id.'.unit.'.$unit_id, $existing_grades))\n\t\t\t\t\t{\n\t\t\t\t\t\t$key = $member_id.'.unit.'.$unit_id;\n\n\t\t\t\t\t\tif ((is_null($existing_grades[$key]['score']) && !is_null($unit['unit_weighted'])) || $existing_grades[$key]['score'] != $unit['unit_weighted'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$updates[] = \"UPDATE `#__courses_grade_book` SET `score` = '{$unit['unit_weighted']}' WHERE `id` = '\".$existing_grades[$key]['id'].\"'\";\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$inserts[] = \"('{$member_id}', \" . $this->_db->quote($unit['unit_weighted']) . \", 'unit', '{$unit_id}')\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if (is_null($unit['unit_weighted']))\n\t\t\t\t{\n\t\t\t\t\tif (array_key_exists($member_id.'.unit.'.$unit_id, $existing_grades))\n\t\t\t\t\t{\n\t\t\t\t\t\t$key = $member_id.'.unit.'.$unit_id;\n\n\t\t\t\t\t\tif (!is_null($existing_grades[$key]['score']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$updates[] = \"UPDATE `#__courses_grade_book` SET `score` = NULL WHERE `id` = '\".$existing_grades[$key]['id'].\"'\";\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$inserts[] = \"('{$member_id}', NULL, 'unit', '{$unit_id}')\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_numeric($member['course_weighted']))\n\t\t\t{\n\t\t\t\tif (array_key_exists($member_id.'.course.'.$course_id, $existing_grades))\n\t\t\t\t{\n\t\t\t\t\t$key = $member_id.'.course.'.$course_id;\n\n\t\t\t\t\tif ((is_null($existing_grades[$key]['score']) && !is_null($member['course_weighted'])) || $existing_grades[$key]['score'] != $member['course_weighted'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$updates[] = \"UPDATE `#__courses_grade_book` SET `score` = '{$member['course_weighted']}' WHERE `id` = '\".$existing_grades[$key]['id'].\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$inserts[] = \"('{$member_id}', \" . $this->_db->quote($member['course_weighted']) . \", 'course', '{$course_id}')\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (is_null($member['course_weighted']))\n\t\t\t{\n\t\t\t\tif (array_key_exists($member_id.'.course.'.$course_id, $existing_grades))\n\t\t\t\t{\n\t\t\t\t\t$key = $member_id.'.course.'.$course_id;\n\n\t\t\t\t\tif (!is_null($existing_grades[$key]['score']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$updates[] = \"UPDATE `#__courses_grade_book` SET `score` = NULL WHERE `id` = '\".$existing_grades[$key]['id'].\"'\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$inserts[] = \"('{$member_id}', NULL, 'course', '{$course_id}')\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (count($updates) > 0)\n\t\t{\n\t\t\tforeach ($updates as $update)\n\t\t\t{\n\t\t\t\t$query = $update;\n\t\t\t\t$this->_db->setQuery($query);\n\t\t\t\t$this->_db->query();\n\t\t\t}\n\t\t}\n\n\t\tif (count($inserts) > 0)\n\t\t{\n\t\t\t$query = \"INSERT INTO `#__courses_grade_book` (`member_id`, `score`, `scope`, `scope_id`) VALUES\\n\";\n\t\t\t$query .= implode(\",\\n\", $inserts);\n\n\t\t\t$this->_db->setQuery($query);\n\t\t\t$this->_db->query();\n\t\t}\n\t}", "title": "" }, { "docid": "9372e9bf667eb5cbd67b20f4d7d203b7", "score": "0.5516256", "text": "public static function createGrade($qualID, $grade, $points = 0, $weight = 1){\n \n global $DB;\n \n $ins = new \\stdClass();\n $ins->qoeid = $qualID;\n $ins->grade = $grade;\n $ins->points = $points;\n $ins->weighting = $weight;\n return $DB->insert_record(\"bcgt_qoe_grades\", $ins);\n \n }", "title": "" }, { "docid": "12a55d4b3aa4269879be3b3792d23e37", "score": "0.5516012", "text": "public function test_methodlockslearningobjectivegradesduringupdate() {\n global $DB;\n\n $this->load_csv_data();\n\n // Create enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Create LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 1);\n $this->create_course_completion('manualitem', 50);\n\n // Enrol in PM class.\n $studentgrade = new \\student_grade(array(\n 'userid' => 103,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 75,\n 'locked' => 0,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n\n // Validate setup.\n $this->assert_num_student_grades(1);\n $count = $DB->count_records(\\student_grade::TABLE, array('locked' => 1));\n $this->assertEquals(0, $count);\n $this->assert_student_grade_exists(100, 103, 1, null, 0);\n\n // Update Moodle info.\n $DB->execute(\"UPDATE {grade_grades} SET finalgrade = 80, timemodified = 2\");\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $count = $DB->count_records(\\student_grade::TABLE, array('locked' => 1));\n $this->assertEquals(1, $count);\n $this->assert_student_grade_exists(100, 103, 1, null, 1);\n }", "title": "" }, { "docid": "e1e65b01eabbab21f42d80af999e8cf8", "score": "0.5515067", "text": "function simplelesson_get_user_grades($simplelesson, $userid=0) {\n global $CFG, $DB;\n\n $grades = array();\n if (empty($userid)) {\n // All user attempts for this simple lesson.\n $sql = \"SELECT a.id, a.simplelessonid,\n a.userid, a.sessionscore,\n a.timecreated\n FROM {simplelesson_attempts} a\n WHERE a.simplelessonid = :slid\n GROUP BY a.userid\";\n\n $slusers = $DB->get_records_sql($sql,\n array('slid' => $simplelesson->id));\n if ($slusers) {\n foreach ($slusers as $sluser) {\n $grades[$sluser->userid] = new stdClass();\n $grades[$sluser->userid]->id = $sluser->id;\n $grades[$sluser->userid]->userid = $sluser->userid;\n\n // Get this users attempts.\n $sql = \"SELECT a.id, a.simplelessonid,\n a.userid, a.sessionscore,\n a.timecreated\n FROM {simplelesson_attempts} a\n INNER JOIN {user} u\n ON u.id = a.userid\n WHERE a.simplelessonid = :slid\n AND u.id = :uid\";\n $attempts = $DB->get_records_sql($sql,\n array('slid' => $simplelesson->id,\n 'uid' => $sluser->userid));\n\n // Apply grading method.\n $grades[$sluser->userid]->rawgrade =\n \\mod_simplelesson\\local\\grading::\n grade_user($simplelesson, $attempts);\n }\n } else {\n return false;\n }\n\n } else {\n // User grade for userid.\n $sql = \"SELECT a.id, a.simplelessonid,\n a.userid, a.sessionscore,\n a.timecreated\n FROM {simplelesson_attempts} a\n INNER JOIN {user} u\n ON u.id = a.userid\n WHERE a.simplelessonid = :slid\n AND u.id = :uid\";\n\n $attempts = $DB->get_records_sql($sql,\n array('slid' => $simplelesson->id,\n 'uid' => $userid));\n if (!$attempts) {\n return false; // No attempt yet.\n }\n // Update grades for user.\n $grades[$userid] = new stdClass();\n $grades[$userid]->id = $simplelesson->id;\n $grades[$userid]->userid = $userid;\n // Using selected grading strategy here.\n $grades[$userid]->rawgrade =\n \\mod_simplelesson\\local\\grading::grade_user($simplelesson,\n $attempts);\n }\n return $grades;\n}", "title": "" }, { "docid": "af88071bcb6fba915449198e6027ce6e", "score": "0.55020964", "text": "protected function validate ($original = \"NULL\")\n\t{\n\t\t//return false if Grade is non-blank and duplicate\n\t\tif ($this->fields['GradeNum'] != \"\")\n\t\t{\n\t\t\tif\n\t\t\t(\n\t\t\t\tInput::is_duplicate\n\t\t\t\t(\n\t\t\t\t\t$this->connection,\n\t\t\t\t\t$this->table,\n\t\t\t\t\t\"GradeNum\",\n\t\t\t\t\t$this->fields['GradeNum'],\n\t\t\t\t\t$original\n\t\t\t\t)\n\t\t\t)\n\t\t\t{\n\t\t\t\t$this->msgs['GradeNum'] = \"This grade level has already been added.\";\n\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t} //end if Grade is non-blank and duplicate\n\n\t\t//return true otherwise\n\t\treturn true;\n\n\t}", "title": "" }, { "docid": "ff73931dd7106042176a936574567712", "score": "0.5496493", "text": "function qcreate_get_user_grades($qcreate, $userid=0) {\n global $CFG;\n if (is_array($userid)){\n $user = \"u.id IN (\".implode(',', $userid).\") AND\";\n } else if ($userid){\n $user = \"u.id = $userid AND\";\n } else {\n $user = '';\n }\n $modulecontext = get_context_instance(CONTEXT_MODULE, $qcreate->cmidnumber);\n $sql = \"SELECT q.id, u.id AS userid, g.grade AS rawgrade, g.gradecomment AS feedback, g.teacher AS usermodified, q.qtype AS qtype\n FROM {$CFG->prefix}user u, {$CFG->prefix}question_categories qc, {$CFG->prefix}question q\n LEFT JOIN {$CFG->prefix}qcreate_grades g ON g.questionid = q.id\n WHERE $user u.id = q.createdby AND qc.id = q. category AND qc.contextid={$modulecontext->id}\n ORDER BY rawgrade DESC\";\n $localgrades = get_records_sql($sql);\n $gradesbyuserids = array();\n foreach($localgrades as $k=>$v) {\n if (!isset($gradesbyuserids[$v->userid])){\n $gradesbyuserids[$v->userid] = array();\n }\n if ($v->rawgrade == -1) {\n $v->rawgrade = null;\n }\n $gradesbyuserids[$v->userid][$k] = $v;\n }\n $aggregategradebyuserids = array();\n foreach ($gradesbyuserids as $userid => $gradesbyuserid){\n $aggregategradebyuserids[$userid] = qcreate_grade_aggregate($gradesbyuserid, $qcreate);\n }\n return $aggregategradebyuserids;\n}", "title": "" }, { "docid": "5caf95f9b7bbad7e81af689f21c5e8a2", "score": "0.5467089", "text": "public function test_methodmarkenrolmentpassedwhengradesufficientandnorequiredlearningobjectivesforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up PM course completion criteria.\n $pmcourse = new \\course(array('id' => 100, 'completion_grade' => 50));\n $pmcourse->save();\n\n // Set up course grade item info in Moodle.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->grademax = 100;\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n // Set up PM class enrolment with sufficient grade.\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 100, 'finalgrade' => 100));\n $coursegradegrade->insert();\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 101, 'finalgrade' => 100));\n $coursegradegrade->insert();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, STUSTATUS_PASSED);\n }", "title": "" }, { "docid": "2950347c2f1946e79292f9fab358f6f8", "score": "0.5452892", "text": "public function addGrade($data)\n {\n $sql = 'INSERT INTO grades VALUES (?,?,?,?)';\n $this->_db->executeQuery(\n $sql,\n array($data['id_grade'], $data['grade'], $data['id_user'],\n $data['id_file'])\n );\n }", "title": "" }, { "docid": "9590de8c2244482e35282505a6a6b07c", "score": "0.5428078", "text": "public function testItHasStudentGrade()\n {\n $tenant = factory(Tenant::class)->create();\n $studentGrade = StudentGrade::first();\n $course = factory(Course::class)->create([\n 'student_grade_id' => $studentGrade->id,\n 'tenant_id' => $tenant->id,\n ]);\n\n $this->assertEquals($studentGrade->id, $course->grade->id);\n }", "title": "" }, { "docid": "e4ad96592ff8d39799b80629ac90cc3f", "score": "0.5423711", "text": "public function test_methodonlyupdatesunlockedlearningobjectivegrades() {\n global $DB;\n\n // Set up enrolment.\n $this->load_csv_data();\n $this->make_course_enrollable();\n\n // Create LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 2);\n $this->create_course_completion('manualitem', 50);\n\n // Assign a PM grade.\n $studentgrade = new \\student_grade(array(\n 'userid' => 103,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 50,\n 'locked' => 1,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n\n // Validate setup with element locked.\n enrol_try_internal_enrol(2, 100, 1);\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 50, 1, 1);\n\n // Validate update with element unlocked.\n $DB->execute(\"UPDATE {\".\\student_grade::TABLE.\"} SET locked = 0\");\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 75, 1);\n }", "title": "" }, { "docid": "fcee740811a5188f771d43c7af656984", "score": "0.5381863", "text": "function add_grade($grade){\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "fcee740811a5188f771d43c7af656984", "score": "0.5381863", "text": "function add_grade($grade){\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "92b16bd37379c7a06e08c8ce290e159f", "score": "0.53814095", "text": "function qcreate_grades($qcreateid) {\n return NULL;\n}", "title": "" }, { "docid": "680767c687f801fe1d48d20b0f7c42b8", "score": "0.5379711", "text": "function oublog_get_user_grades($oublog, $userid = 0) {\n global $CFG, $DB;\n require_once($CFG->dirroot . '/rating/lib.php');\n require_once($CFG->dirroot . '/mod/oublog/locallib.php');\n\n $options = new stdClass();\n $options->component = 'mod_oublog';\n $options->ratingarea = 'post';\n $options->modulename = 'oublog';\n $options->moduleid = $oublog->id;\n $options->userid = $userid;\n $options->aggregationmethod = $oublog->assessed;\n $options->scaleid = $oublog->scale;\n $options->cmid = $oublog->cmid;\n\n // There now follows a lift of get_user_grades() from rating lib\n // but with the requirement for items modified.\n $rm = new rating_manager();\n\n if (!isset($options->component)) {\n throw new coding_exception(\n 'The component option is now a required option when getting user grades from ratings.'\n );\n }\n if (!isset($options->ratingarea)) {\n throw new coding_exception(\n 'The ratingarea option is now a required option when getting user grades from ratings.'\n );\n }\n\n // Going direct to the db for the context id seemed wrong.\n $context = context_module::instance($options->cmid );\n\n $params = array();\n $params['contextid'] = $context->id;\n $params['component'] = $options->component;\n $params['ratingarea'] = $options->ratingarea;\n $scaleid = $options->scaleid;\n $aggregationstring = $rm->get_aggregation_method($options->aggregationmethod);\n // If userid is not 0 we only want the grade for a single user.\n $singleuserwhere = '';\n if ($options->userid != 0) {\n // Get the grades for the {posts} the user is responsible for.\n $cm = get_coursemodule_from_id('oublog', $oublog->cmid);\n list($posts, $recordcount) = oublog_get_posts($oublog, $context, 0, $cm, 0, $options->userid);\n if ($posts) {\n foreach ($posts as $post) {\n $postids[] = (int)$post->id;\n }\n }\n $params['userid'] = $userid;\n $singleuserwhere = \" AND i.userid = :userid\";\n }\n\n $sql = \"SELECT u.id as id, u.id AS userid, $aggregationstring(r.rating) AS rawgrade\n FROM {oublog} o\n JOIN {oublog_instances} i ON i.oublogid = o.id\n JOIN {oublog_posts} p ON p.oubloginstancesid = i.id\n JOIN {rating} r ON r.itemid = p.id\n JOIN {user} u ON i.userid = u.id\n WHERE r.contextid = :contextid\n AND r.component = :component\n AND r.ratingarea = :ratingarea\n $singleuserwhere\n GROUP BY u.id\";\n\n $results = $DB->get_records_sql($sql, $params);\n\n if ($results) {\n $scale = null;\n $max = 0;\n if ($options->scaleid >= 0) {\n // Numeric.\n $max = $options->scaleid;\n } else {\n // Custom scales.\n $scale = $DB->get_record('scale', array('id' => -$options->scaleid));\n if ($scale) {\n $scale = explode(',', $scale->scale);\n $max = count($scale);\n } else {\n debugging(\n 'rating_manager::get_user_grades() received a scale ID that doesnt exist'\n );\n }\n }\n\n // It could throw off the grading if count and sum returned a rawgrade higher than scale\n // so to prevent it we review the results and ensure that rawgrade does not exceed\n // the scale, if it does we set rawgrade = scale (i.e. full credit).\n foreach ($results as $rid => $result) {\n if ($options->scaleid >= 0) {\n // Numeric.\n if ($result->rawgrade > $options->scaleid) {\n $results[$rid]->rawgrade = $options->scaleid;\n }\n } else {\n // Scales.\n if (!empty($scale) && $result->rawgrade > $max) {\n $results[$rid]->rawgrade = $max;\n }\n }\n }\n }\n return $results;\n}", "title": "" }, { "docid": "d4315e325bcfaddd15ccf0714d14ad8f", "score": "0.537917", "text": "public function test_methodonlyupdateslearningobjectivegradeifkeyfieldchanged() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 40, 100, 1);\n $this->create_course_completion('manualitem', 50);\n\n // Validate setup.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 40, 0, 1);\n\n // Only a bogus db field is updated.\n $DB->execute(\"UPDATE {grade_grades} SET information = 'updated'\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 40, 0, 1);\n\n // Update grade.\n $DB->execute(\"UPDATE {grade_grades} SET finalgrade = 45, timemodified = 2\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 45, 0, 2);\n\n // Update timegraded.\n $DB->execute(\"UPDATE {grade_grades} SET timemodified = 12345\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 45, 0, 12345);\n\n // Update locked.\n $DB->execute(\"UPDATE {\".\\coursecompletion::TABLE.\"} SET completion_grade = 45\");\n $DB->execute(\"UPDATE {grade_grades} SET timemodified = 123456\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 45, 1, 123456);\n }", "title": "" }, { "docid": "d38dab2432ba0a5d01a99e4516793250", "score": "0.5366522", "text": "function oublog_grade_item_update($oublog, $grades = null) {\n global $CFG;\n require_once($CFG->libdir . '/gradelib.php');\n require_once($CFG->dirroot . '/mod/oublog/locallib.php');\n // Use 'grade' or 'scale' depends upon 'grading'.\n if ($oublog->grading == OUBLOG_USE_RATING) {\n $oublogscale = $oublog->scale;\n } else if ($oublog->grading == OUBLOG_NO_GRADING) {\n $oublogscale = 0;\n } else {\n $oublogscale = $oublog->grade;\n }\n\n $params = array('itemname' => $oublog->name);\n\n if ($oublogscale > 0) {\n $params['gradetype'] = GRADE_TYPE_VALUE;\n $params['grademax'] = $oublogscale;\n $params['grademin'] = 0;\n\n } else if ($oublogscale < 0) {\n $params['gradetype'] = GRADE_TYPE_SCALE;\n $params['scaleid'] = -$oublogscale;\n\n } else {\n $params['gradetype'] = GRADE_TYPE_NONE;\n }\n\n if ($grades === 'reset') {\n $params['reset'] = true;\n $grades = null;\n }\n\n return grade_update('mod/oublog', $oublog->course, 'mod',\n 'oublog', $oublog->id, 0, $grades, $params);\n}", "title": "" }, { "docid": "9664989b9c8fc78d352c41d3050b5d66", "score": "0.5364677", "text": "function add_grade($grade) {\r\n $this->grades[] = $grade;\r\n }", "title": "" }, { "docid": "9664989b9c8fc78d352c41d3050b5d66", "score": "0.5364677", "text": "function add_grade($grade) {\r\n $this->grades[] = $grade;\r\n }", "title": "" }, { "docid": "9664989b9c8fc78d352c41d3050b5d66", "score": "0.5364677", "text": "function add_grade($grade) {\r\n $this->grades[] = $grade;\r\n }", "title": "" }, { "docid": "99231cedd4798c161e3ce2735d2f774e", "score": "0.5364214", "text": "public function checkGradeAdded($id, $id_user)\n {\n $sql = 'SELECT * FROM grades WHERE id_file = ? AND id_user = ? ';\n return $this->_db->fetchAssoc($sql, array($id, $id_user));\n }", "title": "" }, { "docid": "7bb8e8a371ce22604cde69d88ea8d426", "score": "0.5356564", "text": "public function admin_process_grading_submission() {\n\n // NEEDS REFACTOR/OPTIMISING, such as combining the various meta data stored against the sensei_user_answer entry\n if( ! isset( $_POST['sensei_manual_grade'] )\n || ! wp_verify_nonce( $_POST['_wp_sensei_manual_grading_nonce'], 'sensei_manual_grading' )\n || ! isset( $_GET['quiz_id'] )\n || $_GET['quiz_id'] != $_POST['sensei_manual_grade'] ) {\n\n return false; //exit and do not grade\n\n }\n\n $quiz_id = $_GET['quiz_id'];\n $user_id = $_GET['user'];\n\n\n $questions = Sensei_Utils::sensei_get_quiz_questions( $quiz_id );\n $quiz_lesson_id = Sensei()->quiz->get_lesson_id( $quiz_id );\n $quiz_grade = 0;\n $count = 0;\n $quiz_grade_total = $_POST['quiz_grade_total'];\n $all_question_grades = array();\n $all_answers_feedback = array();\n\n foreach( $questions as $question ) {\n\n ++$count;\n $question_id = $question->ID;\n\n if( isset( $_POST[ 'question_' . $question_id ] ) ) {\n\n $question_grade = 0;\n if( $_POST[ 'question_' . $question_id ] == 'right' ) {\n\n $question_grade = $_POST[ 'question_' . $question_id . '_grade' ];\n\n }\n\n // add data to the array that will, after the loop, be stored on the lesson status\n $all_question_grades[ $question_id ] = $question_grade;\n\n // tally up the total quiz grade\n $quiz_grade += $question_grade;\n\n } // endif\n\n // Question answer feedback / notes\n $question_feedback = '';\n if( isset( $_POST[ 'questions_feedback' ][ $question_id ] ) ){\n\n $question_feedback = wp_unslash( $_POST[ 'questions_feedback' ][ $question_id ] );\n\n }\n $all_answers_feedback[ $question_id ] = $question_feedback;\n\n } // end for each $questions\n\n //store all question grades on the lesson status\n Sensei()->quiz->set_user_grades( $all_question_grades, $quiz_lesson_id , $user_id );\n\n //store the feedback from grading\n Sensei()->quiz->save_user_answers_feedback( $all_answers_feedback, $quiz_lesson_id , $user_id );\n\n // $_POST['all_questions_graded'] is set when all questions have been graded\n // in the class sensei grading user quiz -> display()\n if( $_POST['all_questions_graded'] == 'yes' ) {\n\n // set the users total quiz grade\n\t\t\tif ( 0 < intval( $quiz_grade_total ) ) {\n $grade = abs( round( ( doubleval( $quiz_grade ) * 100 ) / ( $quiz_grade_total ), 2 ) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$grade = 0;\n\t\t\t}\n Sensei_Utils::sensei_grade_quiz( $quiz_id, $grade, $user_id );\n\n // Duplicating what Frontend->sensei_complete_quiz() does\n $pass_required = get_post_meta( $quiz_id, '_pass_required', true );\n $quiz_passmark = abs( round( doubleval( get_post_meta( $quiz_id, '_quiz_passmark', true ) ), 2 ) );\n $lesson_metadata = array();\n if ( $pass_required ) {\n // Student has reached the pass mark and lesson is complete\n if ( $quiz_passmark <= $grade ) {\n $lesson_status = 'passed';\n }\n else {\n $lesson_status = 'failed';\n } // End If Statement\n }\n // Student only has to partake the quiz\n else {\n $lesson_status = 'graded';\n }\n $lesson_metadata['grade'] = $grade; // Technically already set as part of \"WooThemes_Sensei_Utils::sensei_grade_quiz()\" above\n\n Sensei_Utils::update_lesson_status( $user_id, $quiz_lesson_id, $lesson_status, $lesson_metadata );\n\n if( in_array( $lesson_status, array( 'passed', 'graded' ) ) ) {\n\n /**\n * Summary.\n *\n * Description.\n *\n * @since 1.7.0\n *\n * @param int $user_id\n * @param int $quiz_lesson_id\n */\n do_action( 'sensei_user_lesson_end', $user_id, $quiz_lesson_id );\n\n } // end if in_array\n\n }// end if $_POST['all_que...\n\n if( isset( $_POST['sensei_grade_next_learner'] ) && strlen( $_POST['sensei_grade_next_learner'] ) > 0 ) {\n\n $load_url = add_query_arg( array( 'message' => 'graded' ) );\n\n } elseif ( isset( $_POST['_wp_http_referer'] ) ) {\n\n $load_url = add_query_arg( array( 'message' => 'graded' ), $_POST['_wp_http_referer'] );\n\n } else {\n\n $load_url = add_query_arg( array( 'message' => 'graded' ) );\n\n }\n\n wp_safe_redirect( esc_url_raw( $load_url ) );\n exit;\n\n }", "title": "" }, { "docid": "bd91c1b1727dad98591b7c5876460d4c", "score": "0.53379667", "text": "public function get_grade() {\n global $DB;\n\n return $DB->get_field('gradingform_sfrbric_grades', 'grade', array('instanceid' => $this->get_id()));\n }", "title": "" }, { "docid": "677a7cbcef357f532c4aece0b390e210", "score": "0.5322932", "text": "public function create(Request $request){\n // ->where([\n // [\"subjects.id\", \"=\", $request->subject_id],\n // ['grades.student_id', \"=\", $request->student_id]\n // ])->get()->toArray();\n $subject_details = Subject::where(\"id\", \"=\", $request->subject_id)->get()->toArray();\n $subject_pre = Subject::where(\"id\", \"=\", $subject_details[0][\"subject_prerequisite\"])->get()->toArray();\n //check if has prerequisite\n if(count($subject_pre) == 0){\n //no prerequisite\n $grades_pre = Grades::join(\"subjects\", \"grades.subject_id\", \"=\", \"subjects.id\")\n ->where([\n [\"subjects.id\", \"=\", $request->subject_id],\n ['grades.student_id', \"=\", $request->student_id]\n ])->limit(1)->orderBy(\"grades.id\", \"desc\")\n ->get()->toArray();\n if(count($grades_pre) > 0){\n if(intval($grades_pre[0][\"grade\"]) == 5){\n $data = Grades::create($request->except(\"_token\"));\n if($data){\n echo \"Subject ReEnrolled!\";\n }else{\n echo \"Error adding subject\";\n }\n }else{\n echo $subject_details[0][\"subject_name\"] . \" is Already Enrolled!\";\n }\n \n }else{\n $data = Grades::create($request->except(\"_token\"));\n if($data){\n echo \"Subject Added!\";\n }else{\n echo \"Error adding subject\";\n }\n }\n }else{\n //has prerequisite\n //check grades of prerequisite\n $grades_pre = Grades::join(\"subjects\", \"grades.subject_id\", \"=\", \"subjects.id\")\n ->where([\n [\"subjects.id\", \"=\", $subject_details[0][\"subject_prerequisite\"]],\n ['grades.student_id', \"=\", $request->student_id]\n ])->limit(1)->orderBy(\"grades.id\", \"desc\")\n ->get()->toArray();\n // dd($grades_pre);\n if(count($grades_pre) == 0){\n echo $subject_details[0][\"subject_name\"] . \" has Prerequisite: \" . $subject_pre[0][\"subject_name\"];\n }else if($grades_pre[0][\"grade\"] == \"none\"){\n echo \"Waiting for grades of \" . $subject_pre[0][\"subject_name\"];\n }else{\n if(intval($grades_pre[0][\"grade\"]) <= 3 && intval($grades_pre[0][\"grade\"]) > 0){\n $data = Grades::create($request->except(\"_token\"));\n if($data){\n echo \"Subject Added!\";\n }else{\n echo \"Error adding subject\";\n }\n }else if(intval($grades_pre[0][\"grade\"]) == 5){\n echo $subject_pre[0][\"subject_name\"] . \" is Failed! Please Re-enroll\";\n }else if(intval($grades_pre[0][\"grade\"]) == 4){\n echo $subject_pre[0][\"subject_name\"] . \" is Incomplete! Please Comply First.\";\n }else if(intval($grades_pre[0][\"grade\"]) == \"dropped\"){\n echo $subject_details[0][\"subject_name\"] . \" has Prerequisite: \" . $subject_pre[0][\"subject_name\"];\n }else{\n echo \"Invalid Grades!\";\n }\n }\n }\n\n\n }", "title": "" }, { "docid": "f1b235a9998e76123c5dfe60f692fd59", "score": "0.53186965", "text": "public function addgrade()\n {\n if(isset($_POST['addgrade'])) {\n $this->form_validation->set_rules('gm_gradename','Grade Name','trim|xss_clean|required|callback_isgradeExist');\n $this->form_validation->set_rules('gm_gradepoint','Grade Point','trim|xss_clean|required|is_natural');\n $this->form_validation->set_rules('gm_short','Grade short','trim|xss_clean');\n $this->form_validation->set_rules('gm_desc','Grade Desc','trim|xss_clean');\n if($this->form_validation->run()==TRUE){\n //echo 'form-validated';\n \t$data = array(\n \t\t'gm_gradename'=>strtoupper($_POST['gm_gradename']),\n\t \t'gm_gradepoint'=>$_POST['gm_gradepoint'],\n\t\t\t\t'gm_short'=>ucwords(strtolower($_POST['gm_short'])),\n\t\t\t\t'gm_desc'=>$_POST['gm_desc'],\n\t\t\t\t'creatorid'=> $this->session->userdata('username'),\n\t \t'createdate'=>date('y-m-d'),\n \t \t'modifierid'=>$this->session->userdata('username'),\n \t \t'modifydate'=>date('y-m-d')\n\t );\n \t $rflag=$this->commodel->insertrec('grade_master', $data);\n \tif (!$rflag)\n \t{\n \t\t$this->logger->write_logmessage(\"insert\",\"Trying to add grade\", \"Grade is not added \".$_POST['gm_gradename']);\n \t\t$this->logger->write_dblogmessage(\"insert\",\"Trying to add garde\", \"Grade is not added \".$_POST['gm_gradename']);\n \t\t$this->session->set_flashdata('err_message','Error in adding grade setting - ' , 'error');\n \t\tredirect('setup2/addgrade');\n \t}\n \telse{\n \t\t$this->logger->write_logmessage(\"insert\",\"Add grade Setting\", \"Grade\".$_POST['gm_gradename'].\" added successfully...\");\n \t\t$this->logger->write_dblogmessage(\"insert\",\"Add grade Setting\", \"Grade \".$_POST['gm_gradename'].\"added successfully...\");\n \t\t$this->session->set_flashdata(\"success\", \"Grade add successfully...\");\n \t\tredirect(\"setup2/grademaster\");\n \t}\n \t}//close if vallidation\n }//\n $this->load->view('setup2/addgrade');\n }", "title": "" }, { "docid": "0d866f1ae543f288c69ab3fa2fb692f1", "score": "0.53073573", "text": "function qcreate_prepare_new_grade($qcreate, $question) {\n $grade = new Object;\n $grade->qcreateid = $qcreate->id;\n $grade->questionid = $question->id;\n $grade->numfiles = 0;\n $grade->data1 = '';\n $grade->data2 = '';\n $grade->grade = -1;\n $grade->gradecomment = '';\n $grade->teacher = 0;\n $grade->timemarked = 0;\n $grade->mailed = 0;\n return $grade;\n}", "title": "" }, { "docid": "d398722a7d36ec9673ccbf2ac9660ee7", "score": "0.53045046", "text": "public function validate()\n\t{\n\t\tif ($this->isNew() || false !== $this->getPreviousValue('roleid') || false !== $this->getPreviousValue('user_name')) {\n\t\t\t$query = (new App\\Db\\Query())->from('vtiger_users')\n\t\t\t\t->leftJoin('vtiger_user2role', 'vtiger_user2role.userid = vtiger_users.id')\n\t\t\t\t->where(['vtiger_users.user_name' => $this->get('user_name'), 'vtiger_user2role.roleid' => $this->get('roleid')]);\n\t\t\tif (false === $this->isNew()) {\n\t\t\t\t$query->andWhere(['<>', 'vtiger_users.id', $this->getId()]);\n\t\t\t}\n\t\t\tif ($query->exists()) {\n\t\t\t\tthrow new \\App\\Exceptions\\SaveRecord('ERR_USER_EXISTS||' . $this->get('user_name'), 406);\n\t\t\t}\n\t\t}\n\t\tif (!$this->isNew() && false !== $this->getPreviousValue('user_password') && App\\User::getCurrentUserId() === $this->getId()) {\n\t\t\t$isExists = (new \\App\\Db\\Query())->from('l_#__userpass_history')->where(['user_id' => $this->getId(), 'pass' => \\App\\Encryption::createHash($this->get('user_password'))])->exists();\n\t\t\tif ($isExists) {\n\t\t\t\tthrow new \\App\\Exceptions\\SaveRecord('ERR_PASSWORD_HAS_ALREADY_BEEN_USED', 406);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "d5041e2cd8b1e800ab2f5abfc5b85371", "score": "0.5290943", "text": "function add_grade($grade) {\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "d5041e2cd8b1e800ab2f5abfc5b85371", "score": "0.5290943", "text": "function add_grade($grade) {\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "d5041e2cd8b1e800ab2f5abfc5b85371", "score": "0.5290943", "text": "function add_grade($grade) {\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "d5041e2cd8b1e800ab2f5abfc5b85371", "score": "0.5290943", "text": "function add_grade($grade) {\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "d5041e2cd8b1e800ab2f5abfc5b85371", "score": "0.5290943", "text": "function add_grade($grade) {\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "d5041e2cd8b1e800ab2f5abfc5b85371", "score": "0.5290943", "text": "function add_grade($grade) {\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "e662fa1523a82bdeda42a98ff31871c2", "score": "0.52905977", "text": "protected function create_grade_item($idnumber = 'manualitem', $grademax = null) {\n // Required fields.\n $data = array(\n 'courseid' => 2,\n 'itemtype' => 'manual',\n 'idnumber' => $idnumber,\n 'needsupdate' => false,\n 'locked' => true\n );\n // Optional fields.\n if ($grademax !== null) {\n $data['grademax'] = $grademax;\n }\n\n // Save the record.\n $gradeitem = new \\grade_item($data);\n $gradeitem->insert();\n return $gradeitem->id;\n }", "title": "" }, { "docid": "34a7522134d1e4a6dde4b919d78b420d", "score": "0.528642", "text": "protected function assert_student_grade_exists($classid, $userid, $completionid, $grade = null, $locked = null,\n $timegraded = null) {\n global $DB;\n\n // Required fields.\n $params = array('classid' => $classid, 'userid' => $userid, 'completionid' => $completionid);\n // Optional fields.\n if ($grade !== null) {\n $params['grade'] = $grade;\n }\n if ($locked !== null) {\n $params['locked'] = $locked;\n }\n if ($timegraded !== null) {\n $params['timegraded'] = $timegraded;\n }\n\n // Validate existence.\n $exists = $DB->record_exists(\\student_grade::TABLE, $params);\n $this->assertTrue($exists);\n }", "title": "" }, { "docid": "46773c9806129f803721cb9961be0bda", "score": "0.5286399", "text": "function check_grade($data) {\n \n if($data>0 && $data<5)\n\t return true;\n \n return false; \n}", "title": "" }, { "docid": "3b415562f0ceb54d081ea66f3ce48b62", "score": "0.5265395", "text": "public function report()\n {\n \\Log::error('Invalid grading record in db.');\n }", "title": "" }, { "docid": "5373ac98b76eab8fec6fa18237235b49", "score": "0.52638286", "text": "public function store(UserGradeClassRequest $request)\n {\n $this->authorize('create');\n $data = $request->validated();\n UserGradeClass::create($data);\n return redirect('/home' );\n }", "title": "" }, { "docid": "f62df87c7ea81b1b3579fd736d37ca27", "score": "0.5251491", "text": "function add_grade($grade)\n {\n $this->grades[] = $grade;\n }", "title": "" }, { "docid": "711d8c6ac9c84f967397b5cc78cb1763", "score": "0.5248847", "text": "public function test_methodmarkenrolmentpassedwhengradesufficientandnorequiredlearningobjectives() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up PM course completion criteria.\n $pmcourse = new \\course(array('id' => 100, 'completion_grade' => 50));\n $pmcourse->save();\n\n // Set up course grade item info in Moodle.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->grademax = 100;\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n // Set up PM class enrolment with sufficient grade.\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 100, 'finalgrade' => 100));\n $coursegradegrade->insert();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, null, STUSTATUS_PASSED);\n }", "title": "" }, { "docid": "9e6f61e516681af23d21d5bfa5fbbd42", "score": "0.52465534", "text": "public function create()\r\n {\r\n $this->isExistsGradeType()\r\n ->isTypePredefiniedValues()\r\n ->isMarkDescriptionAlphaNumeric()\r\n ->isWeightInteger()\r\n ->setResult()\r\n ->addGradeType();\r\n\r\n return $this->sendResult();\r\n }", "title": "" }, { "docid": "c5fc969eb05844f8ea2f14c6ba3d0621", "score": "0.5233188", "text": "function msm_update_grades(stdClass $msm, $userid = 0)\n{\n global $CFG, $DB;\n require_once($CFG->libdir . '/gradelib.php');\n\n /** @example */\n $grades = array(); // populate array of grade objects indexed by userid\n\n grade_update('mod/msm', $msm->course, 'mod', 'msm', $msm->id, 0, $grades);\n}", "title": "" }, { "docid": "8609bc14280a329409433c1afa685b18", "score": "0.5222655", "text": "public function test_methodupdateslearningobjectivegrade() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up LO and Moodle grade.\n $itemid = $this->create_grade_item();\n $this->create_grade_grade($itemid, 100, 75, 100, 1);\n $this->create_course_completion();\n\n // Create LO grade.\n $studentgrade = new \\student_grade(array(\n 'userid' => 103,\n 'classid' => 100,\n 'completionid' => 1,\n 'grade' => 75,\n 'locked' => 0,\n 'timegraded' => 1\n ));\n $studentgrade->save();\n\n // Validate setup.\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 75);\n\n // Update Moodle grade.\n $DB->execute(\"UPDATE {grade_grades} SET finalgrade = 80, timemodified = 2\");\n\n // Run and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_student_grades(1);\n $this->assert_student_grade_exists(100, 103, 1, 80);\n }", "title": "" }, { "docid": "a538a3ccdced0068b99eefad4a8ba25d", "score": "0.5207054", "text": "public function validateGrader($userId, $sectionArray)\n\t{\n\t\ttry {\n\t\t\t$userSectionTable = new Application_Model_DbTable_UserSection();\n\t\t\t$currentGraders = array();\n\t\t\tforeach($sectionArray as $section) {\n\t\t\t\t$rowset = $userSectionTable->fetchAll(\n\t\t\t\t\t\t$userSectionTable->select()\n\t\t\t\t\t\t->where('section_id = ?', $section['id'])\n\t\t\t\t\t\t->where('is_grader = ?', 1)\n\t\t\t\t\t\t);\n\t\t\t\tforeach($rowset as $row) {\n\t\t\t\t\t$currentGraders[] = $row->toArray();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif(!empty($currentGraders)) {\n\t\t\t\tforeach($currentGraders as $grader) {\n\t\t\t\t\tif($grader['user_id'] != $userId) {\n\t\t\t\t\t\t$userTable = new Application_Model_DbTable_Users();\n\t\t\t\t\t\t$grader = $userTable->find($grader['user_id']);\n\t\t\t\t\t\tthrow new Exception(\"There is already 1 faculty grader in that section: \" . $grader[0]->first_name . \" \" . $grader[0]->last_name . \"<br/>\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\t\t} catch(Exception $e) {\n\t\t\techo 'SectionMapper::validateGrader(): ' . $e->getMessage();\n\t\t}\n\t}", "title": "" }, { "docid": "8c8ee3c8a7f6a1dc486d9aa0e7fbe7e2", "score": "0.5200317", "text": "public function test_methodscalesmoodlecoursegrade($finalgrade, $grademax, $pmgrade) {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Set up grade information.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->grademax = $grademax;\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n $coursegradegrade = new \\grade_grade(array(\n 'itemid' => 1,\n 'userid' => 100,\n 'rawgrademax' => $grademax,\n 'finalgrade' => $finalgrade\n ));\n $coursegradegrade->insert();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, $pmgrade);\n }", "title": "" }, { "docid": "ec9bd8563ed241e7d22606b2d330e49e", "score": "0.51964283", "text": "function gradingStudent($grades) {\n\t\t\t\n for ($index=0; $index < count($grades); $index++) { // loop to check all values in grades array\n \t# code...\n if ( $grades[$index] >= 0 && $grades[$index] <= 100 ) { // check if grade greater than or equal zero and check if grade less than or equal one hundred\n\n \n if ($grades[$index] >= 38) { // check if grade greater than or equal 38 \n \t\n for ($grade=$grades[$index]; $grade <= 100 ; $grade++) { \n\n if ($grade % 5 == 0) { // check if grade mod 5 \n $new_grade = $grade;\n \n break;\n }\n \n }\n\n \n $Original_grade = $grades[$index];\n $check_grade = $new_grade - $Original_grade;\n if ($check_grade < 3) {\n $grades[$index] = $new_grade;\n }else{\n $grades[$index] = $Original_grade;\n }\n\n }elseif ($grades[$index] < 38) {\n # code...\n $Original_grade = $grades[$index];\n $grades[$index] = $Original_grade;\n }\n\n }\n // wrong garade \n else{\n $message = \"wrong grade\";\n \n }\n\n }\n \n\n \n \n return $grades ; // return final value of grades array\n\t\t}", "title": "" }, { "docid": "f3e253b5850da0a66ec88ee48b6d6713", "score": "0.5192969", "text": "public function checkGrade($id_file, $id_user)\n {\n $sql = 'SELECT * FROM grades WHERE id_file = ? AND id_user = ? ';\n return $this->_db->fetchAssoc($sql, array($id_file, $id_user));\n }", "title": "" }, { "docid": "e973cdc8e87c029b5734080a7c88ac5a", "score": "0.51883256", "text": "public function add_graded_data(&$columns, $userid, &$aggregate) {\n global $DB, $COURSE;\n\n if (is_null($columns)) {\n $columns = array();\n }\n\n $select = \" courseid = ? AND moduleid > 0 \";\n $params = array($COURSE->id);\n if ($graderecs = $DB->get_records_select('report_trainingsessions', $select, $params, 'sortorder')) {\n foreach ($graderecs as $rec) {\n $modulegrade = $this->get_module_grade($rec->moduleid, $userid);\n // Push in array.\n if ($modulegrade) {\n array_push($columns, sprintf('%.2f', $modulegrade));\n } else {\n array_push($columns, '');\n }\n }\n }\n\n // Add special grades.\n $bonus = 0;\n $select = \" courseid = ? AND moduleid < 0 \";\n $params = array($COURSE->id);\n if ($graderecs = $DB->get_records_select('report_trainingsessions', $select, $params, 'sortorder')) {\n foreach ($graderecs as $rec) {\n if ($rec->moduleid == TR_TIMEGRADE_GRADE) {\n $timegrade = $this->compute_timegrade($rec, $aggregate);\n array_push($columns, $timegrade);\n } else if ($rec->moduleid == TR_TIMEGRADE_BONUS) {\n // First add raw course grade.\n $coursegrade = $this->get_course_grade($rec->courseid, $userid);\n array_push($columns, sprintf('%.2f', $coursegrade->grade));\n\n // Add bonus columns.\n $bonus = 0 + $this->compute_timegrade($rec, $aggregate);\n array_push($columns, $bonus);\n }\n }\n }\n\n // Add course grade if required.\n $params = array('courseid' => $COURSE->id, 'moduleid' => 0);\n if ($graderec = $DB->get_record('report_trainingsessions', $params)) {\n // Retain the coursegrade for adding at the full end of array.\n $grade = 0;\n if ($coursegrade = $this->get_course_grade($graderec->courseid, $userid)) {\n $grade = min($coursegrade->maxgrade, $coursegrade->grade + $bonus);\n }\n if ($grade) {\n array_push($columns, sprintf('%.2f', $grade));\n } else {\n array_push($columns, '');\n }\n }\n }", "title": "" }, { "docid": "578cb66a4801c5d0d9ae71dd61288ec0", "score": "0.5175739", "text": "public function create(User $user)\n {\n return $user->canDo('CREATE_SLIDERS');\n }", "title": "" }, { "docid": "2e8c51faafcea4c46e86308ec245ddd8", "score": "0.5166966", "text": "function quiz_grades($quizid) {\n\n $quiz = get_record('quiz', 'id', intval($quizid));\n if (empty($quiz) || empty($quiz->grade)) {\n return NULL;\n }\n\n $return->grades = get_records_menu('quiz_grades', 'quiz', $quiz->id, '', 'userid, grade');\n $return->maxgrade = get_field('quiz', 'grade', 'id', $quiz->id);\n return $return;\n}", "title": "" }, { "docid": "8b096cd8f4309aa447169df052c1f9b7", "score": "0.5162096", "text": "public function test_nosynchappenswhencoursehasnomaxgradeforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Create course grade item with no max grade.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->grademax = 0;\n $coursegradeitem->update();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(0);\n\n // Set valid max grade.\n $coursegradeitem->grademax = 100;\n $coursegradeitem->update();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n }", "title": "" }, { "docid": "2d00459bd9e18778da81ef64148752e7", "score": "0.5160034", "text": "public function putGradeItem(\n int $orgUnitId, \n int $gradeObjectId, \n int $userId, \n IncomingNumericGradeModel|IncomingPassFailGradeModel|IncomingSelectBoxGradeModel|IncomingTextGradeModel $gradeItem\n ) : string {\n \n if (\n ( $orgUnitId > 0 ) && ( $gradeObjectId > 0 )\n ) {\n $response = $this->callAPI(\n product: 'le',\n action: 'PUT',\n route: \"/$orgUnitId/grades/$gradeObjectId/values/$userId\",\n data: $gradeItem\n );\n } else {\n throw new InvalidArgumentException('Invalid or missing arguments');\n }\n\n if ($response->data == '') { $success = 'Successfully Submitted Grade'; } \n else { $success = 'Something Failed'; }\n return $success;\n }", "title": "" }, { "docid": "9dc804a61466fb40bc94731ddc5fcd07", "score": "0.51512796", "text": "function check_item_data()\r\n{\r\n\tif (!check_num('qty',0))\r\n\t{\r\n\t\tdisplay_error(_(\"The quantity entered is negative or invalid.\"));\r\n\t\tset_focus('qty');\r\n\t\treturn false;\r\n\t}\r\n\r\n\tif (!check_num('std_cost', 0))\r\n\t{\r\n\t\tdisplay_error(_(\"The entered standard cost is negative or invalid.\"));\r\n\t\tset_focus('std_cost');\r\n\t\treturn false;\r\n\t}\r\n\r\n \treturn true;\r\n}", "title": "" }, { "docid": "46ec528e18451473323eb3c2f2a7a369", "score": "0.5150341", "text": "public function getGrade() {\n if(property_exists($this->data, 'grade')) return $this->data->grade;\n $this->fenixEdu->login();\n foreach($this->fenixEdu->getPersonCourses($this->academicTermYear($this->data->academicTerm))->enrolments as $course) {\n if(strcmp($course->id, $this->data->id) == 0) {\n $this->data->grade = $course->grade;\n return $this->data->grade;\n }\n }\n foreach($this->fenixEdu->getPersonCurriculum() as $curriculum) {\n foreach ($curriculum->approvedCourses as $course) {\n if(!property_exists($course, 'id')) continue;\n if(strcmp($course->id, $this->data->id) == 0) {\n $this->data->grade = $course->grade;\n return $this->data->grade;\n }\n }\n }\n return NULL;\n }", "title": "" }, { "docid": "a3b668ce1e175c5e0ef8629ba91e7795", "score": "0.51472914", "text": "public function update_grade_level(){\n\n\t\t//declare the id\n\t\t$id = $this->input->post(\"UserAccountId\");\n\n\t\t//declare the inputs into array\n\t\t$data = array(\n\t\t\t\"GradeLevel\"\t\t=> $this->input->post(\"GradeLevel\")\n\t\t);\n\n\t\t//call the model function for deactivating the useraccount table\n\t\t$result = $this->md->model_update_data(\"studentlist\", $data, \"UserAccountId=$id\");\n\n\t\t//echo the result\n\t\techo $result;\n\t}", "title": "" }, { "docid": "ca1370317ba9351e89c5b415704e35bf", "score": "0.5132139", "text": "protected function validateCourseLevel($field)\n\t{\n parent::evaluateWholeNumber($field);\n\t}", "title": "" }, { "docid": "87cace68738dc27df1025b6c8b7329ec", "score": "0.5091389", "text": "public function test_methodonlyupdatesenrolmentifkeyfieldchangedforspecificuserid() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolments.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n enrol_try_internal_enrol(2, 101, 1);\n\n // Set up course grade item.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->needsupdate = false;\n $coursegradeitem->locked = true;\n $coursegradeitem->update();\n\n // Assign a course grade.\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 100, 'finalgrade' => 40, 'timemodified' => 1));\n $coursegradegrade->insert();\n $coursegradegrade = new \\grade_grade(array('itemid' => 1, 'userid' => 101, 'finalgrade' => 40, 'timemodified' => 1));\n $coursegradegrade->insert();\n\n // Set a completion grade.\n $pmcourse = new \\course(array('id' => 100, 'completion_grade' => 50, 'credits' => 1));\n $pmcourse->save();\n\n // Validate initial state.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, 40, STUSTATUS_NOTCOMPLETE, 0, 0);\n\n // Only a bogus db field is updated.\n $DB->execute(\"UPDATE {grade_grades} SET information = 'updated'\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, 40, STUSTATUS_NOTCOMPLETE, 0, 0);\n\n // Update grade.\n $DB->execute(\"UPDATE {grade_grades} SET finalgrade = 45\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, 45, STUSTATUS_NOTCOMPLETE, 0, 0);\n\n // Update completestatusid.\n $DB->execute(\"UPDATE {\".\\course::TABLE.\"} SET completion_grade = 45\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, 45, STUSTATUS_PASSED, 1, 1);\n\n // Update completetime.\n $DB->execute(\"UPDATE {grade_grades} SET timemodified = 12345\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, 45, STUSTATUS_PASSED, 12345, 1);\n\n // Update credits.\n $DB->execute(\"UPDATE {\".\\course::TABLE.\"} SET credits = 2\");\n\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades(100);\n $this->assert_num_students(1);\n $this->assert_student_exists(100, 103, 45, STUSTATUS_PASSED, 12345, 2);\n }", "title": "" }, { "docid": "3a63a5d28c4adf0195ddf49890928433", "score": "0.5089591", "text": "public function store(CreateGradeRequest $request)\n {\n $input = $request->all();\n\n $grade = $this->gradeRepository->create($input);\n\n Flash::success(__('messages.grades_success_create'));\n\n return redirect(route('admin.grades.index'));\n }", "title": "" }, { "docid": "dba8bce10fd4fd02f26515ed064a4f29", "score": "0.5077972", "text": "public function update_grade() {\n \n // Check for valid request method\n if($this->input->server('REQUEST_METHOD') == 'POST') {\n \n // Set error to true. \n // This should be changed only if there are no validation errors.\n $error = false;\n \n // Get all field values.\n $form_fields = $this->input->post(NULL);\n \n // Validate form fields.\n //$error = $this->validate_fields($form_fields, $fields);\n \n // Send fields to model if there are no errors\n if(!$error) {\n $params = array(\n 'gradename' => $form_fields['grade_name']\n );\n \n $id = $form_fields['edit_grade_id'];\n // Call model method to perform insertion\n $status = $this->adm_mdl->exam_update($id, $params, 'grade');\n \n // Process model response\n switch($status) {\n \n // Unique constraint violated.\n case DEFAULT_EXIST:\n $error_msg = $this->lang->line('adm_entry_exist'); \n $this->main->set_notification_message(MSG_TYPE_WARNING, $error_msg);\n break;\n \n // There was a problem creating the entry.\n case DEFAULT_ERROR:\n $error_msg = $this->lang->line('adm_error'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n break;\n \n // Entry created successfully.\n case DEFAULT_SUCCESS:\n $success_msg = sprintf($this->lang->line('adm_success'),'Grade is', 'updated', '');\n $this->main->set_notification_message(MSG_TYPE_SUCCESS,$success_msg);\n break;\n \n default:\n break;\n }\n }\n \n }else{\n // Set error message for any request other than POST\n $error_msg = $this->lang->line('invalid_req_method'); \n $this->main->set_notification_message(MSG_TYPE_ERROR, $error_msg);\n }\n \n // Redirect to exam page, showing notifiction messages if there are.\n redirect(site_url('admission/management'));\n }", "title": "" }, { "docid": "4351357790e479fe0eef653deff0b84a", "score": "0.50771415", "text": "public function edit_validate_field($usernew) {\n global $DB;\n\n $errors = array();\n\n if (\n !empty($usernew->{$this->inputname})\n && !empty($this->requiredset[$usernew->{$this->inputname}])\n && count((array) $usernew) > 2 // If not, we have an incomplete user object, and a validation check is not possible.\n ) {\n foreach ($this->requiredset[$usernew->{$this->inputname}] as $requiredfield) {\n\n $data = new stdClass();\n $data->field1 = format_string($this->field->name);\n $data->value1 = $this->options[$usernew->{$this->inputname}];\n $data->field2 = $requiredfield;\n\n if (isset($usernew->{'profile_field_' . $requiredfield})) {\n if (is_array($usernew->{'profile_field_' . $requiredfield}) &&\n isset($usernew->{'profile_field_' . $requiredfield}['text'])) {\n $value = $usernew->{'profile_field_' . $requiredfield}['text'];\n } else {\n $value = $usernew->{'profile_field_' . $requiredfield};\n }\n } else {\n $value = '';\n }\n\n if (($value !== '0') && empty($value)) {\n if (isset($usernew->{'profile_field_' . $requiredfield})) {\n $errors['profile_field_' . $requiredfield] = get_string('requiredbycondition1', 'profilefield_conditional',\n $data);\n } else {\n $data->field2 = $DB->get_field('user_info_field', 'name', array('shortname' => $requiredfield));\n $errors[$this->inputname] = get_string('requiredbycondition2', 'profilefield_conditional', $data);\n }\n }\n }\n }\n\n return $errors;\n }", "title": "" }, { "docid": "5a5b61e67fee5cc0eb779674b6b5677f", "score": "0.50770974", "text": "public function create(User $user)\n {\n return $this->isAllowed($user, 'work_experience', 'can_add');\n }", "title": "" }, { "docid": "c6a9065e0edf30e6b987a3f37994b3d3", "score": "0.50622773", "text": "public function test_nosynchappenswhencoursehasnomaxgrade() {\n global $DB;\n\n $this->load_csv_data();\n\n // Set up enrolment.\n $this->make_course_enrollable();\n enrol_try_internal_enrol(2, 100, 1);\n\n // Create course grade item with no max grade.\n $coursegradeitem = \\grade_item::fetch_course_item(2);\n $coursegradeitem->grademax = 0;\n $coursegradeitem->update();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(0);\n\n // Set valid max grade.\n $coursegradeitem->grademax = 100;\n $coursegradeitem->update();\n\n // Call and validate.\n $sync = new \\local_elisprogram\\moodle\\synchronize;\n $sync->synchronize_moodle_class_grades();\n $this->assert_num_students(1);\n }", "title": "" }, { "docid": "fed7c3f47ddac689c18b33c9d654d166", "score": "0.5056577", "text": "private function update_grade($cm, $submission, $userid) {\n global $DB, $USER, $CFG;\n $return = true;\n\n if (!is_null($submission->getGrade()) && $cm->modname != 'forum') {\n // Module grade object.\n $grade = new stdClass();\n // If submission has multiple content/files in it then get average grade.\n // Ignore NULL grades and files no longer part of submission.\n\n // Create module object.\n $moduleclass = \"turnitin_\".$cm->modname;\n $moduleobject = new $moduleclass;\n\n // Get file from pathname hash.\n $submissiondata = $DB->get_record('plagiarism_turnitin_files', array('externalid' => $submission->getSubmissionId()), 'identifier');\n\n // Get file as we need item id for discounting files that are no longer in submission.\n $fs = get_file_storage();\n if ($file = $fs->get_file_by_hash($submissiondata->identifier)) {\n $moodlefiles = $DB->get_records_select('files', \" component = ? AND itemid = ? AND source IS NOT null \",\n array($moduleobject->filecomponent, $file->get_itemid()), 'id DESC', 'pathnamehash');\n\n list($insql, $inparams) = $DB->get_in_or_equal(array_keys($moodlefiles), SQL_PARAMS_QM, 'param', true);\n $tiisubmissions = $DB->get_records_select('plagiarism_turnitin_files', \" userid = ? AND cm = ? AND identifier \".$insql,\n array_merge(array($userid, $cm->id), $inparams));\n } else {\n $tiisubmissions = $DB->get_records('plagiarism_turnitin_files', array('userid' => $userid, 'cm' => $cm->id));\n $tiisubmissions = current($tiisubmissions);\n }\n\n if (is_array($tiisubmissions) && count($tiisubmissions) > 1) {\n $averagegrade = null;\n $gradescounted = 0;\n foreach ($tiisubmissions as $tiisubmission) {\n if (!is_null($tiisubmission->grade)) {\n $averagegrade = $averagegrade + $tiisubmission->grade;\n $gradescounted += 1;\n }\n }\n $grade->grade = (!is_null($averagegrade) && $gradescounted > 0) ? (int)($averagegrade / $gradescounted) : null;\n } else {\n $grade->grade = $submission->getGrade();\n }\n\n // Check whether submission is a group submission - only applicable to assignment module.\n // If it's a group submission we will update the grade for everyone in the group.\n // Note: This will not work if the submitting user is in multiple groups.\n $userids = array($userid);\n $moduledata = $DB->get_record($cm->modname, array('id' => $cm->instance));\n if ($cm->modname == \"assign\" && !empty($moduledata->teamsubmission)) {\n require_once($CFG->dirroot . '/mod/assign/locallib.php');\n $context = context_course::instance($cm->course);\n $assignment = new assign($context, $cm, null);\n\n if ($group = $assignment->get_submission_group($userid)) {\n $users = groups_get_members($group->id);\n $userids = array_keys($users);\n }\n }\n\n // Loop through all users and update grade.\n foreach ($userids as $userid) {\n // Get gradebook data.\n switch ($cm->modname) {\n case 'assign':\n\n // Query grades based on attempt number.\n $gradesquery = array('userid' => $userid, 'assignment' => $cm->instance);\n\n $usersubmissions = $DB->get_records('assign_submission', $gradesquery, 'attemptnumber DESC', 'attemptnumber', 0, 1);\n $usersubmission = current($usersubmissions);\n $attemptnumber = ($usersubmission) ? $usersubmission->attemptnumber : 0;\n $gradesquery['attemptnumber'] = $attemptnumber;\n\n $currentgrades = $DB->get_records('assign_grades', $gradesquery, 'id DESC');\n $currentgrade = current($currentgrades);\n break;\n case 'workshop':\n if ($gradeitem = $DB->get_record('grade_items', array('iteminstance' => $cm->instance,\n 'itemmodule' => $cm->modname, 'itemnumber' => 0))) {\n $currentgrade = $DB->get_record('grade_grades', array('userid' => $userid, 'itemid' => $gradeitem->id));\n }\n break;\n }\n\n // Configure grade object and save to db.\n $table = $moduleobject->gradestable;\n $grade->timemodified = time();\n\n if ($currentgrade) {\n $grade->id = $currentgrade->id;\n\n if ($cm->modname == 'assign') {\n $grade->grader = $USER->id;\n }\n\n $return = $DB->update_record($table, $grade);\n } else {\n $grade->userid = $userid;\n $grade->timecreated = time();\n switch ($cm->modname) {\n case 'workshop':\n $grade->itemid = $gradeitem->id;\n $grade->usermodified = $USER->id;\n break;\n\n case 'assign':\n $grade->assignment = $cm->instance;\n $grade->grader = $USER->id;\n $grade->attemptnumber = $attemptnumber;\n break;\n }\n\n $return = $DB->insert_record($table, $grade);\n }\n\n // Gradebook object.\n if ($grade) {\n $grades = new stdClass();\n $grades->userid = $userid;\n $grades->rawgrade = $grade->grade;\n\n // Check marking workflow state for assignments and only update gradebook if released.\n if ($cm->modname == 'assign' && !empty($moduledata->markingworkflow)) {\n $gradesreleased = $DB->record_exists('assign_user_flags',\n array(\n 'userid' => $userid,\n 'assignment' => $cm->instance,\n 'workflowstate' => 'released'\n ));\n // Remove any existing grade from gradebook if not released.\n if (!$gradesreleased) {\n $grades->rawgrade = null;\n }\n }\n\n // Prevent grades being passed to gradebook before identities have been revealed when blind marking is on.\n if ($cm->modname == 'assign' && !empty($moduledata->blindmarking) && empty($moduledata->revealidentities)) {\n return false;\n }\n\n // Update gradebook - Grade update returns 1 on failure and 0 if successful.\n $gradeupdate = $cm->modname.\"_grade_item_update\";\n require_once($CFG->dirroot . '/mod/' . $cm->modname . '/lib.php');\n if (is_callable($gradeupdate)) {\n $moduledata->cmidnumber = $cm->id;\n $return = ($gradeupdate($moduledata, $grades)) ? false : true;\n }\n }\n }\n }\n\n return $return;\n }", "title": "" }, { "docid": "d264a32f74f9a3e63c830f6ece7b5309", "score": "0.5052686", "text": "public function __construct(Grade $grade)\n {\n $this->grade = $grade;\n $this->lv = $grade->lv;\n $this->user = $grade->user;\n }", "title": "" }, { "docid": "63fda7b93e7250ab7d0613d2c650a5bf", "score": "0.50505036", "text": "function createArrayOfGradeSchemes() {\n return array(\n // Percentage Grading, which does not need the extra array of gade scales\n \"percent\" => array(\n \"SchemeName\"=>\"Percentage Grading\",\n \"SchemeType\"=>\"P\",\n \"GradeScale\"=>array(),\n ),\n // Decimal (0-10) Grading, which does not need the extra array of gade scales\n \"decimal\" => array(\n \"SchemeName\"=>\"Decimal (0-10) Grading\",\n \"SchemeType\"=>\"D\",\n \"GradeScale\"=>array(),\n ),\n // Letter Grading\n \"usletter\" => array(\n \"SchemeName\"=>\"US Letter Grading\",\n \"SchemeType\"=>\"M\", // Stands for Mnemonic, which means it needs a table (the array below) to link the percentange range with the corresponding symbol\n // Pay atention on the GradeScale array to leave no gaps. Always from highest to lowest percentages\n \"GradeScale\"=>array(\n \"A\" => array(\n \"high\" => 101, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 95,\n ),\n \"A-\" => array(\n \"high\" => 95, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 90,\n ),\n \"B+\" => array(\n \"high\" => 90, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 85,\n ),\n \"B\" => array(\n \"high\" => 85, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 80,\n ),\n \"B-\" => array(\n \"high\" => 80, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 75,\n ),\n \"C+\" => array(\n \"high\" => 75, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 70,\n ),\n \"C\" => array(\n \"high\" => 70, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 65,\n ),\n \"C-\" => array(\n \"high\" => 65, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 60,\n ),\n \"D\" => array(\n \"high\" => 60, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 55,\n ),\n \"F\" => array(\n \"high\" => 55, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => -10,\n ),\n ),\n ),\n // German Numeric Grade System (1 is the best score and 6 the worst)\n \"german\" => array(\n \"SchemeName\"=>\"German Grade System\",\n \"SchemeType\"=>\"M\", // Stands for Mnemonic, which means it needs a table (the array below) to link the percentange range with the corresponding symbol\n // Pay atention on the GradeScale array to leave no gaps. Always from highest to lowest percentages\n \"GradeScale\"=>array(\n \"1+\" => array(\n \"high\" => 101, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 99,\n ),\n \"1\" => array(\n \"high\" => 99, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 95,\n ),\n \"1-\" => array(\n \"high\" => 95, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 91,\n ),\n \"2+\" => array(\n \"high\" => 91, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 88,\n ),\n \"2\" => array(\n \"high\" => 88, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 85,\n ),\n \"2-\" => array(\n \"high\" => 85, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 81,\n ),\n \"3+\" => array(\n \"high\" => 81, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 78,\n ),\n \"3\" => array(\n \"high\" => 78, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 70,\n ),\n \"3-\" => array(\n \"high\" => 70, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 66,\n ),\n \"4+\" => array(\n \"high\" => 66, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 61,\n ),\n \"4\" => array(\n \"high\" => 61, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 54,\n ),\n \"4-\" => array(\n \"high\" => 54, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 50,\n ),\n \"5+\" => array(\n \"high\" => 50, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 40,\n ),\n \"5\" => array(\n \"high\" => 40, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 20,\n ),\n \"5-\" => array(\n \"high\" => 20, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => 10,\n ),\n \"6\" => array(\n \"high\" => 10, // Alway put the percentage highher because the calculation logic assumes greater than \"low\" and less than \" high\" to select that specific grade so we leave no gaps\n \"low\" => -10,\n ),\n ),\n ),\n );\n}", "title": "" }, { "docid": "ee81e25e76dacdb05f8451678bb7f233", "score": "0.500435", "text": "function journal_grades($journalid) {\n\n if (!$journal = get_record(\"journal\", \"id\", $journalid)) {\n return NULL;\n }\n\n $grades = get_records_menu(\"journal_entries\", \"journal\", \n $journal->id, \"\", \"userid,rating\");\n\n if ($journal->assessed > 0) {\n $return->grades = $grades;\n $return->maxgrade = $journal->assessed;\n\n } else if ($journal->assessed == 0) {\n return NULL;\n\n } else {\n if ($scale = get_record(\"scale\", \"id\", - $journal->assessed)) {\n $scalegrades = make_menu_from_list($scale->scale);\n if ($grades) {\n foreach ($grades as $key => $grade) {\n $grades[$key] = $scalegrades[$grade];\n }\n }\n }\n $return->grades = $grades;\n $return->maxgrade = \"\";\n }\n\n return $return;\n}", "title": "" }, { "docid": "3212f5311909e010645fadf0b274aef5", "score": "0.500277", "text": "function grade($grade, $quizID, $userID)\n {\n if ($this->link) {\n $flagValue = 0;\n $grade1 = htmlentities($grade);\n $grade2 = mysqli_real_escape_string($this->link, $grade1);\n\n //Using insert statement to create a record of a grade\n $stmt = $this->link->prepare(\"INSERT INTO quizresult (grade, quizID, userID, flag) VALUES (?, ?, ?, ?)\");\n $stmt->bind_param(\"iiii\", $finalGrade, $quizID, $userID, $flagValue);\n\n // set parameters and execute\n $finalGrade = $grade2;\n $stmt->execute();\n\n if ($stmt) {\n header('Location: gradeQuizzes.php'); \n }\n }\n }", "title": "" }, { "docid": "c29883635764024438c9d26f237fda45", "score": "0.49946097", "text": "public function rules()\n {\n if (is_null($this->grade_id)) {\n return [\n 'description' => \"required|max:50\", /*|unique:grades*/\n ];\n }\n\n return [\n 'description' => \"required|max:50\", /*|unique:grades,description,{$this->grade_id}*/\n ];\n }", "title": "" }, { "docid": "434d6b82a6d4132f9e646fedadd746a9", "score": "0.4993218", "text": "public function rules()\n {\n return [\n 'project_id' => 'required|exists:projects,id',\n 'grade' => 'required|integer|in:1,2,3',\n ];\n }", "title": "" }, { "docid": "f6e973c807537f66dc9744547f5d0217", "score": "0.49896565", "text": "function xmldb_gradeexport_advanced_grade_export_install() {\n global $DB;\n\n\t$result = true;\n\t$arr = array('counter','firstname','lastname','idnumber','institution','department','email','empty');\n\tforeach ($arr as $k) {\n\t\tunset($rec);\n\t\t$rec->name = $k;\n\t\t$result = $result && $DB->insert_record('advanced_grade_export_fields_type', $rec);\n\t}\n\n\treturn $result;\n}", "title": "" }, { "docid": "518d6e67c77f24de9a7d162b8044cec7", "score": "0.4988522", "text": "function addExamGrade($examId, $studentId, $grade, $passed)\r\n {\r\n $sqlAddExamGrade = \"INSERT INTO exam_grade(exam_id, student_id, grade, passed)\r\n VALUES (:exam_id, :student_id, :grade, :passed)\r\n ON DUPLICATE KEY UPDATE grade = :grade, passed = :passed\";\r\n \r\n sqlExecute($sqlAddExamGrade, array(':exam_id'=>$examId, ':student_id'=>$studentId, ':grade'=>$grade, ':passed'=>$passed), False);\r\n\r\n }", "title": "" }, { "docid": "11ca0007c92857372ee598c39a3ce827", "score": "0.49877447", "text": "public static function create_attempt($filename, $rectime, $readaloud,$gradeable) {\n global $USER, $DB;\n\n //correct filename which has probably been massaged to get through mod_security\n $filename = str_replace('https___', 'https://', $filename);\n\n //Add a blank attempt with just the filename and essential details\n $newattempt = new \\stdClass();\n $newattempt->courseid = $readaloud->course;\n $newattempt->readaloudid = $readaloud->id;\n $newattempt->userid = $USER->id;\n $newattempt->status = 0;\n $newattempt->filename = $filename;\n $newattempt->sessionscore = 0;\n //$newattempt->sessiontime=$rectime; //.. this would work. But sessiontime is used as flag of human has graded ...so needs more thought\n $newattempt->sessionerrors = '';\n $newattempt->errorcount = 0;\n $newattempt->wpm = 0;\n $newattempt->dontgrade = $gradeable ? 0 : 1 ;\n $newattempt->timecreated = time();\n $newattempt->timemodified = time();\n $attemptid = $DB->insert_record(constants::M_USERTABLE, $newattempt);\n if (!$attemptid) {\n return false;\n }\n $newattempt->id = $attemptid;\n\n //if we are machine grading we need an entry to AI table too\n //But ... there is the chance a user will CHANGE the machgrademethod value after submissions have begun,\n //If they do, INNER JOIN SQL in grade related logic will mess up gradebook if aigrade record is not available.\n //So for prudence sake we ALWAYS create an aigrade record\n if (true ||\n $readaloud->machgrademethod == constants::MACHINEGRADE_HYBRID ||\n $readaloud->machgrademethod == constants::MACHINEGRADE_MACHINEONLY) {\n aigrade::create_record($newattempt, $readaloud->timelimit);\n }\n\n //If we are the guest user we need to store the attempt id in the session cache\n //this is to prevent users sharing the same guest account from seeing each other's attempts\n $isguest = isguestuser();\n if($isguest){\n //Fetch from cache and process the results and display\n $cache = \\cache::make_from_params(\\cache_store::MODE_SESSION, constants::M_COMPONENT, 'guestattempts');\n $myattempts = $cache->get('myattempts');\n\n //if we have attempts then lets get the attempt ids of those\n if($myattempts && is_array($myattempts)){\n $myattempts[] = $attemptid;\n }else{\n //at this point we have no attempts, so just return false\n $myattempts=[$attemptid];\n }\n $cache->set('myattempts', $myattempts);\n }\n\n //return the attempt id\n return $attemptid;\n }", "title": "" }, { "docid": "33df6df4907ce883c22a2bfa7c604985", "score": "0.4986682", "text": "public function create(User $user)\n {\n return $user->hasAccess(['create-school']);\n }", "title": "" } ]
74cbeb861bf5b6f1913716eeb33e7e3f
Define the application's command schedule.
[ { "docid": "da177be73638cad4ab3dad9f5d6e7c81", "score": "0.6159776", "text": "protected function schedule(Schedule $schedule)\n {\n try{\n // $schedule->command('inspire')\n // ->hourly();\n //$schedule->command('forge:save_properties')->cron('6 * * * *');;\n $schedule->command('forge:auto_backup')->weeklyOn(5,'22:00');//('15:00');//everyMinute(); \n $schedule->command('forge:save')\n //->appendOutputTo('/var/www/html/iPD/public/schedule_error/error.log')\n ->weeklyOn(6,'9:00');//dailyAt('19:00');\n $schedule->command('forge:save_properties')\n //->appendOutputTo('/var/www/html/iPD/public/schedule_error/error.log')\n ->weeklyOn(7,'9:00');//dailyAt('19:00');\n \n //$schedule->command('forge:auto_backup')->weeklyOn(6, '19:00');//dailyAt('19:00');//everyMinute();\n //$schedule->command('forge:save')->weeklyOn(5, '19:00');//('15:00');//everyMinute();\n //$schedule->command('forge:save_properties')->weeklyOn(6, '9:00');//dailyAt('19:00');//everyMinute();\n //$schedule->command('forge:room_properties')->weeklyOn(7, '9:00');//dailyAt('19:00');//everyMinute();\n }catch(Exception $e){\n $e->getMessage();\n }\n }", "title": "" } ]
[ { "docid": "ed08921966c4fdf6af59da6e86acf464", "score": "0.6788106", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n //('custom:command) nombre del cron\n // $schedule->command('custom:command')\n // ->daily();//cuando desees ejecutar la revision\n\n // $schedule->command('custom:command')->everyMinute();\n\n }", "title": "" }, { "docid": "c68213684eef3b22453ae348ec49d981", "score": "0.6728206", "text": "protected function schedule(Schedule $schedule)\n {\n $config = Config::get('cron/cron_config');\n\n #MONGO\n if($config['Cron_DetailListAnimeGenerateByDateMG']) {\n $schedule->command('CronDetailListAnimeGenerateByDateMG:DetailListAnimeGenerateByDateMGV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_DetailListAnimeGenerateByDateMG.log');\n }\n\n if($config['Cron_DetailListAnimeGenerateByAlfabetMG']) {\n $schedule->command('CronDetailListAnimeGenerateByAlfabetMG:DetailListAnimeGenerateByAlfabetMGV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_DetailListAnimeGenerateByAlfabetMG.log');\n }\n\n if($config['Cron_GenreAnime_Generate_ByAlfabet']) {\n $schedule->command('CronGenreAnimeGenerateByAlfabet:CronGenreAnimeGenerateByAlfabetV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_GenreAnime_Generate_ByAlfabet.log');\n }\n\n if($config['Cron_ListAnimeGenerateByAlfabet']) {\n $schedule->command('CronLIstAnimeGenerateByAlfabet:CronLIstAnimeGenerateByAlfabetV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_ListAnimeGenerateAlfabet.log');\n }\n\n if($config['Cron_ListAnimeGenerateByDate']) {\n $schedule->command('CronLIstAnimeGenerateByDate:CronLIstAnimeGenerateByDateV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_ListAnimeGenerateByDate.log');\n }\n\n if($config['Cron_LastUpdate_GenerateByDateMG']) {\n $schedule->command('CronLastUpdateGenerateByDateMG:CronLastUpdateGenerateByDateMGV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_LastUpdate_GenerateByDateMG.log');\n }\n\n if($config['Cron_StreamAnime_GenerateByDateMG']) {\n $schedule->command('CronStreamAnimeGenerateByDateMG:CronStreamAnimeGenerateByDateMGV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_StreamAnime_GenerateByDateMG.log');\n }\n\n if($config['Cron_StreamAnime_GenerateByIDMG']) {\n $schedule->command('CronStreamAnimeGenerateByIDMG:CronStreamAnimeGenerateByIDMGV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_StreamAnime_GenerateByIDMG.log');\n }\n\n\n #MYSQL\n #Cron Nanime\n if($config['Cron_ListAnimeGenerate']) {\n $schedule->command('CronLIstAnimeGenerate:CronLIstAnimeGenerateV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_ListAnimeGenerate.log');\n }\n\n if($config['Cron_DetailListAnimeGenerateByAlfabet']) {\n $schedule->command('CronDetailListAnimeGenerateByAlfabet:DetailListAnimeGenerateByAlfabetV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_DetailListAnimeGenerateByAlfabet.log');\n }\n\n if($config['Cron_DetailListAnimeGenerateByDate']) {\n $schedule->command('CronDetailListAnimeGenerateByDate:DetailListAnimeGenerateByDateV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_DetailListAnimeGenerateByDate.log');\n }\n\n if($config['Cron_LastUpdate_Generate']) {\n $schedule->command('CronLastUpdateGenerate:CronLastUpdateGenerateV1 ')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_LastUpdate_Generate.log');\n }\n\n if($config['Cron_StreamAnime_GenerateByDate']) {\n $schedule->command('CronStreamAnimeGenerateByDate:CronStreamAnimeGenerateByDateV1 ')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_StreamAnime_GenerateByDate.log');\n }\n\n if($config['Cron_StreamAnime_GenerateByID']) {\n $schedule->command('CronStreamAnimeGenerateByID:CronStreamAnimeGenerateByIDV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_StreamAnime_GenerateByID.log');\n }\n\n if($config['Cron_Trendingweek_Generate']) {\n $schedule->command('CronTrendingweekGenerate:CronTrendingweekGenerateV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_Trendingweek_Generate.log');\n }\n\n if($config['Cron_GenreAnime_Generate']) {\n $schedule->command('CronGenreAnimeGenerate:CronGenreAnimeGenerateV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_GenreAnime_Generate.log');\n }\n\n if($config['Cron_ScheduleAnime_Generate']) {\n $schedule->command('CronScheduleAnimeGenerate:CronScheduleAnimeGenerateV1')\n ->everyMinute() #setiap menit\n ->appendOutputTo('/tmp/Cron_ScheduleAnime_Generate.log');\n }\n\n }", "title": "" }, { "docid": "d0a0e1eb1744876289660853a28ad834", "score": "0.66958827", "text": "protected function schedule(Schedule $schedule)\n {\n /* LIST OF HELPER FUNCTION CAN BE FOUND IN htdocs/laravel/vendor/laravel/framework/src/Illuminate/Console/Scheduling/Event.php */\n /* You need to register single laravel cron on server that runs every minute, checks for any Scheduled command and run them */\n /* Single laravel cron to be registered on server \"* * * * * php htdocs/laravel/artisan schedule:run >> /dev/null 2>&1\" */\n \n $schedule->command('laracasts:clear-history')->monthly()->thenPing('url'); // Scheduling Artisan command, run \"php artisan laracasts:clear-history\" command every month and ping a specific URL.\n //\n // In order to \"emailOutputTo\", you should first \"sendOutputTo\" to save the output to be emailed\n $schedule->command('laracasts:clear-history')->monthly()->sendOutputTo('path/to/file')->emailOutputTo('[email protected]'); // Scheduling Artisan command, run \"php artisan laracasts:clear-history\" command every month, save output to a specific file and email that output to a specific email.\n \n $schedule->command('laracasts:clear-history')->monthly()->sendOutputTo('path/to/file'); // Scheduling Artisan command, run \"php artisan laracasts:clear-history\" command every month and save output to a specific file\n $schedule->command('laracasts:clear-history')->monthly(); // Scheduling Artisan command, run \"php artisan laracasts:clear-history\" command every month\n $schedule->command('laracasts:daily-report')->dailyAt('23:55'); // Scheduling Artisan command, run \"php artisan laracasts:daily-report\" command every day at \"23:55\"\n //$schedule->exec('touch foo.txt')->dailyAt('10:30'); // Scheduling Execution command, create \"foo.txt\" file every day at \"10:30\"\n //$schedule->exec('touch foo.txt')->daily(); // Scheduling Execution command, create \"foo.txt\" file every day\n //$schedule->exec('touch foo.txt')->everyFiveMinutes(); // Scheduling Execution command, create \"foo.txt\" file every five minutes \n /*\n * $schedule->command('inspire')\n ->hourly(); // Scheduling Artisan command, run \"php artisan inspire\" every hour\n */\n }", "title": "" }, { "docid": "52085116cbe8cdcd53c4a0ccd5a3b2e3", "score": "0.658464", "text": "public function schedule() {\n\n }", "title": "" }, { "docid": "a02bdb02ac0d9ed3fe95df96eacea732", "score": "0.65629476", "text": "public function mainAction()\n\t{\n\t\techo \"Running scheduler...\\n\";\n\t\t// $scheduler = new Illuminate\\Console\\Scheduling\\Schedule;\n\t\t$events = array();\n\n\t\t\\File::put(APP_PATH . 'storage/framework/logs/cron.txt', \\Date::now() . \"\\n\");\n\n\t\t// $events[] = array('expression' => '* * * * * *', 'command' => 'CalendarSendReminderMailsTask');\n\t\t$events['CashRegisterSignAutomaticallyTask'] = array('expression' => '* 0-1 1 * * *', 'command' => 'CashRegisterSignAutomaticallyTask');\n\t\t$events['BackupGenerator'] = array('expression' => '0 0,9,12,18 * * * *', 'command' => 'BackupGenerator');\n\n\t\t$jobs = CronJob::repo()->getAll();\n\n\t\tforeach($jobs as $job) {\n\t\t\tif( isset($events[$job->name]) ) {\n\t\t\t\t$events[$job->name]['job'] = $job;\n\t\t\t\t$events[$job->name]['expression'] = $job->expression;\n\t\t\t} else {\n\t\t\t\t$events[$job->name] = [\n\t\t\t\t\t'expression' => $job->expression,\n\t\t\t\t\t'command' => $job->name,\n\t\t\t\t\t'job' => $job,\n\t\t\t\t];\n\t\t\t}\n\t\t}\n\n\t\t$events = array_filter($events, function($event) {\n return CronExpression::factory($event['expression'])->isDue();\n });\n\n $eventsRan = 0;\n\t\t$output = '';\n\n foreach ($events as $event) {\n\t\t\tif( isset($event['job']) ) {\n\t\t\t\t$job = $event['job'];\n\t\t\t} else {\n\t\t\t\t$job = $this->getJob($event['command'], $event['expression']);\n\t\t\t}\n\n $output .= 'Running scheduled command: '. $event['command'] . \".\\n\";\n\n\t\t\t$jobEntry = new CronJobEntry();\n\t\t\t$jobEntry->job_id = $job->getId();\n\t\t\t$jobEntry->run = ($eventsRan+1) . '/' . count($events);\n\t\t\t$jobEntry->created_at = \\Date::now();\n\t\t\t$jobEntry->save();\n\n\t\t\tob_start();\n\t\t\t\n $eventClass = new $event['command'];\n $jobEntry->status = $eventClass->run() ? $jobEntry::STATUS_OK : $jobEntry::STATUS_FAILED;\n \n\t\t\t$jobEntry->output = ob_get_clean();\n\t\t\t$jobEntry->updated_at = \\Date::now();\n\t\t\t$jobEntry->save();\n\n\t\t\t$job->last_run = \\Date::now();\n\t\t\t$job->updated_at = \\Date::now();\n\t\t\t$job->status = $jobEntry->status;\n\t\t\tif( $job->status == $job::STATUS_FAILED ) {\n\t\t\t\t$job->failed = $job->failed ? 1 : $job->failed + 1;\n\t\t\t}\n\t\t\t$job->runs++;\n\t\t\t$result = $job->save();\n\t\t\t\n\t\t\t$output .= \"Done.\\n\";\n ++$eventsRan;\n }\n\n if (count($events) === 0 || $eventsRan === 0) {\n $output .= 'No scheduled commands are ready to run.';\n }\n\n\t\t$output .= \"\\nComplete.\\n\";\n\n\t\techo $output;\n\t\t\\File::append(APP_PATH . 'storage/framework/logs/cron.txt', $output);\n\n return true;\n\t}", "title": "" }, { "docid": "e3d0fd8f780b93b6696f869d502f3ccd", "score": "0.6551762", "text": "protected function schedule(Schedule $schedule)\n{\n// $schedule->command('email:user')\n// // ->everyFiveMinutes();\n// ->everyMinute();\n$schedule->command('email:alertStaff')->daily();\n$schedule->command('email:alertStudent')->daily();\n}", "title": "" }, { "docid": "6dde50b70e2e6b0a52eea7db137dc347", "score": "0.648381", "text": "protected function schedule(Schedule $schedule)\n {\n\n // 每分鐘執行 Artisan 命令 test:Log\n //$schedule->command('test:Log')->everyMinute();->dailyAt('13:00');\n //Daily\n //$schedule->command('Sybase:excel test')->dailyAt('18:00');\n $schedule->command('Sybase:mysql cdr_hosp')->dailyAt('21:00');\n $schedule->command('Sybase:mysql cdrcus_del')->dailyAt('23:00');\n $schedule->command('Sybase:mysql invbomd')->dailyAt('23:00');\n \n //monthly \n $schedule->command('Sybase:excel emmi-dent')->monthlyOn(1, '07:00');\n $schedule->command('Sybase:excel cdrhmas')->monthlyOn(1, '07:05');\n $schedule->command('Sybase:excel eis_data')->monthlyOn(2, '07:00');\n $schedule->command('Sybase:mysql otc_eis_cdrsal')->monthlyOn(2, '06:00'); \n $schedule->command('Sybase:BI eis_cdrsalmnew ')->monthlyOn(2, '06:10');\n //\n $date1 = Carbon::now();\n $yymm_last = $date1->subMonths(1)->format('Ym');\n $schedule->command(\"Relmek:Monthly 'Mysql' 'events' '$yymm_last' \")->monthlyOn(1,'03:00');\n $schedule->command(\"Relmek:Monthly 'Mysql' 'dailyreport' '$yymm_last' \")->monthlyOn(1,'12:00');\n $schedule->command(\"Relmek:Monthly 'Mysql' 'armanph' '$yymm_last' \")->monthlyOn(1,'01:30');\n }", "title": "" }, { "docid": "0a1cd0d649871fc6298c45a6c72a977d", "score": "0.6441411", "text": "protected function schedule(Schedule $schedule)\n {\n //各バッチ起動時刻\n $batchDataImport_RunAt = env('BATCH_DATA_IMPORT_RUN_AT');\n $batchGetLessonAvailableJson_RunAt = env('BATCH_GET_LESSON_AVAILABLE_JSON_AT');\n $batchUserActionWatch_RunAt = env('BATCH_USER_ACTION_WATCH_AT');\n $batchCreateQuestion_RunAt = env('BATCH_CREATE_QUESTION_RUN_AT');\n $batchCreateTask_RunAt = env('BATCH_CREATE_TASK_RUN_AT');\n $batchAchievementCount_RunAt = env('BATCH_ACHIEVEMENT_COUNT_RUN_AT');\n\n //$batchPushChatwork_RunAt = env('BATCH_PUSH_CW_RUN_AT');\n //$batchPushMemberReport_RunAt = env('BATCH_PUSH_MEMBER_REPORT_RUN_AT');\n //$batchPullChatwork_RunAt = env('BATCH_PULL_CW_RUN_AT');\n\n //2019-05-25 added\n $batchNotifyManage_RunAt = env('BATCH_NOTIFY_MANAGE_AT'); //cron形式\n $batchNotifyExecute_RunAt = env('BATCH_NOTIFY_EXECUTE_AT'); //cron形式\n\n\n /*\n * Artisanコマンド実行\n */\n //2019-05-25 added\n //メッセージ通知管理:10分毎に実行(注.メッセージ通知管理とメッセージ通知実行はタイミングをずらすこと)\n $schedule->command('AlueCommand:notifyManage')->cron($batchNotifyManage_RunAt);\n //メッセージ通知実行:10分毎に実行(注.メッセージ通知管理とメッセージ通知実行はタイミングをずらすこと)\n $schedule->command('AlueCommand:notifyExecute')->cron($batchNotifyExecute_RunAt);\n\n\n //レッスン予約可能日時JSONファイル取得:30分毎に実行\n $schedule->command('AlueCommand:importJson')->cron($batchGetLessonAvailableJson_RunAt);\n //ユーザーアクション監視:毎時5分、35分に実行\n $schedule->command('AlueCommand:actionWatch')->cron($batchUserActionWatch_RunAt);\n\n\n //データインポート:毎日00:00に実行\n $schedule->command('AlueCommand:importData')->dailyAt($batchDataImport_RunAt);\n //宿題タスク生成:毎日06:00に実行\n $schedule->command('AlueCommand:createTask')->dailyAt($batchCreateTask_RunAt);\n\n\n //レッスン/タスク 実績集計:毎週日曜日03:00に実行\n $schedule->command('AlueCommand:achievementCount')->weekly()->sundays()->at($batchAchievementCount_RunAt);\n //問題作成:毎週日曜日04:00に実行(この中で会員レポートも作成する)\n $schedule->command('AlueCommand:createQuestion')->weekly()->sundays()->at($batchCreateQuestion_RunAt);\n\n\n ////会員レポート投稿\n //$schedule->command('AlueCommand:pushMemberReport')->weekly()->sundays()->at($batchPushMemberReport_RunAt);\n\n }", "title": "" }, { "docid": "aefb684524196ea9817e61336e802f2b", "score": "0.6438045", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('neurorad:desagendamento')//->everyMinute();\n ->weeklyOn(2, '0:00'); // remove todos os casos da semana\n $schedule->command('neurorad:agendamento')//->everyFiveMinutes();\n ->weeklyOn(2, '0:05'); // terça feira executa o agendamento\n //->everyMinute(); // ->weeklyOn(2, '0:00'); executa na terça feira às 0 horas \n\n\n // crontab -e * * * * * php /Users/inamar/Desktop/testCron/schedule/artisan schedule:run 1>> /dev/null 2>&1\n // caminho absoluto do arquivo artisan\n //sair e salvar crontab: :wq\n\n\n // $schedule->command('neurorad:desagendamento')\n // ->everyMinute();\n\n \n }", "title": "" }, { "docid": "8d5931734829385760ea87f42ebf656b", "score": "0.6419389", "text": "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->hourly();\n $cronClass = new CrontabService();\n $schedule->call(function () use ($cronClass) {\n $cronClass->hangupRemind(\"no\");\n });//只执行特定时间的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->hangupRemind(\"two\");\n })->cron('*/2 * * * *');//执行没两分钟的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->hangupRemind(\"five\");\n })->cron('*/5 * * * *');//执行没五分钟的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->hangupRemind(\"ten\");\n })->cron('*/10 * * * *');//执行没十分钟的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->hangupRemind(\"fifteen\");\n })->cron('*/15 * * * *');//执行没十五分钟的工单提醒任务\n /**\n * 事件通知\n */\n $schedule->call(function () use ($cronClass) {\n $cronClass->handoverRemind(\"no\");\n });//只执行特定时间的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->handoverRemind(\"two\");\n })->cron('*/2 * * * *');//执行每两分钟的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->handoverRemind(\"five\");\n })->cron('*/5 * * * *');//执行每五分钟的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->handoverRemind(\"ten\");\n })->cron('*/10 * * * *');//执行每十分钟的工单提醒任务\n $schedule->call(function () use ($cronClass) {\n $cronClass->handoverRemind(\"fifteen\");\n })->cron('*/15 * * * *');//执行每十五分钟的工单提醒任务\n\n //系统生成下一期账单\n $schedule->call(function () use ($cronClass) {\n $cronClass->generateBill(\"no\");\n })->cron('30 0 * * *');//执行每日00:30生成下期账单任务\n\n //系统检测账单连续性\n $schedule->call(function () use ($cronClass) {\n $cronClass->checkBillCompleteness(\"no\");\n })->cron('*/1 * * * *');//执行每日01:00检测账单连续性任务\n }", "title": "" }, { "docid": "b55940f73b553631b291f2df3e65929e", "score": "0.641166", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command('order:close')->everyMinute();\n $schedule->command('remind:clinic')->dailyAt('20:00');\n// $schedule->command('sync:scheduling')->dailyAt('00:00');\n// $schedule->command('refresh:token')->hourly();\n// $schedule->command('family:register')->dailyAt('06:00'); //每天早上6点开始执行\n// $schedule->command('register:queue')->everyFiveMinutes(); //每天定时执行的预约排队 每5分钟执行一次\n// $schedule->command('cancel:register')->everyMinute(); //每天定时执行的取消预约 每分钟执行一次\n// $schedule->command('recipe:overdue')->everyMinute(); //每天定时执行的药方过期 每分钟执行一次\n// $schedule->command('comment:doctor')->daily(); //每天同步一次医生的推荐指数 几颗星\n// $schedule->command('order:comment')->everyMinute(); //每天早上6点开始执行,判断订单是否可以评价 测试下 现改成每分钟 后面改回来\n// $schedule->command('clear:cancel')->monthlyOn(1, '00:00'); //每月清空用户的取消预约的次数\n// $schedule->command('sync:clinic')->everyMinute(); //每分钟同步当天门诊的诊疗记录\n// $schedule->command('remind:lnquiry')->monthlyOn(5,'12:00');\n// $schedule->command('complete:lnquiry')->dailyAt('11:30');\n }", "title": "" }, { "docid": "e84db8832bd5d5954efe1b15f6b89439", "score": "0.64098203", "text": "public function schedules();", "title": "" }, { "docid": "be25c67f25a2fdff177746c50e86e74b", "score": "0.6409112", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('get:km-at')\n ->at('10:00')->withoutOverlapping()->appendOutputTo(storage_path('get_km_AT_cron.log'));\n// ->everyMinute()->withoutOverlapping()->appendOutputTo(storage_path('get_km_AT_cron.log'));\n\n $schedule->command('km:mas-offer')\n ->at('10:00')->withoutOverlapping()->appendOutputTo(storage_path('get_km_MASOFFER_cron.log'));\n\n $schedule->command('lazada:eco')\n ->at('10:00')->withoutOverlapping()->appendOutputTo(storage_path('get_km_MASOFFER_cron.log'));\n\n $schedule->command('get:km-product')\n ->at('10:00')->withoutOverlapping()->appendOutputTo(storage_path('get_km_product_AT_cron.log'));\n\n $schedule->command('download:image')\n ->hourly()->withoutOverlapping()->appendOutputTo(storage_path('download_image_cron.log'));\n\n $schedule->command('send:noti')\n ->cron('0 */4 * * *')->withoutOverlapping()->appendOutputTo(storage_path('send_noti_cron.log'));\n\n $schedule->command('update:expire-km')\n ->at('01:00')->withoutOverlapping()->appendOutputTo(storage_path('update_expire_km_cron.log'));\n\n// $schedule->command('get:data-gg-sheet')\n// ->everyTenMinutes()->withoutOverlapping()->appendOutputTo(storage_path('get_gg_sheets_cron.log'));\n//\n// $schedule->command('data:shinhanbank')\n// ->everyTenMinutes()->withoutOverlapping()->appendOutputTo(storage_path('shinhanbank_cron.log'));\n\n// tam bo\n// $schedule->command('crawl:km')\n// ->hourly()->withoutOverlapping()->appendOutputTo(storage_path('crawl_km_cron.log'));\n\n// $schedule->command('crawl:chanhtuoi')\n// ->hourly()->withoutOverlapping()->appendOutputTo(storage_path('crawl_chanhtuoi_cron.log'));\n// ??\n\n// $schedule->command('crawl:magiamgia')\n// ->hourly()->withoutOverlapping()->appendOutputTo(storage_path('crawl_magiamgia_cron.log'));\n\n// $schedule->command('get:sheet-response')\n// ->everyTenMinutes()->withoutOverlapping()->appendOutputTo(storage_path('get_gg_sheets_response_cron.log'));\n }", "title": "" }, { "docid": "b4e4eb42fe536140f6f63645eeacdd67", "score": "0.63457507", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('send:reminder')->cron('0 0 */3 * *'); //This runs the command every three days\n }", "title": "" }, { "docid": "410ff5ec27d2493149b19916da8a696c", "score": "0.6310981", "text": "public static function initialize()\n {\n $command = '* * * * * php ' . base_path() . '/artisan schedule:run 1>> /dev/null 2>&1';\n\n if (self::cronExists($command) == false) {\n //add job to crontab\n exec('echo -e \"`crontab -l`\\n'.$command.'\" | crontab -');\n }\n }", "title": "" }, { "docid": "da76665849a6dedd4e91aca4a9a75434", "score": "0.63107574", "text": "public function schedule(){\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b59854df6d4a1b48121de4c77ab3f512", "score": "0.630593", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n\n //everyMinute(); 每分钟运行一次任务\n //everyFiveMinutes(); 每五分钟运行一次任务\n //everyTenMinutes(); 每十分钟运行一次任务\n //everyFifteenMinutes(); 每十五分钟运行一次任务\n //everyThirtyMinutes(); 每三十分钟运行一次任务\n //hourly(); 每小时运行一次任务\n //hourlyAt(17); 每小时第十七分钟运行一次任务\n //daily(); 每天凌晨零点运行任务\n //dailyAt('13:00'); 每天13:00运行任务\n //twiceDaily(1, 13); 每天1:00 & 13:00运行任务\n //weekly(); 每周运行一次任务\n //monthly(); 每月运行一次任务\n //monthlyOn(4, '15:00'); 每月4号15:00运行一次任务\n //quarterly(); 每个季度运行一次\n //yearly(); 每年运行一次\n\n if(\\ConstInc::MULTI_DB) {\n $connections = array_keys(\\Config::get(\"database.connections\",[]));\n foreach($connections as $conn) {\n if(strpos($conn, \"opf_\") === 0) {\n $schedule->command(\"events:comment $conn\")->everyMinute();\n $schedule->command(\"realtimedata:add $conn\")->hourly();\n $schedule->command(\"assets:cal $conn\")->daily();\n $schedule->command(\"monitoralert:add $conn\")->everyMinute();\n $schedule->command(\"monitoralerthistory:addBatch $conn\")->everyFiveMinutes();\n $schedule->command(\"monitorinspectionreport:add $conn\")->everyFifteenMinutes();\n $schedule->command(\"eventoa:comment $conn\")->everyMinute();\n $schedule->command(\"monitordevice:update $conn\")->everyTenMinutes();\n $schedule->command(\"monitorlinks:collect $conn\")->everyTenMinutes();\n $schedule->command(\"eminspectionreport:add $conn\")->everyFifteenMinutes();\n $schedule->command(\"wxbatchsendnotice:send $conn\")->everyMinute();\n $schedule->command(\"emalarm:add $conn\")->everyFiveMinutes();\n }\n }\n }\n else {\n $schedule->command('events:comment')->everyMinute();\n $schedule->command('realtimedata:add')->hourly();\n $schedule->command('assets:cal')->daily();\n $schedule->command('monitoralert:add')->everyMinute();\n $schedule->command('monitoralerthistory:addBatch')->everyFiveMinutes();\n $schedule->command('monitorinspectionreport:add')->everyFifteenMinutes();\n $schedule->command('eventoa:comment')->everyMinute();\n $schedule->command(\"monitordevice:update\")->everyTenMinutes();\n $schedule->command(\"monitorlinks:collect\")->everyTenMinutes();\n $schedule->command(\"eminspectionreport:add\")->everyFifteenMinutes();\n $schedule->command(\"wxbatchsendnotice:send\")->everyMinute();\n $schedule->command(\"emalarm:add\")->everyFiveMinutes();\n }\n }", "title": "" }, { "docid": "491d19c608edf453ecb04114d3dc884d", "score": "0.62950367", "text": "protected function schedule(Schedule $schedule)\n {\n\n $schedule->command('ScrapperImage:REMOVE')->hourly(); // Remove scrapper iamges older than 1 day\n\n // $schedule->command('reminder:send-to-dubbizle')->everyMinute()->withoutOverlapping()->timezone('Asia/Kolkata');\n // $schedule->command('reminder:send-to-vendor')->everyMinute()->withoutOverlapping()->timezone('Asia/Kolkata');\n // $schedule->command('reminder:send-to-customer')->everyMinute()->withoutOverlapping()->timezone('Asia/Kolkata');\n // $schedule->command('reminder:send-to-supplier')->everyMinute()->withoutOverlapping()->timezone('Asia/Kolkata');\n // $schedule->command('visitor:logs')->everyMinute()->withoutOverlapping()->timezone('Asia/Kolkata');\n\n\n\n // Store unknown categories on a daily basis\n //$schedule->command('category:missing-references')->daily();\n\n //This command will set the count of the words used...\n // $schedule->command('bulk-customer-message:get-most-used-keywords')->daily();\n\n //Get list of schedule and put list in cron jobs table\n // $schedule->command('schedule:list')->daily();\n\n //This command will get the influencers details and get information from it\n // $schedule->command('influencer:description')->daily();\n\n //Get Orders From Magento\n //2020-02-17 $schedule->command('getorders:magento')->everyFiveMinutes()->withoutOverlapping();\n\n //This will run every five minutes checking and making keyword-customer relationship...\n //2020-02-17 s$schedule->command('index:bulk-messaging-keyword-customer')->everyFiveMinutes()->withoutOverlapping();\n\n //This will run every fifteen minutes checking if new mail is recieved for email importer...\n // $schedule->command('excelimporter:run')->everyFiveMinutes()->withoutOverlapping();\n\n //Flag customer if they have a complaint\n // $schedule->command('flag:customers-with-complaints')->daily();\n\n //Imcrement Frequency Every Day Once Whats App Config\n // $schedule->command('whatsppconfig:frequency')->daily();\n\n //This command sends the reply on products if they request...\n // $schedule->command('customers:send-auto-reply')->everyFifteenMinutes();\n\n\n //This command checks for the whatsapp number working properly...\n // $schedule->command('whatsapp:check')->everyFifteenMinutes();\n\n //assign the category to products, runs twice daily...\n //$schedule->command('category:fix-by-supplier')->twiceDaily();\n\n //Get Posts , Userdata as well as comments based on hastag\n // $schedule->command('competitors:process-users')->daily();\n\n\n //$schedule->command('message:send-to-users-who-exceeded-limit')->everyThirtyMinutes()->timezone('Asia/Kolkata');\n\n\n// $schedule->call(function () {\n// $report = CronJobReport::create([\n// 'signature' => 'update:benchmark',\n// 'start_time' => Carbon::now()\n// ]);\n//\n// $benchmark = Benchmark::orderBy('for_date', 'DESC')->first()->toArray();\n// $tasks = Task::where('is_statutory', 0)->whereNotNull('is_verified')->get();\n//\n// if ($benchmark[ 'for_date' ] != date('Y-m-d')) {\n// $benchmark[ 'for_date' ] = date('Y-m-d');\n// Benchmark::create($benchmark);\n// }\n//\n// foreach ($tasks as $task) {\n// $time_diff = Carbon::parse($task->is_completed)->diffInDays(Carbon::now());\n//\n// if ($time_diff >= 2) {\n// $task->delete();\n// }\n// }\n//\n// $report->update(['end_time' => Carbon::now()]);\n// })->dailyAt('00:00');\n\n//2020-02-17 $schedule->call(function () {\n// \\Log::debug('deQueueNotficationNew Start');\n// NotificationQueueController::deQueueNotficationNew();\n// })->everyFiveMinutes();\n\n// THE COMMAND BELOW SEEMS TO BE A DUPLICATE FROM ANOTHER CRON TO FETCH MAGENTO ORDERS\n//2020-02-17 $schedule->call(function () {\n// $report = CronJobReport::create([\n// 'signature' => 'update:benchmark',\n// 'start_time' => Carbon::now()\n// ]);\n//\n// MagentoController::get_magento_orders();\n// //fetched magento orders...\n//\n// $report->update(['end_time' => Carbon::now()]);\n// })->hourly();\n\n //2020-02-17 $schedule->command('product:replace-text')->everyFiveMinutes();\n\n //2020-02-17 $schedule->command('numberofimages:cropped')->hourly()->withoutOverlapping();\n\n // $schedule->command('instagram:grow-accounts')->dailyAt('13:00')->timezone('Asia/Kolkata');\n //2020-02-17 $schedule->command('send:hourly-reports')->dailyAt('12:00')->timezone('Asia/Kolkata');\n //2020-02-17 $schedule->command('send:hourly-reports')->dailyAt('15:30')->timezone('Asia/Kolkata');\n //2020-02-17 $schedule->command('send:hourly-reports')->dailyAt('17:30')->timezone('Asia/Kolkata');\n // $schedule->command('run:message-queues')->everyFiveMinutes()->between('07:30', '17:00')->withoutOverlapping(10);\n //2020-02-17 $schedule->command('monitor:cron-jobs')->everyMinute();\n // $schedule->command('cold-leads:send-broadcast-messages')->everyMinute()->withoutOverlapping();\n // $schedule->exec('/usr/local/php72/bin/php-cli artisan queue:work --once --timeout=120')->everyMinute()->withoutOverlapping(3);\n\n // $schedule->command('save:products-images')->hourly();\n\n // Voucher Reminders\n // $schedule->command('send:voucher-reminder')->daily();\n\n // Updates Magento Products status on ERP\n // $schedule->command('update:magento-product-status')->dailyAt(03);\n\n // $schedule->command('post:scheduled-media')\n // ->everyMinute();\n\n //Getting SKU ERROR LOG\n //2020-02-17 $schedule->command('sku-error:log')->hourly();\n // $schedule->command('check:user-logins')->everyFiveMinutes();\n // $schedule->command('send:image-interest')->cron('0 07 * * 1,4'); // runs at 7AM Monday and Thursday\n\n // Sends Auto messages\n // $schedule->command('send:auto-reminder')->hourly();\n // $schedule->command('send:auto-messenger')->hourly();\n // $schedule->command('check:messages-errors')->hourly();\n // $schedule->command('send:product-suggestion')->dailyAt('07:00')->timezone('Asia/Kolkata');\n // $schedule->command('send:activity-listings')->dailyAt('23:45')->timezone('Asia/Kolkata');\n // $schedule->command('run:message-scheduler')->dailyAt('01:00')->timezone('Asia/Kolkata');\n\n // Tasks\n //2020-02-17 $schedule->command('send:recurring-tasks')->everyFifteenMinutes()->timezone('Asia/Kolkata');\n // $schedule->command('send:pending-tasks-reminders')->dailyAt('07:30')->timezone('Asia/Kolkata');\n // $schedule->command('move:planned-tasks')->dailyAt('01:00')->timezone('Asia/Kolkata');\n\n // Fetches Emails\n //2020-02-17 Changed command below from fifteen minutes to hourly\n // $schedule->command('fetch:emails')->hourly();\n // $schedule->command('check:emails-errors')->dailyAt('03:00')->timezone('Asia/Kolkata');\n // $schedule->command('parse:log')->dailyAt('03:00')->timezone('Asia/Kolkata');\n //2020-02-17 $schedule->command('document:email')->everyFifteenMinutes()->timezone('Asia/Kolkata');\n //2020-02-17 $schedule->command('resource:image')->everyFifteenMinutes()->timezone('Asia/Kolkata');\n // $schedule->command('send:daily-planner-report')->dailyAt('08:00')->timezone('Asia/Kolkata');\n // $schedule->command('send:daily-planner-report')->dailyAt('22:00')->timezone('Asia/Kolkata');\n // $schedule->command('reset:daily-planner')->dailyAt('07:30')->timezone('Asia/Kolkata');\n\n // $schedule->command('template:product')->dailyAt('22:00')->timezone('Asia/Kolkata');\n\n //2020-02-17 $schedule->command('save:products-images')->cron('0 */3 * * *')->withoutOverlapping()->emailOutputTo('[email protected]'); // every 3 hours\n\n // Update the inventory (every fifteen minutes)\n // $schedule->command('inventory:update')->dailyAt('00:00')->timezone('Asia/Dubai');\n\n // Auto reject listings by empty name, short_description, composition, size and by min/max price (every fifteen minutes)\n //$schedule->command('product:reject-if-attribute-is-missing')->everyFifteenMinutes();\n\n //This command saves the twilio call logs in call_busy_messages table...\n //2020-02-17 $schedule->command('twilio:allcalls')->everyFifteenMinutes();\n // Saved zoom recordings corresponding to past meetings based on meeting id\n // $schedule->command('meeting:getrecordings')->hourly();\n // $schedule->command('meeting:deleterecordings')->dailyAt('07:00')->timezone('Asia/Kolkata');\n\n // Check scrapers\n // $schedule->command('scraper:not-running')->hourly()->between('7:00', '23:00');\n\n // Move cold leads to customers\n // $schedule->command('cold-leads:move-to-customers')->daily();\n\n // send only cron run time\n $queueStartTime = \\App\\ChatMessage::getStartTime();\n $queueEndTime = \\App\\ChatMessage::getEndTime();\n $queueTime = \\App\\ChatMessage::getQueueTime();\n // check if time both is not empty then run the cron\n if(!empty($queueStartTime) && !empty($queueEndTime)) {\n if(!empty($queueTime)) {\n foreach($queueTime as $no => $time) {\n if($time > 0) {\n\n\n $allowCounter = true;\n $counterNo[] = $no;\n $schedule->command('send:queue-pending-chat-messages '.$no)->cron('*/'.$time.' * * * *')->between($queueStartTime, $queueEndTime);\n $schedule->command('send:queue-pending-chat-group-messages '.$no)->cron('*/'.$time.' * * * *')->between($queueStartTime, $queueEndTime);\n\n }\n }\n\n\n }\n\n /*if(!empty($allowCounter) and $allowCounter==true and !empty($counterNo))\n {\n $tempSettingData = DB::table('settings')->where('name','is_queue_sending_limit')->get();\n $numbers = array_unique($counterNo);\n foreach ($numbers as $number)\n {\n\n $tempNo = $number;\n $settingData = $tempSettingData[0];\n $messagesRules = json_decode($settingData->val);\n $counter = ( !empty($messagesRules->$tempNo) ? $messagesRules->$tempNo : 0);\n $insert_data = null;\n\n $insert_data = array(\n 'counter'=>$counter,\n 'number'=>$number,\n 'time'=>now()\n );\n DB::table('message_queue_history')->insert($insert_data);\n\n }\n }*/\n }\n\n\n // need to run this both cron every minutes\n //2020-02-17 $schedule->command('cronschedule:update')->everyMinute();\n //2020-02-17 $schedule->command('erpevents:run')->everyMinute();\n // /$schedule->command('erpleads:run')->everyMinute();\n\n// $schedule->command('barcode-generator-product:run')->everyFiveMinutes()->between('23:00', '7:00')->withoutOverlapping();\n// $schedule->command('barcode-generator-product:update')->everyFiveMinutes()->withoutOverlapping();\n\n\n // HUBSTAFF\n // $schedule->command('hubstaff:refresh_users')->hourly();\n // send hubstaff report\n // Sends hubstaff report to whatsapp\n // $schedule->command('hubstaff:send_report')->hourly()->between('7:00', '23:00');\n // $schedule->command('hubstaff:load_activities')->hourly();\n \n // $schedule->command('hubstaff:account')->dailyAt('20:00')->timezone('Asia/Dubai');\n // $schedule->command('scraplogs:activity')->dailyAt('01:00')->timezone('Asia/Dubai');\n \n // $schedule->command('hubstaff:daily-activity-level-check')->dailyAt('21:00')->timezone('Asia/Dubai');\n\n //Sync customer from magento to ERP\n //2020-02-17 $schedule->command('sync:erp-magento-customers')->everyFifteenMinutes();\n\n // Github\n $schedule->command('live-chat:get-tickets')->everyFifteenMinutes();\n $schedule->command('google-analytics:run')->everyFifteenMinutes();\n $schedule->command('newsletter:send')->daily();\n $schedule->command('delete:store-website-category')->daily();\n $schedule->command('memory_usage')->everyMinute();\n\n //$schedule->command('github:load_branch_state')->hourly();\n // $schedule->command('checkScrapersLog')->dailyAt('8:00');\n // $schedule->command('store:store-brands-from-supplier')->dailyAt('23:45');\n // $schedule->command('MailingListSendMail')->everyFifteenMinutes()->timezone('Asia/Kolkata');\n\n //Run google priority scraper\n // $schedule->command('run:priority-keyword-search')->daily();\n //2020-02-17 $schedule->command('MailingListSendMail')->everyFifteenMinutes()->timezone('Asia/Kolkata');\n //2020-02-17 Changed below to hourly\n // $schedule->command('cache:master-control')->hourly()->withoutOverlapping();\n // $schedule->command('database:historical-data')->hourly()->withoutOverlapping();\n\n //update currencies\n // $schedule->command('currencies:refresh')->hourly();\n // $schedule->command('send:event-notification2hr')->hourly();\n // $schedule->command('send:event-notification24hr')->hourly();\n // $schedule->command('currencies:update_name')->monthly();\n // $schedule->command('send-report:failed-jobs')->everyFiveMinutes();\n // $schedule->command('send:event-notification30min')->everyFiveMinutes();\n // $schedule->command('generate:product-pricing-json')->daily();\n\n // Customer chat messages quick data\n // $schedule->command('customer:chat-message-quick-data')->dailyAt('13:00');;\n // $schedule->command('fetch-store-website:orders')->hourly();\n\n // If scraper not completed, store alert\n // $schedule->command('scraper:not-completed-alert')->dailyAt('00:00');\n\t\t\n\t\t$schedule->command('routes:sync')->hourly()->withoutOverlapping();\n\n\t\t//$schedule->command('command:assign_incomplete_products')->dailyAt('01:30');\n\t\t$schedule->command('send:daily-reports')->dailyAt('23:00');\n\n\t\t\n //update order way billtrack histories\n $schedule->command('command:waybilltrack')->dailyAt(\"1:00\");\n \n\t\t//update directory manager to db\n\t //$schedule->command('project_directory:manager')->dailyAt(\"1:00\");\n\n\n // make payment receipt for hourly associates on daily basis.\n // $schedule->command('users:payment')->dailyAt('12:00')->timezone('Asia/Kolkata');\n // $schedule->command('check:landing-page')->everyMinute();\n\n $schedule->command('ScrapApi:LogCommand')->hourly();\n $schedule->command('HubstuffActivity:Command')->daily();\n\n $schedule->command('AuthenticateWhatsapp:instance')->hourly();\n // Get tickets from Live Chat inc and put them as unread messages\n // $schedule->command('livechat:tickets')->everyMinute();\n // delate chat message \n //$schedule->command('delete:chat-messages')->dailyAt('00:00')->timezone('Asia/Kolkata');\n\n //daily cron for checking due date and add to cashflow \n $schedule->command(\"assetsmanagerduedate:pay\")->daily();\n\n //for adding due date in asset manager\n $schedule->command(\"assetsmanagerpayment:cron Daily\")->daily();\n $schedule->command(\"assetsmanagerpayment:cron Weekly\")->weekly();\n $schedule->command(\"assetsmanagerpayment:cron Yearly\")->yearly();\n $schedule->command(\"assetsmanagerpayment:cron Monthly\")->monthly();\n $schedule->command(\"assetsmanagerpayment:cron Bi-Weekly\")->twiceMonthly(1, 16, '13:00');\n \n \n \n //cron for fcm push notifications\n $schedule->command(\"fcm:send\")->everyMinute();\n //cron for influencers start stop\n $schedule->command('influencers:startstop')->hourly();\n //cron for price check api daily basis\n $schedule->command(\"pricedrop:check\")->daily();\n\t\t// Cron for scrapper images.\n\t\t$schedule->command(\"scrappersImages\")->daily();\n $schedule->command(\"scrappersImagesDelete\")->daily();\n //cron for instagram handler daily basis\n $schedule->command(\"instagram:handler\")->everyMinute()->withoutOverlapping();\n\n //Cron for activity\n $schedule->command(\"productActivityStore\")->dailyAt(\"0:00\");\n $schedule->command(\"errorAlertMessage\")->daily();\n\n $schedule->command(\"UpdateScraperDuration\")->everyFifteenMinutes();\n $schedule->command('horizon:snapshot')->everyFiveMinutes();\n\n }", "title": "" }, { "docid": "0ee937c9ad7b7e181e11210c6ba391e2", "score": "0.62727374", "text": "protected function schedule(Schedule $schedule) {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "98ef78630669f130ca6c881ee4e44065", "score": "0.6269463", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n\n \n $schedule->command('cron:getspotifysearches')\n ->cron('*/2 * * * *')\n ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:getartistsclaimstate')\n ->cron('*/2 * * * *')\n ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:addrandomusers')\n ->cron('*/3 * * * *')\n ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:saveartistpicks')\n ->cron('*/30 * * * *')\n ->appendOutputTo('cron_log.txt');\n \n $schedule->command('cron:generatestats')\n ->cron('14 */2 * * *')\n ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:generatehomepagestats')\n ->cron('20 21 * * *')\n ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:homepageactivegenreschange')\n ->cron('*/20 * * * *')\n ->appendOutputTo('cron_log.txt');\n \n $schedule->command('cron:checkaccountactivestate')\n ->cron('20 20 * * *')\n ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:getaccounttokens')\n ->cron('24 * * * *')\n ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:fillgenreplaylists')\n ->cron('12 */3 * * *')\n ->appendOutputTo('cron_log.txt');\n\n //$schedule->command('cron:gettracksfromplaylists') //should turn off after finished\n // ->cron('*/30 * * * *')\n // ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:addplaylisttoaccounts') //add playlists to Artist playlists,should run cause genres are created constantly\n ->cron('35 10 */3 * *')\n ->appendOutputTo('cron_log.txt');\n \n //$schedule->command('cron:addgenreplayliststoprofile') //included in adduserstoouraccounts,turn off\n // ->cron('14 8 * * *')\n // ->appendOutputTo('cron_log.txt');\n\n $schedule->command('cron:adduserstoouraccounts') //adding artist playlists and posting them on artist profiles\n ->cron('44 8 * * *')\n ->appendOutputTo('cron_log.txt');\n \n\n\n \n }", "title": "" }, { "docid": "cbfbf410dd23afdcfd20a72295784513", "score": "0.6256664", "text": "protected function schedule(Schedule $schedule)\n {\n\n\n\n $schedule->command('top_holdings')->dailyAt('23:35')->withoutOverlapping();\n $schedule->command('save_balances')->dailyAt('23:55')->withoutOverlapping();\n $schedule->command('tokens')->daily()->withoutOverlapping();\n\n $schedule->command('top_last')->everyMinute()->withoutOverlapping();\n $schedule->command('top_balances')->everyMinute()->withoutOverlapping();\n $schedule->command('total_balances')->everyMinute()->withoutOverlapping();\n $schedule->command('last_active')->everyMinute()->withoutOverlapping();\n\n $schedule->command('balances')->everyMinute()->withoutOverlapping();\n $schedule->command('balances_from_tbcom')->everyMinute()->withoutOverlapping();\n\n// $schedule->command('top_added_removed')->everyMinute()->withoutOverlapping();\n// $schedule->command('total_added_removed')->everyMinute()->withoutOverlapping();\n\n\n $schedule->command('top_transfers')->everyMinute()->withoutOverlapping();\n $schedule->command('total_transfers')->everyMinute()->withoutOverlapping();\n\n $schedule->command('alert1')->everyMinute()->withoutOverlapping();\n $schedule->command('alert2')->everyMinute()->withoutOverlapping();\n $schedule->command('alert3')->everyMinute()->withoutOverlapping();\n $schedule->command('alert4')->everyMinute()->withoutOverlapping();\n\n $schedule->command('tokens_info')->everyMinute()->withoutOverlapping();\n $schedule->command('percents')->everyMinute()->withoutOverlapping();\n\n $schedule->command('send_emails')->everyMinute()->withoutOverlapping();\n\n $schedule->command('popular_tokens')->everyThirtyMinutes()->withoutOverlapping();\n $schedule->command('info_tokens')->everyThirtyMinutes()->withoutOverlapping();\n\n\n\n// $schedule->command('tokens_info')->cron('* * * * *')->withoutOverlapping();\n// $schedule->command('topBalance')->everyMinute()->withoutOverlapping();\n }", "title": "" }, { "docid": "7f16daf980ef4898fcfb34fbe0895cd3", "score": "0.6225717", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('broadcast:process')->everyMinute();\n// $schedule->command('sequence:process')->everyFiveMinutes();\n// $schedule->command('sequence:clean')->everyThirtyMinutes();\n// $schedule->command('monitor:alert')->everyFiveMinutes();\n }", "title": "" }, { "docid": "a320f8a642b43225cb3b0a5c9d0573b9", "score": "0.62118095", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('tutora:cancel_lesson_bookings')\n ->cron('* * * * * *');\n\n $schedule->command('tutora:send_background_check_notifications')\n ->dailyAt('11:00');\n\n $schedule->command('tutora:complete_lesson_bookings')\n ->cron('* * * * * *');\n\n $schedule->command('tutora:close_expired_tuition_jobs')\n ->cron('3-59/10 * * * * *');\n\n $schedule->command('tutora:authorise_lesson_booking_payments')\n ->cron('2-59/10 * * * * *');\n\n $schedule->command('tutora:capture_lesson_booking_payments')\n ->cron('7-59/10 * * * * *');\n\n $schedule->command('tutora:charge_lesson_booking_payments')\n ->cron('4-59/10 * * * * *');\n\n $schedule->command('tutora:retry_lesson_booking_payments')\n ->cron('1-59/10 * * * * *');\n\n $schedule->command('tutora:email_upcoming_lesson_reminders')\n ->cron('1-59/10 * * * * *');\n \n $schedule->command('tutora:send_message_line_reminders')\n ->cron('5-59/10 * * * * *');\n\n $schedule->command('tutora:send_go_online_reminders')\n ->cron('8-59/10 * * * * *'); \n\n $schedule->command('tutora:send_pending_lesson_reminders')\n ->cron('4-59/10 * * * * *'); \n\n $schedule->command('tutora:email_review_lesson_reminders')\n ->cron('7-59/10 * * * * *');\n\n $schedule->command('tutora:send_notifications')\n ->cron('7-59/10 * * * * *');\n\n $schedule->command('tutora:fire_job_has_been_open_system_notifications')\n ->cron('7-59/10 * * * * *');\n\n // REPORTS\n\n $schedule->command('tutora:run_student_status_report')\n ->cron('2-59/10 * * * * *');\n\n $schedule->command('tutora:run_analytics_report week 0')\n ->weekly()->mondays()->at('5:00');\n\n $schedule->command('tutora:run_analytics_report month 0')\n ->monthly()->at('5:00');\n\n // ALGORITHM\n $schedule->command('tutora:calculate_profile_scores')\n ->dailyAt('3:00');\n\n $schedule->command('tutora:geocode_addresses')\n ->hourly();\n }", "title": "" }, { "docid": "2eaa950c4456a26e715448f385c40b86", "score": "0.62024415", "text": "protected function schedule(Schedule $schedule) {\r\n // script execution time\r\n $time_start = microtime(true);\r\n\r\n $schedule->command('mail:synced-company-message-detail')->everyMinute();\r\n $schedule->command('gmail:get-message')->everyMinute();\r\n $schedule->command('gmail:get-message-details')->everyMinute();\r\n $schedule->command('gmail:get-attachments')->everyMinute();\r\n $schedule->command('playbook:playbook-activator')->everyMinute();\r\n $schedule->command('playbook:sent-playbook-email')->everyMinute();\r\n foreach (['00:30', '06:30', '12:30', '18:30'] as $time) {\r\n $schedule->command('playbook:check-spf-dkim-verification')->dailyAt($time);\r\n }\r\n // $schedule->command('playbook:check-spf-dkim-verification')->daily();\r\n $schedule->command('playbook:refresh-email-message-sent-count')->dailyAt('00:30');\r\n $schedule->command('cache:clear')->daily();\r\n $schedule->command('sms:syncronize')->everyMinute();\r\n $schedule->command('command:syncedEmail')->everyMinute();\r\n\r\n $schedule->command('alert:alert-log')->daily();\r\n ///$schedule->command('alert:sendemail-alert')->daily();\r\n $schedule->command('trendalert:update-alert-result')->hourly();\r\n $schedule->command('command:set-available-timeslots')->daily();\r\n// $schedule->command('command:sync-task-overdue')->daily(); \r\n $schedule->command('command:sync-task-overdue')->everyMinute();\r\n $schedule->command('command:delete-invited-agents')->daily();\r\n //Bandwidth number order status check\r\n //$schedule->command('order:check-status')->everyMinute();\r\n $schedule->command('superadmin:patrondata')->everyMinute();\r\n $schedule->command('subscriber:QueueMailReminder')->hourly();\r\n $schedule->command('Reminder:SubscribersMail')->everyMinute();\r\n $schedule->command('Reminder:SubscribersonBoardMail')->hourly();\r\n $time_end = microtime(true);\r\n $execution_time = ($time_end - $time_start);\r\n // file_put_contents('kernel_exec_time.log', date('Y-m-d H:i:s') . ' Total Execution Time: ' . rtrim(sprintf('%.50f', $execution_time), '0') . ' Sec' . PHP_EOL, FILE_APPEND);\r\n }", "title": "" }, { "docid": "613054bb5a59b64df4fafc2c7fda8730", "score": "0.6193376", "text": "protected function schedule(Schedule $schedule)\n {\n// $schedule->command('inspire')\n// ->hourly();\n\n //remove test events oldest then 2 days\n $schedule->command('event_test:remove')\n ->description('Remove old events')\n ->everyMinute()->when(function () {\n return \"Remove Done\";\n });\n\n //backup every day at 3:00\n $schedule->command('backup:run')->dailyAt('03:00')->when(function () {\n return \"DOneDDDDD\";\n });\n//\n// $schedule->command('backupfiles:run')->weekly()->mondays()->at('03:00')->when(function () {\n// return \"DOneDDDDD\";\n// });\n//\n// $schedule->command('userdata:run')->weekly()->mondays()->at('03:00')->when(function () {\n// return \"DOneDDDDD\";\n// });\n\n }", "title": "" }, { "docid": "c018e34be080512457f144a95c339164", "score": "0.6182598", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command('inspire')->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "73d97f07169bd5416103c49cb5e50d22", "score": "0.61742747", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n }", "title": "" }, { "docid": "333deb6cc98f746a8616e9c01ca12367", "score": "0.615695", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n }", "title": "" }, { "docid": "333deb6cc98f746a8616e9c01ca12367", "score": "0.615695", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "05b251e4b6407a82ed8a92293ddbcf91", "score": "0.61551493", "text": "public function schedule(Schedule $schedule): void\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "7970b9c0890555ab8587496af2dcf56b", "score": "0.6150297", "text": "protected function configure()\n \t{\n\t\t$this->addOptions(array(\n\t\tnew sfCommandOption('application', null, sfCommandOption::PARAMETER_OPTIONAL, 'The application name', 'jeevansathi'),\n\t ));\n\n\t $this->namespace = 'cron';\n\t $this->name = 'FtoMis';\n\t $this->briefDescription = 'generate MIS data for FTO';\n\t $this->detailedDescription = <<<EOF\n\tThis cron runs daily and generates data for FTO MIS on a daily basis.\n\tCall it with:\n\n\t [php symfony cron:FtoMis] \nEOF;\n \t}", "title": "" }, { "docid": "9f12b9bf9b837916c616bdd5b5b2c5df", "score": "0.61391854", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n $schedule->command(AutoFinishCharge::class)->everyMinute();\n $schedule->command(ReplaceTimeout::class)->everyMinute();\n $schedule->command(CabinetSync::class)->everyMinute();\n $schedule->command(BatteryControl::class)->everyMinute();\n $schedule->command(StatDeviceCost::class)->everyFifteenMinutes();\n }", "title": "" }, { "docid": "646a5b01835f16cae6c9208ae1af496c", "score": "0.61256367", "text": "protected function schedule(Schedule $schedule) {\n\n // $schedule->command('inspire')\n // ->everyMinute();\n\n\n $schedule->command('fetch:amazonproducts videocitofono')->hourlyAt(22)->between('6:00', '23:58')->withoutOverlapping(); \n $schedule->command('fetch:compareprices')->hourlyAt(25)->between('6:00', '23:58')->withoutOverlapping(); \n $schedule->command('fetch:scrapamazonproductsdescriptions')->dailyAt('05:30')->withoutOverlapping();\n $schedule->command('custom:delete-unverified-users')->monthlyOn(07, '13:28')->withoutOverlapping();\n $schedule->command('custom:delete-spam-comments')->monthlyOn(07, '13:35')->withoutOverlapping();\n\n //SCRAPING RECENSIONI SOSPESO TEMPORANEAMENTE --> VERIFICARE IL CORRETTO INSERIMENTO DEI PRODOTTI IN DB -- $schedule->command('fetch:amazonreviews videocitofono')\n //->everyMinute()\n //->dailyAt('06:35')\n //->hourly()\n // ->dailyAt('5:20')\n // ->withoutOverlapping();\n\n }", "title": "" }, { "docid": "568cdfa1034e91078370d960bf6a102d", "score": "0.61176103", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('AppointmentPushNotifications:notify')->everyFiveMinutes();\n $schedule->command('ActivityPushNotifications:notify')->everyFiveMinutes();\n $schedule->command('ResetWrongPasswordAttempts:run')->everyFiveMinutes();\n $schedule->command('AppointmentStatusChange:cron')->everyFiveMinutes();\n $schedule->command('AppointmentReminder:cron')->hourly();\n $schedule->command('PaymentReminder:cron')->hourly();\n $schedule->command('PartnerShipReminder:cron')->daily();\n $schedule->command('PaymentStatusInquiry:check')->everyFiveMinutes();\n \n $schedule->command('WeeklyDoctorSettlement:cron')->weekly();\n $schedule->command('BiWeeklyDoctorSettlement:cron')->twiceMonthly(1, 16, '00:00');\n $schedule->command('MonthlyDoctorSettlement:cron')->monthly();\n }", "title": "" }, { "docid": "d18d198763ee63bd1c14752ee7e0ce05", "score": "0.61173505", "text": "protected function schedule(Schedule $schedule)\n {\n \n $schedule->command('job:prcSys_Insert_CRM')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires') \n ->dailyAt('19:30');\n \n $schedule->command('job:prcSys_Insert_Campaign')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyMinute()\n ->between('19:40','20:00');\n \n $schedule->command('job:prcSys_Insert_CRM_Users')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyMinute()\n ->between('20:01','20:20');\n \n $schedule->command('job:prcSys_Insert_Contacts')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('20:21','20:35');\n \n $schedule->command('job:prcSys_Insert_External_Database')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('20:36','21:45');\n \n $schedule->command('job:prcSys_Insert_External_Contact')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('21:45','22:00');\n \n \n $schedule->command('job:prcSys_Insert_Logins')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyMinute()\n ->between('20:30','21:00');\n \n \n $schedule->command('job:prcSys_Insert_Call_Logs')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('21:00','21:40');\n \n $schedule->command('job:prcSys_Insert_Contact_Sale')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('21:30','22:00');\n \n \n $schedule->command('job:prcSys_Insert_Contact_History')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('22:00','22:40');\n \n \n $schedule->command('job:prcSys_Insert_Contact_Phone')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('22:20','23:00');\n \n \n $schedule->command('job:prcSys_Insert_Contact_Address')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('23:10','23:59');\n \n \n $schedule->command('job:prcSys_Insert_Contact_MailAddress')\n ->withoutOverlapping()\n ->timezone('America/Argentina/Buenos_Aires')\n ->everyTenMinutes()\n ->between('23:30','23:59'); \n \n }", "title": "" }, { "docid": "4aec51d44e6e4f28ef28b348bcc51aaa", "score": "0.6111556", "text": "protected function schedule(Schedule $schedule) {\n\n\t\t/*\n\t\t * The schedule is empty.\n\t\t *\n\t\t * The example:\n\t\t * $schedule->command('commandname')->hourly();\n\t\t*/\n\t}", "title": "" }, { "docid": "afb085da2b69165d1373ff9764578c17", "score": "0.6087802", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')\n ->hourly();\n\n //$schedule->command('subirbd')->everyFiveMinutes();\n\n $schedule->command('get:products')\n ->twiceDaily(1, 20);\n\n $schedule->command('get:products-mercando')\n ->twiceDaily(2, 21);\n\n //$schedule->command('get:customers')->twiceDaily(2, 21);\n\n $schedule->command('get:orders')\n ->twiceDaily(14, 23);\n\n $schedule->command('get:orders-mercando')\n ->twiceDaily(14, 23);\n\n $schedule->command('get:update-points')->dailyAt('01:30');\n $schedule->command('get:update-points-mercando')->hourly();\n\n //$schedule->command('get:metafields')->dailyAt('23:30');\n\n //$schedule->command('get:giftscards')->monthly();\n }", "title": "" }, { "docid": "11ed0d4aee71d9d02897818829dd6879", "score": "0.6082613", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('update-feed-stat Admaven')->dailyAt('23:00');\n $schedule->command('update-feed-stat Adjux')->dailyAt('23:00');\n $schedule->command('update-feed-stat Megapush')->dailyAt('23:00');\n $schedule->command('update-feed-stat Admashin')->dailyAt('23:00');\n $schedule->command('update-feed-stat AdsCompass')->dailyAt('23:00');\n $schedule->command('update-feed-stat AdsKeeper')->dailyAt('23:00');\n $schedule->command('update-feed-stat ZeroPark')->dailyAt('23:00');\n $schedule->command('update-feed-stat TrafficMedia')->dailyAt('23:00');\n $schedule->command('update-feed-stat Propeller')->dailyAt('23:00');\n $schedule->command('update-feed-stat PpcBuzz')->dailyAt('23:00');\n $schedule->command('update-feed-stat LizardTrack')->dailyAt('23:00');\n }", "title": "" }, { "docid": "9fd092f6df5ea5deb8d5a9f82240c491", "score": "0.6054985", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('exam:finish')->everyMinute();\n $schedule->command('exam:finish-session')->dailyAt('01:00');\n $schedule->command('exam:registration-clear')->dailyAt('01:00');\n $schedule->command('exam:retry-notification')->dailyAt('09:00');\n $schedule->command('backup:clean')->dailyAt('01:00');\n $schedule->command('backup:run')->dailyAt('02:00');\n }", "title": "" }, { "docid": "569139052643c50f3564cb75de9ab389", "score": "0.60443693", "text": "protected function schedule(Schedule $schedule)\n {\n parent::schedule($schedule);\n $schedule->command('finance:fix-prescription')->everyFiveMinutes()->withoutOverlapping();\n $schedule->command('finance:prepare-payments')->everyMinute()->withoutOverlapping();\n $schedule->command('finance:jambopay')->everyMinute()->withoutOverlapping();\n }", "title": "" }, { "docid": "2ee66136073b9c0b3f19163600bc532c", "score": "0.6043899", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('bookings:offline-service-booking-update')->hourlyAt(0);\n $schedule->command('bookings:balance-charge-processing')->hourly(20);\n $schedule->command('bookings:check-not-confirmed-booking')->hourlyAt(40);\n $schedule->command('bookings:request-extend-delivery-date')->dailyAt('15:00');\n $schedule->command('bookings:send-request-confirm-online-delivery')->dailyAt('22:00');\n $schedule->command('bookings:auto-accept-online-delivery')->dailyAt('16:00');\n $schedule->command('reviews:add-review-reminder')->dailyAt('18:00'); \n }", "title": "" }, { "docid": "40e16c53c348d88febcc4720aa97ddac", "score": "0.6037753", "text": "protected function schedule(Schedule $schedule)\n {\n // レコメンド\n// $schedule->command('recommend')->withoutOverlapping();\n// $schedule->command('recommend')->withoutOverlapping();\n// $schedule->command('recommend')->withoutOverlapping();\n\n\n // マッチングメール\n// $schedule->command('matching:email')->withoutOverlapping();\n\n }", "title": "" }, { "docid": "12f158fb4b85a2d4466de8485250783e", "score": "0.6035638", "text": "public function schedule(Schedule $schedule)\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "12f158fb4b85a2d4466de8485250783e", "score": "0.6035638", "text": "public function schedule(Schedule $schedule)\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "12f158fb4b85a2d4466de8485250783e", "score": "0.6035638", "text": "public function schedule(Schedule $schedule)\n {\n // $schedule->command(static::class)->everyMinute();\n }", "title": "" }, { "docid": "1090750b77924f20ab46e8290f357233", "score": "0.6032093", "text": "protected function schedule(Schedule $schedule)\n {\n \n $cron_time = WebhookCron::first();\n \n if($cron_time->status == 'yes'){\n if($cron_time->cron_time == 24){\n $schedule->command('logs_delete:cron')\n ->cron('* 12 * * */1');\n }\n if($cron_time->cron_time == 48){\n $schedule->command('logs_delete:cron')\n ->cron('* 12 * * */2');\n }\n if($cron_time->cron_time == 72){\n $schedule->command('logs_delete:cron')\n ->cron('* 12 * * */3');\n }\n }\n $allRules = Rule::get();\n foreach ($allRules as $allRule) {\n if($allRule['status'] == 'running'){\n if($allRule['schedule_time']=='random'){\n $id = $allRule['id'];\n $total_hours = 24;\n $mins = 60;\n $total_mins = $total_hours*$mins;\n $email_per_day = $allRule['emails_count'];\n $allScheduleDays = $allRule['schedule_days'];\n $array = array();\n mt_srand(10);\n while(sizeof($array)<$email_per_day){\n $number = mt_rand(0,$total_mins);\n if(!array_key_exists($number,$array)){\n $array[$number] = $number;\n }\n }\n foreach ($array as $value) {\n $time_diff = intdiv($value, 60).':'. ($value % 60);\n foreach ($allScheduleDays as $allScheduleDay) {\n switch ($allScheduleDay) {\n case '1':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$time_diff)\n ->timezone($allRule['timezone']);\n break;\n\n case '2':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$time_diff)\n ->timezone($allRule['timezone']);\n break;\n\n case '3':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$time_diff)\n ->timezone($allRule['timezone']);\n break;\n\n case '4':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$time_diff)\n ->timezone($allRule['timezone']);\n break;\n\n case '5':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$time_diff)\n ->timezone($allRule['timezone']);\n break;\n\n case '6':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$time_diff)\n ->timezone($allRule['timezone']);\n break;\n\n case '7':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$time_diff)\n ->timezone($allRule['timezone']);\n break;\n }\n }\n }\n }else{\n $id = $allRule['id'];\n $email_per_day = $allRule['emails_count'];\n $total_hours = abs( $allRule['schedule_hour_from'] - $allRule['schedule_hour_to'] );\n $mins = 60;\n $allScheduleDays = $allRule['schedule_days'];\n $total_mins = $total_hours*$mins;\n $array = array();\n mt_srand(10);\n while(sizeof($array)<$email_per_day){\n $number = mt_rand(0,$total_mins);\n if(!array_key_exists($number,$array)){\n $array[$number] = $number;\n }\n }\n foreach ($array as $value) {\n $time_diff = intdiv($value, 60).'.'. ($value % 60);\n $spreadTime = $allRule['schedule_hour_from']+$time_diff;\n $finalMins = str_replace('.', ':', $spreadTime);\n foreach ($allScheduleDays as $allScheduleDay) {\n switch ($allScheduleDay) {\n case '1':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$finalMins)\n ->timezone($allRule['timezone']);\n break;\n\n case '2':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$finalMins)\n ->timezone($allRule['timezone']);\n break;\n\n case '3':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$finalMins)\n ->timezone($allRule['timezone']);\n break;\n\n case '4':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$finalMins)\n ->timezone($allRule['timezone']);\n break;\n\n case '5':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$finalMins)\n ->timezone($allRule['timezone']);\n break;\n\n case '6':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$finalMins)\n ->timezone($allRule['timezone']);\n break;\n\n case '7':\n $schedule->command('mauticemail:cron',[$id])\n ->weeklyOn($allScheduleDay,$finalMins)\n ->timezone($allRule['timezone']);\n break;\n }\n }\n }\n }\n }\n }\n }", "title": "" }, { "docid": "3d1257bec9bb504fc770b6a47fccd558", "score": "0.6020931", "text": "protected function schedule(Schedule $schedule)\n {\n\n //ovo radi, ali ne treba raditi ovde if-ove itd, izmjestiti u komandu\n $schedule->command('command:emailQueue')->everyFifteenMinutes();\n $schedule->command('command:generateTagesmeldung')->dailyAt('04:30');\n $schedule->command('command:checkTagesmeldung')->dailyAt('06:00');\n $schedule->command('command:emailTagesmeldung')->dailyAt('08:58');\n\n\n }", "title": "" }, { "docid": "83aa0f13a83b5a79969471d373e4289a", "score": "0.60150707", "text": "public function schedule(Schedule $schedule): void\n\t{\n\t\t// $schedule->command(static::class)->everyMinute();\n\t}", "title": "" }, { "docid": "80b51b2d03850a7a690fc32f81526e5f", "score": "0.5990479", "text": "protected function schedule(Schedule $schedule)\n\t{\n\t\t$schedule->command('inspire')\n\t\t\t\t ->hourly();\n $schedule->command('skpdPbbGen')\n ->monthly()\n ->when(function(){\n if (Carbon::now()->month == 4) return true;\n })\n ->withoutOverlapping();\n $schedule->command('skpdkbPbbGen')\n ->monthly()\n ->when(function(){\n if (Carbon::now()->month == 5) return true;\n })\n ->withoutOverlapping();\n\t}", "title": "" }, { "docid": "dc0e0e5a13382d70e3867a2b38bd3e97", "score": "0.59663546", "text": "protected function schedule(Schedule $schedule)\n {\n $this->scheduleInDayCommands($schedule);\n $this->scheduleDailyCommands($schedule);\n $this->scheduleOnDayCommands($schedule);\n $this->scheduleYearlyCommands($schedule);\n }", "title": "" }, { "docid": "2fa2fd68bc3a35f7578425b5aa580bba", "score": "0.5958783", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('craw:cat')->everyMinute();\n $schedule->command('proxy:update')->everyMinute();\n $schedule->command('keywords:fetch')->dailyAt('22:10');\n $schedule->command('cat:updatestatus')->dailyAt('23:40');\n }", "title": "" }, { "docid": "8790273892cd8a26acb82d90cd5f5111", "score": "0.59568214", "text": "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class)->everyThirtyMinutes();\n }", "title": "" }, { "docid": "7fd2af641bd2cae95c235d66c1a9a2e9", "score": "0.59495527", "text": "protected function schedule(Schedule $schedule)\n\t{\n//\t\t$schedule->command('inspire')\n//\t\t\t\t ->hourly();\n//\n// // Clean up will run daily at midnight\n// $schedule->command('session:cleanup')\n// ->daily();\n//\n// // Create proper transaction tags and stages.\n// $schedule->command('transaction:cleanup')\n// ->daily();\n//\n// // Create proper product tags and stages.\n// $schedule->command('product:cleanup')\n// ->daily();\n//\n// // Create proper product tags and stages.\n// $schedule->command('user:online')\n// ->everyFiveMinutes();\n }", "title": "" }, { "docid": "3bc0742b4996d737cb227c8956da447b", "score": "0.5948012", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n //$schedule->command('owner:verify')\n // ->everyMinute();\n $schedule->command('send:coupons')\n ->everyMinute();\n $schedule->command('obtain:coupons')\n ->everyMinute();\n $schedule->command('cars:refund')\n ->dailyAt('01:00');\n $schedule->command('points:update')\n ->dailyAt('03:00');\n $schedule->command('points:update y')\n ->dailyAt('02:00');\n $schedule->command('points:cancel')\n ->dailyAt('04:00');\n $schedule->command('recommended:car')\n ->dailyAt('05:00');\n /*\n $count = \\App\\Verify::count();\n $n = ceil($count/10000);\n for ($i=0; $i < $n ; $i++) {\n $schedule->command('points:update '.$i)\n ->dailyAt('03:'.(10+$i));\n }\n */\n\n $schedule->command('send:levels')\n ->dailyAt('00:00');\n }", "title": "" }, { "docid": "6dca734c7829f6e19d44c84fb8000770", "score": "0.5943979", "text": "protected function schedule(Schedule $schedule)\n {\n // Register the api loader console kernels\n app('api.loader')->registerConsoleKernels();\n }", "title": "" }, { "docid": "86fda017415129d6eeaf81ce23f6a76e", "score": "0.5943842", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command(SendTasksToTaskers::class)->everyMinute();\n $schedule->command(RejectTaskerNotAnswered::class)->everyMinute();\n $schedule->command(SendToAdminEmployerNotAnswered::class)->everyMinute();\n $schedule->command(ExpireTasks::class)->everyMinute();\n $schedule->command(FinishTasks::class)->everyMinute();\n $schedule->command(StartTasks::class)->everyMinute();\n $schedule->command(AcceptTasks::class)->everyMinute();\n }", "title": "" }, { "docid": "ab0ec495d963f437e6fba6c256dd039b", "score": "0.5938642", "text": "private static function create_cron_jobs() {\n\t\t//@todo clear and init schedule\n\n\t}", "title": "" }, { "docid": "5ef03161abaf58ed48185a2d8ffa87ac", "score": "0.5907212", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')\n ->hourly();/**\n * b端相关脚本\n */\n //JZ-b端基石补贴同步会员状态到jz_apply表[email protected]\n $schedule->command('sync_member_state:send')->cron('*/5 * * * *')->withoutOverlapping();//JZ-b端同步工作经验到jz_profile表[email protected],[email protected]\n $schedule->command('stat_job_exprience_increment')->cron('5 0 * * *')->withoutOverlapping();//JZ-b端打款完成给c端用户[email protected],[email protected]\n $schedule->command('pay_finish_push')->cron('*/10 * * * *')->withoutOverlapping();//职位到期下线,半小时处理一次,\n $schedule->command('post_apply_offline')->cron('10,40 * * * *')->withoutOverlapping();//钻石、优选因展位到期职位和展位下线\n $schedule->command('adv_post_relation_offline')->cron('0 0 * * *')->withoutOverlapping();//RPO职位过滤170,171报名用户,半小时处理一次,\n $schedule->command('post:filter_rpo')->cron('*/30 * * * *')->withoutOverlapping();//JZ-b端审批后累计工资和发送[email protected],[email protected]\n $schedule->command('settle_payment_finish')->cron('*/5 * * * *')->withoutOverlapping();//JZ-b端工资自动创建付款任务[email protected],[email protected]\n //$schedule->command('payment_task')->cron('*/5 * * * *')->withoutOverlapping();//处理任务申请完成超时\n $schedule->command('TaskApplyFinishTimeOut')->cron('*/1 * * * *')->withoutOverlapping();//处理任务申请审核超时\n $schedule->command('TaskApplyAuditTimeOut')->cron('*/1 * * * *')->withoutOverlapping();//在线特工下线脚本\n $schedule->command('put_task_offline:send')->cron('*/30 * * * *')->withoutOverlapping();//库存监控\n $schedule->command('stock_moniter:send')->cron('*/60 * * * *')->withoutOverlapping();//在线特工下线脚本\n //$schedule->command('refund_after_taskoffline:send')->cron('*/50 * * * *')->withoutOverlapping();//在线特工预退款脚本\n $schedule->command('pre_refund_after_taskoffline')->cron('*/50 * * * *')->withoutOverlapping();//在线特工退款脚本\n $schedule->command('TaskExpireRefund')->cron('*/50 * * * *')->withoutOverlapping();//提醒商户有在24小时后自动审核通过的任务,请及时处理,每天十点提醒\n $schedule->command('overtime_apply_task_push')->cron('0 10 * * *')->withoutOverlapping();//提醒商户有在24小时后自动审核通过的任务,请及时处理,每天十七点提醒\n $schedule->command('overtime_apply_task_push')->cron('0 17 * * *')->withoutOverlapping();//提醒商户还有1天到期下线的任务\n $schedule->command('offline_task_push')->cron('0 12 * * *')->withoutOverlapping();//当每天16点时任务状态为进行中&&剩余数量<10的时候短信提醒\n //$schedule->command('TaskStockShortagePush')->cron('0 16 * * *')->withoutOverlapping();//在线特工下线脚本(冻结余额为0的)\n $schedule->command('task_end_with_no_freeze')->cron('* */1 * * *')->withoutOverlapping();//放鸽子记录统计\n //$schedule->command('fanggezi_count')->cron('0 2 * * *')->withoutOverlapping();///$schedule->command('task_update_weight')->dailyAt('04:00');//暑假工抓取中华英才网数据\n ///$schedule->command('shujiagong')->hourly()->withoutOverlapping();///$schedule->command('taskservicefeeadjust')->everyTenMinutes()->withoutOverlapping();//处理im反馈超时,将反馈时间在前10分钟到后1分钟之间的数据设置为反馈超时状态\n $schedule->command('ImFedbackTimeOut')->cron('*/5 * * * *')->withoutOverlapping();//处理im短信发送,将创建时间在前10分钟到当前时间之间的未发送短信发送出去\n //$schedule->command('ImPollSendSms')->cron('*/5 * * * *')->withoutOverlapping();$schedule->command('ImPollSendSmsTemp')->cron('1 20 * * *')->withoutOverlapping();$schedule->command('taskservicefeeadjust')->everyTenMinutes()->withoutOverlapping();//公司认证信息\n ///$schedule->command('CompanyAuditedCommand')->cron('*/10 * * * *')->withoutOverlapping();//默认插入评价,每天早上更新前一天的数据\n //$schedule->command('thumbup_fix:send day')->dailyAt('02:00');//thumbup_fix_fromUser停用并入thumbup_fix\n //$schedule->command('thumbup_fix_fromUser')->dailyAt('03:00');//处理职位权重计算,每10分钟执行一次\n //$schedule->command('PostWeightCal')->cron('*/10 * * * *')->withoutOverlapping();//处理职位权重记录,每天晚上1点执行一次\n //$schedule->command('PostWeightClean')->cron('* */1 * * *')->withoutOverlapping();//alipay报名取数据,存入list\n //$schedule->command('AlipayApplyEmployerManagePush')->cron('*/10 * * * *')->withoutOverlapping();//alipay报名同步\n //$schedule->command('AlipayApplyEmployerManagePop')->cron('0 */1 * * *')->withoutOverlapping();//alipay帖子同步\n //$schedule->command('AlipayGetPost')->cron('0 */1 * * *')->withoutOverlapping();//alipay帖子重试\n #$schedule->command('AlipayPostRetry')->cron('* */1 * * *')->withoutOverlapping();//alipay报名重试\n #$schedule->command('AlipayEmployerRetry')->cron('* */1 * * *')->withoutOverlapping();//alipay帖子刷新\n //$schedule->command('AlipayRefreshByPost')->cron('0 */2 * * *')->withoutOverlapping();//支付宝实习生-报名同步\n //$schedule->command('AlipayCampusJobApplyPop')->cron('0/10 * * * *')->withoutOverlapping();//完美校园报名回调\n $schedule->command('PerfectCampusApplyPop')->cron('0 */1 * * *')->withoutOverlapping();//B端报名管理检测ES是否延迟\n $schedule->command('applyCheckEs')->cron('0 */1 * * *')->withoutOverlapping();//处理支付重试队列中的数据,一分钟一次\n $schedule->command('SettlementRetry')->cron('*/1 * * * *')->withoutOverlapping();//处理发工资push消息,一分钟一次\n $schedule->command('PushPaySalaryMsg')->cron('*/1 * * * *')->withoutOverlapping();//处理结算相关对账,五分钟一次\n $schedule->command('SettlementBalance')->cron('*/5 * * * *')->withoutOverlapping();//生成机器帖子\n ///$schedule->command('ProducePostCommand -P -A')->weekly()->tuesdays()->at('23:59')->withoutOverlapping();//初始化用户简历\n $schedule->command('init_user_profile')->dailyAt('01:00');//处理保证金变化消息通知,一分钟一次\n $schedule->command('deposit_change_sms_message')->cron('*/1 * * * *')->withoutOverlapping();//将redis队列中的帖子历史数据入库\n // $schedule->command('queue_post_history_version_queue')->cron('*/1 * * * *')->withoutOverlapping();//将保证金操作记录数据入库\n $schedule->command('deposit_operate_record')->cron('*/1 * * * *')->withoutOverlapping();//每天16点后统计特工分红数据\n //$schedule->command('TaskBonusSta')->cron('1 16 * * *')->withoutOverlapping();//分红发工资,16:30-18之间,每半小时一次\n //$schedule->command('TaskBonusPay')->cron('30 16 * * *')->withoutOverlapping();//每天18点后推送特工分红信息\n //$schedule->command('PushTaskBonusMsg')->cron('1 17 * * *')->withoutOverlapping();//每天16点后统计特工分红数据\n $schedule->command('TaskBonusQueue')->cron('0 16 * * *')->withoutOverlapping();//将保证金退款\n $schedule->command('deposit:refund')->cron('0 */1 * * *')->withoutOverlapping();//将每天审核通过的会员信息同步到简历中去\n $schedule->command('UcenterProfileSyncCommand')->cron('0 0 * * *')->withoutOverlapping();//剔除职位标题中的特殊字符\n //$schedule->command('PostReplaceSpecialChar')->cron('0 */12 * * *')->withoutOverlapping();//职位预上广告位\n //$schedule->command('PutPostOnAdv')->cron('10 0 * * *')->withoutOverlapping();//零工审核拒绝退款脚本\n $schedule->command('deposit:audit_refuse_refund')->cron('0 3 * * *')->withoutOverlapping();//特工重审超时\n $schedule->command('task:ReApplyAuditTimeOut')->cron('10 2 * * *')->withoutOverlapping();//监控-数据统计,每天凌晨一点执行\n $schedule->command('StatisticsQueue')->cron('0 1 * * *')->withoutOverlapping();//监控-数据核算,职位相关数据对账,调整定时时间需要同时调整脚本中数据推移时间\n $schedule->command('PostAccounting')->cron('*/10 * * * *')->withoutOverlapping();//展位下线导致的职位下线 需要在展位下线脚本【crm】执行之后【00:00】进行\n $schedule->command('PlatinumOfflinePost')->cron('30 0 * * *')->withoutOverlapping();//异步设置联系方式为已读\n $schedule->command('apply:read_phone')->cron('*/10 * * * *')->withoutOverlapping();//缓存jz_apply数据\n $schedule->command('apply:add_apply_to_cache')->cron('0 2 * * *')->withoutOverlapping();//报名过期提醒\n $schedule->command('apply:apply_out_time')->cron('0 9 * * *')->withoutOverlapping();//坐标补全\n $schedule->command('post:add_coordinate')->cron('0 */1 * * *')->withoutOverlapping();//报名过期状态修改\n $schedule->command('apply:expire_status_change')->cron('0 */1 * * *')->withoutOverlapping();//报名提醒\n $schedule->command('apply:applications_sms_notice')->cron('0 10 * * *')->withoutOverlapping();//报名提醒\n $schedule->command('apply:applications_sms_notice')->cron('0 15 * * *')->withoutOverlapping();//广告展位监控\n $schedule->command('AdvCheck')->cron('0 9 * * *')->withoutOverlapping();//定时批量刷新职位脚本\n $schedule->command('PostRefresh')->cron('0 11 * * *')->withoutOverlapping();$schedule->command('PostRefresh')->cron('0 19 * * *')->withoutOverlapping();//特工合作审核异常邮件提醒 (废弃)\n // $schedule->command('openapi:apply_audit_notice')->cron('0 17 * * *')->withoutOverlapping();//特工合作审核队列脚本 (废弃)\n // $schedule->command('openapi:apply_audit')->cron('*/1 * * * *')->withoutOverlapping();//公司资质认证,C端接口,凌晨3点缓存\n $schedule->command('CacheCompanyIsAudited:send')->cron('0 3 * * *')->withoutOverlapping();//报名即将过期数据入imPush队列\n $schedule->command('apply:apply_out_time_2_impush_queue')->dailyAt('09:30');//im发送消息统计脚本\n $schedule->command('im:push_stat_notice')->dailyAt('00:01');//CPA下线结算脚本\n //$schedule->command('CpaOfflineToSettlement')->cron('*/1 * * * *')->withoutOverlapping();//CPA每日结算脚本\n //$schedule->command('CpaSettlement')->cron('10 0 * * *')->withoutOverlapping();//rpo帖子刷线脚本\n $schedule->command('RpoRefreshPost')->cron('0 10-16,21 * * *')->withoutOverlapping();$schedule->command('DoSuperEditReq')->cron('*/5 * * * *')->withoutOverlapping();//公司资质过期处理\n $schedule->command('CorpCertificateExpire')->cron('0 2 * * *')->withoutOverlapping();$schedule->command('CorpCertificateExpired')->cron('0 3 * * *')->withoutOverlapping();//检查职位描述里面的网址链接\n $schedule->command('CheckAdvPostDescription')->cron('0 2 * * *')->withoutOverlapping();//评价信息统计\n $schedule->command('StatCommentStars')->cron('30 1 * * *')->withoutOverlapping();$schedule->command('StatCommentTagsCount')->cron('30 2 * * *')->withoutOverlapping();//钻石推广\n $schedule->command('DiamondApplyThreshlod')->cron('5 0 * * *')->withoutOverlapping();//$schedule->command('DiamondReferencePrice', ['export'])->cron('5 1 * * *')->withoutOverlapping();//每天计算每种钻石竞价类型的参考价\n //$schedule->command('DiamondReferencePrice', ['create'])->cron('0 0,2-17,20-23 * * *')->withoutOverlapping();//\n //$schedule->command('DiamondAuctionQueue')->cron('15 18 * * *')->withoutOverlapping();//竞价\n //$schedule->command('DiamondAuctionMonitor')->cron('*/10 * * * *')->withoutOverlapping();//竞价数据监视器,检查竞价过程中是否有问题数据产生\n //$schedule->command('diamond:consume_business_finance')->cron('*/10 * * * *')->withoutOverlapping();//钻石cpt扣费\n //$schedule->command('diamond:cpt_online')->cron('*/30 * * * *')->withoutOverlapping();//钻石cpt上展位\n //$schedule->command('diamond:cpt_update')->cron('30 0-2 * * *')->withoutOverlapping();//钻石cpt上线展示\n //$schedule->command('diamond:cpt_online_check')->cron('40 1,19 * * *')->withoutOverlapping();//每日钻石展位竞拍成功职位上线(钻石展位)对账\n //$schedule->command('DiamondMonitor')->cron('*/10 * * * *')->withoutOverlapping();//钻石相关对账\n //$schedule->command('DiamondOnlineAddTag')->cron('30 23 * * *')->withoutOverlapping();//上线钻石职位添加广点通渠道屏蔽标签\n //$schedule->command('DiamondOnlineAddTagCheck')->cron('50 23 * * *')->withoutOverlapping();//上线钻石职位添加广点通渠道屏蔽标签检查\n // 钻石老客户拉活 每周一 14:00 发放优惠券\n //$schedule->command('diamond:post_coupon_send')->weeklyOn(1, '14:00')->withoutOverlapping();//wuba推送帖子\n //$schedule->command('WuBaPushPostByFeitian')->cron('30 8 * * *')->withoutOverlapping();//天眼查帖子每日上传\n //$schedule->command('TianYanChaPushPost')->cron('0 1 * * *')->withoutOverlapping();//优选套餐订单过期处理\n $schedule->command('Package:order_expired')->cron('0 0 * * *')->withoutOverlapping();//消息推送相关脚本\n //将impush批量信息推出队列推送im消息\n $schedule->command('pop_im_info_from_queue')->cron('*/2 * * * *')->withoutOverlapping();//推送人头马报名来源i信息\n $schedule->command('push:apply_rm_push_command')->cron('*/5 * * * *')->withoutOverlapping();//每天18点推送今天没有处理的报名给商户\n $schedule->command('ApplyUndealMsg')->cron('0 18 * * *')->withoutOverlapping();//百度官方号推送\n $schedule->command('post:post_push')->cron('0 18 * * *')->withoutOverlapping();//淘宝客\n $schedule->command('TbkGoodsOrderGet', ['create_time'])->cron('*/1 * * * *')->withoutOverlapping();$schedule->command('TbkGoodsOrderGet', ['settle_time'])->cron('*/1 * * * *')->withoutOverlapping();$schedule->command('TbkGoodsOrderUpdate', ['15d'])->cron('*/1 * * * *')->withoutOverlapping();$schedule->command('TbkGoodsOrderUpdate', ['2m'])->cron('*/1 * * * *')->withoutOverlapping();//$schedule->command('TbkMonitor')->cron('*/10 * * * *')->withoutOverlapping();//每周五发送优质职位报表\n $schedule->command('QualityPositionReport')->weeklyOn(5, '10:00')->withoutOverlapping();//黑名单用户拒绝\n $schedule->command('DiamondReferencePrice')->cron('5 1 * * *')->withoutOverlapping();$schedule->command('ApplyBlackDenial')->cron('10 2 * * *')->withoutOverlapping();//钻石竞拍短信通知\n //$schedule->command('DiamondAuctionResultNotice')->cron('0 19 * * *')->withoutOverlapping();//$schedule->command('DiamondBalanceLackingNotice')->cron('30 8 * * *')->withoutOverlapping();//钻石竞拍数据统计\n //$schedule->command('DiamondAuctionStatistics')->cron('30 0 * * *')->withoutOverlapping();//钻石竞拍历史数据统计\n //$schedule->command('DiamondAuctionHistoryStatistics')->cron('00 22 * * *')->withoutOverlapping();//特工发工资监控\n $schedule->command('TaskPaySalaryWatch')->cron('0 9 * * *')->withoutOverlapping();//优惠券对账\n $schedule->command('CouponMonitor')->cron('*/10 * * * *')->withoutOverlapping();//报名投诉处理\n $schedule->command('history_complain_dispose')->cron('00 22 * * *')->withoutOverlapping();$schedule->command('apply_dispose_rate')->cron('00 03 * * *')->withoutOverlapping();//旺财宝高级刷新过期\n $schedule->command('WangcaibaoRefreshExpire')->cron('*/1 * * * *')->withoutOverlapping();//旺财宝下线脚本\n $schedule->command('WcbPostOffline')->cron('*/5 * * * *')->withoutOverlapping();//58推送职位账号检查\n // $schedule->command('WubaPushAccountCheck')->hourly()->withoutOverlapping();//报名下载发邮件\n $schedule->command('DownloadApply')->cron('10 9 * * *')->withoutOverlapping();//DMB-2277\n //$schedule->command('UpdateJobDateType')->cron('*/30 * * * *')->withoutOverlapping();//优选套餐对账\n $schedule->command('check:package_check_data')->cron('20 10 * * *')->withoutOverlapping();$schedule->command('PixiuOfflineCount')->cron('0 */1 * * *')->withoutOverlapping();//潮兼职报名自动拒绝\n $schedule->command('ApplyAutoRefuse')->cron('0 1,13 * * * *')->withoutOverlapping();//众包发工资的执行任务\n $schedule->command('payoff:opt',['filter'])->cron('*/30 * * * *')->withoutOverlapping();//企业活跃和简历处理排行榜奖励\n $schedule->command('biz_rank_award')->weeklyOn(1, '1:00')->withoutOverlapping();//钻石贴竞价结果计算运营位阈值\n $schedule->command('DiamondAuctionQueue')->cron('10 1 * * *')->withoutOverlapping();// 特工 众包商家 批量发工资脚本 DMB-2613\n $schedule->command('TaskCrowdPaySalary')->cron('*/30 * * * *')->withoutOverlapping();$schedule->command('DiamondYunYingWeiThreshlod')->cron('10 1 * * *')->withoutOverlapping();// 旺才宝兼职定时推送至c端58\n $schedule->command('post_push:wang_post_push_status')->cron('0 */1 * * *')->withoutOverlapping();// 点金线下兼职定时推送至c端58\n $schedule->command('post_push:gold_post_push_status')->cron('0 */1 * * *')->withoutOverlapping();// 定时检查点金帖子统计数据相关准确性\n //$schedule->command('post_statistical:post_check')->cron('0 1 * * *')->withoutOverlapping();// 父子账号定时回收\n $schedule->command('org_package:check_org_package')->cron('*/20 * * * *')->withoutOverlapping();// 父子账号定时校对子账号数与套餐数\n $schedule->command('org_package:check_org_value_package')->cron('0 */1 * * *')->withoutOverlapping();//父子账户 点金 24小时撤回资源\n $schedule->command('org_package:retract_cpa_org_package')->cron('*/20 * * * *')->withoutOverlapping();//父子账户 点金 检查计划撤回用户帖子是否暂停\n $schedule->command('org_package:retract_check_pause_post')->cron('0 */1 * * *')->withoutOverlapping();//咔嚓赚CRM线索审核回调处理\n $schedule->command('KachazhuanCrmCallBackHandle')->cron('*/2 * * * *')->withoutOverlapping();//咔嚓赚发工资\n\n //快速发帖不活跃用户短信提醒\n $schedule->command('postFastPub',['awakenBiz'])->dailyAt('12:00');//电话邀约号码池和号码信息监控脚本\n $schedule->command('PhoneInviteMonitor')->cron('*/30 * * * *')->withoutOverlapping();//释放虚拟号码入虚拟号码队列\n $schedule->command('PhoneInviteXCodeExpire')->cron('*/10 * * * *')->withoutOverlapping();//邀约电话拨打情况每日统计\n //$schedule->command('PhoneInviteCallStatistic')->cron('00 07 * * *')->withoutOverlapping();//电话邀约每日外显号码接通率监控\n //$schedule->command('PhoneInviteOutShowNumberMonitor')->cron('00 04 * * *')->withoutOverlapping();//每天早上5点初始化并发缓存\n $schedule->command('PhoneInviteConcurrencyCacheInit')->cron('00 05 * * *')->withoutOverlapping();//手机小号每日外显号码接通率监控\n //$schedule->command('phone:monitorMobileSuccess')->cron('00 04 * * *')->withoutOverlapping();//电话邀约每日早上5:15初始化号码池\n $schedule->command('PhoneInviteXCodeInit', ['4000660816'])->cron('15 05 * * *')->withoutOverlapping();//手机小号拨打情况每日统计\n $schedule->command('phone:CallStatistic')->cron('30 00 * * *')->withoutOverlapping();//电话邀约每日早上6:15初始化手机虚拟号号码redis list\n $schedule->command('PhoneInviteXCodeMobileInit')->cron('15 06 * * *')->withoutOverlapping();//手机虚拟号过期脚本\n $schedule->command('PhoneInviteXCodeMobileExpire')->cron('*/5 * * * *')->withoutOverlapping();//手机小号电话邀约号码池和号码信息监控脚本\n $schedule->command('MobileInviteMonitor')->cron('*/30 * * * *')->withoutOverlapping();//手机小号电话拨打情况统计\n $schedule->command('MobileInviteCallStatistic')->cron('0 */1 * * *')->withoutOverlapping();//给c端卡片和消息列表接口数据设置缓存处理\n $schedule->command('SetBUserInfoCache')->cron('0 2 * * *')->withoutOverlapping();//咔嚓赚发工资\n $schedule->command('kachazhuan',['payKachaSalary'])->cron('*/30 7-23 * * *')->withoutOverlapping();//批量更新地推人员30天内获取的公司的审核状态\n $schedule->command('ExtensionWorkerCompanyAuditStatusUpdate')->cron('0 2 */1 * *')->withoutOverlapping();//点击优惠券激励政策 每个月1号5点发放优惠券\n $schedule->command('PointGoldGrantCoupon')->cron('0 5 1 * *')->withoutOverlapping();//商户简历推荐列表监控\n $schedule->command('RecProfileMonitor')->cron('0 23 * * *')->withoutOverlapping();//聊天频率前20的商户推审crm\n $schedule->command('PushImActiveBizToCrm')->cron('30 23 * * *')->withoutOverlapping();//IM敏感词推送crm召回区\n $schedule->command('PushCrmImContent')->cron('0 */2 * * *')->withoutOverlapping();//批量创建运营系统策略通知(短信+push)\n $schedule->command('CreateOperationSystemStorageNotice')->cron('0 2 * * 1,3,5')->withoutOverlapping();//批量处理运营系统策略通知的队列消息\n $schedule->command('ProcessOperationSystemStorageNotice')->cron('0 9-18 * * 1,3,5');//每日召回push策略\n $schedule->command('ImDayPushUserSet')->cron('0 8 * * *')->withoutOverlapping();$schedule->command('ImDayReplyPush')->cron('0 9 * * *')->withoutOverlapping();$schedule->command('ImDayReplyPush',['all'])->cron('0 13 * * *')->withoutOverlapping();//每周召回push策略\n $schedule->command('ImWeekPushUserSet')->cron('0 8 * * 7')->withoutOverlapping();$schedule->command('ImWeekReplyPush')->cron('0 9 * * 7')->withoutOverlapping();$schedule->command('ImWeekReplyPush',['all'])->cron('0 13 * * 7')->withoutOverlapping();//uv召回push策略\n $schedule->command('ImUvPushUserSet')->cron('0 8 * * *')->withoutOverlapping();$schedule->command('ImUvReplyRecord')->cron('0 9 * * *')->withoutOverlapping();$schedule->command('ImUvReplyRecord',['all'])->cron('0 13 * * *')->withoutOverlapping();//批量处理运营系统策略通知的队列消息\n $schedule->command('ProcessOperationSystemStorageNotice')->cron('0 9,10,11,14,15,16 * * 1,3,5')->withoutOverlapping();//职位下线预警\n $schedule->command('PostOfflineAlarm')->cron('10 0 * * *')->withoutOverlapping();//可聊标签\n $schedule->command('PostAddCanChatTag',['addUvBiz'])->hourly()->withoutOverlapping();$schedule->command('PostAddCanChatTag',['delUvBiz'])->daily()->withoutOverlapping();// tag monitor\n $schedule->command('SyncIncTag',['monitor'])->everyFiveMinutes()->withoutOverlapping();//推送交换联系信息超时消息\n $schedule->command('push:exchange_contact_overtime_msg')->cron('*/30 * * * *')->withoutOverlapping();$schedule->command('AddWatermarkToStoreHeadDoorImg')->cron('0 8,13,17,21 * * *')->withoutOverlapping();}", "title": "" }, { "docid": "821163b8f2318edbe01a0ebb1d4f9c2c", "score": "0.5887679", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')\n // ->hourly();\n// $schedule->command('removeTempFiles')\n// ->dailyAt('00:01');\n// $schedule->command('updateRecurringEvents')\n// ->weeklyOn(1,'00:01');\n $schedule->command('notify:upcoming')->dailyAt('07:00');\n $schedule->command('mail:digest')\n ->dailyAt('07:00');\n $schedule->command('mail:trial-expiration')\n ->hourly();\n $schedule->command('referrers:credit')\n ->everyFiveMinutes();\n $schedule->command('subscriptions:refresh')\n ->everyFiveMinutes();\n }", "title": "" }, { "docid": "02452774b4115503b25eb69dce7538b1", "score": "0.5879989", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')\n ->hourly();\n \n #https://laravel.com/docs/master/scheduling\n \n /*\n * Data synchronization with local data and remote data. this is applied\n * becuase if a user modifies data in the facebook ad manager it should\n * reflect the changes in th local data\n */\n $schedule->command('sync:ad-campaigns')\n ->everyTenMinutes()\n ->sendOutputTo('storage/logs/SyncCampaignsCommand.log');\n\n $schedule->command('fetch:admin-token-data')\n ->daily()\n ->sendOutputTo('storage/logs/AdminTokenValidationCommand.log');\n \n// $schedule->command('sync:ad-campaigns')\n// ->everyMinute()\n// ->sendOutputTo('storage/logs/SyncCampaignsCommand.log');\n \n //$schedule->command('synccampaignscommand')->hourly(); \n }", "title": "" }, { "docid": "e0f49f1dad3d7cb606f7e4a2eeacc6cb", "score": "0.58792907", "text": "protected function schedule(Schedule $schedule)\n\t{\n\n\t\t//For dispensing auto-interactions jobs.\n\t\t$schedule->command('interaction:like')->everyFiveMinutes();\n\t\t$schedule->command('interaction:comment')->everyFiveMinutes();\n\t\t$schedule->command('interaction:follow')->everyMinute();\n\n\t\t//For dispensing DM jobs.\n\t\t$schedule->command('dm:get')->hourly();\n\t\t$schedule->command('dm:send')->hourly();\n\n\t\t//For taking a snapshot of followers for analysis\n\t\t$schedule->command(\"analysis:follower\")->daily(\"00:00\");\n\n\t\t//For refreshing instagram profile sessions & stats\n\t\t$schedule->command(\"ig:refresh\")->everyThirtyMinutes();\n\n\t\t//For refreshing interactions quota & releasing ig_throttled\n\t\t$schedule->command(\"refresh:interactionsquota\")->hourly();\n\n\t\t//For refreshing Braintree, Stripe & Paypal invoices\n\t\t$schedule->command(\"paypal:updatechargesdaily\")\n\t\t ->twiceDaily(5, 17)\n\t\t ->withoutOverlapping()\n\t\t ->emailOutputTo('[email protected]');\n\t\t$schedule->command(\"braintree:listtransactions\")\n\t\t ->twiceDaily(4, 16)\n\t\t ->withoutOverlapping();\n\t\t$schedule->command(\"stripe:getinvoice\")\n\t\t ->twiceDaily(3, 15)\n\t\t ->withoutOverlapping();\n\t}", "title": "" }, { "docid": "3be8418a018c1633921f1db38bb392c7", "score": "0.5874539", "text": "public function __construct()\n {\n parent::__construct();\n $job = \"* * * * * php \".base_path().\"/artisan $this->signature >> /dev/null 2>&1\";\n $this->append_cronjob($job); //on Linux OS\n\n }", "title": "" }, { "docid": "811e0d21416a289e395dbccb1d023e08", "score": "0.5853313", "text": "protected function schedule(Schedule $schedule)\n {\n //$schedule->command('crawler:all')->timezone('asia/seoul')->hourly();\n $schedule->command('crawler:channel youtube')->timezone('asia/seoul')->hourly();\n $schedule->command('crawler:batch')->timezone('asia/seoul')->hourly();\n $schedule->command('crawler:channel twitter')->timezone('asia/seoul')->hourlyAt(10);\n $schedule->command('crawler:channel vlive')->timezone('asia/seoul')->hourlyAt(15);\n $schedule->command('crawler:channel news')->timezone('asia/seoul')->hourlyAt(50);\n\n //크롤링 체크\n $schedule->command('crawler:check')->timezone('asia/seoul')->hourlyAt(20)->withoutOverlapping()->between('9:00', '23:00');\n\n //push\n //개별 발송\n $schedule->command('push:worker P')\n ->everyMinute();\n\n // 전체 발송\n $schedule->command('push:worker A')\n ->everyMinute()\n // 중복 실행 방지\n ->withoutOverlapping();\n\n // 전체 발송\n $schedule->command('push:worker N')\n ->everyMinute()\n // 중복 실행 방지\n ->withoutOverlapping()->between('9:00', '23:00');\n }", "title": "" }, { "docid": "5ef03d16ca8f901b2563ad15b5a9196e", "score": "0.5852449", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('inspire')\n ->hourly();\n //发送通知\n $schedule->command('notices:vipleftday')->dailyAt('07:00');\n \n //发送通知\n $schedule->command('notices:coupons')->dailyAt('07:30');\n \n //团购\n $schedule->command('notices:tuangou')->everyThirtyMinutes();\n \n //测试\n //发送通知\n //$schedule->command('notices:tuangou')->dailyAt(\"20:23\");\n// \n \n\n }", "title": "" }, { "docid": "35f61a9c28726ae2d9443f9e37bba262", "score": "0.58493817", "text": "protected function schedule(Schedule $schedule)\n {\n //每个小时更新热门小说\n $schedule->command('snatch:updateHot --queue')\n ->twiceDaily(10, 18)\n ->withoutOverlapping();\n//\n //每天更新所有小说章节\n $schedule->command('snatch:update --queue')\n ->dailyAt('03:00')\n ->withoutOverlapping();\n\n //每周与起点周榜对比\n $schedule->command('compare:qidian --queue')\n ->weekly()->saturdays()->at('17:00');\n $schedule->command('compare:qidian recom --queue')\n ->weekly()->saturdays()->at('18:00');\n $schedule->command('compare:qidian fin --queue')\n ->weekly()->saturdays()->at('19:00');\n\n //每月与起点月榜对比\n $schedule->command('compare:qidian click 2 --queue')\n ->monthlyOn(28, '20:00');\n $schedule->command('compare:qidian recom 2 --queue')\n ->monthlyOn(28, '21:00');\n $schedule->command('compare:qidian fin 2 --queue')\n ->monthlyOn(28, '22:00');\n \n //站点可访问性监控\n $schedule->command('monitor:site')\n ->everyTenMinutes();\n//\n //每天更新所有小说章节数\n// $schedule->command('sum:chapter --queue')\n// ->dailyAt('12:00');\n//\n// //每天发送邮件\n// $schedule->command('mail:daily')\n// ->dailyAt('23:00');\n }", "title": "" }, { "docid": "eea0d676c2d82081de4a14013e9236ba", "score": "0.5846103", "text": "protected function schedule(Schedule $schedule)\n {\n // $schedule->command('inspire')->hourly();\n //$date = Carbon::now()->toW3cString();\n $environment = env('APP_ENV');\n //$schedule->command('backup:clean')->daily()->at('01:00');\n if($environment === \"production\"){\n //$schedule->command('backup:clean')->daily()->at('01:00');\n //$schedule->command('backup:run')->daily()->at('01:30');\n //$schedule->command('backup:run')->daily()->at('10:20');\n /*$schedule->command('backup:run');\n Mail::raw('ghin.io database backup ran successfully', function($message){\n $message->from('[email protected]', \"ghin.io support\");\n $message->subject(\"ghin.io database backup ran successfully\");\n $message->to(env('ADMIN_EMAIL'));\n });*/\n }\n\n }", "title": "" }, { "docid": "d95ae9cafaf0d4a731711b8892167419", "score": "0.5837919", "text": "private function create ( ) {\r\n onapp_debug(__METHOD__);\r\n global $_ALIASES;\r\n $cron = onapp_get_arg('cron');\r\n\r\n if ( ! $cron ) {\r\n $this->show_template_create();\r\n }\r\n else {\r\n if ( $cron['command'] == '' ) {\r\n $error = onapp_string( 'COMMAND_FIELD_COULD_NOT_BE_EMPTY' );\r\n trigger_error ( $error );\r\n $this->show_template_create( $error );\r\n exit;\r\n }\r\n\r\n $this->ssh_connect ( );\r\n $this->append_cronjob(\r\n $cron['minute']. ' ' .\r\n $cron['hour'] . ' ' .\r\n $cron['day'] . ' ' .\r\n $cron['month'] . ' ' .\r\n $cron['weekday'] . ' ' .\r\n $cron['command']\r\n );\r\n\r\n $_SESSION['message'] = 'CRON_JOB_HAS_BEEN_CREATED_SUCCESSFULLY';\r\n onapp_redirect( ONAPP_BASE_URL . '/' . $_ALIASES['cron_manager'] );\r\n }\r\n }", "title": "" }, { "docid": "33aa57bdec9c160a6e6adfb6c142aa73", "score": "0.58340496", "text": "public function schedule(Schedule $schedule): void\n {\n $schedule->command(static::class)->hourly();\n }", "title": "" }, { "docid": "027e06ade5bec347c7a49f877dc1ff0c", "score": "0.5826683", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('geocode:clean')->daily();\n $schedule->command('tokens:clean')->daily();\n $schedule->command('adverts:delete')->daily();\n\n //PagSeguro related CRONJOBS\n //Personal payment\n $schedule->command('payment:check_p')->everyMinute();\n $schedule->command('payment:check_all_p')->daily();\n $schedule->command('payment:deactivate_p')->daily();\n //Plan payment\n $schedule->command('payment:check_e')->everyMinute();\n $schedule->command('payment:next_e')->dailyAt('07:00');\n $schedule->command('payment:retry_e')->dailyAt('06:00');\n $schedule->command('payment:cancelled_e')->daily();\n $schedule->command('payment:boleto_e')->dailyAt('01:00');\n\n //Comunication with anothers servers\n $schedule->command('communication:alexandreazevedo')->dailyAt('01:00');\n $schedule->command('communication:telesul')->dailyAt('02:00');\n }", "title": "" }, { "docid": "65092292785aec8959840e1373fc051e", "score": "0.58261156", "text": "protected function schedule(Schedule $schedule)\n {\n $schedule->command('cronjob:rides')\n ->everyMinute();\n\n $schedule->command('cronjob:providers')\n ->everyFiveMinutes();\n\n // $schedule->command('cronjob:demodata')\n // ->weeklyOn(1, '8:00');\n\n $schedule->call('App\\Http\\Controllers\\AdminController@DBbackUp')->everyMinute();\n\n $schedule->command('rides:recurrent')\n ->everyMinute();\n\n $schedule->command('rides:auto_cancel_assign')\n ->everyMinute();\n }", "title": "" }, { "docid": "d203ba662e568601f7336f964ccc9b65", "score": "0.5816833", "text": "public function run()\n {\n //\n Schedules::create([\n \t\"name\"=>\"Sriwijaya Air\",\n \t\"description\"=>\"Yoyoy\",\n \t\"type\"=>\"Regular\",\n \"capacity\"=>\"1\",\n \"from\"=>\"Semarang\",\n \"to\"=>\"Jakarta\",\n \"start_at\"=>\"19.00\",\n \"end_at\"=>\"20.00\"\n ]);\n }", "title": "" } ]